js_rails_routes 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +7 -7
- data/js_rails_routes.gemspec +1 -1
- data/lib/js_rails_routes/version.rb +1 -1
- data/lib/tasks/js_rails_routes.rake +8 -10
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 268d6274e4572add444b4ad5e1c844f1747db8e1
|
4
|
+
data.tar.gz: e7debb031ab7c98729a2772a41ba754f6ca2d444
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09810107ea9a99f0119abf0220586665d616d18f3fd4c6650204c02317f23c5e9fa534ef6e1fce3b68310665d8c6c8b28f19f3982812d6b058024b9bf67e6a33
|
7
|
+
data.tar.gz: 42cf90c4a269986b914173819b7f2988bde9f8500da7301b1e171eebee852ef082f306110e8e38b5d6c73499ec308d65b6afb4a59aff959bda1a21a2ef052664
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Change Log
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
This change log adheres to [keepachangelog.com](http://keepachangelog.com).
|
6
|
+
|
7
|
+
## [0.2.0] - 2016-06-24
|
8
|
+
### Changed
|
9
|
+
- Rename the task name as "js:routes"
|
10
|
+
|
11
|
+
## [0.1.0] - 2016-06-24
|
12
|
+
### Added
|
13
|
+
- Implement "js:rails:routes" task
|
14
|
+
|
15
|
+
[0.2.0]: https://github.com/yuku-t/jquery-textcomplete/compare/v0.1.0...v0.2.0
|
16
|
+
[0.1.0]: https://github.com/yuku-t/jquery-textcomplete/compare/033b945...v0.1.0
|
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
# rake js:
|
1
|
+
# rake js:routes
|
2
2
|
|
3
3
|
Generate a ES6 module that contains Rails routes.
|
4
4
|
|
5
5
|
## Description
|
6
6
|
|
7
|
-
This gem provides "js:
|
7
|
+
This gem provides "js:routes" rake task.
|
8
8
|
It generates a ES6 requirable module whith exports url helper functions defined by your Rails application.
|
9
9
|
|
10
10
|
Suppose there are some routes defined:
|
@@ -51,24 +51,24 @@ This gem uses ES6 modules.
|
|
51
51
|
Write all routes to app/assets/javascripts/rails-routes.js:
|
52
52
|
|
53
53
|
```
|
54
|
-
rake js:
|
54
|
+
rake js:routes
|
55
55
|
```
|
56
56
|
|
57
57
|
Write to client/src/rails-routes.js:
|
58
58
|
|
59
59
|
```
|
60
|
-
rake js:
|
60
|
+
rake js:routes path='client/src/rails-routes.js'
|
61
61
|
```
|
62
62
|
|
63
63
|
Generate routes except paths start with "/rails/" or "/sidekiq/":
|
64
64
|
|
65
65
|
```
|
66
|
-
rake js:
|
66
|
+
rake js:routes excludes='^/(rails|sidekiq)/'
|
67
67
|
```
|
68
68
|
Generate routes start with "/articles/" only:
|
69
69
|
|
70
70
|
```
|
71
|
-
rake js:
|
71
|
+
rake js:routes includes='^/articles/'
|
72
72
|
```
|
73
73
|
|
74
74
|
## Install
|
@@ -85,6 +85,6 @@ gem 'js_rails_routes', group: :development
|
|
85
85
|
|
86
86
|
## Author
|
87
87
|
|
88
|
-
[mizchi](https://github.com/mizchi) wrote "js:
|
88
|
+
[mizchi](https://github.com/mizchi) wrote "js:routes" task with referencing [mtrpcic/js-routes](https://github.com/mtrpcic/js-routes).
|
89
89
|
|
90
90
|
[yuku-t](https://yuku-t.com) refactor and improve the mizchi's script and published to rubygems.
|
data/js_rails_routes.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ['Yuku Takahashi']
|
9
9
|
spec.email = ['taka84u9@gmail.com']
|
10
10
|
spec.summary = 'Generate a ES6 module that contains Rails routes.'
|
11
|
-
spec.homepage = 'https://github.com/
|
11
|
+
spec.homepage = 'https://github.com/yuku-t/js_rails_routes'
|
12
12
|
spec.license = 'MIT'
|
13
13
|
spec.files = `git ls-files -z`.split("\x0")
|
14
14
|
spec.require_paths = ['lib']
|
@@ -1,14 +1,12 @@
|
|
1
1
|
desc 'Generate a ES6 module that contains Rails routes'
|
2
2
|
namespace :js do
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
puts "Routes saved to #{path}."
|
12
|
-
end
|
3
|
+
task routes: :environment do |task|
|
4
|
+
path = ENV['path'] || Rails.root.join('app', 'assets', 'javascripts', 'rails-routes.js')
|
5
|
+
generator = JSRailsRoutes::Generator.new(
|
6
|
+
includes: ENV['includes'],
|
7
|
+
excludes: ENV['excludes']
|
8
|
+
)
|
9
|
+
generator.generate(task, path)
|
10
|
+
puts "Routes saved to #{path}."
|
13
11
|
end
|
14
12
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: js_rails_routes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuku Takahashi
|
@@ -60,6 +60,7 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
|
+
- CHANGELOG.md
|
63
64
|
- Gemfile
|
64
65
|
- LICENSE
|
65
66
|
- README.md
|
@@ -70,7 +71,7 @@ files:
|
|
70
71
|
- lib/js_rails_routes/generator.rb
|
71
72
|
- lib/js_rails_routes/version.rb
|
72
73
|
- lib/tasks/js_rails_routes.rake
|
73
|
-
homepage: https://github.com/
|
74
|
+
homepage: https://github.com/yuku-t/js_rails_routes
|
74
75
|
licenses:
|
75
76
|
- MIT
|
76
77
|
metadata: {}
|