stimulus_reflex 3.1.3 → 3.1.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ddee0a9c006e8aed66d21ff080f40a09e512b7ee567aab2d39827b1e0c23c27a
4
- data.tar.gz: 93fb5b568e3826e9e6a8d0a333a27456da544d7f1aa55d86518e559d0465cf76
3
+ metadata.gz: a559b60e0f9fa9519b36dbdec1a217f15eecbf2a3bff051c20faf91d046c9e89
4
+ data.tar.gz: 04af4bf702cd97e692d2f0c0b6396e8c1d86821a53d7352854753b524aa7ba92
5
5
  SHA512:
6
- metadata.gz: 64c94c0938e0ac7c0e971f3e6aae4125cb18ac4164a35bf736bddb38f679dcb658cc306fa09fd98869c7ec30d3bf69881d98153b4bbaee2c78b154581eeb9e20
7
- data.tar.gz: 8f35680cbf53e5cd8f15092a633944f2b8387ed9f104cee695b98f414e3356701510ea9fc67a3e86aa77540214a7df63535fd6c88f595df6ab2d43cfc51c7666
6
+ metadata.gz: 8b5f428fe17bddfeff38c20d400b0b7a25f211b000acd5a0c0578a46379762371ff11f67e81243e20d08fdbeeae585e48c65b2aeb17f7bb6bfc228da7ecd62ce
7
+ data.tar.gz: 22df1e093ae82f7454fbd60501622d6d083e69e5c00732dbf953221b9a113d901aa7d347ee82b19a74b9bed75e918c60749bc71caf0f8e9f038619e0464dcf6d
data/CHANGELOG.md CHANGED
@@ -2,7 +2,37 @@
2
2
 
3
3
  ## [Unreleased](https://github.com/hopsoft/stimulus_reflex/tree/HEAD)
4
4
 
5
- [Full Changelog](https://github.com/hopsoft/stimulus_reflex/compare/v3.1.2...HEAD)
5
+ [Full Changelog](https://github.com/hopsoft/stimulus_reflex/compare/v3.1.3...HEAD)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - TypeScript typing support [\#152](https://github.com/hopsoft/stimulus_reflex/issues/152)
10
+
11
+ **Fixed bugs:**
12
+
13
+ - Possible bug when about to perform cableready operations [\#166](https://github.com/hopsoft/stimulus_reflex/issues/166)
14
+ - Reflex not binding to ajax loaded content [\#161](https://github.com/hopsoft/stimulus_reflex/issues/161)
15
+ - Input field values sometimes remain [\#159](https://github.com/hopsoft/stimulus_reflex/issues/159)
16
+
17
+ **Closed issues:**
18
+
19
+ - Devise authenticated routes not supported anymore [\#173](https://github.com/hopsoft/stimulus_reflex/issues/173)
20
+ - CableReady detected an error in morph! Event is not a constructor [\#165](https://github.com/hopsoft/stimulus_reflex/issues/165)
21
+ - Testing Integrations [\#164](https://github.com/hopsoft/stimulus_reflex/issues/164)
22
+ - Error during install: "File unchanged! The supplied flag value not found! app/javascript/packs/application.js" [\#118](https://github.com/hopsoft/stimulus_reflex/issues/118)
23
+ - Make the javascript in stimulus-reflex websocket agnostic [\#113](https://github.com/hopsoft/stimulus_reflex/issues/113)
24
+
25
+ **Merged pull requests:**
26
+
27
+ - prettier-standard: include all js files in the project [\#177](https://github.com/hopsoft/stimulus_reflex/pull/177) ([marcoroth](https://github.com/marcoroth))
28
+ - Remove implicit permanent for text inputs [\#176](https://github.com/hopsoft/stimulus_reflex/pull/176) ([hopsoft](https://github.com/hopsoft))
29
+ - Support devise authenticated routes [\#172](https://github.com/hopsoft/stimulus_reflex/pull/172) ([db0sch](https://github.com/db0sch))
30
+ - setupDeclarativeReflexes export with UJS support [\#169](https://github.com/hopsoft/stimulus_reflex/pull/169) ([leastbad](https://github.com/leastbad))
31
+ - Fix compilation issue [\#168](https://github.com/hopsoft/stimulus_reflex/pull/168) ([jonathan-s](https://github.com/jonathan-s))
32
+
33
+ ## [v3.1.3](https://github.com/hopsoft/stimulus_reflex/tree/v3.1.3) (2020-04-20)
34
+
35
+ [Full Changelog](https://github.com/hopsoft/stimulus_reflex/compare/v3.1.2...v3.1.3)
6
36
 
7
37
  **Implemented enhancements:**
8
38
 
@@ -108,6 +138,7 @@
108
138
  **Implemented enhancements:**
109
139
 
110
140
  - Commit session after rerendering page [\#124](https://github.com/hopsoft/stimulus_reflex/pull/124) ([hopsoft](https://github.com/hopsoft))
141
+ - Propose post install message [\#122](https://github.com/hopsoft/stimulus_reflex/pull/122) ([julianrubisch](https://github.com/julianrubisch))
111
142
 
112
143
  ## [v2.2.1](https://github.com/hopsoft/stimulus_reflex/tree/v2.2.1) (2020-02-28)
113
144
 
@@ -165,7 +196,6 @@
165
196
 
166
197
  **Implemented enhancements:**
167
198
 
168
- - Propose post install message [\#122](https://github.com/hopsoft/stimulus_reflex/pull/122) ([julianrubisch](https://github.com/julianrubisch))
169
199
  - StimulusReflex::Channel - Error messages include stack trace info [\#100](https://github.com/hopsoft/stimulus_reflex/pull/100) ([szTheory](https://github.com/szTheory))
170
200
 
171
201
  **Closed issues:**
@@ -182,7 +212,6 @@
182
212
  - Add schema support [\#94](https://github.com/hopsoft/stimulus_reflex/pull/94) ([hopsoft](https://github.com/hopsoft))
183
213
  - inherit stimulus schema [\#92](https://github.com/hopsoft/stimulus_reflex/pull/92) ([nickyvanurk](https://github.com/nickyvanurk))
184
214
  - Single source of truth [\#76](https://github.com/hopsoft/stimulus_reflex/pull/76) ([leastbad](https://github.com/leastbad))
185
- - Update installer [\#71](https://github.com/hopsoft/stimulus_reflex/pull/71) ([hopsoft](https://github.com/hopsoft))
186
215
 
187
216
  **Fixed bugs:**
188
217
 
@@ -214,6 +243,7 @@
214
243
  **Implemented enhancements:**
215
244
 
216
245
  - Create Rails generators [\#3](https://github.com/hopsoft/stimulus_reflex/issues/3)
246
+ - Update installer [\#71](https://github.com/hopsoft/stimulus_reflex/pull/71) ([hopsoft](https://github.com/hopsoft))
217
247
  - Tweak generators [\#69](https://github.com/hopsoft/stimulus_reflex/pull/69) ([hopsoft](https://github.com/hopsoft))
218
248
  - add generators [\#67](https://github.com/hopsoft/stimulus_reflex/pull/67) ([andrewmcodes](https://github.com/andrewmcodes))
219
249
 
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stimulus_reflex (3.1.3)
5
- cable_ready (>= 4.1)
4
+ stimulus_reflex (3.1.4)
5
+ cable_ready (>= 4.1.2)
6
6
  nokogiri
7
7
  rack
8
8
  rails (>= 6.0)
@@ -67,7 +67,7 @@ GEM
67
67
  zeitwerk (~> 2.2)
68
68
  ast (2.4.0)
69
69
  builder (3.2.4)
70
- cable_ready (4.1.1)
70
+ cable_ready (4.1.2)
71
71
  rails (>= 5.2)
72
72
  coderay (1.1.2)
73
73
  concurrent-ruby (1.1.6)
@@ -151,7 +151,7 @@ GEM
151
151
  actionpack (>= 4.0)
152
152
  activesupport (>= 4.0)
153
153
  sprockets (>= 3.0.0)
154
- standard (0.2.3)
154
+ standard (0.2.4)
155
155
  rubocop (~> 0.80.1)
156
156
  rubocop-performance (~> 1.5.2)
157
157
  standardrb (1.0.0)
@@ -45,15 +45,5 @@ export default class extends Controller {
45
45
 
46
46
  afterReflex (element, reflex) {
47
47
  // document.body.classList.remove('wait')
48
-
49
- const focusElement = this.element.querySelector('[autofocus]')
50
- if (focusElement) {
51
- focusElement.focus()
52
-
53
- // shenanigans to ensure that the cursor is placed at the end of the existing value
54
- const value = focusElement.value
55
- focusElement.value = ''
56
- focusElement.value = value
57
- }
58
48
  }
59
49
  }
@@ -17,9 +17,8 @@ class StimulusReflex::Reflex
17
17
  @request ||= begin
18
18
  uri = URI.parse(url)
19
19
  path = ActionDispatch::Journey::Router::Utils.normalize_path(uri.path)
20
- path_params = Rails.application.routes.recognize_path(path)
21
20
  query_hash = Rack::Utils.parse_nested_query(uri.query)
22
- ActionDispatch::Request.new(
21
+ req = ActionDispatch::Request.new(
23
22
  connection.env.merge(
24
23
  Rack::MockRequest.env_for(uri.to_s).merge(
25
24
  "rack.request.query_hash" => query_hash,
@@ -29,11 +28,13 @@ class StimulusReflex::Reflex
29
28
  Rack::SCRIPT_NAME => "",
30
29
  Rack::PATH_INFO => path,
31
30
  Rack::REQUEST_PATH => path,
32
- Rack::QUERY_STRING => uri.query,
33
- ActionDispatch::Http::Parameters::PARAMETERS_KEY => path_params
31
+ Rack::QUERY_STRING => uri.query
34
32
  )
35
33
  )
36
- ).tap { |req| req.session.send :load! }
34
+ )
35
+ path_params = Rails.application.routes.recognize_path_with_request(req, url, req.env[:extras] || {})
36
+ req.env.merge(ActionDispatch::Http::Parameters::PARAMETERS_KEY => path_params)
37
+ req.tap { |r| r.session.send :load! }
37
38
  end
38
39
  end
39
40
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StimulusReflex
4
- VERSION = "3.1.3"
4
+ VERSION = "3.1.4"
5
5
  end
@@ -29,7 +29,7 @@ Gem::Specification.new do |gem|
29
29
  gem.add_dependency "rack"
30
30
  gem.add_dependency "nokogiri"
31
31
  gem.add_dependency "rails", ">= 6.0"
32
- gem.add_dependency "cable_ready", ">= 4.1"
32
+ gem.add_dependency "cable_ready", ">= 4.1.2"
33
33
 
34
34
  gem.add_development_dependency "bundler", "~> 2.0"
35
35
  gem.add_development_dependency "pry-nav"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stimulus_reflex
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.3
4
+ version: 3.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Hopkins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-20 00:00:00.000000000 Z
11
+ date: 2020-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '4.1'
61
+ version: 4.1.2
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '4.1'
68
+ version: 4.1.2
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement