slugoid 0.0.4 → 0.0.5

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.
data/.gitignore CHANGED
@@ -3,3 +3,4 @@ pkg/*
3
3
  .bundle
4
4
  .rvmrc
5
5
  .DS_Store
6
+ Gemfile.lock
data/Rakefile CHANGED
@@ -6,4 +6,6 @@ Rake::TestTask.new(:test) do |test|
6
6
  test.libs << 'lib' << 'test'
7
7
  test.pattern = 'test/**/test_*.rb'
8
8
  test.verbose = true
9
- end
9
+ end
10
+
11
+ task :default => :test
@@ -9,7 +9,7 @@ module Mongoid::Criterion::Optional
9
9
  #
10
10
  alias :id! :id
11
11
  def id(*ids)
12
- if @klass.respond_to?(:acts_as_slugoid_options)
12
+ unless ids.first.is_a?(BSON::ObjectId)
13
13
  ids.flatten!
14
14
  if ids.size > 1
15
15
  self.in(
@@ -23,4 +23,4 @@ module Mongoid::Criterion::Optional
23
23
  id!(*ids)
24
24
  end
25
25
  end
26
- end
26
+ end
@@ -1,5 +1,5 @@
1
1
  module Acts
2
2
  module Slugoid
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
12
12
  s.summary = %q{Drop-in solution to pretty urls when using Mongoid}
13
13
  s.description = %q{Drop-in solution to pretty urls when using Mongoid}
14
14
 
15
- s.add_dependency('mongoid', '>= 2.0.0.beta.17')
15
+ s.add_dependency('mongoid', '2.0.0.rc.7')
16
16
  s.add_development_dependency('shoulda', '~>2.11.3')
17
- s.add_development_dependency('bson_ext', '~>1.1.1')
17
+ s.add_development_dependency('bson_ext', '~>1.2.4')
18
18
 
19
19
  s.rubyforge_project = "slugoid"
20
20
 
@@ -16,7 +16,7 @@ module Acts::Slugoid::Test
16
16
  context "find" do
17
17
  should "return the objects when you pass the id" do
18
18
  assert_equal(@slugoid_project, SlugoidProject.find(@slugoid_project.to_param))
19
- assert_equal(@project, Project.find(@project.id))
19
+ assert_equal(@slugoid_project, SlugoidProject.find(@slugoid_project.id))
20
20
  end
21
21
  end
22
22
 
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slugoid
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 4
9
- version: 0.0.4
4
+ prerelease:
5
+ version: 0.0.5
10
6
  platform: ruby
11
7
  authors:
12
8
  - David Padilla
@@ -15,7 +11,7 @@ autorequire:
15
11
  bindir: bin
16
12
  cert_chain: []
17
13
 
18
- date: 2010-12-22 00:00:00 -07:00
14
+ date: 2011-03-26 00:00:00 -06:00
19
15
  default_executable:
20
16
  dependencies:
21
17
  - !ruby/object:Gem::Dependency
@@ -24,15 +20,9 @@ dependencies:
24
20
  requirement: &id001 !ruby/object:Gem::Requirement
25
21
  none: false
26
22
  requirements:
27
- - - ">="
23
+ - - "="
28
24
  - !ruby/object:Gem::Version
29
- segments:
30
- - 2
31
- - 0
32
- - 0
33
- - beta
34
- - 17
35
- version: 2.0.0.beta.17
25
+ version: 2.0.0.rc.7
36
26
  type: :runtime
37
27
  version_requirements: *id001
38
28
  - !ruby/object:Gem::Dependency
@@ -43,10 +33,6 @@ dependencies:
43
33
  requirements:
44
34
  - - ~>
45
35
  - !ruby/object:Gem::Version
46
- segments:
47
- - 2
48
- - 11
49
- - 3
50
36
  version: 2.11.3
51
37
  type: :development
52
38
  version_requirements: *id002
@@ -58,11 +44,7 @@ dependencies:
58
44
  requirements:
59
45
  - - ~>
60
46
  - !ruby/object:Gem::Version
61
- segments:
62
- - 1
63
- - 1
64
- - 1
65
- version: 1.1.1
47
+ version: 1.2.4
66
48
  type: :development
67
49
  version_requirements: *id003
68
50
  description: Drop-in solution to pretty urls when using Mongoid
@@ -78,7 +60,6 @@ extra_rdoc_files: []
78
60
  files:
79
61
  - .gitignore
80
62
  - Gemfile
81
- - Gemfile.lock
82
63
  - README.markdown
83
64
  - Rakefile
84
65
  - lib/slugoid.rb
@@ -103,21 +84,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
103
84
  requirements:
104
85
  - - ">="
105
86
  - !ruby/object:Gem::Version
106
- segments:
107
- - 0
108
87
  version: "0"
109
88
  required_rubygems_version: !ruby/object:Gem::Requirement
110
89
  none: false
111
90
  requirements:
112
91
  - - ">="
113
92
  - !ruby/object:Gem::Version
114
- segments:
115
- - 0
116
93
  version: "0"
117
94
  requirements: []
118
95
 
119
96
  rubyforge_project: slugoid
120
- rubygems_version: 1.3.7
97
+ rubygems_version: 1.6.0
121
98
  signing_key:
122
99
  specification_version: 3
123
100
  summary: Drop-in solution to pretty urls when using Mongoid
@@ -1,37 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- slugoid (0.0.3)
5
- mongoid (>= 2.0.0.beta.17)
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- activemodel (3.0.3)
11
- activesupport (= 3.0.3)
12
- builder (~> 2.1.2)
13
- i18n (~> 0.4)
14
- activesupport (3.0.3)
15
- bson (1.1.4)
16
- bson_ext (1.1.4)
17
- builder (2.1.2)
18
- i18n (0.5.0)
19
- mongo (1.1.4)
20
- bson (>= 1.1.1)
21
- mongoid (2.0.0.beta.20)
22
- activemodel (~> 3.0)
23
- mongo (~> 1.1)
24
- tzinfo (~> 0.3.22)
25
- will_paginate (~> 3.0.pre)
26
- shoulda (2.11.3)
27
- tzinfo (0.3.23)
28
- will_paginate (3.0.pre2)
29
-
30
- PLATFORMS
31
- ruby
32
-
33
- DEPENDENCIES
34
- bson_ext (~> 1.1.1)
35
- mongoid (>= 2.0.0.beta.17)
36
- shoulda (~> 2.11.3)
37
- slugoid!