Sha256: c7da0f7f2056059c46d844e6e3dceb3259758adfc63988222533510caf7c8a6c
Contents?: true
Size: 791 Bytes
Versions: 1
Compression:
Stored size: 791 Bytes
Contents
module YSI class PublishedGem < Assertion needs "built_gem" attr_accessor :error def initialize(engine) @engine = engine end def display_name "published gem" end def gem_file "#{@engine.project_name}-#{@engine.version}.gem" end def check begin json = RestClient.get("http://rubygems.org/api/v1/versions/#{engine.project_name}.json") rescue RestClient::ResourceNotFound return nil end versions = JSON.parse(json) versions.each do |version| if version["number"] == @engine.version return @engine.version end end nil end def assert(dry_run: false) if !dry_run `gem push #{gem_file}` end gem_file end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
yes_ship_it-0.0.2 | assertions/published_gem.rb |