unpoly-rails 0.54.0 → 0.54.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of unpoly-rails might be problematic. Click here for more details.

Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/Rakefile +19 -0
  4. data/dist/unpoly.js +380 -390
  5. data/dist/unpoly.min.js +3 -4
  6. data/lib/assets/javascripts/unpoly/{browser.coffee → browser.coffee.erb} +20 -20
  7. data/lib/assets/javascripts/unpoly/{bus.coffee → bus.coffee.erb} +17 -17
  8. data/lib/assets/javascripts/unpoly/classes/cache.coffee +2 -2
  9. data/lib/assets/javascripts/unpoly/classes/extract_plan.coffee +1 -1
  10. data/lib/assets/javascripts/unpoly/classes/motion_tracker.coffee +3 -3
  11. data/lib/assets/javascripts/unpoly/classes/request.coffee +9 -9
  12. data/lib/assets/javascripts/unpoly/classes/response.coffee +11 -11
  13. data/lib/assets/javascripts/unpoly/{dom.coffee → dom.coffee.erb} +18 -18
  14. data/lib/assets/javascripts/unpoly/feedback.coffee +8 -8
  15. data/lib/assets/javascripts/unpoly/{form.coffee → form.coffee.erb} +20 -20
  16. data/lib/assets/javascripts/unpoly/history.coffee +12 -12
  17. data/lib/assets/javascripts/unpoly/{layout.coffee → layout.coffee.erb} +23 -23
  18. data/lib/assets/javascripts/unpoly/{link.coffee → link.coffee.erb} +18 -18
  19. data/lib/assets/javascripts/unpoly/log.coffee +9 -9
  20. data/lib/assets/javascripts/unpoly/{modal.coffee → modal.coffee.erb} +22 -22
  21. data/lib/assets/javascripts/unpoly/motion.coffee +14 -14
  22. data/lib/assets/javascripts/unpoly/namespace.coffee.erb +1 -1
  23. data/lib/assets/javascripts/unpoly/{popup.coffee → popup.coffee.erb} +15 -15
  24. data/lib/assets/javascripts/unpoly/protocol.coffee +6 -6
  25. data/lib/assets/javascripts/unpoly/proxy.coffee +20 -20
  26. data/lib/assets/javascripts/unpoly/radio.coffee +4 -4
  27. data/lib/assets/javascripts/unpoly/rails.coffee +1 -1
  28. data/lib/assets/javascripts/unpoly/syntax.coffee +10 -10
  29. data/lib/assets/javascripts/unpoly/toast.coffee +1 -1
  30. data/lib/assets/javascripts/unpoly/tooltip.coffee +7 -7
  31. data/lib/assets/javascripts/unpoly/util.coffee +107 -107
  32. data/lib/unpoly/rails/version.rb +1 -1
  33. data/package.json +1 -1
  34. data/spec_app/Gemfile.lock +1 -1
  35. data/spec_app/config/application.rb +2 -0
  36. data/spec_app/spec/javascripts/helpers/to_have_unhandled_rejections.coffee +3 -0
  37. data/spec_app/spec/javascripts/up/form_spec.js.coffee +4 -3
  38. data/spec_app/spec/javascripts/up/link_spec.js.coffee +1 -1
  39. data/spec_app/spec/javascripts/up/proxy_spec.js.coffee +1 -1
  40. metadata +10 -10
@@ -4,6 +4,6 @@ module Unpoly
4
4
  # The current version of the unpoly-rails gem.
5
5
  # This version number is also used for releases of the Unpoly
6
6
  # frontend code.
7
- VERSION = '0.54.0'
7
+ VERSION = '0.54.1'
8
8
  end
9
9
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unpoly",
3
- "version": "0.54.0",
3
+ "version": "0.54.1",
4
4
  "description": "Unobtrusive JavaScript framework",
5
5
  "main": "dist/unpoly.js",
6
6
  "files": [
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- unpoly-rails (0.53.4)
4
+ unpoly-rails (0.54.0)
5
5
  rails (>= 3)
6
6
 
7
7
  GEM
@@ -24,3 +24,5 @@ module SpecApp
24
24
  config.active_record.raise_in_transactional_callbacks = true
25
25
  end
26
26
  end
27
+
28
+ ENV['JS_KNIFE'] = '1'
@@ -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.0
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-15 00:00:00.000000000 Z
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