mongoid_class_for_collection 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,9 @@
|
|
1
1
|
|
2
2
|
module MongoidClassForCollection
|
3
|
-
def mongoid_class_for_collection
|
3
|
+
def mongoid_class_for_collection(collection, opts = {}, &blk)
|
4
4
|
module_name = "Id#{MongoidClassForCollection.unique_id}"
|
5
|
-
class_name = collection.to_s.classify
|
5
|
+
class_name = opts[:class_name] || collection.to_s.classify
|
6
|
+
|
6
7
|
eval <<-CLASSDEF
|
7
8
|
module #{module_name}
|
8
9
|
class #{class_name}
|
metadata
CHANGED
@@ -1,65 +1,55 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid_class_for_collection
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
4
5
|
prerelease:
|
5
|
-
version: 0.0.1
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
|
9
|
-
|
7
|
+
authors:
|
8
|
+
- Shawn Anderson
|
9
|
+
- Sivabudh Umpudh
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
|
14
|
-
date: 2011-05-27 00:00:00 -04:00
|
15
|
-
default_executable:
|
13
|
+
date: 2012-02-23 00:00:00.000000000 Z
|
16
14
|
dependencies: []
|
17
|
-
|
18
|
-
|
19
|
-
email:
|
20
|
-
|
21
|
-
|
15
|
+
description: Makes migrations more flexible by creating dynamic classes for you to
|
16
|
+
use with mongoid_rails_migrations gem.
|
17
|
+
email:
|
18
|
+
- shawn42@gmail.com
|
19
|
+
- siva@atomicobject.com
|
22
20
|
executables: []
|
23
|
-
|
24
21
|
extensions: []
|
25
|
-
|
26
22
|
extra_rdoc_files: []
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
- mongoid_class_for_collection.gemspec
|
36
|
-
has_rdoc: true
|
23
|
+
files:
|
24
|
+
- .gitignore
|
25
|
+
- Gemfile
|
26
|
+
- README.md
|
27
|
+
- Rakefile
|
28
|
+
- lib/mongoid_class_for_collection.rb
|
29
|
+
- lib/mongoid_class_for_collection/version.rb
|
30
|
+
- mongoid_class_for_collection.gemspec
|
37
31
|
homepage: http://rubygems.org/gems/mongoid_class_for_collection
|
38
32
|
licenses: []
|
39
|
-
|
40
33
|
post_install_message:
|
41
34
|
rdoc_options: []
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
35
|
+
require_paths:
|
36
|
+
- lib
|
37
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
46
38
|
none: false
|
47
|
-
requirements:
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - ! '>='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0'
|
43
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
52
44
|
none: false
|
53
|
-
requirements:
|
54
|
-
|
55
|
-
|
56
|
-
|
45
|
+
requirements:
|
46
|
+
- - ! '>='
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
57
49
|
requirements: []
|
58
|
-
|
59
50
|
rubyforge_project: mongoid_class_for_collection
|
60
|
-
rubygems_version: 1.
|
51
|
+
rubygems_version: 1.8.10
|
61
52
|
signing_key:
|
62
53
|
specification_version: 3
|
63
54
|
summary: Makes migrations more flexible by creating dynamic classes for you to use
|
64
55
|
test_files: []
|
65
|
-
|