hashid-rails 1.2.0 → 1.2.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
  SHA1:
3
- metadata.gz: 507694ba57b2e4a2bcdfa90869828753f0cb30d1
4
- data.tar.gz: 91496f73e9b29be5cb2a4c72693de1f60c545b08
3
+ metadata.gz: 6796fd1b0c38d1df8d7fcd78d34b94d33f4a3369
4
+ data.tar.gz: d350084ba5b79ab7a1a8ad0804971a9ab63602f6
5
5
  SHA512:
6
- metadata.gz: 661591b2767fae3adc5556e7e6c78fe912cbad133fedcd4266ee1d2317fc82cd29afe6fdf9d2870b2f4ce41d3f4e89fa7d56c0cc23ea5eed20c475eb96460006
7
- data.tar.gz: 01c86a260f13fa72a9a253175ff3728d583ee41a70fc2e1960546efe0f716994ef2c4c2b7abe59218745543c501542dcd2abf62f93e8b54fa037b32472eae0e1
6
+ metadata.gz: 7ef74a3bfaae4abc770f454c40904c8a3d011d730957fbd80177249c9c8486d52e9d41796f654df243b63ab97b57c9547aa8868635bab88b51d0bb6df505e863
7
+ data.tar.gz: 625758b6b7f65a6a470b7bfbdabc53b5eaee834d8c26dbdc3c73f2a55ef975ba58fb5bb6c7b5985b08128751f91aee7d8db6a9578401973e5188aad06db2d371
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.1 (2018-01-13)
4
+ - Found issue where unsigned hashids with `find` did not fall back to passed in ID ([#46](https://github.com/jcypret/hashid-rails/pull/46)).
5
+ - Move finder specs to a shared example run against both the signed and unsigned hashids.
6
+
3
7
  ## 1.2.0 (2017-11-17)
4
8
  - Fix regression where `find_by_hashid` and `find_by_hashid!` attempt to decode
5
9
  values that are not hashids. ([#41](https://github.com/jcypret/hashid-rails/pull/41))
data/README.md CHANGED
@@ -18,7 +18,7 @@ be added or removed at any time.
18
18
  Add this line to your application's Gemfile:
19
19
 
20
20
  ```ruby
21
- gem 'hashid-rails', '~> 1.0'
21
+ gem "hashid-rails", "~> 1.0"
22
22
  ```
23
23
 
24
24
  And then execute:
@@ -27,12 +27,6 @@ And then execute:
27
27
  $ bundle
28
28
  ```
29
29
 
30
- Or install it yourself as:
31
-
32
- ```shell
33
- $ gem install hashid-rails -v 1.0
34
- ```
35
-
36
30
  ## Basic Usage
37
31
 
38
32
  1. Include Hashid Rails in the ActiveRecord model you'd like to enable hashids.
@@ -105,7 +105,7 @@ module Hashid
105
105
  if Hashid::Rails.configuration.sign_hashids
106
106
  valid_hashid?(decoded_hashid) ? decoded_hashid.last : fallback_value
107
107
  else
108
- decoded_hashid.first
108
+ decoded_hashid.first || fallback_value
109
109
  end
110
110
  end
111
111
 
@@ -1,5 +1,5 @@
1
1
  module Hashid
2
2
  module Rails
3
- VERSION = "1.2.0".freeze
3
+ VERSION = "1.2.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hashid-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Cypret
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-18 00:00:00.000000000 Z
11
+ date: 2018-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler