friendly_id-mobility 0.5.5 → 1.0.0

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: 840900ad6048793b334abe0cd05aa0ed6fc2b73e66d57c09c29f8a1506f5bf05
4
- data.tar.gz: 3966104a341f8c62d16ea49c7aa717ccbff308fb08febd25ccb51c377119accf
3
+ metadata.gz: 8631996fc6f35ac9a0193d962340155a41330cf38a9c37c138751cacbc0c517a
4
+ data.tar.gz: 82c9e22712b10071bc48ab22f64a6bb09fb3d26ae72fe01a3eba11198209a403
5
5
  SHA512:
6
- metadata.gz: f7fee8e50ecec64024d8738e704c3b22ae2d5994d3903fceb70d63db8b99f4656bbe8fbadde824c4cd6ac8ead12f7f40e66adf6752d8660f203258f34cc27fe8
7
- data.tar.gz: 43fda09d04218706315833a63c0ddc40bbc76998a93c8f00ccdfbee923eafbf8420c9cdc6bdb88e00f2ef46926b54d24410bb9e0656f63f874fd72d17c03e468
6
+ metadata.gz: 20b386b46a51f52abd8b0ad59238f0a48cb0cfdb0b37094ee641f2c8ee7eb530a8b27ee2101cb9ef224e9413bbb28749b496d990ca09fcc76e6ac25ae775268b
7
+ data.tar.gz: 07f84df28620aa0c52fc3868de6fba523806262fde0f2dea1b0f560758c39e1c4276dbaf9378c2a734a039cc3c5ee27420119cb0d972417c92f9286844a32364
@@ -1,5 +1,12 @@
1
1
  # FriendlyId Mobility Changelog
2
2
 
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
+
3
10
  ## 0.5
4
11
 
5
12
  ### 0.5.5
data/Gemfile CHANGED
@@ -12,13 +12,7 @@ group :development, :test do
12
12
  gem 'sqlite3'
13
13
  end
14
14
 
15
- if ENV['RAILS_VERSION'] == '5.1'
16
- gem 'rails', '>= 5.1', '< 5.2'
17
- elsif ENV['RAILS_VERSION'] == '5.0'
18
- gem 'rails', '>= 5.0', '< 5.1'
19
- else
20
- gem 'rails', '>= 5.2.0.rc2', '< 5.3'
21
- end
15
+ gem 'rails', "~> #{ENV['RAILS_VERSION'] || '6.0'}.0"
22
16
 
23
17
  gem 'pry'
24
18
  gem 'pry-byebug'
@@ -8,56 +8,69 @@ PATH
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actioncable (5.2.4.2)
12
- actionpack (= 5.2.4.2)
11
+ actioncable (6.0.3.4)
12
+ actionpack (= 6.0.3.4)
13
13
  nio4r (~> 2.0)
14
14
  websocket-driver (>= 0.6.1)
15
- actionmailer (5.2.4.2)
16
- actionpack (= 5.2.4.2)
17
- actionview (= 5.2.4.2)
18
- activejob (= 5.2.4.2)
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.2.4.2)
22
- actionview (= 5.2.4.2)
23
- activesupport (= 5.2.4.2)
28
+ actionpack (6.0.3.4)
29
+ actionview (= 6.0.3.4)
30
+ activesupport (= 6.0.3.4)
24
31
  rack (~> 2.0, >= 2.0.8)
25
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.2.4.2)
29
- activesupport (= 5.2.4.2)
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.0, >= 1.0.3)
34
- activejob (5.2.4.2)
35
- activesupport (= 5.2.4.2)
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.2.4.2)
38
- activesupport (= 5.2.4.2)
39
- activerecord (5.2.4.2)
40
- activemodel (= 5.2.4.2)
41
- activesupport (= 5.2.4.2)
42
- arel (>= 9.0)
43
- activestorage (5.2.4.2)
44
- actionpack (= 5.2.4.2)
45
- activerecord (= 5.2.4.2)
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)
46
59
  marcel (~> 0.3.1)
47
- activesupport (5.2.4.2)
60
+ activesupport (6.0.3.4)
48
61
  concurrent-ruby (~> 1.0, >= 1.0.2)
49
62
  i18n (>= 0.7, < 2)
50
63
  minitest (~> 5.1)
51
64
  tzinfo (~> 1.1)
52
- arel (9.0.0)
65
+ zeitwerk (~> 2.2, >= 2.2.2)
53
66
  builder (3.2.4)
54
- byebug (11.1.1)
55
- coderay (1.1.2)
56
- concurrent-ruby (1.1.6)
67
+ byebug (11.1.3)
68
+ coderay (1.1.3)
69
+ concurrent-ruby (1.1.7)
57
70
  crass (1.0.6)
58
- database_cleaner (1.8.4)
59
- diff-lcs (1.3)
60
- erubi (1.9.0)
71
+ database_cleaner (1.8.5)
72
+ diff-lcs (1.4.4)
73
+ erubi (1.10.0)
61
74
  friendly_id (5.4.0)
62
75
  activerecord (>= 4.0.0)
63
76
  generator_spec (0.9.4)
@@ -65,9 +78,9 @@ GEM
65
78
  railties (>= 3.0.0)
66
79
  globalid (0.4.2)
67
80
  activesupport (>= 4.2.0)
68
- i18n (1.8.2)
81
+ i18n (1.8.5)
69
82
  concurrent-ruby (~> 1.0)
70
- loofah (2.5.0)
83
+ loofah (2.8.0)
71
84
  crass (~> 1.0.2)
72
85
  nokogiri (>= 1.5.9)
73
86
  mail (2.7.1)
@@ -75,80 +88,83 @@ GEM
75
88
  marcel (0.3.3)
76
89
  mimemagic (~> 0.3.2)
77
90
  method_source (1.0.0)
78
- mimemagic (0.3.4)
91
+ mimemagic (0.3.5)
79
92
  mini_mime (1.0.2)
80
93
  mini_portile2 (2.4.0)
81
- minitest (5.14.0)
94
+ minitest (5.14.2)
82
95
  mobility (0.8.13)
83
96
  i18n (>= 0.6.10, < 2)
84
97
  request_store (~> 1.0)
85
- nio4r (2.5.2)
86
- nokogiri (1.10.9)
98
+ nio4r (2.5.4)
99
+ nokogiri (1.10.10)
87
100
  mini_portile2 (~> 2.4.0)
88
- pry (0.13.0)
101
+ pry (0.13.1)
89
102
  coderay (~> 1.1)
90
103
  method_source (~> 1.0)
91
104
  pry-byebug (3.9.0)
92
105
  byebug (~> 11.0)
93
106
  pry (~> 0.13.0)
94
- rack (2.2.2)
107
+ rack (2.2.3)
95
108
  rack-test (1.1.0)
96
109
  rack (>= 1.0, < 3)
97
- rails (5.2.4.2)
98
- actioncable (= 5.2.4.2)
99
- actionmailer (= 5.2.4.2)
100
- actionpack (= 5.2.4.2)
101
- actionview (= 5.2.4.2)
102
- activejob (= 5.2.4.2)
103
- activemodel (= 5.2.4.2)
104
- activerecord (= 5.2.4.2)
105
- activestorage (= 5.2.4.2)
106
- activesupport (= 5.2.4.2)
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)
107
122
  bundler (>= 1.3.0)
108
- railties (= 5.2.4.2)
123
+ railties (= 6.0.3.4)
109
124
  sprockets-rails (>= 2.0.0)
110
125
  rails-dom-testing (2.0.3)
111
126
  activesupport (>= 4.2.0)
112
127
  nokogiri (>= 1.6)
113
128
  rails-html-sanitizer (1.3.0)
114
129
  loofah (~> 2.3)
115
- railties (5.2.4.2)
116
- actionpack (= 5.2.4.2)
117
- activesupport (= 5.2.4.2)
130
+ railties (6.0.3.4)
131
+ actionpack (= 6.0.3.4)
132
+ activesupport (= 6.0.3.4)
118
133
  method_source
119
134
  rake (>= 0.8.7)
120
- thor (>= 0.19.0, < 2.0)
135
+ thor (>= 0.20.3, < 2.0)
121
136
  rake (13.0.1)
122
137
  request_store (1.5.0)
123
138
  rack (>= 1.4)
124
- rspec (3.9.0)
125
- rspec-core (~> 3.9.0)
126
- rspec-expectations (~> 3.9.0)
127
- rspec-mocks (~> 3.9.0)
128
- rspec-core (3.9.1)
129
- rspec-support (~> 3.9.1)
130
- rspec-expectations (3.9.1)
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)
131
146
  diff-lcs (>= 1.2.0, < 2.0)
132
- rspec-support (~> 3.9.0)
133
- rspec-mocks (3.9.1)
147
+ rspec-support (~> 3.10.0)
148
+ rspec-mocks (3.10.0)
134
149
  diff-lcs (>= 1.2.0, < 2.0)
135
- rspec-support (~> 3.9.0)
136
- rspec-support (3.9.2)
137
- sprockets (4.0.0)
150
+ rspec-support (~> 3.10.0)
151
+ rspec-support (3.10.0)
152
+ sprockets (4.0.2)
138
153
  concurrent-ruby (~> 1.0)
139
154
  rack (> 1, < 3)
140
- sprockets-rails (3.2.1)
155
+ sprockets-rails (3.2.2)
141
156
  actionpack (>= 4.0)
142
157
  activesupport (>= 4.0)
143
158
  sprockets (>= 3.0.0)
144
159
  sqlite3 (1.4.2)
145
160
  thor (1.0.1)
146
161
  thread_safe (0.3.6)
147
- tzinfo (1.2.7)
162
+ tzinfo (1.2.9)
148
163
  thread_safe (~> 0.1)
149
- websocket-driver (0.7.1)
164
+ websocket-driver (0.7.3)
150
165
  websocket-extensions (>= 0.1.0)
151
- websocket-extensions (0.1.4)
166
+ websocket-extensions (0.1.5)
167
+ zeitwerk (2.4.2)
152
168
 
153
169
  PLATFORMS
154
170
  ruby
@@ -159,7 +175,7 @@ DEPENDENCIES
159
175
  generator_spec (~> 0.9.3)
160
176
  pry
161
177
  pry-byebug
162
- rails (>= 5.2.0.rc2, < 5.3)
178
+ rails (~> 6.0.0)
163
179
  rake
164
180
  rspec (~> 3.0)
165
181
  sqlite3
data/README.md CHANGED
@@ -2,11 +2,11 @@ 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
6
  [![Code Climate](https://api.codeclimate.com/v1/badges/1dad5895b69b4ae5bd38/maintainability.svg)][codeclimate]
7
7
 
8
8
  [gem]: https://rubygems.org/gems/friendly_id-mobility
9
- [travis]: https://travis-ci.org/shioyama/friendly_id-mobility
9
+ [actions]: https://github.com/shioyama/friendly_id-mobility/actions
10
10
  [codeclimate]: https://codeclimate.com/github/shioyama/friendly_id-mobility
11
11
 
12
12
  [Mobility](https://github.com/shioyama/mobility) support for
@@ -18,7 +18,7 @@ Installation
18
18
  Add this line to your application's Gemfile:
19
19
 
20
20
  ```ruby
21
- gem 'friendly_id-mobility', '~> 0.5.4'
21
+ gem 'friendly_id-mobility', '~> 1.0.0'
22
22
  ```
23
23
 
24
24
  And then execute:
@@ -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
@@ -1,5 +1,5 @@
1
1
  module FriendlyId
2
2
  module Mobility
3
- VERSION = "0.5.5"
3
+ VERSION = "1.0.0"
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.5
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Salzberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-08 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.5.1
19
+ version: 1.0.0
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.5.1
29
+ version: 1.0.0
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