Xregistry

Check-in [bb9e92df24]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Eliminate dependencies on cat(1) and pax(1) in Rakefile.
Timelines: family | ancestors | descendants | both | trunk | version-1.3.6
Files: files | file ages | folders
SHA1:bb9e92df24b54ebf01f41cf211d0b772d791a952
User & Date: wbp 2016-02-16 21:36:30
Context
2016-02-18
18:18
Generate RDoc documentation. check-in: 2720babe78 user: wbp tags: trunk, version-1.3.7
2016-02-16
21:36
Eliminate dependencies on cat(1) and pax(1) in Rakefile. check-in: bb9e92df24 user: wbp tags: trunk, version-1.3.6
2016-02-15
22:59
Correct homepage and eliminate dependency on cat(1) in gemspec. check-in: 009e45c5ff user: wbp tags: trunk, version-1.3.5
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Rakefile.

1
2
3
4

5
6
7

8
9
10
11
12
13
14
..
26
27
28
29
30
31
32
33



34



































35
36
37
38
39
40
41
42
43
44
45
46
47
# Rakefile for xregistry gem.
# Last modified:  13-Feb-2016  Wm. Parsons

require 'rake/testtask'


name    = 'xregistry'
version = %x[cat VERSION].chomp

package = "#{name}-#{version}"

distfiles = %w[
  LICENSE
  Rakefile
  VERSION
  lib/xregistry.rb
................................................................................
desc "Clean up generated files"
task :clean do
  Dir.glob('*.gem').each { |x| FileUtils.rm_f x }
end

desc "Make a distribution tarball"
task :dist do
  system %Q[pax -wv -s:^:#{package}/: #{distfiles.join(' ')} |



            bzip2 > #{package}.tar.bz2]



































end

desc "Install #{name} gem"
task :install do
  system "gem install --user-install #{package}.gem"
end

desc "Uninstall #{name} gem"
task :uninstall do
  system "gem uninstall #{name} -v #{version}"
end

Rake::TestTask.new :test

|


>


<
>







 







|
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>













1
2
3
4
5
6
7

8
9
10
11
12
13
14
15
..
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Rakefile for xregistry gem.
# Last modified:  16-Feb-2016  Wm. Parsons

require 'rake/testtask'
require 'zlib'

name    = 'xregistry'

version = IO.read('VERSION').chomp
package = "#{name}-#{version}"

distfiles = %w[
  LICENSE
  Rakefile
  VERSION
  lib/xregistry.rb
................................................................................
desc "Clean up generated files"
task :clean do
  Dir.glob('*.gem').each { |x| FileUtils.rm_f x }
end

desc "Make a distribution tarball"
task :dist do
  begin
    # use minitar to create tar file if possible
    require 'archive/tar/minitar'

    File.open("#{package}.tar.gz", 'wb') do |tgz|
      Zlib::GzipWriter.wrap(tgz) do |gz|
        Archive::Tar::Minitar::Writer.open(gz) do |tar|
          distfiles.each do |file|
            contents = File.read(file)
            mode     = File.stat(file).mode
            mtime    = File.stat(file).mtime
            name     = "#{package}/#{file}"
            tar.add_file_simple(name, :mode => mode, :mtime => mtime,
                                :size => contents.size) do |io|
              io.write contents
            end
          end
        end
      end
    end

  rescue LoadError
    # fall back on tar capabilities built into rubygems package if no minitar
    require 'rubygems/package'

    File.open("#{package}.tar.gz", 'wb') do |tgz|
      Zlib::GzipWriter.wrap(tgz) do |gz|
        Gem::Package::TarWriter.new(gz) do |tar|
          distfiles.each do |file|
            contents = File.read(file)
            mode     = File.stat(file).mode
            name     = "#{package}/#{file}"
            tar.add_file_simple(name, mode, contents.size) do |io|
              io.write contents
            end
          end
        end
      end
    end
  end
end

desc "Install #{name} gem"
task :install do
  system "gem install --user-install #{package}.gem"
end

desc "Uninstall #{name} gem"
task :uninstall do
  system "gem uninstall #{name} -v #{version}"
end

Rake::TestTask.new :test

Changes to VERSION.

1
1.3.5
|
1
1.3.6