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.
- data/README.md +3 -3
- data/bin/librarian-puppet +0 -2
- data/lib/librarian/puppet.rb +10 -1
- data/lib/librarian/puppet/extension.rb +68 -11
- data/lib/librarian/puppet/requirement.rb +39 -0
- data/lib/librarian/puppet/source.rb +1 -0
- data/lib/librarian/puppet/source/forge.rb +8 -1
- data/lib/librarian/puppet/source/git.rb +2 -0
- data/lib/librarian/puppet/source/githubtarball.rb +16 -1
- data/lib/librarian/puppet/version.rb +1 -1
- metadata +33 -112
- data/vendor/librarian/CHANGELOG.md +0 -185
- data/vendor/librarian/Gemfile +0 -6
- data/vendor/librarian/MIT-LICENSE +0 -20
- data/vendor/librarian/README.md +0 -403
- data/vendor/librarian/Rakefile +0 -34
- data/vendor/librarian/bin/librarian-chef +0 -7
- data/vendor/librarian/bin/librarian-mock +0 -7
- data/vendor/librarian/config/cucumber.yaml +0 -1
- data/vendor/librarian/features/chef/cli/init.feature +0 -11
- data/vendor/librarian/features/chef/cli/install.feature +0 -64
- data/vendor/librarian/features/chef/cli/show.feature +0 -77
- data/vendor/librarian/features/chef/cli/version.feature +0 -11
- data/vendor/librarian/features/support/env.rb +0 -9
- data/vendor/librarian/lib/librarian.rb +0 -19
- data/vendor/librarian/lib/librarian/action.rb +0 -5
- data/vendor/librarian/lib/librarian/action/base.rb +0 -24
- data/vendor/librarian/lib/librarian/action/clean.rb +0 -44
- data/vendor/librarian/lib/librarian/action/ensure.rb +0 -24
- data/vendor/librarian/lib/librarian/action/install.rb +0 -99
- data/vendor/librarian/lib/librarian/action/resolve.rb +0 -81
- data/vendor/librarian/lib/librarian/action/update.rb +0 -78
- data/vendor/librarian/lib/librarian/chef.rb +0 -1
- data/vendor/librarian/lib/librarian/chef/cli.rb +0 -48
- data/vendor/librarian/lib/librarian/chef/dsl.rb +0 -15
- data/vendor/librarian/lib/librarian/chef/environment.rb +0 -27
- data/vendor/librarian/lib/librarian/chef/extension.rb +0 -9
- data/vendor/librarian/lib/librarian/chef/integration/knife.rb +0 -42
- data/vendor/librarian/lib/librarian/chef/manifest_reader.rb +0 -59
- data/vendor/librarian/lib/librarian/chef/source.rb +0 -3
- data/vendor/librarian/lib/librarian/chef/source/git.rb +0 -25
- data/vendor/librarian/lib/librarian/chef/source/local.rb +0 -69
- data/vendor/librarian/lib/librarian/chef/source/path.rb +0 -12
- data/vendor/librarian/lib/librarian/chef/source/site.rb +0 -446
- data/vendor/librarian/lib/librarian/chef/templates/Cheffile +0 -15
- data/vendor/librarian/lib/librarian/cli.rb +0 -205
- data/vendor/librarian/lib/librarian/cli/manifest_presenter.rb +0 -79
- data/vendor/librarian/lib/librarian/config.rb +0 -7
- data/vendor/librarian/lib/librarian/config/database.rb +0 -205
- data/vendor/librarian/lib/librarian/config/file_source.rb +0 -47
- data/vendor/librarian/lib/librarian/config/hash_source.rb +0 -33
- data/vendor/librarian/lib/librarian/config/source.rb +0 -149
- data/vendor/librarian/lib/librarian/dependency.rb +0 -91
- data/vendor/librarian/lib/librarian/dsl.rb +0 -108
- data/vendor/librarian/lib/librarian/dsl/receiver.rb +0 -48
- data/vendor/librarian/lib/librarian/dsl/target.rb +0 -172
- data/vendor/librarian/lib/librarian/environment.rb +0 -134
- data/vendor/librarian/lib/librarian/error.rb +0 -4
- data/vendor/librarian/lib/librarian/helpers.rb +0 -13
- data/vendor/librarian/lib/librarian/lockfile.rb +0 -29
- data/vendor/librarian/lib/librarian/lockfile/compiler.rb +0 -66
- data/vendor/librarian/lib/librarian/lockfile/parser.rb +0 -100
- data/vendor/librarian/lib/librarian/logger.rb +0 -46
- data/vendor/librarian/lib/librarian/manifest.rb +0 -132
- data/vendor/librarian/lib/librarian/manifest_set.rb +0 -154
- data/vendor/librarian/lib/librarian/mock.rb +0 -1
- data/vendor/librarian/lib/librarian/mock/cli.rb +0 -19
- data/vendor/librarian/lib/librarian/mock/dsl.rb +0 -15
- data/vendor/librarian/lib/librarian/mock/environment.rb +0 -24
- data/vendor/librarian/lib/librarian/mock/extension.rb +0 -9
- data/vendor/librarian/lib/librarian/mock/source.rb +0 -1
- data/vendor/librarian/lib/librarian/mock/source/mock.rb +0 -97
- data/vendor/librarian/lib/librarian/mock/source/mock/registry.rb +0 -83
- data/vendor/librarian/lib/librarian/resolution.rb +0 -44
- data/vendor/librarian/lib/librarian/resolver.rb +0 -78
- data/vendor/librarian/lib/librarian/resolver/implementation.rb +0 -118
- data/vendor/librarian/lib/librarian/source.rb +0 -2
- data/vendor/librarian/lib/librarian/source/git.rb +0 -150
- data/vendor/librarian/lib/librarian/source/git/repository.rb +0 -217
- data/vendor/librarian/lib/librarian/source/local.rb +0 -61
- data/vendor/librarian/lib/librarian/source/path.rb +0 -74
- data/vendor/librarian/lib/librarian/spec.rb +0 -13
- data/vendor/librarian/lib/librarian/spec_change_set.rb +0 -173
- data/vendor/librarian/lib/librarian/specfile.rb +0 -18
- data/vendor/librarian/lib/librarian/support/abstract_method.rb +0 -21
- data/vendor/librarian/lib/librarian/ui.rb +0 -64
- data/vendor/librarian/lib/librarian/version.rb +0 -3
- data/vendor/librarian/librarian.gemspec +0 -34
- data/vendor/librarian/spec/functional/chef/source/git_spec.rb +0 -432
- data/vendor/librarian/spec/functional/chef/source/site_spec.rb +0 -215
- data/vendor/librarian/spec/functional/source/git/repository_spec.rb +0 -149
- data/vendor/librarian/spec/unit/action/base_spec.rb +0 -18
- data/vendor/librarian/spec/unit/action/clean_spec.rb +0 -102
- data/vendor/librarian/spec/unit/action/ensure_spec.rb +0 -37
- data/vendor/librarian/spec/unit/action/install_spec.rb +0 -111
- data/vendor/librarian/spec/unit/config/database_spec.rb +0 -319
- data/vendor/librarian/spec/unit/dependency_spec.rb +0 -36
- data/vendor/librarian/spec/unit/dsl_spec.rb +0 -194
- data/vendor/librarian/spec/unit/environment_spec.rb +0 -9
- data/vendor/librarian/spec/unit/lockfile/parser_spec.rb +0 -162
- data/vendor/librarian/spec/unit/lockfile_spec.rb +0 -65
- data/vendor/librarian/spec/unit/manifest_set_spec.rb +0 -202
- data/vendor/librarian/spec/unit/manifest_spec.rb +0 -36
- data/vendor/librarian/spec/unit/mock/source/mock_spec.rb +0 -22
- data/vendor/librarian/spec/unit/resolver_spec.rb +0 -192
- data/vendor/librarian/spec/unit/source/git_spec.rb +0 -29
- data/vendor/librarian/spec/unit/spec_change_set_spec.rb +0 -169
data/vendor/librarian/Rakefile
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
require 'bundler'
|
2
|
-
|
3
|
-
module Bundler
|
4
|
-
class GemHelper
|
5
|
-
|
6
|
-
def build_gem_with_built_spec
|
7
|
-
spec = Gem::Specification.load(spec_path)
|
8
|
-
spec_ruby = spec.to_ruby
|
9
|
-
original_spec_path = spec_path + ".original"
|
10
|
-
FileUtils.mv(spec_path, original_spec_path)
|
11
|
-
File.open(spec_path, "wb"){|f| f.write(spec_ruby)}
|
12
|
-
build_gem_without_built_spec
|
13
|
-
ensure
|
14
|
-
FileUtils.mv(original_spec_path, spec_path)
|
15
|
-
end
|
16
|
-
|
17
|
-
alias build_gem_without_built_spec build_gem
|
18
|
-
alias build_gem build_gem_with_built_spec
|
19
|
-
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
Bundler::GemHelper.install_tasks
|
24
|
-
|
25
|
-
begin
|
26
|
-
require 'rspec/core/rake_task'
|
27
|
-
RSpec::Core::RakeTask.new(:spec)
|
28
|
-
|
29
|
-
require 'cucumber/rake/task'
|
30
|
-
Cucumber::Rake::Task.new(:features)
|
31
|
-
|
32
|
-
task :default => [:spec, :features]
|
33
|
-
rescue LoadError
|
34
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
default: --tags ~@wip --format progress
|
@@ -1,64 +0,0 @@
|
|
1
|
-
Feature: cli/install
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
Scenario: A simple Cheffile with one cookbook
|
6
|
-
Given a file named "cookbook-sources/apt/metadata.yaml" with:
|
7
|
-
"""
|
8
|
-
name: apt
|
9
|
-
version: 1.0.0
|
10
|
-
dependencies: { }
|
11
|
-
"""
|
12
|
-
Given a file named "Cheffile" with:
|
13
|
-
"""
|
14
|
-
cookbook 'apt',
|
15
|
-
:path => 'cookbook-sources'
|
16
|
-
"""
|
17
|
-
When I run `librarian-chef install --verbose`
|
18
|
-
Then the exit status should be 0
|
19
|
-
And the file "cookbooks/apt/metadata.yaml" should contain exactly:
|
20
|
-
"""
|
21
|
-
name: apt
|
22
|
-
version: 1.0.0
|
23
|
-
dependencies: { }
|
24
|
-
"""
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
Scenario: A simple Cheffile with one cookbook with one dependency
|
29
|
-
Given a file named "cookbook-sources/main/metadata.yaml" with:
|
30
|
-
"""
|
31
|
-
name: main
|
32
|
-
version: 1.0.0
|
33
|
-
dependencies:
|
34
|
-
sub: 1.0.0
|
35
|
-
"""
|
36
|
-
Given a file named "cookbook-sources/sub/metadata.yaml" with:
|
37
|
-
"""
|
38
|
-
name: sub
|
39
|
-
version: 1.0.0
|
40
|
-
dependencies: {}
|
41
|
-
"""
|
42
|
-
Given a file named "Cheffile" with:
|
43
|
-
"""
|
44
|
-
path 'cookbook-sources'
|
45
|
-
cookbook 'main'
|
46
|
-
"""
|
47
|
-
When I run `librarian-chef install --verbose`
|
48
|
-
Then the exit status should be 0
|
49
|
-
And the file "cookbooks/main/metadata.yaml" should contain exactly:
|
50
|
-
"""
|
51
|
-
name: main
|
52
|
-
version: 1.0.0
|
53
|
-
dependencies:
|
54
|
-
sub: 1.0.0
|
55
|
-
"""
|
56
|
-
And the file "cookbooks/sub/metadata.yaml" should contain exactly:
|
57
|
-
"""
|
58
|
-
name: sub
|
59
|
-
version: 1.0.0
|
60
|
-
dependencies: {}
|
61
|
-
"""
|
62
|
-
|
63
|
-
|
64
|
-
|
@@ -1,77 +0,0 @@
|
|
1
|
-
Feature: cli/show
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
Background: A simple Cheffile with one cookbook with one dependency
|
6
|
-
Given a file named "cookbook-sources/main/metadata.yaml" with:
|
7
|
-
"""
|
8
|
-
name: main
|
9
|
-
version: 1.0.0
|
10
|
-
dependencies:
|
11
|
-
sub: 1.0.0
|
12
|
-
"""
|
13
|
-
Given a file named "cookbook-sources/sub/metadata.yaml" with:
|
14
|
-
"""
|
15
|
-
name: sub
|
16
|
-
version: 1.0.0
|
17
|
-
dependencies: {}
|
18
|
-
"""
|
19
|
-
Given a file named "Cheffile" with:
|
20
|
-
"""
|
21
|
-
path 'cookbook-sources'
|
22
|
-
cookbook 'main'
|
23
|
-
"""
|
24
|
-
Given I run `librarian-chef install --quiet`
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
Scenario: Showing al without a lockfile
|
29
|
-
Given I remove the file "Cheffile.lock"
|
30
|
-
When I run `librarian-chef show`
|
31
|
-
Then the exit status should be 1
|
32
|
-
Then the output should contain exactly:
|
33
|
-
"""
|
34
|
-
Be sure to install first!
|
35
|
-
|
36
|
-
"""
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
Scenario: Showing all
|
41
|
-
When I run `librarian-chef show`
|
42
|
-
Then the exit status should be 0
|
43
|
-
Then the output should contain exactly:
|
44
|
-
"""
|
45
|
-
main (1.0.0)
|
46
|
-
sub (1.0.0)
|
47
|
-
|
48
|
-
"""
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
Scenario: Showing one without dependencies
|
53
|
-
When I run `librarian-chef show sub`
|
54
|
-
Then the exit status should be 0
|
55
|
-
Then the output should contain exactly:
|
56
|
-
"""
|
57
|
-
sub (1.0.0)
|
58
|
-
source: cookbook-sources
|
59
|
-
|
60
|
-
"""
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
Scenario: Showing one with dependencies
|
65
|
-
When I run `librarian-chef show main`
|
66
|
-
Then the exit status should be 0
|
67
|
-
Then the output should contain exactly:
|
68
|
-
"""
|
69
|
-
main (1.0.0)
|
70
|
-
source: cookbook-sources
|
71
|
-
dependencies:
|
72
|
-
sub (= 1.0.0)
|
73
|
-
|
74
|
-
"""
|
75
|
-
|
76
|
-
|
77
|
-
|
@@ -1,19 +0,0 @@
|
|
1
|
-
require 'librarian/version'
|
2
|
-
require 'librarian/environment'
|
3
|
-
|
4
|
-
module Librarian
|
5
|
-
extend self
|
6
|
-
|
7
|
-
def environment_class
|
8
|
-
self::Environment
|
9
|
-
end
|
10
|
-
|
11
|
-
def environment
|
12
|
-
@environment ||= environment_class.new
|
13
|
-
end
|
14
|
-
|
15
|
-
def version
|
16
|
-
VERSION
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module Librarian
|
2
|
-
module Action
|
3
|
-
class Base
|
4
|
-
|
5
|
-
attr_accessor :environment
|
6
|
-
private :environment=
|
7
|
-
|
8
|
-
attr_accessor :options
|
9
|
-
private :options=
|
10
|
-
|
11
|
-
def initialize(environment, options = { })
|
12
|
-
self.environment = environment
|
13
|
-
self.options = options
|
14
|
-
end
|
15
|
-
|
16
|
-
private
|
17
|
-
|
18
|
-
def debug(*args, &block)
|
19
|
-
environment.logger.debug(*args, &block)
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,44 +0,0 @@
|
|
1
|
-
require "librarian/action/base"
|
2
|
-
|
3
|
-
module Librarian
|
4
|
-
module Action
|
5
|
-
class Clean < Base
|
6
|
-
|
7
|
-
def run
|
8
|
-
clean_cache_path
|
9
|
-
clean_install_path
|
10
|
-
end
|
11
|
-
|
12
|
-
private
|
13
|
-
|
14
|
-
def clean_cache_path
|
15
|
-
if cache_path.exist?
|
16
|
-
debug { "Deleting #{project_relative_path_to(cache_path)}" }
|
17
|
-
cache_path.rmtree
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def clean_install_path
|
22
|
-
if install_path.exist?
|
23
|
-
install_path.children.each do |c|
|
24
|
-
debug { "Deleting #{project_relative_path_to(c)}" }
|
25
|
-
c.rmtree unless c.file?
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def cache_path
|
31
|
-
environment.cache_path
|
32
|
-
end
|
33
|
-
|
34
|
-
def install_path
|
35
|
-
environment.install_path
|
36
|
-
end
|
37
|
-
|
38
|
-
def project_relative_path_to(path)
|
39
|
-
environment.project_relative_path_to(path)
|
40
|
-
end
|
41
|
-
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
require "librarian/error"
|
2
|
-
require "librarian/action/base"
|
3
|
-
|
4
|
-
module Librarian
|
5
|
-
module Action
|
6
|
-
class Ensure < Base
|
7
|
-
|
8
|
-
def run
|
9
|
-
raise Error, "Cannot find #{specfile_name}!" unless project_path
|
10
|
-
end
|
11
|
-
|
12
|
-
private
|
13
|
-
|
14
|
-
def specfile_name
|
15
|
-
environment.specfile_name
|
16
|
-
end
|
17
|
-
|
18
|
-
def project_path
|
19
|
-
environment.project_path
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,99 +0,0 @@
|
|
1
|
-
require "librarian/manifest_set"
|
2
|
-
require "librarian/spec_change_set"
|
3
|
-
require "librarian/action/base"
|
4
|
-
|
5
|
-
module Librarian
|
6
|
-
module Action
|
7
|
-
class Install < Base
|
8
|
-
|
9
|
-
def run
|
10
|
-
check_preconditions
|
11
|
-
|
12
|
-
perform_installation
|
13
|
-
end
|
14
|
-
|
15
|
-
private
|
16
|
-
|
17
|
-
def check_preconditions
|
18
|
-
check_specfile
|
19
|
-
check_lockfile
|
20
|
-
check_consistent
|
21
|
-
end
|
22
|
-
|
23
|
-
def check_specfile
|
24
|
-
raise Error, "#{specfile_name} missing!" unless specfile_path.exist?
|
25
|
-
end
|
26
|
-
|
27
|
-
def check_lockfile
|
28
|
-
raise Error, "#{lockfile_name} missing!" unless lockfile_path.exist?
|
29
|
-
end
|
30
|
-
|
31
|
-
def check_consistent
|
32
|
-
raise Error, "#{specfile_name} and #{lockfile_name} are out of sync!" unless spec_consistent_with_lock?
|
33
|
-
end
|
34
|
-
|
35
|
-
def perform_installation
|
36
|
-
manifests = sorted_manifests
|
37
|
-
|
38
|
-
create_install_path
|
39
|
-
install_manifests(manifests)
|
40
|
-
end
|
41
|
-
|
42
|
-
def create_install_path
|
43
|
-
install_path.rmtree if install_path.exist? && destructive?
|
44
|
-
install_path.mkpath
|
45
|
-
end
|
46
|
-
|
47
|
-
def install_manifests(manifests)
|
48
|
-
manifests.each do |manifest|
|
49
|
-
manifest.install!
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
def sorted_manifests
|
54
|
-
ManifestSet.sort(lock.manifests)
|
55
|
-
end
|
56
|
-
|
57
|
-
def destructive?
|
58
|
-
environment.config_db.local['destructive'] == 'true'
|
59
|
-
end
|
60
|
-
|
61
|
-
def specfile_name
|
62
|
-
environment.specfile_name
|
63
|
-
end
|
64
|
-
|
65
|
-
def specfile_path
|
66
|
-
environment.specfile_path
|
67
|
-
end
|
68
|
-
|
69
|
-
def lockfile_name
|
70
|
-
environment.lockfile_name
|
71
|
-
end
|
72
|
-
|
73
|
-
def lockfile_path
|
74
|
-
environment.lockfile_path
|
75
|
-
end
|
76
|
-
|
77
|
-
def spec
|
78
|
-
environment.spec
|
79
|
-
end
|
80
|
-
|
81
|
-
def lock
|
82
|
-
environment.lock
|
83
|
-
end
|
84
|
-
|
85
|
-
def spec_change_set(spec, lock)
|
86
|
-
SpecChangeSet.new(environment, spec, lock)
|
87
|
-
end
|
88
|
-
|
89
|
-
def spec_consistent_with_lock?
|
90
|
-
spec_change_set(spec, lock).same?
|
91
|
-
end
|
92
|
-
|
93
|
-
def install_path
|
94
|
-
environment.install_path
|
95
|
-
end
|
96
|
-
|
97
|
-
end
|
98
|
-
end
|
99
|
-
end
|