restful_routing 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/restful_routing/version.rb +1 -1
- data/lib/restful_routing.rb +5 -3
- data/restful_routing-1.0.1.gem +0 -0
- 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: 192d6ed6764afadba42dc459209360fef12e8a9f
|
4
|
+
data.tar.gz: 57b5fb2869058ca2246d97f5a40e00c9fd4f40d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e95b66816af715af7a627eebe964f1acd2681ae636f201e9b487ef9d2e9f7f423ae67194d3ccd6c9316d14c00715f6c5c9205388ae16278ce52d25af952976c5
|
7
|
+
data.tar.gz: 64d622b3c1b2db5b2ca14a22aff2bcf3801f19d5eba37c54f6aff20da754947dd48850786f20c0c34a10a3e5b6322e5935955446108ec34366c2d62532407186
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# RestfulRouting
|
2
2
|
|
3
|
-
While developing Rails apps, it is often difficult to remember which prefixes route to which controller#action. That is why it is useful to run `
|
3
|
+
While developing Rails apps, it is often difficult to remember which prefixes route to which controller#action. That is why it is useful to run `rails routes` and put that output in a file for later reference. This gem does that for you.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -20,11 +20,11 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
While developing Rails apps, it is often difficult to remember which prefixes route to which controller#action. That is why it is useful to run `
|
23
|
+
While developing Rails apps, it is often difficult to remember which prefixes route to which controller#action. That is why it is useful to run `rails routes` and put that output in a file for later reference. This gem does that for you.
|
24
24
|
|
25
25
|
After installing the gem in your Rails project, it is listening for saved changes in your `config/routes.rb`. Every time you make a change to routes.rb and you save it, restful_routing will look for `restful_routing.rb` in your root directory. It will update it if there or make it if not.
|
26
26
|
|
27
|
-
`restful_routing.rb` will contain the output of `
|
27
|
+
`restful_routing.rb` will contain the output of `rails routes`.
|
28
28
|
|
29
29
|
|
30
30
|
## Development
|
data/lib/restful_routing.rb
CHANGED
@@ -4,11 +4,13 @@ require 'listen'
|
|
4
4
|
module RestfulRouting
|
5
5
|
base_path = Dir.pwd
|
6
6
|
listening_to = base_path + '/config'
|
7
|
+
|
7
8
|
listener = Listen.to(listening_to, only: /routes\.rb$/) do |modified, added, removed|
|
8
|
-
#run `
|
9
|
+
#run `rails routes` and put the output in a file called
|
9
10
|
#restful_routing.rb
|
10
|
-
|
11
|
-
|
11
|
+
File.open(base_path + '/restful_routing.rb', 'w') do |f|
|
12
|
+
f.write `rails routes`
|
13
|
+
end
|
12
14
|
end
|
13
15
|
listener.start # not blocking
|
14
16
|
end
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restful_routing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Casey Stinnett
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -83,6 +83,7 @@ files:
|
|
83
83
|
- restful_routing-0.1.3.3.gem
|
84
84
|
- restful_routing-0.1.3.4.gem
|
85
85
|
- restful_routing-0.1.3.gem
|
86
|
+
- restful_routing-1.0.1.gem
|
86
87
|
- restful_routing-1.0.gem
|
87
88
|
- restful_routing.gemspec
|
88
89
|
homepage: https://github.com/casey-stinnett/restful_routing
|