chef_cap 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/chef_cap/version.rb
CHANGED
@@ -15,6 +15,7 @@ class ChefCapConfiguration
|
|
15
15
|
@configuration.send(:depend, :remote, :command, "svn")
|
16
16
|
end
|
17
17
|
@configuration.send(:set, :revision, ChefCapHelper.set_revision) if ChefCapHelper.has_revision?
|
18
|
+
@configuration.send(:set, :branch, ChefCapHelper.set_branch) if ChefCapHelper.has_branch?
|
18
19
|
end
|
19
20
|
end
|
20
21
|
end
|
@@ -5,6 +5,12 @@ describe ChefCapConfiguration do
|
|
5
5
|
context "the repository specific settings" do
|
6
6
|
before do
|
7
7
|
ENV["rev"] = "SOME_REV"
|
8
|
+
ENV["branch"] = "SOME_BRANCH"
|
9
|
+
end
|
10
|
+
|
11
|
+
after do
|
12
|
+
ENV["rev"] = nil
|
13
|
+
ENV["branch"] = nil
|
8
14
|
end
|
9
15
|
|
10
16
|
it "should set repository values for a git repository" do
|
@@ -15,6 +21,7 @@ describe ChefCapConfiguration do
|
|
15
21
|
configuration.should_receive(:default_run_options).and_return({})
|
16
22
|
configuration.should_receive(:depend).with(:remote, :command, "git")
|
17
23
|
configuration.should_receive(:set).with(:revision, anything)
|
24
|
+
configuration.should_receive(:set).with(:branch, anything)
|
18
25
|
ChefCapConfiguration.configuration = configuration
|
19
26
|
|
20
27
|
ChefCapConfiguration.set_repository_settings
|
@@ -22,26 +29,35 @@ describe ChefCapConfiguration do
|
|
22
29
|
|
23
30
|
it "should set repository values for an svn repository" do
|
24
31
|
configuration = mock("Configuration")
|
25
|
-
ChefCapConfiguration.configuration = configuration
|
26
32
|
configuration.stub!(:repository => "svn://somesvnrepo")
|
27
33
|
configuration.should_receive(:set).with(:scm, :svn)
|
28
34
|
configuration.should_receive(:depend).with(:remote, :command, "svn")
|
29
35
|
configuration.should_receive(:set).with(:revision, anything)
|
30
|
-
|
36
|
+
configuration.should_receive(:set).with(:branch, anything)
|
37
|
+
ChefCapConfiguration.configuration = configuration
|
31
38
|
ChefCapConfiguration.set_repository_settings
|
32
39
|
end
|
33
40
|
end
|
34
41
|
|
35
42
|
it "should set the revision variable so other capistrano tasks will have the right revision value" do
|
36
43
|
configuration = mock("Configuration")
|
37
|
-
ChefCapConfiguration.configuration = configuration
|
38
44
|
configuration.stub!(:repository => nil)
|
45
|
+
ENV["branch"] = "SOME_BRANCH"
|
46
|
+
configuration.should_receive(:set).with(:branch, anything)
|
39
47
|
ENV["rev"] = "SOME_REV"
|
40
48
|
configuration.should_receive(:set).with(:revision, "SOME_REV")
|
41
|
-
|
49
|
+
ChefCapConfiguration.configuration = configuration
|
42
50
|
ChefCapConfiguration.set_repository_settings
|
43
|
-
ENV["rev"] = nil
|
44
51
|
end
|
45
52
|
|
53
|
+
it "should set the branch variable so other capistrano tasks will have the right branch value" do
|
54
|
+
configuration = mock("Configuration")
|
55
|
+
configuration.stub!(:repository => nil)
|
56
|
+
configuration.should_receive(:set).with(:revision, anything)
|
57
|
+
ENV["branch"] = "SOME_BRANCH"
|
58
|
+
configuration.should_receive(:set).with(:branch, "SOME_BRANCH")
|
59
|
+
ChefCapConfiguration.configuration = configuration
|
60
|
+
ChefCapConfiguration.set_repository_settings
|
61
|
+
end
|
46
62
|
end
|
47
63
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef_cap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
prerelease:
|
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: 2011-12-
|
12
|
+
date: 2011-12-21 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|
16
|
-
requirement: &
|
16
|
+
requirement: &2153316960 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 2.5.5
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2153316960
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rspec-rails
|
27
|
-
requirement: &
|
27
|
+
requirement: &2153316420 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '2.1'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2153316420
|
36
36
|
description: chef_cap uses chef"s JSON config format to drive both capistrano and
|
37
37
|
chef-solo"
|
38
38
|
email:
|
@@ -91,7 +91,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
91
|
version: '0'
|
92
92
|
segments:
|
93
93
|
- 0
|
94
|
-
hash: -
|
94
|
+
hash: -2180159314980717012
|
95
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
96
|
none: false
|
97
97
|
requirements:
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
segments:
|
102
102
|
- 0
|
103
|
-
hash: -
|
103
|
+
hash: -2180159314980717012
|
104
104
|
requirements: []
|
105
105
|
rubyforge_project:
|
106
106
|
rubygems_version: 1.8.11
|