remockable 0.3.2 → 0.3.3

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: dad8f07d7c08c5c6eed18c23b3c9b0f969ecd05b
4
- data.tar.gz: 2479532b5c0a6e75736ebfb98145866d17d727ab
3
+ metadata.gz: 9bb3b7e37b2ac626198580bd22c90b9a4c18171f
4
+ data.tar.gz: d9073144ae904365b5e5ccb56d27484f81588d5f
5
5
  SHA512:
6
- metadata.gz: 184bae3a39850bc84632b23aa56f5c75ca7e1fcec943ecdf6949e27924f40d705a6da2bb8e93aa04b8847c2f11a5af32f23e1c8a44f8e8712d6b2a144a74144f
7
- data.tar.gz: c4c5864043a9a1f5edb30e6bf2a3b17497426337af07ab02fb81aaa37a82e13b57f6f9a1c5cf8abd226c48aa92443a26e98bdbdd42855eb50f8f9392381ccd7d
6
+ metadata.gz: 35e6b8ed0005b93889b45304868e22dfd57630507f61dc76438b8d8f70dea25cc92dcb0ee6965873de13c976955a309481de3027ce6f657b1c77455dbf802072
7
+ data.tar.gz: 7af9f8eaefd19df6e7e318b9e6b9975269dca8b6f720fbebcbe34e556a886ad90e3defab7cda7701d18359f7c4e9cf9cdb53b3beb2267f479689b282442309be
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.3 (2017-01-16)
4
+
5
+ * Add `:required`/`:optional` to `belong_to` ([Tyler Hunt][tylerhunt])
6
+
3
7
  ## 0.3.2 (2017-01-16)
4
8
 
5
9
  * Support Rails 5.0 ([Tyler Hunt][tylerhunt])
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- remockable (0.3.1)
4
+ remockable (0.3.3)
5
5
  activemodel (>= 4.0, < 5.1)
6
6
  activerecord (>= 4.0, < 5.1)
7
7
  activesupport (>= 4.0, < 5.1)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- remockable (0.3.1)
4
+ remockable (0.3.3)
5
5
  activemodel (>= 4.0, < 5.1)
6
6
  activerecord (>= 4.0, < 5.1)
7
7
  activesupport (>= 4.0, < 5.1)
@@ -9,8 +9,10 @@ RSpec::Matchers.define(:belong_to) do
9
9
  foreign_key
10
10
  foreign_type
11
11
  inverse_of
12
+ optional
12
13
  polymorphic
13
14
  primary_key
15
+ required
14
16
  touch
15
17
  validate
16
18
  )
@@ -1,3 +1,3 @@
1
1
  module Remockable
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
@@ -53,5 +53,11 @@ describe :belong_to do
53
53
  with_option :autosave, true, false
54
54
  with_option :touch, true, false
55
55
  with_option :inverse_of, :users, :employees
56
+
57
+ if ActiveRecord.version > Gem::Version.new('5.0')
58
+ with_option :optional, true, false
59
+ else
60
+ with_option :required, true, false
61
+ end
56
62
  end
57
63
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remockable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Hunt