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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -0
- data/dist/up-bootstrap.js +2 -1
- data/dist/up-bootstrap.min.js +1 -1
- data/dist/up.js +213 -73
- data/dist/up.min.js +2 -2
- data/lib/assets/javascripts/up/browser.js.coffee +33 -5
- data/lib/assets/javascripts/up/flow.js.coffee +14 -17
- data/lib/assets/javascripts/up/history.js.coffee +0 -1
- data/lib/assets/javascripts/up/layout.js.coffee +34 -5
- data/lib/assets/javascripts/up/modal.js.coffee +26 -8
- data/lib/assets/javascripts/up/motion.js.coffee +74 -30
- data/lib/assets/javascripts/up/popup.js.coffee +5 -1
- data/lib/assets/javascripts/up/proxy.js.coffee +2 -0
- data/lib/assets/javascripts/up/util.js.coffee +47 -6
- data/lib/assets/javascripts/up-bootstrap/layout-ext.js.coffee +1 -0
- data/lib/upjs/rails/{current_location.rb → request_echo_headers.rb} +4 -4
- data/lib/upjs/rails/{request.rb → request_ext.rb} +1 -1
- data/lib/upjs/rails/request_method_cookie.rb +28 -0
- data/lib/upjs/rails/version.rb +1 -1
- data/lib/upjs-rails.rb +3 -2
- data/spec_app/spec/javascripts/helpers/remove_body_margin.js.coffee +5 -0
- data/spec_app/spec/javascripts/up/flow_spec.js.coffee +3 -2
- data/spec_app/spec/javascripts/up/history_spec.js.coffee +0 -3
- data/spec_app/spec/javascripts/up/layout_spec.js.coffee +0 -3
- data/spec_app/spec/javascripts/up/modal_spec.js.coffee +27 -1
- data/spec_app/spec/javascripts/up/motion_spec.js.coffee +68 -22
- data/spec_app/spec/javascripts/up/proxy_spec.js.coffee +15 -1
- metadata +6 -4
@@ -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.
|
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-
|
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/
|
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
|