peas-cli 0.7.0 → 0.7.1
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 +4 -4
- data/VERSION +1 -1
- data/lib/peas/api.rb +4 -4
- data/lib/peas/commands/admin.rb +1 -1
- data/lib/peas/commands/app.rb +0 -4
- data/peas-cli.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d8f65109f895d124f4e8936f4f75b9dfa2c03ea
|
4
|
+
data.tar.gz: e0f113c224fa9ea1b92d1d798673f2761654a929
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc91a578a9bcce70c7eaff2c7311ae121a52cc6fa50b2643452ed387677947469873e2d66af0b9c46118060f21fd3cd050b14e8391e12172d860696d7ae14a2d
|
7
|
+
data.tar.gz: 9e3c8d7410f6b2b2fcbbf4f7a36c2fb9d158f715eba886285dbe871fe7eeca7a1f0218ec5d621c7a2d68b53bd62911ae332b33b4bb055961cbfda211a8b4d3e8
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.1
|
data/lib/peas/api.rb
CHANGED
@@ -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
|
-
|
27
|
+
request_args = [
|
28
28
|
verb.to_s.downcase,
|
29
29
|
"#{method}",
|
30
30
|
options
|
31
31
|
]
|
32
|
-
response = self.class.send(
|
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,
|
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,
|
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
|
data/lib/peas/commands/admin.rb
CHANGED
@@ -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
|
data/lib/peas/commands/app.rb
CHANGED
@@ -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
|
}
|
data/peas-cli.gemspec
CHANGED
@@ -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.
|
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.
|
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-
|
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.
|
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-
|
11
|
+
date: 2015-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gli
|