sluice 0.0.1 → 0.0.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.
- data/lib/sluice.rb +1 -1
- data/lib/sluice/storage/storage.rb +10 -4
- metadata +4 -4
data/lib/sluice.rb
CHANGED
|
@@ -34,7 +34,7 @@ module Sluice
|
|
|
34
34
|
dates << day.strftime(date_format)
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
'(' + dates.join('|') + ')[^/]+%s$' % regexify
|
|
37
|
+
'(' + dates.join('|') + ')[^/]+%s$' % regexify(file_ext)
|
|
38
38
|
end
|
|
39
39
|
module_function :files_between
|
|
40
40
|
|
|
@@ -69,7 +69,7 @@ module Sluice
|
|
|
69
69
|
dates << day.strftime(date_format) # Black list
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
-
NegativeRegex.new('(' + dates.join('|') + ')[^/]+%s$'
|
|
72
|
+
NegativeRegex.new('(' + dates.join('|') + ')[^/]+%s$' % regexify(file_ext))
|
|
73
73
|
end
|
|
74
74
|
module_function :files_up_to
|
|
75
75
|
|
|
@@ -89,7 +89,7 @@ module Sluice
|
|
|
89
89
|
dates << day.strftime(date_format)
|
|
90
90
|
end
|
|
91
91
|
|
|
92
|
-
'(' + dates.join('|') + ')[^/]+%s$' % regexify
|
|
92
|
+
'(' + dates.join('|') + ')[^/]+%s$' % regexify(file_ext)
|
|
93
93
|
end
|
|
94
94
|
module_function :files_from
|
|
95
95
|
|
|
@@ -97,7 +97,13 @@ module Sluice
|
|
|
97
97
|
|
|
98
98
|
# Make a file extension regular expression friendly,
|
|
99
99
|
# adding a starting period (.) if missing
|
|
100
|
-
|
|
100
|
+
#
|
|
101
|
+
# Parameters:
|
|
102
|
+
# +file_ext:: the file extension to make regexp friendly
|
|
103
|
+
def regexify(file_ext)
|
|
104
|
+
file_ext.nil? ? nil : file_ext[0].chr != '.' ? '\\.' << file_ext : '\\' << file_ext
|
|
105
|
+
end
|
|
106
|
+
module_function :regexify
|
|
101
107
|
|
|
102
108
|
end
|
|
103
109
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sluice
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 27
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 2
|
|
10
|
+
version: 0.0.2
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Alex Dean
|
|
@@ -16,7 +16,7 @@ autorequire:
|
|
|
16
16
|
bindir: bin
|
|
17
17
|
cert_chain: []
|
|
18
18
|
|
|
19
|
-
date: 2012-11-
|
|
19
|
+
date: 2012-11-06 00:00:00 Z
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|
|
22
22
|
name: fog
|