lib/ggem/gemspec.rb in ggem-1.8.4 vs lib/ggem/gemspec.rb in ggem-1.9.0

- old
+ new

@@ -1,15 +1,15 @@ -require 'pathname' -require 'scmd' +require "pathname" +require "scmd" module GGem class Gemspec - PUSH_HOST_META_KEY = 'allowed_push_host' - DEFAULT_PUSH_HOST = 'https://rubygems.org'.freeze - BUILD_TO_DIRNAME = 'pkg'.freeze + PUSH_HOST_META_KEY = "allowed_push_host" + DEFAULT_PUSH_HOST = "https://rubygems.org".freeze + BUILD_TO_DIRNAME = "pkg".freeze attr_reader :path, :name, :version, :version_tag attr_reader :gem_file_name, :gem_file, :push_host def initialize(root_path) @@ -67,10 +67,10 @@ msg << "\n" raise LoadError, msg end def get_push_host(spec) - ENV['GGEM_PUSH_HOST'] || get_meta(spec)[PUSH_HOST_META_KEY] || DEFAULT_PUSH_HOST + ENV["GGEM_PUSH_HOST"] || get_meta(spec)[PUSH_HOST_META_KEY] || DEFAULT_PUSH_HOST end def get_meta(spec) (spec.respond_to?(:metadata) ? spec.metadata : {}) || {} end