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

Provide additional gemspecs for various backends and a 'core' that they all depend on. #291

Closed
wants to merge 4 commits into from
Closed
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
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# encoding: utf-8
source 'https://rubygems.org'
gemspec
gemspec name: 'train'

# pin dependency for Ruby 1.9.3 since bundler is not
# detecting that net-ssh 3 does not work with 1.9.3
Expand Down
4 changes: 3 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
# encoding: utf-8

require 'bundler'
require 'bundler/gem_tasks'
require 'bundler/gem_helper'
require 'rake/testtask'
require 'rubocop/rake_task'

Bundler::GemHelper.install_tasks name: 'train'

# Rubocop
desc 'Run Rubocop lint checks'
task :rubocop do
Expand Down
23 changes: 23 additions & 0 deletions train-aws.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# encoding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'train/version'

Gem::Specification.new do |spec|
spec.name = 'train-aws'
spec.version = Train::VERSION
spec.authors = ['Dominik Richter']
spec.email = ['dominik.richter@gmail.com']
spec.summary = 'Provides AWS support to train-core.'
spec.description = 'Provides AWS support to train-core.'
spec.homepage = 'https://github.com/chef/train/'
spec.license = 'Apache-2.0'

spec.files = %w{train-aws.gemspec README.md LICENSE Gemfile CHANGELOG.md
lib/train/transports/aws.rb}

spec.require_paths = ['lib']

spec.add_dependency 'train-core'
spec.add_dependency 'aws-sdk', '~> 2'
end
23 changes: 23 additions & 0 deletions train-azure.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# encoding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'train/version'

Gem::Specification.new do |spec|
spec.name = 'train-azure'
spec.version = Train::VERSION
spec.authors = ['Dominik Richter']
spec.email = ['dominik.richter@gmail.com']
spec.summary = 'Provides Azure support to train-core.'
spec.description = 'Provides Azure support to train-core.'
spec.homepage = 'https://github.com/chef/train/'
spec.license = 'Apache-2.0'

spec.files = %w{train-azure.gemspec README.md LICENSE CHANGELOG.md
lib/train/transports/azure.rb}

spec.require_paths = ['lib']

spec.add_dependency 'train-core'
spec.add_dependency 'azure_mgmt_resources', '~> 0.15'
end
34 changes: 34 additions & 0 deletions train-core.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# encoding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'train/version'

Gem::Specification.new do |spec|
spec.name = 'train-core'
spec.version = Train::VERSION
spec.authors = ['Dominik Richter']
spec.email = ['dominik.richter@gmail.com']
spec.summary = 'Transport interface to talk to a selected set of backends.'
spec.description = 'A minimal Train with a selected set of backends, ssh, winrm, and docker.'
spec.homepage = 'https://github.com/chef/train/'
spec.license = 'Apache-2.0'

spec.files = %w{train-core.gemspec README.md LICENSE Gemfile CHANGELOG.md} + Dir
.glob('{lib,test}/**/*', File::FNM_DOTMATCH)
.reject { |f| File.directory?(f) || f =~ /aws|azure|gcp/ }

spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.add_dependency 'json', '>= 1.8', '< 3.0'
# chef-client < 12.4.1 require mixlib-shellout-2.0.1
spec.add_dependency 'mixlib-shellout', '~> 2.0'
# net-ssh 3.x drops Ruby 1.9 support, so this constraint could be raised when
# 1.9 support is no longer needed here or for Inspec
spec.add_dependency 'net-ssh', '>= 2.9', '< 5.0'
spec.add_dependency 'net-scp', '~> 1.2'
spec.add_dependency 'winrm', '~> 2.0'
spec.add_dependency 'winrm-fs', '~> 1.0'
spec.add_dependency 'docker-api', '~> 1.26'
spec.add_dependency 'inifile'
end
26 changes: 26 additions & 0 deletions train-gcp.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# encoding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'train/version'

Gem::Specification.new do |spec|
spec.name = 'train-gcp'
spec.version = Train::VERSION
spec.authors = ['Dominik Richter']
spec.email = ['dominik.richter@gmail.com']
spec.summary = 'Provides Google Cloud Provider support to train-core.'
spec.description = 'Provides Google Cloud Provider support to train-core.'
spec.homepage = 'https://github.com/chef/train/'
spec.license = 'Apache-2.0'

spec.files = %w{train-gcp.gemspec README.md LICENSE CHANGELOG.md
lib/train/transports/gcp.rb}

spec.require_paths = ['lib']

spec.add_dependency 'train-core'
spec.add_dependency 'google-api-client', '~> 0.19.8'
spec.add_dependency 'googleauth', '~> 0.6.2'
spec.add_dependency 'google-cloud', '~> 0.51.1'
spec.add_dependency 'google-protobuf', '= 3.5.1'
end