friendly_id-mobility 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +4 -0
- data/Gemfile +3 -1
- data/Gemfile.lock +75 -66
- data/README.md +1 -1
- data/lib/friendly_id/mobility.rb +9 -11
- data/lib/friendly_id/mobility/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5b9dc85b6c90a5b80039281fc5215b8c42f0866c5a9e498b575973ea3b65e5c9
|
4
|
+
data.tar.gz: bb492b5e1d921a9aa298a1779111af13d2521a25b7a2de763b0600fc23c6ec14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a5a28fc2171ab3d3d72c8b9c5903a178bdc91045d2a8bed119909c04045ee91f191643f7427b93744417a40d6e207f111969eb3b641281ca2cb1670d556a98b
|
7
|
+
data.tar.gz: 72ce38757353f93559053412771f0d8825921f00ae5c1fb4ccb428af2c7bee9cd1ba708147eb23816a4c7d6b3eee0fb8acbedfd79936032bb3bedd775b28fef3
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -10,8 +10,10 @@ group :development, :test do
|
|
10
10
|
|
11
11
|
if ENV['RAILS_VERSION'] == '5.1'
|
12
12
|
gem 'rails', '>= 5.1', '< 5.2'
|
13
|
-
|
13
|
+
elsif ENV['RAILS_VERSION'] == '5.0'
|
14
14
|
gem 'rails', '>= 5.0', '< 5.1'
|
15
|
+
else
|
16
|
+
gem 'rails', '>= 5.2.0.rc2', '< 5.3'
|
15
17
|
end
|
16
18
|
|
17
19
|
gem 'pry'
|
data/Gemfile.lock
CHANGED
@@ -1,122 +1,131 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
friendly_id-mobility (0.5.
|
4
|
+
friendly_id-mobility (0.5.3)
|
5
5
|
friendly_id (>= 5.0.0, <= 5.3.0)
|
6
|
-
mobility (>= 0.
|
6
|
+
mobility (>= 0.5.1, < 1.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actioncable (5.0.
|
12
|
-
actionpack (= 5.0.
|
13
|
-
nio4r (
|
14
|
-
websocket-driver (
|
15
|
-
actionmailer (5.0.
|
16
|
-
actionpack (= 5.0.
|
17
|
-
actionview (= 5.0.
|
18
|
-
activejob (= 5.0.
|
11
|
+
actioncable (5.2.0.rc2)
|
12
|
+
actionpack (= 5.2.0.rc2)
|
13
|
+
nio4r (~> 2.0)
|
14
|
+
websocket-driver (>= 0.6.1)
|
15
|
+
actionmailer (5.2.0.rc2)
|
16
|
+
actionpack (= 5.2.0.rc2)
|
17
|
+
actionview (= 5.2.0.rc2)
|
18
|
+
activejob (= 5.2.0.rc2)
|
19
19
|
mail (~> 2.5, >= 2.5.4)
|
20
20
|
rails-dom-testing (~> 2.0)
|
21
|
-
actionpack (5.0.
|
22
|
-
actionview (= 5.0.
|
23
|
-
activesupport (= 5.0.
|
21
|
+
actionpack (5.2.0.rc2)
|
22
|
+
actionview (= 5.2.0.rc2)
|
23
|
+
activesupport (= 5.2.0.rc2)
|
24
24
|
rack (~> 2.0)
|
25
|
-
rack-test (
|
25
|
+
rack-test (>= 0.6.3)
|
26
26
|
rails-dom-testing (~> 2.0)
|
27
27
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
28
|
-
actionview (5.0.
|
29
|
-
activesupport (= 5.0.
|
28
|
+
actionview (5.2.0.rc2)
|
29
|
+
activesupport (= 5.2.0.rc2)
|
30
30
|
builder (~> 3.1)
|
31
|
-
|
31
|
+
erubi (~> 1.4)
|
32
32
|
rails-dom-testing (~> 2.0)
|
33
33
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
34
|
-
activejob (5.0.
|
35
|
-
activesupport (= 5.0.
|
34
|
+
activejob (5.2.0.rc2)
|
35
|
+
activesupport (= 5.2.0.rc2)
|
36
36
|
globalid (>= 0.3.6)
|
37
|
-
activemodel (5.0.
|
38
|
-
activesupport (= 5.0.
|
39
|
-
activerecord (5.0.
|
40
|
-
activemodel (= 5.0.
|
41
|
-
activesupport (= 5.0.
|
42
|
-
arel (
|
43
|
-
|
37
|
+
activemodel (5.2.0.rc2)
|
38
|
+
activesupport (= 5.2.0.rc2)
|
39
|
+
activerecord (5.2.0.rc2)
|
40
|
+
activemodel (= 5.2.0.rc2)
|
41
|
+
activesupport (= 5.2.0.rc2)
|
42
|
+
arel (>= 9.0)
|
43
|
+
activestorage (5.2.0.rc2)
|
44
|
+
actionpack (= 5.2.0.rc2)
|
45
|
+
activerecord (= 5.2.0.rc2)
|
46
|
+
marcel (~> 0.3.1)
|
47
|
+
activesupport (5.2.0.rc2)
|
44
48
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
45
|
-
i18n (
|
49
|
+
i18n (>= 0.7, < 2)
|
46
50
|
minitest (~> 5.1)
|
47
51
|
tzinfo (~> 1.1)
|
48
|
-
arel (
|
52
|
+
arel (9.0.0)
|
49
53
|
builder (3.2.3)
|
50
|
-
byebug (
|
54
|
+
byebug (10.0.1)
|
51
55
|
coderay (1.1.2)
|
52
56
|
concurrent-ruby (1.0.5)
|
53
57
|
crass (1.0.3)
|
54
58
|
database_cleaner (1.6.2)
|
55
59
|
diff-lcs (1.3)
|
56
|
-
|
57
|
-
friendly_id (5.2.
|
60
|
+
erubi (1.7.1)
|
61
|
+
friendly_id (5.2.4)
|
58
62
|
activerecord (>= 4.0.0)
|
59
63
|
generator_spec (0.9.4)
|
60
64
|
activesupport (>= 3.0.0)
|
61
65
|
railties (>= 3.0.0)
|
62
66
|
globalid (0.4.1)
|
63
67
|
activesupport (>= 4.2.0)
|
64
|
-
i18n (0.
|
68
|
+
i18n (1.0.1)
|
65
69
|
concurrent-ruby (~> 1.0)
|
66
|
-
loofah (2.
|
70
|
+
loofah (2.2.2)
|
67
71
|
crass (~> 1.0.2)
|
68
72
|
nokogiri (>= 1.5.9)
|
69
73
|
mail (2.7.0)
|
70
74
|
mini_mime (>= 0.1.1)
|
75
|
+
marcel (0.3.2)
|
76
|
+
mimemagic (~> 0.3.2)
|
71
77
|
method_source (0.9.0)
|
78
|
+
mimemagic (0.3.2)
|
72
79
|
mini_mime (1.0.0)
|
73
80
|
mini_portile2 (2.3.0)
|
74
|
-
minitest (5.
|
75
|
-
mobility (0.
|
76
|
-
i18n (>= 0.6.10, <
|
81
|
+
minitest (5.11.3)
|
82
|
+
mobility (0.5.1)
|
83
|
+
i18n (>= 0.6.10, < 1.1)
|
77
84
|
request_store (~> 1.0)
|
78
|
-
nio4r (2.
|
79
|
-
nokogiri (1.8.
|
85
|
+
nio4r (2.3.0)
|
86
|
+
nokogiri (1.8.2)
|
80
87
|
mini_portile2 (~> 2.3.0)
|
81
88
|
pry (0.11.3)
|
82
89
|
coderay (~> 1.1.0)
|
83
90
|
method_source (~> 0.9.0)
|
84
|
-
pry-byebug (3.
|
85
|
-
byebug (~>
|
91
|
+
pry-byebug (3.6.0)
|
92
|
+
byebug (~> 10.0)
|
86
93
|
pry (~> 0.10)
|
87
|
-
rack (2.0.
|
88
|
-
rack-test (0.
|
89
|
-
rack (>= 1.0)
|
90
|
-
rails (5.0.
|
91
|
-
actioncable (= 5.0.
|
92
|
-
actionmailer (= 5.0.
|
93
|
-
actionpack (= 5.0.
|
94
|
-
actionview (= 5.0.
|
95
|
-
activejob (= 5.0.
|
96
|
-
activemodel (= 5.0.
|
97
|
-
activerecord (= 5.0.
|
98
|
-
|
94
|
+
rack (2.0.4)
|
95
|
+
rack-test (1.0.0)
|
96
|
+
rack (>= 1.0, < 3)
|
97
|
+
rails (5.2.0.rc2)
|
98
|
+
actioncable (= 5.2.0.rc2)
|
99
|
+
actionmailer (= 5.2.0.rc2)
|
100
|
+
actionpack (= 5.2.0.rc2)
|
101
|
+
actionview (= 5.2.0.rc2)
|
102
|
+
activejob (= 5.2.0.rc2)
|
103
|
+
activemodel (= 5.2.0.rc2)
|
104
|
+
activerecord (= 5.2.0.rc2)
|
105
|
+
activestorage (= 5.2.0.rc2)
|
106
|
+
activesupport (= 5.2.0.rc2)
|
99
107
|
bundler (>= 1.3.0)
|
100
|
-
railties (= 5.0.
|
108
|
+
railties (= 5.2.0.rc2)
|
101
109
|
sprockets-rails (>= 2.0.0)
|
102
110
|
rails-dom-testing (2.0.3)
|
103
111
|
activesupport (>= 4.2.0)
|
104
112
|
nokogiri (>= 1.6)
|
105
|
-
rails-html-sanitizer (1.0.
|
106
|
-
loofah (~> 2.
|
107
|
-
railties (5.0.
|
108
|
-
actionpack (= 5.0.
|
109
|
-
activesupport (= 5.0.
|
113
|
+
rails-html-sanitizer (1.0.4)
|
114
|
+
loofah (~> 2.2, >= 2.2.2)
|
115
|
+
railties (5.2.0.rc2)
|
116
|
+
actionpack (= 5.2.0.rc2)
|
117
|
+
activesupport (= 5.2.0.rc2)
|
110
118
|
method_source
|
111
119
|
rake (>= 0.8.7)
|
112
120
|
thor (>= 0.18.1, < 2.0)
|
113
|
-
rake (12.3.
|
114
|
-
request_store (1.
|
121
|
+
rake (12.3.1)
|
122
|
+
request_store (1.4.1)
|
123
|
+
rack (>= 1.4)
|
115
124
|
rspec (3.7.0)
|
116
125
|
rspec-core (~> 3.7.0)
|
117
126
|
rspec-expectations (~> 3.7.0)
|
118
127
|
rspec-mocks (~> 3.7.0)
|
119
|
-
rspec-core (3.7.
|
128
|
+
rspec-core (3.7.1)
|
120
129
|
rspec-support (~> 3.7.0)
|
121
130
|
rspec-expectations (3.7.0)
|
122
131
|
diff-lcs (>= 1.2.0, < 2.0)
|
@@ -124,7 +133,7 @@ GEM
|
|
124
133
|
rspec-mocks (3.7.0)
|
125
134
|
diff-lcs (>= 1.2.0, < 2.0)
|
126
135
|
rspec-support (~> 3.7.0)
|
127
|
-
rspec-support (3.7.
|
136
|
+
rspec-support (3.7.1)
|
128
137
|
sprockets (3.7.1)
|
129
138
|
concurrent-ruby (~> 1.0)
|
130
139
|
rack (> 1, < 3)
|
@@ -135,9 +144,9 @@ GEM
|
|
135
144
|
sqlite3 (1.3.13)
|
136
145
|
thor (0.20.0)
|
137
146
|
thread_safe (0.3.6)
|
138
|
-
tzinfo (1.2.
|
147
|
+
tzinfo (1.2.5)
|
139
148
|
thread_safe (~> 0.1)
|
140
|
-
websocket-driver (0.
|
149
|
+
websocket-driver (0.7.0)
|
141
150
|
websocket-extensions (>= 0.1.0)
|
142
151
|
websocket-extensions (0.1.3)
|
143
152
|
|
@@ -151,10 +160,10 @@ DEPENDENCIES
|
|
151
160
|
generator_spec (~> 0.9.3)
|
152
161
|
pry
|
153
162
|
pry-byebug
|
154
|
-
rails (>= 5.0, < 5.
|
163
|
+
rails (>= 5.2.0.rc2, < 5.3)
|
155
164
|
rake
|
156
165
|
rspec (~> 3.0)
|
157
166
|
sqlite3
|
158
167
|
|
159
168
|
BUNDLED WITH
|
160
|
-
1.16.
|
169
|
+
1.16.1
|
data/README.md
CHANGED
data/lib/friendly_id/mobility.rb
CHANGED
@@ -46,21 +46,19 @@ module FriendlyId
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def should_generate_new_friendly_id?
|
49
|
-
send(friendly_id_config.slug_column).nil?
|
49
|
+
send(friendly_id_config.slug_column, locale: ::Mobility.locale).nil?
|
50
50
|
end
|
51
51
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
::Mobility.with_locale(locale) { super }
|
60
|
-
end
|
52
|
+
def set_slug(normalized_slug = nil)
|
53
|
+
super
|
54
|
+
changed.each do |change|
|
55
|
+
if change =~ /\A(?:#{friendly_id_config.base}|#{friendly_id_config.slug_column})_([a-z]{2}(_[a-z]{2})?)/
|
56
|
+
locale, suffix = $1.split('_'.freeze)
|
57
|
+
locale = "#{locale}-#{suffix.upcase}".freeze if suffix
|
58
|
+
::Mobility.with_locale(locale) { super }
|
61
59
|
end
|
62
60
|
end
|
63
|
-
end
|
61
|
+
end
|
64
62
|
|
65
63
|
module FinderMethods
|
66
64
|
include ::FriendlyId::History::FinderMethods
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: friendly_id-mobility
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Salzberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mobility
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.5.1
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '1.0'
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.5.1
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '1.0'
|
@@ -166,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
166
|
version: '0'
|
167
167
|
requirements: []
|
168
168
|
rubyforge_project:
|
169
|
-
rubygems_version: 2.6
|
169
|
+
rubygems_version: 2.7.6
|
170
170
|
signing_key:
|
171
171
|
specification_version: 4
|
172
172
|
summary: Translate your FriendlyId slugs with Mobility.
|