friendly_id-mobility 0.5.3 → 1.0.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
- SHA1:
3
- metadata.gz: 7bbbfe1f2a1b85a565297ba1acf35fc086db825f
4
- data.tar.gz: 5722fb89af5c709d3393f4d2f997fec2b739b0b3
2
+ SHA256:
3
+ metadata.gz: 04e899ca7fccbde715e312d131d3234c507fb388c11ae6cf2fea9aca0d07b18c
4
+ data.tar.gz: d179dda1a53c65d19aa094e9af3f8450bf385e2293d5ec84a54b643ca72a6d0d
5
5
  SHA512:
6
- metadata.gz: fd4e2e61e3534e19d8346226a70187f47daeeb3d22c451d0acd9860922038d4b9c0d7164f083953cbc502988c928e11a1bea319d72f792004039bcbe32085d3c
7
- data.tar.gz: 9a744f53daf92d599f926196e6275ad8151f7c4e55a9e3e97c6dbde05f3cce1da2b4b804c60fc10cdb4ada816880450c675118140c531431119f9fa29bad8da7
6
+ metadata.gz: e30cdda75e3850bc631f5197683c0b4fbdb7ada21c3b5203dc11043f896ce616730d44e0f7468073970f7bf0dd51f61a7033d02c776a9e635ea05a5d6f8c780f
7
+ data.tar.gz: cc19d88058cda9ea0dbaf6ddde380ca7533c9289fa4194e464d7cf8d0959a6cae47e436f8d2a166b8e1fa8a1bceec7d5793ed103078882b28779a613a8a36ccc
@@ -1,7 +1,31 @@
1
1
  # FriendlyId Mobility Changelog
2
2
 
3
+ ## 1.0
4
+
5
+ ### 1.0.2
6
+
7
+ * Depend on Mobility 1.0.1 to avoid need for `const_get`
8
+ ([#25](https://github.com/shioyama/friendly_id-mobility/pull/25/files))
9
+
10
+ ### 1.0.1
11
+
12
+ * Update friendly_id dependency ([#21](https://github.com/shioyama/friendly_id-mobility/pull/21))
13
+
14
+ ### 1.0.0
15
+
16
+ * Release 1.0.0, compatible with Mobility 1.0
17
+ ([#23](https://github.com/shioyama/friendly_id-mobility/pull/23))
18
+
3
19
  ## 0.5
4
20
 
21
+ ### 0.5.5
22
+ * Bump friendly_id dependency version to 5.4.0
23
+ ([#19](https://github.com/shioyama/friendly_id-mobility/pull/19/files))
24
+
25
+ ### 0.5.4
26
+ * Generate all translated slugs when model is saved
27
+ ([#12](https://github.com/shioyama/friendly_id-mobility/pull/12))
28
+
5
29
  ### 0.5.3
6
30
  * Update gemspec to allow all Mobility versions < 1.0
7
31
 
data/Gemfile CHANGED
@@ -6,14 +6,14 @@ gemspec
6
6
  group :development, :test do
7
7
  gem 'rake'
8
8
 
9
- gem 'sqlite3'
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 'rails', '>= 5.0', '< 5.1'
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
@@ -1,160 +1,184 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- friendly_id-mobility (0.5.1)
5
- friendly_id (>= 5.0.0, <= 5.3.0)
6
- mobility (>= 0.3.0, < 0.4.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 (5.0.6)
12
- actionpack (= 5.0.6)
13
- nio4r (>= 1.2, < 3.0)
14
- websocket-driver (~> 0.6.1)
15
- actionmailer (5.0.6)
16
- actionpack (= 5.0.6)
17
- actionview (= 5.0.6)
18
- activejob (= 5.0.6)
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 (5.0.6)
22
- actionview (= 5.0.6)
23
- activesupport (= 5.0.6)
24
- rack (~> 2.0)
25
- rack-test (~> 0.6.3)
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.2)
28
- actionview (5.0.6)
29
- activesupport (= 5.0.6)
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
- erubis (~> 2.7.0)
44
+ erubi (~> 1.4)
32
45
  rails-dom-testing (~> 2.0)
33
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
- activejob (5.0.6)
35
- activesupport (= 5.0.6)
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 (5.0.6)
38
- activesupport (= 5.0.6)
39
- activerecord (5.0.6)
40
- activemodel (= 5.0.6)
41
- activesupport (= 5.0.6)
42
- arel (~> 7.0)
43
- activesupport (5.0.6)
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 (~> 0.7)
62
+ i18n (>= 0.7, < 2)
46
63
  minitest (~> 5.1)
47
64
  tzinfo (~> 1.1)
48
- arel (7.1.4)
49
- builder (3.2.3)
50
- byebug (9.1.0)
51
- coderay (1.1.2)
52
- concurrent-ruby (1.0.5)
53
- crass (1.0.3)
54
- database_cleaner (1.6.2)
55
- diff-lcs (1.3)
56
- erubis (2.7.0)
57
- friendly_id (5.2.3)
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.1)
79
+ globalid (0.4.2)
63
80
  activesupport (>= 4.2.0)
64
- i18n (0.9.1)
81
+ i18n (1.8.5)
65
82
  concurrent-ruby (~> 1.0)
66
- loofah (2.1.1)
83
+ loofah (2.8.0)
67
84
  crass (~> 1.0.2)
68
85
  nokogiri (>= 1.5.9)
69
- mail (2.7.0)
86
+ mail (2.7.1)
70
87
  mini_mime (>= 0.1.1)
71
- method_source (0.9.0)
72
- mini_mime (1.0.0)
73
- mini_portile2 (2.3.0)
74
- minitest (5.10.3)
75
- mobility (0.3.6)
76
- i18n (>= 0.6.10, < 0.10)
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.1.0)
79
- nokogiri (1.8.1)
80
- mini_portile2 (~> 2.3.0)
81
- pry (0.11.3)
82
- coderay (~> 1.1.0)
83
- method_source (~> 0.9.0)
84
- pry-byebug (3.5.1)
85
- byebug (~> 9.1)
86
- pry (~> 0.10)
87
- rack (2.0.3)
88
- rack-test (0.6.3)
89
- rack (>= 1.0)
90
- rails (5.0.6)
91
- actioncable (= 5.0.6)
92
- actionmailer (= 5.0.6)
93
- actionpack (= 5.0.6)
94
- actionview (= 5.0.6)
95
- activejob (= 5.0.6)
96
- activemodel (= 5.0.6)
97
- activerecord (= 5.0.6)
98
- activesupport (= 5.0.6)
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 (= 5.0.6)
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.3)
106
- loofah (~> 2.0)
107
- railties (5.0.6)
108
- actionpack (= 5.0.6)
109
- activesupport (= 5.0.6)
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.18.1, < 2.0)
113
- rake (12.3.0)
114
- request_store (1.3.2)
115
- rspec (3.7.0)
116
- rspec-core (~> 3.7.0)
117
- rspec-expectations (~> 3.7.0)
118
- rspec-mocks (~> 3.7.0)
119
- rspec-core (3.7.0)
120
- rspec-support (~> 3.7.0)
121
- rspec-expectations (3.7.0)
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.7.0)
124
- rspec-mocks (3.7.0)
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.7.0)
127
- rspec-support (3.7.0)
128
- sprockets (3.7.1)
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.1)
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.3.13)
136
- thor (0.20.0)
159
+ sqlite3 (1.4.2)
160
+ thor (1.0.1)
137
161
  thread_safe (0.3.6)
138
- tzinfo (1.2.4)
162
+ tzinfo (1.2.9)
139
163
  thread_safe (~> 0.1)
140
- websocket-driver (0.6.5)
164
+ websocket-driver (0.7.3)
141
165
  websocket-extensions (>= 0.1.0)
142
- websocket-extensions (0.1.3)
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 (>= 5.0, < 5.1)
178
+ rails (~> 6.0.0)
155
179
  rake
156
180
  rspec (~> 3.0)
157
181
  sqlite3
158
182
 
159
183
  BUNDLED WITH
160
- 1.16.0
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://travis-ci.org/shioyama/friendly_id-mobility.svg?branch=master)][travis]
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
- [travis]: https://travis-ci.org/shioyama/friendly_id-mobility
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.5.3'
21
+ gem 'friendly_id-mobility', '~> 1.0.2'
20
22
  ```
21
23
 
22
24
  And then execute:
@@ -25,19 +27,27 @@ And then execute:
25
27
  bundle
26
28
  ```
27
29
 
28
- Or install it yourself as:
30
+ Then run the Mobility generator:
29
31
 
30
32
  ```
31
- gem install friendly_id-mobility
33
+ rails generate mobility:install
32
34
  ```
33
35
 
34
- Run the Mobility generator:
36
+ This will generate an initializer for Mobility. To ensure that FriendlyId sees
37
+ changes correctly on attributes, enable (uncomment) the `dirty` plugin line in
38
+ your Mobility configuration:
35
39
 
36
- ```
37
- rails generate mobility:install
40
+ ```ruby
41
+ Mobility.configure do
42
+ plugins do
43
+ # ...
44
+ dirty
45
+ # ...
46
+ end
47
+ end
38
48
  ```
39
49
 
40
- Run the FriendlyId generator:
50
+ Next, run the FriendlyId generator:
41
51
 
42
52
  ```
43
53
  rails generate friendly_id
@@ -71,7 +81,7 @@ class Journalist < ActiveRecord::Base
71
81
  translates :slug
72
82
 
73
83
  extend FriendlyId
74
- friendly_id :title, use: :mobility
84
+ friendly_id :name, use: :mobility
75
85
  end
76
86
  ```
77
87
 
@@ -97,7 +107,7 @@ You can also translate both slug and base attribute:
97
107
  ```ruby
98
108
  class Article < ActiveRecord::Base
99
109
  extend Mobility
100
- translates :slug, :title, dirty: true
110
+ translates :slug, :title
101
111
 
102
112
  extend FriendlyId
103
113
  friendly_id :title, use: :mobility
@@ -123,10 +133,6 @@ article.slug
123
133
  #=> "my-foo-title"
124
134
  ```
125
135
 
126
- Setting `dirty: true` on the translated base attribute is recommended in order
127
- to ensure that changes in any locale trigger updates to the slug in that
128
- locale.
129
-
130
136
  ### Friendly Finders with Translated Attributes
131
137
 
132
138
  The Mobility `i18n` scope is mixed into the `friendly` scope for models which
@@ -154,7 +160,7 @@ calling `friendly_id` from your model:
154
160
  ```ruby
155
161
  class Article < ActiveRecord::Base
156
162
  extend Mobility
157
- translates :slug, :title, dirty: true
163
+ translates :slug, :title
158
164
 
159
165
  extend FriendlyId
160
166
  friendly_id :title, use: [:history, :mobility]
@@ -175,15 +181,6 @@ rails generate friendly_id_mobility
175
181
 
176
182
  Then run the generated migration with `rake db:migrate`.
177
183
 
178
- Contributing
179
- ------------
180
-
181
- Bug reports and pull requests are welcome on GitHub at
182
- https://github.com/shioyama/friendly_id-mobility. This project is intended to
183
- be a safe, welcoming space for collaboration, and contributors are expected to
184
- adhere to the [Contributor Covenant](http://contributor-covenant.org) code of
185
- conduct.
186
-
187
184
  License
188
185
  -------
189
186
 
@@ -23,7 +23,7 @@ module FriendlyId
23
23
 
24
24
  mod = Module.new do
25
25
  def friendly
26
- super.send(::Mobility.query_method)
26
+ super.extending(::Mobility::Plugins::ActiveRecord::Query::QueryExtension)
27
27
  end
28
28
  end
29
29
  model_class.send :extend, mod
@@ -31,7 +31,7 @@ module FriendlyId
31
31
 
32
32
  def advise_against_untranslated_model(model)
33
33
  field = model.friendly_id_config.query_field
34
- if !model.respond_to?(:translated_attribute_names) || model.translated_attribute_names.exclude?(field)
34
+ if model.included_modules.grep(::Mobility::Translations).empty? || model.mobility_attributes.exclude?(field)
35
35
  raise "[FriendlyId] You need to translate the '#{field}' field with " \
36
36
  "Mobility (add 'translates :#{field}' in your model '#{model.name}')"
37
37
  end
@@ -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
- include(Module.new do
53
- def set_slug(normalized_slug = nil)
54
- super
55
- changed.each do |change|
56
- if change =~ /\A#{friendly_id_config.base}_([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 }
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
@@ -1,5 +1,5 @@
1
1
  module FriendlyId
2
2
  module Mobility
3
- VERSION = "0.5.3"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
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.3
4
+ version: 1.0.2
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: 2018-01-26 00:00:00.000000000 Z
11
+ date: 2020-12-21 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.3.0
19
+ version: 1.0.1
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '1.0'
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.3.0
29
+ version: 1.0.1
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '1.0'
32
+ version: '2.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: friendly_id
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -37,9 +37,9 @@ dependencies:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
39
  version: 5.0.0
40
- - - "<="
40
+ - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: 5.3.0
42
+ version: '5.5'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -47,37 +47,23 @@ dependencies:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
49
  version: 5.0.0
50
- - - "<="
51
- - !ruby/object:Gem::Version
52
- version: 5.3.0
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
- - - "~>"
50
+ - - "<"
65
51
  - !ruby/object:Gem::Version
66
- version: '1.12'
52
+ version: '5.5'
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: '10.0'
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: '10.0'
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
- rubyforge_project:
169
- rubygems_version: 2.6.14
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: []
@@ -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