assertthat-bdd 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/assertthat-bdd-features +2 -1
- data/bin/assertthat-bdd-report +2 -1
- data/lib/assertthat-bdd.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bda2d9e09ce4ddebe333b05a49bab61d1fdba9018006ee2cd4634380f369e50
|
4
|
+
data.tar.gz: 18a1599a5aff84a08958806635c5879307ae4bb547ff50cd2af1b9efee3b79b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73e988875f84f790af27de339b35f3ab63d936ca63223cfc4c33aae520323ae8c930472b58fac34fa9c5732c1f4d38510a031550965bdb56a0bad823b8f5d3ed
|
7
|
+
data.tar.gz: d9251a36f889b2eb4a7fbcb580e02b7175215bfbba80f4e5835cb0efdf41fa2f22ed8ab91ef3164a97feac85afcace9416b2608728d95c3674c6b8fd8df8a925
|
data/bin/assertthat-bdd-features
CHANGED
@@ -2,12 +2,13 @@
|
|
2
2
|
require 'assertthat-bdd'
|
3
3
|
require 'optparse'
|
4
4
|
|
5
|
-
VERSION = '1.0
|
5
|
+
VERSION = '1.2.0'
|
6
6
|
|
7
7
|
options = {}
|
8
8
|
OptionParser.new do |opt|
|
9
9
|
opt.on('-a','--accessKey ACCESS_KEY', 'Access key same as env variable ASSERTTHAT_ACCESS_KEY') { |o| options[:accessKey] = o }
|
10
10
|
opt.on('-s','--secretKey SECRET_KEY', 'Secret key same as env variable ASSERTTHAT_SECRET_KEY') { |o| options[:secretKey] = o }
|
11
|
+
opt.on('-u','--jiraServerUrl SERVER_URL', 'Jira server URL') { |o| options[:jiraServerUrl] = o }
|
11
12
|
opt.on('-p','--projectId PROJECT_ID', 'Jira project id') { |o| options[:projectId] = o }
|
12
13
|
opt.on('-o','--outputFolder OUTPUT_FOLDER', 'Featured output folder - default ./features') { |o| options[:outputFolder] = o }
|
13
14
|
opt.on('-m','--mode MODE', 'Mode one of automated,manual,both - deafult automated') { |o| options[:mode] = o }
|
data/bin/assertthat-bdd-report
CHANGED
@@ -2,12 +2,13 @@
|
|
2
2
|
require 'assertthat-bdd'
|
3
3
|
require 'optparse'
|
4
4
|
|
5
|
-
VERSION = '1.0
|
5
|
+
VERSION = '1.2.0'
|
6
6
|
|
7
7
|
options = {}
|
8
8
|
OptionParser.new do |opt|
|
9
9
|
opt.on('-a','--accessKey ACCESS_KEY', 'Access key same as env variable ASSERTTHAT_ACCESS_KEY') { |o| options[:accessKey] = o }
|
10
10
|
opt.on('-s','--secretKey SECRET_KEY', 'Secret key same as env variable ASSERTTHAT_SECRET_KEY') { |o| options[:secretKey] = o }
|
11
|
+
opt.on('-u','--jiraServerUrl SERVER_URL', 'Jira server URL') { |o| options[:jiraServerUrl] = o }
|
11
12
|
opt.on('-p', '--projectId PROJECT_ID', 'Jira project id') { |o| options[:projectId] = o }
|
12
13
|
opt.on('-n','--runName RUN_NAME', 'The name of the run - default \'Test run dd MMM yyyy HH:mm:ss\'') { |o| options[:runName] = o }
|
13
14
|
opt.on('-f','--jsonReportFolder JSON_FOLDER_PATH', 'Json report folder - default ./reports') { |o| options[:mode] = o }
|
data/lib/assertthat-bdd.rb
CHANGED
@@ -5,9 +5,10 @@ require 'json'
|
|
5
5
|
|
6
6
|
module AssertThatBDD
|
7
7
|
class Features
|
8
|
-
def self.download(accessKey: ENV['ASSERTTHAT_ACCESS_KEY'], secretKey: ENV['ASSERTTHAT_ACCESS_KEY'], projectId: nil, outputFolder: './features/', proxy: nil, mode: 'automated', jql: '')
|
8
|
+
def self.download(accessKey: ENV['ASSERTTHAT_ACCESS_KEY'], secretKey: ENV['ASSERTTHAT_ACCESS_KEY'], projectId: nil, outputFolder: './features/', proxy: nil, mode: 'automated', jql: '', jiraServerUrl: nil)
|
9
9
|
RestClient.proxy = proxy unless proxy.nil?
|
10
10
|
url = 'https://bdd.assertthat.app/rest/api/1/project/'+ projectId +'/features'
|
11
|
+
url = jiraServerUrl+"/rest/assertthat/latest/project/"+projectId+"/client/features" unless jiraServerUrl.nil?
|
11
12
|
resource = RestClient::Resource.new(url, :user => accessKey, :password => secretKey, :content_type => 'application/zip')
|
12
13
|
begin
|
13
14
|
contents = resource.get(:accept => 'application/zip', params: {mode: mode, jql: jql})
|
@@ -46,7 +47,8 @@ module AssertThatBDD
|
|
46
47
|
|
47
48
|
class Report
|
48
49
|
def self.upload(accessKey: ENV['ASSERTTHAT_ACCESS_KEY'], secretKey: ENV['ASSERTTHAT_ACCESS_KEY'], projectId: nil, runName: 'Test run '+Time.now.strftime("%d %b %Y %H:%M:%S"), jsonReportFolder: './reports', jsonReportIncludePattern: '.*.json' )
|
49
|
-
|
50
|
+
url = "https://bdd.assertthat.app/rest/api/1/project/" + projectId + "/report"
|
51
|
+
url = jiraServerUrl+"/rest/assertthat/latest/project/"+projectId+"/client/report" unless jiraServerUrl.nil?
|
50
52
|
files = Find.find(jsonReportFolder).grep(/#{jsonReportIncludePattern}/)
|
51
53
|
puts "*** INFO: #{files.count} files found matching parretn #{jsonReportIncludePattern}:"
|
52
54
|
puts "*** INFO: #{files}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: assertthat-bdd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Glib Briia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|