peas-cli 0.7.0 → 0.7.1

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: 148aa934a08e354cd9f2fec7d0ac59a9cf4501f2
4
- data.tar.gz: fa6cd8baf861cf1e21df8532c58f8659626b0628
3
+ metadata.gz: 1d8f65109f895d124f4e8936f4f75b9dfa2c03ea
4
+ data.tar.gz: e0f113c224fa9ea1b92d1d798673f2761654a929
5
5
  SHA512:
6
- metadata.gz: fe827c22e2027ab7ca62bffc09f0f803847c2051b38758230999811b76604c9e9ab7f77fd6324225935f5917b18d395e2f465f9a44ea35f4873218c35454034e
7
- data.tar.gz: 9089daead2d77e5e4d8c9b29571d2d16775231f4dc85055e3cf62baebf21abb7bdc432b0c1a90798a09cacdc67b4ec291353a04a0ea95076664a58f0578b2e12
6
+ metadata.gz: dc91a578a9bcce70c7eaff2c7311ae121a52cc6fa50b2643452ed387677947469873e2d66af0b9c46118060f21fd3cd050b14e8391e12172d860696d7ae14a2d
7
+ data.tar.gz: 9e3c8d7410f6b2b2fcbbf4f7a36c2fb9d158f715eba886285dbe871fe7eeca7a1f0218ec5d621c7a2d68b53bd62911ae332b33b4bb055961cbfda211a8b4d3e8
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.0
1
+ 0.7.1
@@ -24,12 +24,12 @@ class API
24
24
  def request(verb, method, query = {}, auth = true, print = true)
25
25
  options = { query: query }
26
26
  options[:headers] = { 'x-api-key' => api_key } if auth
27
- request = [
27
+ request_args = [
28
28
  verb.to_s.downcase,
29
29
  "#{method}",
30
30
  options
31
31
  ]
32
- response = self.class.send(request.shift, *request).body
32
+ response = self.class.send(request_args.shift, *request_args).body
33
33
  json = response ? JSON.parse(response) : {}
34
34
  # If there was an HTTP-level error
35
35
  raise json['error'].color(:red) if json.key? 'error'
@@ -59,7 +59,7 @@ class API
59
59
  username: username,
60
60
  public_key: File.read("#{key_path}.pub")
61
61
  }
62
- response = request('POST', '/auth/request', params, auth: false, print: false)
62
+ response = request('POST', '/auth/request', params, false, false)
63
63
  doc = response['message']['sign']
64
64
  digest = OpenSSL::Digest::SHA256.new
65
65
  keypair = OpenSSL::PKey::RSA.new(File.read(key_path))
@@ -69,7 +69,7 @@ class API
69
69
  username: username,
70
70
  signed: encoded
71
71
  }
72
- response = request('POST', '/auth/verify', params, auth: false, print: false)
72
+ response = request('POST', '/auth/verify', params, false, false)
73
73
  key = response['message']['api_key']
74
74
  Peas.update_config api_key: key
75
75
  key
@@ -28,7 +28,7 @@ command :admin do |admin|
28
28
  end
29
29
  format_settings @api.request(:put, '/admin/settings', { args[0] => args[1] }, true, false)
30
30
  else
31
- format_settings @api.request(:get, '/admin/settings', true, false)
31
+ format_settings @api.request(:get, '/admin/settings', {}, true, false)
32
32
  end
33
33
  end
34
34
  end
@@ -7,14 +7,10 @@ end
7
7
 
8
8
  desc 'Create an app'
9
9
  command :create do |c|
10
- public_key_path = "#{ENV['HOME']}/.ssh/id_rsa.pub"
11
10
  c.action do |_global_options, _options, _args|
12
11
  unless Git.remote('peas').empty?
13
12
  exit_now! "This repo already has an app (#{Git.name_from_remote}) associated with it.", 1
14
13
  end
15
- unless File.exist? public_key_path
16
- exit_now! "Couldn't find an SSH public key", 1
17
- end
18
14
  params = {
19
15
  'muse' => Git.name_from_remote(Git.remote('origin')),
20
16
  }
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: peas-cli 0.7.0 ruby lib
5
+ # stub: peas-cli 0.7.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "peas-cli"
9
- s.version = "0.7.0"
9
+ s.version = "0.7.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Tom Buckley-Houston"]
14
- s.date = "2015-01-17"
14
+ s.date = "2015-01-18"
15
15
  s.description = "Peas is an open source Heroku-style PaaS written in Ruby and using Docker"
16
16
  s.email = "tom@tombh.co.uk"
17
17
  s.executables = ["peas"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peas-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Buckley-Houston
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-17 00:00:00.000000000 Z
11
+ date: 2015-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gli