capdocker 1.0.61 → 1.0.62

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/capdocker.gemspec +1 -1
  3. data/lib/auth.rb +10 -4
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e960c8339a77848219a25caf42e804e2024a110
4
- data.tar.gz: 9cee55051d14845c0fb05c2acbbbbc58c4cf1276
3
+ metadata.gz: 43ea5ddbb9ad363c48a4879796c083253286886b
4
+ data.tar.gz: 43e35f9aa95ec89e18d20dc50449aabb4747fe9d
5
5
  SHA512:
6
- metadata.gz: 9a34834f959cbfc5ec6c0405fc5c3d87be93a441e5ed61656c78a546fd8252c8dcc266e390e019f514a5e9b108c4803a2ba04b30d9fb1917e33eb4f6daa48066
7
- data.tar.gz: ef219f41935abae3174d03299cc7e1b9090778f537ddf3ef5035a5197599807b3352429f8d323a14404fe1788b4301c99b2f144f93bdb7978fe2d72de4d1f818
6
+ metadata.gz: 735c3e6983ad3d7323bbdaeedea22485677c8204277ea6a185cab092b385e30dae1862f8943c4dccd04a2275b99ea92c952b25c8e62a33aa20c39df75edfd1b6
7
+ data.tar.gz: 314450e10ccdf973fdf8df55d903dc067be807fd246461594328ce02fa7bde033b06028713e4a76e2892816d665292b5f28f21bc38a46a767cbc33b3d5a62ccf
data/capdocker.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{capdocker}
5
- s.version = "1.0.61"
5
+ s.version = "1.0.62"
6
6
  s.authors = ["Ross Riley", "One Black Bear"]
7
7
  s.email = %q{ross@oneblackbear.com}
8
8
  s.date = Time.now
data/lib/auth.rb CHANGED
@@ -1,6 +1,6 @@
1
- require 'open-uri'
2
1
  require 'json'
3
2
  require 'netrc'
3
+ require 'net/http'
4
4
 
5
5
  Capistrano::Configuration.instance(:must_exist).load do
6
6
 
@@ -16,7 +16,9 @@ Capistrano::Configuration.instance(:must_exist).load do
16
16
  if !n[auth_base]
17
17
  user = Capistrano::CLI.ui.ask("Account Name: ")
18
18
  tok =Capistrano::CLI.ui.ask("Account Token: ")
19
- result = JSON.parse(open("http://#{auth_base}/account/auth/?account=#{user}&token=#{tok}").read)
19
+ result = JSON.parse(
20
+ Net::HTTP.get_response("http://#{auth_base}/account/auth/?account=#{user}&token=#{tok}")
21
+ )
20
22
  n[auth_base] = result["success"], result["token"]
21
23
  n.save
22
24
  end
@@ -29,14 +31,18 @@ Capistrano::Configuration.instance(:must_exist).load do
29
31
  desc "After a successful login, connect to the deploy server and receive deploy information"
30
32
  task :get_deploy do
31
33
  login
32
- result = JSON.parse(open("http://#{auth_base}/account/appinfo/?account=#{auth_account}&token=#{auth_token}&app=#{application}").read)
34
+ result = JSON.parse(
35
+ Net::HTTP("http://#{auth_base}/account/appinfo/?account=#{auth_account}&token=#{auth_token}&app=#{application}")
36
+ )
33
37
  setup_app if result["error"]
34
38
  end
35
39
 
36
40
  desc "After a successful login, connect to the deploy server and receive deploy information"
37
41
  task :setup_app do
38
42
  login
39
- result = JSON.parse(open("http://#{auth_base}/account/appcreate/?account=#{auth_account}&token=#{auth_token}&app=#{application}").read)
43
+ result = JSON.parse(
44
+ Net::HTTP.post_form("http://#{auth_base}/account/appcreate/?account=#{auth_account}&token=#{auth_token}", 'app' => application)
45
+ )
40
46
  puts result
41
47
  end
42
48
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capdocker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.61
4
+ version: 1.0.62
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Riley