From 926af203fe27cc95eb806ec83774eca6b6011fa5 Mon Sep 17 00:00:00 2001 From: Vasily Kolesnikov Date: Wed, 27 Dec 2017 23:02:27 +0300 Subject: [PATCH 1/3] Update CI configuration - sudo: required => true - Use Ruby 2.5.0 --- .travis.yml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index ed89b5c..5220258 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,26 +1,32 @@ language: ruby + dist: trusty -sudo: required +sudo: false + cache: bundler + services: - mongodb -bundler_args: --without yard guard benchmarks tools -after_success: - - '[ -d coverage ] && bundle exec codeclimate-test-reporter' -script: "bundle exec rake ci" + rvm: - - 2.2.6 - 2.3.3 - - 2.4.1 - - rbx-3 - - jruby + - 2.5.0 + - jruby-9.1.13.0 + +bundler_args: --without tools + env: global: - JRUBY_OPTS='--dev -J-Xmx1024M' - COVERAGE='true' -matrix: - allow_failures: - - rvm: rbx-3 + +before_install: + # NOTE: https://github.com/travis-ci/travis-ci/issues/8978 + - gem update --system + +after_success: + - '[ -d coverage ] && bundle exec codeclimate-test-reporter' + notifications: webhooks: urls: From 129d1b5b8deff13502e8c2b8e0f3813572c8ed2e Mon Sep 17 00:00:00 2001 From: Vasily Kolesnikov Date: Thu, 28 Dec 2017 00:00:45 +0300 Subject: [PATCH 2/3] Fix integration specs for commands --- spec/integration/gateway_spec.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/spec/integration/gateway_spec.rb b/spec/integration/gateway_spec.rb index 981de25..bc74ee3 100644 --- a/spec/integration/gateway_spec.rb +++ b/spec/integration/gateway_spec.rb @@ -58,9 +58,7 @@ it 'inserts a document into collection' do id = BSON::ObjectId.new - result = commands.try do - commands.create.call(_id: id, name: 'joe', email: 'a.joe@doe.org') - end + result = commands.create.call(_id: id, name: 'joe', email: 'a.joe@doe.org') expect(result) .to match_array([{ _id: id, name: 'joe', email: 'a.joe@doe.org' }]) @@ -71,9 +69,7 @@ it 'updates a document in the collection' do jane = users.by_name('Jane').one! - result = commands.try do - commands.update.by_name('Jane').call(email: 'jane.doe@test.com') - end + result = commands.update.by_name('Jane').call(email: 'jane.doe@test.com') expect(result).to match_array( [{ '_id' => BSON::ObjectId.from_string(jane._id), From da4d4b9971fd4679e59d1bb8a6b08cb366cac263 Mon Sep 17 00:00:00 2001 From: Vasily Kolesnikov Date: Wed, 27 Dec 2017 23:59:08 +0300 Subject: [PATCH 3/3] Fix ROM::Mongo::Struct.constructor_type See more: https://github.com/dry-rb/dry-struct/pull/55 --- lib/rom/mongo/struct.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rom/mongo/struct.rb b/lib/rom/mongo/struct.rb index 2123ad7..4169b1a 100644 --- a/lib/rom/mongo/struct.rb +++ b/lib/rom/mongo/struct.rb @@ -3,7 +3,7 @@ module ROM module Mongo class Struct < ROM::Struct - constructor_type :symbolized + constructor_type :permissive end end end