cucumber-calliope_importer 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/cucumber/calliope_importer/json.rb +11 -5
- data/lib/cucumber/calliope_importer/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffad75ec16f58b84b8ed511ce748d2c5347ad590
|
4
|
+
data.tar.gz: b089cdbfe3bf3d0013ca24b038021904455a45fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e79e9a6e65f5c15248f343aa5f4eadd8068437b798773c762e9e6322e195bc5ab5c647cbdd282e64b47c69147a964dbcd0ac45c854b890396558b2b9fbbb863
|
7
|
+
data.tar.gz: eb826ae856693f5ac3d2791859bfe941bfe44340b216745f91c108adcba20f6e5bf3c3c7b8a69bd9020346845849aec13b01ea18c078b3057f76c2d9fa1883c0
|
data/README.md
CHANGED
@@ -27,9 +27,9 @@ In order to use the calliope_import formatter we first have to require it in our
|
|
27
27
|
CalliopeImport uses environment variables of a test run to make an API call with the test results.
|
28
28
|
You can set those variables and call the formatter like this:
|
29
29
|
|
30
|
-
$ cucumber API_KEY
|
30
|
+
$ cucumber API_KEY=<API Key Here> PROFILE_ID=<Profile_ID Here> -f calliope_import
|
31
31
|
|
32
|
-
The API url defaults to 'https://app.calliope.pro' this can be changed with the environment variable API_URL
|
32
|
+
The API url defaults to 'https://app.calliope.pro' this can be changed with the environment variable API_URL=<API Url Here>
|
33
33
|
|
34
34
|
## Development
|
35
35
|
|
@@ -33,18 +33,22 @@ module Cucumber
|
|
33
33
|
def upload_to_api(results)
|
34
34
|
print "\nUploading to Calliope.pro"
|
35
35
|
# Get metadata from test run
|
36
|
-
@calliope_config['
|
37
|
-
@calliope_config['
|
36
|
+
@calliope_config['os'] = ENV['TA_OS'] || RUBY_PLATFORM
|
37
|
+
@calliope_config['platform'] = ENV['TA_PLATFORM'] || nil
|
38
|
+
@calliope_config['build'] = ENV['TA_BUILD'] || nil
|
38
39
|
# Set url
|
39
|
-
if @calliope_config['
|
40
|
-
print "\n[Optional] Could not determine
|
40
|
+
if @calliope_config['platform'].nil?
|
41
|
+
print "\n[Optional] Could not determine a platform, set ENV['TA_PLATFORM'] in env.rb to manually set the platform."
|
42
|
+
end
|
43
|
+
if @calliope_config['build'].nil?
|
44
|
+
print "\n[Optional] Could not determine build version, set ENV['TA_BUILD'] in env.rb to manually set the build version."
|
41
45
|
end
|
42
46
|
api_call(results)
|
43
47
|
end
|
44
48
|
|
45
49
|
def api_call(results)
|
46
50
|
# Make API call
|
47
|
-
url = "#{@calliope_config['url']}/api/v2/profile/#{@calliope_config['profile_id']}/testresult?
|
51
|
+
url = "#{@calliope_config['url']}/api/v2/profile/#{@calliope_config['profile_id']}/testresult?os=#{@calliope_config['os']}&platform=#{@calliope_config['platform']}&build=#{@calliope_config['build']}"
|
48
52
|
url = URI.parse(url)
|
49
53
|
http = Net::HTTP.new(url.host, url.port)
|
50
54
|
# Enable ssl when necessary
|
@@ -78,6 +82,8 @@ module Cucumber
|
|
78
82
|
request = Net::HTTP::Get.new(url, header)
|
79
83
|
response = http.request(request)
|
80
84
|
|
85
|
+
p "API Response: #{response.body}"
|
86
|
+
|
81
87
|
if response.code != '200'
|
82
88
|
error = 'Not authorized for this calliope profile, exiting...'
|
83
89
|
print_error(error)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-calliope_importer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maurice Wijnia
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
96
|
rubyforge_project:
|
97
|
-
rubygems_version: 2.5.
|
97
|
+
rubygems_version: 2.5.2
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: This gem adds a 'calliope-import' formatter to cucumber that uploads cucumber
|