Adds batchfile generation (not integrated with binstub generation yet) #2

merged 1 commit into from Mar 4, 2014


None yet

2 participants


Putting this up here for early feedback:

  • Is the batch file code correct?
  • How do we pass paths into the appbundler CLI at the moment? If we want the CLI to accept paths with backslashes, we'll need to translate them on the way in since ruby only deals with '/' separators internally.

/cc @adamedx

@adamedx adamedx commented on the diff Mar 4, 2014
@@ -45,8 +45,30 @@ def gemfile_lock
File.join(app_root, "Gemfile.lock")
+ def ruby
+ Gem.ruby
+ end
+ def batchfile_stub
+ ruby_relpath_windows = ruby_relative_path.gsub('/', '\\')
adamedx Mar 4, 2014

Good defense here.

adamedx commented Mar 4, 2014

Looks good -- batch file code is correct. Can you explain more about the issue with passing in "" in cli? Seems like all inputs here are derived from Ruby methods that will give you "/" before you use other Ruby library calls, so I don't see the "" issue.


@adamedx the ruby apps that I've tried don't translate paths that they get as command line arguments. For example, rspec spec/something/my_code_spec.rb works, but rspec spec\something\my_code_spec.rb does not, which can be pretty annoying in powershell. I haven't tried running appbundler on windows yet, but I suspect the same would be true for appbundler's CLI.

@danielsdeleo danielsdeleo merged commit 9122afb into master Mar 4, 2014

1 check passed

default The Travis CI build passed
@danielsdeleo danielsdeleo deleted the windows-batch-stubs branch Mar 4, 2014

I've decided to merge this now even though it's not 100% complete. We still have some work to do to get ChefDK building on windows, so we can't verify that this works correctly until that's done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment