cucumber-calliope_importer 0.1.9 → 0.1.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2fdb67ffdfb78b8f9c63a98577793257caeb8cc1
4
- data.tar.gz: aa756fbae1b45b539255c56671fb25f7c0705db6
3
+ metadata.gz: ffad75ec16f58b84b8ed511ce748d2c5347ad590
4
+ data.tar.gz: b089cdbfe3bf3d0013ca24b038021904455a45fa
5
5
  SHA512:
6
- metadata.gz: f1170b2e18c9ba0216e3ea8ce77217962060c9baaa3a83892397ab9d70fbdc30f174ef565ddc76a89ce68432f51def2a0b03458250c557a055393211dc8c2460
7
- data.tar.gz: b46079f61122ad06d4e90f60e7b78001d47ae7efa7e7f671b53c0567f66bc56710824ab8498df17a0858d8c10e7cec14828f47d70a637714112066b008735d21
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='API Key Here' PROFILE_ID='Profile_ID Here' -f calliope_import
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='API Url Here'
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['browser'] = ENV['BROWSER_VERSION'] || ENV['BROWSER'] || nil
37
- @calliope_config['os'] = RUBY_PLATFORM
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['browser'].nil?
40
- print "\n[Optional] Could not determine browser and browser version, set ENV['BROWSER_VERSION'] in env.rb to manually set them."
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?browser=#{@calliope_config['browser']}&os=#{@calliope_config['os']}"
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)
@@ -1,5 +1,5 @@
1
1
  module Cucumber
2
2
  module CalliopeImporter
3
- VERSION = "0.1.9"
3
+ VERSION = "0.1.10"
4
4
  end
5
5
  end
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.9
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: 2017-12-11 00:00:00.000000000 Z
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.1
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