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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9589a48a441ced2882874ee7f5baa30a430959b3
4
- data.tar.gz: 5043b86fc5a1f7fef5bbd5e4879a7c685a58f883
3
+ metadata.gz: 192d6ed6764afadba42dc459209360fef12e8a9f
4
+ data.tar.gz: 57b5fb2869058ca2246d97f5a40e00c9fd4f40d8
5
5
  SHA512:
6
- metadata.gz: b16108ed63f24fa4e9f1a5e8059a95d61f061fac398dfe457431155b822c9ded540fa0132a00e5ee8adfc4fbb17d339fcb060d3fa51aab32310626e1650619c8
7
- data.tar.gz: 24b24602dec91ddeaba72776e77d46f8f006cd55e20af8e745ed961060428b3e3f9b0868f8877b2128e238add3e914445904aae558ca070ee96a9f4c2b86e2bf
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 `rake routes` (or `rails routes` in Rails 5) and put that output in a file for later reference. This gem does that for you.
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 `rake routes` (or `rails routes` in Rails 5) and put that output in a file for later reference. This gem does that for you.
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 `rake routes` or `rails routes`.
27
+ `restful_routing.rb` will contain the output of `rails routes`.
28
28
 
29
29
 
30
30
  ## Development
@@ -1,3 +1,3 @@
1
1
  module RestfulRouting
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -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 `rake routes` and put the output in a file called
9
+ #run `rails routes` and put the output in a file called
9
10
  #restful_routing.rb
10
- cmd = "rake routes > #{base_path}/restful_routing.rb"
11
- `#{cmd}`
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.1
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-09 00:00:00.000000000 Z
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