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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dbfd4a993793a84a8f394a6070264468a1d4a246
4
- data.tar.gz: e07d34fc52aaa45e988460d46dc35ad8b117e156
3
+ metadata.gz: b5dec7a43a3f9588c6d90206821ba1a8abccc927
4
+ data.tar.gz: 1e4ebdc76cbca2ac27acbdf58276d2b3d0c3d20b
5
5
  SHA512:
6
- metadata.gz: baf7e5f4af6302100dfae3eb368bbabe539a661bb02f3b3599f57976511e3aca4792d78cd84781c57910f0a664e855c9862468754c0b76966e3106dcb6b8f53e
7
- data.tar.gz: e8ed0cbf6c74f51c497d141ffbd5f5d25704a9300a014882e74b0b92db303be6a80254ab3b8015067f7cbc735e1164a03c6ccff212b408e4a163742201addbee
6
+ metadata.gz: 4e2d11dd43e93adb2c2206a67c9afe472c85c2d2e5fe3b6b676ada769aef0fdca58f7196f7c21816e21247c479e5f5c63059b6f124b287adfdb5054497a97484
7
+ data.tar.gz: 70d456f0778b0a19d4fb04e895ed68898c3bf7d3b52c77927831ba5b977eaeb7863358629a92f813ae01e1df70a0604c087d8afcae33de93784570d3b3ebc38a
data/factories.gemspec CHANGED
@@ -20,5 +20,5 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
22
  spec.add_development_dependency "rake"
23
- spec.add_dependency "activesupport"
23
+ spec.add_dependency "inflecto"
24
24
  end
@@ -1,4 +1,4 @@
1
- require "active_support/core_ext/string/inflections"
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$/, '').demodulize.constantize
14
+ Inflecto.constantize(Inflecto.demodulize(name.gsub(/Factory$/, '')))
15
15
  end
16
16
 
17
17
  def model_class
@@ -1,3 +1,3 @@
1
1
  module Factories
2
- VERSION = "0.0.3"
2
+ VERSION = "0.1.0"
3
3
  end
data/lib/factories.rb CHANGED
@@ -1,4 +1,4 @@
1
- require "active_support/core_ext/string/inflections"
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 = class_name.classify
16
+ class_name = Inflecto.classify class_name
17
17
  class_name = "Factories::#{class_name}"
18
- class_name.constantize
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.3
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-25 00:00:00.000000000 Z
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: activesupport
42
+ name: inflecto
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="