diff --git a/.travis.yml b/.travis.yml index 27b28e7..7a80c02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,4 +4,5 @@ rvm: before_install: gem install bundler -v 1.11.2 script: - - CODECLIMATE_REPO_TOKEN=763e2fed349469f0d07de8278c7df59cc64b9b8aa8f2f178fb1e7c5efae1bc49 bundle exec rspec + - bundle exec rake + - CODECLIMATE_REPO_TOKEN=763e2fed349469f0d07de8278c7df59cc64b9b8aa8f2f178fb1e7c5efae1bc49 bundle exec codeclimate-test-reporter diff --git a/dao-gateway.gemspec b/dao-gateway.gemspec index a0320cf..51c6737 100644 --- a/dao-gateway.gemspec +++ b/dao-gateway.gemspec @@ -24,5 +24,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 10.0' spec.add_development_dependency 'rspec', '~> 3.4' spec.add_development_dependency 'rspec-its' - spec.add_development_dependency 'codeclimate-test-reporter' + spec.add_development_dependency 'simplecov' + spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0.0' end diff --git a/lib/dao/gateway/base.rb b/lib/dao/gateway/base.rb index c806e40..a6af31a 100644 --- a/lib/dao/gateway/base.rb +++ b/lib/dao/gateway/base.rb @@ -34,6 +34,10 @@ def with_transaction(&_block) raise TransactionNotSupported end + def with_lock(_id, &_block) + raise LockNotSupported + end + def serializable_relations(relations) convert_array(relations) end diff --git a/lib/dao/gateway/lock_not_supported.rb b/lib/dao/gateway/lock_not_supported.rb new file mode 100644 index 0000000..2c2aebb --- /dev/null +++ b/lib/dao/gateway/lock_not_supported.rb @@ -0,0 +1,5 @@ +module Dao + module Gateway + class LockNotSupported < StandardError; end + end +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a750ab9..51d0dc5 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,7 +1,5 @@ -if ENV['CODECLIMATE_REPO_TOKEN'] - require 'codeclimate-test-reporter' - CodeClimate::TestReporter.start -end +require 'simplecov' +SimpleCov.start $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'dao/gateway'