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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9de216ad1436860f46bcb75029b0194aa847ce2
4
- data.tar.gz: 2b2a26a9aaf8e576030df7bde02f84ef05378706
3
+ metadata.gz: cf99ce8817120d57825c73d716c76b070ef31413
4
+ data.tar.gz: 8f6153eaeeea1a6dacda02669633b4a2ae540e3d
5
5
  SHA512:
6
- metadata.gz: fe8ffda84ce3be57878e064f4080e75e712e8c6b09fd82362a5fd4e65dd85dd2668e620a205345d42397a91939abc242345cf9c23e1b8773c4e67c40be0b49e5
7
- data.tar.gz: 3c3e50d76377142e1bf16a2a7a1d7951d69e2b4c061121428cfa4caae490185589a0c714edd1ae3c1d748c4442f514ccbaf4ce46c4641d253cab17dab4536125
6
+ metadata.gz: 9234a837fdab2ee4976f1123b8ad6fbbf0b6e14aaf8d53df47780ed00ac33123b9e10538cb9476f77181c7cc00f22d389367a974a19a821b2d6a40d4ebbeb02a
7
+ data.tar.gz: 83caf9fd9af6218c93b5917c1fc117e253499eecf264be430a7507eaf8cf81e9be028d7e4392b1d9d7cf0d6c0a12b18b7e573d8948854172c7117667fb3cd706
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Chamber
2
- VERSION = '2.1.2'
2
+ VERSION = '2.1.3'
3
3
  end
@@ -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.2
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-16 00:00:00.000000000 Z
14
+ date: 2014-01-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: thor