Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
install gems with extensions on RG 2.0pre2.2
Browse files Browse the repository at this point in the history
patch: @jeremy
specs: me
  • Loading branch information
indirect committed Dec 20, 2012
1 parent 7c4ae0f commit 3d68743
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/bundler/source/path/installer.rb
Expand Up @@ -10,6 +10,7 @@ def initialize(spec, options = {})
@wrappers = options[:wrappers] || true
@env_shebang = options[:env_shebang] || true
@format_executable = options[:format_executable] || false
@build_args = options[:build_args] || Bundler.rubygems.build_args
end

def generate_bin
Expand Down
32 changes: 31 additions & 1 deletion spec/install/git_spec.rb
Expand Up @@ -51,7 +51,7 @@
end
end

it "setups executables" do
it "sets up git gem executables on the path" do
pending_jruby_shebang_fix
bundle "exec foobar"
expect(out).to eq("1.0")
Expand Down Expand Up @@ -808,4 +808,34 @@
expect(out).to include("failed for foo-1.0")
end
end

context "with an extension" do
it "installs the extension" do
build_git "foo" do |s|
s.add_dependency "rake"
s.extensions << "Rakefile"
s.write "Rakefile", <<-RUBY
task :default do
path = File.expand_path("../lib", __FILE__)
FileUtils.mkdir_p(path)
File.open("\#{path}/foo.rb", "w") do |f|
f.puts "FOO = 'YES'"
end
end
RUBY
end

install_gemfile <<-G
source "file://#{gem_repo1}"
gem "foo", :git => "#{lib_path('foo-1.0')}"
G

run <<-R
require 'foo'
puts FOO
R
expect(out).to eq("YES")
end
end

end

1 comment on commit 3d68743

@jeremy
Copy link
Contributor

@jeremy jeremy commented on 3d68743 Dec 21, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Please sign in to comment.