stove 3.2.1 → 3.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e4c8841bc73b292bcd565cff88b842bc1168fa29
4
- data.tar.gz: 366832a1c8ce35fd2aede16c91e792c87a641895
3
+ metadata.gz: 465d414ee054ca33e9ea585cefd724cc3b18f894
4
+ data.tar.gz: 7572e3dbd1fd4e3a29910b1c298cb4761febf4d8
5
5
  SHA512:
6
- metadata.gz: 5e07b0fa5c4d8e2578fa9b8cd9ee1a2204358268abdf036285286a28046819a7057f99ad32324ea823070b92fc95ba18b9245192f8a7c7fbbf27721ffa1db5a1
7
- data.tar.gz: 2d79edc8e2780608752a9f9677b4af644bbc847b0df3623a2ebb6dae43f21f967fc50ebaffa910edd35e4d14f2d8558c7681666b6dea7e52696da1e02f94e8cb
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
@@ -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[path].reject do |filepath|
61
- TMP_FILES.any? { |regex| filepath.match(regex) }
62
- end.map do |cookbook_file|
63
- [
64
- cookbook_file,
65
- cookbook_file.sub(/^#{Regexp.escape(root)}/, cookbook.name)
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
@@ -1,3 +1,3 @@
1
1
  module Stove
2
- VERSION = '3.2.1'
2
+ VERSION = '3.2.2'
3
3
  end
@@ -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/metadata.json
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
  ))
@@ -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.1
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-16 00:00:00.000000000 Z
11
+ date: 2014-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-api