active_mocker 1.2.pre.5 → 1.2.pre.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: b1c03f2f7def2773b34db937e7b3d79a9d91ea58
4
- data.tar.gz: e7a84266128a1349c5c232276dfc589aaf2c5436
3
+ metadata.gz: c7f3415a7c6d4afd5d48bd065aa392c1000204e3
4
+ data.tar.gz: 3400e4350fd4ebad56df688996d423cf354e5a61
5
5
  SHA512:
6
- metadata.gz: 4e95c7c686658f56a91eb8fd40e5ae4098130992f9aacde2177e59fc4da1f5ad318c0bcdac7a8b750953f051429b535fb22d3a0411632f48d4279367f3df8ab7
7
- data.tar.gz: 39ac24e0ee6f573f1426034039c8f76afea958667ed11e059b04414a6fe65db89d54e330157e5418fe56d9f21ac7a9e12cc3fe3bd8be868fdf42a632ed5e3694
6
+ metadata.gz: 6388bf35664471b9704596dd8be5668425ca3cbc5e7d6f70f4d8959d3eec9d1e017b872656bea090cb0bb6002e9f97116cdf6750cdea18a39b38acabb1cf6fca
7
+ data.tar.gz: 879eceeb2ae425f53aa88aa6ec8fcb31f289d5bf48b37c92f0cfdd4a30620b326692bc01fb32353e56ee3482bbf4dd93a5cc4019219c5a507b2495a0163d56bf
@@ -31,6 +31,15 @@ class Generate
31
31
  "#{model_name}Mock".constantize
32
32
  end
33
33
 
34
+ def class_exists?(class_name)
35
+ begin
36
+ klass = Module.const_get(class_name)
37
+ return klass.is_a?(Class)
38
+ rescue NameError
39
+ return false
40
+ end
41
+ end
42
+
34
43
  def model_definition(table)
35
44
  return @model_definition if @model_definition_table == table
36
45
  @model_definition_table = table
@@ -1,3 +1,3 @@
1
1
  module ActiveMocker
2
- VERSION = "1.2.pre.5"
2
+ VERSION = "1.2.pre.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_mocker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.pre.5
4
+ version: 1.2.pre.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Zeisler