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 collection, &blk
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}
@@ -1,3 +1,3 @@
1
1
  module MongoidClassForCollection
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
3
3
  end
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
- - Shawn Anderson
9
- - Sivabudh Umpudh
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
- description: Makes migrations more flexible by creating dynamic classes for you to use with mongoid_rails_migrations gem.
19
- email:
20
- - shawn42@gmail.com
21
- - siva@atomicobject.com
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
- files:
29
- - .gitignore
30
- - Gemfile
31
- - README.md
32
- - Rakefile
33
- - lib/mongoid_class_for_collection.rb
34
- - lib/mongoid_class_for_collection/version.rb
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
- require_paths:
44
- - lib
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
- - !ruby/object:Gem::Version
50
- version: "0"
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
- - !ruby/object:Gem::Version
56
- version: "0"
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.5.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
-