schnecke 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf00b01bf00cde122ae9803da93d3cf296cd554817230a9d40bfdedb766f6f95
4
- data.tar.gz: f76bc3bfd995433f6416195896144b866d79e3e55a570ee4040af02104d7d753
3
+ metadata.gz: 28786a7a7e523861149a1268b9aadfaaf2b9c6b7cd847ecd607d82a96a0aa7f7
4
+ data.tar.gz: 0f61c0040c17026e848c2bba36bab60495bd02d28c2b275e952987896258463f
5
5
  SHA512:
6
- metadata.gz: 4b23142e4aca5135edf71a409b07141ea9f99294dcdb6a21f6a57458c060bb9992ebced0a9831153a1ec27a61e4ea53d75803575e56b57838a515bfb6c68e311
7
- data.tar.gz: aa1c74cec0b37a5a8a0be92928a31c0f9358e14db9de1c8f985f41ec03e845f3ada766290249cd17c52e177dcec0f719fac78ade88afbec5af7f35a2b8e0be47
6
+ metadata.gz: 950cabd2c8dc4446bca207d19769247ad954982caf64e2cbb08a9f64b26e75e030896ae1d56aff0ce5d92662e77c37f653134a0c2fb86a5dbcc0cb30f0e78cdc
7
+ data.tar.gz: 7b3b86e4f95acc1d908e6f4fa9308f52026e71ef5d09007880afb2d9df00245fe4363f3ea20f69c3f70e7c782b49dc92adb419d854f6ff8fe40472ec5c66c616
data/.rubocop.yml CHANGED
@@ -16,7 +16,6 @@ AllCops:
16
16
  - 'config/**/*'
17
17
  - 'vendor/**/*'
18
18
  - 'bin/**/*'
19
- - 'node_modules/**/*'
20
19
 
21
20
  Layout/LineLength:
22
21
  Max: 80
@@ -29,8 +28,8 @@ Metrics/AbcSize:
29
28
  Metrics/BlockLength:
30
29
  Max: 40
31
30
  Exclude:
32
- - 'test/**/*'
33
31
  - 'schnecke.gemspec'
32
+ - 'test/**/*'
34
33
 
35
34
  Metrics/ClassLength:
36
35
  Max: 150
data/Gemfile.lock CHANGED
@@ -1,19 +1,19 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- schnecke (0.4.1)
4
+ schnecke (0.4.3)
5
5
  activerecord (> 4.2.0)
6
6
  activesupport (> 4.2.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activemodel (7.0.4)
12
- activesupport (= 7.0.4)
13
- activerecord (7.0.4)
14
- activemodel (= 7.0.4)
15
- activesupport (= 7.0.4)
16
- activesupport (7.0.4)
11
+ activemodel (7.0.4.1)
12
+ activesupport (= 7.0.4.1)
13
+ activerecord (7.0.4.1)
14
+ activemodel (= 7.0.4.1)
15
+ activesupport (= 7.0.4.1)
16
+ activesupport (7.0.4.1)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
18
  i18n (>= 1.6, < 2)
19
19
  minitest (>= 5.1)
@@ -25,48 +25,51 @@ GEM
25
25
  concurrent-ruby (1.1.10)
26
26
  i18n (1.12.0)
27
27
  concurrent-ruby (~> 1.0)
28
- json (2.6.2)
29
- minitest (5.16.3)
28
+ json (2.6.3)
29
+ minitest (5.17.0)
30
30
  parallel (1.22.1)
31
- parser (3.1.2.1)
31
+ parser (3.2.0.0)
32
32
  ast (~> 2.4.1)
33
- rack (3.0.0)
33
+ rack (3.0.4.1)
34
34
  rainbow (3.1.1)
35
35
  rake (12.3.3)
36
- regexp_parser (2.6.0)
36
+ regexp_parser (2.6.2)
37
37
  rexml (3.2.5)
38
- rubocop (1.36.0)
38
+ rubocop (1.43.0)
39
39
  json (~> 2.3)
40
40
  parallel (~> 1.10)
41
- parser (>= 3.1.2.1)
41
+ parser (>= 3.2.0.0)
42
42
  rainbow (>= 2.2.2, < 4.0)
43
43
  regexp_parser (>= 1.8, < 3.0)
44
44
  rexml (>= 3.2.5, < 4.0)
45
- rubocop-ast (>= 1.20.1, < 2.0)
45
+ rubocop-ast (>= 1.24.1, < 2.0)
46
46
  ruby-progressbar (~> 1.7)
47
- unicode-display_width (>= 1.4.0, < 3.0)
48
- rubocop-ast (1.21.0)
47
+ unicode-display_width (>= 2.4.0, < 3.0)
48
+ rubocop-ast (1.24.1)
49
49
  parser (>= 3.1.1.0)
50
- rubocop-minitest (0.22.1)
50
+ rubocop-minitest (0.26.1)
51
51
  rubocop (>= 0.90, < 2.0)
52
- rubocop-performance (1.15.0)
52
+ rubocop-performance (1.15.2)
53
53
  rubocop (>= 1.7.0, < 2.0)
54
54
  rubocop-ast (>= 0.4.0)
55
- rubocop-rails (2.16.1)
55
+ rubocop-rails (2.17.4)
56
56
  activesupport (>= 4.2.0)
57
57
  rack (>= 1.1)
58
58
  rubocop (>= 1.33.0, < 2.0)
59
59
  rubocop-rake (0.6.0)
60
60
  rubocop (~> 1.0)
61
61
  ruby-progressbar (1.11.0)
62
- ruby_audit (2.1.0)
62
+ ruby_audit (2.2.0)
63
63
  bundler-audit (~> 0.9.0)
64
- sqlite3 (1.5.1-x86_64-darwin)
65
- sqlite3 (1.5.1-x86_64-linux)
64
+ sqlite3 (1.6.0-x86_64-darwin)
65
+ sqlite3 (1.6.0-x86_64-linux)
66
+ temping (4.0.0)
67
+ activerecord (>= 5.2, < 7.1)
68
+ activesupport (>= 5.2, < 7.1)
66
69
  thor (1.2.1)
67
70
  tzinfo (2.0.5)
68
71
  concurrent-ruby (~> 1.0)
69
- unicode-display_width (2.3.0)
72
+ unicode-display_width (2.4.2)
70
73
 
71
74
  PLATFORMS
72
75
  x86_64-darwin-21
@@ -86,6 +89,7 @@ DEPENDENCIES
86
89
  ruby_audit
87
90
  schnecke!
88
91
  sqlite3
92
+ temping (~> 4.0)
89
93
 
90
94
  BUNDLED WITH
91
95
  2.3.26
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Schnecke
2
2
 
3
3
  [![CircleCI](https://dl.circleci.com/status-badge/img/gh/prschmid/schnecke/tree/main.svg?style=shield)](https://dl.circleci.com/status-badge/redirect/gh/prschmid/schnecke/tree/main)
4
+ [![Gem Version](https://badge.fury.io/rb/schnecke.svg)](https://badge.fury.io/rb/schnecke)
4
5
 
5
6
  A very simple gem to enable ActiveRecord models to have slugs.
6
7
 
@@ -8,10 +8,10 @@ require 'active_support/concern'
8
8
  module Schnecke
9
9
  extend ActiveSupport::Concern
10
10
 
11
- DEFAULT_SLUG_COLUMN = :slug
12
- DEFAULT_SLUG_SEPARATOR = '-'
13
- DEFAULT_MAX_LENGTH = 32
14
- DEFAULT_REQUIRED_FORMAT = /\A[a-z0-9\-_]+\z/
11
+ SCHNECKE_DEFAULT_SLUG_COLUMN = :slug
12
+ SCHNECKE_DEFAULT_SLUG_SEPARATOR = '-'
13
+ SCHNECKE_DEFAULT_MAX_LENGTH = 32
14
+ SCHNECKE_DEFAULT_REQUIRED_FORMAT = /\A[a-z0-9\-_]+\z/
15
15
 
16
16
  class_methods do
17
17
  # rubocop:disable Metrics/AbcSize
@@ -21,12 +21,14 @@ module Schnecke
21
21
  # Save the configuration
22
22
  self.schnecke_config = {
23
23
  slug_source: source,
24
- slug_column: opts.fetch(:column, DEFAULT_SLUG_COLUMN),
25
- slug_separator: opts.fetch(:separator, DEFAULT_SLUG_SEPARATOR),
26
- limit_length: opts.fetch(:limit_length, DEFAULT_MAX_LENGTH),
24
+ slug_column: opts.fetch(:column, SCHNECKE_DEFAULT_SLUG_COLUMN),
25
+ slug_separator: opts.fetch(:separator, SCHNECKE_DEFAULT_SLUG_SEPARATOR),
26
+ limit_length: opts.fetch(:limit_length, SCHNECKE_DEFAULT_MAX_LENGTH),
27
27
  required: opts.fetch(:required, true),
28
28
  generate_on_blank: opts.fetch(:generate_on_blank, true),
29
- require_format: opts.fetch(:require_format, DEFAULT_REQUIRED_FORMAT),
29
+ require_format: opts.fetch(
30
+ :require_format, SCHNECKE_DEFAULT_REQUIRED_FORMAT
31
+ ),
30
32
  uniqueness: opts.fetch(:uniqueness, {})
31
33
  }
32
34
 
@@ -52,8 +54,8 @@ module Schnecke
52
54
 
53
55
  include InstanceMethods
54
56
  end
57
+ # rubocop:enable Metrics/AbcSize
55
58
  end
56
- # rubocop:enable Metrics/AbcSize
57
59
 
58
60
  # Instance methods to include
59
61
  module InstanceMethods
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Schnecke
4
- VERSION = '0.4.1'
4
+ VERSION = '0.4.3'
5
5
  end
data/schnecke.gemspec CHANGED
@@ -54,6 +54,7 @@ Gem::Specification.new do |spec|
54
54
  spec.add_development_dependency('rubocop-rake', '>= 0')
55
55
  spec.add_development_dependency('ruby_audit', '>= 0')
56
56
  spec.add_development_dependency('sqlite3', '>= 0')
57
+ spec.add_development_dependency('temping', '~> 4.0')
57
58
  spec.add_runtime_dependency('activerecord', '> 4.2.0')
58
59
  spec.add_runtime_dependency('activesupport', '> 4.2.0')
59
60
  spec.metadata['rubygems_mfa_required'] = 'true'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schnecke
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick R. Schmid
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-13 00:00:00.000000000 Z
11
+ date: 2023-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -164,6 +164,20 @@ dependencies:
164
164
  - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: temping
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '4.0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '4.0'
167
181
  - !ruby/object:Gem::Dependency
168
182
  name: activerecord
169
183
  requirement: !ruby/object:Gem::Requirement
@@ -204,7 +218,6 @@ files:
204
218
  - ".rubocop.yml"
205
219
  - ".ruby-gemset"
206
220
  - ".ruby-version"
207
- - ".travis.yml"
208
221
  - Gemfile
209
222
  - Gemfile.lock
210
223
  - LICENSE.txt
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 3.1.3
7
- before_install: gem install bundler -v 2.3.26