webpacker-routes 0.0.9 → 0.0.10

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
  SHA256:
3
- metadata.gz: 8b9e216e412483eea37a5ae199097827d51f4275767afa946a07a7ad920800e9
4
- data.tar.gz: 6375d8519b4af4ff0f5f3674da8c97adab82170e9a1008e5da59b691c38f10d2
3
+ metadata.gz: 347e51b5067401b0315a50953592a477b54ab588ba6405c5b9a281f19bb5abbb
4
+ data.tar.gz: f9aaa63022d82a3758bb3416ffc8888c2d14ee6f1fffd1e30ffcf0fec1bc1719
5
5
  SHA512:
6
- metadata.gz: ccdd5aa3fc3d1a42f683d622cee66219db5d51830ad45dbebe47716a5110186a405ab15de3bc0c1cc5882f98f7b3ff855cb6b25702467d82b9729decfa6c5945
7
- data.tar.gz: d382dd32aadc282089d3d9e8b742e969802bdfb49bb28d7b843c5c1c2946de3c8f9aaa3ef9465bd21ebbf8b0d81bbd3b05a7181406d17bfb2e4ea5a10e919707
6
+ metadata.gz: 853dbe59e91370cc7d699d34d00de2803eb32f9130c72d65e77f772d37b3bd7d1712442c3653fa114b3241bd06cc272de188a50470d2cf7addc3ea5dbef58c6c
7
+ data.tar.gz: ec9ce0004b11fd5af8f0e1cc5fa9b57fb40cef8bee4a489b1a3b4416019836f13c148a9ee6db2003f1570240d6b2be4ee1e8e13df443dd195dc8c86d8ce33b7f
data/README.md CHANGED
@@ -34,11 +34,9 @@ $ bundle exec rails webpacker:routes:generate
34
34
  ## License
35
35
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
36
36
 
37
- ## TODO
37
+ ## Todo
38
38
 
39
- - somehow generate routes automatically in development
40
- - to_prepare?
39
+ - default_url_options (especially host for urls)
41
40
  - support all valid route names
42
- - default_url_options
43
41
  - relative_url_root
44
42
  - camelcase
@@ -1,3 +1,4 @@
1
+ require "webpacker/routes/version"
1
2
  require "webpacker/routes/railtie"
2
3
 
3
4
  module Webpacker
@@ -24,9 +25,9 @@ module Webpacker
24
25
  defaults = route.defaults.except(:controller, :action).to_json
25
26
 
26
27
  file.write(<<-JAVASCRIPT.strip_heredoc)
27
- const #{name} = [#{spec}, #{segment_keys}, #{defaults}]
28
- export const #{name}_url = (...args) => urlFor(#{name}, ...args)
29
- export const #{name}_path = (...args) => pathFor(#{name}, ...args)
28
+ const #{name}_spec = [#{spec}, #{segment_keys}, #{defaults}]
29
+ export const #{name}_url = (...args) => urlFor(#{name}_spec, ...args)
30
+ export const #{name}_path = (...args) => pathFor(#{name}_spec, ...args)
30
31
  JAVASCRIPT
31
32
  end
32
33
  end
@@ -1,5 +1,5 @@
1
1
  module Webpacker
2
2
  module Routes
3
- VERSION = '0.0.9'
3
+ VERSION = '0.0.10'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webpacker-routes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Harsha