aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/stif/codif_line_synchronization.rb10
-rw-r--r--lib/stif/reflex_synchronization.rb2
-rw-r--r--spec/spec_helper.rb20
3 files changed, 17 insertions, 15 deletions
diff --git a/lib/stif/codif_line_synchronization.rb b/lib/stif/codif_line_synchronization.rb
index feb313f45..2bb4d8778 100644
--- a/lib/stif/codif_line_synchronization.rb
+++ b/lib/stif/codif_line_synchronization.rb
@@ -11,18 +11,18 @@ module Stif
def processed_counts
{
- imported: self.imported_count,
- updated: self.updated_count,
- deleted: self.deleted_count
+ imported: imported_count,
+ updated: updated_count,
+ deleted: deleted_count
}
end
def increment_counts prop_name, value
- self.send("#{prop_name}=", self.send(prop_name) + value)
+ send("#{prop_name}=", self.send(prop_name) + value)
end
def synchronize
- self.reset_counts
+ reset_counts
start_time = Process.clock_gettime(Process::CLOCK_MONOTONIC, :second)
# Fetch Codifline data
client = Codifligne::API.new
diff --git a/lib/stif/reflex_synchronization.rb b/lib/stif/reflex_synchronization.rb
index 6d8497bce..675486265 100644
--- a/lib/stif/reflex_synchronization.rb
+++ b/lib/stif/reflex_synchronization.rb
@@ -35,7 +35,7 @@ module Stif
end
def synchronize
- self.reset_counts
+ reset_counts
['getOR', 'getOP'].each do |method|
start = Time.now
results = Reflex::API.new().process(method)
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index c99cede55..6176babea 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,14 +1,16 @@
# This file is copied to spec/ when you run 'rails generate rspec:install'
require 'simplecov'
-if ENV['JOB_NAME']
- require 'simplecov-rcov'
- SimpleCov.formatters = [
- SimpleCov::Formatter::HTMLFormatter,
- SimpleCov::Formatter::RcovFormatter
- ]
-end
-SimpleCov.start 'rails' do
- add_filter 'vendor'
+unless ENV['NO_RCOV']
+ if ENV['JOB_NAME']
+ require 'simplecov-rcov'
+ SimpleCov.formatters = [
+ SimpleCov::Formatter::HTMLFormatter,
+ SimpleCov::Formatter::RcovFormatter
+ ]
+ end
+ SimpleCov.start 'rails' do
+ add_filter 'vendor'
+ end
end
ENV["RAILS_ENV"] = 'test'