wedge 0.1.45 → 0.1.46
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wedge.rb +7 -9
- data/lib/wedge/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f41d20a956315234b518a8712cb89f991e08e54
|
4
|
+
data.tar.gz: 6ff646055e95177c7abe67de12ef6506a623fb12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34f325359955ff59618d7b2e40818bb66b6f6a0e4896b3ad45a9a4c731dce0a8aa245b7dc2a0037a71085d4f1b19332d4d72516e017f9b07bfa2ebe6f58e41b2
|
7
|
+
data.tar.gz: 088af1fd3927b9b1da5864ca4a337d2615b38dc0235772aed3785d29d280fa8e093ae110c20daab74cf352d6fcc7c21fe4291aef4c39567fd0550953e6c5c834
|
data/lib/wedge.rb
CHANGED
@@ -263,21 +263,19 @@ class Wedge
|
|
263
263
|
Wedge.trigger_browser_events
|
264
264
|
end
|
265
265
|
|
266
|
+
def create_assets_key
|
267
|
+
o = [('a'..'z'), ('A'..'Z')].map { |i| i.to_a }.flatten
|
268
|
+
string = (0...50).map { o[rand(o.length)] }.join
|
269
|
+
File.write '.wedge_assets_key', string
|
270
|
+
end
|
271
|
+
|
266
272
|
def config
|
267
273
|
@config ||= begin
|
268
274
|
args = { component_class: IndifferentHash.new }
|
269
275
|
|
270
276
|
unless RUBY_ENGINE == 'opal'
|
271
277
|
args[:path] = method(:assets_url).source_location.first.sub('/wedge.rb', '')
|
272
|
-
args[:assets_key] =
|
273
|
-
if defined?(PlatformAPI) && ENV['HEROKU_TOKEN'] && ENV['HEROKU_APP']
|
274
|
-
heroku = PlatformAPI.connect_oauth(ENV['HEROKU_TOKEN'], default_headers: {'Range' => 'version ..; order=desc'})
|
275
|
-
slug_id = heroku.release.list(ENV['HEROKU_APP']).first["slug"]["id"]
|
276
|
-
heroku.slug.info(ENV['HEROKU_APP'], slug_id)["commit"]
|
277
|
-
else
|
278
|
-
`git rev-parse HEAD 2>/dev/null`.to_s.strip
|
279
|
-
end
|
280
|
-
end
|
278
|
+
args[:assets_key] = File.exist?('.wedge_assets_key') ? File.read('.wedge_assets_key') : nil
|
281
279
|
end
|
282
280
|
|
283
281
|
Config.new(args)
|
data/lib/wedge/version.rb
CHANGED