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 +4 -4
- data/README.md +3 -3
- data/lib/internode/cli.rb +4 -4
- data/lib/internode/client.rb +2 -2
- data/lib/internode/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: abf4ed0ce95e242058ca2b80f6eab3ba4af87d6f
|
|
4
|
+
data.tar.gz: 2dfc80e28ae9bec396824e56f12c6546ccd2158c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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 :
|
|
8
|
-
class_option :password, aliases:
|
|
9
|
-
class_option :human, aliases:
|
|
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(
|
|
32
|
+
Account.new(options)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
def print_error(error)
|
data/lib/internode/client.rb
CHANGED
|
@@ -8,8 +8,8 @@ module Internode
|
|
|
8
8
|
class ServerError < RuntimeError; end
|
|
9
9
|
|
|
10
10
|
def initialize(options = {})
|
|
11
|
-
username = options
|
|
12
|
-
password = options
|
|
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)
|
data/lib/internode/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2015-08-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|