upjs-rails 0.10.5 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -86,7 +86,21 @@ describe 'up.proxy', ->
86
86
  it "caches #{method} requests with cache: true option", ->
87
87
  u.times 2, -> up.proxy.ajax(url: '/foo', method: method, cache: true)
88
88
  expect(jasmine.Ajax.requests.count()).toEqual(1)
89
-
89
+
90
+ it 'does not responses with a non-200 status code', ->
91
+ # Send the same request for the same path, 3 minutes apart
92
+ up.proxy.ajax(url: '/foo')
93
+
94
+ @lastRequest().respondWith
95
+ status: 500
96
+ contentType: 'text/html'
97
+ responseText: 'foo'
98
+
99
+ up.proxy.ajax(url: '/foo')
100
+
101
+ expect(jasmine.Ajax.requests.count()).toEqual(2)
102
+
103
+
90
104
  describe 'events', ->
91
105
 
92
106
  beforeEach ->
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upjs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.5
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-24 00:00:00.000000000 Z
11
+ date: 2015-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -119,9 +119,10 @@ files:
119
119
  - lib/assets/stylesheets/up/popup.css.sass
120
120
  - lib/assets/stylesheets/up/tooltip.css.sass
121
121
  - lib/upjs-rails.rb
122
- - lib/upjs/rails/current_location.rb
123
122
  - lib/upjs/rails/engine.rb
124
- - lib/upjs/rails/request.rb
123
+ - lib/upjs/rails/request_echo_headers.rb
124
+ - lib/upjs/rails/request_ext.rb
125
+ - lib/upjs/rails/request_method_cookie.rb
125
126
  - lib/upjs/rails/version.rb
126
127
  - spec_app/.firefox-version
127
128
  - spec_app/.gitignore
@@ -205,6 +206,7 @@ files:
205
206
  - spec_app/spec/javascripts/helpers/last_request.js.coffee
206
207
  - spec_app/spec/javascripts/helpers/mock_ajax.js.coffee
207
208
  - spec_app/spec/javascripts/helpers/mock_clock.js.coffee
209
+ - spec_app/spec/javascripts/helpers/remove_body_margin.js.coffee
208
210
  - spec_app/spec/javascripts/helpers/reset_path.js.coffee
209
211
  - spec_app/spec/javascripts/helpers/reset_up.js.coffee
210
212
  - spec_app/spec/javascripts/helpers/restore_body_scroll.js.coffee