lib/rspeed/observer.rb in rspeed-0.5.2 vs lib/rspeed/observer.rb in rspeed-0.6.0
- old
+ new
@@ -9,23 +9,23 @@
line_number = example.metadata[:line_number]
spent_time = example.clock.now - example.metadata[:start_at]
json = { file: "#{file_path}:#{line_number}", time: spent_time }.to_json
- RSpeed::Redis.client.lpush(RSpeed::Variable.profile, json)
+ RSpeed::Redis.client.rpush(RSpeed::Variable.profile, json)
end
- def after_suite(splitter = ::RSpeed::Splitter.new)
- RSpeed::Redis.set(RSpeed::Variable.pipe_name, true)
+ def after_suite
+ RSpeed::Redis.set(RSpeed::Variable.pipe, true)
return unless RSpeed::Redis.specs_finished?
- splitter.rename
+ RSpeed::Splitter.consolidate
RSpeed::Redis.clean
- RSpeed::Logger.log('RSpeed finished.')
+ RSpeed::Logger.log(self, __method__, 'RSpeed finished.')
end
def before(example)
example.update_inherited_metadata(start_at: example.clock.now)
end
@@ -33,12 +33,12 @@
def before_suite
clean_profile
end
def clean_profile
- RSpeed::Logger.log('[RSpeed::Observer#clean_profile] Cleanning current flag and profile.')
+ RSpeed::Logger.log(self, __method__, 'Cleanning current flag and profile.')
- RSpeed::Redis.destroy(RSpeed::Variable.pipe_name)
- RSpeed::Redis.destroy(RSpeed::Variable.profile)
+ RSpeed::Redis.destroy(pattern: RSpeed::Variable.pipe)
+ RSpeed::Redis.destroy(pattern: RSpeed::Variable.profile)
end
end
end