Created
July 21, 2015 01:36
-
-
Save tossh0095/da43035e07ed107fed61 to your computer and use it in GitHub Desktop.
rubygemsに登録するときにはspec.metadata['allowed_push_host']あたりを消しておこう ref: http://qiita.com/tossh/items/08e7165e730dbc1a0e2e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bundle exec rake release | |
sample_gem 0.1.0 built to pkg/sample_gem-0.1.0.gem. | |
Tag v0.1.0 has already been created. | |
rake aborted! | |
ERROR: "https://rubygems.org" is not allowed by the gemspec, which only allows "TODO: Set to 'http://mygemserver.com'" | |
Pushing gem to https://rubygems.org... | |
Tasks: TOP => release => release:rubygem_push | |
(See full trace by running task with --trace) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or | |
# delete this section to allow pushing this gem to any host.$ | |
if spec.respond_to?(:metadata)$ | |
spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'" | |
else | |
raise "RubyGems 2.0 or newer is required to protect against public gem pushes." | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment