From d38c68c5748926cb8afdad811106594ceaea1962 Mon Sep 17 00:00:00 2001 From: John Keiser Date: Wed, 2 Mar 2016 13:23:55 -0800 Subject: [PATCH] Use compiled ruby on windows Windows devkit on windows only plz --- omnibus/config/projects/chefdk.rb | 18 ++++++------------ .../software/chefdk-env-customization.rb | 2 +- omnibus/config/software/chefdk.rb | 10 +++------- .../config/software/rubygems-customization.rb | 7 +------ 4 files changed, 11 insertions(+), 26 deletions(-) diff --git a/omnibus/config/projects/chefdk.rb b/omnibus/config/projects/chefdk.rb index 6a5a83fa9..387786ccd 100644 --- a/omnibus/config/projects/chefdk.rb +++ b/omnibus/config/projects/chefdk.rb @@ -32,6 +32,11 @@ install_dir "#{default_root}/#{name}" end +override :ruby, version: "2.1.6" +override :'ruby-windows-devkit', version: "4.7.2-20130224" if windows? && windows_arch_i386? +override :bundler, version: "1.11.2" +override :rubygems, version: "2.5.2" + # Uncomment to pin the chef version override :chef, version: "master" override :ohai, version: "master" @@ -48,9 +53,6 @@ override :chefspec, version: "master" override :foodcritic, version: "v6.0.1" -override :bundler, version: "1.11.2" -override :rubygems, version: "2.5.2" - override :"chef-vault", version: "master" # TODO: Can we bump default versions in omnibus-software? @@ -59,15 +61,6 @@ # override :libxml2, version: "2.9.3" override :libxslt, version: "1.1.28" -if windows? - override :'ruby-windows', version: "2.1.6" - if windows_arch_i386? - override :'ruby-windows-devkit', version: "4.7.2-20130224" - end -else - override :ruby, version: "2.1.6" -end - override :rubocop, version: "v0.37.2" override :'kitchen-vagrant', version: "master" @@ -92,6 +85,7 @@ dependency "chef-provisioning-fog" dependency "chef-provisioning-vagrant" dependency "chef-provisioning-azure" +dependency "ruby-windows-devkit" if windows? dependency "rubygems-customization" dependency "shebang-cleanup" dependency "version-manifest" diff --git a/omnibus/config/software/chefdk-env-customization.rb b/omnibus/config/software/chefdk-env-customization.rb index fe3607257..c97c0b177 100644 --- a/omnibus/config/software/chefdk-env-customization.rb +++ b/omnibus/config/software/chefdk-env-customization.rb @@ -21,7 +21,7 @@ source path: "#{project.files_path}/#{name}" -dependency "ruby-windows" +dependency "ruby" build do block "Add chefdk_env_customization file" do diff --git a/omnibus/config/software/chefdk.rb b/omnibus/config/software/chefdk.rb index 7ad1b8c82..70a360400 100644 --- a/omnibus/config/software/chefdk.rb +++ b/omnibus/config/software/chefdk.rb @@ -39,17 +39,13 @@ relative_path "chef-dk" -if windows? - dependency "ruby-windows" - dependency "ruby-windows-devkit" -else - dependency "libffi" if debian? - dependency "ruby" -end +dependency "ruby" dependency "rubygems" dependency "bundler" dependency "appbundler" +# windows does not have native readline support with compiled ruby +dependency "rb-readline" if windows? dependency "chef" dependency "test-kitchen" dependency "inspec" diff --git a/omnibus/config/software/rubygems-customization.rb b/omnibus/config/software/rubygems-customization.rb index 2d6565756..9e484c8a6 100644 --- a/omnibus/config/software/rubygems-customization.rb +++ b/omnibus/config/software/rubygems-customization.rb @@ -19,12 +19,7 @@ source path: "#{project.files_path}/#{name}" -if windows? - dependency "ruby-windows" -else - dependency "ruby" -end - +dependency "ruby" dependency "rubygems" build do