theroku 0.1.3 → 0.1.4

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: d5b1442c34f8418daa527d484b22fcc7b55ac31a
4
- data.tar.gz: da1ab6db4f1af89e6048520adb089d3c319bb623
3
+ metadata.gz: d92f3fdb7d078f8e2b58d0188718620342c0eb5c
4
+ data.tar.gz: ff7fee83abbb587f895f1be6249773631631c2cc
5
5
  SHA512:
6
- metadata.gz: e03fc4e0f84c28dda01e8f9b56604e084b7fdb4036ffb50c6de0bbbd6051bea43e713c33fbd28c79b0f472902837c9cdf8a5510ff2c12c83c5cc67100dc91ad3
7
- data.tar.gz: 22ba4c034ea519c4d2656cca9933076834ecff694776a0ce3f3aded3cf8d58c02223980fa944717a1aefd44003595de45bbf6e708ee69d5fa1c98cc465b7611f
6
+ metadata.gz: 9748c98fbda16e4af0e1b17c1eb1e2196e1821d5fdf934f46096bb9ae86466b02b7da2cbd5ee4f44e032f39c658054dc35119bc248b2a00e4ca6f8d89f594876
7
+ data.tar.gz: 0420a6e6ef881f4bd32babc21e32cbe669789e290d489e51b8f42dc957d54fde7259ee3f3e48c08f0f74827237521be76d2a5fb62f2fc733062adb486997c483
@@ -1,4 +1,5 @@
1
1
  class DestroyCommand
2
+ require 'httparty'
2
3
  def execute(subdomain)
3
4
  if File.exists?('.theroku')
4
5
  puts "Deleting #{subdomain}..."
@@ -0,0 +1,24 @@
1
+ class ListCommand
2
+ require 'httparty'
3
+ def execute
4
+ if File.exists?('.theroku')
5
+ puts "Listing all subdomains"
6
+ file = File.open(".theroku", "rb")
7
+ token = file.read
8
+ response = HTTParty.get("#{Theroku::base_url}apps",
9
+ headers: { 'Authorization' => "Token token=#{token}", 'Content-Type' => 'application/json', 'Accept' => 'application/json'}
10
+ )
11
+ if response.code == 200
12
+ puts "These are your current subdomains:"
13
+ list_array = JSON.parse(response.body)
14
+ list_array.each do |app|
15
+ puts "app_name: #{app['subdomain']}, url1: #{app['url1']}, url2: #{app['url2']}"
16
+ end
17
+ else
18
+ puts "Sorry, something went wrong..."
19
+ end
20
+ else
21
+ puts "You have to login before making any changes you can do that with $ theroku login"
22
+ end
23
+ end
24
+ end
data/theroku-0.1.1.gem ADDED
Binary file
data/theroku-0.1.2.gem ADDED
Binary file
data/theroku-0.1.3.gem ADDED
Binary file
data/theroku.gemspec CHANGED
@@ -5,7 +5,7 @@ require 'theroku/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "theroku"
8
- spec.version = "0.1.3"
8
+ spec.version = "0.1.4"
9
9
  spec.authors = ["alejoescobar", "simon0191", "jasmo2"]
10
10
  spec.email = ["alejoescobac@gmail.com"]
11
11
  spec.summary = "Awesome Heroku load balancer."
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.add_runtime_dependency('httparty', '0.13.3')
23
23
  spec.add_runtime_dependency('commander', '4.3.4')
24
24
  spec.add_runtime_dependency('launchy', '2.4.3')
25
+ spec.add_runtime_dependency('json')
25
26
 
26
27
  spec.add_development_dependency "bundler", "~> 1.7"
27
28
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: theroku
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - alejoescobar
@@ -68,6 +68,20 @@ dependencies:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
70
  version: 2.4.3
71
+ - !ruby/object:Gem::Dependency
72
+ name: json
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ type: :runtime
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
71
85
  - !ruby/object:Gem::Dependency
72
86
  name: bundler
73
87
  requirement: !ruby/object:Gem::Requirement
@@ -114,12 +128,16 @@ files:
114
128
  - lib/theroku.rb
115
129
  - lib/theroku/create_command.rb
116
130
  - lib/theroku/destroy_command.rb
131
+ - lib/theroku/list_command.rb
117
132
  - lib/theroku/login_command.rb
118
133
  - lib/theroku/open_command.rb
119
134
  - lib/theroku/update_command.rb
120
135
  - lib/theroku/version.rb
121
136
  - theroku-0.0.1.gem
122
137
  - theroku-0.1.0.gem
138
+ - theroku-0.1.1.gem
139
+ - theroku-0.1.2.gem
140
+ - theroku-0.1.3.gem
123
141
  - theroku.gemspec
124
142
  homepage: https://github.com/alejoescobar/theroku
125
143
  licenses: