diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..000b778 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ +name: Release +on: + workflow_dispatch: {} + push: + branches: + - master +permissions: + contents: write + pull-requests: write +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v3 + id: release + with: + release-type: ruby + package-name: man_eb_deployer + version-file: lib/eb_deployer/version.rb + - uses: actions/checkout@v4 + - name: publish to rubygems + if: ${{ steps.release.outputs.release_created }} + run: | + mkdir -p $HOME/.gem + touch $HOME/.gem/credentials + chmod 0600 $HOME/.gem/credentials + printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials + gem build eb_deployer.gemspec + gem push man_eb_deployer-*.gem + env: + GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..873666e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,16 @@ +name: Tests + +on: + pull_request: {} + workflow_dispatch: {} + +jobs: + test: + name: Unit Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@52b8784594ec115fd17094752708121dc5dabb47 + with: + bundler-cache: true + - run: bundle exec rake test diff --git a/.gitignore b/.gitignore index a5bacc3..a6a8282 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ /samples/jruby_rails4/public/assets/* /TAGS /.aws +/.bundle +/vendor +/*.gem diff --git a/.ruby-version b/.ruby-version index aedc15b..be94e6f 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.5.3 +3.2.2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fa396fa..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -rvm: - - 1.9.3 - - 2.2.10 - - 2.3.8 - - 2.4.5 - - 2.5.3 - - jruby-9.2.4.0 -before_install: - - gem install bundler -script: "bundle exec rake" -bundler_args: "--without repl documentation" -branches: - only: - - master diff --git a/Gemfile b/Gemfile index 810c33b..38fda44 100644 --- a/Gemfile +++ b/Gemfile @@ -6,5 +6,5 @@ gemspec gem 'redcarpet', :platform => :mri gem 'yard' gem 'rake' -gem 'railties', '~> 4.1' +gem 'railties', '~> 7.0' gem 'test-unit' diff --git a/README.md b/README.md index 0806476..9efe081 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# EbDeployer [![Build Status](https://snap-ci.com/ThoughtWorksStudios/eb_deployer/branch/master/build_image)](https://snap-ci.com/ThoughtWorksStudios/eb_deployer/branch/master) [![Build Status](https://travis-ci.org/ThoughtWorksStudios/eb_deployer.png?branch=master)](https://travis-ci.org/ThoughtWorksStudios/eb_deployer) [![Gem Version](https://badge.fury.io/rb/eb_deployer.svg)](http://badge.fury.io/rb/eb_deployer) [![Dependency Status](https://www.versioneye.com/ruby/eb_deployer/0.6.1/badge.svg)](https://www.versioneye.com/ruby/eb_deployer/0.6.1) +# EbDeployer ![Tests](https://github.com/manheim/eb_deployer/actions/workflows/test.yml/badge.svg) [![Gem Version](https://badge.fury.io/rb/eb_deployer.svg)](http://badge.fury.io/rb/eb_deployer) [![Dependency Status](https://www.versioneye.com/ruby/eb_deployer/0.6.1/badge.svg)](https://www.versioneye.com/ruby/eb_deployer/0.6.1) + +Fork maintained by Manheim to upgrade Ruby version and dependencies. [Built with :yellow_heart: and :coffee: in San Francisco](http://www.thoughtworks.com/mingle/team/) diff --git a/bin/eb_deploy b/bin/eb_deploy index bf0be48..edee637 100755 --- a/bin/eb_deploy +++ b/bin/eb_deploy @@ -2,7 +2,7 @@ git_path = File.join(File.expand_path('../..', __FILE__), '.git') -if File.exists?(git_path) +if File.exist?(git_path) lib_path = File.expand_path('../../lib', __FILE__) $:.unshift(lib_path) end diff --git a/eb_deployer.gemspec b/eb_deployer.gemspec index 4a4ab28..a787261 100644 --- a/eb_deployer.gemspec +++ b/eb_deployer.gemspec @@ -2,21 +2,21 @@ require File.expand_path('../lib/eb_deployer/version', __FILE__) Gem::Specification.new do |gem| - gem.authors = ["wpc", "betarelease", "xli"] - gem.email = ["alex.hal9000@gmail.com", "sudhindra.r.rao@gmail.com", 'swing1979@gmail.com'] + gem.authors = ["wpc", "betarelease", "xli", "manheim"] + gem.email = ["tooling@manheim.com "] gem.description = %q{For automating Blue-Green deployment flows on Elastic Beanstalk.} gem.summary = %q{Low friction deployments should be a breeze. Elastic Beanstalk provides a great foundation for performing Blue-Green deployments, and EbDeployer add a missing top to automate the whole flow out of the box.} - gem.homepage = "https://github.com/ThoughtWorksStudios/eb_deployer" + gem.homepage = "https://github.com/manheim/eb_deployer" gem.license = 'MIT' - gem.add_runtime_dependency 'aws-sdk-cloudformation', '~> 1.4', '>= 1.4.0' - gem.add_runtime_dependency 'aws-sdk-elasticbeanstalk', '~> 1.5', '~> 1.5.0' - gem.add_runtime_dependency 'aws-sdk-s3', '~> 1', '~> 1.30.0' + gem.add_runtime_dependency 'aws-sdk-cloudformation', '~> 1.0' + gem.add_runtime_dependency 'aws-sdk-elasticbeanstalk', '~> 1.0' + gem.add_runtime_dependency 'aws-sdk-s3', '~> 1.0' gem.files = `git ls-files`.split($\).reject {|f| f =~ /^samples\// } gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) - gem.name = "eb_deployer" + gem.name = "man_eb_deployer" gem.require_paths = ["lib"] gem.version = EbDeployer::VERSION end diff --git a/lib/eb_deployer.rb b/lib/eb_deployer.rb index c446b1b..b552eb6 100644 --- a/lib/eb_deployer.rb +++ b/lib/eb_deployer.rb @@ -260,7 +260,7 @@ def self.cli parser.parse! action = options.delete(:action) - if File.exists?(options[:config_file]) + if File.exist?(options[:config_file]) puts "Found configuration at #{options[:config_file]}." else puts "Generated default configuration at #{options[:config_file]}." diff --git a/lib/eb_deployer/tasks.rb b/lib/eb_deployer/tasks.rb index dbf13cb..7e77452 100644 --- a/lib/eb_deployer/tasks.rb +++ b/lib/eb_deployer/tasks.rb @@ -13,7 +13,7 @@ def eb_deployer_package def eb_package_files ignore_file = File.join(Dir.pwd, ".ebdeployerignore") - ignore_patterns = File.exists?(ignore_file) ? File.readlines(ignore_file).map(&:strip) : [] + ignore_patterns = File.exist?(ignore_file) ? File.readlines(ignore_file).map(&:strip) : [] `git ls-files`.lines.reject { |f| ignore_patterns.any? { |p| File.fnmatch(p, f.strip) } } end diff --git a/samples/jruby_rails4/config/boot.rb b/samples/jruby_rails4/config/boot.rb index 3596736..5e5f0c1 100644 --- a/samples/jruby_rails4/config/boot.rb +++ b/samples/jruby_rails4/config/boot.rb @@ -1,4 +1,4 @@ # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) +require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])