Skip to content

Commit

Permalink
Make gemfile_util capable of copying groups over
Browse files Browse the repository at this point in the history
  • Loading branch information
jkeiser committed Apr 18, 2016
1 parent bbc1d6e commit ea2593f
Show file tree
Hide file tree
Showing 25 changed files with 604 additions and 316 deletions.
26 changes: 13 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ before_install:
- gem install bundler -v $(grep bundler omnibus_overrides.rb | cut -d'"' -f2)
- rm -f .bundle/config

bundler_args: --without docgen maintenance omnibus_package aix bsd solaris windows --frozen
bundler_args: --without docgen maintenance omnibus_package aix bsd mac_os_x solaris windows --frozen

# do not run expensive spec tests on PRs, only on branches
branches:
Expand All @@ -26,29 +26,29 @@ matrix:
- rvm: 2.1
sudo: true
script: tasks/bin/run_chef_tests
bundler_args: --without docgen maintenance integration aix bsd solaris windows --frozen
bundler_args: --without docgen maintenance integration aix bsd mac_os_x solaris windows --frozen
- rvm: 2.2
sudo: true
script: tasks/bin/run_chef_tests
bundler_args: --without docgen maintenance integration aix bsd solaris windows --frozen
bundler_args: --without docgen maintenance integration aix bsd mac_os_x solaris windows --frozen
- rvm: 2.3.0
sudo: true
script: tasks/bin/run_chef_tests
bundler_args: --without docgen maintenance integration aix bsd solaris windows --frozen
bundler_args: --without docgen maintenance integration aix bsd mac_os_x solaris windows --frozen
- rvm: rbx
sudo: true
script: tasks/bin/run_chef_tests
bundler_args: --without docgen maintenance integration aix bsd solaris windows --frozen
bundler_args: --without docgen maintenance integration aix bsd mac_os_x solaris windows --frozen
#
# External tests
#
- env:
TEST_GEM: chef-provisioning
script: tasks/bin/run_external_test $TEST_GEM "rake spec"
script: tasks/bin/run_external_test $TEST_GEM rake spec
rvm: 2.2
- env:
TEST_GEM: chef-provisioning-aws
script: tasks/bin/run_external_test $TEST_GEM "rake spec"
script: tasks/bin/run_external_test $TEST_GEM rake spec
rvm: 2.2
# requires vagrant
# - env: TEST_GEM=chef-rewind
Expand All @@ -61,11 +61,11 @@ matrix:
rvm: 2.2
- env:
- TEST_GEM: chef-zero
script: tasks/bin/run_external_test $TEST_GEM "rake spec" "rake cheffs"
script: tasks/bin/run_external_test $TEST_GEM rake spec cheffs
rvm: 2.2
- env:
TEST_GEM: cheffish
script: tasks/bin/run_external_test $TEST_GEM "rake spec"
script: tasks/bin/run_external_test $TEST_GEM rake spec
rvm: 2.2
- env:
TEST_GEM: chefspec
Expand All @@ -78,19 +78,19 @@ matrix:
rvm: 2.2.0
- env:
TEST_GEM: foodcritic
script: tasks/bin/run_external_test $TEST_GEM "rake test"
script: tasks/bin/run_external_test $TEST_GEM rake test
rvm: 2.2
- env:
TEST_GEM: halite
script: tasks/bin/run_external_test $TEST_GEM "rake spec"
script: tasks/bin/run_external_test $TEST_GEM rake spec
rvm: 2.2
- env:
TEST_GEM: knife-windows
script: tasks/bin/run_external_test $TEST_GEM "rake unit_spec"
script: tasks/bin/run_external_test $TEST_GEM rake unit_spec
rvm: 2.2
- env:
TEST_GEM: poise
script: tasks/bin/run_external_test $TEST_GEM "rake spec"
script: tasks/bin/run_external_test $TEST_GEM rake spec
rvm: 2.2
#
### START TEST KITCHEN ONLY ###
Expand Down
12 changes: 7 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require_relative "tasks/gemfile_util"
extend GemfileUtil

source "https://rubygems.org"
gemspec name: "chef"
gemspec name: ($chef_platform ? "chef-#{$chef_platform}" : "chef")

gem "activesupport", "< 4.0.0", group: :compat_testing, platform: "ruby"
gem "chef-config", path: File.expand_path("../chef-config", __FILE__) if File.exist?(File.expand_path("../chef-config", __FILE__))
Expand Down Expand Up @@ -31,7 +31,7 @@ group(:integration) do
gem "chef-sugar"
gem "chefspec"
gem "halite"
gem "poise", git: "https://github.com/poise/poise" # until released poise's tests succeed against chef master
gem "poise"
gem "knife-windows"
gem "foodcritic"
end
Expand All @@ -53,9 +53,11 @@ group(:linux, :bsd, :mac_os_x, :solaris, :windows, :ruby_prof) do
# may need to disable this in insolation on fussy builds like AIX, RHEL4, etc
gem "ruby-prof"
end
# Everything except AIX and Windows
group(:linux, :bsd, :mac_os_x, :solaris) do
gem "ruby-shadow"
unless $chef_platform == "windows"
# Everything except AIX and Windows
group(:linux, :bsd, :mac_os_x, :solaris) do
gem "ruby-shadow"
end
end

group(:development, :test) do
Expand Down
25 changes: 10 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ GIT
chefstyle (0.3.1)
rubocop (= 0.39.0)

GIT
remote: https://github.com/poise/poise
revision: a76980685a92283c08f5b2e4526ae1f08f87de79
specs:
poise (2.6.2.pre)
halite (~> 1.0)

GIT
remote: https://github.com/rubysec/bundler-audit.git
revision: 4e32fca89d75f0e249671431ff38aadc02bfb28b
Expand All @@ -25,9 +18,9 @@ GIT
PATH
remote: .
specs:
chef (12.10.4)
chef (12.10.5)
bundler (>= 1.10)
chef-config (= 12.10.4)
chef-config (= 12.10.5)
chef-zero (~> 4.5)
diff-lcs (~> 1.2, >= 1.2.4)
erubis (~> 2.7)
Expand Down Expand Up @@ -55,7 +48,7 @@ PATH
PATH
remote: chef-config
specs:
chef-config (12.10.4)
chef-config (12.10.5)
fuzzyurl (~> 0.8.0)
mixlib-config (~> 2.0)
mixlib-shellout (~> 2.0)
Expand Down Expand Up @@ -202,10 +195,10 @@ GEM
rspec-mocks (~> 3.2)
mixlib-cli (1.5.0)
mixlib-config (2.2.1)
mixlib-install (1.0.6)
artifactory (>= 2.3.0)
mixlib-shellout (>= 2.2.6)
mixlib-versioning (>= 1.1.0)
mixlib-install (1.0.7)
artifactory
mixlib-shellout
mixlib-versioning
mixlib-log (1.6.0)
mixlib-shellout (2.2.6)
mixlib-versioning (1.1.0)
Expand Down Expand Up @@ -253,6 +246,8 @@ GEM
parser (2.3.0.7)
ast (~> 2.2)
plist (3.2.0)
poise (2.7.0)
halite (~> 1.0)
polyglot (0.3.5)
powerpack (0.1.1)
proxifier (1.0.3)
Expand Down Expand Up @@ -373,7 +368,7 @@ DEPENDENCIES
netrc
nokogiri
octokit
poise!
poise
pry
pry-byebug
pry-remote
Expand Down
11 changes: 10 additions & 1 deletion Gemfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,13 @@
#

require_relative "tasks/gemfile_util"
GemfileUtil.include_locked_gemfile(self, "Gemfile", without_groups: [ :linux, :solaris, :aix ])
extend GemfileUtil

# Honor the main gem's lockfile
include_locked_gemfile("Gemfile", without_groups: [ :aix, :bsd, :mac_os_x, :linux, :solaris ], copy_groups: true)

# We have the same deps as the main Gemfile (except since we're Windows, we read the
# chef-windows.gemspec instead of chef.gemspec)
$chef_platform = "windows"
chef_gemfile = File.expand_path("../Gemfile", __FILE__)
instance_eval(IO.read(chef_gemfile), chef_gemfile)
80 changes: 52 additions & 28 deletions Gemfile.windows.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ GIT
chefstyle (0.3.1)
rubocop (= 0.39.0)

GIT
remote: https://github.com/poise/poise
revision: a76980685a92283c08f5b2e4526ae1f08f87de79
ref: a76980685a92283c08f5b2e4526ae1f08f87de79
specs:
poise (2.6.2.pre)
halite (~> 1.0)

GIT
remote: https://github.com/rubysec/bundler-audit.git
revision: 4e32fca89d75f0e249671431ff38aadc02bfb28b
Expand All @@ -23,20 +15,38 @@ GIT
bundler (~> 1.2)
thor (~> 0.18)

PATH
remote: chef-config
specs:
chef-config (12.10.4)
fuzzyurl (~> 0.8.0)
mixlib-config (~> 2.0)
mixlib-shellout (~> 2.0)

PATH
remote: .
specs:
chef (12.10.4-universal-mingw32)
chef (12.10.5)
bundler (>= 1.10)
chef-config (= 12.10.5)
chef-zero (~> 4.5)
diff-lcs (~> 1.2, >= 1.2.4)
erubis (~> 2.7)
ffi-yajl (~> 2.2)
highline (~> 1.6, >= 1.6.9)
mixlib-authentication (~> 1.4)
mixlib-cli (~> 1.4)
mixlib-log (~> 1.3)
mixlib-shellout (~> 2.0)
net-sftp (~> 2.1, >= 2.1.2)
net-ssh (>= 2.9, < 4.0)
net-ssh-multi (~> 1.1)
ohai (>= 8.6.0.alpha.1, < 9)
plist (~> 3.2)
proxifier (~> 1.0)
rspec-core (~> 3.4)
rspec-expectations (~> 3.4)
rspec-mocks (~> 3.4)
rspec_junit_formatter (~> 0.2.0)
serverspec (~> 2.7)
specinfra (~> 2.10)
syslog-logger (~> 1.6)
uuidtools (~> 2.1.5)
chef (12.10.5-universal-mingw32)
bundler (>= 1.10)
chef-config (= 12.10.4)
chef-config (= 12.10.5)
chef-zero (~> 4.5)
diff-lcs (~> 1.2, >= 1.2.4)
erubis (~> 2.7)
Expand Down Expand Up @@ -72,6 +82,14 @@ PATH
windows-api (~> 0.4.4)
wmi-lite (~> 1.0)

PATH
remote: chef-config
specs:
chef-config (12.10.5)
fuzzyurl (~> 0.8.0)
mixlib-config (~> 2.0)
mixlib-shellout (~> 2.0)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -145,6 +163,7 @@ GEM
multipart-post (>= 1.2, < 3)
fauxhai (3.3.0)
net-ssh
ffi (1.9.10)
ffi (1.9.10-x86-mingw32)
ffi-yajl (2.2.3)
libyajl2 (~> 1.2)
Expand Down Expand Up @@ -214,11 +233,12 @@ GEM
rspec-mocks (~> 3.2)
mixlib-cli (1.5.0)
mixlib-config (2.2.1)
mixlib-install (1.0.6)
artifactory (>= 2.3.0)
mixlib-shellout (>= 2.2.6)
mixlib-versioning (>= 1.1.0)
mixlib-install (1.0.7)
artifactory
mixlib-shellout
mixlib-versioning
mixlib-log (1.6.0)
mixlib-shellout (2.2.6)
mixlib-shellout (2.2.6-universal-mingw32)
win32-process (~> 0.8.2)
wmi-lite (~> 1.0)
Expand All @@ -238,6 +258,8 @@ GEM
net-ssh-gateway (>= 1.2.0)
net-telnet (0.1.1)
netrc (0.11.0)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
nokogiri (1.6.7.2-x86-mingw32)
mini_portile2 (~> 2.0.0.rc2)
nori (2.6.0)
Expand Down Expand Up @@ -267,6 +289,8 @@ GEM
parser (2.3.0.7)
ast (~> 2.2)
plist (3.2.0)
poise (2.7.0)
halite (~> 1.0)
polyglot (0.3.5)
powerpack (0.1.1)
proxifier (1.0.3)
Expand Down Expand Up @@ -315,7 +339,6 @@ GEM
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-prof (0.15.9)
ruby-progressbar (1.7.5)
ruby-shadow (2.5.0)
rubyntlm (0.6.0)
rufus-lru (1.0.5)
sawyer (0.7.0)
Expand Down Expand Up @@ -383,6 +406,7 @@ GEM
yard (0.8.7.6)

PLATFORMS
ruby
x86-mingw32

DEPENDENCIES
Expand All @@ -397,7 +421,8 @@ DEPENDENCIES
aws-sdk-v1 (= 1.66.0)!
binding_of_caller (= 0.7.2)!
builder (= 3.2.2)!
bundler-audit!
bundler
bundler-audit (= 0.4.0)!
byebug (= 8.2.4)!
chef!
chef-api (= 0.5.0)!
Expand All @@ -409,7 +434,7 @@ DEPENDENCIES
chef-zero (= 4.6.1)!
cheffish (= 2.0.4)!
chefspec (= 4.6.1)!
chefstyle!
chefstyle (= 0.3.1)!
childprocess (= 0.5.9)!
coderay (= 1.1.1)!
colorize (= 0.7.7)!
Expand Down Expand Up @@ -455,7 +480,7 @@ DEPENDENCIES
mixlib-authentication (= 1.4.0)!
mixlib-cli (= 1.5.0)!
mixlib-config (= 2.2.1)!
mixlib-install (= 1.0.6)!
mixlib-install (= 1.0.7)!
mixlib-log (= 1.6.0)!
mixlib-shellout (= 2.2.6)!
mixlib-versioning (= 1.1.0)!
Expand All @@ -477,7 +502,7 @@ DEPENDENCIES
overcommit (= 0.33.0)!
parser (= 2.3.0.7)!
plist (= 3.2.0)!
poise!
poise (= 2.7.0)!
polyglot (= 0.3.5)!
powerpack (= 0.1.1)!
proxifier (= 1.0.3)!
Expand All @@ -500,7 +525,6 @@ DEPENDENCIES
rubocop (= 0.39.0)!
ruby-prof (= 0.15.9)!
ruby-progressbar (= 1.7.5)!
ruby-shadow (= 2.5.0)!
rubyntlm (= 0.6.0)!
rufus-lru (= 1.0.5)!
sawyer (= 0.7.0)!
Expand Down
4 changes: 3 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ ChefConfig::PackageTask.new(File.expand_path("..", __FILE__), "Chef") do |packag
package.generate_version_class = true
end
# Add a conservative dependency update to version:bump (which was created by PackageTask)
task "version:bump" => %w{version:bump_patch version:update dependencies:update[conservative]}
task "version:bump" => %w{version:bump_patch version:update} do
Rake::Task["dependencies:update"].invoke("conservative")
end

task :pedant, :chef_zero_spec

Expand Down
Loading

0 comments on commit ea2593f

Please sign in to comment.