activegroonga 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -86,6 +86,7 @@ Packnga::DocumentTask.new(spec) do |task|
86
86
  end
87
87
 
88
88
  Packnga::ReleaseTask.new(spec) do |task|
89
+ task.index_html_dir = "../rroonga/doc/html"
89
90
  end
90
91
 
91
92
  task :test do
@@ -1,6 +1,19 @@
1
1
  h1. NEWS
2
2
 
3
- h2. 1.0.5: 2011-05-01
3
+ h2. 1.0.6: 2011-09-16
4
+
5
+ h3. Improvements
6
+
7
+ * supported rspec-rails.
8
+ * added {ActiveGroonga::ResultSet#empty?}.
9
+
10
+ h3. Fixes
11
+
12
+ * suppressed warnings on Rails 3.1.0.
13
+
14
+ h1. NEWS
15
+
16
+ h2. 1.0.5: 2011-09-04
4
17
 
5
18
  h3. Improvements
6
19
 
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2010 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2010-2011 Kouhei Sutou <kou@clear-code.com>
2
2
  #
3
3
  # This library is free software; you can redistribute it and/or
4
4
  # modify it under the terms of the GNU Lesser General Public
@@ -19,7 +19,7 @@ module ActiveGroonga
19
19
  module Railties
20
20
  module Configurable
21
21
  def groonga_configurations
22
- groonga_yml = paths.config.groonga.first
22
+ groonga_yml = paths["config/groonga"].first
23
23
  unless File.exist?(groonga_yml)
24
24
  groonga_yml_example = "#{groonga_yml}.example"
25
25
  if File.exist?(groonga_yml_example)
@@ -168,4 +168,15 @@ namespace :groonga do
168
168
  end
169
169
  end
170
170
 
171
- task "test:prepare" => "groonga:test:prepare"
171
+ case Rails.configuration.generators.options[:rails][:test_framework]
172
+ when :rspec
173
+ rspec_task_names = ["spec"]
174
+ rspec_sub_task_names = [:requests, :models, :controllers, :views, :helpers,
175
+ :mailers, :lib, :routing, :rcov]
176
+ rspec_task_names += rspec_sub_task_names.collect {|name| "spec:#{name}"}
177
+ rspec_task_names.each do |task_name|
178
+ task task_name => "groonga:test:prepare"
179
+ end
180
+ else
181
+ task "test:prepare" => "groonga:test:prepare"
182
+ end
@@ -157,6 +157,14 @@ module ActiveGroonga
157
157
  end
158
158
  end
159
159
 
160
+ # Returns whether this result set has records or not.
161
+ #
162
+ # @return [Boolean] true if the result set has one
163
+ # or more records, false otherwise.
164
+ def empty?
165
+ records.empty?
166
+ end
167
+
160
168
  private
161
169
  def instantiate(record)
162
170
  resolved_record = record
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2009-2010 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2009-2011 Kouhei Sutou <kou@clear-code.com>
2
2
  #
3
3
  # This library is free software; you can redistribute it and/or
4
4
  # modify it under the terms of the GNU Lesser General Public
@@ -17,7 +17,7 @@ module ActiveGroonga
17
17
  module VERSION
18
18
  MAJOR = 1
19
19
  MINOR = 0
20
- TINY = 5
20
+ TINY = 6
21
21
 
22
22
  STRING = [MAJOR, MINOR, TINY].join(".")
23
23
  end
@@ -140,4 +140,18 @@ class TestResultSet < Test::Unit::TestCase
140
140
  bookmarks.sort(["user"], :limit => 1).collect(&:user))
141
141
  end
142
142
  end
143
+
144
+ class TestEmpty < self
145
+ def test_have_records
146
+ all_bookmarks = Bookmark.all
147
+ assert_not_predicate(all_bookmarks, :empty?)
148
+ end
149
+
150
+ def test_not_have_records
151
+ no_bookmarks = Bookmark.select do |bookmark|
152
+ bookmark.uri == "http://example.com/"
153
+ end
154
+ assert_predicate(no_bookmarks, :empty?)
155
+ end
156
+ end
143
157
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activegroonga
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
5
- prerelease:
4
+ hash: 27
5
+ prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 5
10
- version: 1.0.5
9
+ - 6
10
+ version: 1.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kouhei Sutou
@@ -15,9 +15,13 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-04 00:00:00 Z
18
+ date: 2011-09-16 00:00:00 +09:00
19
+ default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
22
+ type: :runtime
23
+ prerelease: false
24
+ name: rroonga
21
25
  version_requirements: &id001 !ruby/object:Gem::Requirement
22
26
  none: false
23
27
  requirements:
@@ -27,11 +31,11 @@ dependencies:
27
31
  segments:
28
32
  - 0
29
33
  version: "0"
30
- name: rroonga
31
- prerelease: false
32
- type: :runtime
33
34
  requirement: *id001
34
35
  - !ruby/object:Gem::Dependency
36
+ type: :runtime
37
+ prerelease: false
38
+ name: activemodel
35
39
  version_requirements: &id002 !ruby/object:Gem::Requirement
36
40
  none: false
37
41
  requirements:
@@ -43,11 +47,11 @@ dependencies:
43
47
  - 1
44
48
  - 0
45
49
  version: 3.1.0
46
- name: activemodel
47
- prerelease: false
48
- type: :runtime
49
50
  requirement: *id002
50
51
  - !ruby/object:Gem::Dependency
52
+ type: :development
53
+ prerelease: false
54
+ name: test-unit
51
55
  version_requirements: &id003 !ruby/object:Gem::Requirement
52
56
  none: false
53
57
  requirements:
@@ -57,11 +61,11 @@ dependencies:
57
61
  segments:
58
62
  - 0
59
63
  version: "0"
60
- name: test-unit
61
- prerelease: false
62
- type: :development
63
64
  requirement: *id003
64
65
  - !ruby/object:Gem::Dependency
66
+ type: :development
67
+ prerelease: false
68
+ name: test-unit-notify
65
69
  version_requirements: &id004 !ruby/object:Gem::Requirement
66
70
  none: false
67
71
  requirements:
@@ -71,11 +75,11 @@ dependencies:
71
75
  segments:
72
76
  - 0
73
77
  version: "0"
74
- name: test-unit-notify
75
- prerelease: false
76
- type: :development
77
78
  requirement: *id004
78
79
  - !ruby/object:Gem::Dependency
80
+ type: :development
81
+ prerelease: false
82
+ name: jeweler
79
83
  version_requirements: &id005 !ruby/object:Gem::Requirement
80
84
  none: false
81
85
  requirements:
@@ -85,11 +89,11 @@ dependencies:
85
89
  segments:
86
90
  - 0
87
91
  version: "0"
88
- name: jeweler
89
- prerelease: false
90
- type: :development
91
92
  requirement: *id005
92
93
  - !ruby/object:Gem::Dependency
94
+ type: :development
95
+ prerelease: false
96
+ name: packnga
93
97
  version_requirements: &id006 !ruby/object:Gem::Requirement
94
98
  none: false
95
99
  requirements:
@@ -101,11 +105,11 @@ dependencies:
101
105
  - 9
102
106
  - 2
103
107
  version: 0.9.2
104
- name: packnga
105
- prerelease: false
106
- type: :development
107
108
  requirement: *id006
108
109
  - !ruby/object:Gem::Dependency
110
+ type: :development
111
+ prerelease: false
112
+ name: RedCloth
109
113
  version_requirements: &id007 !ruby/object:Gem::Requirement
110
114
  none: false
111
115
  requirements:
@@ -115,9 +119,6 @@ dependencies:
115
119
  segments:
116
120
  - 0
117
121
  version: "0"
118
- name: RedCloth
119
- prerelease: false
120
- type: :development
121
122
  requirement: *id007
122
123
  description: |-
123
124
  groonga provides both of full text search and column store
@@ -178,6 +179,7 @@ files:
178
179
  - test/test-result-set.rb
179
180
  - test/test-schema.rb
180
181
  - test/test-validations.rb
182
+ has_rdoc: true
181
183
  homepage: http://groonga.rubyforge.org/
182
184
  licenses:
183
185
  - LGPLv2
@@ -207,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
209
  requirements: []
208
210
 
209
211
  rubyforge_project: groonga
210
- rubygems_version: 1.7.2
212
+ rubygems_version: 1.3.7
211
213
  signing_key:
212
214
  specification_version: 3
213
215
  summary: A library to use groonga with ActiveRecord like API.