|
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 @@ def self.download(accessKey: ENV['ASSERTTHAT_ACCESS_KEY'], secretKey: ENV['ASSER
|
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 |
| - url = "https://bdd.assertthat.app/rest/api/1/project/" + projectId + "/report" |
| 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}"
|
|
0 commit comments