wedge 0.0.11 → 0.0.12

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/version.rb +1 -1
  3. data/lib/wedge.rb +9 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 464afb6e5e2a51373a7b4101850d98b2b056821a
4
- data.tar.gz: 44ef804998a7b75b30da9201918b5ceb710ed742
3
+ metadata.gz: a5295d8385306b48ce2657fac95df4b574dbefb0
4
+ data.tar.gz: 00917b1fcae021ec71dca4b8284f92c6fbe2daa2
5
5
  SHA512:
6
- metadata.gz: 3cf8ae11cc2e7e3ee3309dddd1c20fe60925c1619ad5e20188809b8dbdd27f0d6031d610e1655274495aac6a73c73a7afc689dd99fb6d95ae477d74ce7c71486
7
- data.tar.gz: 726e78d917def347959f0b2f4f54918668e9df6af65a41b100db350cb42e3feb1148d5e278ea4210f34724a8a23a254aae3e162e5f8b3ddccc85157ed92227ae
6
+ metadata.gz: 384b90cb36947eef48a3aa39b4b3efe3af49440a96d6c937804282157f739cb4d0ab2ca4549873238d6ff42c854e069a4ba314ad2a761a5a3287b2834a166ca2
7
+ data.tar.gz: 34b24942c9bac9fe9ae84e6b17c1cc2907e614d5e09d6f93c381393e2468c433d76c1cd90ea22eb84688c233a4abfd2e26c9d15e0d2dd910a3f1ab84fa34779e
data/lib/wedge/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Wedge
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
data/lib/wedge.rb CHANGED
@@ -234,7 +234,15 @@ module Wedge
234
234
 
235
235
  unless RUBY_ENGINE == 'opal'
236
236
  args[:file_path] = caller.first.gsub(/(?<=\.rb):.*/, '')
237
- args[:assets_key] = ENV.fetch('SOURCE_VERSION') { `git rev-parse HEAD 2>/dev/null`.to_s.strip }
237
+ args[:assets_key] = begin
238
+ if defined?(PlatformAPI) && ENV['HEROKU_TOKEN'] && ENV['HEROKU_APP']
239
+ heroku = PlatformAPI.connect_oauth(ENV['HEROKU_TOKEN'])
240
+ slug_id = heroku.release.list(ENV['HEROKU_APP']).last["slug"]["id"]
241
+ heroku.slug.info(ENV['HEROKU_APP'], slug_id)["commit"]
242
+ else
243
+ `git rev-parse HEAD 2>/dev/null`.to_s.strip
244
+ end
245
+ end
238
246
  end
239
247
 
240
248
  Config.new(args)
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.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj
@@ -218,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
218
  version: '0'
219
219
  requirements: []
220
220
  rubyforge_project:
221
- rubygems_version: 2.4.3
221
+ rubygems_version: 2.2.2
222
222
  signing_key:
223
223
  specification_version: 4
224
224
  summary: Components for the Browser and Server