wedge 0.1.45 → 0.1.46

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/wedge.rb +7 -9
  3. data/lib/wedge/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 91e8e17312c22438ccf5dc770ba7a08194c65462
4
- data.tar.gz: 4779a4ddc4fab7e9b58ad36fd7049e3f1bd78335
3
+ metadata.gz: 5f41d20a956315234b518a8712cb89f991e08e54
4
+ data.tar.gz: 6ff646055e95177c7abe67de12ef6506a623fb12
5
5
  SHA512:
6
- metadata.gz: 5b77b8a55850545908c158ddf06677f4f1af9f377cd9255633d90dd09487682e4fca4d6043e9317934e63b4e1917c1b1776cfaf9097a49f37b32b801b06c1419
7
- data.tar.gz: 1c1367eed5c7cae0c498cdc0dd057659adcb2d1982da2a0152c091cfdd2fd0cd8b82706bbb668fc3e6c84811d80952ee358cd4316daaefb21b57c09b77599dc0
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] = begin
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
@@ -1,3 +1,3 @@
1
1
  class Wedge
2
- VERSION = '0.1.45'
2
+ VERSION = '0.1.46'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wedge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.45
4
+ version: 0.1.46
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj