js_from_routes 2.0.6 → 2.1.0

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: 9053499de4df17e1ef042b1b54e4c172ab8ab94b2c0c353e6b8035efa8d3c0e5
4
- data.tar.gz: 6fc5926dfcf3b0f94bde9c7176af31522c36bf206d6636563415143655414c3e
3
+ metadata.gz: 76c20abede0e361ea0907779c21b1edf48fd14cf3ba4c61415429ff05f3f7efc
4
+ data.tar.gz: 9964e215fdb7d8fae34e324cec5337cfb8652e91abd03c3c1b4d0cca24975d56
5
5
  SHA512:
6
- metadata.gz: 30c30f206f148dcb9ca5dac38f4f5eb07d0b6d49f5ca4c87dd4e358a3b7af12ce1fe0750cb0554c91c0655c2cadcaf6ad47438a35b9ee9678eaf3cf4945ba2d5
7
- data.tar.gz: 2515d4737e9202d93e99b3f573f43667d2beea1dc61a2fafdabf2a3752478e36289fd742649fe55396185604b3ff8b04d0742048e6d8ec7ef7530627107e0931
6
+ metadata.gz: '048cc9f879bff7597995b4c13d450e89f026f73c70b00b829db5aa315b5c073e3e5b62b01a0db4626a74ddf72ca54cf8643e15b98fd6e210800b465a49767c07'
7
+ data.tar.gz: 8b967177b0b3030e0928dd89125980d481ba1d13a5dc35984f0c7664c0a12ed7367d9aa87ab1cf754f348a825d0b843246d2f8eac237b2099b2f2c6ba4e1771b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ # [2.1.0](https://github.com/ElMassimo/js_from_routes/compare/js_from_routes@2.0.6...js_from_routes@2.1.0) (2023-02-07)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * use relative paths in auto-generated files ([#36](https://github.com/ElMassimo/js_from_routes/issues/36)) ([0440c50](https://github.com/ElMassimo/js_from_routes/commit/0440c505b1b4d3cca6c390004234faacd10b9480)), closes [#35](https://github.com/ElMassimo/js_from_routes/issues/35)
7
+
8
+
9
+
1
10
  ## [2.0.6](https://github.com/ElMassimo/js_from_routes/compare/js_from_routes@2.0.5...js_from_routes@2.0.6) (2022-05-25)
2
11
 
3
12
 
@@ -37,7 +37,7 @@ module JsFromRoutes
37
37
 
38
38
  # Public: Name of the JS file with helpers for the the given controller.
39
39
  def import_filename
40
- @config.output_folder.basename.join((basename.split(".")[0]).to_s)
40
+ filename.relative_path_from(@config.output_folder).to_s.sub(/\.\w+$/, "")
41
41
  end
42
42
 
43
43
  # Public: Name of the file as a valid JS variable.
@@ -1,5 +1,5 @@
1
1
  //
2
2
  // DO NOT MODIFY: This file was automatically generated by JsFromRoutes.
3
3
  <% helpers.each do |helper| %>
4
- export { default as <%= helper.js_name %> } from '~/<%= helper.import_filename %>'
4
+ export { default as <%= helper.js_name %> } from './<%= helper.import_filename %>'
5
5
  <% end %>
@@ -1,5 +1,5 @@
1
1
  //
2
2
  // DO NOT MODIFY: This file was automatically generated by JsFromRoutes.
3
- import * as helpers from '~/api/all'
4
- export * from '~/api/all'
3
+ import * as helpers from './all'
4
+ export * from './all'
5
5
  export default helpers
@@ -4,5 +4,5 @@
4
4
  # Generates one file per controller, and one function per route.
5
5
  module JsFromRoutes
6
6
  # Public: This library adheres to semantic versioning.
7
- VERSION = "2.0.6"
7
+ VERSION = "2.1.0"
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: js_from_routes
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Máximo Mussini
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-25 00:00:00.000000000 Z
11
+ date: 2023-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties