factory_boy_ruby 0.1.2.3 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/factory_boy_ruby.gemspec +3 -3
- data/lib/factory_boy/factory_declarator.rb +1 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2140b5e3cd792cfc02cab18f78750de655863df0
|
4
|
+
data.tar.gz: 20c1c6cab0949ea33cb75ea0ae09ebb947356bb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49b23e56e6d36dad837b0fa0c68d2b46f82d92cc05d1f8fe30acb77498f486f98311044b15598d98f935ce0df3fdbd55e127fe456a5cddaaea02d2fd5a560be6
|
7
|
+
data.tar.gz: 19642d49397760ab984ea8ac935f7053b83e818a745daa65a742329686b2d9b4b582b433a0b2a42a41aa5a055db7ae840f9b2f30ba18d6640ba31f5115ff409e
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('factory_boy_ruby', '0.1.
|
5
|
+
Echoe.new('factory_boy_ruby', '0.1.3') do |p|
|
6
6
|
p.description = "Generate testing instances for the non-model classes"
|
7
7
|
p.url = "http://github.com/ma7modx/factory_boy_ruby"
|
8
8
|
p.author = "Mahmoud Afify"
|
data/factory_boy_ruby.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: factory_boy_ruby 0.1.
|
2
|
+
# stub: factory_boy_ruby 0.1.3 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "factory_boy_ruby"
|
6
|
-
s.version = "0.1.
|
6
|
+
s.version = "0.1.3"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib"]
|
10
10
|
s.authors = ["Mahmoud Afify"]
|
11
|
-
s.date = "2016-
|
11
|
+
s.date = "2016-12-04"
|
12
12
|
s.description = "Generate testing instances for the non-model classes"
|
13
13
|
s.email = "ma7modx@gmail.com"
|
14
14
|
s.extra_rdoc_files = ["README.rdoc", "lib/factory_boy.rb", "lib/factory_boy/factory.rb", "lib/factory_boy/factory_callbacks.rb", "lib/factory_boy/factory_customizer.rb", "lib/factory_boy/factory_declarator.rb", "lib/factory_boy/factory_instance.rb"]
|
@@ -19,8 +19,7 @@ module FactoryDeclarator
|
|
19
19
|
klass = factory.linked_class
|
20
20
|
initialize_parameters = klass.instance_method(:initialize).parameters.map(&:last)
|
21
21
|
args = initialize_parameters.map do |param|
|
22
|
-
function_output = options[param]
|
23
|
-
function_output ||= factory.send(param) # may have problems optional params
|
22
|
+
function_output = options.key?(param) ? options[param] : factory.send(param) # may have problems optional params
|
24
23
|
function_output
|
25
24
|
end
|
26
25
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factory_boy_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mahmoud Afify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Generate testing instances for the non-model classes
|
14
14
|
email: ma7modx@gmail.com
|