route_translator 13.1.0 → 13.1.1

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: 773a40298cd3819de8d7801f3ae31b0dc5fcb4c3db65f809570adb1ae0a25e7e
4
- data.tar.gz: 9176264924cade856a3c1e2e6b811bb744ca132f4382a377afb45aa4dd79061c
3
+ metadata.gz: 13ffed7aec8713246cd7e9866e95b58a74aa96ffb3d633abcb709577a82d3eb4
4
+ data.tar.gz: 917888bdb81c4b9f6f191e2855526b5a674d258b18204f31ed3b47d01eb5c14b
5
5
  SHA512:
6
- metadata.gz: d20204dae597c1d97111bf3f75d2079dd027bd71f8c36918d65be770daed4c5eb695d7802977b0650d9bd394861e93b5293d512f6dbc29d3e766ad9619ce5145
7
- data.tar.gz: 87155014e01709f6418964b4278b699b2009371e03c69eb6b75d0ac32f1d579a6f415f3437fb77b08b0044fb954aefcb02e03cfe2f387b703fe9a94d40f38729
6
+ metadata.gz: 3d98eea935387e378734dea58b0483b1640d9b0680578c037be317dca02e5d187a4e11002c450114d4adb9c98433ad9777c6c38692c9c1e1768988ca32bffc61
7
+ data.tar.gz: ad9b23bddd7838864b73a3cbf53f222046ba82f649586f21223407fbe173bc0400c1c4c91f24305da9b7d932bc7475b7612b6112e4bbd35a2938490cfe65ace7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 13.1.1 / 2023-07-01
4
+
5
+ * [ENHANCEMENT] Better integration with ActionController::TestCase
6
+ * [ENHANCEMENT] Remove Rails 5.1 code
7
+ * [ENHANCEMENT] Update development dependencies
8
+
3
9
  ## 13.1.0 / 2022-12-26
4
10
 
5
11
  * [ENHANCEMENT] Test against Ruby 3.1 and Ruby 3.2
@@ -3,17 +3,9 @@
3
3
  module RouteTranslator
4
4
  module Translator
5
5
  module RouteHelpers
6
- class << self
7
- private
8
-
9
- def add_helpers_to_test_cases(helper_container)
10
- %w[ActionController ActionMailer ActionView].each do |klass_name|
11
- next unless Module.const_defined?(klass_name)
12
-
13
- klass_name.constantize::TestCase.__send__(:include, helper_container)
14
- end
15
- end
16
- end
6
+ TEST_CASE_HOOKS = %i[
7
+ action_controller_test_case action_mailer_test_case action_view_test_case
8
+ ].freeze
17
9
 
18
10
  module_function
19
11
 
@@ -27,15 +19,19 @@ module RouteTranslator
27
19
 
28
20
  %w[path url].each do |suffix|
29
21
  helper_container = named_route_collection.send(:"#{suffix}_helpers_module")
30
- new_helper_name = "#{old_name}_#{suffix}"
22
+ new_helper_name = :"#{old_name}_#{suffix}"
31
23
 
32
- helper_list.push(new_helper_name.to_sym) unless helper_list.include?(new_helper_name.to_sym)
24
+ helper_list.push(new_helper_name) unless helper_list.include?(new_helper_name)
33
25
 
34
26
  helper_container.__send__(:define_method, new_helper_name) do |*args|
35
27
  __send__(Translator.route_name_for(args, old_name, suffix, self), *args)
36
28
  end
37
29
 
38
- add_helpers_to_test_cases(helper_container) if ENV.fetch('RAILS_ENV', nil) == 'test'
30
+ TEST_CASE_HOOKS.each do |test_case_hook|
31
+ ActiveSupport.on_load(test_case_hook) do
32
+ include helper_container
33
+ end
34
+ end
39
35
  end
40
36
  end
41
37
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RouteTranslator
4
- VERSION = '13.1.0'
4
+ VERSION = '13.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: route_translator
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.1.0
4
+ version: 13.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geremia Taglialatela
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-12-26 00:00:00.000000000 Z
13
+ date: 2023-07-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: actionpack
@@ -52,110 +52,6 @@ dependencies:
52
52
  - - "<"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '7.1'
55
- - !ruby/object:Gem::Dependency
56
- name: appraisal
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '2.4'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '2.4'
69
- - !ruby/object:Gem::Dependency
70
- name: byebug
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '11.1'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '11.1'
83
- - !ruby/object:Gem::Dependency
84
- name: minitest
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '5.16'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '5.16'
97
- - !ruby/object:Gem::Dependency
98
- name: rails
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '5.2'
104
- - - "<"
105
- - !ruby/object:Gem::Version
106
- version: '7.1'
107
- type: :development
108
- prerelease: false
109
- version_requirements: !ruby/object:Gem::Requirement
110
- requirements:
111
- - - ">="
112
- - !ruby/object:Gem::Version
113
- version: '5.2'
114
- - - "<"
115
- - !ruby/object:Gem::Version
116
- version: '7.1'
117
- - !ruby/object:Gem::Dependency
118
- name: rake
119
- requirement: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - "~>"
122
- - !ruby/object:Gem::Version
123
- version: '13.0'
124
- type: :development
125
- prerelease: false
126
- version_requirements: !ruby/object:Gem::Requirement
127
- requirements:
128
- - - "~>"
129
- - !ruby/object:Gem::Version
130
- version: '13.0'
131
- - !ruby/object:Gem::Dependency
132
- name: simplecov
133
- requirement: !ruby/object:Gem::Requirement
134
- requirements:
135
- - - "~>"
136
- - !ruby/object:Gem::Version
137
- version: 0.22.0
138
- type: :development
139
- prerelease: false
140
- version_requirements: !ruby/object:Gem::Requirement
141
- requirements:
142
- - - "~>"
143
- - !ruby/object:Gem::Version
144
- version: 0.22.0
145
- - !ruby/object:Gem::Dependency
146
- name: simplecov-lcov
147
- requirement: !ruby/object:Gem::Requirement
148
- requirements:
149
- - - "~>"
150
- - !ruby/object:Gem::Version
151
- version: 0.8.0
152
- type: :development
153
- prerelease: false
154
- version_requirements: !ruby/object:Gem::Requirement
155
- requirements:
156
- - - "~>"
157
- - !ruby/object:Gem::Version
158
- version: 0.8.0
159
55
  description: Translates the Rails routes of your application into the languages defined
160
56
  in your locale files
161
57
  email:
@@ -204,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
100
  - !ruby/object:Gem::Version
205
101
  version: '0'
206
102
  requirements: []
207
- rubygems_version: 3.2.33
103
+ rubygems_version: 3.0.9
208
104
  signing_key:
209
105
  specification_version: 4
210
106
  summary: Translate your Rails routes in a simple manner