assertthat-bdd 1.6.0 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/assertthat-bdd.rb +11 -19
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0133f64a8483d8b19879e683995b21d727b1746c039eea9b86c361094129392e
4
- data.tar.gz: dd6c9717e34943908f8b1e80fd1e56e16d2f885bd61cea8fca76c724b6478fdf
3
+ metadata.gz: b5c4651bc71ff0ac382616142383c8fbaaead663300bf1bff27c978dfadd8b08
4
+ data.tar.gz: 9df3b59f2726fa196806bc241f15b8875aab16efb5eecb6575ee3a8aaac191b2
5
5
  SHA512:
6
- metadata.gz: 2fd2ebf8961955d92c3e3d95d4f05ea988069b49c5de1236eaf5b94f312e35c83869aa48fa6f350b12b8de517688796f04920eb626fde37202363b4f030d735c
7
- data.tar.gz: 7b683aa24951e55061aa65944d2d234c653b2772dfca54b9f591ff5492710f973b1405c81f19cbe33fa75004eb84eb0fe93b4b1d57f8df4b5470547e33b3384c
6
+ metadata.gz: d008022710ba84b7caf9d9b6a9e119d61012031341d61e8ecc298a38dcb40e3fda81be87325d1c01ae910963852f60b7019d6cd178e7b0d01791d1e4961785af
7
+ data.tar.gz: 9406e8bae99ea54114ca31e06aafb1382cdeff7a66776830f15d171a7942c49c5b3281cafac8243e5b5155177253ed559c6443e53899c710eca17870f254ed79
@@ -10,8 +10,18 @@ module AssertThatBDD
10
10
  url = ['https://bdd.assertthat.app/rest/api/1/project/', projectId, '/features'].map(&:to_s).join('')
11
11
  url = [jiraServerUrl,"/rest/assertthat/latest/project/",projectId,"/client/features"].map(&:to_s).join('') unless jiraServerUrl.nil?
12
12
  resource = RestClient::Resource.new(url, :user => accessKey, :password => secretKey, :content_type => 'application/zip')
13
- begin
14
13
  resource.get(:accept => 'application/zip', params: {mode: mode, jql: jql, tags: tags}) do |response, request, result|
14
+ case response.code
15
+ when 401
16
+ puts '*** ERROR: Unauthorized error (401). Supplied secretKey/accessKey is invalid'
17
+ return
18
+ when 400
19
+ puts '*** ERROR: ' + e.response
20
+ return
21
+ when 500
22
+ puts '*** ERROR: Jira server error (500)'
23
+ return
24
+ end
15
25
  Dir.mkdir("#{outputFolder}") unless File.exists?("#{outputFolder}")
16
26
  File.open("#{outputFolder}/features.zip", 'wb') {|f| f.write(response) }
17
27
  features_count = 0
@@ -27,24 +37,6 @@ module AssertThatBDD
27
37
  puts "*** INFO: #{features_count} features downloaded"
28
38
  end
29
39
  File.delete("#{outputFolder}/features.zip")
30
- rescue => e
31
-
32
- if e.respond_to?('response') then
33
- if e.response.respond_to?('code') then
34
- case e.response.code
35
- when 401
36
- puts '*** ERROR: Unauthorized error (401). Supplied secretKey/accessKey is invalid'
37
- when 400
38
- puts '*** ERROR: ' + e.response
39
- when 500
40
- puts '*** ERROR: Jira server error (500)'
41
- end
42
- end
43
- else
44
- puts '*** ERROR: Failed download features: ' + e.message
45
- end
46
- return
47
- end
48
40
  end
49
41
  end
50
42
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assertthat-bdd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Glib Briia