friendly_id 5.4.0 → 5.4.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
2
  SHA256:
3
- metadata.gz: 6fa83b80901ae7c4930b4a0dea61544152f2cc4a7d94b828c2f52e807fb5d686
4
- data.tar.gz: b5db403619e2d9bc275d567dc9f567fb943316e1222bc9c6052e43a285b92116
3
+ metadata.gz: ba26f9f615f068d0094f6646a6c6a5aceef44b59bde321aa168542b62420402f
4
+ data.tar.gz: 155666a337c2162adc31c2b3337867a7086b63cba390d6d9c6ca8486b7d663d6
5
5
  SHA512:
6
- metadata.gz: f8c8bef9ec1e0a42103fa813d40b087bcb84c1f3148f73d53d21fde568865b9a6dc0a2c83508431a2ffa2c2b09bf7f3d26e49b30ac09a758e39dd02323aff328
7
- data.tar.gz: 0f78de10e8d9597728e554dc53949318f23a5771adb8014b23172c204f550c48b5f2222f8df144a4368d5f34560f01051a5f42183fcac415f85ad9e1bfb262e4
6
+ metadata.gz: bc67ddc3c8940a7b0bcf0c918c0f5f398e1f484d72fde5fa7f1136035d34ac77a25b0db3ac4070fc0abd21abe926e2d15bc9f536e4f57ddb0dcd84c4f787b1b0
7
+ data.tar.gz: 1e590565fff83c890ee04dede81e518c98912214dc3122690763ee1731559fd337421bd05c4d201224cddd67891416054a81e7d8b0bbc24acfc2e6661e5ebe03
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -0,0 +1 @@
1
+ github: parndt
@@ -1,5 +1,5 @@
1
1
  # Number of days of inactivity before an issue becomes stale
2
- daysUntilStale: 42
2
+ daysUntilStale: 84
3
3
  # Number of days of inactivity before a stale issue is closed
4
4
  daysUntilClose: 7
5
5
  # Issues with these labels will never be considered stale
@@ -11,8 +11,8 @@ jobs:
11
11
  matrix:
12
12
  architecture: [ x64 ]
13
13
  database: [ mysql, postgresql ]
14
- gemfile: [ '6.0', '5.2', '5.1', '5.0' ]
15
- ruby: [ '2.6.x', '2.5.x' ]
14
+ gemfile: [ '6.0', '5.2' ]
15
+ ruby: [ '2.7.x', '2.6.x', '2.5.x' ]
16
16
  fail-fast: false
17
17
  runs-on: ubuntu-latest
18
18
  name: ${{ matrix.ruby }} ${{ matrix.database }} rails-${{ matrix.gemfile }}
@@ -22,10 +22,10 @@ jobs:
22
22
  architecture: ${{ matrix.architecture }}
23
23
  ruby-version: ${{ matrix.ruby }}
24
24
  version: ${{ matrix.ruby }}
25
- - uses: actions/checkout@v1
25
+ - uses: actions/checkout@v2
26
26
  - run: sudo apt-get update && sudo apt-get install libpq-dev postgresql-client libmysqlclient-dev mysql-client libsqlite3-dev -y
27
27
  - id: cache-bundler
28
- uses: actions/cache@v1
28
+ uses: actions/cache@v2
29
29
  with:
30
30
  path: vendor/bundle
31
31
  key: ${{ matrix.ruby }}-gem-${{ hashFiles(format('gemfiles/Gemfile.rails-{0}.rb', matrix.gemfile)) }}
@@ -5,6 +5,10 @@ suggestions, ideas and improvements to FriendlyId.
5
5
 
6
6
  ## Unreleased
7
7
 
8
+ ## 5.4.1 (2020-11-06)
9
+
10
+ * Fix unexpected `:slug` error on valid, unpersisted model ([#952](https://github.com/norman/friendly_id/pull/952))
11
+
8
12
  ## 5.4.0 (2020-08-14)
9
13
 
10
14
  * Fix Ruby 2.7 keyword params deprecation warning ([#939](https://github.com/norman/friendly_id/pull/939))
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  [![Build Status](https://github.com/norman/friendly_id/workflows/CI/badge.svg)](https://github.com/norman/friendly_id/actions)
2
2
  [![Code Climate](https://codeclimate.com/github/norman/friendly_id.svg)](https://codeclimate.com/github/norman/friendly_id)
3
- [![Inline docs](http://inch-ci.org/github/norman/friendly_id.svg?branch=master)](http://inch-ci.org/github/norman/friendly_id)
3
+ [![Inline docs](https://inch-ci.org/github/norman/friendly_id.svg?branch=master)](https://inch-ci.org/github/norman/friendly_id)
4
4
 
5
5
  # FriendlyId
6
6
 
7
- **For the most complete, user-friendly documentation, see the [FriendlyId Guide](http://norman.github.io/friendly_id/file.Guide.html).**
7
+ **For the most complete, user-friendly documentation, see the [FriendlyId Guide](https://norman.github.io/friendly_id/file.Guide.html).**
8
8
 
9
9
  FriendlyId is the "Swiss Army bulldozer" of slugging and permalink plugins for
10
10
  Active Record. It lets you create pretty URLs and work with human-friendly
@@ -12,16 +12,16 @@ strings as if they were numeric ids.
12
12
 
13
13
  With FriendlyId, it's easy to make your application use URLs like:
14
14
 
15
- http://example.com/states/washington
15
+ https://example.com/states/washington
16
16
 
17
17
  instead of:
18
18
 
19
- http://example.com/states/4323454
19
+ https://example.com/states/4323454
20
20
 
21
21
 
22
22
  ## Getting Help
23
23
 
24
- Ask questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/friendly-id)
24
+ Ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/friendly-id)
25
25
  using the "friendly-id" tag, and for bugs have a look at [the bug section](https://github.com/norman/friendly_id#bugs)
26
26
 
27
27
  ## FriendlyId Features
@@ -39,9 +39,11 @@ FriendlyId offers many advanced features, including:
39
39
  Add this line to your application's Gemfile:
40
40
 
41
41
  ```ruby
42
- gem 'friendly_id', '~> 5.2.4' # Note: You MUST use 5.0.0 or greater for Rails 4.0+
42
+ gem 'friendly_id', '~> 5.4.0'
43
43
  ```
44
44
 
45
+ Note: You MUST use 5.0.0 or greater for Rails 4.0+.
46
+
45
47
  And then execute:
46
48
 
47
49
  ```shell
@@ -105,7 +107,7 @@ User.find_each(&:save)
105
107
  ## Bugs
106
108
 
107
109
  Please report them on the [Github issue
108
- tracker](http://github.com/norman/friendly_id/issues) for this project.
110
+ tracker](https://github.com/norman/friendly_id/issues) for this project.
109
111
 
110
112
  If you have a bug to report, please include the following information:
111
113
 
@@ -131,7 +133,7 @@ volunteers](https://github.com/norman/friendly_id/contributors).
131
133
 
132
134
  ## License
133
135
 
134
- Copyright (c) 2008-2016 Norman Clarke and contributors, released under the MIT
136
+ Copyright (c) 2008-2020 Norman Clarke and contributors, released under the MIT
135
137
  license.
136
138
 
137
139
  Permission is hereby granted, free of charge, to any person obtaining a copy of
@@ -375,7 +375,7 @@ Github issue](https://github.com/norman/friendly_id/issues/185) for discussion.
375
375
  private :slug_generator
376
376
 
377
377
  def unset_slug_if_invalid
378
- if errors[friendly_id_config.query_field].present? && attribute_changed?(friendly_id_config.query_field.to_s)
378
+ if errors.key?(friendly_id_config.query_field) && attribute_changed?(friendly_id_config.query_field.to_s)
379
379
  diff = changes[friendly_id_config.query_field]
380
380
  send "#{friendly_id_config.slug_column}=", diff.first
381
381
  end
@@ -1,3 +1,3 @@
1
1
  module FriendlyId
2
- VERSION = '5.4.0'.freeze
2
+ VERSION = '5.4.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: friendly_id
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.0
4
+ version: 5.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Norman Clarke
@@ -35,7 +35,7 @@ cert_chain:
35
35
  Hsej0MQ3drCB1eA4c9OXdCUQJnY2aLTq3uNvTbZvoTgWK55eq3KLBJ4zzoKZ4tBX
36
36
  /HIFI/fEwYlI1Ji3oikUrHkc4rWgaQ==
37
37
  -----END CERTIFICATE-----
38
- date: 2020-08-13 00:00:00.000000000 Z
38
+ date: 2020-11-06 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: activerecord
@@ -175,6 +175,7 @@ extensions: []
175
175
  extra_rdoc_files: []
176
176
  files:
177
177
  - ".gemtest"
178
+ - ".github/FUNDING.yml"
178
179
  - ".github/stale.yml"
179
180
  - ".github/workflows/test.yml"
180
181
  - ".gitignore"
@@ -189,8 +190,6 @@ files:
189
190
  - bench.rb
190
191
  - certs/parndt.pem
191
192
  - friendly_id.gemspec
192
- - gemfiles/Gemfile.rails-5.0.rb
193
- - gemfiles/Gemfile.rails-5.1.rb
194
193
  - gemfiles/Gemfile.rails-5.2.rb
195
194
  - gemfiles/Gemfile.rails-6.0.rb
196
195
  - guide.rb
@@ -254,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
254
253
  - !ruby/object:Gem::Version
255
254
  version: '0'
256
255
  requirements: []
257
- rubygems_version: 3.1.2
256
+ rubygems_version: 3.1.4
258
257
  signing_key:
259
258
  specification_version: 4
260
259
  summary: A comprehensive slugging and pretty-URL plugin.
metadata.gz.sig CHANGED
Binary file
@@ -1,28 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec path: '../'
4
-
5
- gem 'activerecord', '~> 5.0.0'
6
- gem 'railties', '~> 5.0.0'
7
- gem 'i18n', '~> 0.7.0'
8
-
9
- # Database Configuration
10
- group :development, :test do
11
- platforms :jruby do
12
- gem 'activerecord-jdbcmysql-adapter', '~> 50.1'
13
- gem 'activerecord-jdbcpostgresql-adapter', '~> 50.1'
14
- gem 'kramdown'
15
- end
16
-
17
- platforms :ruby, :rbx do
18
- gem 'sqlite3'
19
- gem 'mysql2'
20
- gem 'pg'
21
- gem 'redcarpet'
22
- end
23
-
24
- platforms :rbx do
25
- gem 'rubysl', '~> 2.0'
26
- gem 'rubinius-developer_tools'
27
- end
28
- end
@@ -1,27 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec path: '../'
4
-
5
- gem 'activerecord', '~> 5.1.0'
6
- gem 'railties', '~> 5.1.0'
7
-
8
- # Database Configuration
9
- group :development, :test do
10
- platforms :jruby do
11
- gem 'activerecord-jdbcmysql-adapter', '~> 50.1'
12
- gem 'activerecord-jdbcpostgresql-adapter', '~> 50.1'
13
- gem 'kramdown'
14
- end
15
-
16
- platforms :ruby, :rbx do
17
- gem 'sqlite3'
18
- gem 'mysql2'
19
- gem 'pg'
20
- gem 'redcarpet'
21
- end
22
-
23
- platforms :rbx do
24
- gem 'rubysl', '~> 2.0'
25
- gem 'rubinius-developer_tools'
26
- end
27
- end