tainbox 0.2.5 → 0.2.6

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: f3cdb8b1f3522aa2aa7727643d085dd51331b793
4
- data.tar.gz: da26b459da9500f1d165974c3c51a7f25eeb2a17
3
+ metadata.gz: 5c16f48e5255c848de788554b4319f35303f855f
4
+ data.tar.gz: c29904b5869f58c0fee2c51e89e33d9f11f21391
5
5
  SHA512:
6
- metadata.gz: c102942b369c5af93a4ad7501bfc7c31b65be312459bf77a4214959cb0473748dca9c46d6e547a8274fcb6a1ab8bdb3dc6afb6e876a99139539de277aca50333
7
- data.tar.gz: 55690f07a99f245640e1c46e3dcc80fbf181d7503d23c2149fbce6652ea42db1b144a67f042315673316cf0b3a8367f8ed8f3e366b941a0b0ab7ad151f26ae0c
6
+ metadata.gz: 200a19cc05d3e22cb398e3bafd45f57d8eb46d9c6d7ee1b95f7225204de0bc337e43a212d0c92db9e8484967b76abddfcdca13f1ad486373056cdca3a14a4b4f
7
+ data.tar.gz: e0be226d72ef0cf58a930e232db7047583d435d4bd5f2c5906625be57cf2dd995e87b10f3f7f9baa840f0306654a6fc1d8380501ef7e6db10ac0e65a0ae77f8b
data/CHANGELOG.md CHANGED
@@ -7,3 +7,7 @@
7
7
  ## 0.2.5
8
8
 
9
9
  * `suppress_tainbox_initializer!` is inherited correctly
10
+
11
+ ## 0.2.6
12
+
13
+ * raise `ArgumentError` if trying to assign a non-hash to `#attributes`
@@ -20,6 +20,10 @@ module Tainbox::InstanceMethods
20
20
  end
21
21
 
22
22
  def attributes=(attributes)
23
+ unless attributes.is_a?(Hash)
24
+ raise ArgumentError, 'Attributes can only be assigned via a hash'
25
+ end
26
+
23
27
  attributes = attributes.symbolize_keys
24
28
  self.class.tainbox_attributes.each do |attribute|
25
29
 
@@ -1,3 +1,3 @@
1
1
  module Tainbox
2
- VERSION = '0.2.5'
2
+ VERSION = '0.2.6'
3
3
  end
data/tainbox.gemspec CHANGED
@@ -22,4 +22,5 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency 'bundler', '~> 1.8'
23
23
  spec.add_development_dependency 'rake', '~> 10.0'
24
24
  spec.add_development_dependency 'pry'
25
+ spec.add_development_dependency 'rspec'
25
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tainbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Gubitskiy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-26 00:00:00.000000000 Z
11
+ date: 2015-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  description:
70
84
  email:
71
85
  - d.gubitskiy@gmail.com