cukehub 0.7.0

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 +7 -0
  2. data/lib/cukehub.rb +34 -0
  3. metadata +72 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 804c6a7c7a39ccade243be6825dac9162fa4963f
4
+ data.tar.gz: 5b8693ef161747a6930fd5018b50460d853ab4ad
5
+ SHA512:
6
+ metadata.gz: 30e207af255c5b7aa0b78d10795c7581fb9bae02fa7e4ebfddf1ba73d68f46c70ce7cf049386c2ae0d600332713fae865cd911bdf4a6fba4bb332933b933c075
7
+ data.tar.gz: b91ab2cb2949e35c099dcd785e270189fe7171ca7e100845fea8781f5299656a836164ab3acb061c9aa509dab612a039e2c4c412fff83837cdc90cfb5e3f1508
data/lib/cukehub.rb ADDED
@@ -0,0 +1,34 @@
1
+ require 'httparty'
2
+ require 'os'
3
+
4
+ if OS.mac? then
5
+ os = "OSX"
6
+ elsif OS.linux?
7
+ os = "Linux"
8
+ elsif OS.doze?
9
+ os = "Win"
10
+ end
11
+
12
+ Before do
13
+ @start = Time.now
14
+ end
15
+
16
+ After do |scenario|
17
+ IO.popen("git symbolic-ref --short HEAD") {|pipe| puts @git_branch = pipe.read }
18
+ params = {
19
+ token: @cukehub_token,
20
+ name: scenario.name,
21
+ location: scenario.location,
22
+ tag: scenario.source_tag_names,
23
+ status: scenario.status.upcase,
24
+ machine: Socket.gethostname,
25
+ os: os,
26
+ runtime: (Time.now - @start),
27
+ domain: @domain,
28
+ branch: @git_branch.chomp
29
+ }
30
+ params[:browser] = @browser.browser.upcase unless @browser.nil?
31
+ params[:exception]=scenario.exception.message unless scenario.passed?
32
+
33
+ HTTParty.post("http://cukehub.com/dropin", body: params)
34
+ end
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cukehub
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.7.0
5
+ platform: ruby
6
+ authors:
7
+ - Rich Downie
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-02-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: httparty
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: os
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: Ship your Cuke Results to Cukehub.
42
+ email: rich@cukehub.com
43
+ executables: []
44
+ extensions: []
45
+ extra_rdoc_files: []
46
+ files:
47
+ - lib/cukehub.rb
48
+ homepage: http://cukehub.com
49
+ licenses:
50
+ - MIT
51
+ metadata: {}
52
+ post_install_message:
53
+ rdoc_options: []
54
+ require_paths:
55
+ - lib
56
+ required_ruby_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ requirements: []
67
+ rubyforge_project:
68
+ rubygems_version: 2.5.1
69
+ signing_key:
70
+ specification_version: 4
71
+ summary: CukeHub!
72
+ test_files: []