librarian-puppet-maestrodev 0.9.7.5 → 0.9.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. data/README.md +3 -3
  2. data/bin/librarian-puppet +0 -2
  3. data/lib/librarian/puppet.rb +10 -1
  4. data/lib/librarian/puppet/extension.rb +68 -11
  5. data/lib/librarian/puppet/requirement.rb +39 -0
  6. data/lib/librarian/puppet/source.rb +1 -0
  7. data/lib/librarian/puppet/source/forge.rb +8 -1
  8. data/lib/librarian/puppet/source/git.rb +2 -0
  9. data/lib/librarian/puppet/source/githubtarball.rb +16 -1
  10. data/lib/librarian/puppet/version.rb +1 -1
  11. metadata +33 -112
  12. data/vendor/librarian/CHANGELOG.md +0 -185
  13. data/vendor/librarian/Gemfile +0 -6
  14. data/vendor/librarian/MIT-LICENSE +0 -20
  15. data/vendor/librarian/README.md +0 -403
  16. data/vendor/librarian/Rakefile +0 -34
  17. data/vendor/librarian/bin/librarian-chef +0 -7
  18. data/vendor/librarian/bin/librarian-mock +0 -7
  19. data/vendor/librarian/config/cucumber.yaml +0 -1
  20. data/vendor/librarian/features/chef/cli/init.feature +0 -11
  21. data/vendor/librarian/features/chef/cli/install.feature +0 -64
  22. data/vendor/librarian/features/chef/cli/show.feature +0 -77
  23. data/vendor/librarian/features/chef/cli/version.feature +0 -11
  24. data/vendor/librarian/features/support/env.rb +0 -9
  25. data/vendor/librarian/lib/librarian.rb +0 -19
  26. data/vendor/librarian/lib/librarian/action.rb +0 -5
  27. data/vendor/librarian/lib/librarian/action/base.rb +0 -24
  28. data/vendor/librarian/lib/librarian/action/clean.rb +0 -44
  29. data/vendor/librarian/lib/librarian/action/ensure.rb +0 -24
  30. data/vendor/librarian/lib/librarian/action/install.rb +0 -99
  31. data/vendor/librarian/lib/librarian/action/resolve.rb +0 -81
  32. data/vendor/librarian/lib/librarian/action/update.rb +0 -78
  33. data/vendor/librarian/lib/librarian/chef.rb +0 -1
  34. data/vendor/librarian/lib/librarian/chef/cli.rb +0 -48
  35. data/vendor/librarian/lib/librarian/chef/dsl.rb +0 -15
  36. data/vendor/librarian/lib/librarian/chef/environment.rb +0 -27
  37. data/vendor/librarian/lib/librarian/chef/extension.rb +0 -9
  38. data/vendor/librarian/lib/librarian/chef/integration/knife.rb +0 -42
  39. data/vendor/librarian/lib/librarian/chef/manifest_reader.rb +0 -59
  40. data/vendor/librarian/lib/librarian/chef/source.rb +0 -3
  41. data/vendor/librarian/lib/librarian/chef/source/git.rb +0 -25
  42. data/vendor/librarian/lib/librarian/chef/source/local.rb +0 -69
  43. data/vendor/librarian/lib/librarian/chef/source/path.rb +0 -12
  44. data/vendor/librarian/lib/librarian/chef/source/site.rb +0 -446
  45. data/vendor/librarian/lib/librarian/chef/templates/Cheffile +0 -15
  46. data/vendor/librarian/lib/librarian/cli.rb +0 -205
  47. data/vendor/librarian/lib/librarian/cli/manifest_presenter.rb +0 -79
  48. data/vendor/librarian/lib/librarian/config.rb +0 -7
  49. data/vendor/librarian/lib/librarian/config/database.rb +0 -205
  50. data/vendor/librarian/lib/librarian/config/file_source.rb +0 -47
  51. data/vendor/librarian/lib/librarian/config/hash_source.rb +0 -33
  52. data/vendor/librarian/lib/librarian/config/source.rb +0 -149
  53. data/vendor/librarian/lib/librarian/dependency.rb +0 -91
  54. data/vendor/librarian/lib/librarian/dsl.rb +0 -108
  55. data/vendor/librarian/lib/librarian/dsl/receiver.rb +0 -48
  56. data/vendor/librarian/lib/librarian/dsl/target.rb +0 -172
  57. data/vendor/librarian/lib/librarian/environment.rb +0 -134
  58. data/vendor/librarian/lib/librarian/error.rb +0 -4
  59. data/vendor/librarian/lib/librarian/helpers.rb +0 -13
  60. data/vendor/librarian/lib/librarian/lockfile.rb +0 -29
  61. data/vendor/librarian/lib/librarian/lockfile/compiler.rb +0 -66
  62. data/vendor/librarian/lib/librarian/lockfile/parser.rb +0 -100
  63. data/vendor/librarian/lib/librarian/logger.rb +0 -46
  64. data/vendor/librarian/lib/librarian/manifest.rb +0 -132
  65. data/vendor/librarian/lib/librarian/manifest_set.rb +0 -154
  66. data/vendor/librarian/lib/librarian/mock.rb +0 -1
  67. data/vendor/librarian/lib/librarian/mock/cli.rb +0 -19
  68. data/vendor/librarian/lib/librarian/mock/dsl.rb +0 -15
  69. data/vendor/librarian/lib/librarian/mock/environment.rb +0 -24
  70. data/vendor/librarian/lib/librarian/mock/extension.rb +0 -9
  71. data/vendor/librarian/lib/librarian/mock/source.rb +0 -1
  72. data/vendor/librarian/lib/librarian/mock/source/mock.rb +0 -97
  73. data/vendor/librarian/lib/librarian/mock/source/mock/registry.rb +0 -83
  74. data/vendor/librarian/lib/librarian/resolution.rb +0 -44
  75. data/vendor/librarian/lib/librarian/resolver.rb +0 -78
  76. data/vendor/librarian/lib/librarian/resolver/implementation.rb +0 -118
  77. data/vendor/librarian/lib/librarian/source.rb +0 -2
  78. data/vendor/librarian/lib/librarian/source/git.rb +0 -150
  79. data/vendor/librarian/lib/librarian/source/git/repository.rb +0 -217
  80. data/vendor/librarian/lib/librarian/source/local.rb +0 -61
  81. data/vendor/librarian/lib/librarian/source/path.rb +0 -74
  82. data/vendor/librarian/lib/librarian/spec.rb +0 -13
  83. data/vendor/librarian/lib/librarian/spec_change_set.rb +0 -173
  84. data/vendor/librarian/lib/librarian/specfile.rb +0 -18
  85. data/vendor/librarian/lib/librarian/support/abstract_method.rb +0 -21
  86. data/vendor/librarian/lib/librarian/ui.rb +0 -64
  87. data/vendor/librarian/lib/librarian/version.rb +0 -3
  88. data/vendor/librarian/librarian.gemspec +0 -34
  89. data/vendor/librarian/spec/functional/chef/source/git_spec.rb +0 -432
  90. data/vendor/librarian/spec/functional/chef/source/site_spec.rb +0 -215
  91. data/vendor/librarian/spec/functional/source/git/repository_spec.rb +0 -149
  92. data/vendor/librarian/spec/unit/action/base_spec.rb +0 -18
  93. data/vendor/librarian/spec/unit/action/clean_spec.rb +0 -102
  94. data/vendor/librarian/spec/unit/action/ensure_spec.rb +0 -37
  95. data/vendor/librarian/spec/unit/action/install_spec.rb +0 -111
  96. data/vendor/librarian/spec/unit/config/database_spec.rb +0 -319
  97. data/vendor/librarian/spec/unit/dependency_spec.rb +0 -36
  98. data/vendor/librarian/spec/unit/dsl_spec.rb +0 -194
  99. data/vendor/librarian/spec/unit/environment_spec.rb +0 -9
  100. data/vendor/librarian/spec/unit/lockfile/parser_spec.rb +0 -162
  101. data/vendor/librarian/spec/unit/lockfile_spec.rb +0 -65
  102. data/vendor/librarian/spec/unit/manifest_set_spec.rb +0 -202
  103. data/vendor/librarian/spec/unit/manifest_spec.rb +0 -36
  104. data/vendor/librarian/spec/unit/mock/source/mock_spec.rb +0 -22
  105. data/vendor/librarian/spec/unit/resolver_spec.rb +0 -192
  106. data/vendor/librarian/spec/unit/source/git_spec.rb +0 -29
  107. data/vendor/librarian/spec/unit/spec_change_set_spec.rb +0 -169
@@ -1,36 +0,0 @@
1
- require "librarian/dependency"
2
-
3
- describe Librarian::Dependency do
4
-
5
- describe "validations" do
6
-
7
- context "when the name is blank" do
8
- it "raises" do
9
- expect { described_class.new("", [], nil) }.
10
- to raise_error(ArgumentError, %{name ("") must be sensible})
11
- end
12
- end
13
-
14
- context "when the name has leading whitespace" do
15
- it "raises" do
16
- expect { described_class.new(" the-name", [], nil) }.
17
- to raise_error(ArgumentError, %{name (" the-name") must be sensible})
18
- end
19
- end
20
-
21
- context "when the name has trailing whitespace" do
22
- it "raises" do
23
- expect { described_class.new("the-name ", [], nil) }.
24
- to raise_error(ArgumentError, %{name ("the-name ") must be sensible})
25
- end
26
- end
27
-
28
- context "when the name is a single character" do
29
- it "passes" do
30
- described_class.new("R", [], nil)
31
- end
32
- end
33
-
34
- end
35
-
36
- end
@@ -1,194 +0,0 @@
1
- require 'librarian'
2
- require 'librarian/mock'
3
-
4
- module Librarian
5
- module Mock
6
-
7
- describe Dsl do
8
-
9
- let(:env) { Environment.new }
10
-
11
- context "a single source and a single dependency with a blank name" do
12
- it "should not not run with a blank name" do
13
- expect do
14
- env.dsl do
15
- src 'source-1'
16
- dep ''
17
- end
18
- end.to raise_error(ArgumentError, %{name ("") must be sensible})
19
- end
20
- end
21
-
22
- context "a single dependency but no applicable source" do
23
-
24
- it "should not run without any sources" do
25
- expect do
26
- env.dsl do
27
- dep 'dependency-1'
28
- end
29
- end.to raise_error(Dsl::Error)
30
- end
31
-
32
- it "should not run when a block source is defined but the dependency is outside the block" do
33
- expect do
34
- env.dsl do
35
- src 'source-1' do end
36
- dep 'dependency-1'
37
- end
38
- end.to raise_error(Dsl::Error)
39
- end
40
-
41
- end
42
-
43
- context "a simple specfile - a single source, a single dependency, no transitive dependencies" do
44
-
45
- it "should run with a hash source" do
46
- spec = env.dsl do
47
- dep 'dependency-1',
48
- :src => 'source-1'
49
- end
50
- spec.dependencies.should_not be_empty
51
- spec.dependencies.first.name.should == 'dependency-1'
52
- spec.dependencies.first.source.name.should == 'source-1'
53
- spec.source.should be_nil
54
- end
55
-
56
- it "should run with a shortcut source" do
57
- spec = env.dsl do
58
- dep 'dependency-1',
59
- :source => :a
60
- end
61
- spec.dependencies.should_not be_empty
62
- spec.dependencies.first.name.should == 'dependency-1'
63
- spec.dependencies.first.source.name.should == 'source-a'
64
- spec.source.should be_nil
65
- end
66
-
67
- it "should run with a block hash source" do
68
- spec = env.dsl do
69
- source :src => 'source-1' do
70
- dep 'dependency-1'
71
- end
72
- end
73
- spec.dependencies.should_not be_empty
74
- spec.dependencies.first.name.should == 'dependency-1'
75
- spec.dependencies.first.source.name.should == 'source-1'
76
- spec.source.should be_nil
77
- end
78
-
79
- it "should run with a block named source" do
80
- spec = env.dsl do
81
- src 'source-1' do
82
- dep 'dependency-1'
83
- end
84
- end
85
- spec.dependencies.should_not be_empty
86
- spec.dependencies.first.name.should == 'dependency-1'
87
- spec.dependencies.first.source.name.should == 'source-1'
88
- spec.source.should be_nil
89
- end
90
-
91
- it "should run with a default hash source" do
92
- spec = env.dsl do
93
- source :src => 'source-1'
94
- dep 'dependency-1'
95
- end
96
- spec.dependencies.should_not be_empty
97
- spec.dependencies.first.name.should == 'dependency-1'
98
- spec.dependencies.first.source.name.should == 'source-1'
99
- spec.source.should_not be_nil
100
- spec.dependencies.first.source.should == spec.source
101
- end
102
-
103
- it "should run with a default named source" do
104
- spec = env.dsl do
105
- src 'source-1'
106
- dep 'dependency-1'
107
- end
108
- spec.dependencies.should_not be_empty
109
- spec.dependencies.first.name.should == 'dependency-1'
110
- spec.dependencies.first.source.name.should == 'source-1'
111
- spec.source.should_not be_nil
112
- spec.dependencies.first.source.should == spec.source
113
- end
114
-
115
- it "should run with a default shortcut source" do
116
- spec = env.dsl do
117
- source :a
118
- dep 'dependency-1'
119
- end
120
- spec.dependencies.should_not be_empty
121
- spec.dependencies.first.name.should == 'dependency-1'
122
- spec.dependencies.first.source.name.should == 'source-a'
123
- spec.source.should_not be_nil
124
- spec.dependencies.first.source.should == spec.source
125
- end
126
-
127
- it "should run with a shortcut source hash definition" do
128
- spec = env.dsl do
129
- source :b, :src => 'source-b'
130
- dep 'dependency-1', :source => :b
131
- end
132
- spec.dependencies.should_not be_empty
133
- spec.dependencies.first.name.should == 'dependency-1'
134
- spec.dependencies.first.source.name.should == 'source-b'
135
- spec.source.should be_nil
136
- end
137
-
138
- it "should run with a shortcut source block definition" do
139
- spec = env.dsl do
140
- source :b, proc { src 'source-b' }
141
- dep 'dependency-1', :source => :b
142
- end
143
- spec.dependencies.should_not be_empty
144
- spec.dependencies.first.name.should == 'dependency-1'
145
- spec.dependencies.first.source.name.should == 'source-b'
146
- spec.source.should be_nil
147
- end
148
-
149
- it "should run with a default shortcut source hash definition" do
150
- spec = env.dsl do
151
- source :b, :src => 'source-b'
152
- source :b
153
- dep 'dependency-1'
154
- end
155
- spec.dependencies.should_not be_empty
156
- spec.dependencies.first.name.should == 'dependency-1'
157
- spec.dependencies.first.source.name.should == 'source-b'
158
- spec.source.should_not be_nil
159
- spec.source.name.should == 'source-b'
160
- end
161
-
162
- it "should run with a default shortcut source block definition" do
163
- spec = env.dsl do
164
- source :b, proc { src 'source-b' }
165
- source :b
166
- dep 'dependency-1'
167
- end
168
- spec.dependencies.should_not be_empty
169
- spec.dependencies.first.name.should == 'dependency-1'
170
- spec.dependencies.first.source.name.should == 'source-b'
171
- spec.source.should_not be_nil
172
- spec.source.name.should == 'source-b'
173
- end
174
-
175
- end
176
-
177
- context "validating source options" do
178
-
179
- it "should raise when given unrecognized optiosn options" do
180
- expect do
181
- env.dsl do
182
- dep 'dependency-1',
183
- :src => 'source-1',
184
- :huh => 'yikes'
185
- end
186
- end.to raise_error(Error, %{unrecognized options: huh})
187
- end
188
-
189
- end
190
-
191
- end
192
-
193
- end
194
- end
@@ -1,9 +0,0 @@
1
- require "librarian/environment"
2
-
3
- module Librarian
4
- describe Environment do
5
-
6
- let(:env) { described_class.new }
7
-
8
- end
9
- end
@@ -1,162 +0,0 @@
1
- require "librarian/helpers"
2
- require "librarian/lockfile/parser"
3
- require "librarian/mock"
4
-
5
- module Librarian
6
- describe Lockfile::Parser do
7
-
8
- let(:env) { Mock::Environment.new }
9
- let(:parser) { described_class.new(env) }
10
- let(:resolution) { parser.parse(lockfile) }
11
-
12
- context "a mock lockfile with one source and no dependencies" do
13
- let(:lockfile) do
14
- Helpers.strip_heredoc <<-LOCKFILE
15
- MOCK
16
- remote: source-a
17
- specs:
18
-
19
- DEPENDENCIES
20
-
21
- LOCKFILE
22
- end
23
-
24
- it "should give an empty list of dependencies" do
25
- resolution.dependencies.should be_empty
26
- end
27
-
28
- it "should give an empty list of manifests" do
29
- resolution.manifests.should be_empty
30
- end
31
- end
32
-
33
- context "a mock lockfile with one source and one dependency" do
34
- let(:lockfile) do
35
- Helpers.strip_heredoc <<-LOCKFILE
36
- MOCK
37
- remote: source-a
38
- specs:
39
- jelly (1.3.5)
40
-
41
- DEPENDENCIES
42
- jelly (!= 1.2.6, ~> 1.1)
43
-
44
- LOCKFILE
45
- end
46
-
47
- it "should give a list of one dependency" do
48
- resolution.should have(1).dependencies
49
- end
50
-
51
- it "should give a dependency with the expected name" do
52
- dependency = resolution.dependencies.first
53
-
54
- dependency.name.should == "jelly"
55
- end
56
-
57
- it "should give a dependency with the expected requirement" do
58
- dependency = resolution.dependencies.first
59
-
60
- # Note: it must be this order because this order is lexicographically sorted.
61
- dependency.requirement.to_s.should == "!= 1.2.6, ~> 1.1"
62
- end
63
-
64
- it "should give a dependency wth the expected source" do
65
- dependency = resolution.dependencies.first
66
- source = dependency.source
67
-
68
- source.name.should == "source-a"
69
- end
70
-
71
- it "should give a list of one manifest" do
72
- resolution.should have(1).manifests
73
- end
74
-
75
- it "should give a manifest with the expected name" do
76
- manifest = resolution.manifests.first
77
-
78
- manifest.name.should == "jelly"
79
- end
80
-
81
- it "should give a manifest with the expected version" do
82
- manifest = resolution.manifests.first
83
-
84
- manifest.version.to_s.should == "1.3.5"
85
- end
86
-
87
- it "should give a manifest with no dependencies" do
88
- manifest = resolution.manifests.first
89
-
90
- manifest.dependencies.should be_empty
91
- end
92
-
93
- it "should give a manifest with the expected source" do
94
- manifest = resolution.manifests.first
95
- source = manifest.source
96
-
97
- source.name.should == "source-a"
98
- end
99
-
100
- it "should give the dependency and the manifest the same source instance" do
101
- dependency = resolution.dependencies.first
102
- manifest = resolution.manifests.first
103
-
104
- dependency_source = dependency.source
105
- manifest_source = manifest.source
106
-
107
- manifest_source.should be dependency_source
108
- end
109
- end
110
-
111
- context "a mock lockfile with one source and a complex dependency" do
112
- let(:lockfile) do
113
- Helpers.strip_heredoc <<-LOCKFILE
114
- MOCK
115
- remote: source-a
116
- specs:
117
- butter (2.5.3)
118
- jelly (1.3.5)
119
- butter (< 3, >= 1.1)
120
-
121
- DEPENDENCIES
122
- jelly (!= 1.2.6, ~> 1.1)
123
-
124
- LOCKFILE
125
- end
126
-
127
- it "should give a list of one dependency" do
128
- resolution.should have(1).dependencies
129
- end
130
-
131
- it "should have the expected dependency" do
132
- dependency = resolution.dependencies.first
133
-
134
- dependency.name.should == "jelly"
135
- end
136
-
137
- it "should give a list of all the manifests" do
138
- resolution.should have(2).manifests
139
- end
140
-
141
- it "should include all the expected manifests" do
142
- manifests = ManifestSet.new(resolution.manifests)
143
-
144
- manifests.to_hash.keys.should =~ %w(butter jelly)
145
- end
146
-
147
- it "should have an internally consistent set of manifests" do
148
- manifests = ManifestSet.new(resolution.manifests)
149
-
150
- manifests.should be_consistent
151
- end
152
-
153
- it "should have an externally consistent set of manifests" do
154
- dependencies = resolution.dependencies
155
- manifests = ManifestSet.new(resolution.manifests)
156
-
157
- manifests.should be_in_compliance_with dependencies
158
- end
159
- end
160
-
161
- end
162
- end
@@ -1,65 +0,0 @@
1
- require 'librarian'
2
- require 'librarian/mock'
3
-
4
- module Librarian
5
- describe Lockfile do
6
-
7
- let(:env) { Mock::Environment.new }
8
-
9
- before do
10
- env.registry :clear => true do
11
- source 'source-1' do
12
- spec 'alpha', '1.1'
13
- end
14
- end
15
- end
16
-
17
- let(:spec) do
18
- env.dsl do
19
- src 'source-1'
20
- dep 'alpha', '1.1'
21
- end
22
- end
23
-
24
- let(:resolver) { env.resolver }
25
- let(:resolution) { resolver.resolve(spec) }
26
-
27
- context "sanity" do
28
- context "the resolution" do
29
- subject { resolution }
30
-
31
- it { should be_correct }
32
- it { should have(1).manifests }
33
- end
34
- end
35
-
36
- describe "#save" do
37
- let(:lockfile) { env.ephemeral_lockfile }
38
- let(:lockfile_text) { lockfile.save(resolution) }
39
-
40
- context "just saving" do
41
- it "should return the lockfile text" do
42
- lockfile_text.should_not be_nil
43
- end
44
- end
45
-
46
- context "saving and reloading" do
47
- let(:reloaded_resolution) { lockfile.load(lockfile_text) }
48
-
49
- it "should have the expected manifests" do
50
- reloaded_resolution.manifests.count.should == resolution.manifests.count
51
- end
52
- end
53
-
54
- context "bouncing" do
55
- let(:bounced_resolution) { lockfile.load(lockfile_text) }
56
- let(:bounced_lockfile_text) { lockfile.save(bounced_resolution) }
57
-
58
- it "should return the same lockfile text after bouncing as before bouncing" do
59
- bounced_lockfile_text.should == lockfile_text
60
- end
61
- end
62
- end
63
-
64
- end
65
- end