qtc-sdk 0.4.1 → 0.5.0

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: 05b3957a9192a42bc3223961f6b4a60f70dc8506
4
- data.tar.gz: 696f258964b4dbdbc64dc8439f7d02dd0a5ed516
3
+ metadata.gz: bf02e1f4876a9dce5dfbf6ec897d155e9a9ee996
4
+ data.tar.gz: b953e0779d6fc1f9c1f2dc2bccabb1518c3d4dc9
5
5
  SHA512:
6
- metadata.gz: 8180c98c85de0fba90377b2462ede8b37d03092e5acab72ef848f04deeb889574faf6f7529b5fbbcff4b69afbb36ecb7864ad570df789b8d0fa9ba6b6189623d
7
- data.tar.gz: c26abb6a29875dcca09a2124cdab29ff542426ffab355021619d2b6cd5319662038fe837a264306c9d6f315290333412029dc1a50399d611063cba1789b373ef
6
+ metadata.gz: f63b83a6964f962aea62dc074f8f982954054de73d8421c5eb7ab34d8b1dd1ebc645ae83eae9491c2510c8adba7e4bbdc6f20c7a325819eeee2c201db0dadf9b
7
+ data.tar.gz: 75c5de7e33ac66a1577e210123046a78db1a3d3ad16524426afaad72301cb260e603763c279d45f8f3e44e3cef0d630f3aa72e49a0dd6cd5b8936a0e9e5e9e1d
@@ -1,3 +1,8 @@
1
+ 0.5.0
2
+ -----------
3
+ - MDB supports now start and stop commands
4
+ - fixed issue in slug building when .env file is appended into build env
5
+
1
6
  0.4.1
2
7
  -----------
3
8
  - fix mar local:build_slug against remote docker
@@ -54,11 +54,14 @@ module Qtc
54
54
 
55
55
  def build_slug(app_home, stack, branch)
56
56
  docker_id = nil
57
- run_opts = '-i -a stdin'
57
+ run_opts = [
58
+ '-i',
59
+ '-a stdin'
60
+ ]
58
61
  if File.exists?("#{app_home}/.env")
59
62
  run_opts << "--env-file=#{app_home}/.env"
60
63
  end
61
- Open3.popen3("git archive #{branch} | docker run #{run_opts} qtcs/slugbuilder:#{stack}") {|stdin, stdout, stderr, wait_thr|
64
+ Open3.popen3("git archive #{branch} | docker run #{run_opts.join(' ')} qtcs/slugbuilder:#{stack}") {|stdin, stdout, stderr, wait_thr|
62
65
  stdin.close
63
66
  docker_id = stdout.gets
64
67
  if docker_id
@@ -41,3 +41,21 @@ command 'mdb logs' do |c|
41
41
  Qtc::Cli::Mdb::Instances.new.logs(options)
42
42
  end
43
43
  end
44
+
45
+ command 'mdb stop' do |c|
46
+ c.syntax = 'qtc-cli mdb stop'
47
+ c.description = 'Stop MDB instance'
48
+ c.option '--id ID', String, 'MDB instance id'
49
+ c.action do |args, options|
50
+ Qtc::Cli::Mdb::Instances.new.stop(options)
51
+ end
52
+ end
53
+
54
+ command 'mdb start' do |c|
55
+ c.syntax = 'qtc-cli mdb start'
56
+ c.description = 'Start MDB instance'
57
+ c.option '--id ID', String, 'MDB instance id'
58
+ c.action do |args, options|
59
+ Qtc::Cli::Mdb::Instances.new.start(options)
60
+ end
61
+ end
@@ -74,6 +74,20 @@ module Qtc
74
74
  end
75
75
  end
76
76
 
77
+ def stop(options)
78
+ raise ArgumentError.new('--id is required') if options.id.nil?
79
+ self.datacenter_id = self.resolve_datacenter_id(options.id)
80
+
81
+ client.post("/services/#{options.id}/stop", {}, {}, {'Authorization' => "Bearer #{current_cloud_token}"})
82
+ end
83
+
84
+ def start(options)
85
+ raise ArgumentError.new('--id is required') if options.id.nil?
86
+ self.datacenter_id = self.resolve_datacenter_id(options.id)
87
+
88
+ client.post("/services/#{options.id}/start", {}, {}, {'Authorization' => "Bearer #{current_cloud_token}"})
89
+ end
90
+
77
91
  end
78
92
  end
79
93
  end
@@ -1,3 +1,3 @@
1
1
  module Qtc
2
- VERSION = '0.4.1'
2
+ VERSION = '0.5.0'
3
3
  end
@@ -6,11 +6,11 @@ require 'qtc/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'qtc-sdk'
8
8
  spec.version = Qtc::VERSION
9
- spec.authors = ['Jari Kolehmainen']
10
- spec.email = ['jari.kolehmainen@digia.com']
9
+ spec.authors = ['Jari Kolehmainen', 'Jussi Nummelin']
10
+ spec.email = ['jari.kolehmainen@digia.com', 'jussi.nummelin@digia.com']
11
11
  spec.summary = %q{Qt Cloud Services SDK for Ruby}
12
12
  spec.description = %q{Qt Cloud Services SDK for Ruby}
13
- spec.homepage = 'https://github.com/jakolehm/qtc-sdk-ruby'
13
+ spec.homepage = 'https://github.com/qtcloudservices/qtc-sdk-ruby'
14
14
  spec.license = 'MIT'
15
15
  spec.required_ruby_version = '>= 1.9.3'
16
16
 
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qtc-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jari Kolehmainen
8
+ - Jussi Nummelin
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2015-05-05 00:00:00.000000000 Z
12
+ date: 2015-05-13 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
@@ -97,6 +98,7 @@ dependencies:
97
98
  description: Qt Cloud Services SDK for Ruby
98
99
  email:
99
100
  - jari.kolehmainen@digia.com
101
+ - jussi.nummelin@digia.com
100
102
  executables:
101
103
  - qtc-cli
102
104
  extensions: []
@@ -146,7 +148,7 @@ files:
146
148
  - qtc-sdk.gemspec
147
149
  - spec/spec_helper.rb
148
150
  - spec/unit/qtc/client_spec.rb
149
- homepage: https://github.com/jakolehm/qtc-sdk-ruby
151
+ homepage: https://github.com/qtcloudservices/qtc-sdk-ruby
150
152
  licenses:
151
153
  - MIT
152
154
  metadata: {}
@@ -166,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
168
  version: '0'
167
169
  requirements: []
168
170
  rubyforge_project:
169
- rubygems_version: 2.2.2
171
+ rubygems_version: 2.4.6
170
172
  signing_key:
171
173
  specification_version: 4
172
174
  summary: Qt Cloud Services SDK for Ruby