js-routes 1.4.1 → 1.4.2

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
  SHA1:
3
- metadata.gz: 50875d687cd46f55c34450970c84faddd4ff970c
4
- data.tar.gz: cb98a4d6b4feb6a3cb60631c22dc8ac4e7638c10
3
+ metadata.gz: 7f2b764ad8b2e830d272dae6c27c5d5ffd7d62ff
4
+ data.tar.gz: 0919ef9b1b2b835badcfc149ef2c98b5e9cff8f4
5
5
  SHA512:
6
- metadata.gz: c49eefb28fc5ad6edb1378b4718397c7996b6f9f7b356a53336c8becfa4d162af71a3dc4606a2fc2a04f958e4b2eec70adbdbcad642e130f662842422edd1357
7
- data.tar.gz: 49f4bb3f3988f61e7853d7a392b902212715bd3f537cd9bbf3c51b72f8781ee3c9a9d5d9ded33989be35e2269c948f9274caf0f59bc54bb21f207fce33814a7a
6
+ metadata.gz: 91aec6308159d5b88096a57ab461bd0f5db939778d3deffc915f846da1deb17e3506837119f8f77eab6d21270f50167da9809ebf6b9183357b7a666fd6bda523
7
+ data.tar.gz: 0492743727d0493de6ea1480255659f7cd53efcd289d3a4c78e9d1781c95123afe700d57bb2acda76f6f953a60b5580ae3b65944e4b05e3d08837f2659123aca
data/.travis.yml CHANGED
@@ -16,14 +16,14 @@ rvm:
16
16
 
17
17
  gemfile:
18
18
  - gemfiles/rails32.gemfile
19
- - gemfiles/rails40.gemfile
20
- - gemfiles/rails40_sprockets3.gemfile
21
- - gemfiles/rails41.gemfile
22
- - gemfiles/rails41_sprockets3.gemfile
23
- - gemfiles/rails42.gemfile
24
- - gemfiles/rails42_sprockets3.gemfile
25
- - gemfiles/rails50.gemfile
26
- - gemfiles/rails50_sprockets3.gemfile
19
+ - gemfiles/rails40_sprockets_2.gemfile
20
+ - gemfiles/rails40_sprockets_3.gemfile
21
+ - gemfiles/rails41_sprockets_2.gemfile
22
+ - gemfiles/rails41_sprockets_3.gemfile
23
+ - gemfiles/rails42_sprockets_2.gemfile
24
+ - gemfiles/rails42_sprockets_3.gemfile
25
+ - gemfiles/rails50_sprockets_3.gemfile
26
+ - gemfiles/rails51_sprockets_3.gemfile
27
27
 
28
28
  sudo: false
29
29
 
@@ -40,21 +40,20 @@ matrix:
40
40
  - rvm: jruby-19mode
41
41
  - rvm: ruby-head
42
42
  - rvm: jruby-head
43
- - gemfile: gemfiles/rails50.gemfile
44
43
  exclude:
45
44
  - rvm: 2.0
46
- gemfile: gemfiles/rails50.gemfile
47
- - rvm: 2.0
48
- gemfile: gemfiles/rails50_sprockets3.gemfile
45
+ gemfile: gemfiles/rails50_sprockets_3.gemfile
49
46
  - rvm: 2.1
50
- gemfile: gemfiles/rails50.gemfile
47
+ gemfile: gemfiles/rails50_sprockets_3.gemfile
48
+ - rvm: 2.0
49
+ gemfile: gemfiles/rails51_sprockets_3.gemfile
51
50
  - rvm: 2.1
52
- gemfile: gemfiles/rails50_sprockets3.gemfile
51
+ gemfile: gemfiles/rails51_sprockets_3.gemfile
53
52
  - rvm: 2.4.1
54
- gemfile: gemfiles/rails40.gemfile # Segmentation fault (core dumped) for 2.4
53
+ gemfile: gemfiles/rails40_sprockets_2.gemfile # Segmentation fault (core dumped) for 2.4
55
54
  - rvm: 2.4.1
56
- gemfile: gemfiles/rails40_sprockets3.gemfile # Segmentation fault (core dumped) for 2.4
55
+ gemfile: gemfiles/rails40_sprockets_3.gemfile # Segmentation fault (core dumped) for 2.4
57
56
  - rvm: 2.4.1
58
- gemfile: gemfiles/rails41.gemfile # Segmentation fault (core dumped) for 2.4
57
+ gemfile: gemfiles/rails41_sprockets_2.gemfile # Segmentation fault (core dumped) for 2.4
59
58
  - rvm: 2.4.1
60
- gemfile: gemfiles/rails41_sprockets3.gemfile # Segmentation fault (core dumped) for 2.4
59
+ gemfile: gemfiles/rails41_sprockets_3.gemfile # Segmentation fault (core dumped) for 2.4
data/Appraisals CHANGED
@@ -3,14 +3,21 @@ appraise "rails32" do
3
3
  gem 'tzinfo'
4
4
  end
5
5
 
6
- {rails40: '4.0.13', rails41: '4.1.16', rails42: '4.2.8', rails50: '5.0.2'}.each do |rails, version|
7
- appraise "#{rails}" do
8
- gem "railties", "~> #{version}"
9
- gem "sprockets", "< 3"
6
+ def define_appraisal(rails, version, sprockets)
7
+ sprockets.each do |sprocket|
8
+ appraise "#{rails}-sprockets-#{sprocket}" do
9
+ gem "railties", "~> #{version}"
10
+ gem "sprockets", "~> #{sprocket}.0"
11
+ end
10
12
  end
13
+ end
11
14
 
12
- appraise "#{rails}-sprockets3" do
13
- gem "railties", "~> #{version}"
14
- gem "sprockets", "~> 3.0"
15
- end
15
+ [
16
+ [:rails40, '4.0.13', [2, 3]],
17
+ [:rails41, '4.1.16', [2, 3]],
18
+ [:rails42, '4.2.9', [2, 3]],
19
+ [:rails50, '5.0.5', [3]],
20
+ [:rails51, '5.1.3', [3]]
21
+ ].each do |name, version, sprockets|
22
+ define_appraisal(name, version, sprockets)
16
23
  end
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## master
2
2
 
3
+ ## v1.4.2
4
+
5
+ * Added JsRoutes namespace to Engine #230
6
+
3
7
  ## v1.4.1
4
8
 
5
9
  * Fixed bug when js-routes is used in envs without window.location #224
data/Readme.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # JsRoutes
2
2
  [![Build Status](https://travis-ci.org/railsware/js-routes.svg?branch=master)](https://travis-ci.org/railsware/js-routes)
3
+ [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Frailsware%2Fjs-routes.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Frailsware%2Fjs-routes?ref=badge_shield)
3
4
 
4
5
  Generates javascript file that defines all Rails named routes as javascript helpers
5
6
 
@@ -244,3 +245,7 @@ Advantages of this one are:
244
245
  #### Thanks to [Contributors](https://github.com/railsware/js-routes/contributors)
245
246
 
246
247
  #### Have fun
248
+
249
+
250
+ ## License
251
+ [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Frailsware%2Fjs-routes.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Frailsware%2Fjs-routes?ref=badge_large)
@@ -3,6 +3,6 @@
3
3
  source "http://rubygems.org"
4
4
 
5
5
  gem "railties", "~> 4.0.13"
6
- gem "sprockets", "< 3"
6
+ gem "sprockets", "~> 2.0"
7
7
 
8
8
  gemspec :path => "../"
@@ -3,6 +3,6 @@
3
3
  source "http://rubygems.org"
4
4
 
5
5
  gem "railties", "~> 4.1.16"
6
- gem "sprockets", "< 3"
6
+ gem "sprockets", "~> 2.0"
7
7
 
8
8
  gemspec :path => "../"
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "railties", "~> 4.2.8"
6
- gem "sprockets", "< 3"
5
+ gem "railties", "~> 4.2.9"
6
+ gem "sprockets", "~> 2.0"
7
7
 
8
8
  gemspec :path => "../"
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "railties", "~> 4.2.8"
5
+ gem "railties", "~> 4.2.9"
6
6
  gem "sprockets", "~> 3.0"
7
7
 
8
8
  gemspec :path => "../"
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "railties", "~> 5.0.2"
5
+ gem "railties", "~> 5.0.5"
6
6
  gem "sprockets", "~> 3.0"
7
7
 
8
8
  gemspec :path => "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "railties", "~> 5.1.3"
6
+ gem "sprockets", "~> 3.0"
7
+
8
+ gemspec :path => "../"
@@ -1,4 +1,5 @@
1
- class JsRoutesSprocketsExtension
1
+ class JsRoutes
2
+ class SprocketsExtension
2
3
  def initialize(filename, &block)
3
4
  @filename = filename
4
5
  @source = block.call
@@ -55,14 +56,14 @@ class Engine < ::Rails::Engine
55
56
  if is_running_rails_32
56
57
  Rails.application.assets.register_preprocessor(
57
58
  "application/javascript",
58
- JsRoutesSprocketsExtension,
59
+ SprocketsExtension,
59
60
  )
60
61
  else
61
62
  # Other rails version, assumed newer
62
63
  Rails.application.config.assets.configure do |config|
63
64
  config.register_preprocessor(
64
65
  "application/javascript",
65
- JsRoutesSprocketsExtension,
66
+ SprocketsExtension,
66
67
  )
67
68
  end
68
69
  end
@@ -71,3 +72,4 @@ class Engine < ::Rails::Engine
71
72
  end
72
73
  end
73
74
  end
75
+ end
@@ -1,3 +1,3 @@
1
1
  class JsRoutes
2
- VERSION = "1.4.1"
2
+ VERSION = "1.4.2"
3
3
  end
@@ -332,9 +332,6 @@ describe JsRoutes, "compatibility with Rails" do
332
332
  expect(evaljs("Routes.inbox_message_path(5, {id: 7, q: 'hello', _options: true})")).to eq(test_routes.inbox_message_path(5, id: 7, q: 'hello'))
333
333
  end
334
334
 
335
- it "should check for options special key" do
336
- end
337
-
338
335
  it "should support 0 as an id option" do
339
336
  expect(evaljs("Routes.inbox_path({id: 0})")).to eq(test_routes.inbox_path(0))
340
337
  end
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.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bogdan Gusiev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-05 00:00:00.000000000 Z
11
+ date: 2017-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -156,14 +156,14 @@ files:
156
156
  - Readme.md
157
157
  - app/assets/javascripts/js-routes.js.erb
158
158
  - gemfiles/rails32.gemfile
159
- - gemfiles/rails40.gemfile
160
- - gemfiles/rails40_sprockets3.gemfile
161
- - gemfiles/rails41.gemfile
162
- - gemfiles/rails41_sprockets3.gemfile
163
- - gemfiles/rails42.gemfile
164
- - gemfiles/rails42_sprockets3.gemfile
165
- - gemfiles/rails50.gemfile
166
- - gemfiles/rails50_sprockets3.gemfile
159
+ - gemfiles/rails40_sprockets_2.gemfile
160
+ - gemfiles/rails40_sprockets_3.gemfile
161
+ - gemfiles/rails41_sprockets_2.gemfile
162
+ - gemfiles/rails41_sprockets_3.gemfile
163
+ - gemfiles/rails42_sprockets_2.gemfile
164
+ - gemfiles/rails42_sprockets_3.gemfile
165
+ - gemfiles/rails50_sprockets_3.gemfile
166
+ - gemfiles/rails51_sprockets_3.gemfile
167
167
  - js-routes.gemspec
168
168
  - lib/js-routes.rb
169
169
  - lib/js_routes.rb
@@ -202,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
202
  version: '0'
203
203
  requirements: []
204
204
  rubyforge_project:
205
- rubygems_version: 2.6.11
205
+ rubygems_version: 2.6.7
206
206
  signing_key:
207
207
  specification_version: 4
208
208
  summary: Brings Rails named routes to javascript
@@ -1,8 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "http://rubygems.org"
4
-
5
- gem "railties", "~> 5.0.2"
6
- gem "sprockets", "< 3"
7
-
8
- gemspec :path => "../"