stove 3.2.1 → 3.2.2
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 +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/stove/packager.rb +6 -9
- data/lib/stove/version.rb +1 -1
- data/spec/integration/cookbook_spec.rb +6 -4
- data/spec/support/generators.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 465d414ee054ca33e9ea585cefd724cc3b18f894
|
4
|
+
data.tar.gz: 7572e3dbd1fd4e3a29910b1c298cb4761febf4d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4babffd121fa144d835893e08c45a89a56f289ce502a75d09ce063d14ba323144ccafd82976d05c14e942e5dae14ffd99d6d13befeb9f16e2e4906e594ea1461
|
7
|
+
data.tar.gz: c182e022b0e701759cbf69acc035bb69e37f98487b587a0e488fe3e98926e05a72866193e3559a35358e9afce2b51772ef5cb2dfd8202a394f9176b54331acdc
|
data/CHANGELOG.md
CHANGED
@@ -2,12 +2,17 @@ Stove CHANGELOG
|
|
2
2
|
===============
|
3
3
|
This is the Changelog for the Stove gem.
|
4
4
|
|
5
|
+
v3.2.2 (2014-08-07)
|
6
|
+
-------------------
|
7
|
+
- Fix a bug where files beginning with a dot (`.`) were not packaged
|
8
|
+
|
5
9
|
v3.2.1 (2014-07-16)
|
6
10
|
-------------------
|
7
11
|
- Fix a critical bug where nested directories are flattened
|
8
12
|
|
9
13
|
v3.2.0 (2014-07-15)
|
10
14
|
-------------------
|
15
|
+
**This version has been removed from Rubygems**
|
11
16
|
- Add the ability to "yank" (delete) a cookbook from the Supermarket
|
12
17
|
- Remove the `--category` flag (it is no longer honored)
|
13
18
|
- Fix a bug where the `resources/` folder was not uploaded
|
@@ -15,6 +20,8 @@ v3.2.0 (2014-07-15)
|
|
15
20
|
|
16
21
|
v3.1.0 (2014-07-10)
|
17
22
|
-------------------
|
23
|
+
**This version has been removed from Rubygems**
|
24
|
+
|
18
25
|
- Use the generated tempfile directly (instead of writing to disk and creating File objects)
|
19
26
|
- Add a default version constraint ('>= 0.0.0')
|
20
27
|
- Only package Ruby files under `recipes/` and similar directories
|
data/lib/stove/packager.rb
CHANGED
@@ -57,15 +57,12 @@ module Stove
|
|
57
57
|
root = File.expand_path(cookbook.path)
|
58
58
|
path = File.join(root, "{#{ACCEPTABLE_FILES_LIST}}")
|
59
59
|
|
60
|
-
Dir
|
61
|
-
|
62
|
-
|
63
|
-
[
|
64
|
-
|
65
|
-
cookbook_file
|
66
|
-
]
|
67
|
-
end.reduce({}) do |map, (cookbook_file, tarball_file)|
|
68
|
-
map[cookbook_file] = tarball_file
|
60
|
+
Dir.glob(path, File::FNM_DOTMATCH)
|
61
|
+
.reject { |path| %w(. ..).include?(File.basename(path)) }
|
62
|
+
.reject { |path| TMP_FILES.any? { |regex| path.match(regex) } }
|
63
|
+
.map { |path| [path, path.sub(/^#{Regexp.escape(root)}/, cookbook.name)] }
|
64
|
+
.reduce({}) do |map, (cookbook_file, tarball_file)|
|
65
|
+
map[cookbook_file] = tarball_file
|
69
66
|
map
|
70
67
|
end
|
71
68
|
end
|
data/lib/stove/version.rb
CHANGED
@@ -11,27 +11,29 @@ module Stove
|
|
11
11
|
|
12
12
|
Zlib::GzipReader.open(tarball.path) do |gzip|
|
13
13
|
Gem::Package::TarReader.new(gzip) do |tar|
|
14
|
-
structure = tar.map(&:full_name)
|
14
|
+
structure = tar.map(&:full_name).sort
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
18
|
expect(structure).to eq(%w(
|
19
|
-
basic/README.md
|
20
19
|
basic/CHANGELOG.md
|
21
|
-
basic/
|
22
|
-
basic/metadata.rb
|
20
|
+
basic/README.md
|
23
21
|
basic/attributes/default.rb
|
24
22
|
basic/attributes/system.rb
|
25
23
|
basic/definitions/web_app.rb
|
26
24
|
basic/files/default
|
25
|
+
basic/files/default/.authorized_keys
|
27
26
|
basic/files/default/example.txt
|
28
27
|
basic/files/default/patch.txt
|
29
28
|
basic/libraries/magic.rb
|
29
|
+
basic/metadata.json
|
30
|
+
basic/metadata.rb
|
30
31
|
basic/providers/thing.rb
|
31
32
|
basic/recipes/default.rb
|
32
33
|
basic/recipes/system.rb
|
33
34
|
basic/resources/thing.rb
|
34
35
|
basic/templates/default
|
36
|
+
basic/templates/default/.env.erb
|
35
37
|
basic/templates/default/another.text.erb
|
36
38
|
basic/templates/default/example.erb
|
37
39
|
))
|
data/spec/support/generators.rb
CHANGED
@@ -67,6 +67,11 @@ module Stove
|
|
67
67
|
This is a file with some text
|
68
68
|
EOH
|
69
69
|
end
|
70
|
+
File.open(root.join('files', 'default', '.authorized_keys'), 'wb') do |f|
|
71
|
+
f.write <<-EOH.gsub(/^ {11}/, '')
|
72
|
+
id-rsa ABC123
|
73
|
+
EOH
|
74
|
+
end
|
70
75
|
File.open(root.join('libraries', 'magic.rb'), 'wb') do |f|
|
71
76
|
f.write <<-EOH.gsub(/^ {11}/, '')
|
72
77
|
class Chef
|
@@ -109,6 +114,11 @@ module Stove
|
|
109
114
|
# Comment?
|
110
115
|
EOH
|
111
116
|
end
|
117
|
+
File.open(root.join('templates', 'default', '.env.erb'), 'wb') do |f|
|
118
|
+
f.write <<-EOH.gsub(/^ {11}/, '')
|
119
|
+
ENV['FOO'] = 'BAR'
|
120
|
+
EOH
|
121
|
+
end
|
112
122
|
|
113
123
|
# Return the root
|
114
124
|
root
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stove
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Vargo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07
|
11
|
+
date: 2014-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-api
|