qtc-sdk 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4fa5b0dcf5a632850cb3a7d9db9cb5e4be9b094
4
- data.tar.gz: 3d7ef952957e86962c1a156e37ed483f38115b8e
3
+ metadata.gz: 7105501ddfca3f84d36b975f6dc0821896d83d78
4
+ data.tar.gz: 40e4c99eba27e7c10d1dd90f1dee000cfb8dd93c
5
5
  SHA512:
6
- metadata.gz: f6597366aa9a0aa4109131955639194a0e99eafbb2a355bdebe3a924666d8920731a9a65b0f061c13e3b35f7bf3352b688ff7c624deb3d9381c59eddd9c25cec
7
- data.tar.gz: e90fab57614d8dba935174cbe6326429900c46b1056f38085fae048ccdc7f40edbdf444fc750f905373526f9dd1f9bc442accb39540914d508d28b65713fad17
6
+ metadata.gz: ba02ba20431b6ac342905ae498174311b93d61035114b4a563d00b7d21289c10e7fcbeffe6bf3d41819bb07369ff4b8755e497400905f14c0eb2a5511dc525aa
7
+ data.tar.gz: e0d26d20d10298046186bc9bd1496307f49d40d0e224c015f16521946ce780300ef432322a3bd0d380d6863bc7efa895327faeba80fbc5501ec375683b2cbcf8
@@ -130,6 +130,7 @@ command 'mar ssl:add' do |c|
130
130
  c.option '--remote REMOTE', String, 'Git remote to use, eg "staging"'
131
131
  c.option '--key PATH', String, 'Path to private key file'
132
132
  c.option '--cert PATH', String, 'Path to certificate file'
133
+ c.option '--chain PATH', String, 'Path to certificate chain file'
133
134
  c.action do |args, options|
134
135
  raise ArgumentError.new("--key is required") unless options.key
135
136
  raise ArgumentError.new("--cert is required") unless options.cert
@@ -30,7 +30,7 @@ module Qtc
30
30
  instance_data = instance_info(instance_id)
31
31
  if instance_data
32
32
  token = instance_data['authorizations'][0]['access_token']
33
- client.delete("/apps/#{instance_id}/domains/#{name}", nil, nil, {'Authorization' => "Bearer #{token}"})
33
+ client.delete("/apps/#{instance_id}/domains/#{name}", nil, {}, {'Authorization' => "Bearer #{token}"})
34
34
  end
35
35
  end
36
36
  end
@@ -9,6 +9,9 @@ module Qtc
9
9
  def create(options)
10
10
  raise ArgumentError.new("--key=#{options.key} is not a file") unless File.exists?(File.expand_path(options.key))
11
11
  raise ArgumentError.new("--cert=#{options.cert} is not a file") unless File.exists?(File.expand_path(options.cert))
12
+ unless options.chain.nil?
13
+ raise ArgumentError.new("--chain=#{options.chain} is not a file") unless File.exists?(File.expand_path(options.chain))
14
+ end
12
15
 
13
16
  instance_id = resolve_instance_id(options)
14
17
  instance_data = instance_info(instance_id)
@@ -19,6 +22,9 @@ module Qtc
19
22
  privateKey: File.read(File.expand_path(options.key)),
20
23
  certificateBody: File.read(File.expand_path(options.cert))
21
24
  }
25
+ unless options.chain.nil?
26
+ data[:certificateChain] = File.read(File.expand_path(options.chain))
27
+ end
22
28
  client.post("/apps/#{instance_id}/ssl_certificate", data, {}, {'Authorization' => "Bearer #{token}"})
23
29
  end
24
30
  end
data/lib/qtc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Qtc
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qtc-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jari Kolehmainen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-09 00:00:00.000000000 Z
11
+ date: 2014-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler