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,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,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- lib = File.expand_path('../../lib', __FILE__)
4
- $:.unshift(lib) unless $:.include?(lib)
5
-
6
- require 'librarian/chef/cli'
7
- Librarian::Chef::Cli.bin!
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- lib = File.expand_path('../../lib', __FILE__)
4
- $:.unshift(lib) unless $:.include?(lib)
5
-
6
- require 'librarian/mock/cli'
7
- Librarian::Mock::Cli.bin!
@@ -1 +0,0 @@
1
- default: --tags ~@wip --format progress
@@ -1,11 +0,0 @@
1
- Feature: cli/init
2
-
3
-
4
-
5
- Scenario: Initing a directory
6
- When I run `librarian-chef init`
7
- Then the exit status should be 0
8
- Then a file named "Cheffile" should exist
9
-
10
-
11
-
@@ -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,11 +0,0 @@
1
- Feature: cli/version
2
-
3
-
4
-
5
- Scenario: Getting the version
6
- When I run `librarian-chef version`
7
- Then the exit status should be 0
8
- And the output should contain "librarian-"
9
-
10
-
11
-
@@ -1,9 +0,0 @@
1
- require 'aruba/cucumber'
2
-
3
- Before do
4
- slow_boot = false
5
- slow_boot ||= RUBY_PLATFORM == "java"
6
- slow_boot ||= defined?(::Rubinius)
7
-
8
- @aruba_timeout_seconds = slow_boot ? 5 : 2
9
- end
@@ -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,5 +0,0 @@
1
- require "librarian/action/clean"
2
- require "librarian/action/ensure"
3
- require "librarian/action/install"
4
- require "librarian/action/resolve"
5
- require "librarian/action/update"
@@ -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