friendly_id-mobility 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69b790ec58bf14c3f05856bd1389093cadcdb1ef
4
- data.tar.gz: 0aeace157739811519eac99348a10a71174ba40e
3
+ metadata.gz: 0b51c8b6945cfbfdb04e4d83b6ae72e171a18947
4
+ data.tar.gz: 8faf6354831c3abc991fe515338aa76a2098cd28
5
5
  SHA512:
6
- metadata.gz: 72fe6766c35581feccb09092fda83af5c23fae059394a2b4baf8460e1127ce9ccb403a1c86de7a8878b52ad7726fbe34e5068754300b7afe01622cfe173572dd
7
- data.tar.gz: c1cd04afb40ab7c4b96c27407a3daa1b0468e10bffd34ced4807bbee18264a8440a2be283039da0531e4b409e63a55ceeaf4fab5b001208e3b77f24ad6b4a233
6
+ metadata.gz: 391d0a0d9e78319e18cdc99ddf3b3419293a76321b7d7c45da8f65662968993951570f9cc6ed0593e92de9ec4825efee3ad61e3a4ce7142cd9eff225455a5509
7
+ data.tar.gz: 82d40ae082ed44dc2a742faaf93af442fe2e9fa7b0ba7add77da829ce3049618e9dfad4e4b967c6ab9ff3b1e58af3c284b9ea8724f754bbd773ca74e522d33a9
data/CHANGELOG.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ## 0.3
4
4
 
5
+ ### 0.3.1
6
+ * Use `Mobility.query_method` instead of hard-coding `i18n` scope.
7
+
5
8
  ### 0.3.0
6
9
  * Add support for history module ([#2](https://github.com/shioyama/friendly_id-mobility/pull/2))
7
10
 
data/Gemfile CHANGED
@@ -8,8 +8,12 @@ group :development, :test do
8
8
 
9
9
  gem 'sqlite3'
10
10
 
11
+ if ENV['RAILS_VERSION'] == '5.1'
12
+ gem 'rails', '>= 5.1', '< 5.2'
13
+ else
14
+ gem 'rails', '>= 5.0', '< 5.1'
15
+ end
16
+
11
17
  gem 'pry'
12
18
  gem 'pry-byebug'
13
-
14
- gem 'guard-rspec'
15
19
  end
data/Gemfile.lock CHANGED
@@ -1,86 +1,82 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- friendly_id-mobility (0.2.0)
4
+ friendly_id-mobility (0.3.0)
5
5
  friendly_id (>= 5.0.0, <= 5.3.0)
6
- mobility (~> 0.1.12)
6
+ mobility (~> 0.1.13)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionpack (5.0.2)
12
- actionview (= 5.0.2)
13
- activesupport (= 5.0.2)
11
+ actioncable (5.1.1)
12
+ actionpack (= 5.1.1)
13
+ nio4r (~> 2.0)
14
+ websocket-driver (~> 0.6.1)
15
+ actionmailer (5.1.1)
16
+ actionpack (= 5.1.1)
17
+ actionview (= 5.1.1)
18
+ activejob (= 5.1.1)
19
+ mail (~> 2.5, >= 2.5.4)
20
+ rails-dom-testing (~> 2.0)
21
+ actionpack (5.1.1)
22
+ actionview (= 5.1.1)
23
+ activesupport (= 5.1.1)
14
24
  rack (~> 2.0)
15
25
  rack-test (~> 0.6.3)
16
26
  rails-dom-testing (~> 2.0)
17
27
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
18
- actionview (5.0.2)
19
- activesupport (= 5.0.2)
28
+ actionview (5.1.1)
29
+ activesupport (= 5.1.1)
20
30
  builder (~> 3.1)
21
- erubis (~> 2.7.0)
31
+ erubi (~> 1.4)
22
32
  rails-dom-testing (~> 2.0)
23
33
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
24
- activemodel (5.0.2)
25
- activesupport (= 5.0.2)
26
- activerecord (5.0.2)
27
- activemodel (= 5.0.2)
28
- activesupport (= 5.0.2)
29
- arel (~> 7.0)
30
- activesupport (5.0.2)
34
+ activejob (5.1.1)
35
+ activesupport (= 5.1.1)
36
+ globalid (>= 0.3.6)
37
+ activemodel (5.1.1)
38
+ activesupport (= 5.1.1)
39
+ activerecord (5.1.1)
40
+ activemodel (= 5.1.1)
41
+ activesupport (= 5.1.1)
42
+ arel (~> 8.0)
43
+ activesupport (5.1.1)
31
44
  concurrent-ruby (~> 1.0, >= 1.0.2)
32
45
  i18n (~> 0.7)
33
46
  minitest (~> 5.1)
34
47
  tzinfo (~> 1.1)
35
- arel (7.1.4)
48
+ arel (8.0.0)
36
49
  builder (3.2.3)
37
50
  byebug (9.0.6)
38
51
  coderay (1.1.1)
39
52
  concurrent-ruby (1.0.5)
40
53
  database_cleaner (1.5.3)
41
54
  diff-lcs (1.3)
42
- erubis (2.7.0)
43
- ffi (1.9.18)
44
- formatador (0.2.5)
45
- friendly_id (5.2.0)
55
+ erubi (1.6.0)
56
+ friendly_id (5.2.1)
46
57
  activerecord (>= 4.0.0)
47
- generator_spec (0.9.3)
58
+ generator_spec (0.9.4)
48
59
  activesupport (>= 3.0.0)
49
60
  railties (>= 3.0.0)
50
- guard (2.14.1)
51
- formatador (>= 0.2.4)
52
- listen (>= 2.7, < 4.0)
53
- lumberjack (~> 1.0)
54
- nenv (~> 0.1)
55
- notiffany (~> 0.0)
56
- pry (>= 0.9.12)
57
- shellany (~> 0.0)
58
- thor (>= 0.18.1)
59
- guard-compat (1.2.1)
60
- guard-rspec (4.7.3)
61
- guard (~> 2.1)
62
- guard-compat (~> 1.1)
63
- rspec (>= 2.99.0, < 4.0)
64
- i18n (0.8.1)
65
- listen (3.1.5)
66
- rb-fsevent (~> 0.9, >= 0.9.4)
67
- rb-inotify (~> 0.9, >= 0.9.7)
68
- ruby_dep (~> 1.2)
61
+ globalid (0.4.0)
62
+ activesupport (>= 4.2.0)
63
+ i18n (0.8.4)
69
64
  loofah (2.0.3)
70
65
  nokogiri (>= 1.5.9)
71
- lumberjack (1.0.11)
66
+ mail (2.6.6)
67
+ mime-types (>= 1.16, < 4)
72
68
  method_source (0.8.2)
73
- mini_portile2 (2.1.0)
74
- minitest (5.10.1)
75
- mobility (0.1.12)
76
- i18n (>= 0.6.10)
69
+ mime-types (3.1)
70
+ mime-types-data (~> 3.2015)
71
+ mime-types-data (3.2016.0521)
72
+ mini_portile2 (2.2.0)
73
+ minitest (5.10.2)
74
+ mobility (0.1.18)
75
+ i18n (>= 0.6.10, < 0.9)
77
76
  request_store (~> 1.0)
78
- nenv (0.3.0)
79
- nokogiri (1.7.1)
80
- mini_portile2 (~> 2.1.0)
81
- notiffany (0.1.1)
82
- nenv (~> 0.1)
83
- shellany (~> 0.0)
77
+ nio4r (2.1.0)
78
+ nokogiri (1.8.0)
79
+ mini_portile2 (~> 2.2.0)
84
80
  pry (0.10.4)
85
81
  coderay (~> 1.1.0)
86
82
  method_source (~> 0.8.1)
@@ -88,46 +84,63 @@ GEM
88
84
  pry-byebug (3.4.2)
89
85
  byebug (~> 9.0)
90
86
  pry (~> 0.10)
91
- rack (2.0.1)
87
+ rack (2.0.3)
92
88
  rack-test (0.6.3)
93
89
  rack (>= 1.0)
94
- rails-dom-testing (2.0.2)
95
- activesupport (>= 4.2.0, < 6.0)
96
- nokogiri (~> 1.6)
90
+ rails (5.1.1)
91
+ actioncable (= 5.1.1)
92
+ actionmailer (= 5.1.1)
93
+ actionpack (= 5.1.1)
94
+ actionview (= 5.1.1)
95
+ activejob (= 5.1.1)
96
+ activemodel (= 5.1.1)
97
+ activerecord (= 5.1.1)
98
+ activesupport (= 5.1.1)
99
+ bundler (>= 1.3.0, < 2.0)
100
+ railties (= 5.1.1)
101
+ sprockets-rails (>= 2.0.0)
102
+ rails-dom-testing (2.0.3)
103
+ activesupport (>= 4.2.0)
104
+ nokogiri (>= 1.6)
97
105
  rails-html-sanitizer (1.0.3)
98
106
  loofah (~> 2.0)
99
- railties (5.0.2)
100
- actionpack (= 5.0.2)
101
- activesupport (= 5.0.2)
107
+ railties (5.1.1)
108
+ actionpack (= 5.1.1)
109
+ activesupport (= 5.1.1)
102
110
  method_source
103
111
  rake (>= 0.8.7)
104
112
  thor (>= 0.18.1, < 2.0)
105
- rake (10.5.0)
106
- rb-fsevent (0.9.8)
107
- rb-inotify (0.9.8)
108
- ffi (>= 0.5.0)
113
+ rake (12.0.0)
109
114
  request_store (1.3.2)
110
- rspec (3.5.0)
111
- rspec-core (~> 3.5.0)
112
- rspec-expectations (~> 3.5.0)
113
- rspec-mocks (~> 3.5.0)
114
- rspec-core (3.5.4)
115
- rspec-support (~> 3.5.0)
116
- rspec-expectations (3.5.0)
115
+ rspec (3.6.0)
116
+ rspec-core (~> 3.6.0)
117
+ rspec-expectations (~> 3.6.0)
118
+ rspec-mocks (~> 3.6.0)
119
+ rspec-core (3.6.0)
120
+ rspec-support (~> 3.6.0)
121
+ rspec-expectations (3.6.0)
117
122
  diff-lcs (>= 1.2.0, < 2.0)
118
- rspec-support (~> 3.5.0)
119
- rspec-mocks (3.5.0)
123
+ rspec-support (~> 3.6.0)
124
+ rspec-mocks (3.6.0)
120
125
  diff-lcs (>= 1.2.0, < 2.0)
121
- rspec-support (~> 3.5.0)
122
- rspec-support (3.5.0)
123
- ruby_dep (1.5.0)
124
- shellany (0.0.1)
126
+ rspec-support (~> 3.6.0)
127
+ rspec-support (3.6.0)
125
128
  slop (3.6.0)
129
+ sprockets (3.7.1)
130
+ concurrent-ruby (~> 1.0)
131
+ rack (> 1, < 3)
132
+ sprockets-rails (3.2.0)
133
+ actionpack (>= 4.0)
134
+ activesupport (>= 4.0)
135
+ sprockets (>= 3.0.0)
126
136
  sqlite3 (1.3.13)
127
137
  thor (0.19.4)
128
138
  thread_safe (0.3.6)
129
139
  tzinfo (1.2.3)
130
140
  thread_safe (~> 0.1)
141
+ websocket-driver (0.6.5)
142
+ websocket-extensions (>= 0.1.0)
143
+ websocket-extensions (0.1.2)
131
144
 
132
145
  PLATFORMS
133
146
  ruby
@@ -137,12 +150,12 @@ DEPENDENCIES
137
150
  database_cleaner (~> 1.5.3)
138
151
  friendly_id-mobility!
139
152
  generator_spec (~> 0.9.3)
140
- guard-rspec
141
153
  pry
142
154
  pry-byebug
155
+ rails (>= 5.1, < 5.2)
143
156
  rake
144
157
  rspec (~> 3.0)
145
158
  sqlite3
146
159
 
147
160
  BUNDLED WITH
148
- 1.12.5
161
+ 1.15.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.3.0'
19
+ gem 'friendly_id-mobility', '~> 0.3.1'
20
20
  ```
21
21
 
22
22
  And then execute:
@@ -31,18 +31,22 @@ Or install it yourself as:
31
31
  gem install friendly_id-mobility
32
32
  ```
33
33
 
34
- Run the Mobility generator and migrate:
34
+ Run the Mobility generator:
35
35
 
36
36
  ```
37
37
  rails generate mobility:install
38
- rake db:migrate
39
38
  ```
40
39
 
41
- Run the FriendlyId generator, without the migration to generate the slugs
42
- table:
40
+ Run the FriendlyId generator:
41
+
42
+ ```
43
+ rails generate friendly_id
44
+ ```
45
+
46
+ And migrate to generate Mobility and FriendlyId tables:
43
47
 
44
48
  ```
45
- rails generate friendly_id --skip-migration
49
+ rake db:migrate
46
50
  ```
47
51
 
48
52
  You're ready to go!
@@ -1,5 +1,5 @@
1
1
  module FriendlyId
2
2
  module Mobility
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
@@ -19,7 +19,7 @@ module FriendlyId
19
19
 
20
20
  mod = Module.new do
21
21
  def friendly
22
- super.i18n
22
+ super.send(::Mobility.query_method)
23
23
  end
24
24
  end
25
25
  model_class.send :extend, mod
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.3.0
4
+ version: 0.3.1
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-04-11 00:00:00.000000000 Z
11
+ date: 2017-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mobility
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.12
19
+ version: 0.1.13
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.1.12
26
+ version: 0.1.13
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: friendly_id
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -91,6 +91,9 @@ dependencies:
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '1.5'
96
+ - - ">="
94
97
  - !ruby/object:Gem::Version
95
98
  version: 1.5.3
96
99
  type: :development
@@ -98,6 +101,9 @@ dependencies:
98
101
  version_requirements: !ruby/object:Gem::Requirement
99
102
  requirements:
100
103
  - - "~>"
104
+ - !ruby/object:Gem::Version
105
+ version: '1.5'
106
+ - - ">="
101
107
  - !ruby/object:Gem::Version
102
108
  version: 1.5.3
103
109
  - !ruby/object:Gem::Dependency
@@ -154,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
160
  version: '0'
155
161
  requirements: []
156
162
  rubyforge_project:
157
- rubygems_version: 2.4.5.1
163
+ rubygems_version: 2.6.12
158
164
  signing_key:
159
165
  specification_version: 4
160
166
  summary: Translate your FriendlyId slugs with Mobility.