activegroonga 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. data/README.textile +55 -0
  2. data/Rakefile +45 -165
  3. data/{license/LGPL → doc/text/lgpl.txt} +0 -0
  4. data/doc/text/news.textile +60 -0
  5. data/doc/text/tutorial.textile +3 -0
  6. data/lib/active_groonga/base.rb +50 -2
  7. data/lib/active_groonga/railtie.rb +6 -5
  8. data/lib/active_groonga/railties/groonga.rake +8 -4
  9. data/lib/active_groonga/result_set.rb +133 -8
  10. data/lib/active_groonga/version.rb +1 -1
  11. data/test/active-groonga-test-utils.rb +6 -0
  12. data/test/run-test.rb +11 -24
  13. data/test/test-base.rb +10 -4
  14. data/test/test-result-set.rb +121 -9
  15. metadata +90 -138
  16. data/AUTHORS +0 -1
  17. data/NEWS.ja.rdoc +0 -46
  18. data/NEWS.rdoc +0 -46
  19. data/README.ja.rdoc +0 -52
  20. data/README.rdoc +0 -52
  21. data/test-unit-notify/Rakefile +0 -47
  22. data/test-unit-notify/lib/test/unit/notify.rb +0 -104
  23. data/test-unit/COPYING +0 -56
  24. data/test-unit/GPL +0 -340
  25. data/test-unit/PSFL +0 -271
  26. data/test-unit/Rakefile +0 -53
  27. data/test-unit/TODO +0 -5
  28. data/test-unit/bin/testrb +0 -5
  29. data/test-unit/html/bar.svg +0 -153
  30. data/test-unit/html/developer.svg +0 -469
  31. data/test-unit/html/favicon.ico +0 -0
  32. data/test-unit/html/favicon.svg +0 -82
  33. data/test-unit/html/heading-mark.svg +0 -393
  34. data/test-unit/html/index.html +0 -247
  35. data/test-unit/html/index.html.ja +0 -270
  36. data/test-unit/html/install.svg +0 -636
  37. data/test-unit/html/logo.svg +0 -483
  38. data/test-unit/html/test-unit.css +0 -339
  39. data/test-unit/html/tutorial.svg +0 -559
  40. data/test-unit/lib/test/unit.rb +0 -328
  41. data/test-unit/lib/test/unit/assertionfailederror.rb +0 -25
  42. data/test-unit/lib/test/unit/assertions.rb +0 -1334
  43. data/test-unit/lib/test/unit/attribute.rb +0 -125
  44. data/test-unit/lib/test/unit/autorunner.rb +0 -363
  45. data/test-unit/lib/test/unit/collector.rb +0 -36
  46. data/test-unit/lib/test/unit/collector/descendant.rb +0 -23
  47. data/test-unit/lib/test/unit/collector/dir.rb +0 -108
  48. data/test-unit/lib/test/unit/collector/load.rb +0 -144
  49. data/test-unit/lib/test/unit/collector/objectspace.rb +0 -34
  50. data/test-unit/lib/test/unit/color-scheme.rb +0 -106
  51. data/test-unit/lib/test/unit/color.rb +0 -96
  52. data/test-unit/lib/test/unit/diff.rb +0 -740
  53. data/test-unit/lib/test/unit/error.rb +0 -130
  54. data/test-unit/lib/test/unit/exceptionhandler.rb +0 -39
  55. data/test-unit/lib/test/unit/failure.rb +0 -136
  56. data/test-unit/lib/test/unit/fixture.rb +0 -176
  57. data/test-unit/lib/test/unit/notification.rb +0 -129
  58. data/test-unit/lib/test/unit/omission.rb +0 -191
  59. data/test-unit/lib/test/unit/pending.rb +0 -150
  60. data/test-unit/lib/test/unit/priority.rb +0 -180
  61. data/test-unit/lib/test/unit/runner/console.rb +0 -52
  62. data/test-unit/lib/test/unit/runner/emacs.rb +0 -8
  63. data/test-unit/lib/test/unit/runner/tap.rb +0 -8
  64. data/test-unit/lib/test/unit/testcase.rb +0 -483
  65. data/test-unit/lib/test/unit/testresult.rb +0 -121
  66. data/test-unit/lib/test/unit/testsuite.rb +0 -110
  67. data/test-unit/lib/test/unit/ui/console/outputlevel.rb +0 -14
  68. data/test-unit/lib/test/unit/ui/console/testrunner.rb +0 -430
  69. data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +0 -63
  70. data/test-unit/lib/test/unit/ui/tap/testrunner.rb +0 -82
  71. data/test-unit/lib/test/unit/ui/testrunner.rb +0 -53
  72. data/test-unit/lib/test/unit/ui/testrunnermediator.rb +0 -77
  73. data/test-unit/lib/test/unit/ui/testrunnerutilities.rb +0 -41
  74. data/test-unit/lib/test/unit/util/backtracefilter.rb +0 -42
  75. data/test-unit/lib/test/unit/util/method-owner-finder.rb +0 -28
  76. data/test-unit/lib/test/unit/util/observable.rb +0 -90
  77. data/test-unit/lib/test/unit/util/output.rb +0 -31
  78. data/test-unit/lib/test/unit/util/procwrapper.rb +0 -48
  79. data/test-unit/lib/test/unit/version.rb +0 -7
  80. data/test-unit/sample/adder.rb +0 -13
  81. data/test-unit/sample/subtracter.rb +0 -12
  82. data/test-unit/sample/test_adder.rb +0 -20
  83. data/test-unit/sample/test_subtracter.rb +0 -20
  84. data/test-unit/sample/test_user.rb +0 -23
  85. data/test-unit/test/collector/test-descendant.rb +0 -133
  86. data/test-unit/test/collector/test-load.rb +0 -442
  87. data/test-unit/test/collector/test_dir.rb +0 -406
  88. data/test-unit/test/collector/test_objectspace.rb +0 -100
  89. data/test-unit/test/run-test.rb +0 -15
  90. data/test-unit/test/test-attribute.rb +0 -86
  91. data/test-unit/test/test-color-scheme.rb +0 -69
  92. data/test-unit/test/test-color.rb +0 -47
  93. data/test-unit/test/test-diff.rb +0 -518
  94. data/test-unit/test/test-emacs-runner.rb +0 -60
  95. data/test-unit/test/test-fixture.rb +0 -287
  96. data/test-unit/test/test-notification.rb +0 -33
  97. data/test-unit/test/test-omission.rb +0 -81
  98. data/test-unit/test/test-pending.rb +0 -70
  99. data/test-unit/test/test-priority.rb +0 -119
  100. data/test-unit/test/test-testcase.rb +0 -544
  101. data/test-unit/test/test_assertions.rb +0 -1197
  102. data/test-unit/test/test_error.rb +0 -26
  103. data/test-unit/test/test_failure.rb +0 -33
  104. data/test-unit/test/test_testresult.rb +0 -113
  105. data/test-unit/test/test_testsuite.rb +0 -129
  106. data/test-unit/test/testunit-test-util.rb +0 -14
  107. data/test-unit/test/ui/test_tap.rb +0 -33
  108. data/test-unit/test/ui/test_testrunmediator.rb +0 -20
  109. data/test-unit/test/util/test-method-owner-finder.rb +0 -38
  110. data/test-unit/test/util/test-output.rb +0 -11
  111. data/test-unit/test/util/test_backtracefilter.rb +0 -41
  112. data/test-unit/test/util/test_observable.rb +0 -102
  113. data/test-unit/test/util/test_procwrapper.rb +0 -36
@@ -0,0 +1,55 @@
1
+ h1. README
2
+
3
+ h2. Name
4
+
5
+ ActiveGroonga
6
+
7
+ h2. Description
8
+
9
+ A library to use groonga with ActiveRecord like API.
10
+
11
+ groonga provides both of full text search and column store
12
+ features. ActiveGroonga + groonga can be used as an
13
+ alternative of ActiveRecord + RDB.
14
+
15
+ ActiveGroonga is based on rroonga. See the following URLs
16
+ about rroonga and groonga.
17
+
18
+ * "rroonga":http://groonga.rubyforge.org/
19
+ * "groonga":http://groonga.org/
20
+
21
+ h2. Authors
22
+
23
+ * Kouhei Sutou <kou@clear-code.com>
24
+
25
+ h2. License
26
+
27
+ LGPL 2.1. See license/LGPL for details.
28
+
29
+ (Kouhei Sutou has a right to change license inclidng
30
+ contributed patches.)
31
+
32
+ h2. Dependencies
33
+
34
+ * rroonga
35
+
36
+ h2. Install
37
+
38
+ <pre>
39
+ !!!command_line
40
+ % sudo gem install activegroonga
41
+ </pre>
42
+
43
+ h2. Documents
44
+
45
+ * "Reference manual in English":http://groonga.rubyforge.org/rroonga/en/
46
+ * "Reference manual in Japanese":http://groonga.rubyforge.org/rroonga/ja/
47
+
48
+ h2. Mailing list
49
+
50
+ * English: "groonga-users-en":http://rubyforge.org/mailman/listinfo/groonga-users-en
51
+ * Japanese: "groonga-dev":http://lists.sourceforge.jp/mailman/listinfo/groonga-dev
52
+
53
+ h2. Thanks
54
+
55
+ * ...
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8; mode: ruby -*-
2
2
  #
3
- # Copyright (C) 2009 Kouhei Sutou <kou@clear-code.com>
3
+ # Copyright (C) 2009-2011 Kouhei Sutou <kou@clear-code.com>
4
4
  #
5
5
  # This library is free software; you can redistribute it and/or
6
6
  # modify it under the terms of the GNU Lesser General Public
@@ -17,199 +17,79 @@
17
17
 
18
18
  require 'English'
19
19
 
20
- require 'find'
21
- require 'fileutils'
22
20
  require 'pathname'
23
- require 'erb'
24
21
  require 'rubygems'
25
- if RUBY_VERSION < "1.9"
26
- gem 'rdoc'
27
- end
28
- require 'hoe'
29
-
30
- ENV["NODOT"] = "yes"
22
+ require 'rubygems/package_task'
23
+ require "jeweler"
24
+ require "packnga"
31
25
 
32
- base_dir = File.join(File.dirname(__FILE__))
33
- truncate_base_dir = Proc.new do |x|
34
- x.gsub(/^#{Regexp.escape(base_dir + File::SEPARATOR)}/, '')
35
- end
26
+ base_dir = Pathname.new(__FILE__).dirname.expand_path
36
27
 
37
- @rroonga_base_dir = File.expand_path(File.join(base_dir, '..', 'rroonga'))
38
- rroonga_ext_dir = File.join(@rroonga_base_dir, 'ext', "groonga")
39
- rroonga_lib_dir = File.join(@rroonga_base_dir, 'lib')
40
- $LOAD_PATH.unshift(rroonga_ext_dir)
41
- $LOAD_PATH.unshift(rroonga_lib_dir)
28
+ @rroonga_base_dir = base_dir.parent.expand_path + 'rroonga'
29
+ rroonga_ext_dir = @rroonga_base_dir + 'ext' + "groonga"
30
+ rroonga_lib_dir = @rroonga_base_dir + 'lib'
31
+ $LOAD_PATH.unshift(rroonga_ext_dir.to_s)
32
+ $LOAD_PATH.unshift(rroonga_lib_dir.to_s)
42
33
  ENV["RUBYLIB"] = "#{rroonga_lib_dir}:#{rroonga_ext_dir}:#{ENV['RUBYLIB']}"
43
34
 
44
- active_groonga_lib_dir = File.join(base_dir, "lib")
45
- $LOAD_PATH.unshift(active_groonga_lib_dir)
35
+ active_groonga_lib_dir = base_dir + "lib"
36
+ $LOAD_PATH.unshift(active_groonga_lib_dir.to_s)
46
37
 
47
38
  def guess_version
48
39
  require 'active_groonga/version'
49
40
  ActiveGroonga::VERSION::STRING
50
41
  end
51
42
 
52
- manifest = File.join(base_dir, "Manifest.txt")
53
- manifest_contents = []
54
- base_dir_included_components = %w(AUTHORS
55
- NEWS.rdoc NEWS.ja.rdoc
56
- README.rdoc README.ja.rdoc
57
- Rakefile extconf.rb)
58
- excluded_components = %w(.cvsignore .gdb_history CVS depend Makefile pkg
59
- .git .svn doc vendor .test-result)
60
- excluded_suffixes = %w(.png .ps .pdf .o .so .a .txt .~)
61
- Find.find(base_dir) do |target|
62
- target = truncate_base_dir[target]
63
- components = target.split(File::SEPARATOR)
64
- if components.size == 1 and !File.directory?(target)
65
- next unless base_dir_included_components.include?(components[0])
66
- end
67
- Find.prune if (excluded_components - components) != excluded_components
68
- next if excluded_suffixes.include?(File.extname(target))
69
- manifest_contents << target if File.file?(target)
70
- end
71
-
72
- File.open(manifest, "w") do |f|
73
- f.puts manifest_contents.sort.join("\n")
74
- end
75
-
76
- # For Hoe's no user friendly default behavior. :<
77
- File.open("README.txt", "w") {|file| file << "= Dummy README\n== XXX\n"}
78
- FileUtils.cp("NEWS.rdoc", "History.txt")
79
- at_exit do
80
- FileUtils.rm_f("README.txt")
81
- FileUtils.rm_f("History.txt")
82
- FileUtils.rm_f(manifest)
83
- end
84
-
85
43
  def cleanup_white_space(entry)
86
44
  entry.gsub(/(\A\n+|\n+\z)/, '') + "\n"
87
45
  end
88
46
 
89
47
  ENV["VERSION"] ||= guess_version
90
48
  version = ENV["VERSION"].dup
91
- project = nil
92
- Hoe.spec('activegroonga') do |_project|
93
- Hoe::Test::SUPPORTED_TEST_FRAMEWORKS[:testunit2] = "test/run-test.rb"
94
- project = _project
95
- project.version = version
96
- project.rubyforge_name = 'groonga'
97
- authors = File.join(base_dir, "AUTHORS")
98
- project.author = File.readlines(authors).collect do |line|
99
- if /\s*<[^<>]*>$/ =~ line
100
- $PREMATCH
101
- else
102
- nil
103
- end
104
- end.compact
105
- project.email = ['groonga-users-en@rubyforge.org',
106
- 'groonga-dev@lists.sourceforge.jp']
107
- project.url = 'http://groonga.rubyforge.org/'
108
- project.testlib = :testunit2
109
- project.test_globs = ["test/run-test.rb"]
110
- project.spec_extras = {
111
- :extra_rdoc_files => Dir.glob("*.rdoc"),
112
- }
113
- project.readme_file = "README.ja.rdoc"
114
- project.extra_deps = [["rroonga", ">= 1.0.4"],
115
- ["activemodel", ">= 3.0.1"]]
116
-
117
- news_of_current_release = File.read("NEWS.rdoc").split(/^==\s.*$/)[1]
118
- project.changes = cleanup_white_space(news_of_current_release)
119
-
120
- entries = File.read("README.rdoc").split(/^==\s(.*)$/)
49
+ spec = nil
50
+ Jeweler::Tasks.new do |_spec|
51
+ spec = _spec
52
+ spec.name = "activegroonga"
53
+ spec.version = version
54
+ spec.rubyforge_project = "groonga"
55
+ spec.homepage = "http://groonga.rubyforge.org/"
56
+ spec.authors = ["Kouhei Sutou"]
57
+ spec.email = ["kou@clear-code.com"]
58
+ entries = File.read("README.textile").split(/^h2\.\s(.*)$/)
121
59
  description = cleanup_white_space(entries[entries.index("Description") + 1])
122
- project.summary, project.description, = description.split(/\n\n+/, 3)
123
-
124
- project.remote_rdoc_dir = "activegroonga"
125
- end
126
-
127
- project.spec.dependencies.delete_if {|dependency| dependency.name == "hoe"}
128
-
129
- ObjectSpace.each_object(Rake::RDocTask) do |rdoc_task|
130
- options = rdoc_task.options
131
- t_option_index = options.index("-t") || options.index("--title")
132
- rdoc_task.options[t_option_index, 2] = nil
133
- rdoc_task.title = "ActiveGroonga - #{version}"
134
- rdoc_task.rdoc_files = Dir.glob("lib/**/*.rb")
135
- rdoc_task.rdoc_files += Dir.glob("*.rdoc")
60
+ spec.summary, spec.description, = description.split(/\n\n+/, 3)
61
+ spec.license = "LGPLv2"
62
+ spec.files = FileList["{lib,test}/**/*.rb",
63
+ "lib/**/railties/**/*.rake",
64
+ "lib/**/locale/**/*.yml",
65
+ "Rakefile",
66
+ "README.textile",
67
+ "doc/text/**/*"]
136
68
  end
137
69
 
138
- task :publish_docs => [:prepare_docs_for_publishing]
139
-
140
-
141
- include ERB::Util
142
-
143
- def apply_template(file, head, header, footer)
144
- content = File.read(file)
145
- content = content.sub(/lang="en"/, 'lang="ja"')
146
-
147
- title = nil
148
- content = content.sub(/<title>(.+?)<\/title>/) do
149
- title = $1
150
- head.result(binding)
151
- end
152
-
153
- content = content.sub(/<body(?:.*?)>/) do |body_start|
154
- "#{body_start}\n#{header.result(binding)}\n"
155
- end
156
-
157
- content = content.sub(/<\/body/) do |body_end|
158
- "\n#{footer.result(binding)}\n#{body_end}"
159
- end
160
-
161
- File.open(file, "w") do |file|
162
- file.print(content)
163
- end
70
+ Rake::Task["release"].prerequisites.clear
71
+ Jeweler::RubygemsDotOrgTasks.new do
164
72
  end
165
73
 
166
- def erb_template(name)
167
- file = File.join(@rroonga_base_dir, "html", "#{name}.html.erb")
168
- template = File.read(file)
169
- erb = ERB.new(template, nil, "-")
170
- erb.filename = file
171
- erb
74
+ Gem::PackageTask.new(spec) do |pkg|
75
+ pkg.need_tar_gz = true
172
76
  end
173
77
 
174
- task :prepare_docs_for_publishing do
175
- head = erb_template("head")
176
- header = erb_template("header")
177
- footer = erb_template("footer")
178
- Find.find("doc") do |file|
179
- if /\.html\z/ =~ file and /_(?:c|rb)\.html\z/ !~ file
180
- apply_template(file, head, header, footer)
181
- end
78
+ Packnga::DocumentTask.new(spec) do |task|
79
+ task.yard do |yard_task|
80
+ yard_task.options += ["--exclude", "/templates/"]
81
+ yard_task.options += ["--markup", "textile"]
182
82
  end
183
- end
184
-
185
- namespace :backward_compatibility do
186
- desc "Publish HTML for backward compatibility."
187
- task :publish_html do
188
- config = YAML.load(File.read(File.expand_path("~/.rubyforge/user-config.yml")))
189
- host = "#{config["username"]}@rubyforge.org"
190
-
191
- rsync_args = "-av --exclude .svn --delete"
192
- remote_dir = "/var/www/gforge-projects/#{project.rubyforge_name}/"
193
- mkdir_p "active_groonga"
194
- File.open("active_groonga/.htaccess", "w") do |htaccess|
195
- htaccess.puts(<<-EOH)
196
- Redirect permanent / http://groonga.rubyforge.org/activegroonga/
197
- EOH
198
- end
199
- sh "rsync #{rsync_args} active_groonga/ #{host}:#{remote_dir}"
83
+ task.reference do |reference_task|
84
+ # reference_task.mode = "xhtml"
200
85
  end
201
86
  end
202
87
 
203
- desc "Tag the current revision."
204
- task :tag do
205
- sh("git tag -a #{version} -m 'release #{version}!!!'")
88
+ Packnga::ReleaseTask.new(spec) do |task|
206
89
  end
207
90
 
208
- desc "generate activegroonga.gemspec"
209
- task :generate_gemspec do
210
- spec = project.spec
211
- spec_name = File.join(base_dir, project.spec.spec_name)
212
- File.open(spec_name, "w") do |spec_file|
213
- spec_file.puts(spec.to_ruby)
214
- end
91
+ task :test do
92
+ ruby("test/run-test.rb")
215
93
  end
94
+
95
+ task :default => :test
File without changes
@@ -0,0 +1,60 @@
1
+ h1. NEWS
2
+
3
+ h2. 1.0.5: 2011-05-01
4
+
5
+ h3. Improvements
6
+
7
+ * Supported Rails 3.1.0.
8
+ * groonga:seed showes seed candidate files on not found.
9
+ * Used YARD.
10
+ * Added {ActiveGroonga::Base.sort_keys}.
11
+ * Added {ActiveGroonga::Base.limit}.
12
+
13
+ h3. Fixes
14
+
15
+ * Fixed groonga:seed dependency.
16
+
17
+ h2. 1.0.4: 2011-04-01
18
+
19
+ h3. Improvements
20
+
21
+ * Supported Kaminari. (View interface only)
22
+
23
+ h2. 1.0.3: 2010-12-25
24
+
25
+ h3. Improvements
26
+
27
+ * Supported score.
28
+
29
+ h2. 1.0.1: 2010-11-29
30
+
31
+ h3. Improvements
32
+
33
+ * generator: Supported table type customize.
34
+ * Added ActiveGroonga::Base.exists?.
35
+ * Added ActiveGroonga::Base.all.
36
+
37
+ h3. Changes
38
+
39
+ * Changed to use record key instead of record ID for record
40
+ identifier for hash table and patricia trie.
41
+
42
+ h2. 1.0.0: 2010-11-29
43
+
44
+ * Support Rails 3.
45
+
46
+ h2. 0.0.7: 2009-10-02
47
+
48
+ * Support Ruby/groonga 0.0.7.
49
+
50
+ h2. 0.0.6: 2009-07-31
51
+
52
+ * Support Ruby/groonga 0.0.6.
53
+
54
+ h2. 0.0.2: 2009-06-05
55
+
56
+ * Support Ruby/groonga 0.0.2.
57
+
58
+ h2. 0.0.1: 2009-04-30
59
+
60
+ * Initial release!
@@ -0,0 +1,3 @@
1
+ h1. Tutorial
2
+
3
+ Comming soon...
@@ -38,6 +38,45 @@ module ActiveGroonga
38
38
  @@encoding = "utf8"
39
39
  cattr_reader :encoding, :instance_reader => false
40
40
 
41
+ # The default sort keys for {ResultSet#sort} and
42
+ # {ResultSet#paginate}.
43
+ #
44
+ # @scope class
45
+ # @attribute [rw] sort_keys
46
+ # @return [Array<Array<String, Symbol>>] An array of
47
+ # sort key. Each sort key is an array of sort key
48
+ # column name and order.
49
+ # @example
50
+ # # Sorts by "name" column value in ascending order by default.
51
+ # User.sort_keys = [["name", :ascending]]
52
+ #
53
+ # # Sorts by "name" column value in ascending order and
54
+ # # sorts by "age" column value in descending order for
55
+ # # the same name records by default.
56
+ # User.sort_keys = [["name", :ascending], ["age", :descending]]
57
+ #
58
+ # # Sorts by id value in ascending order by default.
59
+ # User.sort_keys = nil
60
+ #
61
+ # @since 1.0.5
62
+ class_attribute :sort_keys
63
+
64
+ # The default limit for {ResultSet#sort} and
65
+ # {ResultSet#paginate}.
66
+ #
67
+ # @scope class
68
+ # @attribute [rw] limit
69
+ # @return [Integer] The default limit value.
70
+ # @example
71
+ # # Limits sorted records by default.
72
+ # User.limit = 20
73
+ #
74
+ # # Doesn't limit sorted records by default.
75
+ # User.limit = nil
76
+ #
77
+ # @since 1.0.5
78
+ class_attribute :limit
79
+
41
80
  class << self
42
81
  def configure(configuration)
43
82
  case configuration
@@ -100,11 +139,11 @@ module ActiveGroonga
100
139
  records = table.select do |record|
101
140
  yield(record)
102
141
  end
103
- ResultSet.new(records, self, :expression => records.expression)
142
+ create_result_set(records, :expression => records.expression)
104
143
  end
105
144
 
106
145
  def all(options={})
107
- ResultSet.new(table, self)
146
+ create_result_set(table)
108
147
  end
109
148
 
110
149
  def count
@@ -207,6 +246,15 @@ module ActiveGroonga
207
246
  def instance_method_already_implemented?(method_name)
208
247
  super(method_name)
209
248
  end
249
+
250
+ private
251
+ def create_result_set(records, options={})
252
+ default_options = {
253
+ :default_sort_keys => sort_keys,
254
+ :default_limit => limit,
255
+ }
256
+ ResultSet.new(records, self, default_options.merge(options))
257
+ end
210
258
  end
211
259
 
212
260
  def initialize(record_or_attributes=nil)