active_permalink 0.5.1 → 0.5.2

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: be401b8e143b37ed86609377d304c2123954f3b3fb07d005b2829db47e714d3d
4
- data.tar.gz: 326c9fb0412cab533ed34195d5132bea543098ee1ba3b51012ac9f7631fde426
3
+ metadata.gz: 5fa20c1f3b8d87d139d4a4dd071f4eaf254e920f9c548d8972bee1d039d50447
4
+ data.tar.gz: fcfc097109ae5c2a061d248047d3afce7846281caca1af726531d957b8ce19a6
5
5
  SHA512:
6
- metadata.gz: '06038cce4e52ead75b2b2fcbc53ff838a60a83110bb0366ae8cfcdf9543bda607eaf0feffb3efeb4acd03d3f791236c3350ddbbf6e2326f712d614a5f4b67369'
7
- data.tar.gz: e01a3c90ec4470102603e2bc6ac63f6df3c8a32197b90150c61ebb28a892bb8aeceac89aca146b01745227a4af8de3c44ce273a5011178fb361477feb20206b7
6
+ metadata.gz: 983b44808444eac00eec9208294601a8dd354e63ea2fe301b1ac6e18e704923d323dab9cb9a04ac1a0ae4ef3d799bdba1cd475083fe82e6b6362853b57e6ea69
7
+ data.tar.gz: 73f7a8cf127e57656898024e6f6c9f80b7111a1d32a347cfc585ad3dd41327482f428cc826e7dd8c77557298cf8124d7cd196c3d36136389c90bbfdfc2a3a9a9
@@ -1,4 +1,4 @@
1
- require 'stringex_lite'
1
+ require 'any_ascii'
2
2
 
3
3
  module ActivePermalink
4
4
  class Generator
@@ -91,7 +91,10 @@ module ActivePermalink
91
91
  def slug_from_column
92
92
  @slug_from_column ||= begin
93
93
  value = @new_value.presence || @record.send(@field)
94
- value.to_s.to_url
94
+ return if value.blank?
95
+
96
+ value = AnyAscii.transliterate(value)
97
+ value.parameterize
95
98
  end
96
99
  end
97
100
 
@@ -1,3 +1,3 @@
1
1
  module ActivePermalink
2
- VERSION = '0.5.1'
2
+ VERSION = '0.5.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_permalink
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonian Guveli
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-10 00:00:00.000000000 Z
11
+ date: 2020-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -45,19 +45,19 @@ dependencies:
45
45
  - !ruby/object:Gem::Version
46
46
  version: '1.0'
47
47
  - !ruby/object:Gem::Dependency
48
- name: stringex
48
+ name: any_ascii
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '2.0'
53
+ version: '0.1'
54
54
  type: :runtime
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: '2.0'
60
+ version: '0.1'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: bundler
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -127,7 +127,7 @@ homepage: https://github.com/hardpixel/active-permalink
127
127
  licenses:
128
128
  - MIT
129
129
  metadata: {}
130
- post_install_message:
130
+ post_install_message:
131
131
  rdoc_options: []
132
132
  require_paths:
133
133
  - lib
@@ -142,8 +142,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  - !ruby/object:Gem::Version
143
143
  version: '0'
144
144
  requirements: []
145
- rubygems_version: 3.1.2
146
- signing_key:
145
+ rubygems_version: 3.1.4
146
+ signing_key:
147
147
  specification_version: 4
148
148
  summary: Add permalinks to ActiveRecord models
149
149
  test_files: []