diff --git a/Gemfile b/Gemfile index b5db3d3e..d471f170 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/Rakefile b/Rakefile index 2944a8f1..0979cbc5 100644 --- a/Rakefile +++ b/Rakefile @@ -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 diff --git a/train-aws.gemspec b/train-aws.gemspec new file mode 100644 index 00000000..ed3912aa --- /dev/null +++ b/train-aws.gemspec @@ -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 diff --git a/train-azure.gemspec b/train-azure.gemspec new file mode 100644 index 00000000..49ff1564 --- /dev/null +++ b/train-azure.gemspec @@ -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 diff --git a/train-core.gemspec b/train-core.gemspec new file mode 100644 index 00000000..bb414c95 --- /dev/null +++ b/train-core.gemspec @@ -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 diff --git a/train-gcp.gemspec b/train-gcp.gemspec new file mode 100644 index 00000000..e358234a --- /dev/null +++ b/train-gcp.gemspec @@ -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