internode 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dee6dad4185b3955b4e8861685ae028e7408232f
4
- data.tar.gz: 493e9b948165a5dd76fadbe9ba6fd6053b66327f
3
+ metadata.gz: abf4ed0ce95e242058ca2b80f6eab3ba4af87d6f
4
+ data.tar.gz: 2dfc80e28ae9bec396824e56f12c6546ccd2158c
5
5
  SHA512:
6
- metadata.gz: b0f45b140ebcf0190fc4de362425b1909f112ae8698c48a32c5d2c466c15b89a78be44182ec8a61cd6071c3296764c60c7d825fbe6af1a464d1d37106575fd9a
7
- data.tar.gz: ba93a08825d8ba959eeb057183bcc02f24697d5a59ed900c4d7bcd4258afbe882bf307ed3c3b94f5a199312478f3f129d3e3932ffba680765f39e257ff9fe68c
6
+ metadata.gz: b7c57ca5e7a9807ff71812c6d79e3798615dd858f79ab5a264e4ba71148148fd8372902afa420d6133c74ef54e0769e4637c7a4a1afad03eeaa4f0394da81d76
7
+ data.tar.gz: e7172c0f0ce1b58d18deff2e7615d08b8b9692d7cec4ab0e7b9b7d07104b3f4fd501a5a58eb93453cc5bc05a7dc62dc3452f35d78cb05b465a8774e0350a5fde
data/README.md CHANGED
@@ -26,8 +26,8 @@ Or install it yourself as:
26
26
  require "internode"
27
27
 
28
28
  account = Internode::Account.new(
29
- username: "<account username>",
30
- password: "<account password>"
29
+ username: "<account username>", # or leave blank to use ENV["INTERNODE_USERNAME"]
30
+ password: "<account password>" # or leave blank to use ENV["INTERNODE_PASSWORD"]
31
31
  )
32
32
 
33
33
  # Get all the services for the account
@@ -82,5 +82,5 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
82
82
 
83
83
  ## Contributing
84
84
 
85
- Bug reports and pull requests are welcome on GitHub at https://github.com/evilmarty/internode.
85
+ Bug reports and pull requests are welcome on GitHub at https://github.com/evilmarty/internode.rb
86
86
 
data/lib/internode/cli.rb CHANGED
@@ -4,9 +4,9 @@ require "thor"
4
4
 
5
5
  module Internode
6
6
  class CLI < Thor
7
- class_option :user, aliases: :u
8
- class_option :password, aliases: :p
9
- class_option :human, aliases: :h, type: :boolean
7
+ class_option :username, aliases: %w(--user -u)
8
+ class_option :password, aliases: %w(--pass -p)
9
+ class_option :human, aliases: %w(-h), type: :boolean
10
10
 
11
11
  desc "list", "List services"
12
12
  def list
@@ -29,7 +29,7 @@ module Internode
29
29
  end
30
30
 
31
31
  def account
32
- Account.new(username: options[:user], password: options[:password])
32
+ Account.new(options)
33
33
  end
34
34
 
35
35
  def print_error(error)
@@ -8,8 +8,8 @@ module Internode
8
8
  class ServerError < RuntimeError; end
9
9
 
10
10
  def initialize(options = {})
11
- username = options.fetch(:username){ ENV["INTERNODE_USERNAME"] }
12
- password = options.fetch(:password){ ENV["INTERNODE_PASSWORD"] }
11
+ username = options[:username] || ENV["INTERNODE_USERNAME"]
12
+ password = options[:password] || ENV["INTERNODE_PASSWORD"]
13
13
  @url = options.fetch(:url){ URL }
14
14
  @client = HTTPClient.new
15
15
  @client.set_auth(@url, username, password)
@@ -1,3 +1,3 @@
1
1
  module Internode
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: internode
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
  - Marty Zalega
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-09 00:00:00.000000000 Z
11
+ date: 2015-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler