sunspot_mongoid 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
data/init.rb CHANGED
@@ -1,3 +1 @@
1
1
  require 'sunspot_mongoid'
2
- Sunspot.session = Sunspot::Rails.build_session
3
- ActionController::Base.module_eval { include(Sunspot::Rails::RequestLifecycle) }
@@ -32,12 +32,13 @@ module Sunspot
32
32
 
33
33
  class DataAccessor < Sunspot::Adapters::DataAccessor
34
34
  def load(id)
35
- @clazz.find(id) rescue nil
35
+ @clazz.find(BSON::ObjectID.from_string(id)) rescue nil
36
36
  end
37
37
 
38
38
  def load_all(ids)
39
- @clazz.where(:_id.in => ids.map { |id| BSON::ObjectID.from_string(id) })
39
+ @clazz.where(:_id.in => ids.map { |id| BSON::ObjectId.from_string(id) })
40
40
  end
41
+
41
42
  end
42
43
  end
43
44
  end
@@ -1,50 +1,46 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sunspot_mongoid}
8
- s.version = "0.4.0"
8
+ s.version = "0.4.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["jugyo"]
12
- s.date = %q{2010-09-22}
12
+ s.date = %q{2011-03-04}
13
13
  s.description = %q{A Sunspot wrapper for Mongoid that is like sunspot_rails.}
14
14
  s.email = %q{jugyo.org@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.md"
17
+ "README.md"
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.md",
24
- "Rakefile",
25
- "VERSION",
26
- "examples/example.rb",
27
- "init.rb",
28
- "lib/sunspot/mongoid.rb",
29
- "lib/sunspot/rails/railtie.rb",
30
- "lib/sunspot_mongoid.rb",
31
- "sunspot_mongoid.gemspec",
32
- "test/helper.rb",
33
- "test/test_sunspot_mongoid.rb"
21
+ "LICENSE",
22
+ "README.md",
23
+ "Rakefile",
24
+ "VERSION",
25
+ "examples/example.rb",
26
+ "init.rb",
27
+ "lib/sunspot/mongoid.rb",
28
+ "lib/sunspot_mongoid.rb",
29
+ "sunspot_mongoid.gemspec",
30
+ "test/helper.rb",
31
+ "test/test_sunspot_mongoid.rb"
34
32
  ]
35
33
  s.homepage = %q{http://github.com/jugyo/sunspot_mongoid}
36
- s.rdoc_options = ["--charset=UTF-8"]
37
34
  s.require_paths = ["lib"]
38
- s.rubygems_version = %q{1.3.7}
35
+ s.rubygems_version = %q{1.6.0}
39
36
  s.summary = %q{A Sunspot wrapper for Mongoid.}
40
37
  s.test_files = [
38
+ "examples/example.rb",
41
39
  "test/helper.rb",
42
- "test/test_sunspot_mongoid.rb",
43
- "examples/example.rb"
40
+ "test/test_sunspot_mongoid.rb"
44
41
  ]
45
42
 
46
43
  if s.respond_to? :specification_version then
47
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
48
44
  s.specification_version = 3
49
45
 
50
46
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sunspot_mongoid
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 4
8
- - 0
9
- version: 0.4.0
4
+ prerelease:
5
+ version: 0.4.1
10
6
  platform: ruby
11
7
  authors:
12
8
  - jugyo
@@ -14,7 +10,7 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2010-09-22 00:00:00 +09:00
13
+ date: 2011-03-04 00:00:00 +09:00
18
14
  default_executable:
19
15
  dependencies:
20
16
  - !ruby/object:Gem::Dependency
@@ -25,8 +21,6 @@ dependencies:
25
21
  requirements:
26
22
  - - ">="
27
23
  - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
24
  version: "0"
31
25
  type: :runtime
32
26
  version_requirements: *id001
@@ -38,10 +32,6 @@ dependencies:
38
32
  requirements:
39
33
  - - ">="
40
34
  - !ruby/object:Gem::Version
41
- segments:
42
- - 1
43
- - 1
44
- - 0
45
35
  version: 1.1.0
46
36
  type: :runtime
47
37
  version_requirements: *id002
@@ -53,10 +43,6 @@ dependencies:
53
43
  requirements:
54
44
  - - ">="
55
45
  - !ruby/object:Gem::Version
56
- segments:
57
- - 1
58
- - 1
59
- - 0
60
46
  version: 1.1.0
61
47
  type: :runtime
62
48
  version_requirements: *id003
@@ -68,8 +54,6 @@ dependencies:
68
54
  requirements:
69
55
  - - ">="
70
56
  - !ruby/object:Gem::Version
71
- segments:
72
- - 0
73
57
  version: "0"
74
58
  type: :development
75
59
  version_requirements: *id004
@@ -81,8 +65,6 @@ dependencies:
81
65
  requirements:
82
66
  - - ">="
83
67
  - !ruby/object:Gem::Version
84
- segments:
85
- - 0
86
68
  version: "0"
87
69
  type: :development
88
70
  version_requirements: *id005
@@ -97,7 +79,6 @@ extra_rdoc_files:
97
79
  - README.md
98
80
  files:
99
81
  - .document
100
- - .gitignore
101
82
  - LICENSE
102
83
  - README.md
103
84
  - Rakefile
@@ -105,7 +86,6 @@ files:
105
86
  - examples/example.rb
106
87
  - init.rb
107
88
  - lib/sunspot/mongoid.rb
108
- - lib/sunspot/rails/railtie.rb
109
89
  - lib/sunspot_mongoid.rb
110
90
  - sunspot_mongoid.gemspec
111
91
  - test/helper.rb
@@ -115,8 +95,8 @@ homepage: http://github.com/jugyo/sunspot_mongoid
115
95
  licenses: []
116
96
 
117
97
  post_install_message:
118
- rdoc_options:
119
- - --charset=UTF-8
98
+ rdoc_options: []
99
+
120
100
  require_paths:
121
101
  - lib
122
102
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -124,25 +104,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
124
104
  requirements:
125
105
  - - ">="
126
106
  - !ruby/object:Gem::Version
127
- segments:
128
- - 0
129
107
  version: "0"
130
108
  required_rubygems_version: !ruby/object:Gem::Requirement
131
109
  none: false
132
110
  requirements:
133
111
  - - ">="
134
112
  - !ruby/object:Gem::Version
135
- segments:
136
- - 0
137
113
  version: "0"
138
114
  requirements: []
139
115
 
140
116
  rubyforge_project:
141
- rubygems_version: 1.3.7
117
+ rubygems_version: 1.6.0
142
118
  signing_key:
143
119
  specification_version: 3
144
120
  summary: A Sunspot wrapper for Mongoid.
145
121
  test_files:
122
+ - examples/example.rb
146
123
  - test/helper.rb
147
124
  - test/test_sunspot_mongoid.rb
148
- - examples/example.rb
data/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC
@@ -1,21 +0,0 @@
1
- module Sunspot
2
- module Rails
3
- class Railtie < ::Rails::Railtie
4
- initializer 'sunspot_rails.init' do
5
- Sunspot.session = Sunspot::Rails.build_session
6
- ActiveSupport.on_load(:mongoid) do
7
- include(Sunspot::Rails::RequestLifecycle)
8
- end
9
- end
10
-
11
- rake_tasks do
12
- load 'sunspot/rails/tasks.rb'
13
- end
14
-
15
- generators do
16
- load "generators/sunspot_rails.rb"
17
- end
18
-
19
- end
20
- end
21
- end