react_on_rails 13.3.0 → 13.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e61be8a6315e32bd3127d5ed676e1235c9e44cb43ff011dde722947c4f18b518
4
- data.tar.gz: 61be21f2eda6b8a58688af7a69f88b70c2b0dbfe23a9addf68f2894829e96787
3
+ metadata.gz: 8896ec89f83e47ce7e1eff6222dee036c4542b0fc349fa03e635d6b4960d4b94
4
+ data.tar.gz: c81ce4b4090451c91afdb97982e7fb7c7dc71e773291ca745a314c02fc00e4ed
5
5
  SHA512:
6
- metadata.gz: '069f91f435f7609c582a197e100e0140c9d4045b472fa163a06819847d860a339d0fba56ab408d32aa7307cb2b1205dfd5387b6e503810897a4898d6acf56dee'
7
- data.tar.gz: ed764a94f2cf6b4ff1a50d605c73cab97371e0a0bc68bb344bc1978988c54b213b44cbc2bce6f6045158d662e7e8201e829f801df2a07392394dfcfcade3e3d4
6
+ metadata.gz: 3588de292936d910ae34fd2a8325f219965346cd2174568a7d882cc9de487fea32361908ea18727711f4bdb0e00a771d5a9f8db5e5f5cdc55ed222a6b4f617c4
7
+ data.tar.gz: 84bf0bdc5a1f4835ba21fb8b5187ce31e9a1e1541a870d94423b9b11f47a8db49ef1033b23afeb4eccce4cdb3583b62502197e75ac63bf5d131d5d4edc612fa5
data/CHANGELOG.md CHANGED
@@ -17,11 +17,18 @@ Changes since last non-beta release.
17
17
 
18
18
  *Please add entries here for your pull requests that are not yet released.*
19
19
 
20
+ ### [13.3.1] - 2022-01-30
21
+ ## Added
22
+ - Optimized `ReactOnRails::TestHelper`'s RSpec integration using `when_first_matching_example_defined`. [PR 1496](https://github.com/shakacode/react_on_rails/pull/1496) by [mcls](https://github.com/mcls).
23
+
24
+ ### Fixed
25
+ - Fixed bug regarding FS-based packs generation. [PR 1515](https://github.com/shakacode/react_on_rails/pull/1515) by [pulkitkkr](https://github.com/pulkitkkr)
26
+
20
27
  ### [13.3.0] - 2022-01-29
21
28
  ### Fixed
22
- - Fixed pack not found warning while using `react_component` and `react_component_hash` helpers, even when corresponding chunks are present. [PR 1511](https://github.com/shakacode/react_on_rails/pull/1511) by [pulkitkkr](https://github.com/pulkitkkr)
29
+ - Fixed pack not found warning while using `react_component` and `react_component_hash` helpers, even when corresponding chunks are present. [PR 1511](https://github.com/shakacode/react_on_rails/pull/1511) by [pulkitkkr](https://github.com/pulkitkkr).
23
30
  - Fixed FS-based packs generation functionality to trigger pack generation on the creation of a new react component inside `components_subdirectory`. [PR 1506](https://github.com/shakacode/react_on_rails/pull/1506) by [pulkitkkr](https://github.com/pulkitkkr)
24
- - Upgrade several JS dependencies to fix security issues. [PR 1514](https://github.com/shakacode/react_on_rails/pull/1514) by [ahangarha](https://github.com/ahangarha)
31
+ - Upgrade several JS dependencies to fix security issues. [PR 1514](https://github.com/shakacode/react_on_rails/pull/1514) by [ahangarha](https://github.com/ahangarha).
25
32
 
26
33
  ### Added
27
34
  - Added `./bin/dev` and `./bin/dev-static` executables to ease and standardize running the dev server. [PR 1491](https://github.com/shakacode/react_on_rails/pull/1491) by [ahangarha](https://github.com/ahangarha)
@@ -1060,7 +1067,8 @@ Best done with Object destructing:
1060
1067
  ##### Fixed
1061
1068
  - Fix several generator related issues.
1062
1069
 
1063
- [Unreleased]: https://github.com/shakacode/react_on_rails/compare/13.3.0...master
1070
+ [Unreleased]: https://github.com/shakacode/react_on_rails/compare/13.3.1...master
1071
+ [13.3.1]: https://github.com/shakacode/react_on_rails/compare/13.3.0...13.3.1
1064
1072
  [13.3.0]: https://github.com/shakacode/react_on_rails/compare/13.2.0...13.3.0
1065
1073
  [13.2.0]: https://github.com/shakacode/react_on_rails/compare/13.1.0...13.2.0
1066
1074
  [13.1.0]: https://github.com/shakacode/react_on_rails/compare/13.0.2...13.1.0
@@ -328,8 +328,8 @@ module ReactOnRails
328
328
 
329
329
  ReactOnRails::WebpackerUtils.raise_nested_entries_disabled unless ReactOnRails::WebpackerUtils.nested_entries?
330
330
 
331
- ApplicationController.helpers.append_javascript_pack_tag "generated/#{component_name}"
332
- ApplicationController.helpers.append_stylesheet_pack_tag "generated/#{component_name}"
331
+ append_javascript_pack_tag "generated/#{component_name}"
332
+ append_stylesheet_pack_tag "generated/#{component_name}"
333
333
  end
334
334
 
335
335
  def generated_components_pack_path(component_name)
@@ -35,8 +35,17 @@ module ReactOnRails
35
35
  def self.configure_rspec_to_compile_assets(config, *metatags)
36
36
  metatags = %i[js server_rendering controller] if metatags.empty?
37
37
 
38
+ # Supported since RSpec 3.5.0
39
+ supports_first_matching_example = config.respond_to?(:when_first_matching_example_defined)
40
+
38
41
  metatags.each do |metatag|
39
- config.before(:example, metatag) { ReactOnRails::TestHelper.ensure_assets_compiled }
42
+ if supports_first_matching_example
43
+ config.when_first_matching_example_defined(metatag) do
44
+ ReactOnRails::TestHelper.ensure_assets_compiled
45
+ end
46
+ else
47
+ config.before(:example, metatag) { ReactOnRails::TestHelper.ensure_assets_compiled }
48
+ end
40
49
  end
41
50
  end
42
51
 
@@ -219,9 +219,5 @@ module ReactOnRails
219
219
 
220
220
  puts "Prepended\n#{text_to_prepend}to #{file}."
221
221
  end
222
-
223
- def self.semver_to_string(ary)
224
- "#{ary[0]}.#{ary[1]}.#{ary[2]}"
225
- end
226
222
  end
227
223
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ReactOnRails
4
- VERSION = "13.3.0"
4
+ VERSION = "13.3.1"
5
5
  end
@@ -27,9 +27,10 @@ module ReactOnRails
27
27
  @shakapacker_version_as_array = [match[1].to_i, match[2].to_i, match[3].to_i]
28
28
  end
29
29
 
30
- def self.shackapacker_version_requirement_met?(ary)
31
- ary[0] >= shakapacker_version_as_array[0] && ary[1] >= shakapacker_version_as_array[1] &&
32
- ary[2] >= shakapacker_version_as_array[2]
30
+ def self.shackapacker_version_requirement_met?(required_version)
31
+ req_ver = semver_to_string(required_version)
32
+
33
+ Gem::Version.new(shakapacker_version) >= Gem::Version.new(req_ver)
33
34
  end
34
35
 
35
36
  # This returns either a URL for the webpack-dev-server, non-server bundle or
@@ -136,5 +137,9 @@ module ReactOnRails
136
137
 
137
138
  raise ReactOnRails::Error, msg
138
139
  end
140
+
141
+ def self.semver_to_string(ary)
142
+ "#{ary[0]}.#{ary[1]}.#{ary[2]}"
143
+ end
139
144
  end
140
145
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-on-rails",
3
- "version": "13.3.0",
3
+ "version": "13.3.1",
4
4
  "description": "react-on-rails JavaScript for react_on_rails Ruby gem",
5
5
  "main": "node_package/lib/ReactOnRails.js",
6
6
  "directories": {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: react_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.3.0
4
+ version: 13.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Gordon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-29 00:00:00.000000000 Z
11
+ date: 2023-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable