friendly_id-mobility 0.5.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +25 -2
- data/Gemfile +5 -5
- data/Gemfile.lock +126 -102
- data/README.md +12 -15
- data/lib/friendly_id/mobility.rb +16 -13
- data/lib/friendly_id/mobility/version.rb +1 -1
- metadata +17 -34
- data/CODE_OF_CONDUCT.md +0 -49
- data/Guardfile +0 -70
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8631996fc6f35ac9a0193d962340155a41330cf38a9c37c138751cacbc0c517a
|
4
|
+
data.tar.gz: 82c9e22712b10071bc48ab22f64a6bb09fb3d26ae72fe01a3eba11198209a403
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20b386b46a51f52abd8b0ad59238f0a48cb0cfdb0b37094ee641f2c8ee7eb530a8b27ee2101cb9ef224e9413bbb28749b496d990ca09fcc76e6ac25ae775268b
|
7
|
+
data.tar.gz: 07f84df28620aa0c52fc3868de6fba523806262fde0f2dea1b0f560758c39e1c4276dbaf9378c2a734a039cc3c5ee27420119cb0d972417c92f9286844a32364
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,33 @@
|
|
1
1
|
# FriendlyId Mobility Changelog
|
2
2
|
|
3
|
-
## 0
|
3
|
+
## 1.0
|
4
|
+
|
5
|
+
### 1.0.0
|
6
|
+
|
7
|
+
* Release 1.0.0, compatible with Mobility 1.0
|
8
|
+
([#23](https://github.com/shioyama/friendly_id-mobility/pull/23))
|
9
|
+
|
10
|
+
## 0.5
|
11
|
+
|
12
|
+
### 0.5.5
|
13
|
+
* Bump friendly_id dependency version to 5.4.0
|
14
|
+
([#19](https://github.com/shioyama/friendly_id-mobility/pull/19/files))
|
4
15
|
|
5
|
-
### 0.5.
|
16
|
+
### 0.5.4
|
17
|
+
* Generate all translated slugs when model is saved
|
18
|
+
([#12](https://github.com/shioyama/friendly_id-mobility/pull/12))
|
19
|
+
|
20
|
+
### 0.5.3
|
21
|
+
* Update gemspec to allow all Mobility versions < 1.0
|
22
|
+
|
23
|
+
### 0.5.2
|
24
|
+
* Emit warning when mobility is enabled with finders add-on
|
25
|
+
|
26
|
+
### 0.5.1
|
6
27
|
* Update Mobility dependency to >= 0.3, < 0.4
|
7
28
|
|
29
|
+
## 0.4
|
30
|
+
|
8
31
|
### 0.4.0
|
9
32
|
* Update Mobility dependency to 0.2.x
|
10
33
|
|
data/Gemfile
CHANGED
@@ -6,14 +6,14 @@ gemspec
|
|
6
6
|
group :development, :test do
|
7
7
|
gem 'rake'
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
if ENV['RAILS_VERSION'] == '5.1'
|
12
|
-
gem 'rails', '>= 5.1', '< 5.2'
|
9
|
+
if ENV['RAILS_VERSION'] && ENV['RAILS_VERSION'] < '5.2'
|
10
|
+
gem 'sqlite3', '~> 1.3.13'
|
13
11
|
else
|
14
|
-
gem '
|
12
|
+
gem 'sqlite3'
|
15
13
|
end
|
16
14
|
|
15
|
+
gem 'rails', "~> #{ENV['RAILS_VERSION'] || '6.0'}.0"
|
16
|
+
|
17
17
|
gem 'pry'
|
18
18
|
gem 'pry-byebug'
|
19
19
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,160 +1,184 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
friendly_id-mobility (0.5.
|
5
|
-
friendly_id (>= 5.0.0, <= 5.
|
6
|
-
mobility (>= 0.
|
4
|
+
friendly_id-mobility (0.5.5)
|
5
|
+
friendly_id (>= 5.0.0, <= 5.4.0)
|
6
|
+
mobility (>= 0.5.1, < 1.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actioncable (
|
12
|
-
actionpack (=
|
13
|
-
nio4r (
|
14
|
-
websocket-driver (
|
15
|
-
|
16
|
-
actionpack (=
|
17
|
-
|
18
|
-
|
11
|
+
actioncable (6.0.3.4)
|
12
|
+
actionpack (= 6.0.3.4)
|
13
|
+
nio4r (~> 2.0)
|
14
|
+
websocket-driver (>= 0.6.1)
|
15
|
+
actionmailbox (6.0.3.4)
|
16
|
+
actionpack (= 6.0.3.4)
|
17
|
+
activejob (= 6.0.3.4)
|
18
|
+
activerecord (= 6.0.3.4)
|
19
|
+
activestorage (= 6.0.3.4)
|
20
|
+
activesupport (= 6.0.3.4)
|
21
|
+
mail (>= 2.7.1)
|
22
|
+
actionmailer (6.0.3.4)
|
23
|
+
actionpack (= 6.0.3.4)
|
24
|
+
actionview (= 6.0.3.4)
|
25
|
+
activejob (= 6.0.3.4)
|
19
26
|
mail (~> 2.5, >= 2.5.4)
|
20
27
|
rails-dom-testing (~> 2.0)
|
21
|
-
actionpack (
|
22
|
-
actionview (=
|
23
|
-
activesupport (=
|
24
|
-
rack (~> 2.0)
|
25
|
-
rack-test (
|
28
|
+
actionpack (6.0.3.4)
|
29
|
+
actionview (= 6.0.3.4)
|
30
|
+
activesupport (= 6.0.3.4)
|
31
|
+
rack (~> 2.0, >= 2.0.8)
|
32
|
+
rack-test (>= 0.6.3)
|
26
33
|
rails-dom-testing (~> 2.0)
|
27
|
-
rails-html-sanitizer (~> 1.0, >= 1.0
|
28
|
-
|
29
|
-
|
34
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
35
|
+
actiontext (6.0.3.4)
|
36
|
+
actionpack (= 6.0.3.4)
|
37
|
+
activerecord (= 6.0.3.4)
|
38
|
+
activestorage (= 6.0.3.4)
|
39
|
+
activesupport (= 6.0.3.4)
|
40
|
+
nokogiri (>= 1.8.5)
|
41
|
+
actionview (6.0.3.4)
|
42
|
+
activesupport (= 6.0.3.4)
|
30
43
|
builder (~> 3.1)
|
31
|
-
|
44
|
+
erubi (~> 1.4)
|
32
45
|
rails-dom-testing (~> 2.0)
|
33
|
-
rails-html-sanitizer (~> 1.
|
34
|
-
activejob (
|
35
|
-
activesupport (=
|
46
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
47
|
+
activejob (6.0.3.4)
|
48
|
+
activesupport (= 6.0.3.4)
|
36
49
|
globalid (>= 0.3.6)
|
37
|
-
activemodel (
|
38
|
-
activesupport (=
|
39
|
-
activerecord (
|
40
|
-
activemodel (=
|
41
|
-
activesupport (=
|
42
|
-
|
43
|
-
|
50
|
+
activemodel (6.0.3.4)
|
51
|
+
activesupport (= 6.0.3.4)
|
52
|
+
activerecord (6.0.3.4)
|
53
|
+
activemodel (= 6.0.3.4)
|
54
|
+
activesupport (= 6.0.3.4)
|
55
|
+
activestorage (6.0.3.4)
|
56
|
+
actionpack (= 6.0.3.4)
|
57
|
+
activejob (= 6.0.3.4)
|
58
|
+
activerecord (= 6.0.3.4)
|
59
|
+
marcel (~> 0.3.1)
|
60
|
+
activesupport (6.0.3.4)
|
44
61
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
45
|
-
i18n (
|
62
|
+
i18n (>= 0.7, < 2)
|
46
63
|
minitest (~> 5.1)
|
47
64
|
tzinfo (~> 1.1)
|
48
|
-
|
49
|
-
builder (3.2.
|
50
|
-
byebug (
|
51
|
-
coderay (1.1.
|
52
|
-
concurrent-ruby (1.
|
53
|
-
crass (1.0.
|
54
|
-
database_cleaner (1.
|
55
|
-
diff-lcs (1.
|
56
|
-
|
57
|
-
friendly_id (5.
|
65
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
66
|
+
builder (3.2.4)
|
67
|
+
byebug (11.1.3)
|
68
|
+
coderay (1.1.3)
|
69
|
+
concurrent-ruby (1.1.7)
|
70
|
+
crass (1.0.6)
|
71
|
+
database_cleaner (1.8.5)
|
72
|
+
diff-lcs (1.4.4)
|
73
|
+
erubi (1.10.0)
|
74
|
+
friendly_id (5.4.0)
|
58
75
|
activerecord (>= 4.0.0)
|
59
76
|
generator_spec (0.9.4)
|
60
77
|
activesupport (>= 3.0.0)
|
61
78
|
railties (>= 3.0.0)
|
62
|
-
globalid (0.4.
|
79
|
+
globalid (0.4.2)
|
63
80
|
activesupport (>= 4.2.0)
|
64
|
-
i18n (
|
81
|
+
i18n (1.8.5)
|
65
82
|
concurrent-ruby (~> 1.0)
|
66
|
-
loofah (2.
|
83
|
+
loofah (2.8.0)
|
67
84
|
crass (~> 1.0.2)
|
68
85
|
nokogiri (>= 1.5.9)
|
69
|
-
mail (2.7.
|
86
|
+
mail (2.7.1)
|
70
87
|
mini_mime (>= 0.1.1)
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
88
|
+
marcel (0.3.3)
|
89
|
+
mimemagic (~> 0.3.2)
|
90
|
+
method_source (1.0.0)
|
91
|
+
mimemagic (0.3.5)
|
92
|
+
mini_mime (1.0.2)
|
93
|
+
mini_portile2 (2.4.0)
|
94
|
+
minitest (5.14.2)
|
95
|
+
mobility (0.8.13)
|
96
|
+
i18n (>= 0.6.10, < 2)
|
77
97
|
request_store (~> 1.0)
|
78
|
-
nio4r (2.
|
79
|
-
nokogiri (1.
|
80
|
-
mini_portile2 (~> 2.
|
81
|
-
pry (0.
|
82
|
-
coderay (~> 1.1
|
83
|
-
method_source (~>
|
84
|
-
pry-byebug (3.
|
85
|
-
byebug (~>
|
86
|
-
pry (~> 0.
|
87
|
-
rack (2.
|
88
|
-
rack-test (
|
89
|
-
rack (>= 1.0)
|
90
|
-
rails (
|
91
|
-
actioncable (=
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
98
|
+
nio4r (2.5.4)
|
99
|
+
nokogiri (1.10.10)
|
100
|
+
mini_portile2 (~> 2.4.0)
|
101
|
+
pry (0.13.1)
|
102
|
+
coderay (~> 1.1)
|
103
|
+
method_source (~> 1.0)
|
104
|
+
pry-byebug (3.9.0)
|
105
|
+
byebug (~> 11.0)
|
106
|
+
pry (~> 0.13.0)
|
107
|
+
rack (2.2.3)
|
108
|
+
rack-test (1.1.0)
|
109
|
+
rack (>= 1.0, < 3)
|
110
|
+
rails (6.0.3.4)
|
111
|
+
actioncable (= 6.0.3.4)
|
112
|
+
actionmailbox (= 6.0.3.4)
|
113
|
+
actionmailer (= 6.0.3.4)
|
114
|
+
actionpack (= 6.0.3.4)
|
115
|
+
actiontext (= 6.0.3.4)
|
116
|
+
actionview (= 6.0.3.4)
|
117
|
+
activejob (= 6.0.3.4)
|
118
|
+
activemodel (= 6.0.3.4)
|
119
|
+
activerecord (= 6.0.3.4)
|
120
|
+
activestorage (= 6.0.3.4)
|
121
|
+
activesupport (= 6.0.3.4)
|
99
122
|
bundler (>= 1.3.0)
|
100
|
-
railties (=
|
123
|
+
railties (= 6.0.3.4)
|
101
124
|
sprockets-rails (>= 2.0.0)
|
102
125
|
rails-dom-testing (2.0.3)
|
103
126
|
activesupport (>= 4.2.0)
|
104
127
|
nokogiri (>= 1.6)
|
105
|
-
rails-html-sanitizer (1.0
|
106
|
-
loofah (~> 2.
|
107
|
-
railties (
|
108
|
-
actionpack (=
|
109
|
-
activesupport (=
|
128
|
+
rails-html-sanitizer (1.3.0)
|
129
|
+
loofah (~> 2.3)
|
130
|
+
railties (6.0.3.4)
|
131
|
+
actionpack (= 6.0.3.4)
|
132
|
+
activesupport (= 6.0.3.4)
|
110
133
|
method_source
|
111
134
|
rake (>= 0.8.7)
|
112
|
-
thor (>= 0.
|
113
|
-
rake (
|
114
|
-
request_store (1.
|
115
|
-
|
116
|
-
|
117
|
-
rspec-
|
118
|
-
rspec-
|
119
|
-
|
120
|
-
|
121
|
-
|
135
|
+
thor (>= 0.20.3, < 2.0)
|
136
|
+
rake (13.0.1)
|
137
|
+
request_store (1.5.0)
|
138
|
+
rack (>= 1.4)
|
139
|
+
rspec (3.10.0)
|
140
|
+
rspec-core (~> 3.10.0)
|
141
|
+
rspec-expectations (~> 3.10.0)
|
142
|
+
rspec-mocks (~> 3.10.0)
|
143
|
+
rspec-core (3.10.0)
|
144
|
+
rspec-support (~> 3.10.0)
|
145
|
+
rspec-expectations (3.10.0)
|
122
146
|
diff-lcs (>= 1.2.0, < 2.0)
|
123
|
-
rspec-support (~> 3.
|
124
|
-
rspec-mocks (3.
|
147
|
+
rspec-support (~> 3.10.0)
|
148
|
+
rspec-mocks (3.10.0)
|
125
149
|
diff-lcs (>= 1.2.0, < 2.0)
|
126
|
-
rspec-support (~> 3.
|
127
|
-
rspec-support (3.
|
128
|
-
sprockets (
|
150
|
+
rspec-support (~> 3.10.0)
|
151
|
+
rspec-support (3.10.0)
|
152
|
+
sprockets (4.0.2)
|
129
153
|
concurrent-ruby (~> 1.0)
|
130
154
|
rack (> 1, < 3)
|
131
|
-
sprockets-rails (3.2.
|
155
|
+
sprockets-rails (3.2.2)
|
132
156
|
actionpack (>= 4.0)
|
133
157
|
activesupport (>= 4.0)
|
134
158
|
sprockets (>= 3.0.0)
|
135
|
-
sqlite3 (1.
|
136
|
-
thor (0.
|
159
|
+
sqlite3 (1.4.2)
|
160
|
+
thor (1.0.1)
|
137
161
|
thread_safe (0.3.6)
|
138
|
-
tzinfo (1.2.
|
162
|
+
tzinfo (1.2.9)
|
139
163
|
thread_safe (~> 0.1)
|
140
|
-
websocket-driver (0.
|
164
|
+
websocket-driver (0.7.3)
|
141
165
|
websocket-extensions (>= 0.1.0)
|
142
|
-
websocket-extensions (0.1.
|
166
|
+
websocket-extensions (0.1.5)
|
167
|
+
zeitwerk (2.4.2)
|
143
168
|
|
144
169
|
PLATFORMS
|
145
170
|
ruby
|
146
171
|
|
147
172
|
DEPENDENCIES
|
148
|
-
bundler (~> 1.12)
|
149
173
|
database_cleaner (~> 1.5, >= 1.5.3)
|
150
174
|
friendly_id-mobility!
|
151
175
|
generator_spec (~> 0.9.3)
|
152
176
|
pry
|
153
177
|
pry-byebug
|
154
|
-
rails (
|
178
|
+
rails (~> 6.0.0)
|
155
179
|
rake
|
156
180
|
rspec (~> 3.0)
|
157
181
|
sqlite3
|
158
182
|
|
159
183
|
BUNDLED WITH
|
160
|
-
|
184
|
+
2.0.2
|
data/README.md
CHANGED
@@ -2,10 +2,12 @@ FriendlyId Mobility
|
|
2
2
|
===================
|
3
3
|
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/friendly_id-mobility.svg)][gem]
|
5
|
-
[![Build Status](https://
|
5
|
+
[![Build Status](https://github.com/shioyama/friendly_id-mobility/workflows/CI/badge.svg)][actions]
|
6
|
+
[![Code Climate](https://api.codeclimate.com/v1/badges/1dad5895b69b4ae5bd38/maintainability.svg)][codeclimate]
|
6
7
|
|
7
8
|
[gem]: https://rubygems.org/gems/friendly_id-mobility
|
8
|
-
[
|
9
|
+
[actions]: https://github.com/shioyama/friendly_id-mobility/actions
|
10
|
+
[codeclimate]: https://codeclimate.com/github/shioyama/friendly_id-mobility
|
9
11
|
|
10
12
|
[Mobility](https://github.com/shioyama/mobility) support for
|
11
13
|
[FriendlyId](https://github.com/norman/friendly_id).
|
@@ -16,7 +18,7 @@ Installation
|
|
16
18
|
Add this line to your application's Gemfile:
|
17
19
|
|
18
20
|
```ruby
|
19
|
-
gem 'friendly_id-mobility', '~> 0.
|
21
|
+
gem 'friendly_id-mobility', '~> 1.0.0'
|
20
22
|
```
|
21
23
|
|
22
24
|
And then execute:
|
@@ -62,8 +64,8 @@ and with a translated base column.
|
|
62
64
|
|
63
65
|
If you only want to translate the slug, include `Mobility` and translate the
|
64
66
|
slug with whichever backend you want (here we're assuming the default KeyValue
|
65
|
-
backend). Here, `name` is untranslated (so there is a column on the
|
66
|
-
table named `name`):
|
67
|
+
backend). Here, `name` is untranslated (so there is a column on the
|
68
|
+
`journalists` table named `name`):
|
67
69
|
|
68
70
|
```ruby
|
69
71
|
class Journalist < ActiveRecord::Base
|
@@ -71,7 +73,7 @@ class Journalist < ActiveRecord::Base
|
|
71
73
|
translates :slug
|
72
74
|
|
73
75
|
extend FriendlyId
|
74
|
-
friendly_id :
|
76
|
+
friendly_id :name, use: :mobility
|
75
77
|
end
|
76
78
|
```
|
77
79
|
|
@@ -142,6 +144,10 @@ Article.friendly.find("mon-titre-foo")
|
|
142
144
|
#=> #<Article id: 1 ...>
|
143
145
|
```
|
144
146
|
|
147
|
+
Note that this gem is not compatible with the `finders` add-on; using both
|
148
|
+
together will lead to unexpected results. To use these finder methods, you will
|
149
|
+
have to remove `finders` and explicitly call `friendly.find`, as above.
|
150
|
+
|
145
151
|
### Slug History
|
146
152
|
|
147
153
|
To use the FriendlyId history module, use `use: [:history, :mobility]` when
|
@@ -171,15 +177,6 @@ rails generate friendly_id_mobility
|
|
171
177
|
|
172
178
|
Then run the generated migration with `rake db:migrate`.
|
173
179
|
|
174
|
-
Contributing
|
175
|
-
------------
|
176
|
-
|
177
|
-
Bug reports and pull requests are welcome on GitHub at
|
178
|
-
https://github.com/shioyama/friendly_id-mobility. This project is intended to
|
179
|
-
be a safe, welcoming space for collaboration, and contributors are expected to
|
180
|
-
adhere to the [Contributor Covenant](http://contributor-covenant.org) code of
|
181
|
-
conduct.
|
182
|
-
|
183
180
|
License
|
184
181
|
-------
|
185
182
|
|
data/lib/friendly_id/mobility.rb
CHANGED
@@ -12,6 +12,10 @@ module FriendlyId
|
|
12
12
|
friendly_id_config.finder_methods = FriendlyId::Mobility::FinderMethods
|
13
13
|
end
|
14
14
|
end
|
15
|
+
if model_class.friendly_id_config.uses? :finders
|
16
|
+
warn "[FriendlyId] The Mobility add-on is not compatible with the Finders add-on. " \
|
17
|
+
"Please remove one or the other from the #{model_class} model."
|
18
|
+
end
|
15
19
|
end
|
16
20
|
|
17
21
|
def included(model_class)
|
@@ -19,7 +23,8 @@ module FriendlyId
|
|
19
23
|
|
20
24
|
mod = Module.new do
|
21
25
|
def friendly
|
22
|
-
|
26
|
+
# TODO: Make this constant public in Mobility 1.1 so we don't need const_get
|
27
|
+
super.extending(::Mobility::Plugins::ActiveRecord::Query.const_get(:QueryExtension))
|
23
28
|
end
|
24
29
|
end
|
25
30
|
model_class.send :extend, mod
|
@@ -27,7 +32,7 @@ module FriendlyId
|
|
27
32
|
|
28
33
|
def advise_against_untranslated_model(model)
|
29
34
|
field = model.friendly_id_config.query_field
|
30
|
-
if
|
35
|
+
if model.included_modules.grep(::Mobility::Translations).empty? || model.mobility_attributes.exclude?(field)
|
31
36
|
raise "[FriendlyId] You need to translate the '#{field}' field with " \
|
32
37
|
"Mobility (add 'translates :#{field}' in your model '#{model.name}')"
|
33
38
|
end
|
@@ -42,21 +47,19 @@ module FriendlyId
|
|
42
47
|
end
|
43
48
|
|
44
49
|
def should_generate_new_friendly_id?
|
45
|
-
send(friendly_id_config.slug_column).nil?
|
50
|
+
send(friendly_id_config.slug_column, locale: ::Mobility.locale).nil?
|
46
51
|
end
|
47
52
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
::Mobility.with_locale(locale) { super }
|
56
|
-
end
|
53
|
+
def set_slug(normalized_slug = nil)
|
54
|
+
super
|
55
|
+
changed.each do |change|
|
56
|
+
if change =~ /\A(?:#{friendly_id_config.base}|#{friendly_id_config.slug_column})_([a-z]{2}(_[a-z]{2})?)/
|
57
|
+
locale, suffix = $1.split('_'.freeze)
|
58
|
+
locale = "#{locale}-#{suffix.upcase}".freeze if suffix
|
59
|
+
::Mobility.with_locale(locale) { super }
|
57
60
|
end
|
58
61
|
end
|
59
|
-
end
|
62
|
+
end
|
60
63
|
|
61
64
|
module FinderMethods
|
62
65
|
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.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Salzberg
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mobility
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 1.0.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: '2.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 1.0.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: '2.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: friendly_id
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: 5.0.0
|
40
40
|
- - "<="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 5.
|
42
|
+
version: 5.4.0
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,35 +49,21 @@ dependencies:
|
|
49
49
|
version: 5.0.0
|
50
50
|
- - "<="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 5.
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
|
-
name: bundler
|
55
|
-
requirement: !ruby/object:Gem::Requirement
|
56
|
-
requirements:
|
57
|
-
- - "~>"
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: '1.12'
|
60
|
-
type: :development
|
61
|
-
prerelease: false
|
62
|
-
version_requirements: !ruby/object:Gem::Requirement
|
63
|
-
requirements:
|
64
|
-
- - "~>"
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: '1.12'
|
52
|
+
version: 5.4.0
|
67
53
|
- !ruby/object:Gem::Dependency
|
68
54
|
name: rake
|
69
55
|
requirement: !ruby/object:Gem::Requirement
|
70
56
|
requirements:
|
71
|
-
- - "
|
57
|
+
- - ">="
|
72
58
|
- !ruby/object:Gem::Version
|
73
|
-
version:
|
59
|
+
version: 12.3.3
|
74
60
|
type: :development
|
75
61
|
prerelease: false
|
76
62
|
version_requirements: !ruby/object:Gem::Requirement
|
77
63
|
requirements:
|
78
|
-
- - "
|
64
|
+
- - ">="
|
79
65
|
- !ruby/object:Gem::Version
|
80
|
-
version:
|
66
|
+
version: 12.3.3
|
81
67
|
- !ruby/object:Gem::Dependency
|
82
68
|
name: rspec
|
83
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -126,7 +112,7 @@ dependencies:
|
|
126
112
|
- - "~>"
|
127
113
|
- !ruby/object:Gem::Version
|
128
114
|
version: 0.9.3
|
129
|
-
description:
|
115
|
+
description:
|
130
116
|
email:
|
131
117
|
- chris@dejimata.com
|
132
118
|
executables: []
|
@@ -134,10 +120,8 @@ extensions: []
|
|
134
120
|
extra_rdoc_files: []
|
135
121
|
files:
|
136
122
|
- CHANGELOG.md
|
137
|
-
- CODE_OF_CONDUCT.md
|
138
123
|
- Gemfile
|
139
124
|
- Gemfile.lock
|
140
|
-
- Guardfile
|
141
125
|
- LICENSE.txt
|
142
126
|
- README.md
|
143
127
|
- Rakefile
|
@@ -150,7 +134,7 @@ homepage: https://github.com/shioyama/friendly_id-mobility
|
|
150
134
|
licenses:
|
151
135
|
- MIT
|
152
136
|
metadata: {}
|
153
|
-
post_install_message:
|
137
|
+
post_install_message:
|
154
138
|
rdoc_options: []
|
155
139
|
require_paths:
|
156
140
|
- lib
|
@@ -165,9 +149,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
149
|
- !ruby/object:Gem::Version
|
166
150
|
version: '0'
|
167
151
|
requirements: []
|
168
|
-
|
169
|
-
|
170
|
-
signing_key:
|
152
|
+
rubygems_version: 3.0.6
|
153
|
+
signing_key:
|
171
154
|
specification_version: 4
|
172
155
|
summary: Translate your FriendlyId slugs with Mobility.
|
173
156
|
test_files: []
|
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
# Contributor Code of Conduct
|
2
|
-
|
3
|
-
As contributors and maintainers of this project, and in the interest of
|
4
|
-
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
-
contribute through reporting issues, posting feature requests, updating
|
6
|
-
documentation, submitting pull requests or patches, and other activities.
|
7
|
-
|
8
|
-
We are committed to making participation in this project a harassment-free
|
9
|
-
experience for everyone, regardless of level of experience, gender, gender
|
10
|
-
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
-
body size, race, ethnicity, age, religion, or nationality.
|
12
|
-
|
13
|
-
Examples of unacceptable behavior by participants include:
|
14
|
-
|
15
|
-
* The use of sexualized language or imagery
|
16
|
-
* Personal attacks
|
17
|
-
* Trolling or insulting/derogatory comments
|
18
|
-
* Public or private harassment
|
19
|
-
* Publishing other's private information, such as physical or electronic
|
20
|
-
addresses, without explicit permission
|
21
|
-
* Other unethical or unprofessional conduct
|
22
|
-
|
23
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
-
threatening, offensive, or harmful.
|
28
|
-
|
29
|
-
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
-
fairly and consistently applying these principles to every aspect of managing
|
31
|
-
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
-
Conduct may be permanently removed from the project team.
|
33
|
-
|
34
|
-
This code of conduct applies both within project spaces and in public spaces
|
35
|
-
when an individual is representing the project or its community.
|
36
|
-
|
37
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
-
reported by contacting a project maintainer at chris@dejimata.com. All
|
39
|
-
complaints will be reviewed and investigated and will result in a response that
|
40
|
-
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
-
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
-
incident.
|
43
|
-
|
44
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
-
version 1.3.0, available at
|
46
|
-
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
-
|
48
|
-
[homepage]: http://contributor-covenant.org
|
49
|
-
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Guardfile
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
# A sample Guardfile
|
2
|
-
# More info at https://github.com/guard/guard#readme
|
3
|
-
|
4
|
-
## Uncomment and set this to only include directories you want to watch
|
5
|
-
# directories %w(app lib config test spec features) \
|
6
|
-
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
|
7
|
-
|
8
|
-
## Note: if you are using the `directories` clause above and you are not
|
9
|
-
## watching the project directory ('.'), then you will want to move
|
10
|
-
## the Guardfile to a watched dir and symlink it back, e.g.
|
11
|
-
#
|
12
|
-
# $ mkdir config
|
13
|
-
# $ mv Guardfile config/
|
14
|
-
# $ ln -s config/Guardfile .
|
15
|
-
#
|
16
|
-
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
17
|
-
|
18
|
-
# Note: The cmd option is now required due to the increasing number of ways
|
19
|
-
# rspec may be run, below are examples of the most common uses.
|
20
|
-
# * bundler: 'bundle exec rspec'
|
21
|
-
# * bundler binstubs: 'bin/rspec'
|
22
|
-
# * spring: 'bin/rspec' (This will use spring if running and you have
|
23
|
-
# installed the spring binstubs per the docs)
|
24
|
-
# * zeus: 'zeus rspec' (requires the server to be started separately)
|
25
|
-
# * 'just' rspec: 'rspec'
|
26
|
-
|
27
|
-
guard :rspec, cmd: "bundle exec rspec" do
|
28
|
-
require "guard/rspec/dsl"
|
29
|
-
dsl = Guard::RSpec::Dsl.new(self)
|
30
|
-
|
31
|
-
# Feel free to open issues for suggestions and improvements
|
32
|
-
|
33
|
-
# RSpec files
|
34
|
-
rspec = dsl.rspec
|
35
|
-
watch(rspec.spec_helper) { rspec.spec_dir }
|
36
|
-
watch(rspec.spec_support) { rspec.spec_dir }
|
37
|
-
watch(rspec.spec_files)
|
38
|
-
|
39
|
-
# Ruby files
|
40
|
-
ruby = dsl.ruby
|
41
|
-
dsl.watch_spec_files_for(ruby.lib_files)
|
42
|
-
|
43
|
-
# Rails files
|
44
|
-
rails = dsl.rails(view_extensions: %w(erb haml slim))
|
45
|
-
dsl.watch_spec_files_for(rails.app_files)
|
46
|
-
dsl.watch_spec_files_for(rails.views)
|
47
|
-
|
48
|
-
watch(rails.controllers) do |m|
|
49
|
-
[
|
50
|
-
rspec.spec.call("routing/#{m[1]}_routing"),
|
51
|
-
rspec.spec.call("controllers/#{m[1]}_controller"),
|
52
|
-
rspec.spec.call("acceptance/#{m[1]}")
|
53
|
-
]
|
54
|
-
end
|
55
|
-
|
56
|
-
# Rails config changes
|
57
|
-
watch(rails.spec_helper) { rspec.spec_dir }
|
58
|
-
watch(rails.routes) { "#{rspec.spec_dir}/routing" }
|
59
|
-
watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" }
|
60
|
-
|
61
|
-
# Capybara features specs
|
62
|
-
watch(rails.view_dirs) { |m| rspec.spec.call("features/#{m[1]}") }
|
63
|
-
watch(rails.layouts) { |m| rspec.spec.call("features/#{m[1]}") }
|
64
|
-
|
65
|
-
# Turnip features and steps
|
66
|
-
watch(%r{^spec/acceptance/(.+)\.feature$})
|
67
|
-
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
|
68
|
-
Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance"
|
69
|
-
end
|
70
|
-
end
|