pastr_it 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/pastr_it.rb +3 -3
  2. metadata +1 -1
data/lib/pastr_it.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require "optparse"
2
2
  class PastrIt
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
  REALM = 'Pastr Registered User'
5
5
  PastrHome = "http://pastr.it"
6
6
  PastrNew = "%s/%s" % [PastrHome, :new]
@@ -56,7 +56,7 @@ class PastrIt
56
56
  @opts.parse!(@args)
57
57
 
58
58
  if @list_langs
59
- puts http_request(:url => "http://pastr.it/languages").content
59
+ puts http_request(:url => "http://pastr.it/languages", :auth => false).content
60
60
  exit
61
61
  elsif @version_only
62
62
  puts "pastr-it for http://pastr.it - Version: #{PastrIt::VERSION}"
@@ -104,7 +104,7 @@ class PastrIt
104
104
  def http_request(args)
105
105
  form = args[:form] || nil
106
106
  url = args[:url] || PastrNew
107
- auth = args[:auth] || true
107
+ auth = args.keys.include?(:auth) ? args[:auth] : true
108
108
  require "httpclient"
109
109
  if auth
110
110
  check_netrc
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pastr_it
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jayson Vaughn