the_garage 2.5.0 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a8b827892d32f5517d67991bfc76a4832eba4f3aa5b1c1d1cd1f76141bc3422
4
- data.tar.gz: fce58bbb7be2ef82e68416650419d88e3bf10205c011806660081a594cf29d6a
3
+ metadata.gz: cc60156398751cb043b40c324f50cd90cd4beaf92600cb5de192a087875716df
4
+ data.tar.gz: b7421b618063e678141521822c7f4b5e1a9af1bf7edaa714889fb9f824c63be6
5
5
  SHA512:
6
- metadata.gz: d691e438110eabee1b14a9f011067f67f4cf5119f248843d6c4d8d3f44125e7f7a76f0b56d12cac53770238425c6a2d5f62c4321e8273264ce4306e6f943c0e8
7
- data.tar.gz: d408e49c73f46d1fcda1d3d8f9a61a76b8a7e6411172bf4eace5c38c4572be838e4c0f65e1f8dea5006949532b741fc19de4600d72fccde4a49dc8bc7468f810
6
+ metadata.gz: 771c78fdc46b938e26f6009d1a4b673afddb52632080a12dede7c906dfe1a1fde8faf2c1ba47c69b48168315106e0ef2bd5c2c9aef2d4a79837a749aa2f6282a
7
+ data.tar.gz: ebbbf30696f2e46b5c7eb34b0ab2d54d13e0d5d9c6b73666bead201c6a0be4f7f0ea412032c7e263fe30b8978514fad469c640260c63e974c12e48ad591dccc3
@@ -9,14 +9,6 @@ jQuery ()->
9
9
  $.colorbox.close()
10
10
  ev.preventDefault()
11
11
 
12
- buildAuthorizedUrl = (base, location, token) ->
13
- url = base + location
14
- if url.indexOf('?') > 0
15
- url += '&'
16
- else
17
- url += '?'
18
- url + 'access_token=' + token
19
-
20
12
  addNewParamField = (container) ->
21
13
  nextId = "parameter-" + $('.parameter', container).length
22
14
  copy = $('.template .parameter').clone().attr('id', nextId)
@@ -52,11 +44,11 @@ jQuery ()->
52
44
  $('#api-headers').text ''
53
45
  $('#api-response').text ''
54
46
 
55
- url = buildAuthorizedUrl $('#base').val(), $('#location').val(), $('#access_token').val()
56
47
  console.log buildData($('.parameters'))
57
48
  $.ajax
58
49
  type: $('#method').val(),
59
- url: url,
50
+ url: $('#base').val() + $('#location').val(),
51
+ headers: {'Authorization': 'Bearer ' + $('#access_token').val()},
60
52
  cache: false,
61
53
  data: buildData($('.parameters')),
62
54
  dataType: 'json',
@@ -90,7 +90,7 @@ module Garage
90
90
  links[:next] = rs.current_page + 1
91
91
  end
92
92
 
93
- unless rs.last_page? || hide_total?
93
+ unless rs.last_page? || hide_total? || rs.total_pages.zero?
94
94
  links[:last] = rs.total_pages
95
95
  end
96
96
  end
@@ -89,6 +89,8 @@ module Garage
89
89
  'Resource-Owner-Id' => @request.headers['Resource-Owner-Id'],
90
90
  'Scopes' => @request.headers['Scopes'],
91
91
  'User-Agent' => USER_AGENT,
92
+ # ActionDispatch::Request#request_id is only available in Rails 5.0 or later.
93
+ 'X-Request-Id' => @request.uuid,
92
94
  }.reject {|_, v| v.nil? }
93
95
  end
94
96
 
@@ -1,3 +1,3 @@
1
1
  module Garage
2
- VERSION = '2.5.0'
2
+ VERSION = '2.6.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: the_garage
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tatsuhiko Miyagawa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-25 00:00:00.000000000 Z
11
+ date: 2020-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -188,7 +188,6 @@ files:
188
188
  - MIT-LICENSE
189
189
  - README.md
190
190
  - Rakefile
191
- - app/assets/config/manifest.js
192
191
  - app/assets/javascripts/garage/application.js
193
192
  - app/assets/javascripts/garage/docs/console.js.coffee
194
193
  - app/assets/javascripts/garage/docs/jquery.colorbox.js
@@ -1,2 +0,0 @@
1
- //= link_directory ../javascripts .js
2
- //= link_directory ../stylesheets .css