mini_autobot 0.0.7 → 0.0.8

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: 450c062a5d8552df67d74eabc30a98985cc486b6
4
- data.tar.gz: 3873f47a095042190509d027abdb4a9df7ba773b
3
+ metadata.gz: dacd23d8eebdf65fb0549156286f4460824205bd
4
+ data.tar.gz: d94478218460de224b13010fd35ee19618e1f2f0
5
5
  SHA512:
6
- metadata.gz: 6a4d9406f93ed67b7f4be16c645406e286a92da76909adbf50b2f6ce8bd00c417a3af17b45e6bb9220de7807e9d9b03507436f17b5c76a30341892907246d88c
7
- data.tar.gz: 4ae84816a493fb8ad624874bb7e868e4a1679be3197b4ece58b0e1c7eb12b99d2df8f337fa1401b30453e769fcedd92fb6501494f58739bbb2e61e096e5ec666
6
+ metadata.gz: b299c7dcced9df5673e64c56a8414146999e9c7a014294b8135f37e011ef1ee40445b96baaff278b2c92c7bd21bf54fecfe22d02424d43c7b45f6782bcb7c975
7
+ data.tar.gz: aae3e5b7633174273c964b7a4d3c99ea1790b91611a2270741f6bb595f5a3b8d19e04d5bdcf3aeca64e4bff889fe0d5c92eae18b4d0775117dceef94da36926b
@@ -27,9 +27,9 @@ module MiniAutobot
27
27
  @platform.include?('osx')
28
28
  end
29
29
 
30
- # remove all results files under logs/tap_results/
30
+ # remove all results files under logs/tap_results/ if there's any
31
31
  def clean_result!
32
- IO.popen 'rm logs/tap_results/*'
32
+ FileUtils.rm_rf(Dir.glob('logs/tap_results/*')) unless Dir.glob('logs/tap_results/*').empty?
33
33
  puts "Cleaning result files.\n"
34
34
  end
35
35
 
@@ -62,7 +62,7 @@ module MiniAutobot
62
62
  print_sauce_link if connector_is_saucelabs?
63
63
  end
64
64
  begin
65
- set_sauce_session_name if connector_is_saucelabs? && !@driver.nil?
65
+ update_sauce_session if connector_is_saucelabs? && !@driver.nil?
66
66
  self.logger.debug "Finished setting saucelabs session name for #{name()}"
67
67
  rescue
68
68
  self.logger.debug "Failed setting saucelabs session name for #{name()}"
@@ -86,10 +86,9 @@ module MiniAutobot
86
86
  end
87
87
  end
88
88
 
89
- # update session name on saucelabs
90
- def set_sauce_session_name
91
- # identify the user who runs the tests and grab user's access_key
92
- # where are we parsing info from run command to in the code?
89
+ # Update SauceLabs session(job) name
90
+ # Update session(job) status if test is not skipped
91
+ def update_sauce_session
93
92
  connector = MiniAutobot.settings.connector # eg. saucelabs:phu:win7_ie11
94
93
  overrides = connector.to_s.split(/:/)
95
94
  new_tags = overrides[2]+"_by_"+overrides[1]
@@ -107,10 +106,9 @@ module MiniAutobot
107
106
  require 'json'
108
107
  session_id = @driver.session_id
109
108
  http_auth = "https://#{username}:#{access_key}@saucelabs.com/rest/v1/#{username}/jobs/#{session_id}"
110
- # to_json need to: require "active_support/core_ext", but will mess up the whole framework, require 'json' in this method solved it
111
- body = {"name" => name(), "tags" => [new_tags]}.to_json
112
- # gem 'rest-client'
113
- RestClient.put(http_auth, body, {:content_type => "application/json"})
109
+ body = { "name" => name(), "tags" => [new_tags] }
110
+ body["passed"] = passed? unless skipped?
111
+ RestClient.put(http_auth, body.to_json, {:content_type => "application/json"})
114
112
  end
115
113
 
116
114
  def connector_is_saucelabs?
@@ -1,3 +1,3 @@
1
1
  module MiniAutobot
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_autobot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ripta Pasay
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-08-27 00:00:00.000000000 Z
13
+ date: 2015-09-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -291,7 +291,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
291
291
  version: '0'
292
292
  requirements: []
293
293
  rubyforge_project:
294
- rubygems_version: 2.2.2
294
+ rubygems_version: 2.4.6
295
295
  signing_key:
296
296
  specification_version: 4
297
297
  summary: Web automation framework on minitest, selenium webdriver, and page objects.