simplecov 0.6.4 → 0.17.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +378 -12
- data/CONTRIBUTING.md +51 -0
- data/ISSUE_TEMPLATE.md +23 -0
- data/LICENSE +1 -1
- data/README.md +456 -252
- data/doc/alternate-formatters.md +56 -0
- data/doc/commercial-services.md +20 -0
- data/doc/editor-integration.md +18 -0
- data/lib/simplecov.rb +223 -44
- data/lib/simplecov/command_guesser.rb +47 -35
- data/lib/simplecov/configuration.rb +281 -191
- data/lib/simplecov/defaults.rb +38 -43
- data/lib/simplecov/exit_codes.rb +10 -0
- data/lib/simplecov/file_list.rb +51 -34
- data/lib/simplecov/filter.rb +50 -3
- data/lib/simplecov/formatter.rb +4 -1
- data/lib/simplecov/formatter/multi_formatter.rb +34 -0
- data/lib/simplecov/formatter/simple_formatter.rb +18 -12
- data/lib/simplecov/jruby_fix.rb +44 -0
- data/lib/simplecov/last_run.rb +26 -0
- data/lib/simplecov/lines_classifier.rb +48 -0
- data/lib/simplecov/load_global_config.rb +8 -0
- data/lib/simplecov/no_defaults.rb +4 -0
- data/lib/simplecov/profiles.rb +33 -0
- data/lib/simplecov/profiles/bundler_filter.rb +5 -0
- data/lib/simplecov/profiles/hidden_filter.rb +5 -0
- data/lib/simplecov/profiles/rails.rb +18 -0
- data/lib/simplecov/profiles/root_filter.rb +10 -0
- data/lib/simplecov/profiles/test_frameworks.rb +8 -0
- data/lib/simplecov/railtie.rb +3 -1
- data/lib/simplecov/railties/tasks.rake +9 -7
- data/lib/simplecov/raw_coverage.rb +41 -0
- data/lib/simplecov/result.rb +17 -55
- data/lib/simplecov/result_merger.rb +100 -67
- data/lib/simplecov/source_file.rb +82 -67
- data/lib/simplecov/version.rb +4 -2
- metadata +153 -222
- data/.gitignore +0 -31
- data/.travis.yml +0 -15
- data/Appraisals +0 -8
- data/Gemfile +0 -5
- data/Rakefile +0 -19
- data/cucumber.yml +0 -13
- data/features/config_adapters.feature +0 -44
- data/features/config_autoload.feature +0 -46
- data/features/config_command_name.feature +0 -33
- data/features/config_coverage_dir.feature +0 -20
- data/features/config_deactivate_merging.feature +0 -42
- data/features/config_merge_timeout.feature +0 -39
- data/features/config_nocov_token.feature +0 -79
- data/features/config_project_name.feature +0 -27
- data/features/config_styles.feature +0 -93
- data/features/cucumber_basic.feature +0 -29
- data/features/merging_test_unit_and_rspec.feature +0 -44
- data/features/rspec_basic.feature +0 -31
- data/features/rspec_fails_on_initialization.feature +0 -14
- data/features/rspec_groups_and_filters_basic.feature +0 -29
- data/features/rspec_groups_and_filters_complex.feature +0 -35
- data/features/rspec_groups_using_filter_class.feature +0 -40
- data/features/rspec_without_simplecov.feature +0 -20
- data/features/skipping_code_blocks_manually.feature +0 -70
- data/features/step_definitions/html_steps.rb +0 -45
- data/features/step_definitions/simplecov_steps.rb +0 -66
- data/features/step_definitions/transformers.rb +0 -13
- data/features/step_definitions/web_steps.rb +0 -64
- data/features/support/env.rb +0 -26
- data/features/test_unit_basic.feature +0 -34
- data/features/test_unit_groups_and_filters_basic.feature +0 -29
- data/features/test_unit_groups_and_filters_complex.feature +0 -35
- data/features/test_unit_groups_using_filter_class.feature +0 -40
- data/features/test_unit_without_simplecov.feature +0 -20
- data/features/unicode_compatiblity.feature +0 -67
- data/gemfiles/multi_json-legacy.gemfile +0 -7
- data/gemfiles/multi_json-legacy.gemfile.lock +0 -85
- data/gemfiles/multi_json-new.gemfile +0 -7
- data/gemfiles/multi_json-new.gemfile.lock +0 -85
- data/lib/simplecov/adapters.rb +0 -29
- data/lib/simplecov/merge_helpers.rb +0 -39
- data/simplecov.gemspec +0 -29
- data/test/faked_project/Gemfile +0 -6
- data/test/faked_project/Rakefile +0 -8
- data/test/faked_project/cucumber.yml +0 -13
- data/test/faked_project/features/step_definitions/my_steps.rb +0 -23
- data/test/faked_project/features/support/env.rb +0 -12
- data/test/faked_project/features/test_stuff.feature +0 -6
- data/test/faked_project/lib/faked_project.rb +0 -11
- data/test/faked_project/lib/faked_project/framework_specific.rb +0 -18
- data/test/faked_project/lib/faked_project/meta_magic.rb +0 -24
- data/test/faked_project/lib/faked_project/some_class.rb +0 -29
- data/test/faked_project/spec/faked_spec.rb +0 -11
- data/test/faked_project/spec/meta_magic_spec.rb +0 -10
- data/test/faked_project/spec/some_class_spec.rb +0 -10
- data/test/faked_project/spec/spec_helper.rb +0 -15
- data/test/faked_project/test/faked_test.rb +0 -11
- data/test/faked_project/test/meta_magic_test.rb +0 -13
- data/test/faked_project/test/some_class_test.rb +0 -15
- data/test/faked_project/test/test_helper.rb +0 -16
- data/test/fixtures/app/controllers/sample_controller.rb +0 -10
- data/test/fixtures/app/models/user.rb +0 -10
- data/test/fixtures/deleted_source_sample.rb +0 -15
- data/test/fixtures/frameworks/rspec_bad.rb +0 -9
- data/test/fixtures/frameworks/rspec_good.rb +0 -9
- data/test/fixtures/frameworks/testunit_bad.rb +0 -9
- data/test/fixtures/frameworks/testunit_good.rb +0 -9
- data/test/fixtures/iso-8859.rb +0 -3
- data/test/fixtures/resultset1.rb +0 -4
- data/test/fixtures/resultset2.rb +0 -5
- data/test/fixtures/sample.rb +0 -16
- data/test/fixtures/utf-8.rb +0 -3
- data/test/helper.rb +0 -35
- data/test/shoulda_macros.rb +0 -29
- data/test/test_1_8_fallbacks.rb +0 -33
- data/test/test_command_guesser.rb +0 -21
- data/test/test_deleted_source.rb +0 -16
- data/test/test_file_list.rb +0 -24
- data/test/test_filters.rb +0 -80
- data/test/test_merge_helpers.rb +0 -107
- data/test/test_result.rb +0 -147
- data/test/test_return_codes.rb +0 -39
- data/test/test_source_file.rb +0 -95
- data/test/test_source_file_line.rb +0 -110
@@ -0,0 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "etc"
|
4
|
+
home_dir = (ENV["HOME"] && File.expand_path("~")) || Etc.getpwuid.dir || (ENV["USER"] && File.expand_path("~#{ENV['USER']}"))
|
5
|
+
if home_dir
|
6
|
+
global_config_path = File.join(home_dir, ".simplecov")
|
7
|
+
load global_config_path if File.exist?(global_config_path)
|
8
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#
|
4
|
+
# Profiles are SimpleCov configuration procs that can be easily
|
5
|
+
# loaded using SimpleCov.start :rails and defined using
|
6
|
+
# SimpleCov.profiles.define :foo do
|
7
|
+
# # SimpleCov configuration here, same as in SimpleCov.configure
|
8
|
+
# end
|
9
|
+
#
|
10
|
+
module SimpleCov
|
11
|
+
class Profiles < Hash
|
12
|
+
#
|
13
|
+
# Define a SimpleCov profile:
|
14
|
+
# SimpleCov.profiles.define 'rails' do
|
15
|
+
# # Same as SimpleCov.configure do .. here
|
16
|
+
# end
|
17
|
+
#
|
18
|
+
def define(name, &blk)
|
19
|
+
name = name.to_sym
|
20
|
+
raise "SimpleCov Profile '#{name}' is already defined" unless self[name].nil?
|
21
|
+
self[name] = blk
|
22
|
+
end
|
23
|
+
|
24
|
+
#
|
25
|
+
# Applies the profile of given name on SimpleCov.configure
|
26
|
+
#
|
27
|
+
def load(name)
|
28
|
+
name = name.to_sym
|
29
|
+
raise "Could not find SimpleCov Profile called '#{name}'" unless key?(name)
|
30
|
+
SimpleCov.configure(&self[name])
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
SimpleCov.profiles.define "rails" do
|
4
|
+
load_profile "test_frameworks"
|
5
|
+
|
6
|
+
add_filter %r{^/config/}
|
7
|
+
add_filter %r{^/db/}
|
8
|
+
|
9
|
+
add_group "Controllers", "app/controllers"
|
10
|
+
add_group "Channels", "app/channels"
|
11
|
+
add_group "Models", "app/models"
|
12
|
+
add_group "Mailers", "app/mailers"
|
13
|
+
add_group "Helpers", "app/helpers"
|
14
|
+
add_group "Jobs", %w[app/jobs app/workers]
|
15
|
+
add_group "Libraries", "lib/"
|
16
|
+
|
17
|
+
track_files "{app,lib}/**/*.rb"
|
18
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
SimpleCov.profiles.define "root_filter" do
|
4
|
+
# Exclude all files outside of simplecov root
|
5
|
+
root_filter = nil
|
6
|
+
add_filter do |src|
|
7
|
+
root_filter ||= /\A#{Regexp.escape(SimpleCov.root + File::SEPARATOR)}/io
|
8
|
+
src.filename !~ root_filter
|
9
|
+
end
|
10
|
+
end
|
data/lib/simplecov/railtie.rb
CHANGED
@@ -1,11 +1,13 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rake/testtask"
|
2
4
|
Rake::TestTask.new do |t|
|
3
|
-
t.name =
|
5
|
+
t.name = "simplecov"
|
4
6
|
t.loader = :direct # uses require() which skips PWD in Ruby 1.9
|
5
|
-
t.libs.push
|
6
|
-
t.test_files = FileList[
|
7
|
-
t.ruby_opts.push
|
7
|
+
t.libs.push "test", "spec", Dir.pwd
|
8
|
+
t.test_files = FileList["{test,spec}/**/*_{test,spec}.rb"]
|
9
|
+
t.ruby_opts.push "-r", "simplecov", "-e", "SimpleCov.start(:rails)".inspect
|
8
10
|
end
|
9
11
|
|
10
|
-
require
|
11
|
-
CLOBBER.include
|
12
|
+
require "rake/clean"
|
13
|
+
CLOBBER.include "coverage"
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SimpleCov
|
4
|
+
module RawCoverage
|
5
|
+
module_function
|
6
|
+
|
7
|
+
# Merges multiple Coverage.result hashes
|
8
|
+
def merge_results(*results)
|
9
|
+
results.reduce({}) do |result, merged|
|
10
|
+
merge_resultsets(result, merged)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
# Merges two Coverage.result hashes
|
15
|
+
def merge_resultsets(result1, result2)
|
16
|
+
(result1.keys | result2.keys).each_with_object({}) do |filename, merged|
|
17
|
+
file1 = result1[filename]
|
18
|
+
file2 = result2[filename]
|
19
|
+
merged[filename] = merge_file_coverage(file1, file2)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def merge_file_coverage(file1, file2)
|
24
|
+
return (file1 || file2).dup unless file1 && file2
|
25
|
+
|
26
|
+
file1.map.with_index do |count1, index|
|
27
|
+
count2 = file2[index]
|
28
|
+
merge_line_coverage(count1, count2)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def merge_line_coverage(count1, count2)
|
33
|
+
sum = count1.to_i + count2.to_i
|
34
|
+
if sum.zero? && (count1.nil? || count2.nil?)
|
35
|
+
nil
|
36
|
+
else
|
37
|
+
sum
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
data/lib/simplecov/result.rb
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "digest/sha1"
|
4
|
+
require "forwardable"
|
2
5
|
|
3
6
|
module SimpleCov
|
4
7
|
#
|
@@ -6,16 +9,20 @@ module SimpleCov
|
|
6
9
|
# library generates (Coverage.result).
|
7
10
|
#
|
8
11
|
class Result
|
12
|
+
extend Forwardable
|
9
13
|
# Returns the original Coverage.result used for this instance of SimpleCov::Result
|
10
14
|
attr_reader :original_result
|
11
15
|
# Returns all files that are applicable to this result (sans filters!) as instances of SimpleCov::SourceFile. Aliased as :source_files
|
12
16
|
attr_reader :files
|
13
|
-
|
17
|
+
alias source_files files
|
14
18
|
# Explicitly set the Time this result has been created
|
15
19
|
attr_writer :created_at
|
16
20
|
# Explicitly set the command name that was used for this coverage result. Defaults to SimpleCov.command_name
|
17
21
|
attr_writer :command_name
|
18
22
|
|
23
|
+
def_delegators :files, :covered_percent, :covered_percentages, :least_covered_file, :covered_strength, :covered_lines, :missed_lines
|
24
|
+
def_delegator :files, :lines_of_code, :total_lines
|
25
|
+
|
19
26
|
# Initialize a new SimpleCov::Result from given Coverage.result (a Hash of filenames each containing an array of
|
20
27
|
# coverage data)
|
21
28
|
def initialize(original_result)
|
@@ -36,56 +43,6 @@ module SimpleCov
|
|
36
43
|
@groups ||= SimpleCov.grouped(files)
|
37
44
|
end
|
38
45
|
|
39
|
-
# The overall percentual coverage for this result
|
40
|
-
def covered_percent
|
41
|
-
# Make sure that weird rounding error from #15, #23 and #24 does not occur again!
|
42
|
-
total_lines.zero? ? 0 : 100.0 * covered_lines / total_lines
|
43
|
-
end
|
44
|
-
|
45
|
-
# The multiple of coverage for this result
|
46
|
-
def covered_strength
|
47
|
-
return 0 if total_lines.zero?
|
48
|
-
return @covered_strength if @covered_strength
|
49
|
-
m = 0
|
50
|
-
@files.each do |file|
|
51
|
-
original_result[file.filename].each do |line_result|
|
52
|
-
if line_result
|
53
|
-
m += line_result
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
@covered_strength = m.to_f / total_lines
|
58
|
-
end
|
59
|
-
|
60
|
-
# Returns the count of lines that are covered
|
61
|
-
def covered_lines
|
62
|
-
return @covered_lines if defined? @covered_lines
|
63
|
-
@covered_lines = 0
|
64
|
-
@files.each do |file|
|
65
|
-
original_result[file.filename].each do |line_result|
|
66
|
-
@covered_lines += 1 if line_result and line_result > 0
|
67
|
-
end
|
68
|
-
end
|
69
|
-
@covered_lines
|
70
|
-
end
|
71
|
-
|
72
|
-
# Returns the count of missed lines
|
73
|
-
def missed_lines
|
74
|
-
return @missed_lines if defined? @missed_lines
|
75
|
-
@missed_lines = 0
|
76
|
-
@files.each do |file|
|
77
|
-
original_result[file.filename].each do |line_result|
|
78
|
-
@missed_lines += 1 if line_result == 0
|
79
|
-
end
|
80
|
-
end
|
81
|
-
@missed_lines
|
82
|
-
end
|
83
|
-
|
84
|
-
# Total count of relevant lines (covered + missed)
|
85
|
-
def total_lines
|
86
|
-
@total_lines ||= (covered_lines + missed_lines)
|
87
|
-
end
|
88
|
-
|
89
46
|
# Applies the configured SimpleCov.formatter on this result
|
90
47
|
def format!
|
91
48
|
SimpleCov.formatter.new.format(self)
|
@@ -102,9 +59,9 @@ module SimpleCov
|
|
102
59
|
@command_name ||= SimpleCov.command_name
|
103
60
|
end
|
104
61
|
|
105
|
-
# Returns a hash representation of this Result that can be used for marshalling it into
|
62
|
+
# Returns a hash representation of this Result that can be used for marshalling it into JSON
|
106
63
|
def to_hash
|
107
|
-
{command_name => {"coverage" =>
|
64
|
+
{command_name => {"coverage" => coverage, "timestamp" => created_at.to_i}}
|
108
65
|
end
|
109
66
|
|
110
67
|
# Loads a SimpleCov::Result#to_hash dump
|
@@ -116,7 +73,12 @@ module SimpleCov
|
|
116
73
|
result
|
117
74
|
end
|
118
75
|
|
119
|
-
|
76
|
+
private
|
77
|
+
|
78
|
+
def coverage
|
79
|
+
keys = original_result.keys & filenames
|
80
|
+
Hash[keys.zip(original_result.values_at(*keys))]
|
81
|
+
end
|
120
82
|
|
121
83
|
# Applies all configured SimpleCov filters on this result's source files
|
122
84
|
def filter!
|
@@ -1,90 +1,123 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "json"
|
2
4
|
|
3
5
|
#
|
4
6
|
# Singleton that is responsible for caching, loading and merging
|
5
7
|
# SimpleCov::Results into a single result for coverage analysis based
|
6
8
|
# upon multiple test suites.
|
7
9
|
#
|
8
|
-
module SimpleCov
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
module SimpleCov
|
11
|
+
module ResultMerger
|
12
|
+
class << self
|
13
|
+
# The path to the .resultset.json cache file
|
14
|
+
def resultset_path
|
15
|
+
File.join(SimpleCov.coverage_path, ".resultset.json")
|
16
|
+
end
|
14
17
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
def resultset_writelock
|
19
|
+
File.join(SimpleCov.coverage_path, ".resultset.json.lock")
|
20
|
+
end
|
21
|
+
|
22
|
+
# Loads the cached resultset from JSON and returns it as a Hash,
|
23
|
+
# caching it for subsequent accesses.
|
24
|
+
def resultset
|
25
|
+
@resultset ||= begin
|
26
|
+
data = stored_data
|
27
|
+
if data
|
28
|
+
begin
|
29
|
+
JSON.parse(data) || {}
|
30
|
+
rescue
|
31
|
+
{}
|
32
|
+
end
|
33
|
+
else
|
34
|
+
{}
|
35
|
+
end
|
23
36
|
end
|
24
|
-
else
|
25
|
-
{}
|
26
37
|
end
|
27
|
-
end
|
28
38
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
39
|
+
# Returns the contents of the resultset cache as a string or if the file is missing or empty nil
|
40
|
+
def stored_data
|
41
|
+
synchronize_resultset do
|
42
|
+
return unless File.exist?(resultset_path)
|
43
|
+
data = File.read(resultset_path)
|
44
|
+
return if data.nil? || data.length < 2
|
45
|
+
data
|
46
|
+
end
|
35
47
|
end
|
36
|
-
end
|
37
48
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
+
# Gets the resultset hash and re-creates all included instances
|
50
|
+
# of SimpleCov::Result from that.
|
51
|
+
# All results that are above the SimpleCov.merge_timeout will be
|
52
|
+
# dropped. Returns an array of SimpleCov::Result items.
|
53
|
+
def results
|
54
|
+
results = []
|
55
|
+
resultset.each do |command_name, data|
|
56
|
+
result = SimpleCov::Result.from_hash(command_name => data)
|
57
|
+
# Only add result if the timeout is above the configured threshold
|
58
|
+
if (Time.now - result.created_at) < SimpleCov.merge_timeout
|
59
|
+
results << result
|
60
|
+
end
|
49
61
|
end
|
62
|
+
results
|
50
63
|
end
|
51
|
-
results
|
52
|
-
end
|
53
64
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
65
|
+
# Merge two or more SimpleCov::Results into a new one with merged
|
66
|
+
# coverage data and the command_name for the result consisting of a join
|
67
|
+
# on all source result's names
|
68
|
+
def merge_results(*results)
|
69
|
+
merged = SimpleCov::RawCoverage.merge_results(*results.map(&:original_result))
|
70
|
+
result = SimpleCov::Result.new(merged)
|
71
|
+
# Specify the command name
|
72
|
+
result.command_name = results.map(&:command_name).sort.join(", ")
|
73
|
+
result
|
63
74
|
end
|
64
|
-
result = SimpleCov::Result.new(merged)
|
65
|
-
# Specify the command name
|
66
|
-
result.command_name = results.map(&:command_name).sort.join(", ")
|
67
|
-
result
|
68
|
-
end
|
69
75
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
76
|
+
#
|
77
|
+
# Gets all SimpleCov::Results from cache, merges them and produces a new
|
78
|
+
# SimpleCov::Result with merged coverage data and the command_name
|
79
|
+
# for the result consisting of a join on all source result's names
|
80
|
+
#
|
81
|
+
def merged_result
|
82
|
+
merge_results(*results)
|
83
|
+
end
|
84
|
+
|
85
|
+
# Saves the given SimpleCov::Result in the resultset cache
|
86
|
+
def store_result(result)
|
87
|
+
synchronize_resultset do
|
88
|
+
# Ensure we have the latest, in case it was already cached
|
89
|
+
clear_resultset
|
90
|
+
new_set = resultset
|
91
|
+
command_name, data = result.to_hash.first
|
92
|
+
new_set[command_name] = data
|
93
|
+
File.open(resultset_path, "w+") do |f_|
|
94
|
+
f_.puts JSON.pretty_generate(new_set)
|
84
95
|
end
|
85
96
|
end
|
97
|
+
true
|
98
|
+
end
|
99
|
+
|
100
|
+
# Ensure only one process is reading or writing the resultset at any
|
101
|
+
# given time
|
102
|
+
def synchronize_resultset
|
103
|
+
# make it reentrant
|
104
|
+
return yield if defined?(@resultset_locked) && @resultset_locked
|
105
|
+
|
106
|
+
begin
|
107
|
+
@resultset_locked = true
|
108
|
+
File.open(resultset_writelock, "w+") do |f|
|
109
|
+
f.flock(File::LOCK_EX)
|
110
|
+
yield
|
111
|
+
end
|
112
|
+
ensure
|
113
|
+
@resultset_locked = false
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
# Clear out the previously cached .resultset
|
118
|
+
def clear_resultset
|
119
|
+
@resultset = nil
|
86
120
|
end
|
87
|
-
true
|
88
121
|
end
|
89
122
|
end
|
90
123
|
end
|