a_r_mocker 0.0.2 → 0.0.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: 1dc6b17c9688394c13aef7385e475ff2ae619e97
4
- data.tar.gz: ae971480393fe3d8566c7c00651aee3531702d28
3
+ metadata.gz: cf89bab765b3d4d108e12fb931d1a42d0f4ddc99
4
+ data.tar.gz: 38956fc8689fede3eef8d6c2535869ba394ed0b6
5
5
  SHA512:
6
- metadata.gz: 5112a358955c915551d88ebaa38817064a11f4e952e2567594ff10fb9788a05c3bb4b57fdc61e71263748c8932527e57a4fb1f1f7bebbbe513653b9a03be4703
7
- data.tar.gz: 10bc3a597166bbc4cc9fa84c5a9148df354f3a3935ffc0770f7c38aaa520e1a771640409d757a12a97581ac692d767800d245d86d4b675100f325abe15f6c1cf
6
+ metadata.gz: 766cbcdda966add9073c5aa95bac43dbd09e48d381536c4c76b418c7abefde247fe39566df782ed98f4c7af97c6494e340da01861037468c53c56ae57a67701d
7
+ data.tar.gz: 5ad8409ad12c2accdad54524ea62bb1bed5f894086cd8cd817ec46bc815b1eef59002b36d004cefba446e4d99dee2dc91de34b9a7ea535ac831468d558ef55b0
Binary file
@@ -3,7 +3,7 @@ module ARMocker
3
3
  # them as dummy data
4
4
  class Model < OpenStruct
5
5
  def initialize(hash = {})
6
- @persisted = hash.delete(:_persisted)
6
+ @persisted = hash.slice(:_persisted)
7
7
  hash = default_attributes.merge(hash)
8
8
  super
9
9
  end
@@ -5,11 +5,10 @@ module ARMocker
5
5
  include Enumerable
6
6
 
7
7
  # @param count [Integer] the number of models to be generated
8
- # @param persisted [Boolean] whether the models will act as though they
9
8
  # have persisted
10
9
  # @param attributes [Hash] attributes to be applied to every model
11
10
  def initialize(count, attributes = {})
12
- @members = Array.new(count, ARMocker::Model.new(attributes.merge(persisted: attributes.delete(:_persisted))))
11
+ @members = Array.new(count, ARMocker::Model.new(attributes.merge(persisted: attributes.slice(:_persisted))))
13
12
  end
14
13
 
15
14
  def self.create(count, attributes = {})
@@ -1,3 +1,3 @@
1
1
  module ARMocker
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: a_r_mocker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Spiel
@@ -67,6 +67,7 @@ files:
67
67
  - README.md
68
68
  - Rakefile
69
69
  - a_r_mocker-0.0.1.gem
70
+ - a_r_mocker-0.0.2.gem
70
71
  - a_r_mocker.gemspec
71
72
  - bin/console
72
73
  - bin/setup