delinquo-cli 0.1.0 → 0.1.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 +4 -4
- data/delinquo-cli.gemspec +1 -0
- data/lib/delinquo.rb +3 -0
- data/lib/delinquo/authenticated_connection.rb +10 -4
- data/lib/delinquo/cli.rb +2 -2
- data/lib/delinquo/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89a3f243d40f1d196ce0f76e0d28530189ecb014
|
4
|
+
data.tar.gz: b1ec1cfc08c1396efe1b3022bae851491a24bf7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f60fe285d9a55a425b30ddfe33df4d943dace127cf61ef12ee1077e2c69480082b79c2d15be7c31fc8e8991c0d34ba556124fd75d6e297c3bad86e03d6c6bc46
|
7
|
+
data.tar.gz: f84099aa4a89b96f65e349abc1ab480b4e3b64b7467a0d140c441da104c1f60f150801e8b053519077fd4031311e8de618f767e06e19c4e37d48ac987a88e8de
|
data/delinquo-cli.gemspec
CHANGED
data/lib/delinquo.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'httparty'
|
2
|
+
require 'colorize'
|
2
3
|
|
3
4
|
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
|
4
5
|
|
@@ -15,7 +16,7 @@ module Delinquo
|
|
15
16
|
ssl_version :TLSv1
|
16
17
|
|
17
18
|
def initialize(cert)
|
18
|
-
self.class.pem(File.read(
|
19
|
+
self.class.pem(File.read(cert))
|
19
20
|
end
|
20
21
|
|
21
22
|
def project(project)
|
@@ -34,9 +35,14 @@ module Delinquo
|
|
34
35
|
current = File.read(file)
|
35
36
|
|
36
37
|
url = "/project/#{project}/runner/#{runner}/run/#{run_id}"
|
37
|
-
|
38
|
-
run_id =
|
39
|
-
|
38
|
+
response = self.class.post(url, body: current, :headers => { "Content-Type" => "application/xml"})
|
39
|
+
run_id = response.body
|
40
|
+
if response.code != 201
|
41
|
+
puts "Error: failed to post file #{file}".colorize(:red)
|
42
|
+
else
|
43
|
+
puts "Success: posted file #{file}".colorize(:green)
|
44
|
+
end
|
45
|
+
|
40
46
|
end
|
41
47
|
end
|
42
48
|
end
|
data/lib/delinquo/cli.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'thor'
|
2
|
-
|
2
|
+
require 'colorize'
|
3
3
|
module Delinquo
|
4
4
|
|
5
5
|
class CLI < Thor
|
@@ -14,7 +14,7 @@ module Delinquo
|
|
14
14
|
connection = Delinquo::AuthenticatedConnection.new(options[:cert])
|
15
15
|
|
16
16
|
if connection.project(options[:project]).code != 200
|
17
|
-
puts "ERROR: Project not found with name '#{options[:project]}'"
|
17
|
+
puts "ERROR: Project not found with name '#{options[:project]}'".colorize(:red)
|
18
18
|
return
|
19
19
|
end
|
20
20
|
connection.add_run(options[:project], options[:runner], options[:directory])
|
data/lib/delinquo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: delinquo-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Ruston
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: colorize
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
description: Post the JUnit XML output of your test suite to delinquo
|
84
98
|
email:
|
85
99
|
- jruston90@gmail.com
|