Skip to content

Commit

Permalink
add travis check rubies
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenbeales committed Mar 24, 2018
1 parent b1bfd72 commit 1760871
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ script:
- RACK_ENV=test bundle exec rake spec
- bundle exec rake bundle:audit
- bundle exec rubocop
- cp Gemfile.lock.org Gemfile.lock
- bundle exec travis_check_rubies
- cp -p Gemfile.lock.org Gemfile.lock

addons:
postgresql: "9.6"
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ group :test do
gem 'simplecov', '~> 0.15.1', require: false # for code coverage
gem 'timecop', require: false # testing time dependent
gem 'travis', '~> 1.8.8', require: false # for continuous integrations
gem 'travis_check_rubies', require: false # check ruby versions on Travis
end

group :development do
Expand Down
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ GEM
ffi (1.9.23)
ffi (1.9.23-x64-mingw32)
formatador (0.2.5)
fspath (3.1.0)
gh (0.15.1)
addressable (~> 2.4.0)
backports
Expand Down Expand Up @@ -204,6 +205,8 @@ GEM
launchy (~> 2.1)
pusher-client (~> 0.4)
typhoeus (~> 0.6, >= 0.6.8)
travis_check_rubies (0.2.5)
fspath (~> 3.0)
typhoeus (0.8.0)
ethon (>= 0.8.0)
tzinfo (1.2.5)
Expand Down Expand Up @@ -256,6 +259,7 @@ DEPENDENCIES
sinatra-activerecord (~> 2.0.13)
timecop
travis (~> 1.8.8)
travis_check_rubies
validates_email_format_of (~> 1.6.3)
wdm (>= 0.1.0)

Expand Down
29 changes: 29 additions & 0 deletions bin/travis_check_rubies
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'travis_check_rubies' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

bundle_binstub = File.expand_path("../bundle", __FILE__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

load Gem.bin_path("travis_check_rubies", "travis_check_rubies")
2 changes: 1 addition & 1 deletion spec/study_participant_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

RSpec.describe StudyParticipant, type: :model do
subject { described_class.find_or_create_by participant: participant, study: study }
subject { TestFactory.test_study_participant }
let!(:study) { TestFactory.test_study }
let!(:participant) { TestFactory.test_participant }

Expand Down

0 comments on commit 1760871

Please sign in to comment.