mongo_mapper_acts_as_list 0.1 → 0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,12 @@
1
1
  module MongoMapper
2
2
  module Plugins
3
3
  module ActsAsList
4
+
5
+ extend ActiveSupport::Concern
4
6
 
5
- require 'mongo_mapper'
6
-
7
+
8
+
9
+ # ----------------------------------------------------------------------
7
10
  module ClassMethods
8
11
  def acts_as_list(options = {})
9
12
  configuration = { :column => "position", :scope => {} }
@@ -32,8 +35,6 @@ module MongoMapper
32
35
  end
33
36
 
34
37
  class_eval <<-EOV
35
- include MongoMapper::Plugins::ActsAsList::InstanceMethods
36
-
37
38
  def acts_as_list_class
38
39
  ::#{self.name}
39
40
  end
@@ -53,6 +54,7 @@ module MongoMapper
53
54
 
54
55
 
55
56
 
57
+ # ----------------------------------------------------------------------
56
58
  module InstanceMethods
57
59
  # Insert the item at the given position (defaults to the top position of 1).
58
60
  def insert_at(position = 1)
@@ -2,7 +2,7 @@
2
2
  module MongoMapper
3
3
  module Plugins
4
4
  module ActsAsList
5
- Version = '0.1'
5
+ Version = '0.2'
6
6
  end
7
7
  end
8
8
  end
@@ -0,0 +1 @@
1
+ require 'mongo_mapper/plugins/acts_as_list'
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo_mapper_acts_as_list
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
5
- prerelease: false
4
+ hash: 15
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
- - 1
9
- version: "0.1"
8
+ - 2
9
+ version: "0.2"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tomas Celizna
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-10-31 01:00:00 +02:00
17
+ date: 2011-02-18 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -57,6 +57,7 @@ extra_rdoc_files: []
57
57
  files:
58
58
  - lib/mongo_mapper/plugins/acts_as_list.rb
59
59
  - lib/mongo_mapper/plugins/version.rb
60
+ - lib/mongo_mapper_acts_as_list.rb
60
61
  - test/mongo_mapper_acts_as_list_test.rb
61
62
  - test/test_helper.rb
62
63
  - README.rdoc
@@ -90,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
91
  requirements: []
91
92
 
92
93
  rubyforge_project:
93
- rubygems_version: 1.3.7
94
+ rubygems_version: 1.4.1
94
95
  signing_key:
95
96
  specification_version: 3
96
97
  summary: Port of classic Rails ActsAsList for MongoMapper