friendly_id-mobility 0.5.1 → 0.5.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
2
  SHA1:
3
- metadata.gz: de9aa7cea11757eea743444e754a82c88d764356
4
- data.tar.gz: 885d5f6ad1da91158f7b34f10094751ca0e6558a
3
+ metadata.gz: 2df7c0105249b1a307a373392076a8b318476606
4
+ data.tar.gz: 0d3b6bf660ceb101784f5e449f0d332d41bb5931
5
5
  SHA512:
6
- metadata.gz: 69a35cca185d44f94c89414a05e6ccab9655906af0a5aaac65373eefdec02275c3e2b9ebfaefcc09fb20983795219701643748c82533645c226203854d8926e3
7
- data.tar.gz: bc5d706cea3b64b90ae69da84f4090d0f0a0a251ceed6ec6410623c9e636e4e42c9894e0b2d19a17b792acfd24a7bb80ad0ea3a70381eee7d546fbe3c96a8927
6
+ metadata.gz: be2057b96d52d259d86e5959a1040c0d81bc5ff99ce98a32a0826711e47b55ffe528d45b65eb65251737097fd37d5aa28e467187b871612d9baff4b86b7ab4c2
7
+ data.tar.gz: 7a7c3dd1857ec3c44f78b81767adb222bec720c64d8777d965bb229b58c098c7dd349e177f073fb13b26df34788f2834256451da2cfd5051305afa93a47e8772
data/CHANGELOG.md CHANGED
@@ -1,10 +1,15 @@
1
1
  # FriendlyId Mobility Changelog
2
2
 
3
- ## 0.4
3
+ ## 0.5
4
+
5
+ ### 0.5.2
6
+ * Emit warning when mobility is enabled with finders add-on
4
7
 
5
- ### 0.5.0
8
+ ### 0.5.1
6
9
  * Update Mobility dependency to >= 0.3, < 0.4
7
10
 
11
+ ## 0.4
12
+
8
13
  ### 0.4.0
9
14
  * Update Mobility dependency to 0.2.x
10
15
 
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- friendly_id-mobility (0.5.0)
4
+ friendly_id-mobility (0.5.1)
5
5
  friendly_id (>= 5.0.0, <= 5.3.0)
6
- mobility (>= 0.2.0, < 0.4.0)
6
+ mobility (>= 0.3.0, < 0.4.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -72,7 +72,7 @@ GEM
72
72
  mini_mime (1.0.0)
73
73
  mini_portile2 (2.3.0)
74
74
  minitest (5.10.3)
75
- mobility (0.3.0)
75
+ mobility (0.3.6)
76
76
  i18n (>= 0.6.10, < 0.10)
77
77
  request_store (~> 1.0)
78
78
  nio4r (2.1.0)
@@ -157,4 +157,4 @@ DEPENDENCIES
157
157
  sqlite3
158
158
 
159
159
  BUNDLED WITH
160
- 1.16.0.pre.2
160
+ 1.16.0
data/README.md CHANGED
@@ -16,7 +16,7 @@ Installation
16
16
  Add this line to your application's Gemfile:
17
17
 
18
18
  ```ruby
19
- gem 'friendly_id-mobility', '~> 0.5.1'
19
+ gem 'friendly_id-mobility', '~> 0.5.2'
20
20
  ```
21
21
 
22
22
  And then execute:
@@ -62,8 +62,8 @@ and with a translated base column.
62
62
 
63
63
  If you only want to translate the slug, include `Mobility` and translate the
64
64
  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 `posts`
66
- table named `name`):
65
+ backend). Here, `name` is untranslated (so there is a column on the
66
+ `journalists` table named `name`):
67
67
 
68
68
  ```ruby
69
69
  class Journalist < ActiveRecord::Base
@@ -142,6 +142,10 @@ Article.friendly.find("mon-titre-foo")
142
142
  #=> #<Article id: 1 ...>
143
143
  ```
144
144
 
145
+ Note that this gem is not compatible with the `finders` add-on; using both
146
+ together will lead to unexpected results. To use these finder methods, you will
147
+ have to remove `finders` and explicitly call `friendly.find`, as above.
148
+
145
149
  ### Slug History
146
150
 
147
151
  To use the FriendlyId history module, use `use: [:history, :mobility]` when
@@ -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)
@@ -1,5 +1,5 @@
1
1
  module FriendlyId
2
2
  module Mobility
3
- VERSION = "0.5.1"
3
+ VERSION = "0.5.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.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Salzberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-30 00:00:00.000000000 Z
11
+ date: 2017-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mobility
@@ -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.13
169
+ rubygems_version: 2.6.14
170
170
  signing_key:
171
171
  specification_version: 4
172
172
  summary: Translate your FriendlyId slugs with Mobility.