def gem_name_taken?(name)
      require 'open-uri'
      require 'json'
      url = "https://rubygems.org/api/v1/gems/#{name}.json"
      response = JSON.parse(open(url).read)
      return !!response['version']
    rescue
      false
    end
def gem_name_taken?(name)
      require 'open-uri'
      require 'json'
      url = "https://rubygems.org/api/v1/gems/#{name}.json"
      response = JSON.parse(open(url).read)
      return !!response['version']
    rescue
      false
    end
Checks if the gem name is still free on RubyGems