eco-helpers 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eco/api/session/config/apis.rb +3 -2
- data/lib/eco/api/session/config/s3_storage.rb +8 -0
- data/lib/eco/api/session/task.rb +20 -0
- data/lib/eco/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99c00079c05c52d513d6f11d32a76b0fe12dfa71cb5a7bba5802e7353b254930
|
4
|
+
data.tar.gz: 1ed877e47f96cc47c7845a2ee7d680d3fb37f9684bb4edf4ca5bdd8249387721
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28d0965ab12c534dd1ca0bb990437f5f615489ae30bb3e27486808c59209fcf472abf8c20df56a32ac98312d591924ffba11401c0fa80b27881e9894785ec0c9
|
7
|
+
data.tar.gz: 78c86549405bf05044819851251e69ef09fe39fab84e44b2a1198eeaefcf8094df042f0d0586a1fa1fb242df851f1c3eeb72dc04705579feddc529820ad63b13
|
@@ -48,9 +48,10 @@ module Eco
|
|
48
48
|
self["active-name"]
|
49
49
|
end
|
50
50
|
|
51
|
-
#
|
51
|
+
# the active environment
|
52
52
|
def active_root_name
|
53
|
-
active_name
|
53
|
+
active_name
|
54
|
+
#active_name.split("-").first
|
54
55
|
end
|
55
56
|
|
56
57
|
def active_api
|
data/lib/eco/api/session/task.rb
CHANGED
@@ -123,6 +123,26 @@ module Eco
|
|
123
123
|
session.config.s3storage.target_directories.each_with_object(paths) do |folder, arr|
|
124
124
|
arr.concat(session.s3upload(directory: folder))
|
125
125
|
end
|
126
|
+
session.config.s3storage.target_file_patterns.each_with_object(paths) do |pattern, arr|
|
127
|
+
filenames = []
|
128
|
+
case pattern
|
129
|
+
when Regexp
|
130
|
+
Dir.entries(".").sort.each do |file|
|
131
|
+
next unless File.file?(file) # Skip directories
|
132
|
+
filenames.push(file) if file =~ pattern
|
133
|
+
end
|
134
|
+
when String
|
135
|
+
Dir.glob(pattern).sort.each do |file|
|
136
|
+
next unless File.file?(file) # Skip directories
|
137
|
+
filenames.push(file)
|
138
|
+
end
|
139
|
+
else
|
140
|
+
# missconfiguration
|
141
|
+
end
|
142
|
+
filenames.each do |file|
|
143
|
+
arr.push(session.s3upload(file: file))
|
144
|
+
end
|
145
|
+
end
|
126
146
|
end
|
127
147
|
end
|
128
148
|
|
data/lib/eco/version.rb
CHANGED