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 +4 -4
- data/.gitignore +1 -0
- data/lib/simple_slug/adapter.rb +2 -2
- data/lib/simple_slug/version.rb +1 -1
- data/simple_slug.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2dff057c29324340d575bf3a38a209fd070f80d8ba40c4349b32851265c9665b
|
4
|
+
data.tar.gz: fa4a2d67b425ddc6b15c16b5848501e55cb1bf1c12e5d79c0db2245e2b5827f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e52cad36ed3de1bee11942bfd140ea708f96ac2072f7128a47e2a977f0bb4a446857ac19dc5610b883e469407c633467e91258397ec5fb131ae8cfaea89cd56
|
7
|
+
data.tar.gz: 0a629c5e59e74c8e2ba8288656e9035b12f9f84cc6bfb7af0b2fa44aabc1b14b5c6ff63b8a4c1b13888000b685724d135f052a4f9170f84ed43c006b8b859eea
|
data/.gitignore
CHANGED
data/lib/simple_slug/adapter.rb
CHANGED
@@ -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
|
76
|
+
normalized = normalized[0..options[:max_length].pred] if options[:max_length]
|
77
77
|
normalized
|
78
78
|
end
|
79
79
|
|
data/lib/simple_slug/version.rb
CHANGED
data/simple_slug.gemspec
CHANGED
@@ -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'
|
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.
|
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-
|
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: '
|
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: '
|
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.
|
147
|
+
rubygems_version: 3.1.2
|
148
148
|
signing_key:
|
149
149
|
specification_version: 4
|
150
150
|
summary: Friendly url generator with history.
|