js-routes 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55daff16f999cf2dfd6cfdbbe241e6c2cbbb7fbf
|
4
|
+
data.tar.gz: c6e9c73edbaf8f95667565114d844b7fc92788c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50876af1368b52bdabdd1cb4b2f6f85a2c1121c98f24aa0d6f415152edeadf127981f804d6cf2d3b72eff7d8f9cbff3056caa6529b5f3dfd435638fc1ac564c1
|
7
|
+
data.tar.gz: 6dfded8fd06823e2140020c541ce138525bde7c2e7fe6bdfd6b00d2f891069ecc94421fc2a283a8e21cd56e834febbdbb639a7a8afaaebc936274887da39a57c
|
data/CHANGELOG.md
CHANGED
data/lib/js_routes/engine.rb
CHANGED
@@ -4,10 +4,10 @@ class JsRoutes
|
|
4
4
|
SPROCKETS3 = Gem::Version.new(Sprockets::VERSION) >= Gem::Version.new('3.0.0')
|
5
5
|
class Engine < ::Rails::Engine
|
6
6
|
|
7
|
-
|
8
|
-
routes = Rails.root.join('config', 'routes.rb').to_s
|
7
|
+
initializer 'js-routes.dependent_on_routes', after: "sprockets.environment" do
|
9
8
|
|
10
9
|
if Rails.application.assets.respond_to?(:register_preprocessor)
|
10
|
+
routes = Rails.root.join('config', 'routes.rb').to_s
|
11
11
|
Rails.application.assets.register_preprocessor 'application/javascript', :'js-routes_dependent_on_routes' do |ctx,data|
|
12
12
|
ctx.depend_on(routes) if ctx.logical_path == 'js-routes'
|
13
13
|
data
|
data/lib/js_routes/version.rb
CHANGED
@@ -76,7 +76,7 @@ describe JsRoutes do
|
|
76
76
|
|
77
77
|
describe "compiled javascript asset" do
|
78
78
|
if JsRoutes::SPROCKETS3
|
79
|
-
let(:routes_path){ "
|
79
|
+
let(:routes_path){ "#{Rails.root.join 'config', 'routes.rb'}" }
|
80
80
|
before { expect(self).to receive(:depend_on).with routes_path }
|
81
81
|
end
|
82
82
|
subject { ERB.new(File.read("app/assets/javascripts/js-routes.js.erb")).result(binding) }
|
@@ -58,7 +58,6 @@ describe "after Rails initialization" do
|
|
58
58
|
context "the preprocessor" do
|
59
59
|
before(:each) do
|
60
60
|
path = Rails.root.join('config','routes.rb').to_s
|
61
|
-
path = "file://#{path}" if JsRoutes::SPROCKETS3
|
62
61
|
if sprockets_v3?
|
63
62
|
expect_any_instance_of(Sprockets::Context).to receive(:depend_on).with(path)
|
64
63
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: js-routes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bogdan Gusiev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|