factories 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/factories.gemspec +1 -1
- data/lib/factories/base_factory.rb +2 -2
- data/lib/factories/version.rb +1 -1
- data/lib/factories.rb +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5dec7a43a3f9588c6d90206821ba1a8abccc927
|
4
|
+
data.tar.gz: 1e4ebdc76cbca2ac27acbdf58276d2b3d0c3d20b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e2d11dd43e93adb2c2206a67c9afe472c85c2d2e5fe3b6b676ada769aef0fdca58f7196f7c21816e21247c479e5f5c63059b6f124b287adfdb5054497a97484
|
7
|
+
data.tar.gz: 70d456f0778b0a19d4fb04e895ed68898c3bf7d3b52c77927831ba5b977eaeb7863358629a92f813ae01e1df70a0604c087d8afcae33de93784570d3b3ebc38a
|
data/factories.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require "
|
1
|
+
require "inflecto"
|
2
2
|
|
3
3
|
module Factories
|
4
4
|
class BaseFactory
|
@@ -11,7 +11,7 @@ module Factories
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.model_class
|
14
|
-
name.gsub(/Factory$/, '')
|
14
|
+
Inflecto.constantize(Inflecto.demodulize(name.gsub(/Factory$/, '')))
|
15
15
|
end
|
16
16
|
|
17
17
|
def model_class
|
data/lib/factories/version.rb
CHANGED
data/lib/factories.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require "
|
1
|
+
require "inflecto"
|
2
2
|
|
3
3
|
module Factories
|
4
4
|
module_function
|
@@ -13,9 +13,9 @@ module Factories
|
|
13
13
|
|
14
14
|
def class_from_name(name)
|
15
15
|
class_name = "#{name}_factory"
|
16
|
-
class_name =
|
16
|
+
class_name = Inflecto.classify class_name
|
17
17
|
class_name = "Factories::#{class_name}"
|
18
|
-
|
18
|
+
Inflecto.constantize class_name
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factories
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Herald
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: inflecto
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|