rubygems-tasks 0.1.0.pre1 → 0.1.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -6
- data/gemspec.yml +1 -1
- data/lib/rubygems/tasks/console.rb +37 -16
- data/lib/rubygems/tasks/install.rb +14 -1
- data/lib/rubygems/tasks/project.rb +50 -0
- data/lib/rubygems/tasks/push.rb +17 -5
- data/lib/rubygems/tasks/scm/status.rb +1 -1
- data/lib/rubygems/tasks/scm/tag.rb +3 -3
- data/lib/rubygems/tasks/task.rb +10 -0
- data/lib/rubygems/tasks/tasks.rb +12 -12
- data/spec/console_spec.rb +68 -0
- data/spec/install_spec.rb +16 -0
- data/spec/push_spec.rb +32 -0
- data/spec/rake_context.rb +6 -0
- data/spec/scm/push_spec.rb +34 -0
- data/spec/scm/tag_spec.rb +66 -0
- data/spec/spec_helper.rb +7 -0
- data/spec/tasks_spec.rb +127 -0
- metadata +31 -8
data/README.md
CHANGED
@@ -19,12 +19,12 @@ to the project generator which you used to create the project.
|
|
19
19
|
Project generators have _nothing_ to do with the Rake tasks used to build,
|
20
20
|
install and release a Ruby project.
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
This is what rubygems-tasks seeks to
|
22
|
+
Recently, many Ruby Developers began creating Ruby projects by hand,
|
23
|
+
building/releasing RubyGems using `gem build` / `gem push`. Sometimes this
|
24
|
+
resulted in RubyGems being released with uncommitted changes, or the developer
|
25
|
+
forgetting to tag the release. Ruby Developers should have access to
|
26
|
+
Project generator _agnostic_ and _unobtrusive_ Rake tasks, to _automate_
|
27
|
+
the release process. This is what rubygems-tasks seeks to provide.
|
28
28
|
|
29
29
|
## Features
|
30
30
|
|
data/gemspec.yml
CHANGED
@@ -45,27 +45,48 @@ module Gem
|
|
45
45
|
# Defines the `console` task.
|
46
46
|
#
|
47
47
|
def define
|
48
|
-
@project.gemspecs.
|
48
|
+
@project.gemspecs.each_key do |name|
|
49
49
|
namespace :console do
|
50
|
-
task name
|
51
|
-
arguments = [@command, *@options]
|
52
|
-
arguments += gemspec.require_paths.map { |dir| "-I#{dir}" }
|
53
|
-
|
54
|
-
if @project.bundler?
|
55
|
-
if @command == DEFAULT_CONSOLE
|
56
|
-
run 'bundle', 'console'
|
57
|
-
else
|
58
|
-
run 'bundle', 'exec', *arguments
|
59
|
-
end
|
60
|
-
else
|
61
|
-
run *arguments
|
62
|
-
end
|
63
|
-
end
|
50
|
+
task(name) { console(name) }
|
64
51
|
end
|
65
52
|
end
|
66
53
|
|
67
54
|
desc "Spawns an Interactive Ruby Console"
|
68
|
-
task :console => "console:#{@project.
|
55
|
+
task :console => "console:#{@project.primary_gemspec_name}"
|
56
|
+
end
|
57
|
+
|
58
|
+
#
|
59
|
+
# Builds the complete arguments for the console command.
|
60
|
+
#
|
61
|
+
# @param [Symbol, String] name
|
62
|
+
# The name of the gemspec to load.
|
63
|
+
#
|
64
|
+
# @return [Array<String>]
|
65
|
+
# The arguments for the console command.
|
66
|
+
#
|
67
|
+
def console(name=@project.primary_gemspec_name)
|
68
|
+
unless (gemspec = @project.gemspecs[name.to_s])
|
69
|
+
raise(ArgumentError,"unknown gemspec name: #{name}")
|
70
|
+
end
|
71
|
+
|
72
|
+
arguments = [@command]
|
73
|
+
|
74
|
+
# add -I options for lib/ or ext/ directories
|
75
|
+
arguments.push(*gemspec.require_paths.map { |dir| "-I#{dir}" })
|
76
|
+
|
77
|
+
# push on additional options
|
78
|
+
arguments.push(*@options)
|
79
|
+
|
80
|
+
if @project.bundler?
|
81
|
+
# use `bundle console` unless were were using custom command/options
|
82
|
+
if (@command == DEFAULT_CONSOLE && @options.empty?)
|
83
|
+
arguments = ['bundle', 'console']
|
84
|
+
else
|
85
|
+
arguments.unshift('bundle', 'exec')
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
return run(*arguments)
|
69
90
|
end
|
70
91
|
|
71
92
|
end
|
@@ -31,7 +31,7 @@ module Gem
|
|
31
31
|
task build => path do
|
32
32
|
status "Installing #{File.basename(path)} ..."
|
33
33
|
|
34
|
-
|
34
|
+
install(path)
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
@@ -42,6 +42,19 @@ module Gem
|
|
42
42
|
task :install_gem => :install # backwards compatibility with Hoe
|
43
43
|
end
|
44
44
|
|
45
|
+
#
|
46
|
+
# Pushes the gem by running `gem install`.
|
47
|
+
#
|
48
|
+
# @param [String] path
|
49
|
+
# The path to the `.gem` file.
|
50
|
+
#
|
51
|
+
# @return [Boolean]
|
52
|
+
# Specifies whether `gem install` was successfull or not.
|
53
|
+
#
|
54
|
+
def install(path)
|
55
|
+
run 'gem', 'install', '-q', path
|
56
|
+
end
|
57
|
+
|
45
58
|
end
|
46
59
|
end
|
47
60
|
end
|
@@ -54,6 +54,22 @@ module Gem
|
|
54
54
|
#
|
55
55
|
attr_reader :builds
|
56
56
|
|
57
|
+
#
|
58
|
+
# The name of the primary gemspec.
|
59
|
+
#
|
60
|
+
# @return [String]
|
61
|
+
# The gemspec name.
|
62
|
+
#
|
63
|
+
attr_reader :primary_gemspec_name
|
64
|
+
|
65
|
+
#
|
66
|
+
# The primary gemspec for the project.
|
67
|
+
#
|
68
|
+
# @return [Gem::Specification]
|
69
|
+
# The primary gemspec.
|
70
|
+
#
|
71
|
+
attr_reader :primary_gemspec
|
72
|
+
|
57
73
|
#
|
58
74
|
# Initializes the project.
|
59
75
|
#
|
@@ -82,9 +98,43 @@ module Gem
|
|
82
98
|
end
|
83
99
|
end
|
84
100
|
|
101
|
+
@primary_gemspec_name, @primary_gemspec = if @gemspecs.has_key?(@name)
|
102
|
+
[@name, @gemspecs[@name]]
|
103
|
+
else
|
104
|
+
@gemspecs.first
|
105
|
+
end
|
106
|
+
|
85
107
|
@bundler = File.file?(File.join(@root,'Gemfile'))
|
86
108
|
end
|
87
109
|
|
110
|
+
#
|
111
|
+
# The primary build name for the project.
|
112
|
+
#
|
113
|
+
# @return [String]
|
114
|
+
# The primary build name.
|
115
|
+
#
|
116
|
+
# @api semipublic
|
117
|
+
#
|
118
|
+
def primary_build
|
119
|
+
if @builds.has_key?(@name)
|
120
|
+
@name
|
121
|
+
else
|
122
|
+
@builds.keys.first
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
#
|
127
|
+
# The primary gemspec for the project.
|
128
|
+
#
|
129
|
+
# @return [Gem::Specification]
|
130
|
+
# The primary gemspec.
|
131
|
+
#
|
132
|
+
# @api semipublic
|
133
|
+
#
|
134
|
+
def primary_gemspec
|
135
|
+
@gemspecs[primary_build]
|
136
|
+
end
|
137
|
+
|
88
138
|
#
|
89
139
|
# Maps project directories to projects.
|
90
140
|
#
|
data/lib/rubygems/tasks/push.rb
CHANGED
@@ -37,17 +37,13 @@ module Gem
|
|
37
37
|
path = packages[:gem]
|
38
38
|
|
39
39
|
task build => path do
|
40
|
-
arguments = []
|
41
|
-
|
42
40
|
if @host
|
43
|
-
arguments << '--host' << @host
|
44
|
-
|
45
41
|
status "Pushing #{File.basename(path)} to #{@host} ..."
|
46
42
|
else
|
47
43
|
status "Pushing #{File.basename(path)} ..."
|
48
44
|
end
|
49
45
|
|
50
|
-
|
46
|
+
push(path)
|
51
47
|
end
|
52
48
|
end
|
53
49
|
end
|
@@ -58,6 +54,22 @@ module Gem
|
|
58
54
|
task :publish => :push
|
59
55
|
end
|
60
56
|
|
57
|
+
#
|
58
|
+
# Pushes the gem by running `gem push`.
|
59
|
+
#
|
60
|
+
# @param [String] path
|
61
|
+
# The path to the `.gem` file.
|
62
|
+
#
|
63
|
+
# @return [Boolean]
|
64
|
+
# Specifies whether `gem push` was successfull or not.
|
65
|
+
#
|
66
|
+
def push(path)
|
67
|
+
arguments = ['gem', 'push', path]
|
68
|
+
arguments.push('--host', @host) if @host
|
69
|
+
|
70
|
+
return run(*arguments)
|
71
|
+
end
|
72
|
+
|
61
73
|
end
|
62
74
|
end
|
63
75
|
end
|
@@ -45,7 +45,7 @@ module Gem
|
|
45
45
|
tag = if args.name
|
46
46
|
args.name
|
47
47
|
else
|
48
|
-
version_tag(@project.
|
48
|
+
version_tag(@project.primary_gemspec.version)
|
49
49
|
end
|
50
50
|
|
51
51
|
status "Tagging #{tag} ..."
|
@@ -105,8 +105,8 @@ module Gem
|
|
105
105
|
|
106
106
|
tag_dir = File.join(tag_dirs,name)
|
107
107
|
|
108
|
-
mkdir_p tags_dir
|
109
|
-
cp_r
|
108
|
+
FileUtils.mkdir_p tags_dir
|
109
|
+
FileUtils.cp_r '.', tag_dir
|
110
110
|
|
111
111
|
return run('svn', 'add', tag_dir)
|
112
112
|
else
|
data/lib/rubygems/tasks/task.rb
CHANGED
data/lib/rubygems/tasks/tasks.rb
CHANGED
@@ -121,26 +121,26 @@ module Gem
|
|
121
121
|
@sign = OpenStruct.new
|
122
122
|
|
123
123
|
if build_options
|
124
|
-
@build.gem = Build::Gem.new if build_options.fetch(:gem,true)
|
125
|
-
@build.tar = Build::Tar.new if build_options[:tar]
|
126
|
-
@build.zip = Build::Zip.new if build_options[:zip]
|
124
|
+
@build.gem = (Build::Gem.new if build_options.fetch(:gem,true))
|
125
|
+
@build.tar = (Build::Tar.new if build_options[:tar])
|
126
|
+
@build.zip = (Build::Zip.new if build_options[:zip])
|
127
127
|
end
|
128
128
|
|
129
129
|
if scm_options
|
130
|
-
@scm.status = SCM::Status.new if scm_options.fetch(:status,true)
|
131
|
-
@scm.tag = SCM::Tag.new if scm_options.fetch(:tag,true)
|
132
|
-
@scm.push = SCM::Push.new if scm_options.fetch(:push,true)
|
130
|
+
@scm.status = (SCM::Status.new if scm_options.fetch(:status,true))
|
131
|
+
@scm.tag = (SCM::Tag.new if scm_options.fetch(:tag,true))
|
132
|
+
@scm.push = (SCM::Push.new if scm_options.fetch(:push,true))
|
133
133
|
end
|
134
134
|
|
135
135
|
if sign_options
|
136
|
-
@sign.checksum = Sign::Checksum.new if sign_options[:checksum]
|
137
|
-
@sign.pgp = Sign::PGP.new if sign_options[:pgp]
|
136
|
+
@sign.checksum = (Sign::Checksum.new if sign_options[:checksum])
|
137
|
+
@sign.pgp = (Sign::PGP.new if sign_options[:pgp])
|
138
138
|
end
|
139
139
|
|
140
|
-
@console = Console.new if options.fetch(:console,true)
|
141
|
-
@install = Install.new if options.fetch(:install,true)
|
142
|
-
@push = Push.new if options.fetch(:push,true)
|
143
|
-
@release = Release.new if options.fetch(:release,true)
|
140
|
+
@console = (Console.new if options.fetch(:console,true))
|
141
|
+
@install = (Install.new if options.fetch(:install,true))
|
142
|
+
@push = (Push.new if options.fetch(:push,true))
|
143
|
+
@release = (Release.new if options.fetch(:release,true))
|
144
144
|
|
145
145
|
yield self if block_given?
|
146
146
|
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'rake_context'
|
3
|
+
|
4
|
+
require 'rubygems/tasks/console'
|
5
|
+
|
6
|
+
describe Gem::Tasks::Console do
|
7
|
+
describe "#console" do
|
8
|
+
include_context "rake"
|
9
|
+
|
10
|
+
let(:command) { 'ripl' }
|
11
|
+
let(:options) { %w[-Ivendor -rfoo] }
|
12
|
+
|
13
|
+
context "defaults" do
|
14
|
+
it "should run `irb`" do
|
15
|
+
subject.should_receive(:run).with('irb','-Ilib')
|
16
|
+
|
17
|
+
subject.console
|
18
|
+
end
|
19
|
+
|
20
|
+
context "when project.bundler? == true" do
|
21
|
+
it "should use `bundle console`" do
|
22
|
+
subject.project.stub!(:bundler?).and_return(true)
|
23
|
+
subject.should_receive(:run).with('bundle', 'console')
|
24
|
+
|
25
|
+
subject.console
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context "with custom command" do
|
31
|
+
subject { described_class.new(:command => command) }
|
32
|
+
|
33
|
+
it "should run the custom console" do
|
34
|
+
subject.should_receive(:run).with(command, '-Ilib')
|
35
|
+
|
36
|
+
subject.console
|
37
|
+
end
|
38
|
+
|
39
|
+
context "when project.bundler? == true" do
|
40
|
+
it "should use `bundle exec`" do
|
41
|
+
subject.project.stub!(:bundler?).and_return(true)
|
42
|
+
subject.should_receive(:run).with('bundle', 'exec', command, '-Ilib')
|
43
|
+
|
44
|
+
subject.console
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
context "with custom options" do
|
50
|
+
subject { described_class.new(:options => options) }
|
51
|
+
|
52
|
+
it "should pass custom options to `irb`" do
|
53
|
+
subject.should_receive(:run).with('irb', '-Ilib', *options)
|
54
|
+
|
55
|
+
subject.console
|
56
|
+
end
|
57
|
+
|
58
|
+
context "when project.bundler? == true" do
|
59
|
+
it "should use `bundle exec ...`" do
|
60
|
+
subject.project.stub!(:bundler?).and_return(true)
|
61
|
+
subject.should_receive(:run).with('bundle', 'exec', 'irb', '-Ilib', *options)
|
62
|
+
|
63
|
+
subject.console
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'rake_context'
|
3
|
+
|
4
|
+
require 'rubygems/tasks/install'
|
5
|
+
|
6
|
+
describe Gem::Tasks::Install do
|
7
|
+
describe "#install" do
|
8
|
+
let(:path) { 'pkg/foo-1.2.3.gem' }
|
9
|
+
|
10
|
+
it "should use `gem install -q`" do
|
11
|
+
subject.should_receive(:run).with('gem', 'install', '-q', path)
|
12
|
+
|
13
|
+
subject.install(path)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/spec/push_spec.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'rake_context'
|
3
|
+
|
4
|
+
require 'rubygems/tasks/push'
|
5
|
+
|
6
|
+
describe Gem::Tasks::Push do
|
7
|
+
describe "#push" do
|
8
|
+
include_context "rake"
|
9
|
+
|
10
|
+
let(:path) { 'pkg/foo-1.2.3.gem' }
|
11
|
+
|
12
|
+
context "defaults" do
|
13
|
+
it "should use `gem push`" do
|
14
|
+
subject.should_receive(:run).with('gem', 'push', path)
|
15
|
+
|
16
|
+
subject.push(path)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
context "with custom :host" do
|
21
|
+
let(:host) { 'internal.company.com' }
|
22
|
+
|
23
|
+
subject { described_class.new(:host => host) }
|
24
|
+
|
25
|
+
it "should include the --host option" do
|
26
|
+
subject.should_receive(:run).with('gem', 'push', path, '--host', host)
|
27
|
+
|
28
|
+
subject.push(path)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'rake_context'
|
3
|
+
|
4
|
+
require 'rubygems/tasks/scm/push'
|
5
|
+
|
6
|
+
describe Gem::Tasks::SCM::Push do
|
7
|
+
describe "#push!" do
|
8
|
+
context "git" do
|
9
|
+
it "should run `git push --tags`" do
|
10
|
+
subject.project.stub!(:scm).and_return(:git)
|
11
|
+
subject.should_receive(:run).with('git', 'push', '--tags')
|
12
|
+
|
13
|
+
subject.push!
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
context "hg" do
|
18
|
+
it "should run `hg push`" do
|
19
|
+
subject.project.stub!(:scm).and_return(:hg)
|
20
|
+
subject.should_receive(:run).with('hg', 'push')
|
21
|
+
|
22
|
+
subject.push!
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
context "otherwise" do
|
27
|
+
it "should return true" do
|
28
|
+
subject.project.stub!(:scm).and_return(:svn)
|
29
|
+
|
30
|
+
subject.push!.should == true
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'rake_context'
|
3
|
+
|
4
|
+
require 'rubygems/tasks/scm/tag'
|
5
|
+
|
6
|
+
describe Gem::Tasks::SCM::Tag do
|
7
|
+
let(:version) { '1.2.3' }
|
8
|
+
|
9
|
+
describe "#version_tag" do
|
10
|
+
context "defaults" do
|
11
|
+
include_context "rake"
|
12
|
+
|
13
|
+
it "should not have a prefix or suffix" do
|
14
|
+
subject.version_tag(version).should == version
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
context "with format String" do
|
19
|
+
include_context "rake"
|
20
|
+
|
21
|
+
let(:format) { 'v%s' }
|
22
|
+
|
23
|
+
subject { described_class.new(:format => format) }
|
24
|
+
|
25
|
+
it "should apply the format String to the version" do
|
26
|
+
subject.version_tag(version).should == "v#{version}"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context "with format Proc" do
|
31
|
+
let(:format) { proc { |ver| "REL_" + ver.tr('.','_') } }
|
32
|
+
|
33
|
+
subject { described_class.new(:format => format) }
|
34
|
+
|
35
|
+
it "should call the format Proc with the version" do
|
36
|
+
subject.version_tag(version).should == "REL_1_2_3"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe "#tag!" do
|
42
|
+
let(:name) { 'v1.2.3' }
|
43
|
+
|
44
|
+
context "git" do
|
45
|
+
include_context "rake"
|
46
|
+
|
47
|
+
it "should run `git tag`" do
|
48
|
+
subject.project.stub!(:scm).and_return(:git)
|
49
|
+
subject.should_receive(:run).with('git', 'tag', name)
|
50
|
+
|
51
|
+
subject.tag!(name)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
context "hg" do
|
56
|
+
include_context "rake"
|
57
|
+
|
58
|
+
it "should run `hg tag`" do
|
59
|
+
subject.project.stub!(:scm).and_return(:hg)
|
60
|
+
subject.should_receive(:run).with('hg', 'tag', name)
|
61
|
+
|
62
|
+
subject.tag!(name)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
data/spec/spec_helper.rb
CHANGED
data/spec/tasks_spec.rb
ADDED
@@ -0,0 +1,127 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'rake_context'
|
3
|
+
|
4
|
+
require 'rubygems/tasks/tasks'
|
5
|
+
|
6
|
+
describe Gem::Tasks do
|
7
|
+
describe "#initialize" do
|
8
|
+
context "default options" do
|
9
|
+
include_context "rake"
|
10
|
+
|
11
|
+
its(:build) { should be_kind_of(OpenStruct) }
|
12
|
+
its('build.gem') { should be_kind_of(Gem::Tasks::Build::Gem) }
|
13
|
+
its('build.tar') { should be_nil }
|
14
|
+
its('build.zip') { should be_nil }
|
15
|
+
|
16
|
+
its(:scm) { should be_kind_of(OpenStruct) }
|
17
|
+
its('scm.status') { should be_kind_of(Gem::Tasks::SCM::Status) }
|
18
|
+
its('scm.push') { should be_kind_of(Gem::Tasks::SCM::Push) }
|
19
|
+
its('scm.tag') { should be_kind_of(Gem::Tasks::SCM::Tag) }
|
20
|
+
|
21
|
+
its(:sign) { should be_kind_of(OpenStruct) }
|
22
|
+
its('sign.checksum') { should be_nil }
|
23
|
+
its('sign.pgp') { should be_nil }
|
24
|
+
|
25
|
+
its(:console) { should be_kind_of(Gem::Tasks::Console) }
|
26
|
+
its(:install) { should be_kind_of(Gem::Tasks::Install) }
|
27
|
+
its(:push) { should be_kind_of(Gem::Tasks::Push) }
|
28
|
+
its(:release) { should be_kind_of(Gem::Tasks::Release) }
|
29
|
+
end
|
30
|
+
|
31
|
+
context ":build => {:gem => false}" do
|
32
|
+
include_context "rake"
|
33
|
+
|
34
|
+
subject { described_class.new(:build => {:gem => false}) }
|
35
|
+
|
36
|
+
its('build.gem') { should be_nil }
|
37
|
+
end
|
38
|
+
|
39
|
+
context ":build => {:tar => true}" do
|
40
|
+
include_context "rake"
|
41
|
+
|
42
|
+
subject { described_class.new(:build => {:tar => true}) }
|
43
|
+
|
44
|
+
its('build.tar') { should be_kind_of(Gem::Tasks::Build::Tar) }
|
45
|
+
end
|
46
|
+
|
47
|
+
context ":build => {:zip => true}" do
|
48
|
+
include_context "rake"
|
49
|
+
|
50
|
+
subject { described_class.new(:build => {:zip => true}) }
|
51
|
+
|
52
|
+
its('build.zip') { should be_kind_of(Gem::Tasks::Build::Zip) }
|
53
|
+
end
|
54
|
+
|
55
|
+
context ":scm => {:status => false}" do
|
56
|
+
include_context "rake"
|
57
|
+
|
58
|
+
subject { described_class.new(:scm => {:status => false}) }
|
59
|
+
|
60
|
+
its('scm.status') { should be_nil }
|
61
|
+
end
|
62
|
+
|
63
|
+
context ":scm => {:push => false}" do
|
64
|
+
include_context "rake"
|
65
|
+
|
66
|
+
subject { described_class.new(:scm => {:push => false}) }
|
67
|
+
|
68
|
+
its('scm.push') { should be_nil }
|
69
|
+
end
|
70
|
+
|
71
|
+
context ":scm => {:tag => false}" do
|
72
|
+
include_context "rake"
|
73
|
+
|
74
|
+
subject { described_class.new(:scm => {:tag => false}) }
|
75
|
+
|
76
|
+
its('scm.tag') { should be_nil }
|
77
|
+
end
|
78
|
+
|
79
|
+
context ":sign => {:checksum => true}" do
|
80
|
+
include_context "rake"
|
81
|
+
|
82
|
+
subject { described_class.new(:sign => {:checksum => true}) }
|
83
|
+
|
84
|
+
its('sign.checksum') { should be_kind_of(Gem::Tasks::Sign::Checksum) }
|
85
|
+
end
|
86
|
+
|
87
|
+
context ":sign => {:pgp => true}" do
|
88
|
+
include_context "rake"
|
89
|
+
|
90
|
+
subject { described_class.new(:sign => {:pgp => true}) }
|
91
|
+
|
92
|
+
its('sign.pgp') { should be_kind_of(Gem::Tasks::Sign::PGP) }
|
93
|
+
end
|
94
|
+
|
95
|
+
context ":console => false" do
|
96
|
+
include_context "rake"
|
97
|
+
|
98
|
+
subject { described_class.new(:console => false) }
|
99
|
+
|
100
|
+
its(:console) { should be_nil }
|
101
|
+
end
|
102
|
+
|
103
|
+
context ":install => false" do
|
104
|
+
include_context "rake"
|
105
|
+
|
106
|
+
subject { described_class.new(:install => false) }
|
107
|
+
|
108
|
+
its(:install) { should be_nil }
|
109
|
+
end
|
110
|
+
|
111
|
+
context ":push => false" do
|
112
|
+
include_context "rake"
|
113
|
+
|
114
|
+
subject { described_class.new(:push => false) }
|
115
|
+
|
116
|
+
its(:push) { should be_nil }
|
117
|
+
end
|
118
|
+
|
119
|
+
context ":release => false" do
|
120
|
+
include_context "rake"
|
121
|
+
|
122
|
+
subject { described_class.new(:release => false) }
|
123
|
+
|
124
|
+
its(:release) { should be_nil }
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygems-tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.pre2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '2.4'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.4'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: yard
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ~>
|
@@ -32,7 +37,12 @@ dependencies:
|
|
32
37
|
version: '0.7'
|
33
38
|
type: :development
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0.7'
|
36
46
|
description: Simple Rake tasks for managing and releasing Ruby projects.
|
37
47
|
email: postmodern.mod3@gmail.com
|
38
48
|
executables: []
|
@@ -71,7 +81,14 @@ files:
|
|
71
81
|
- lib/rubygems/tasks/task.rb
|
72
82
|
- lib/rubygems/tasks/tasks.rb
|
73
83
|
- rubygems-tasks.gemspec
|
84
|
+
- spec/console_spec.rb
|
85
|
+
- spec/install_spec.rb
|
86
|
+
- spec/push_spec.rb
|
87
|
+
- spec/rake_context.rb
|
88
|
+
- spec/scm/push_spec.rb
|
89
|
+
- spec/scm/tag_spec.rb
|
74
90
|
- spec/spec_helper.rb
|
91
|
+
- spec/tasks_spec.rb
|
75
92
|
homepage: https://github.com/postmodern/rubygems-tasks
|
76
93
|
licenses: []
|
77
94
|
post_install_message:
|
@@ -92,8 +109,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
109
|
version: '0'
|
93
110
|
requirements: []
|
94
111
|
rubyforge_project:
|
95
|
-
rubygems_version: 1.8.
|
112
|
+
rubygems_version: 1.8.23
|
96
113
|
signing_key:
|
97
114
|
specification_version: 3
|
98
115
|
summary: Rake tasks for managing and releasing Ruby projects.
|
99
|
-
test_files:
|
116
|
+
test_files:
|
117
|
+
- spec/console_spec.rb
|
118
|
+
- spec/install_spec.rb
|
119
|
+
- spec/push_spec.rb
|
120
|
+
- spec/scm/push_spec.rb
|
121
|
+
- spec/scm/tag_spec.rb
|
122
|
+
- spec/tasks_spec.rb
|