Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to require ruby2.5+ #266

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/moonshot-*.gem
/.bundle
/Gemfile.lock
/vendor
/coverage
/cc-test-reporter
site/
sample/gems
sample/gems
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.3
2.6
22 changes: 16 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,32 @@
language: ruby

cache: bundler
# This will enable the container-based infrastructure for
# travis tests. It should result in faster test vm load times.
# @see http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false

rvm:
- 2.6

addons:
apt:
sources:
- kalakris-cmake
packages:
- cmake

env:
global:
- COVERAGE=1

before_install:
- gem install rubygems-update -v '<3' --no-document && update_rubygems
- gem update bundler

rvm:
- 2.2
- 2.3.3
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build

after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- ./cc-test-reporter format-coverage -t simplecov -o coverage/codeclimate.json coverage/.resultset.json
- if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter upload-coverage -i coverage/codeclimate.json; fi
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM ubuntu:xenial

RUN apt-get update \
&& apt-get install -y \
build-essential \
cmake \
git \
software-properties-common

RUN apt-add-repository -y ppa:brightbox/ruby-ng \
&& apt-get update \
&& apt-get install -y \
ruby2.6 \
ruby2.6-dev

RUN gem install rubygems-update -v '<3' --no-document && update_rubygems \
&& gem update bundler

3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ gemspec
gem 'rake', require: false

group :test do
gem 'codeclimate-test-reporter'
gem 'pry'
gem 'rubocop', '~> 0.49.0'
gem 'rubocop'
end
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ We also want to [help you contribute and answer all your questions](http://moons

## Requirements

- Ruby 2.2 or higher
- Ruby 2.5 or higher

## Attributions

Expand Down
20 changes: 8 additions & 12 deletions moonshot.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'moonshot'
s.version = '2.0.0.beta6'
s.version = '2.1.0.beta1'
s.licenses = ['Apache-2.0']
s.summary = 'A library and CLI tool for launching services into AWS'
s.description = 'A library and CLI tool for launching services into AWS.'
Expand All @@ -21,23 +21,19 @@ Gem::Specification.new do |s|
s.add_dependency('aws-sdk-s3', '~> 1.12')

s.add_dependency('colorize')
s.add_dependency('highline', '~> 1.7.2')
s.add_dependency('interactive-logger', '~> 0.1.2')
s.add_dependency('rotp', '~> 2.1.1')
s.add_dependency('ruby-duration', '~> 3.2.3')
s.add_dependency('highline')
s.add_dependency('interactive-logger')
s.add_dependency('rotp')
s.add_dependency('ruby-duration')
s.add_dependency('retriable')
# Pin back activesupport (ruby-duration dependency) until we only support
# Ruby >= 2.2.2.
s.add_dependency('activesupport', '< 5.0.0')
s.add_dependency('thor', '~> 0.19.1')
s.add_dependency('activesupport')
s.add_dependency('thor')
s.add_dependency('semantic')
s.add_dependency('travis')
s.add_dependency('vandamme')
s.add_dependency('pry')
s.add_dependency('require_all', '~> 1.5.0')

s.add_development_dependency('rspec')
s.add_development_dependency('simplecov')
# fakefs requires < 0.14.0 for ruby 2.2
s.add_development_dependency('fakefs', '< 0.14.0')
s.add_development_dependency('fakefs')
end
6 changes: 3 additions & 3 deletions spec/moonshot/stack_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,20 @@
let(:expected_put_object_options) do
{
bucket: config.template_s3_bucket,
key: 'rspec-app-staging-1483228800-template.yml',
key: 'rspec-app-staging-1483246800-template.yml',
body: an_instance_of(String)
}
end

let(:expected_create_stack_options) do
{
template_url: 'http://rspec-bucket.s3.amazonaws.com/rspec-app-staging-1483228800-template.yml'
template_url: 'http://rspec-bucket.s3.amazonaws.com/rspec-app-staging-1483246800-template.yml'
}
end

it 'should call put_object and create_stack with template_url parameter' do
expect(s3_client).to receive(:put_object)
.with(hash_including(expected_put_object_options))
.with(expected_put_object_options)
expect(cf_client).to receive(:create_stack)
.with(hash_including(expected_create_stack_options))
subject.create
Expand Down