js-routes 2.2.3 → 2.2.5
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 +4 -4
- data/.eslintrc.js +1 -1
- data/.github/workflows/ci.yml +36 -0
- data/Appraisals +2 -4
- data/CHANGELOG.md +7 -0
- data/Readme.md +50 -43
- data/gemfiles/rails50_sprockets_3.gemfile +1 -1
- data/gemfiles/rails51_sprockets_3.gemfile +1 -1
- data/gemfiles/rails52_sprockets_3.gemfile +1 -1
- data/gemfiles/rails70_sprockets_4.gemfile +8 -0
- data/lib/js_routes/engine.rb +6 -1
- data/lib/js_routes/generators/middleware.rb +1 -1
- data/lib/js_routes/instance.rb +2 -2
- data/lib/js_routes/middleware.rb +6 -2
- data/lib/js_routes/version.rb +1 -1
- data/lib/routes.d.ts +2 -0
- data/lib/routes.js +23 -5
- data/lib/routes.ts +34 -17
- data/package.json +7 -6
- data/spec/js_routes/default_serializer_spec.rb +5 -5
- data/spec/js_routes/module_types/amd_spec.rb +3 -3
- data/spec/js_routes/module_types/cjs_spec.rb +1 -1
- data/spec/js_routes/module_types/dts/routes.spec.d.ts +2 -0
- data/spec/js_routes/module_types/dts_spec.rb +1 -1
- data/spec/js_routes/module_types/esm_spec.rb +2 -2
- data/spec/js_routes/module_types/nil_spec.rb +7 -7
- data/spec/js_routes/module_types/umd_spec.rb +1 -1
- data/spec/js_routes/options_spec.rb +81 -81
- data/spec/js_routes/rails_routes_compatibility_spec.rb +127 -138
- data/spec/js_routes/route_specification_spec.rb +40 -0
- data/spec/js_routes/zzz_last_post_rails_init_spec.rb +8 -2
- data/spec/spec_helper.rb +5 -5
- data/yarn.lock +760 -448
- metadata +6 -10
- data/.travis.yml +0 -67
- data/gemfiles/rails40_sprockets_2.gemfile +0 -8
- data/gemfiles/rails40_sprockets_3.gemfile +0 -8
- data/gemfiles/rails41_sprockets_2.gemfile +0 -8
- data/gemfiles/rails41_sprockets_3.gemfile +0 -8
- data/gemfiles/rails42_sprockets_2.gemfile +0 -8
- data/gemfiles/rails42_sprockets_3.gemfile +0 -8
data/spec/spec_helper.rb
CHANGED
@@ -7,7 +7,7 @@ require 'rails/all'
|
|
7
7
|
require 'js-routes'
|
8
8
|
require 'active_support/core_ext/hash/slice'
|
9
9
|
|
10
|
-
unless ENV['
|
10
|
+
unless ENV['CI']
|
11
11
|
code = system("yarn build")
|
12
12
|
unless code
|
13
13
|
exit(1)
|
@@ -70,6 +70,10 @@ def log(string)
|
|
70
70
|
evaljs("console.log(#{string})")
|
71
71
|
end
|
72
72
|
|
73
|
+
def expectjs(string)
|
74
|
+
expect(evaljs(string))
|
75
|
+
end
|
76
|
+
|
73
77
|
ActiveSupport::Inflector.inflections do |inflect|
|
74
78
|
inflect.irregular "budgie", "budgies"
|
75
79
|
end
|
@@ -90,10 +94,6 @@ end
|
|
90
94
|
|
91
95
|
|
92
96
|
class ::App < Rails::Application
|
93
|
-
# Enable the asset pipeline
|
94
|
-
config.assets.enabled = true
|
95
|
-
# initialize_on_precompile
|
96
|
-
config.assets.initialize_on_precompile = true
|
97
97
|
config.paths['config/routes.rb'] << 'spec/config/routes.rb'
|
98
98
|
config.root = File.expand_path('../dummy', __FILE__)
|
99
99
|
end
|