theroku 0.1.2 → 0.1.3

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: aa0ba2e25eb44511425f2764f6ea4606ba884106
4
- data.tar.gz: b413b867571f2d078607dea79d8af9df6a32256f
3
+ metadata.gz: d5b1442c34f8418daa527d484b22fcc7b55ac31a
4
+ data.tar.gz: da1ab6db4f1af89e6048520adb089d3c319bb623
5
5
  SHA512:
6
- metadata.gz: 1bac7d06c47b7d6fd9c23f7fac9970112ca31a24296d86fac6766df7639e7b8906b0beca0cd888c0cce07305fac04aff45e8b39612917be3ea2a7b8801dc381d
7
- data.tar.gz: 52ced739caf3e5245e11f5d13a9adc5fbc18cd31e8895e2de3fd54e53357d6c32b2347ee0c526c2ffb8eea6733574d688f7ded9725a9f806311eacc1fb8aff31
6
+ metadata.gz: e03fc4e0f84c28dda01e8f9b56604e084b7fdb4036ffb50c6de0bbbd6051bea43e713c33fbd28c79b0f472902837c9cdf8a5510ff2c12c83c5cc67100dc91ad3
7
+ data.tar.gz: 22ba4c034ea519c4d2656cca9933076834ecff694776a0ce3f3aded3cf8d58c02223980fa944717a1aefd44003595de45bbf6e708ee69d5fa1c98cc465b7611f
data/bin/theroku CHANGED
@@ -44,12 +44,19 @@ command :destroy do |c|
44
44
  end
45
45
 
46
46
  command :open do |c|
47
- c.syntax = 'theroku open'
48
- c.description = 'theroku open'
47
+ c.syntax = 'theroku open [args]'
48
+ c.description = 'theroku open <app_name>'
49
49
  c.action do |args, options|
50
- CreateCommand.new.execute(*args)
50
+ OpenCommand.new.execute(*args)
51
51
  end
52
52
  end
53
53
 
54
+ command :list do |c|
55
+ c.syntax = 'theroku list'
56
+ c.description = 'theroku list'
57
+ c.action do |args, options|
58
+ ListCommand.new.execute
59
+ end
60
+ end
54
61
 
55
62
  end
data/lib/theroku.rb CHANGED
@@ -8,4 +8,6 @@ end
8
8
  require 'theroku/create_command.rb'
9
9
  require 'theroku/destroy_command.rb'
10
10
  require 'theroku/login_command.rb'
11
- require 'theroku/update_command.rb'
11
+ require 'theroku/update_command.rb'
12
+ require 'theroku/open_command.rb'
13
+ require 'theroku/list_command.rb'
@@ -11,7 +11,7 @@ class CreateCommand
11
11
  )
12
12
  if response.code == 200
13
13
  puts "You succesfully created an application."
14
- puts "You can now go to #{subdomain}.therokuapp.com or use theroku open!"
14
+ puts "You can now go to #{subdomain}.therokubalance.com or use theroku open!"
15
15
  else
16
16
  puts "Sorry, something went wrong..."
17
17
  end
@@ -1,7 +1,6 @@
1
1
  class LoginCommand
2
2
  require 'httparty'
3
3
  def execute(email, password, token)
4
- puts "Your email is #{email}, and your password is supposed to be hidden but fuck it here it is #{password}."
5
4
  puts "Initiating post method..."
6
5
  response = HTTParty.post("#{Theroku::base_url}login",
7
6
  body: { "email" => "#{email}", "password" => "#{password}" }.to_json,
@@ -1,5 +1,7 @@
1
1
  class OpenCommand
2
- def execute
3
- #theroku open
2
+ require 'Launchy'
3
+ def execute(subdomain)
4
+ # Launchy.open( "http://#{subdomain}.therokubalance.com" )
5
+ Launchy.open("http://#{subdomain}.therokubalance.com")
4
6
  end
5
7
  end
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.2"
8
+ spec.version = "0.1.3"
9
9
  spec.authors = ["alejoescobar", "simon0191", "jasmo2"]
10
10
  spec.email = ["alejoescobac@gmail.com"]
11
11
  spec.summary = "Awesome Heroku load balancer."
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency('rdoc', '4.2.0')
22
22
  spec.add_runtime_dependency('httparty', '0.13.3')
23
23
  spec.add_runtime_dependency('commander', '4.3.4')
24
+ spec.add_runtime_dependency('launchy', '2.4.3')
24
25
 
25
26
  spec.add_development_dependency "bundler", "~> 1.7"
26
27
  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.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - alejoescobar
@@ -54,6 +54,20 @@ dependencies:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
56
  version: 4.3.4
57
+ - !ruby/object:Gem::Dependency
58
+ name: launchy
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - '='
62
+ - !ruby/object:Gem::Version
63
+ version: 2.4.3
64
+ type: :runtime
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - '='
69
+ - !ruby/object:Gem::Version
70
+ version: 2.4.3
57
71
  - !ruby/object:Gem::Dependency
58
72
  name: bundler
59
73
  requirement: !ruby/object:Gem::Requirement