vanilla-ujs 1.1.0 → 1.1.1

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
  SHA1:
3
- metadata.gz: a47b807949142afc85940da96b26d29b531b3cf2
4
- data.tar.gz: ce7d950d9958a0fe6976e4beeebe9d95a29ae5f6
3
+ metadata.gz: 6d9a42bc793b3f8bbf22a7009351f62644d6133c
4
+ data.tar.gz: a91e191b16e207d9d9fa8f538c74e1ab0042e5dc
5
5
  SHA512:
6
- metadata.gz: 7e98ef47919ab1d8aee800f1a5f5726cb6032e08f5bc7d26e8f2f00a9c55c0978dad255df132cdbb71b978f1e3e6981d14c5cd703e3c496fa4315d7a73ee17c7
7
- data.tar.gz: b61890eee2ff6555fc591876fa213975992fc706c44a49238be8a46701f807d0e90ba7ff82b34745fd03b12111cd1cf02c52a27e9419a27578b78bf290c47df0
6
+ metadata.gz: d33b95e92d7cb81258343a50dfd33dbcd79d9b008a8d070e49ce476a7b38d111cd66b78db1690a414d51a57f82e7685520aadbfdbfe8d4e28bc603bd3bca87c8
7
+ data.tar.gz: 1623faae8e29cd06082d9f1a2ce2dbf800a0ecdac8cf993f8cdf3e89a5d39f4f550bda3b51977160038b843b4e04ff7dfa7ab8c5525cd0f88d72a357c95cdc21
@@ -13,6 +13,12 @@ var LiteAjax = (function () {
13
13
  }
14
14
 
15
15
  options = options || {};
16
+
17
+ if(!options.accepts) {
18
+ options.accepts = 'text/javascript, application/javascript, ' +
19
+ 'application/ecmascript, application/x-ecmascript';
20
+ }
21
+
16
22
  url = url || options.url || location.href || '';
17
23
  var data = options.data;
18
24
 
@@ -46,6 +52,7 @@ var LiteAjax = (function () {
46
52
 
47
53
  xhr.open(options.method || 'GET', url);
48
54
  xhr.setRequestHeader('X-Requested-With', 'XmlHttpRequest');
55
+ xhr.setRequestHeader('Accept', '*/*;q=0.5, ' + options.accepts);
49
56
 
50
57
  if(options.json) {
51
58
  xhr.setRequestHeader('Content-type', 'application/json');
@@ -1,5 +1,5 @@
1
1
  module Vanilla
2
2
  module Ujs
3
- VERSION = "1.1.0"
3
+ VERSION = '1.1.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vanilla-ujs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
- - "Łukasz Jan Niemier"
7
+ - Łukasz Jan Niemier
8
8
  - Alex Tsukurov
9
9
  - Kirill Pimenov
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-02-25 00:00:00.000000000 Z
13
+ date: 2016-03-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  version: 1.3.6
91
91
  requirements: []
92
92
  rubyforge_project:
93
- rubygems_version: 2.2.5
93
+ rubygems_version: 2.5.1
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: UJS without jQuery dependency