appveyor-worker 0.2.0 → 0.2.1

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: b991b92a0fba1e6036c143b0776497cd313577bc
4
- data.tar.gz: b1efcb211a766402d65603f48bb1270dcf1618ea
3
+ metadata.gz: 783ca7564277bd450a259fc4e7e854a5960d7d95
4
+ data.tar.gz: 4b743220eeca4c040378ffc5a1add7c83e51059d
5
5
  SHA512:
6
- metadata.gz: daeeb401b2a69735bd3b23fd247be06e7b1df06f8535f41a9e8cb219888bf26fdbbd9559fd1441c962b41f7265e345a9d611450440a972a4911fe89a6e033c80
7
- data.tar.gz: bf02ce4bfe10a35f59066d3927df3a980d538fac5ad9c490185a8dc95f583700a7750b6263c197a0bccfa4ca87930e1c5996797a83b972c4d4bb73a35a9f9bee
6
+ metadata.gz: 21e568f5ae5c06ebb777a53f6af88d201f7e685540bdf79cc441e44d76b0e7b8562eaec54144ff51d04bce1c232e8fb4f4c5f833e4411589e6f997306428ded1
7
+ data.tar.gz: 200300d953d17ae412bb62c9aa9815e7fc422b5b9785d97c53a8e747e48681d012ec96633bca7f05eb77cb3cb91f22f1b7fa3a667b699c58a6441f5def151449
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
- --require spec_helper
2
- -r appveyor/worker
1
+ --require spec_helper
2
+ -r appveyor/worker
data/README.md CHANGED
@@ -1,58 +1,58 @@
1
- # AppVeyor::Worker
2
-
3
- [![Build status](https://ci.appveyor.com/api/projects/status/oiqm2v8jcr9td1la?svg=true)](https://ci.appveyor.com/project/ukoloff/appveyor-worker)
4
- [![Gem Version](https://badge.fury.io/rb/appveyor-worker.svg)](http://badge.fury.io/rb/appveyor-worker)
5
-
6
- Access to [AppVeyor][]
7
- [Build Worker API][].
8
-
9
- ## Installation
10
-
11
- Add this line to your application's Gemfile:
12
-
13
- ```ruby
14
- gem 'appveyor-worker' # if ENV['APPVEYOR_API_URL']
15
- ```
16
-
17
- And then execute:
18
-
19
- $ bundle
20
-
21
- Or install it yourself as:
22
-
23
- $ gem install appveyor-worker
24
-
25
- ## Usage
26
-
27
- ```ruby
28
- require 'appveyor/worker'
29
-
30
- AppVeyor::Worker.message "Hello, world!", "It's me"
31
- ```
32
-
33
- ### Minitest
34
-
35
- When using `AppVeyor::Worker` under
36
- [Minitest][]
37
- the latter automagically requires the former.
38
- Just add to `Gemfile` et voila! Test results will populate list
39
- and `AppVeyor::Worker.message` is available in your tests.
40
-
41
- In addition, Minitest seed will be sent as AppVeyor message.
42
-
43
- ### RSpec
44
-
45
- For [RSpec][] you need *two* lines of code, as mentioned above:
46
-
47
- 1. Add gem to `Gemfile`
48
- 2. Require gem
49
-
50
- * Either directly in one of your `./spec/*_spec.rb` files
51
- * Or by adding `-r appveyor/worker` to `./.rspec'
52
-
53
- RScpec seed is also reported as standard AppVeyor message.
54
-
55
- [AppVeyor]: http://www.appveyor.com/
56
- [Build Worker API]: http://www.appveyor.com/docs/build-worker-api
57
- [Minitest]: https://github.com/seattlerb/minitest
58
- [RSpec]: http://rspec.info/
1
+ # AppVeyor::Worker
2
+
3
+ [![Build status](https://ci.appveyor.com/api/projects/status/oiqm2v8jcr9td1la?svg=true)](https://ci.appveyor.com/project/ukoloff/appveyor-worker)
4
+ [![Gem Version](https://badge.fury.io/rb/appveyor-worker.svg)](http://badge.fury.io/rb/appveyor-worker)
5
+
6
+ Access to [AppVeyor][]
7
+ [Build Worker API][].
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ ```ruby
14
+ gem 'appveyor-worker' # if ENV['APPVEYOR_API_URL']
15
+ ```
16
+
17
+ And then execute:
18
+
19
+ $ bundle
20
+
21
+ Or install it yourself as:
22
+
23
+ $ gem install appveyor-worker
24
+
25
+ ## Usage
26
+
27
+ ```ruby
28
+ require 'appveyor/worker'
29
+
30
+ AppVeyor::Worker.message "Hello, world!", "It's me"
31
+ ```
32
+
33
+ ### Minitest
34
+
35
+ When using `AppVeyor::Worker` under
36
+ [Minitest][]
37
+ the latter automagically requires the former.
38
+ Just add to `Gemfile` et voila! Test results will populate list
39
+ and `AppVeyor::Worker.message` is available in your tests.
40
+
41
+ In addition, Minitest seed will be sent as AppVeyor message.
42
+
43
+ ### RSpec
44
+
45
+ For [RSpec][] you need *two* lines of code, as mentioned above:
46
+
47
+ 1. Add gem to `Gemfile`
48
+ 2. Require gem
49
+
50
+ * Either directly in one of your `./spec/*_spec.rb` files
51
+ * Or by adding `-r appveyor/worker` to `./.rspec`
52
+
53
+ RScpec seed is also reported as standard AppVeyor message.
54
+
55
+ [AppVeyor]: http://www.appveyor.com/
56
+ [Build Worker API]: http://www.appveyor.com/docs/build-worker-api
57
+ [Minitest]: https://github.com/seattlerb/minitest
58
+ [RSpec]: http://rspec.info/
data/Rakefile CHANGED
@@ -1,19 +1,19 @@
1
- require "bundler/gem_tasks"
2
-
3
- desc 'Run tests'
4
- task test: %i(minitest rspec) do
5
- end
6
-
7
- desc "Run Minitest"
8
- task :minitest do
9
- require "minitest/autorun"
10
-
11
- Dir.glob('./test/*.rb'){|f| require f}
12
- end
13
-
14
- desc "Run RSpec"
15
- task :rspec do
16
- system "rspec"
17
- end
18
-
19
- task default: :test
1
+ require "bundler/gem_tasks"
2
+
3
+ desc 'Run tests'
4
+ task test: %i(minitest rspec) do
5
+ end
6
+
7
+ desc "Run Minitest"
8
+ task :minitest do
9
+ require "minitest/autorun"
10
+
11
+ Dir.glob('./test/*.rb'){|f| require f}
12
+ end
13
+
14
+ desc "Run RSpec"
15
+ task :rspec do
16
+ system "rspec"
17
+ end
18
+
19
+ task default: :test
@@ -1,28 +1,28 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'appveyor/worker/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "appveyor-worker"
8
- spec.version = AppVeyor::Worker::VERSION
9
- spec.authors = ["Stas Ukolov"]
10
- spec.email = ["ukoloff@gmail.com"]
11
-
12
- spec.summary = 'Access to AppVeyor Build Worker API'
13
- spec.description = 'Access to AppVeyor Build Worker API'
14
- spec.homepage = "https://github.com/ukoloff/appveyor-worker"
15
- spec.license = "MIT"
16
-
17
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
- spec.bindir = "exe"
19
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
- spec.require_paths = ["lib"]
21
-
22
- spec.add_dependency "json"
23
-
24
- spec.add_development_dependency "bundler", "~> 1.9"
25
- spec.add_development_dependency "rake", "~> 10.0"
26
- spec.add_development_dependency "minitest"
27
- spec.add_development_dependency "rspec"
28
- end
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'appveyor/worker/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "appveyor-worker"
8
+ spec.version = AppVeyor::Worker::VERSION
9
+ spec.authors = ["Stas Ukolov"]
10
+ spec.email = ["ukoloff@gmail.com"]
11
+
12
+ spec.summary = 'Access to AppVeyor Build Worker API'
13
+ spec.description = 'Access to AppVeyor Build Worker API'
14
+ spec.homepage = "https://github.com/ukoloff/appveyor-worker"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = "exe"
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_dependency "json"
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.9"
25
+ spec.add_development_dependency "rake", "~> 10.0"
26
+ spec.add_development_dependency "minitest"
27
+ spec.add_development_dependency "rspec"
28
+ end
@@ -11,8 +11,14 @@ environment:
11
11
  - RUBY_VERSION: 21
12
12
  - RUBY_VERSION: 200
13
13
 
14
+
15
+ platform:
16
+ - x64
17
+ - x86
18
+
14
19
  install:
15
- - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
20
+ - set _platform=-%Platform%
21
+ - set PATH=C:\Ruby%RUBY_VERSION%%_platform:-x86=%\bin;%PATH%
16
22
  - bundle config --local path vendor/bundle
17
23
  - bundle install
18
24
 
@@ -1,58 +1,58 @@
1
- require 'json'
2
- require 'net/http'
3
-
4
- require_relative "worker/version"
5
- require_relative "worker/rspec" if defined? RSpec
6
-
7
- module AppVeyor::Worker
8
- def self.skip?
9
- !api
10
- end
11
-
12
- def self.message msg, details=nil
13
- x = api or return
14
- body = JSON.generate category: 'info',
15
- message: msg,
16
- details: details
17
- x.post '/api/build/messages',
18
- body,
19
- 'Content-Length'=>body.length.to_s,
20
- 'Content-Type'=>'application/json'
21
- end
22
-
23
- def self.test info
24
- x = api or return
25
- body = JSON.generate info
26
- x.post '/api/tests',
27
- body,
28
- 'Content-Length'=>body.length.to_s,
29
- 'Content-Type'=>'application/json'
30
- end
31
-
32
- def self.env envs
33
- x = api or return
34
- envs.each do |k, v|
35
- body = JSON.generate name: k, value: v
36
- x.post '/api/build/variables',
37
- body,
38
- 'Content-Length'=>body.length.to_s,
39
- 'Content-Type'=>'application/json'
40
- end
41
- end
42
-
43
- private
44
-
45
- def self.api
46
- return if false===@http
47
- return @http if @http
48
- unless z = ENV['APPVEYOR_API_URL']
49
- @http = false
50
- return
51
- end
52
- z = URI z
53
- @http = x = Net::HTTP.start z.host, z.port
54
- x.use_ssl='https'==z.scheme
55
- x
56
- end
57
-
58
- end
1
+ require 'json'
2
+ require 'net/http'
3
+
4
+ require_relative "worker/version"
5
+ require_relative "worker/rspec" if defined? RSpec
6
+
7
+ module AppVeyor::Worker
8
+ def self.skip?
9
+ !api
10
+ end
11
+
12
+ def self.message msg, details=nil
13
+ x = api or return
14
+ body = JSON.generate category: 'info',
15
+ message: msg,
16
+ details: details
17
+ x.post '/api/build/messages',
18
+ body,
19
+ 'Content-Length'=>body.length.to_s,
20
+ 'Content-Type'=>'application/json'
21
+ end
22
+
23
+ def self.test info
24
+ x = api or return
25
+ body = JSON.generate info
26
+ x.post '/api/tests',
27
+ body,
28
+ 'Content-Length'=>body.length.to_s,
29
+ 'Content-Type'=>'application/json'
30
+ end
31
+
32
+ def self.env envs
33
+ x = api or return
34
+ envs.each do |k, v|
35
+ body = JSON.generate name: k, value: v
36
+ x.post '/api/build/variables',
37
+ body,
38
+ 'Content-Length'=>body.length.to_s,
39
+ 'Content-Type'=>'application/json'
40
+ end
41
+ end
42
+
43
+ private
44
+
45
+ def self.api
46
+ return if false===@http
47
+ return @http if @http
48
+ unless z = ENV['APPVEYOR_API_URL']
49
+ @http = false
50
+ return
51
+ end
52
+ z = URI z
53
+ @http = x = Net::HTTP.start z.host, z.port
54
+ x.use_ssl='https'==z.scheme
55
+ x
56
+ end
57
+
58
+ end
@@ -12,10 +12,10 @@ module AppVeyor::Worker::RSpec
12
12
  testName: example.full_description,
13
13
  fileName: example.location,
14
14
  outcome: ({passed: 'Passed', failed: 'Failed', pending: 'Ignored'}[res.status] || '?'),
15
- durationMilliseconds: res.run_time*1000
15
+ durationMilliseconds: res.run_time*1000,
16
+ ErrorMessage: (example.exception.message rescue nil),
17
+ ErrorStackTrace: (example.exception.backtrace * "\n" rescue nil)
16
18
  # StdOut: YAML.dump('assertions'=>result.assertions),
17
- # ErrorStackTrace: (result.failure.backtrace * "\n" rescue nil)
18
-
19
19
  true
20
20
  end
21
21
 
@@ -1,5 +1,5 @@
1
1
  require_relative "../../appveyor"
2
2
 
3
3
  module AppVeyor::Worker
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
@@ -1,23 +1,24 @@
1
- require 'yaml'
2
- require_relative '../appveyor/worker'
3
-
4
- module Minitest
5
- def self.plugin_appveyor_init options
6
- ::AppVeyor::Worker.message "#{name} seed: #{options[:seed]}"
7
- self.reporter << AppVeyor.new unless ::AppVeyor::Worker.skip?
8
- end
9
-
10
- class AppVeyor < AbstractReporter
11
-
12
- def record result
13
- ::AppVeyor::Worker.test testFramework: 'Minitest',
14
- testName: result.name,
15
- fileName: result.class.name,
16
- outcome: result.skipped? ? 'Ignored' : result.passed? ? 'Passed' : 'Failed',
17
- durationMilliseconds: result.time*1000,
18
- StdOut: YAML.dump('assertions'=>result.assertions),
19
- ErrorStackTrace: (result.failure.backtrace * "\n" rescue nil)
20
- end
21
-
22
- end
23
- end
1
+ require 'yaml'
2
+ require_relative '../appveyor/worker'
3
+
4
+ module Minitest
5
+ def self.plugin_appveyor_init options
6
+ ::AppVeyor::Worker.message "#{name} seed: #{options[:seed]}"
7
+ self.reporter << AppVeyor.new unless ::AppVeyor::Worker.skip?
8
+ end
9
+
10
+ class AppVeyor < AbstractReporter
11
+
12
+ def record result
13
+ ::AppVeyor::Worker.test testFramework: 'Minitest',
14
+ testName: result.name,
15
+ fileName: result.class.name,
16
+ outcome: result.skipped? ? 'Ignored' : result.passed? ? 'Passed' : 'Failed',
17
+ durationMilliseconds: result.time*1000,
18
+ StdOut: YAML.dump('assertions'=>result.assertions),
19
+ ErrorMessage: (result.failure.message rescue nil),
20
+ ErrorStackTrace: (result.failure.backtrace * "\n" rescue nil)
21
+ end
22
+
23
+ end
24
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appveyor-worker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stas Ukolov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-14 00:00:00.000000000 Z
11
+ date: 2018-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json