mongoid-ancestry 0.3.0.rc → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,29 +1,29 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mongoid-ancestry (0.3.0.rc)
5
- mongoid (= 3.0.0.rc)
4
+ mongoid-ancestry (0.3.0)
5
+ mongoid (~> 3.0.3)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
- activemodel (3.2.3)
11
- activesupport (= 3.2.3)
10
+ activemodel (3.2.7)
11
+ activesupport (= 3.2.7)
12
12
  builder (~> 3.0.0)
13
- activesupport (3.2.3)
13
+ activesupport (3.2.7)
14
14
  i18n (~> 0.6)
15
15
  multi_json (~> 1.0)
16
16
  builder (3.0.0)
17
17
  diff-lcs (1.1.2)
18
18
  i18n (0.6.0)
19
- mongoid (3.0.0.rc)
19
+ mongoid (3.0.3)
20
20
  activemodel (~> 3.1)
21
- moped (~> 1.0.0.rc)
22
- origin (~> 1.0.0.rc)
21
+ moped (~> 1.1)
22
+ origin (~> 1.0)
23
23
  tzinfo (~> 0.3.22)
24
- moped (1.0.0.rc)
24
+ moped (1.2.0)
25
25
  multi_json (1.3.6)
26
- origin (1.0.0.rc)
26
+ origin (1.0.4)
27
27
  rake (0.9.2.2)
28
28
  rspec (2.5.0)
29
29
  rspec-core (~> 2.5.0)
@@ -22,8 +22,8 @@ module Mongoid
22
22
  cattr_accessor :ancestry_field
23
23
  self.ancestry_field = opts[:ancestry_field]
24
24
 
25
- self.field ancestry_field, :type => String
26
- self.index({ ancestry_field => 1 })
25
+ self.field ancestry_field.to_sym, :type => String
26
+ self.index({ ancestry_field.to_s => 1 })
27
27
 
28
28
  # Create orphan strategy accessor and set to option or default (writer comes from DynamicClassMethods)
29
29
  cattr_reader :orphan_strategy
@@ -228,8 +228,8 @@ module Mongoid
228
228
  def cast_primary_key(key)
229
229
  if primary_key_type == Integer
230
230
  key.to_i
231
- elsif primary_key_type == BSON::ObjectId && key =~ /[a-z0-9]{24}/
232
- BSON::ObjectId.from_string(key)
231
+ elsif primary_key_type == Moped::BSON::ObjectId && key =~ /[a-z0-9]{24}/
232
+ Moped::BSON::ObjectId.from_string(key)
233
233
  else
234
234
  key
235
235
  end
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Ancestry
3
- VERSION = '0.3.0.rc'
3
+ VERSION = '0.3.0'
4
4
  end
5
5
  end
@@ -23,6 +23,6 @@ Gem::Specification.new do |s|
23
23
  "README.md"
24
24
  ]
25
25
 
26
- s.add_dependency('mongoid', "= 3.0.0.rc")
26
+ s.add_dependency('mongoid', "~> 3.0.3")
27
27
  end
28
28
 
@@ -71,7 +71,7 @@ describe MongoidAncestry do
71
71
  end
72
72
  end
73
73
  end
74
-
74
+
75
75
  it "should have valid orphan rootify strategy" do
76
76
  subject.with_model :depth => 3, :width => 3 do |model, roots|
77
77
  model.orphan_strategy = :rootify
@@ -232,7 +232,7 @@ describe MongoidAncestry do
232
232
  end
233
233
 
234
234
  it "should build ancestry from parent ids" do
235
- subject.with_model :skip_ancestry => true, :extra_columns => {:parent_id => 'BSON::ObjectId'} do |model|
235
+ subject.with_model :skip_ancestry => true, :extra_columns => {:parent_id => 'Moped::BSON::ObjectId'} do |model|
236
236
  [model.create!].each do |parent1|
237
237
  (Array.new(5) { model.create :parent_id => parent1.id }).each do |parent2|
238
238
  (Array.new(5) { model.create :parent_id => parent2.id }).each do |parent3|
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-ancestry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0.rc
5
- prerelease: 6
4
+ version: 0.3.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Stefan Kroes
@@ -10,24 +10,24 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-06-09 00:00:00.000000000 Z
13
+ date: 2012-08-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mongoid
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
- - - '='
20
+ - - ~>
21
21
  - !ruby/object:Gem::Version
22
- version: 3.0.0.rc
22
+ version: 3.0.3
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  none: false
27
27
  requirements:
28
- - - '='
28
+ - - ~>
29
29
  - !ruby/object:Gem::Version
30
- version: 3.0.0.rc
30
+ version: 3.0.3
31
31
  description: Organise Mongoid model into a tree structure
32
32
  email:
33
33
  - eagle.anton@gmail.com
@@ -74,13 +74,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
74
74
  version: '0'
75
75
  segments:
76
76
  - 0
77
- hash: -4410323303637396168
77
+ hash: -3223260019916207128
78
78
  required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  none: false
80
80
  requirements:
81
- - - ! '>'
81
+ - - ! '>='
82
82
  - !ruby/object:Gem::Version
83
- version: 1.3.1
83
+ version: '0'
84
+ segments:
85
+ - 0
86
+ hash: -3223260019916207128
84
87
  requirements: []
85
88
  rubyforge_project: mongoid-ancestry
86
89
  rubygems_version: 1.8.24