milou 1.0.0 → 1.0.2

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
  SHA256:
3
- metadata.gz: 35c1b97511bd156f6c9f7fe78ae56c57548000ec02f9081ed9f71e1d5c71d84d
4
- data.tar.gz: b6a63f15c3b513ab8810125b338487253281742de21c5c3ff81e24a5e16d721a
3
+ metadata.gz: ecad64168c25494a286fafa4d5f2180b7a29ef12f8f6f0c087a853c72fa83e80
4
+ data.tar.gz: 28bd10a0d7c4c188fe621648412e5a39b279f61378f8bb5aaff48382a1def7aa
5
5
  SHA512:
6
- metadata.gz: d3e4235616ed6020a1086101f55a9647212e8d7a3b5b7d41224a0f64a3294468b0d27af65459c1a71965fb9ca2ada113c14bdcea162a4bcadf80bbe5163584b1
7
- data.tar.gz: 6652d5076db74480f1ddba263f706561b1009d1da7d0f724dfad5d350a9ff239481bcac32bc23aba04366728b7a74a019ecc4da6fd80863434d5950ea6b20f1e
6
+ metadata.gz: 259d461d8dc8617270dd3910dcfa42658be3a5fbff262cd58a62ac9714ae478ce5b2352e57fdc9142efe1187156bb2cbfbe7c68dd8890c0cff4bcb8c493261c8
7
+ data.tar.gz: a3df594fdc18c0731ba75572d4118b9d6c58854839d39e56b898768cab9ab6bad02e89ffc998920ff4cee43751d7726345dfa51d5e403cd0db4953e543be5774
data/bin/watchdog CHANGED
@@ -16,3 +16,8 @@ when 'version'
16
16
  else
17
17
  puts 'need to specify which runner'
18
18
  end
19
+
20
+ case ARGV[1]
21
+ when 'bootstrap'
22
+ puts Watchdog::bootstrap_cleanup
23
+ end
@@ -20,5 +20,9 @@ module Watchdog
20
20
  def self.setup_project(setup_cmd)
21
21
  Watchdog::Utils.run_cmd setup_cmd
22
22
  end
23
+
24
+ def self.cleanup
25
+ %x[ rm -rf project_dir ]
26
+ end
23
27
  end
24
28
  end
@@ -16,20 +16,16 @@ module Watchdog
16
16
  end
17
17
 
18
18
  def build_detox
19
- detox_cmd = 'yarn run detox-build'
19
+ detox_cmd = 'yarn run detox-build-watchdog'
20
20
 
21
21
  Watchdog::Utils.run_cmd(detox_cmd)
22
-
23
- # %x[ #{detox_cmd} 2>&1 ]
24
22
  end
25
23
 
26
24
  # Detox runner
27
25
  def run_detox
28
- detox_cmd = 'yarn run detox-test'
26
+ detox_cmd = 'yarn run detox-test-watchdog'
29
27
 
30
28
  Watchdog::Utils.run_cmd(detox_cmd)
31
-
32
- # %x[ #{detox_cmd} 2>&1 ]
33
29
  end
34
30
 
35
31
  # Watchdog runner
@@ -37,13 +33,9 @@ module Watchdog
37
33
 
38
34
  status_regex = /(FAIL|PASS) (.*\.js) \((.*)\)/
39
35
 
40
- commit_branch = Watchdog::Utils.run_cmd('git symbolic-ref --short HEAD').chomp
41
- commit_sha = Watchdog::Utils.run_cmd('git --no-pager show -s --format=%H').chomp
42
- commit_timestamp = Watchdog::Utils.run_cmd('git --no-pager log -1 --format=%cd').chomp
43
-
44
- # commit_branch = %x[ #{'git symbolic-ref --short HEAD'} 2>&1 ]
45
- # commit_sha = %x[ #{'git --no-pager show -s --format=%H'} 2>&1 ]
46
- # commit_timestamp = %x[ #{'git --no-pager log -1 --format=%cd'} 2>&1 ]
36
+ commit_branch = Watchdog::Utils.run_cmd('git symbolic-ref --short HEAD')[0].chomp
37
+ commit_sha = Watchdog::Utils.run_cmd('git --no-pager show -s --format=%H')[0].chomp
38
+ commit_timestamp = Watchdog::Utils.run_cmd('git --no-pager log -1 --format=%cd')[0].chomp
47
39
 
48
40
  run = {
49
41
  test_run: {
@@ -70,14 +62,11 @@ module Watchdog
70
62
  end
71
63
  end
72
64
 
73
-
74
-
75
65
  headers = {
76
66
  'Content-Type' => 'application/json',
77
67
  'X-API-KEY' => ENV['WATCHDOG_AUTH_TOKEN']
78
68
  }
79
- puts "run"
80
- puts run
69
+
81
70
  response = HTTParty.post(
82
71
  ENV['WATCHDOG_API_URL'],
83
72
  :body => run.to_json,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Watchdog
4
- VERSION = "1.0.0".freeze
4
+ VERSION = "1.0.2".freeze
5
5
  end
data/lib/watchdog.rb CHANGED
@@ -23,6 +23,10 @@ module Watchdog
23
23
  end
24
24
  end
25
25
 
26
+ def self.bootstrap_cleanup
27
+ Watchdog::Bootstrap.cleanup
28
+ end
29
+
26
30
  def self.run_detox
27
31
  runner = Watchdog::Detox.new
28
32
  runner.run
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: milou
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Silva
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-01 00:00:00.000000000 Z
11
+ date: 2022-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  requirements: []
88
- rubygems_version: 3.3.7
88
+ rubygems_version: 3.0.6
89
89
  signing_key:
90
90
  specification_version: 4
91
91
  summary: Watchdog SDK