unpoly-rails 0.54.0 → 0.54.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of unpoly-rails might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Rakefile +19 -0
- data/dist/unpoly.js +380 -390
- data/dist/unpoly.min.js +3 -4
- data/lib/assets/javascripts/unpoly/{browser.coffee → browser.coffee.erb} +20 -20
- data/lib/assets/javascripts/unpoly/{bus.coffee → bus.coffee.erb} +17 -17
- data/lib/assets/javascripts/unpoly/classes/cache.coffee +2 -2
- data/lib/assets/javascripts/unpoly/classes/extract_plan.coffee +1 -1
- data/lib/assets/javascripts/unpoly/classes/motion_tracker.coffee +3 -3
- data/lib/assets/javascripts/unpoly/classes/request.coffee +9 -9
- data/lib/assets/javascripts/unpoly/classes/response.coffee +11 -11
- data/lib/assets/javascripts/unpoly/{dom.coffee → dom.coffee.erb} +18 -18
- data/lib/assets/javascripts/unpoly/feedback.coffee +8 -8
- data/lib/assets/javascripts/unpoly/{form.coffee → form.coffee.erb} +20 -20
- data/lib/assets/javascripts/unpoly/history.coffee +12 -12
- data/lib/assets/javascripts/unpoly/{layout.coffee → layout.coffee.erb} +23 -23
- data/lib/assets/javascripts/unpoly/{link.coffee → link.coffee.erb} +18 -18
- data/lib/assets/javascripts/unpoly/log.coffee +9 -9
- data/lib/assets/javascripts/unpoly/{modal.coffee → modal.coffee.erb} +22 -22
- data/lib/assets/javascripts/unpoly/motion.coffee +14 -14
- data/lib/assets/javascripts/unpoly/namespace.coffee.erb +1 -1
- data/lib/assets/javascripts/unpoly/{popup.coffee → popup.coffee.erb} +15 -15
- data/lib/assets/javascripts/unpoly/protocol.coffee +6 -6
- data/lib/assets/javascripts/unpoly/proxy.coffee +20 -20
- data/lib/assets/javascripts/unpoly/radio.coffee +4 -4
- data/lib/assets/javascripts/unpoly/rails.coffee +1 -1
- data/lib/assets/javascripts/unpoly/syntax.coffee +10 -10
- data/lib/assets/javascripts/unpoly/toast.coffee +1 -1
- data/lib/assets/javascripts/unpoly/tooltip.coffee +7 -7
- data/lib/assets/javascripts/unpoly/util.coffee +107 -107
- data/lib/unpoly/rails/version.rb +1 -1
- data/package.json +1 -1
- data/spec_app/Gemfile.lock +1 -1
- data/spec_app/config/application.rb +2 -0
- data/spec_app/spec/javascripts/helpers/to_have_unhandled_rejections.coffee +3 -0
- data/spec_app/spec/javascripts/up/form_spec.js.coffee +4 -3
- data/spec_app/spec/javascripts/up/link_spec.js.coffee +1 -1
- data/spec_app/spec/javascripts/up/proxy_spec.js.coffee +1 -1
- metadata +10 -10
data/lib/unpoly/rails/version.rb
CHANGED
data/package.json
CHANGED
data/spec_app/Gemfile.lock
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
UNHANDLED_REJECTIONS = []
|
2
|
+
# In Firefox promise events are disabled by default.
|
3
|
+
# We need to enable them in about:config.
|
4
|
+
window.REJECTION_EVENTS_SUPPORTED = ("onunhandledrejection" in window)
|
2
5
|
|
3
6
|
beforeAll ->
|
4
7
|
window.addEventListener 'unhandledrejection', (event) ->
|
@@ -355,7 +355,8 @@ describe 'up.form', ->
|
|
355
355
|
expect('.before').not.toHaveText('old-before')
|
356
356
|
expect('.after').not.toHaveText('old-after')
|
357
357
|
|
358
|
-
expect(window).toHaveUnhandledRejections()
|
358
|
+
expect(window).toHaveUnhandledRejections() if REJECTION_EVENTS_SUPPORTED
|
359
|
+
|
359
360
|
|
360
361
|
it 'respects X-Up-Method and X-Up-Location response headers so the server can show that it redirected to a GET URL', asyncSpec (next) ->
|
361
362
|
up.submit(@$form)
|
@@ -658,7 +659,7 @@ describe 'up.form', ->
|
|
658
659
|
|
659
660
|
# Since there isn't anyone who could handle the rejection inside
|
660
661
|
# the event handler, our handler mutes the rejection.
|
661
|
-
expect(window).not.toHaveUnhandledRejections()
|
662
|
+
expect(window).not.toHaveUnhandledRejections() if REJECTION_EVENTS_SUPPORTED
|
662
663
|
|
663
664
|
it 'updates a given selector when an [up-fail-target] is given', asyncSpec (next) ->
|
664
665
|
$form = affix('form.my-form[action="/path"][up-target=".target"][up-fail-target=".errors"]').text('old form text')
|
@@ -907,7 +908,7 @@ describe 'up.form', ->
|
|
907
908
|
|
908
909
|
# Since there isn't anyone who could handle the rejection inside
|
909
910
|
# the event handler, our handler mutes the rejection.
|
910
|
-
expect(window).not.toHaveUnhandledRejections()
|
911
|
+
expect(window).not.toHaveUnhandledRejections() if REJECTION_EVENTS_SUPPORTED
|
911
912
|
|
912
913
|
it 'does not reveal the updated fragment (bugfix)', asyncSpec (next) ->
|
913
914
|
revealSpy = up.layout.knife.mock('reveal').and.returnValue(Promise.resolve())
|
@@ -798,7 +798,7 @@ describe 'up.link', ->
|
|
798
798
|
|
799
799
|
# Since there isn't anyone who could handle the rejection inside
|
800
800
|
# the event handler, our handler mutes the rejection.
|
801
|
-
expect(window).not.toHaveUnhandledRejections()
|
801
|
+
expect(window).not.toHaveUnhandledRejections() if REJECTION_EVENTS_SUPPORTED
|
802
802
|
|
803
803
|
|
804
804
|
it 'uses the [up-target] selector for a successful response', asyncSpec (next) ->
|
@@ -1064,7 +1064,7 @@ describe 'up.proxy', ->
|
|
1064
1064
|
|
1065
1065
|
# Since there isn't anyone who could handle the rejection inside
|
1066
1066
|
# the event handler, our handler mutes the rejection.
|
1067
|
-
expect(window).not.toHaveUnhandledRejections()
|
1067
|
+
expect(window).not.toHaveUnhandledRejections() if REJECTION_EVENTS_SUPPORTED
|
1068
1068
|
|
1069
1069
|
it 'triggers a separate AJAX request when hovered multiple times and the cache expires between hovers', asyncSpec (next) ->
|
1070
1070
|
up.proxy.config.cacheExpiry = 50
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unpoly-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.54.
|
4
|
+
version: 0.54.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henning Koch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -94,8 +94,8 @@ files:
|
|
94
94
|
- lib/assets/javascripts/unpoly-bootstrap3/modal-ext.coffee
|
95
95
|
- lib/assets/javascripts/unpoly-bootstrap3/navigation-ext.coffee
|
96
96
|
- lib/assets/javascripts/unpoly.coffee
|
97
|
-
- lib/assets/javascripts/unpoly/browser.coffee
|
98
|
-
- lib/assets/javascripts/unpoly/bus.coffee
|
97
|
+
- lib/assets/javascripts/unpoly/browser.coffee.erb
|
98
|
+
- lib/assets/javascripts/unpoly/bus.coffee.erb
|
99
99
|
- lib/assets/javascripts/unpoly/classes/cache.coffee
|
100
100
|
- lib/assets/javascripts/unpoly/classes/extract_cascade.coffee
|
101
101
|
- lib/assets/javascripts/unpoly/classes/extract_plan.coffee
|
@@ -105,17 +105,17 @@ files:
|
|
105
105
|
- lib/assets/javascripts/unpoly/classes/record.coffee
|
106
106
|
- lib/assets/javascripts/unpoly/classes/request.coffee
|
107
107
|
- lib/assets/javascripts/unpoly/classes/response.coffee
|
108
|
-
- lib/assets/javascripts/unpoly/dom.coffee
|
108
|
+
- lib/assets/javascripts/unpoly/dom.coffee.erb
|
109
109
|
- lib/assets/javascripts/unpoly/feedback.coffee
|
110
|
-
- lib/assets/javascripts/unpoly/form.coffee
|
110
|
+
- lib/assets/javascripts/unpoly/form.coffee.erb
|
111
111
|
- lib/assets/javascripts/unpoly/history.coffee
|
112
|
-
- lib/assets/javascripts/unpoly/layout.coffee
|
113
|
-
- lib/assets/javascripts/unpoly/link.coffee
|
112
|
+
- lib/assets/javascripts/unpoly/layout.coffee.erb
|
113
|
+
- lib/assets/javascripts/unpoly/link.coffee.erb
|
114
114
|
- lib/assets/javascripts/unpoly/log.coffee
|
115
|
-
- lib/assets/javascripts/unpoly/modal.coffee
|
115
|
+
- lib/assets/javascripts/unpoly/modal.coffee.erb
|
116
116
|
- lib/assets/javascripts/unpoly/motion.coffee
|
117
117
|
- lib/assets/javascripts/unpoly/namespace.coffee.erb
|
118
|
-
- lib/assets/javascripts/unpoly/popup.coffee
|
118
|
+
- lib/assets/javascripts/unpoly/popup.coffee.erb
|
119
119
|
- lib/assets/javascripts/unpoly/protocol.coffee
|
120
120
|
- lib/assets/javascripts/unpoly/proxy.coffee
|
121
121
|
- lib/assets/javascripts/unpoly/radio.coffee
|