chamber 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chamber/file_set.rb +2 -2
- data/lib/chamber/version.rb +1 -1
- data/spec/lib/chamber/file_set_spec.rb +15 -1
- 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: cf99ce8817120d57825c73d716c76b070ef31413
|
4
|
+
data.tar.gz: 8f6153eaeeea1a6dacda02669633b4a2ae540e3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9234a837fdab2ee4976f1123b8ad6fbbf0b6e14aaf8d53df47780ed00ac33123b9e10538cb9476f77181c7cc00f22d389367a974a19a821b2d6a40d4ebbeb02a
|
7
|
+
data.tar.gz: 83caf9fd9af6218c93b5917c1fc117e253499eecf264be430a7507eaf8cf81e9be028d7e4392b1d9d7cf0d6c0a12b18b7e573d8948854172c7117667fb3cd706
|
data/lib/chamber/file_set.rb
CHANGED
@@ -252,7 +252,7 @@ class FileSet
|
|
252
252
|
|
253
253
|
def namespaced_files
|
254
254
|
@namespaced_files ||= all_files.select do |file|
|
255
|
-
file.fnmatch? '*-*'
|
255
|
+
file.basename.fnmatch? '*-*'
|
256
256
|
end
|
257
257
|
end
|
258
258
|
|
@@ -261,7 +261,7 @@ class FileSet
|
|
261
261
|
|
262
262
|
namespaces.each do |namespace|
|
263
263
|
file_holder << namespaced_files.select do |file|
|
264
|
-
file.fnmatch? "*-#{namespace}.???"
|
264
|
+
file.basename.fnmatch? "*-#{namespace}.???"
|
265
265
|
end
|
266
266
|
end
|
267
267
|
|
data/lib/chamber/version.rb
CHANGED
@@ -5,7 +5,8 @@ require 'fileutils'
|
|
5
5
|
|
6
6
|
module Chamber
|
7
7
|
describe FileSet do
|
8
|
-
before(:each) { FileUtils.mkdir '/tmp/settings' unless ::File.exist? '/tmp/settings'
|
8
|
+
before(:each) { FileUtils.mkdir '/tmp/settings' unless ::File.exist? '/tmp/settings'
|
9
|
+
FileUtils.mkdir '/tmp/dash-set' unless ::File.exist? '/tmp/dash-set' }
|
9
10
|
after(:each) { FileUtils.rm_rf '/tmp/settings' if ::File.exist? '/tmp/settings' }
|
10
11
|
|
11
12
|
it 'can consider directories containing YAML files' do
|
@@ -60,6 +61,19 @@ describe FileSet do
|
|
60
61
|
::FileUtils.rm_f('/tmp/settings/settings-blue.yml')
|
61
62
|
end
|
62
63
|
|
64
|
+
it 'does not consider non-namespaced files which have dashes in their paths as namespaced' do
|
65
|
+
::File.new('/tmp/dash-set/settings.yml', 'w+')
|
66
|
+
|
67
|
+
file_set = FileSet.new files: '/tmp/dash-set/settings*.yml',
|
68
|
+
namespaces: ['blue']
|
69
|
+
|
70
|
+
expect(file_set.filenames).to eql [
|
71
|
+
'/tmp/dash-set/settings.yml'
|
72
|
+
]
|
73
|
+
|
74
|
+
::FileUtils.rm_r('/tmp/dash-set/settings.yml')
|
75
|
+
end
|
76
|
+
|
63
77
|
it 'removes any duplicate files' do
|
64
78
|
::File.new('/tmp/settings.yml', 'w+')
|
65
79
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chamber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- stevenhallen
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-01-
|
14
|
+
date: 2014-01-19 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: thor
|