cucumber-calliope_importer 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 17e097e9b100e3b80ddca2f27d3b05156391fbe5
4
- data.tar.gz: eb214744ae99c56577c394624b410444634a9734
3
+ metadata.gz: 2c9ba7867e62f729c04d2f9306d4366db56dba7f
4
+ data.tar.gz: 280855a416fbe826b05eb891b65de35233f72cd1
5
5
  SHA512:
6
- metadata.gz: d0291173044af43f25bdeba68572ea5c8610b96756e8215080bbaf6f645bd6fa5e287a1624d6967efa9240de7b15ba698fa824dac60f9ccd2cecc480bdcbb6a3
7
- data.tar.gz: 2681edff6e814bb76c91f700be8d798830a37d9be93c53f2ffdf5a55aaca49aa164a6b9a5ced5039a55097690a2ddeb5e3280b8e9837e7eb33deed89ca2c8e61
6
+ metadata.gz: 5abb9091c55d1a69627fa81082a3c1d87970d05f4ea234d2ae0737cb916e1f0413bca6f5f742ae0e8bb884e28db9efdc7afd1887004cd960179423548147a7d5
7
+ data.tar.gz: 98b0496f196d1a3a504bee78ae1ce234c97140d242c52af29b48149ecde2387642d8682e4ef9c70ac9327aae190b3eb73bee8e43252d8ede7bd1c0bc9d79bcc1
@@ -31,11 +31,14 @@ module Cucumber
31
31
  end
32
32
 
33
33
  def upload_to_api(results)
34
+ print "\nUploading to Calliope.pro"
34
35
  # Get metadata from test run
35
- metadata = JSON.parse(File.read('./storage/metadata.json'))
36
- @calliope_config['browser'] = metadata['browser']['name']
37
- @calliope_config['os'] = metadata['browser']['platform']
36
+ @calliope_config['browser'] = ENV['BROWSER_VERSION'] || ENV['BROWSER'] || nil
37
+ @calliope_config['os'] = RUBY_PLATFORM
38
38
  # 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."
41
+ end
39
42
  api_call(results)
40
43
  end
41
44
 
@@ -56,7 +59,7 @@ module Cucumber
56
59
  request = Net::HTTP::Post.new(url, header)
57
60
  request.body = results
58
61
  response = http.request(request)
59
- print "\nAPI response: #{response.body} \n"
62
+ print "\nAPI response: #{response.body} \n\n"
60
63
  end
61
64
 
62
65
  def check_profile_permission
@@ -1,5 +1,5 @@
1
1
  module Cucumber
2
2
  module CalliopeImporter
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
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.5
4
+ version: 0.1.6
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-10-23 00:00:00.000000000 Z
11
+ date: 2017-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler