friendly_id-mobility 0.4.0 → 0.5.5

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: b4f99a905e1b2c57169901565f565febec84b673
4
- data.tar.gz: 9a61756f64068b77af37442b43410ac58cd9f2b9
2
+ SHA256:
3
+ metadata.gz: 840900ad6048793b334abe0cd05aa0ed6fc2b73e66d57c09c29f8a1506f5bf05
4
+ data.tar.gz: 3966104a341f8c62d16ea49c7aa717ccbff308fb08febd25ccb51c377119accf
5
5
  SHA512:
6
- metadata.gz: d56f68ae5a32df021057cb2e7e8674c5fee4a5aa4798ab8275cefa83e6ce7ca865af3a276e756c4b307fb56174fe8caddd53a20ce41f3caec0fde5cb5afbfd01
7
- data.tar.gz: 110371836ae8b88626c8a4cf2970c9e44548f8174b1aec5d623b15adb2fa9fb90720b435ded6e218d5c827df3888f69b563547d72b1c1e1c03f29b3d3018ff8c
6
+ metadata.gz: f7fee8e50ecec64024d8738e704c3b22ae2d5994d3903fceb70d63db8b99f4656bbe8fbadde824c4cd6ac8ead12f7f40e66adf6752d8660f203258f34cc27fe8
7
+ data.tar.gz: 43fda09d04218706315833a63c0ddc40bbc76998a93c8f00ccdfbee923eafbf8420c9cdc6bdb88e00f2ef46926b54d24410bb9e0656f63f874fd72d17c03e468
@@ -1,5 +1,24 @@
1
1
  # FriendlyId Mobility Changelog
2
2
 
3
+ ## 0.5
4
+
5
+ ### 0.5.5
6
+ * Bump friendly_id dependency version to 5.4.0
7
+ ([#19](https://github.com/shioyama/friendly_id-mobility/pull/19/files))
8
+
9
+ ### 0.5.4
10
+ * Generate all translated slugs when model is saved
11
+ ([#12](https://github.com/shioyama/friendly_id-mobility/pull/12))
12
+
13
+ ### 0.5.3
14
+ * Update gemspec to allow all Mobility versions < 1.0
15
+
16
+ ### 0.5.2
17
+ * Emit warning when mobility is enabled with finders add-on
18
+
19
+ ### 0.5.1
20
+ * Update Mobility dependency to >= 0.3, < 0.4
21
+
3
22
  ## 0.4
4
23
 
5
24
  ### 0.4.0
data/Gemfile CHANGED
@@ -6,12 +6,18 @@ gemspec
6
6
  group :development, :test do
7
7
  gem 'rake'
8
8
 
9
- gem 'sqlite3'
9
+ if ENV['RAILS_VERSION'] && ENV['RAILS_VERSION'] < '5.2'
10
+ gem 'sqlite3', '~> 1.3.13'
11
+ else
12
+ gem 'sqlite3'
13
+ end
10
14
 
11
15
  if ENV['RAILS_VERSION'] == '5.1'
12
16
  gem 'rails', '>= 5.1', '< 5.2'
13
- else
17
+ elsif ENV['RAILS_VERSION'] == '5.0'
14
18
  gem 'rails', '>= 5.0', '< 5.1'
19
+ else
20
+ gem 'rails', '>= 5.2.0.rc2', '< 5.3'
15
21
  end
16
22
 
17
23
  gem 'pry'
@@ -1,161 +1,168 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- friendly_id-mobility (0.3.0)
5
- friendly_id (>= 5.0.0, <= 5.3.0)
6
- mobility (~> 0.1.13)
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.1.1)
12
- actionpack (= 5.1.1)
11
+ actioncable (5.2.4.2)
12
+ actionpack (= 5.2.4.2)
13
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)
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)
19
19
  mail (~> 2.5, >= 2.5.4)
20
20
  rails-dom-testing (~> 2.0)
21
- actionpack (5.1.1)
22
- actionview (= 5.1.1)
23
- activesupport (= 5.1.1)
24
- rack (~> 2.0)
25
- rack-test (~> 0.6.3)
21
+ actionpack (5.2.4.2)
22
+ actionview (= 5.2.4.2)
23
+ activesupport (= 5.2.4.2)
24
+ rack (~> 2.0, >= 2.0.8)
25
+ rack-test (>= 0.6.3)
26
26
  rails-dom-testing (~> 2.0)
27
27
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
- actionview (5.1.1)
29
- activesupport (= 5.1.1)
28
+ actionview (5.2.4.2)
29
+ activesupport (= 5.2.4.2)
30
30
  builder (~> 3.1)
31
31
  erubi (~> 1.4)
32
32
  rails-dom-testing (~> 2.0)
33
33
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
- activejob (5.1.1)
35
- activesupport (= 5.1.1)
34
+ activejob (5.2.4.2)
35
+ activesupport (= 5.2.4.2)
36
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)
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)
46
+ marcel (~> 0.3.1)
47
+ activesupport (5.2.4.2)
44
48
  concurrent-ruby (~> 1.0, >= 1.0.2)
45
- i18n (~> 0.7)
49
+ i18n (>= 0.7, < 2)
46
50
  minitest (~> 5.1)
47
51
  tzinfo (~> 1.1)
48
- arel (8.0.0)
49
- builder (3.2.3)
50
- byebug (9.0.6)
51
- coderay (1.1.1)
52
- concurrent-ruby (1.0.5)
53
- database_cleaner (1.5.3)
52
+ arel (9.0.0)
53
+ builder (3.2.4)
54
+ byebug (11.1.1)
55
+ coderay (1.1.2)
56
+ concurrent-ruby (1.1.6)
57
+ crass (1.0.6)
58
+ database_cleaner (1.8.4)
54
59
  diff-lcs (1.3)
55
- erubi (1.6.0)
56
- friendly_id (5.2.1)
60
+ erubi (1.9.0)
61
+ friendly_id (5.4.0)
57
62
  activerecord (>= 4.0.0)
58
63
  generator_spec (0.9.4)
59
64
  activesupport (>= 3.0.0)
60
65
  railties (>= 3.0.0)
61
- globalid (0.4.0)
66
+ globalid (0.4.2)
62
67
  activesupport (>= 4.2.0)
63
- i18n (0.8.4)
64
- loofah (2.0.3)
68
+ i18n (1.8.2)
69
+ concurrent-ruby (~> 1.0)
70
+ loofah (2.5.0)
71
+ crass (~> 1.0.2)
65
72
  nokogiri (>= 1.5.9)
66
- mail (2.6.6)
67
- mime-types (>= 1.16, < 4)
68
- method_source (0.8.2)
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)
73
+ mail (2.7.1)
74
+ mini_mime (>= 0.1.1)
75
+ marcel (0.3.3)
76
+ mimemagic (~> 0.3.2)
77
+ method_source (1.0.0)
78
+ mimemagic (0.3.4)
79
+ mini_mime (1.0.2)
80
+ mini_portile2 (2.4.0)
81
+ minitest (5.14.0)
82
+ mobility (0.8.13)
83
+ i18n (>= 0.6.10, < 2)
76
84
  request_store (~> 1.0)
77
- nio4r (2.1.0)
78
- nokogiri (1.8.0)
79
- mini_portile2 (~> 2.2.0)
80
- pry (0.10.4)
81
- coderay (~> 1.1.0)
82
- method_source (~> 0.8.1)
83
- slop (~> 3.4)
84
- pry-byebug (3.4.2)
85
- byebug (~> 9.0)
86
- pry (~> 0.10)
87
- rack (2.0.3)
88
- rack-test (0.6.3)
89
- rack (>= 1.0)
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)
85
+ nio4r (2.5.2)
86
+ nokogiri (1.10.9)
87
+ mini_portile2 (~> 2.4.0)
88
+ pry (0.13.0)
89
+ coderay (~> 1.1)
90
+ method_source (~> 1.0)
91
+ pry-byebug (3.9.0)
92
+ byebug (~> 11.0)
93
+ pry (~> 0.13.0)
94
+ rack (2.2.2)
95
+ rack-test (1.1.0)
96
+ 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)
107
+ bundler (>= 1.3.0)
108
+ railties (= 5.2.4.2)
101
109
  sprockets-rails (>= 2.0.0)
102
110
  rails-dom-testing (2.0.3)
103
111
  activesupport (>= 4.2.0)
104
112
  nokogiri (>= 1.6)
105
- rails-html-sanitizer (1.0.3)
106
- loofah (~> 2.0)
107
- railties (5.1.1)
108
- actionpack (= 5.1.1)
109
- activesupport (= 5.1.1)
113
+ rails-html-sanitizer (1.3.0)
114
+ loofah (~> 2.3)
115
+ railties (5.2.4.2)
116
+ actionpack (= 5.2.4.2)
117
+ activesupport (= 5.2.4.2)
110
118
  method_source
111
119
  rake (>= 0.8.7)
112
- thor (>= 0.18.1, < 2.0)
113
- rake (12.0.0)
114
- request_store (1.3.2)
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)
120
+ thor (>= 0.19.0, < 2.0)
121
+ rake (13.0.1)
122
+ request_store (1.5.0)
123
+ 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)
122
131
  diff-lcs (>= 1.2.0, < 2.0)
123
- rspec-support (~> 3.6.0)
124
- rspec-mocks (3.6.0)
132
+ rspec-support (~> 3.9.0)
133
+ rspec-mocks (3.9.1)
125
134
  diff-lcs (>= 1.2.0, < 2.0)
126
- rspec-support (~> 3.6.0)
127
- rspec-support (3.6.0)
128
- slop (3.6.0)
129
- sprockets (3.7.1)
135
+ rspec-support (~> 3.9.0)
136
+ rspec-support (3.9.2)
137
+ sprockets (4.0.0)
130
138
  concurrent-ruby (~> 1.0)
131
139
  rack (> 1, < 3)
132
- sprockets-rails (3.2.0)
140
+ sprockets-rails (3.2.1)
133
141
  actionpack (>= 4.0)
134
142
  activesupport (>= 4.0)
135
143
  sprockets (>= 3.0.0)
136
- sqlite3 (1.3.13)
137
- thor (0.19.4)
144
+ sqlite3 (1.4.2)
145
+ thor (1.0.1)
138
146
  thread_safe (0.3.6)
139
- tzinfo (1.2.3)
147
+ tzinfo (1.2.7)
140
148
  thread_safe (~> 0.1)
141
- websocket-driver (0.6.5)
149
+ websocket-driver (0.7.1)
142
150
  websocket-extensions (>= 0.1.0)
143
- websocket-extensions (0.1.2)
151
+ websocket-extensions (0.1.4)
144
152
 
145
153
  PLATFORMS
146
154
  ruby
147
155
 
148
156
  DEPENDENCIES
149
- bundler (~> 1.12)
150
- database_cleaner (~> 1.5.3)
157
+ database_cleaner (~> 1.5, >= 1.5.3)
151
158
  friendly_id-mobility!
152
159
  generator_spec (~> 0.9.3)
153
160
  pry
154
161
  pry-byebug
155
- rails (>= 5.1, < 5.2)
162
+ rails (>= 5.2.0.rc2, < 5.3)
156
163
  rake
157
164
  rspec (~> 3.0)
158
165
  sqlite3
159
166
 
160
167
  BUNDLED WITH
161
- 1.15.0
168
+ 2.0.2
data/README.md CHANGED
@@ -3,9 +3,11 @@ FriendlyId Mobility
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/friendly_id-mobility.svg)][gem]
5
5
  [![Build Status](https://travis-ci.org/shioyama/friendly_id-mobility.svg?branch=master)][travis]
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
9
  [travis]: https://travis-ci.org/shioyama/friendly_id-mobility
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.3.1'
21
+ gem 'friendly_id-mobility', '~> 0.5.4'
20
22
  ```
21
23
 
22
24
  And then execute:
@@ -62,8 +64,8 @@ and with a translated base column.
62
64
 
63
65
  If you only want to translate the slug, include `Mobility` and translate the
64
66
  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`):
67
+ backend). Here, `name` is untranslated (so there is a column on the
68
+ `journalists` table named `name`):
67
69
 
68
70
  ```ruby
69
71
  class Journalist < ActiveRecord::Base
@@ -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
 
@@ -142,6 +144,10 @@ Article.friendly.find("mon-titre-foo")
142
144
  #=> #<Article id: 1 ...>
143
145
  ```
144
146
 
147
+ Note that this gem is not compatible with the `finders` add-on; using both
148
+ together will lead to unexpected results. To use these finder methods, you will
149
+ have to remove `finders` and explicitly call `friendly.find`, as above.
150
+
145
151
  ### Slug History
146
152
 
147
153
  To use the FriendlyId history module, use `use: [:history, :mobility]` when
@@ -171,15 +177,6 @@ rails generate friendly_id_mobility
171
177
 
172
178
  Then run the generated migration with `rake db:migrate`.
173
179
 
174
- Contributing
175
- ------------
176
-
177
- Bug reports and pull requests are welcome on GitHub at
178
- https://github.com/shioyama/friendly_id-mobility. This project is intended to
179
- be a safe, welcoming space for collaboration, and contributors are expected to
180
- adhere to the [Contributor Covenant](http://contributor-covenant.org) code of
181
- conduct.
182
-
183
180
  License
184
181
  -------
185
182
 
@@ -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)
@@ -42,21 +46,19 @@ module FriendlyId
42
46
  end
43
47
 
44
48
  def should_generate_new_friendly_id?
45
- send(friendly_id_config.slug_column).nil?
49
+ send(friendly_id_config.slug_column, locale: ::Mobility.locale).nil?
46
50
  end
47
51
 
48
- include(Module.new do
49
- def set_slug(normalized_slug = nil)
50
- super
51
- changed.each do |change|
52
- if change =~ /\A#{friendly_id_config.base}_([a-z]{2}(_[a-z]{2})?)/
53
- locale, suffix = $1.split('_'.freeze)
54
- locale = "#{locale}-#{suffix.upcase}".freeze if suffix
55
- ::Mobility.with_locale(locale) { super }
56
- 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 }
57
59
  end
58
60
  end
59
- end)
61
+ end
60
62
 
61
63
  module FinderMethods
62
64
  include ::FriendlyId::History::FinderMethods
@@ -1,5 +1,5 @@
1
1
  module FriendlyId
2
2
  module Mobility
3
- VERSION = "0.4.0"
3
+ VERSION = "0.5.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: friendly_id-mobility
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.5
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-08-18 00:00:00.000000000 Z
11
+ date: 2020-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mobility
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.5.1
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: 0.2.0
22
+ version: '1.0'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 0.5.1
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: 0.2.0
32
+ version: '1.0'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: friendly_id
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -33,7 +39,7 @@ dependencies:
33
39
  version: 5.0.0
34
40
  - - "<="
35
41
  - !ruby/object:Gem::Version
36
- version: 5.3.0
42
+ version: 5.4.0
37
43
  type: :runtime
38
44
  prerelease: false
39
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,35 +49,21 @@ dependencies:
43
49
  version: 5.0.0
44
50
  - - "<="
45
51
  - !ruby/object:Gem::Version
46
- version: 5.3.0
47
- - !ruby/object:Gem::Dependency
48
- name: bundler
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '1.12'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: '1.12'
52
+ version: 5.4.0
61
53
  - !ruby/object:Gem::Dependency
62
54
  name: rake
63
55
  requirement: !ruby/object:Gem::Requirement
64
56
  requirements:
65
- - - "~>"
57
+ - - ">="
66
58
  - !ruby/object:Gem::Version
67
- version: '10.0'
59
+ version: 12.3.3
68
60
  type: :development
69
61
  prerelease: false
70
62
  version_requirements: !ruby/object:Gem::Requirement
71
63
  requirements:
72
- - - "~>"
64
+ - - ">="
73
65
  - !ruby/object:Gem::Version
74
- version: '10.0'
66
+ version: 12.3.3
75
67
  - !ruby/object:Gem::Dependency
76
68
  name: rspec
77
69
  requirement: !ruby/object:Gem::Requirement
@@ -120,7 +112,7 @@ dependencies:
120
112
  - - "~>"
121
113
  - !ruby/object:Gem::Version
122
114
  version: 0.9.3
123
- description:
115
+ description:
124
116
  email:
125
117
  - chris@dejimata.com
126
118
  executables: []
@@ -128,10 +120,8 @@ extensions: []
128
120
  extra_rdoc_files: []
129
121
  files:
130
122
  - CHANGELOG.md
131
- - CODE_OF_CONDUCT.md
132
123
  - Gemfile
133
124
  - Gemfile.lock
134
- - Guardfile
135
125
  - LICENSE.txt
136
126
  - README.md
137
127
  - Rakefile
@@ -144,7 +134,7 @@ homepage: https://github.com/shioyama/friendly_id-mobility
144
134
  licenses:
145
135
  - MIT
146
136
  metadata: {}
147
- post_install_message:
137
+ post_install_message:
148
138
  rdoc_options: []
149
139
  require_paths:
150
140
  - lib
@@ -159,9 +149,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
149
  - !ruby/object:Gem::Version
160
150
  version: '0'
161
151
  requirements: []
162
- rubyforge_project:
163
- rubygems_version: 2.6.11
164
- signing_key:
152
+ rubygems_version: 3.0.6
153
+ signing_key:
165
154
  specification_version: 4
166
155
  summary: Translate your FriendlyId slugs with Mobility.
167
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