New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Rake task to install dev dependencies. #2173
Conversation
… than a bit gross right now.
This is marked as a WIP because the code for it is more than a bit gross, since it Any ideas on how to make it less gross without duplicating the list of dependencies would be greatly appreciated. |
@bundlerbot try |
[WIP] Add Rake task to install dev dependencies. # Description: This adds a `rake setup` which installs the ependencies required for working on RubyGems. It's basically a replacement for `rake newb`. Usage: $ gem install rake $ rake setup $ rake test # Tasks: - [x] Describe the problem / feature - [ ] Write tests - [ ] Write code to solve the problem - [ ] Get code review from coworkers / friends I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md).
how the actual fuck did this break things lmao |
💥 Test timed out |
NOTE: For the time being, you can do:
|
@duckinator perhaps something like this would be a bit lack hacky? diff --git a/Rakefile b/Rakefile
index d681d2b3..00f2ae50 100644
--- a/Rakefile
+++ b/Rakefile
@@ -16,12 +16,10 @@ end
task :setup do
# TODO: I am sorry for this abomination, and it needs to be replaced. -@duckinator
- gemspec = eval(File.read(File.expand_path("../rubygems-update.gemspec", __FILE__)))
- deps = gemspec.dependencies.map { |dep|
- "'#{dep.name}:#{dep.requirement.to_s}'"
- }
-
- sh "gem install #{deps.join(" ")}"
+ gemspec = Gem::Specification.load(File.expand_path("../rubygems-update.gemspec", __FILE__))
+ gemspec.dependencies.each do |dep|
+ Gem.install(dep.name, dep.requirement)
+ end
end
Rake::TestTask.new do |t|
diff --git a/rubygems-update.gemspec b/rubygems-update.gemspec
index 64ed401e..dd402b53 100644
--- a/rubygems-update.gemspec
+++ b/rubygems-update.gemspec
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
s.add_development_dependency(%q<rdoc>.freeze, ["~> 4.0"])
s.add_development_dependency(%q<rake>.freeze, ["~> 10.5"])
s.add_development_dependency(%q<minitest>.freeze, ["~> 5.0"])
else
s.add_dependency(%q<builder>.freeze, ["~> 2.1"])
s.add_dependency(%q<rdoc>.freeze, ["~> 4.0"])
|
@segiddins that exact code tries to install it to the global installation directory, despite my I'll see if I can figure out how to make that part work right, but even if I can't, the fact that I no longer have to do the |
I give up. It'll just call a shell command.
Ah dang, I guess that’s because those options in the gemrc only apply to the CLI |
I give up. I spent way too much time going down that rabbit hole. It works and it doesn't use |
@segiddins any idea why this would cause test failures? that doesn't really make sense to me, and it seems to be different tests failing every time... |
☔ The latest upstream changes (presumably #2177) made this pull request unmergeable. Please resolve the merge conflicts. |
@duckinator test failures happened randomly. I already filed #2133 I couldn't find a root cause of this failures yet. You can get green status with restarting failed tasks in Travis. |
thanks for the info, @hsbt. i don't seem to have access to restart the AppVeyor build, which is what's failed atm; could someone do that for me? |
uhh... why are we using appveyor's segiddins/rubygems to build rubygems, instead of rubygems/rubygems? I don't have permission to restart builds on segiddins/rubygems either. @segiddins? |
(Somewhat related: I have just now configured Appveyor so that anyone in the GitHub rubygems/rubygems team should now have access to control the Appveyor project rubygems/rubygems.) |
@indirect I have 0 clue why it's linking to me instead of rubygems... the web hook configured for the repo just seems to have an ID, and I dont see where on appveyer that ID is coming from |
@bundlerbot r+ |
📌 Commit 8fed9a8 has been approved by |
Add Rake task to install dev dependencies. # Description: This adds a `rake setup` which installs the ependencies required for working on RubyGems. It's basically a replacement for `rake newb`. Usage: $ gem install rake $ rake setup $ rake test # Tasks: - [x] Describe the problem / feature - [ ] Write tests - [ ] Write code to solve the problem - [ ] Get code review from coworkers / friends I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md).
☀️ Test successful - status-travis |
Description:
This adds a
rake setup
which installs the ependencies required for working on RubyGems.It's basically a replacement for
rake newb
.Usage:
Tasks:
I will abide by the code of conduct.