puppet-library 0.16.0 → 0.17.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3dbf9bee6cd6735e0b70e07f1d99a6f2424100fe
4
- data.tar.gz: 55bab3f751e5882efe31ee6e7b1470ae4478e1ed
3
+ metadata.gz: 68b80954c9df08f65a290c1ea3c5fd491372771d
4
+ data.tar.gz: c9d2efbad946d5782dfd672e4a7e88d930e4a414
5
5
  SHA512:
6
- metadata.gz: 17ff1cb9f1b0eba72702b5e40b97d3c3384f6a33bd869d084615a5e6fbdf28a02e3c327e764d8221fbf7f893c6e9fbede7d62a1e02ddad70e0f045d8d4fffa5c
7
- data.tar.gz: 5a63286451d1d0f39cf908725508610a0e26210ac437fc442eeeca1e840d164482b11ac83f59475b8fcc568f239ba1a5180797a97d811364f229234321f100ea
6
+ metadata.gz: 821e22e7ec9f3bcdf5a304a0d3a4664defe4b0d530dfd18dc818bd0c83f279b33ac74effe59e29e7c677da213c663c9505a45334dde397397e4e9849180fd310
7
+ data.tar.gz: b48d72e02f76e00795ff6cd228ab47cfce50b574e6d3be4ff6f59a9574fab4fbb654816c4d45aaeb8623a05374b33a1e63be92aabb8f7423ac8c6acdf9edefec
@@ -100,4 +100,7 @@
100
100
  - tag: v0.16.0
101
101
  changes:
102
102
  - Fix dependency problems across multiple forges (#8)
103
+ - tag: v0.17.0
104
+ changes:
105
+ - Fix Git repo forges serving empty modules (#11)
103
106
 
data/README.md CHANGED
@@ -164,20 +164,10 @@ require "rubygems"
164
164
  require "puppet_library"
165
165
 
166
166
  # NB: this config API is not yet stable, and may change without notice.
167
- # The format shown is valid from Puppet Library v0.11.0
167
+ # The format shown is valid from Puppet Library v0.11.0. See below for
168
+ # all valid config items
168
169
  server = PuppetLibrary::Server.configure do
169
- # Serve our private modules out of a directory on disk
170
- forge :directory do
171
- path = "/var/lib/modules"
172
- end
173
-
174
- # Serve the latest versions from GitHub
175
- forge :git_repository do
176
- source "http://github.com/example/puppetlabs-apache-fork.git"
177
- include_tags /[0-9.]+/
178
- end
179
-
180
- # Download all other modules from the Puppet Forge
170
+ # Proxy the Puppet Forge
181
171
  forge :proxy do
182
172
  url "http://forge.puppetlabs.com"
183
173
  end
@@ -199,6 +189,37 @@ cat > /etc/httpd/conf.d/puppetlibrary.conf <<EOF
199
189
  EOF
200
190
  ```
201
191
 
192
+ The following config items will currently work with the Rack config format (see above):
193
+
194
+ ```ruby
195
+ # NB: this config API is not yet stable, and may change without notice.
196
+ # The format shown is valid from Puppet Library v0.11.0
197
+ server = PuppetLibrary::Server.configure do
198
+ # Serve modules from a directory on disk
199
+ forge :directory do
200
+ path = "/var/lib/modules"
201
+ end
202
+
203
+ # Serve module versions from a Git repository
204
+ forge :git_repository do
205
+ source "http://github.com/example/puppetlabs-apache-fork.git"
206
+ include_tags /[0-9.]+/
207
+ end
208
+
209
+ # Proxy a remote forge
210
+ forge :proxy do
211
+ url "http://forge.example.com"
212
+ end
213
+
214
+ # Proxy a remote forge, caching modules to disk
215
+ forge :cache do
216
+ url "http://forge.puppetlabs.com"
217
+ path "/var/puppet/modules/cache"
218
+ end
219
+ end
220
+ ```
221
+
222
+
202
223
  ## Contributing
203
224
 
204
225
  1. Fork it
@@ -42,7 +42,7 @@ module PuppetLibrary::Util
42
42
  def with_tag(tag)
43
43
  update_cache!
44
44
  PuppetLibrary::Util::TempDir.use "git" do |path|
45
- git "checkout #{tag}", path
45
+ git "checkout -f #{tag} .", path
46
46
  yield(path)
47
47
  end
48
48
  end
@@ -16,5 +16,5 @@
16
16
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
17
 
18
18
  module PuppetLibrary
19
- VERSION = "0.16.0"
19
+ VERSION = "0.17.0"
20
20
  end
@@ -44,6 +44,7 @@ Gem::Specification.new do |spec|
44
44
 
45
45
  spec.add_development_dependency "bundler", "~> 1.3"
46
46
  spec.add_development_dependency "coveralls"
47
+ spec.add_development_dependency "rest-client", "~> 1.6.0"
47
48
  spec.add_development_dependency "gitsu"
48
49
  spec.add_development_dependency "librarian-puppet", "0.9.10" # 0.9.12 breaks on Ruby 1.8.7
49
50
  spec.add_development_dependency "mime-types", "< 2"
@@ -27,7 +27,9 @@ require 'fileutils'
27
27
  include FileUtils
28
28
  Tempdir = PuppetLibrary::Util::TempDir
29
29
 
30
- ENV["TESTING"] = "true"
30
+ unless ENV["LOG"]
31
+ ENV["TESTING"] = "true"
32
+ end
31
33
 
32
34
  class Tgz
33
35
  def initialize(buffer)
@@ -71,6 +71,17 @@ module PuppetLibrary::Util
71
71
  expect(File.read(modulefile)).to include "version '1.0.0'"
72
72
  end
73
73
  end
74
+
75
+ context "when called twice" do
76
+ it "still works, and doesn't do funny stuff because the tag is already checked out in the cache" do
77
+ git.with_tag("1.0.0") do |tag_path|
78
+ end
79
+ git.with_tag("1.0.0") do |tag_path|
80
+ modulefile = File.join(tag_path, "Modulefile")
81
+ expect(File.read(modulefile)).to include "version '1.0.0'"
82
+ end
83
+ end
84
+ end
74
85
  end
75
86
 
76
87
  describe "#read_file" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-library
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - drrb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-01 00:00:00.000000000 Z
11
+ date: 2014-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rest-client
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: 1.6.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ~>
123
+ - !ruby/object:Gem::Version
124
+ version: 1.6.0
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: gitsu
113
127
  requirement: !ruby/object:Gem::Requirement