bitballoon 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/bin/bitballoon CHANGED
@@ -32,9 +32,11 @@ opts = Slop.parse do
32
32
  puts "Please enter your BitBalloon API Credentials (if you don't have any, you can create your credentials at https://www.bitballoon.com/applications)"
33
33
  client_id = ask("Client ID:")
34
34
  client_secret = ask("Client Secret:")
35
+ site_url = ask("Site to deploy to (paste the URL - leave blank for new site):")
35
36
  client = BitBalloon::Client.new(:client_id => client_id, :client_secret => client_secret)
36
37
  client.authorize_from_credentials!
37
- credentials = {'access_token' => client.access_token}
38
+ site_match = site_url.match(/(https?:\/\/)?([^\/]+)/)
39
+ credentials = {'access_token' => client.access_token, 'site_id' => site_match ? site_match[2] : nil}
38
40
  end
39
41
 
40
42
  credentials['site_id'] = opts[:s] if opts[:s]
@@ -1,3 +1,3 @@
1
1
  module BitBalloon
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitballoon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-16 00:00:00.000000000 Z
12
+ date: 2013-12-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oauth2