solano 1.31.6 → 1.31.7

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: df2d5edf725f6df979c496a3be6033cc5be58646
4
- data.tar.gz: f06f60fe43fe5846c514c56dbae2476e17ba1dbf
3
+ metadata.gz: d80ca26cf7d8c09d1194f770207f036bdacab233
4
+ data.tar.gz: 3ef263c9276074e1aa0a73ad60051e16e9003139
5
5
  SHA512:
6
- metadata.gz: 2f963c59351fc1e27b650d7a38010c8900f687a4abc89de53b961b8e4d66358c6a05fafed8ad7509a21fae5645b5ee2dd282ebe06cee3d07af03bbef4e82ba6e
7
- data.tar.gz: 6942dc3d36bef0c085e051ed562b556f197b58c23c70a728ca5322fcd1768e634dbed35c3683247c45cf7542795cf28127ff420048ec99ea9da49386e0d8fca1
6
+ metadata.gz: 2101b76771c1a936815df6c57abbb0999f7ad7ea07e42bf1b9c69cac1ac80b7b0a9c6bbae83c42e275e3a051da768b1e1389b42e5b65fe57e069006984a8d1f4
7
+ data.tar.gz: c360452db61df018ea77feb95fee436a3f7f77a50ca6153d0fdb2461d9774106535d32562b2299676f9e765a630a7c4c995715163d3e749f0b45ba5138c99eca
@@ -11,9 +11,19 @@ module Solano
11
11
  method_option :commit, :type => :string, :default => nil
12
12
  def console(*cmd)
13
13
  solano_setup({:repo => true})
14
- origin = `git config --get remote.origin.url`.strip
15
- session_result = @solano_api.call_api(:get, "/sessions", {:repo_url => origin})["sessions"]
16
- if session_result.length > 0 then
14
+ origin_url = @scm.origin_url
15
+ current_suite_id = @solano_api.current_suite_id
16
+ if current_suite_id then
17
+ say "Checking for sessions on this branch"
18
+ session_result = @solano_api.call_api(:get, "/sessions", {:suite_id => current_suite_id})["sessions"]
19
+ elsif suite_for_default_branch? then
20
+ say "Checking for sessions on default branch"
21
+ session_result = @solano_api.call_api(:get, "/sessions", {:repo_url => origin_url})["sessions"]
22
+ else
23
+ say "Checking for sessions on this repository"
24
+ session_result = @solano_api.call_api(:get, "/sessions", {:repo_url => origin_url})["sessions"]
25
+ end
26
+ if defined?(session_result) && session_result.any? then
17
27
  session = session_result[0]
18
28
  session_id = session["id"]
19
29
  q_result = @solano_api.query_session(session_id).tddium_response["session"]
@@ -63,11 +73,11 @@ module Solano
63
73
  say start_result["message"]
64
74
  end
65
75
  else
66
- say "Unable to find any previous sessions. Execute solano run first"
76
+ say "Unable to find any previous sessions. Execute solano run first or switch to a branch with a recent session."
67
77
  end
68
78
  end
69
79
 
70
- private
80
+ private
71
81
  # return nice string version of hrs mins secs from time delta
72
82
  def duration(d)
73
83
  secs = d.to_int
@@ -1,5 +1,5 @@
1
1
  # Copyright (c) 2011-2017 Solano Labs All Rights Reserved
2
2
 
3
3
  module Solano
4
- VERSION = "1.31.6"
4
+ VERSION = "1.31.7"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solano
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.31.6
4
+ version: 1.31.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solano Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-14 00:00:00.000000000 Z
11
+ date: 2017-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor