roda-i18n 0.5.0 → 0.6.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: 5c59dec3caf930c42ea639d9d803cd1f96351f4e26de874031d46376ca047b38
4
- data.tar.gz: 39970d149489f36de80048d86c2451d74922ffee54a6df8459b3e278d5bd43d1
3
+ metadata.gz: 299cfc297f403c8b9d9c40dad750ddfbc2a868ffea9b8f8f6a2dbb8e39d88c50
4
+ data.tar.gz: b7581d6db878fb686b04383587dea2dee374ed86ab5b7a8d630ca71d8360796f
5
5
  SHA512:
6
- metadata.gz: ae7c28fff45a8bd38ec31b89843132c1a6fd8c09f248078589f7249d8f5b26e5b32b6a8a2843f3a67bd2c919f14cac25c32fda1c7fd064b208774c735e2c9e5a
7
- data.tar.gz: ed1d0c3bd35f808b89e88c02fac1a3c626d40bb5235a6fa3c540cd893938e749d471c735ce70f2a782a485d067fa640763bc5d4b22d34b59be228b3faee498e6
6
+ metadata.gz: d228be9cfef332c4de8c8a8e83dc0401c0f9c361a612f417da1e8af239092c77399af7dc7fd721788f9ca1494f631c70ac7280355321bfd99e9231b3de7fa03c
7
+ data.tar.gz: 79bd150bdd0e4642326a1807274f4586e597558867bd0c539c59fe82c30a10f70f5f818736d34dd4cdaca7799ee2290f21c0e3fb0c14587335198f3ed3221fad
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
@@ -8,4 +7,5 @@
8
7
  /spec/reports/
9
8
  /tmp/
10
9
 
11
- .tool-versions
10
+ .tool-versions
11
+ .devcontainer/
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## next (unreleased)
4
4
 
5
+ * your changes here
6
+
7
+ ## 0.5.0 (unreleased)
8
+
5
9
  * Merge pull request #5 from simonneutert/bump-dependencies - Add/Bump dependencies, minimum Ruby version to 3.0.0
6
10
 
7
11
  * __Breaking Changes:__
@@ -73,7 +77,6 @@
73
77
  * Update development dependency `rake` to `12.3`
74
78
  * Remove noop check for exception
75
79
 
76
-
77
80
  ## 0.3.0 (2016-08-11)
78
81
 
79
82
  * Merged PR #3 by @jonduarte - Making routes behind #locale block work
@@ -84,15 +87,13 @@
84
87
 
85
88
  * Add alias for rake test
86
89
 
87
-
88
90
  ## 0.2.0 (2015-11-24)
89
91
 
90
92
  * Mainly internal build and setup improvements
91
93
 
92
-
93
94
  ## 0.1.0 (2015-09-13)
94
95
 
95
96
  * Initial public release
96
97
 
97
98
  * Big Thank You to @jeremyevans for his assistance in creating this initial version.
98
-
99
+
data/Gemfile CHANGED
@@ -6,12 +6,11 @@ source 'https://rubygems.org'
6
6
  gemspec
7
7
 
8
8
  gem 'bundler', '~> 2.5'
9
- gem 'erubis'
9
+ gem 'erubi'
10
10
  gem 'kramdown'
11
11
  gem 'minitest', '~> 5.7', '>= 5.7.0'
12
12
  gem 'minitest-hooks', '~> 1.1', '>= 1.1.0'
13
13
  gem 'minitest-rg'
14
- gem 'nokogiri'
15
14
  gem 'rack-test', '~> 2.1'
16
15
  gem 'rake', '~> 13.2'
17
16
  gem 'rubocop'
data/Gemfile.lock ADDED
@@ -0,0 +1,104 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ roda-i18n (0.6.0)
5
+ date
6
+ r18n-core (~> 5)
7
+ roda (~> 3.8)
8
+ tilt
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ ast (2.4.2)
14
+ date (3.3.4)
15
+ date (3.3.4-java)
16
+ docile (1.4.1)
17
+ erubi (1.13.0)
18
+ json (2.7.2)
19
+ json (2.7.2-java)
20
+ kramdown (2.4.0)
21
+ rexml
22
+ language_server-protocol (3.17.0.3)
23
+ minitest (5.25.1)
24
+ minitest-hooks (1.5.2)
25
+ minitest (> 5.3)
26
+ minitest-rg (5.3.0)
27
+ minitest (~> 5.0)
28
+ parallel (1.26.3)
29
+ parser (3.3.5.0)
30
+ ast (~> 2.4.1)
31
+ racc
32
+ r18n-core (5.0.1)
33
+ racc (1.8.1)
34
+ racc (1.8.1-java)
35
+ rack (3.1.7)
36
+ rack-test (2.1.0)
37
+ rack (>= 1.3)
38
+ rainbow (3.1.1)
39
+ rake (13.2.1)
40
+ regexp_parser (2.9.2)
41
+ rexml (3.3.7)
42
+ roda (3.83.0)
43
+ rack
44
+ rubocop (1.66.1)
45
+ json (~> 2.3)
46
+ language_server-protocol (>= 3.17.0)
47
+ parallel (~> 1.10)
48
+ parser (>= 3.3.0.2)
49
+ rainbow (>= 2.2.2, < 4.0)
50
+ regexp_parser (>= 2.4, < 3.0)
51
+ rubocop-ast (>= 1.32.2, < 2.0)
52
+ ruby-progressbar (~> 1.7)
53
+ unicode-display_width (>= 2.4.0, < 3.0)
54
+ rubocop-ast (1.32.3)
55
+ parser (>= 3.3.1.0)
56
+ rubocop-minitest (0.36.0)
57
+ rubocop (>= 1.61, < 2.0)
58
+ rubocop-ast (>= 1.31.1, < 2.0)
59
+ rubocop-performance (1.21.1)
60
+ rubocop (>= 1.48.1, < 2.0)
61
+ rubocop-ast (>= 1.31.1, < 2.0)
62
+ rubocop-rake (0.6.0)
63
+ rubocop (~> 1.0)
64
+ ruby-progressbar (1.13.0)
65
+ simplecov (0.22.0)
66
+ docile (~> 1.1)
67
+ simplecov-html (~> 0.11)
68
+ simplecov_json_formatter (~> 0.1)
69
+ simplecov-html (0.13.1)
70
+ simplecov_json_formatter (0.1.4)
71
+ tilt (2.4.0)
72
+ unicode-display_width (2.5.0)
73
+
74
+ PLATFORMS
75
+ aarch64-linux
76
+ arm-linux
77
+ arm64-darwin
78
+ java
79
+ ruby
80
+ universal-java-17
81
+ universal-java-22
82
+ x64-mingw32
83
+ x86-linux
84
+ x86_64-darwin
85
+ x86_64-linux
86
+
87
+ DEPENDENCIES
88
+ bundler (~> 2.5)
89
+ erubi
90
+ kramdown
91
+ minitest (~> 5.7, >= 5.7.0)
92
+ minitest-hooks (~> 1.1, >= 1.1.0)
93
+ minitest-rg
94
+ rack-test (~> 2.1)
95
+ rake (~> 13.2)
96
+ roda-i18n!
97
+ rubocop
98
+ rubocop-minitest
99
+ rubocop-performance
100
+ rubocop-rake
101
+ simplecov
102
+
103
+ BUNDLED WITH
104
+ 2.5.18
data/README.md CHANGED
@@ -1,50 +1,39 @@
1
1
  # Roda-i18n
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/roda-i18n.svg)](https://badge.fury.io/rb/roda-i18n) [![Build Status](https://travis-ci.org/kematzy/roda-i18n.svg?branch=master)](https://travis-ci.org/kematzy/roda-i18n)
3
+ [![Gem Version](https://badge.fury.io/rb/roda-i18n.svg)](https://badge.fury.io/rb/roda-i18n) [![Ruby](https://github.com/kematzy/roda-i18n/actions/workflows/ruby.yml/badge.svg)](https://github.com/kematzy/roda-i18n/actions/workflows/ruby.yml)
4
4
 
5
5
 
6
- Add Internationalisation (i18n) and localisation support to your [Roda](http://roda.jeremyevans.net/)
7
- apps, based upon the [R18n](https://github.com/ai/r18n) gem.
6
+ Add Internationalisation (i18n) and localisation support to your [Roda](http://roda.jeremyevans.net/) apps, based upon the [R18n](https://github.com/ai/r18n) gem.
8
7
 
9
- Extensively tested and with 100% code test coverage.
8
+ Extensively tested and with a goal of 100% code test coverage.
10
9
 
11
10
 
12
11
  ## Installation
13
12
 
14
- To use this gem, just do
13
+ To install this gem:
15
14
 
16
15
  ```bash
17
- $ (sudo) gem install roda-i18n
16
+ $ gem install roda-i18n
18
17
  ```
19
18
 
20
- or if you use Bundler
19
+ Or if you use Bundler, add this to your Gemfile:
21
20
 
22
21
  ```ruby
23
22
  gem 'roda-i18n'
24
23
  ```
25
24
 
26
- <br>
27
-
28
-
29
25
  ## Getting Started
30
26
 
31
- To add internationalisation and localisation support to your app just add the following code snippet
32
- in your app.
27
+ To add internationalisation and localisation support to your app just add the following code snippet in your app.
33
28
 
34
29
  ```ruby
35
30
  plugin :i18n
36
31
  ```
37
32
 
38
- By default the default locale is set to `'en'` and the translations directory is set to the `'i18n'`
39
- directory in the root of your app, ie: `'/path/2/app/i18n'`.
40
-
33
+ By default the default locale is set to `'en'` and the translations directory is set to the `'i18n'` directory in the root of your app, ie: `'/path/2/app/i18n'`.
41
34
 
42
- **IMPORTANT! Make sure you create the 'i18n' folder and add an `'en.yml'` file with at least one
43
- translation within it.**
44
35
 
45
-
46
- <br>
47
- ---
36
+ **IMPORTANT! Make sure you create the 'i18n' folder and add an `'en.yml'` file with at least one translation within it.**
48
37
 
49
38
 
50
39
  ## Configuration
@@ -59,36 +48,26 @@ plugin :i18n, :locale => ['de'], :translations => ['absolute/path/2/i18n']
59
48
 
60
49
  **NOTE!**
61
50
 
62
- 1. You must set `opts[:root]` in your app if you do not define the `:translations` path during
63
- plugin configuration.
64
-
65
- 2. When overriding `:translations` the **any path(s) given must be absolute**.
51
+ 1. You must set `opts[:root]` in your app if you do not define the `:translations` path during plugin configuration.
66
52
 
53
+ 2. When overriding `:translations`, then **any path(s) given must be absolute**.
67
54
 
68
55
  #### Loading translations from multiple i18n directories
69
56
 
70
- The `:translations` path supports 'wildcards', ie: `path/**/i18n` so you can load translations from
71
- multiple combined apps, each with their own `i18n` folder with translations.
57
+ The `:translations` path supports 'wildcards', ie: `path/**/i18n` so you can load translations from multiple combined apps, each with their own `i18n` folder with translations.
72
58
 
73
59
  **Please Note!**
74
60
 
75
- When loading translations from multiple sources and the same translation key is available in
76
- multiple files of the same locale, then **the translations in the first loaded translation file
77
- takes precedence over subsequent loaded translations**.
61
+ When loading translations from multiple sources and the same translation key is available in multiple files of the same locale, then **the translations in the first loaded translation file takes precedence over subsequent loaded translations**.
78
62
 
79
63
  * ie: translations in `./i18n/en.yml` takes precedence over translations in `./apps/app1/i18n/en.yml`
80
64
 
81
-
82
65
  You can also set a list of preferred locales as an array ordered by priority.
83
66
 
84
67
  ```ruby
85
68
  plugin :i18n, :locale => ['es','fr','en']
86
69
  ```
87
70
 
88
-
89
- <br>
90
- ---
91
-
92
71
  ## USAGE
93
72
 
94
73
  The **i18n** plugin depends upon simple YAML based translations files:
@@ -122,7 +101,6 @@ l Time.now, :human #=> "now"
122
101
  l Time.now, :full #=> "3rd of January, 2010 18:54"
123
102
  ```
124
103
 
125
-
126
104
  Both the `:t` and `:l` methods are available within the route and template (erb) scopes. ie:
127
105
 
128
106
  ```ruby
@@ -138,24 +116,18 @@ end
138
116
  <snip...>
139
117
  ```
140
118
 
141
- Please visit [R18n](https://github.com/ai/r18n/tree/master/r18n-core) for more information about the
119
+ Please visit [R18n-Core](https://github.com/ai/r18n/tree/master/r18n-core) for more information about the
142
120
  R18n gem used to create the above.
143
121
 
144
- <br>
145
- ---
146
-
147
122
  ## Key Methods / Functionality
148
123
 
149
-
150
- <br>
151
-
124
+ This plugin brings some methods and functionalities you can setup in your Roda project.
152
125
 
153
126
  ### `#locale(opts = {}, &blk)` - (request method)
154
127
 
155
128
  This request method makes it easy to handle translations based upon the **`:locale` prefix on a
156
129
  route / URL**. ie: `blog.com/**de**/posts`.
157
130
 
158
-
159
131
  To enable this, just use the following code structure:
160
132
 
161
133
  ```ruby
@@ -174,14 +146,7 @@ route do |r|
174
146
  end
175
147
  ```
176
148
 
177
-
178
-
179
- **NOTE!** Any URL / request with a non-present or not supported locale will be given the
180
- **configured default locale** or the EN (English) default locale.
181
-
182
-
183
- <br>
184
-
149
+ **NOTE!** Any URL / request with a non-present or not supported locale will be given the **configured default locale** or the EN (English) default locale.
185
150
 
186
151
  ### `#i18n_set_locale_from(type)` - (request method)
187
152
 
@@ -210,10 +175,6 @@ end
210
175
 
211
176
  **NOTE!** defaults to the configured default locale, or English, if the given locale type is invalid.
212
177
 
213
-
214
- <br>
215
-
216
-
217
178
  ### `i18n_set_locale(locale, &blk)` - (request method)
218
179
 
219
180
  Enables overriding the default locale and setting a temporary `:locale` within a route block.
@@ -235,27 +196,16 @@ route do |r|
235
196
  end
236
197
  ```
237
198
 
238
- <br>
239
- ---
240
-
241
199
  ## InstanceMethods
242
200
 
243
201
  ### `#t`
244
202
 
245
203
  This is the main translation output method. (See examples above)
246
204
 
247
-
248
- <br>
249
-
250
-
251
205
  ### `#l`
252
206
 
253
207
  Key localisation method. Handles dates etc. (See examples above)
254
208
 
255
-
256
- <br>
257
-
258
-
259
209
  ### `#i18n_available_locales`
260
210
 
261
211
  Returns a two-dimensional array of available locales.
@@ -264,30 +214,18 @@ Returns a two-dimensional array of available locales.
264
214
  puts i18n_available_locales #=> [ ['en', 'English'], ...]
265
215
  ```
266
216
 
267
-
268
-
269
217
  ### `#i18n_default_places`
270
218
 
271
-
272
- <br>
273
-
274
-
275
219
  ## Class Methods
276
220
 
277
221
  ### `#i18n_opts()`
278
222
 
279
223
  Return the i18n options for this class as a Hash.
280
224
 
281
-
282
- <br>
283
- ---
284
-
285
-
286
225
  ## Ideas
287
226
 
288
227
  A few ideas that may be outlandish, but possible?
289
228
 
290
-
291
229
  ### Ability to load translations from multiple locations via an array.
292
230
 
293
231
  ```ruby
@@ -301,17 +239,10 @@ plugin :i18n, :translations => ['app1/i18n', 'app2/i18n', 'app3/i18n']
301
239
  > R18n.default_places = [MyLoader.new, DBLoader.new, 'path/to/yaml']
302
240
  >
303
241
 
304
-
305
242
  ### Sequel DBLoader for DB based translations support
306
243
 
307
244
  Some form of built-in support for storing / loading translations from a Sequel based DB.
308
245
 
309
-
310
- <br>
311
-
312
-
313
- ----
314
-
315
246
  ## TODOs
316
247
 
317
248
  * Add better tests for Multiple Apps scenarios.
@@ -324,11 +255,9 @@ Some form of built-in support for storing / loading translations from a Sequel b
324
255
 
325
256
  * ...and some more stuff that slipped my mind right now.
326
257
 
327
-
328
258
  ## Credits
329
259
 
330
- * This plugin has been inspired by the `sinatra-i18n` gem available at
331
- [github/ai/r18n](http://github.com/ai/r18n) created by [Andrey Sitnik](http://github.com/ai).
260
+ * This plugin has been inspired by the `sinatra-i18n` gem available at [github/ai/r18n](http://github.com/ai/r18n) created by [Andrey Sitnik](http://github.com/ai).
332
261
 
333
262
  * Testing code has been partly copied from [Forme](https://github.com/jeremyevans/forme).
334
263
 
@@ -348,4 +277,4 @@ Some form of built-in support for storing / loading translations from a Sequel b
348
277
 
349
278
  MIT
350
279
 
351
- Copyright: 2015 - 2024 Kematzy
280
+ Copyright: 2015 - 2024 Kematzy
data/RELEASING.md ADDED
@@ -0,0 +1,7 @@
1
+ # RubyGems Release Process
2
+
3
+ 1. Update/Check the version number in the gemspec file.
4
+ 2. Check the [CHANGELOG](CHANGELOG.md) for all contributions since the last release.
5
+ 3. Update the [README](README.md) in case of any changes.
6
+ 4. Run `bundle install` to update the Gemfile.lock file.
7
+ 5. Run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
data/Rakefile CHANGED
@@ -12,7 +12,7 @@ Rake::TestTask.new(:spec) do |t|
12
12
  t.test_files = FileList['spec/**/*_spec.rb']
13
13
  end
14
14
 
15
- task default: %i[rubocop spec]
15
+ task default: %i[rubocop coverage]
16
16
 
17
17
  desc 'alias for spec task'
18
18
  task test: :spec
@@ -2,6 +2,6 @@
2
2
 
3
3
  class Roda
4
4
  module I18n
5
- VERSION = '0.5.0'
5
+ VERSION = '0.6.0'
6
6
  end
7
7
  end
@@ -152,8 +152,9 @@ class Roda
152
152
  # it is somehow nil or an empty string ' '
153
153
  opts[:default_locale] = 'en' if opts[:default_locale].nil? || opts[:default_locale] =~ /^\s*$/
154
154
  ::R18n::I18n.default = opts[:default_locale]
155
-
156
- ::R18n.clear_cache! if ENV['RACK_ENV'] != 'production'
155
+ # :nocov:
156
+ ::R18n.clear_cache! if ENV['RACK_ENV'] != 'production' # nocov for simple one-liner
157
+ # :nocov:
157
158
  i18n = R18n::I18n.new(
158
159
  opts[:locale],
159
160
  ::R18n.default_places,
@@ -212,7 +213,10 @@ class Roda
212
213
  when :session
213
214
  loc = session[:locale] if session[:locale]
214
215
  when :params
216
+ # :nocov:
217
+ # loc will be nil, and caught after the `case` statement
215
218
  loc = scope.request.params['locale'] if scope.request.params['locale']
219
+ # :nocov:
216
220
  when :ENV
217
221
  # ENV['LANG']="en_US.UTF-8"
218
222
  loc = ENV['LANG'].split('.').first if ENV['LANG']
@@ -246,17 +250,16 @@ class Roda
246
250
  # end
247
251
  #
248
252
  def i18n_set_locale(locale)
249
- locale = ::R18n::I18n.default.to_s if locale.nil?
253
+ sanitized_locale = i18n_set_locale_with_fallback(locale)
250
254
 
251
255
  i18n = ::R18n::I18n.new(
252
- locale,
256
+ sanitized_locale,
253
257
  ::R18n.default_places,
254
258
  off_filters: :untranslated,
255
259
  on_filters: :untranslated_html
256
260
  )
257
261
  ::R18n.set(i18n)
258
262
  yield if block_given?
259
- # return # NB!! needed to enable routes below to work
260
263
  end
261
264
 
262
265
  # Match only paths that contain one available locale from the ::R18n.available_locales
@@ -291,11 +294,20 @@ class Roda
291
294
  on(_match_available_locales_only, opts) do |l|
292
295
  loc = l || Roda.opts[:locale]
293
296
  ::R18n.set(loc)
294
- yield loc if block_given?
297
+ # :nocov:
298
+ yield loc if block_given? # nothing will happen without a block
295
299
  return # NB!! needed to enable routes below to work
300
+ # :nocov:
296
301
  end
297
302
  end
298
303
  alias i18n_locale locale
304
+
305
+ # Sets a fallback for locale => I18n.default
306
+ def i18n_set_locale_with_fallback(locale)
307
+ return ::R18n::I18n.default.to_s if locale.nil?
308
+
309
+ locale
310
+ end
299
311
  end
300
312
 
301
313
  module ClassMethods
data/roda-i18n.gemspec CHANGED
@@ -23,7 +23,10 @@ Gem::Specification.new do |spec|
23
23
  # raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
24
24
  # end
25
25
 
26
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
27
+ f.match(%r{^(test|spec|features|.github|.devcontainer)/}) ||
28
+ f.match(/^(Dockerfile|.tool-versions|justfile|.rubocop)/)
29
+ end
27
30
  spec.bindir = 'exe'
28
31
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
32
  spec.require_paths = ['lib']
@@ -36,7 +39,7 @@ Gem::Specification.new do |spec|
36
39
  spec.required_ruby_version = '>= 3.0.0'
37
40
 
38
41
  spec.add_dependency 'date'
39
- spec.add_dependency 'r18n-core', '~> 5.0'
42
+ spec.add_dependency 'r18n-core', '~> 5'
40
43
  spec.add_dependency 'roda', '~> 3.8'
41
44
  spec.add_dependency 'tilt'
42
45
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roda-i18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kematzy
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '5.0'
33
+ version: '5'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '5.0'
40
+ version: '5'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: roda
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -76,16 +76,13 @@ extra_rdoc_files:
76
76
  - README.md
77
77
  - MIT-LICENSE
78
78
  files:
79
- - ".github/dependabot.yml"
80
- - ".github/workflows/ruby.yml"
81
79
  - ".gitignore"
82
- - ".rubocop.yml"
83
- - ".rubocop_todo.yml"
84
- - ".travis.yml"
85
80
  - CHANGELOG.md
86
81
  - Gemfile
82
+ - Gemfile.lock
87
83
  - MIT-LICENSE
88
84
  - README.md
85
+ - RELEASING.md
89
86
  - Rakefile
90
87
  - lib/roda/i18n.rb
91
88
  - lib/roda/i18n/version.rb
@@ -118,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
115
  - !ruby/object:Gem::Version
119
116
  version: '0'
120
117
  requirements: []
121
- rubygems_version: 3.5.11
118
+ rubygems_version: 3.5.16
122
119
  signing_key:
123
120
  specification_version: 4
124
121
  summary: Roda Internationalisation plugin
@@ -1,24 +0,0 @@
1
- # To get started with Dependabot version updates, you'll need to specify which
2
- # package ecosystems to update and where the package manifests are located.
3
- # Please see the documentation for all configuration options:
4
- # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
-
6
- version: 2
7
- updates:
8
- - package-ecosystem: "github-actions"
9
- directory: "/"
10
- schedule:
11
- interval: "weekly"
12
- day: "saturday"
13
- time: "21:45"
14
- timezone: "Europe/Berlin"
15
- - package-ecosystem: "bundler" # See documentation for possible values
16
- directory: "/" # Location of package manifests
17
- groups:
18
- patch-and-minor-dependencies:
19
- update-types: ["patch", "minor"]
20
- schedule:
21
- interval: "weekly"
22
- day: "saturday"
23
- time: "21:45"
24
- timezone: "Europe/Berlin"
@@ -1,37 +0,0 @@
1
- # This workflow uses actions that are not certified by GitHub.
2
- # They are provided by a third-party and are governed by
3
- # separate terms of service, privacy policy, and support
4
- # documentation.
5
-
6
- # GitHub recommends pinning actions to a commit SHA.
7
- # To get a newer version, you will need to update the SHA.
8
- # You can also reference a tag or branch, but the action may change without warning.
9
-
10
- name: Ruby
11
-
12
- on:
13
- pull_request:
14
- branches: [master]
15
-
16
- jobs:
17
- lint_and_test:
18
- env:
19
- RACK_ENV: test
20
- strategy:
21
- fail-fast: false
22
- matrix:
23
- # os: [ubuntu-latest, macos-latest]
24
- os: [ubuntu-latest]
25
- ruby: ["3.0", "3.1", "3.2", "3.3"]
26
- runs-on: ${{ matrix.os }}
27
- timeout-minutes: 2
28
-
29
- steps:
30
- - uses: actions/checkout@v4
31
- - name: Set up Ruby
32
- uses: ruby/setup-ruby@v1
33
- with:
34
- ruby-version: ${{ matrix.ruby }}
35
- bundler-cache: true
36
- - name: Run rake (lint and test)
37
- run: bundle exec rake
data/.rubocop.yml DELETED
@@ -1,30 +0,0 @@
1
- inherit_from: .rubocop_todo.yml
2
-
3
- require:
4
- - rubocop-rake
5
- - rubocop-performance
6
- - rubocop-minitest
7
-
8
- # The behavior of RuboCop can be controlled via the .rubocop.yml
9
- # configuration file. It makes it possible to enable/disable
10
- # certain cops (checks) and to alter their behavior if they accept
11
- # any parameters. The file can be placed either in your home
12
- # directory or in some project directory.
13
- #
14
- # RuboCop will start looking for the configuration file in the directory
15
- # where the inspected file is and continue its way up to the root directory.
16
- #
17
- # See https://docs.rubocop.org/rubocop/configuration
18
-
19
- AllCops:
20
- NewCops: enable
21
-
22
- Layout/LineLength:
23
- Exclude:
24
- - "roda-i18n.gemspec"
25
-
26
- Style/Documentation:
27
- Exclude:
28
- - 'spec/**/*'
29
- - 'test/**/*'
30
- - 'lib/roda/plugins/i18n.rb'
data/.rubocop_todo.yml DELETED
@@ -1,34 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2024-09-09 20:36:04 UTC using RuboCop version 1.66.1.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 4
10
- # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
11
- Metrics/AbcSize:
12
- Max: 39
13
-
14
- # Offense count: 15
15
- # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
16
- # AllowedMethods: refine
17
- Metrics/BlockLength:
18
- Max: 639
19
-
20
- # Offense count: 2
21
- # Configuration parameters: CountComments, CountAsOne.
22
- Metrics/ClassLength:
23
- Max: 641
24
-
25
- # Offense count: 1
26
- # Configuration parameters: AllowedMethods, AllowedPatterns.
27
- Metrics/CyclomaticComplexity:
28
- Max: 9
29
-
30
- # Offense count: 8
31
- # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
32
- Metrics/MethodLength:
33
- Max: 22
34
-
data/.travis.yml DELETED
@@ -1,11 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2.2
4
- - 2.3.0
5
- # - jruby
6
- # - rbx-2
7
- before_install:
8
- - gem install bundler -v 1.12.5
9
-
10
- # uncomment and edit the following line if your project needs to run something other than `rake`:
11
- # script: bundle exec rspec spec