argonaut-cli 0.1.7 β†’ 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fc796195ba2c2f52004caf8e903566f05beb9ef8
4
- data.tar.gz: ea40e12fa2c5d9ce433f0d8a3e04d6fa7ab237a4
3
+ metadata.gz: aed9d6542849d36709c55426ddb5ddb255459399
4
+ data.tar.gz: 13492d2e5477ebd75a892b7fb3cc1d7d8cf15916
5
5
  SHA512:
6
- metadata.gz: e9c2984d8cd01203d79ca942f7856a5742d7e27a492544d95a43a859ac0f1c35c4dc5459687f4b5ad95dfdf7b4579cc7b2c5daf320ac6960c41d0ffa8fdde594
7
- data.tar.gz: c98c8912ccc9c478ab075abea90f07b0a743aa727fb4a670d44cd1aa4b6bbd1b7176e4cb638a5337a359c71c74b1eae1f9f6cbc2224a3bf9db06c5ec2a6c9d89
6
+ metadata.gz: abbbb7543bd9b465125e33da54c0ad11b20a954e0779067c65021901363f710c2f6d18c85bbac95814a8238e3431cfa96f6b7b772f2ae34bddffb46821e65c94
7
+ data.tar.gz: 6696fc8ebcfb4c5edd48ed10f6c8452bb806e3f7daa0665113ef5537b05dce86fe0e30977a34b947f7e31e1cf805e6600e4d0b68ff5d387ca0596bdcf910ada4
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
- # Argonaut CLI
1
+ [![Build Status](https://travis-ci.org/qubbit/argonaut-cli.svg?branch=master)](https://travis-ci.org/qubbit/argonaut-cli)
2
+
3
+ # πŸ›Άβš‘οΈ Argonaut CLI
2
4
 
3
5
  Use Argonaut from your command line!
4
6
 
@@ -11,7 +13,7 @@ gem install argonaut-cli
11
13
  Create the config file `~/.argonaut.yml` and populate it with the sample config below:
12
14
 
13
15
  ```yaml
14
- # The only required fields for the gem to run are api_token and url_root
16
+ # The only required fields needed by the gem to function are api_token and url_root
15
17
 
16
18
  api_token: YOUR_TOKEN
17
19
  url_root: https://theargonaut-api.herokuapp.com
@@ -59,7 +61,7 @@ argonaut -r pbm1:epamotron
59
61
  **Release when you are done testing in that environment:**
60
62
 
61
63
  ```
62
- argonaut -r pbm1:epamotron
64
+ argonaut -R pbm1:epamotron
63
65
  ```
64
66
  **Clear all your reservations at once**
65
67
 
data/argonaut.gemspec CHANGED
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
35
35
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
36
36
  spec.require_paths = ["lib"]
37
37
 
38
- spec.add_development_dependency "bundler", "~> 1.14"
38
+ spec.add_development_dependency 'bundler', '~> 0'
39
39
  spec.add_development_dependency "rake", "~> 10.0"
40
40
  spec.add_development_dependency "rspec", "~> 3.0"
41
41
  spec.add_development_dependency "pry-byebug", "~> 3.4"
data/exe/argonaut CHANGED
@@ -18,6 +18,10 @@ begin
18
18
  OptionParser.new do |opts|
19
19
  opts.banner = "Usage: argonaut [options]"
20
20
 
21
+ opts.on("--init", "Initialize an argonaut installation by creates a default argonaut.yml file") do |c|
22
+ options[:action] = 'init_configuration'
23
+ end
24
+
21
25
  opts.on("-T", "--teams", "Show all teams") do |c|
22
26
  options[:action] = 'show_teams'
23
27
  end
data/lib/argonaut/cli.rb CHANGED
@@ -42,5 +42,27 @@ module Argonaut
42
42
  data = { application_name: app_name }
43
43
  @gateway.fetch(path: "find_application", data: data)
44
44
  end
45
+
46
+ def initialize_configuration_file
47
+ return false if File.exist? Argonaut::Constants::SETTINGS_FILE
48
+
49
+ File.open( Argonaut::Constants::SETTINGS_FILE, "w" ) do |f|
50
+ f.write %q(
51
+ # The only required fields needed by the gem to function are api_token and url_root
52
+
53
+ api_token: YOUR_TOKEN
54
+ url_root: https://theargonaut-api.herokuapp.com
55
+
56
+ # Below are the optional settings to customize output
57
+
58
+ options:
59
+ colorize_rows: true
60
+ time_format: '%d %b %Y %l:%M %p'
61
+ high_contrast_colors: true
62
+ )
63
+ end
64
+ true
65
+ end
66
+
45
67
  end
46
68
  end
@@ -1,3 +1,3 @@
1
1
  module Argonaut
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
data/lib/argonaut.rb CHANGED
@@ -33,6 +33,12 @@ module Argonaut
33
33
  when 'list_reservations'
34
34
  data = interface.list_reservations.fetch('data', nil)
35
35
  print_reservations_list(data)
36
+ when 'init_configuration'
37
+ if interface.initialize_configuration_file
38
+ puts "'#{SETTINGS_FILE}' initialized. Modify to update your api token"
39
+ else
40
+ puts "'#{SETTINGS_FILE}' already exists. No initialization needed"
41
+ end
36
42
  end
37
43
  end
38
44
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: argonaut-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gopal Adhikari
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-21 00:00:00.000000000 Z
11
+ date: 2018-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.14'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.14'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  version: '0'
169
169
  requirements: []
170
170
  rubyforge_project:
171
- rubygems_version: 2.4.5
171
+ rubygems_version: 2.4.5.1
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: Command line tool for Argonaut