friendly_id-mobility 0.5.2 → 1.0.1

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: 2df7c0105249b1a307a373392076a8b318476606
4
- data.tar.gz: 0d3b6bf660ceb101784f5e449f0d332d41bb5931
2
+ SHA256:
3
+ metadata.gz: eb6a5bb8543453a82c0e904a16cc7413e4fb4debe749ac80625d8c8dfd980315
4
+ data.tar.gz: 45a83bd377e9a3fb0c3af48662801aea35e1a4a10447d68bce843fbda08705ca
5
5
  SHA512:
6
- metadata.gz: be2057b96d52d259d86e5959a1040c0d81bc5ff99ce98a32a0826711e47b55ffe528d45b65eb65251737097fd37d5aa28e467187b871612d9baff4b86b7ab4c2
7
- data.tar.gz: 7a7c3dd1857ec3c44f78b81767adb222bec720c64d8777d965bb229b58c098c7dd349e177f073fb13b26df34788f2834256451da2cfd5051305afa93a47e8772
6
+ metadata.gz: 8aa29d1e6a03307595897b8a3e1266ee7c5b1254d96dfb966ab17c92abfba3b251e8cf6eb7c63feab79f609820d6ed4d933c9354fce0c23e3201a6b4a9967247
7
+ data.tar.gz: 348a2964552f2c828385193fff36a136d4c582bbde0e2768541743dcad1217edcdd365495de937a5c3a0b62e4575a5d190506dfc3d065f62cd02208d2148c996
@@ -1,7 +1,29 @@
1
1
  # FriendlyId Mobility Changelog
2
2
 
3
+ ## 1.0
4
+
5
+ ### 1.0.1
6
+
7
+ * Update friendly_id dependency ([#21](https://github.com/shioyama/friendly_id-mobility/pull/21))
8
+
9
+ ### 1.0.0
10
+
11
+ * Release 1.0.0, compatible with Mobility 1.0
12
+ ([#23](https://github.com/shioyama/friendly_id-mobility/pull/23))
13
+
3
14
  ## 0.5
4
15
 
16
+ ### 0.5.5
17
+ * Bump friendly_id dependency version to 5.4.0
18
+ ([#19](https://github.com/shioyama/friendly_id-mobility/pull/19/files))
19
+
20
+ ### 0.5.4
21
+ * Generate all translated slugs when model is saved
22
+ ([#12](https://github.com/shioyama/friendly_id-mobility/pull/12))
23
+
24
+ ### 0.5.3
25
+ * Update gemspec to allow all Mobility versions < 1.0
26
+
5
27
  ### 0.5.2
6
28
  * Emit warning when mobility is enabled with finders add-on
7
29
 
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.2'
21
+ gem 'friendly_id-mobility', '~> 1.0.1'
20
22
  ```
21
23
 
22
24
  And then execute:
@@ -71,7 +73,7 @@ class Journalist < ActiveRecord::Base
71
73
  translates :slug
72
74
 
73
75
  extend FriendlyId
74
- friendly_id :title, use: :mobility
76
+ friendly_id :name, use: :mobility
75
77
  end
76
78
  ```
77
79
 
@@ -175,15 +177,6 @@ rails generate friendly_id_mobility
175
177
 
176
178
  Then run the generated migration with `rake db:migrate`.
177
179
 
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
180
  License
188
181
  -------
189
182
 
@@ -23,7 +23,8 @@ module FriendlyId
23
23
 
24
24
  mod = Module.new do
25
25
  def friendly
26
- super.send(::Mobility.query_method)
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))
27
28
  end
28
29
  end
29
30
  model_class.send :extend, mod
@@ -31,7 +32,7 @@ module FriendlyId
31
32
 
32
33
  def advise_against_untranslated_model(model)
33
34
  field = model.friendly_id_config.query_field
34
- if !model.respond_to?(:translated_attribute_names) || model.translated_attribute_names.exclude?(field)
35
+ if model.included_modules.grep(::Mobility::Translations).empty? || model.mobility_attributes.exclude?(field)
35
36
  raise "[FriendlyId] You need to translate the '#{field}' field with " \
36
37
  "Mobility (add 'translates :#{field}' in your model '#{model.name}')"
37
38
  end
@@ -46,21 +47,19 @@ module FriendlyId
46
47
  end
47
48
 
48
49
  def should_generate_new_friendly_id?
49
- send(friendly_id_config.slug_column).nil?
50
+ send(friendly_id_config.slug_column, locale: ::Mobility.locale).nil?
50
51
  end
51
52
 
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
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 }
61
60
  end
62
61
  end
63
- end)
62
+ end
64
63
 
65
64
  module FinderMethods
66
65
  include ::FriendlyId::History::FinderMethods
@@ -1,5 +1,5 @@
1
1
  module FriendlyId
2
2
  module Mobility
3
- VERSION = "0.5.2"
3
+ VERSION = "1.0.1"
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.2
4
+ version: 1.0.1
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: 2017-12-26 00:00:00.000000000 Z
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.3.0
19
+ version: 1.0.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: 0.4.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.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: 0.4.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