librarian-puppet-simple 0.0.2 → 0.0.3
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.
- checksums.yaml +7 -0
- data/README.md +12 -0
- data/lib/librarian/puppet/simple/cli.rb +22 -0
- data/lib/librarian/puppet/simple/version.rb +1 -1
- data/spec/fixtures/Puppetfile +12 -5
- metadata +46 -60
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 33dc024addb0747f166e4da821892d273cfd784e
|
4
|
+
data.tar.gz: e3b07856ddc4fb3fc17f27c9157e259d95063ff3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c8b79b90a48e34b632bde747395dedd7093803fec5b28cde88b2d8a56b8ff25ce9c63da45f5bf8749180f1a4a6c172613ee9e659631ceb1f1418dbed62b98804
|
7
|
+
data.tar.gz: 6f91e8c5f020d6888c13e4c65e1abee793cb17f428a5448ac68cd60c7ad67ac4bef9afb0fcfbecaff3e7a01a308538c44736127e2c9dc93c4006dd37f8f6ec29
|
data/README.md
CHANGED
@@ -24,6 +24,18 @@ Iterates through your Puppetfile and installs git sources. At the moment the sup
|
|
24
24
|
librarian-puppet install [--verbose] [--clean] [--path] [--puppetfile]
|
25
25
|
```
|
26
26
|
|
27
|
+
### Update
|
28
|
+
Iterates through your Puppetfile and updates git sources. If a SHA-1 hash is specified in the `:ref`, the module will not be updated.
|
29
|
+
|
30
|
+
Supported options are:<br/>
|
31
|
+
<li>`--verbose` display progress messages</li>
|
32
|
+
<li>`--path` override the default `./modules` where modules will be installed</li>
|
33
|
+
<li> `--puppetfile` override the default `./Puppetfile` used to find the modules</li>
|
34
|
+
|
35
|
+
```
|
36
|
+
librarian-puppet update [--verbose] [--path] [--puppetfile]
|
37
|
+
```
|
38
|
+
|
27
39
|
## Puppetfile
|
28
40
|
The processed Puppetfile may contain two different types of modules, `git` and `tarball`. The `git` option accepts an optional `ref` parameter.
|
29
41
|
|
@@ -36,6 +36,28 @@ module Librarian
|
|
36
36
|
install!
|
37
37
|
end
|
38
38
|
|
39
|
+
desc 'update', 'updates all git sources from your Puppetfile'
|
40
|
+
method_option :update, :type => :boolean, :desc => "Updates git sources"
|
41
|
+
def update
|
42
|
+
@verbose = options[:verbose]
|
43
|
+
@custom_module_path = options[:path]
|
44
|
+
eval(File.read(File.expand_path(options[:puppetfile])))
|
45
|
+
each_module_of_type(:git) do |repo|
|
46
|
+
Dir.chdir(File.join(module_path, repo[:name])) do
|
47
|
+
# if no ref is given, assume master
|
48
|
+
if repo[:ref] == nil
|
49
|
+
checkout_ref = 'origin/master'
|
50
|
+
remote_branch = 'master'
|
51
|
+
else
|
52
|
+
checkout_ref = repo[:ref]
|
53
|
+
remote_branch = repo[:ref].gsub(/^origin\//, '')
|
54
|
+
end
|
55
|
+
print_verbose "\n\n#{repo[:name]} -- git fetch origin && git checkout #{checkout_ref}"
|
56
|
+
git_pull_cmd = system_cmd("git fetch origin && git checkout #{checkout_ref}")
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
39
61
|
desc 'clean', 'clean modules directory'
|
40
62
|
def clean
|
41
63
|
target_directory = options[:path] || File.expand_path("./modules")
|
data/spec/fixtures/Puppetfile
CHANGED
@@ -1,6 +1,13 @@
|
|
1
|
-
mod
|
2
|
-
:git =>
|
3
|
-
:ref =>
|
1
|
+
mod 'puppetlabs/ntp',
|
2
|
+
:git => 'git://github.com/puppetlabs/puppetlabs-ntp.git',
|
3
|
+
:ref => '99bae40f225db0dd052efbf1d4078a21f0333331'
|
4
4
|
|
5
|
-
mod
|
6
|
-
:tarball =>
|
5
|
+
mod 'apache',
|
6
|
+
:tarball => 'https://forge.puppetlabs.com/puppetlabs/apache/0.6.0.tar.gz'
|
7
|
+
|
8
|
+
mod 'ghoneycutt/testlps',
|
9
|
+
:git => 'git://github.com/ghoneycutt/testlps.git'
|
10
|
+
|
11
|
+
mod 'ghoneycutt/dnsclient',
|
12
|
+
:git => 'git://github.com/ghoneycutt/puppet-module-dnsclient.git',
|
13
|
+
:ref => 'v3.0.4'
|
metadata
CHANGED
@@ -1,61 +1,54 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: librarian-puppet-simple
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
version: 0.0.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
10
5
|
platform: ruby
|
11
|
-
authors:
|
6
|
+
authors:
|
12
7
|
- Dan Bode
|
13
8
|
autorequire:
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2014-01-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
21
14
|
name: thor
|
22
|
-
|
23
|
-
|
24
|
-
requirements:
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
25
17
|
- - ~>
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
- 0
|
29
|
-
- 15
|
30
|
-
version: "0.15"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.15'
|
31
20
|
type: :runtime
|
32
|
-
version_requirements: *id001
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: rspec
|
35
21
|
prerelease: false
|
36
|
-
|
37
|
-
requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
38
24
|
- - ~>
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.15'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.13'
|
44
34
|
type: :development
|
45
|
-
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.13'
|
46
41
|
description: |-
|
47
42
|
Simplify deployment of your Puppet infrastructure by
|
48
43
|
automatically pulling in modules from the forge and git repositories with
|
49
44
|
a single command.
|
50
|
-
email:
|
45
|
+
email:
|
51
46
|
- bodepd@gmail.com
|
52
|
-
executables:
|
47
|
+
executables:
|
53
48
|
- librarian-puppet
|
54
49
|
extensions: []
|
55
|
-
|
56
50
|
extra_rdoc_files: []
|
57
|
-
|
58
|
-
files:
|
51
|
+
files:
|
59
52
|
- .gitignore
|
60
53
|
- Gemfile
|
61
54
|
- LICENSE
|
@@ -72,37 +65,30 @@ files:
|
|
72
65
|
- spec/functional/clean_spec.rb
|
73
66
|
- spec/functional/install_spec.rb
|
74
67
|
- spec/spec_helper.rb
|
75
|
-
has_rdoc: true
|
76
68
|
homepage: https://github.com/bodepd/librarian-puppet-simple
|
77
69
|
licenses: []
|
78
|
-
|
70
|
+
metadata: {}
|
79
71
|
post_install_message:
|
80
72
|
rdoc_options: []
|
81
|
-
|
82
|
-
require_paths:
|
73
|
+
require_paths:
|
83
74
|
- lib
|
84
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- -
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
segments:
|
96
|
-
- 0
|
97
|
-
version: "0"
|
75
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - '>='
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - '>='
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
98
85
|
requirements: []
|
99
|
-
|
100
86
|
rubyforge_project:
|
101
|
-
rubygems_version:
|
87
|
+
rubygems_version: 2.0.3
|
102
88
|
signing_key:
|
103
|
-
specification_version:
|
89
|
+
specification_version: 4
|
104
90
|
summary: Bundler for your Puppet modules
|
105
|
-
test_files:
|
91
|
+
test_files:
|
106
92
|
- spec/fixtures/Puppetfile
|
107
93
|
- spec/functional/clean_spec.rb
|
108
94
|
- spec/functional/install_spec.rb
|