simple_slug 0.4.0 → 0.4.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: ac49bba6dff11ad2a2bce99cef0ff717ca35a626fb22c23ef708369b596c57fe
4
- data.tar.gz: eb3955cec13641066e6d15aef572b78491fc8b6c59500658edbd72e05126083d
3
+ metadata.gz: 2dff057c29324340d575bf3a38a209fd070f80d8ba40c4349b32851265c9665b
4
+ data.tar.gz: fa4a2d67b425ddc6b15c16b5848501e55cb1bf1c12e5d79c0db2245e2b5827f5
5
5
  SHA512:
6
- metadata.gz: 961d7deede6a55925d4020f2b09f3e40b86012d3574f5745318a69ea34b952cef7f00b251562832ec053fcc61db52b268f647092f57e934e7278f58a34c8b789
7
- data.tar.gz: dbc20244f3751330ac668edf4a92b381c9c1b2480a924be0b90cf0d37a194703cd6c9833e6cc1d852f8b912b08c815a93c916666660460b780a7cce02ed1341b
6
+ metadata.gz: 8e52cad36ed3de1bee11942bfd140ea708f96ac2072f7128a47e2a977f0bb4a446857ac19dc5610b883e469407c633467e91258397ec5fb131ae8cfaea89cd56
7
+ data.tar.gz: 0a629c5e59e74c8e2ba8288656e9035b12f9f84cc6bfb7af0b2fa44aabc1b14b5c6ff63b8a4c1b13888000b685724d135f052a4f9170f84ed43c006b8b859eea
data/.gitignore CHANGED
@@ -12,6 +12,7 @@ Gemfile.lock
12
12
  InstalledFiles
13
13
  _yardoc
14
14
  coverage
15
+ /bin
15
16
  doc/
16
17
  lib/bundler/man
17
18
  pkg
@@ -71,9 +71,9 @@ module SimpleSlug
71
71
 
72
72
  def normalize(base)
73
73
  parameterize_args = ActiveSupport::VERSION::MAJOR > 4 ? {separator: '-'} : '-'
74
- normalized = I18n.transliterate(base).parameterize(parameterize_args).downcase
74
+ normalized = I18n.transliterate(base).parameterize(**parameterize_args).downcase
75
75
  normalized = "_#{normalized}" if normalized =~ SimpleSlug::STARTS_WITH_NUMBER_REGEXP
76
- normalized = normalized.first(options[:max_length]) if options[:max_length]
76
+ normalized = normalized[0..options[:max_length].pred] if options[:max_length]
77
77
  normalized
78
78
  end
79
79
 
@@ -1,3 +1,3 @@
1
1
  module SimpleSlug
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  end
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.add_dependency 'activerecord', '>= 4.0.0', '< 6.1'
21
21
  spec.add_dependency 'i18n', '~> 0.7'
22
22
 
23
- spec.add_development_dependency 'bundler', '~> 1.5'
23
+ spec.add_development_dependency 'bundler'
24
24
  spec.add_development_dependency 'rake'
25
25
  spec.add_development_dependency 'rspec'
26
26
  spec.add_development_dependency 'sqlite3'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_slug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Leschenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-03 00:00:00.000000000 Z
11
+ date: 2020-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -48,16 +48,16 @@ dependencies:
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - "~>"
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: '1.5'
53
+ version: '0'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - "~>"
58
+ - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: '1.5'
60
+ version: '0'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rake
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  requirements: []
147
- rubygems_version: 3.0.6
147
+ rubygems_version: 3.1.2
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: Friendly url generator with history.