simplecov-buildkite 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 03d218f096b3d4b093ef9e8f42cb3d30b8e170b33b4cc0a4be6beb65bb346e6f
4
+ data.tar.gz: 4c13c322ecd3ad46cc172c9b6fea6ebb7b9a9d0eff47c8f29fee52174a4926e4
5
+ SHA512:
6
+ metadata.gz: 351302ffe5132567b17f1b2143736ca801ad3fd121e2bf1e841a871bf4b4237847097248f1f08c877bdd8b3dc0b4ef10af7eb07cb07c17afddb324615a356972
7
+ data.tar.gz: 94c2b04ed58522d4a06532f3af22e6ccb21230150e904b35b32670883f7d4006a532b6f99dd2a7ccf2c43ce00fc105faf10c6dcfed31494fe0b7db2a924545f7
checksums.yaml.gz.sig ADDED
Binary file
data.tar.gz.sig ADDED
@@ -0,0 +1,3 @@
1
+ d��*5�V�0g�>M�?{l:�{�����{�{Q}y��5ϧs�)K�� ͸!�d��;�5�~���
2
+ M�Ϧkf�E�A@�� �Sa��bE$ˢC�v�D^�m�
3
+ ���I'�^�1'����翈� ��*���F�F������m�w���$K?���ic7(����$"@H�T#�7��S��'�2*!��!�� �6��.{��?)s��7o�&y �|xZ��k+�X5�s�U��Q�����aEƥ�!D%� B�
data/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.1.0] - 2018-05-30
10
+ ### Added
11
+ - New gem, simplecov-buildkite. 🎉
12
+ - Buildkite annotation formatter to consolidate reports from multiple simplecov
13
+ runs into a Buildkite annotation.
14
+
15
+ [Unreleased]: https://github.com/ticky/simplecov-buildkite/compare/v0.1.0...HEAD
16
+ [v0.1.0]: https://github.com/ticky/simplecov-buildkite/commits/v0.1.0
17
+
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at hello@jessicastokes.net. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Jessica Stokes
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,69 @@
1
+ # SimpleCov::Buildkite
2
+
3
+ Generate [Buildkite annotations] from your [SimpleCov] coverage reports when running your build on [Buildkite].
4
+
5
+ [Buildkite]: https://buildkite.com
6
+ [Buildkite annotations]: https://buildkite.com/docs/agent/v3/cli-annotate
7
+ [SimpleCov]: https://github.com/colszowka/simplecov
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile, after `simplecov`:
12
+
13
+ ```ruby
14
+ gem "simplecov"
15
+ gem "simplecov-buildkite"
16
+ ```
17
+
18
+ And then execute:
19
+
20
+ $ bundle
21
+
22
+ Or install it yourself as:
23
+
24
+ $ gem install simplecov-buildkite
25
+
26
+ ## Usage
27
+
28
+ Use it alongside your favourite formatter. For example, in [Rails] with [RSpec], add it in your `spec_helper.rb` like this:
29
+
30
+ ```ruby
31
+ # spec/spec_helper.rb
32
+
33
+ require "simplecov"
34
+ require "simplecov-buildkite"
35
+
36
+ SimpleCov.start "rails" do
37
+ formatter SimpleCov::Formatter::MultiFormatter.new([
38
+ SimpleCov::Formatter::HTMLFormatter,
39
+ SimpleCov::Buildkite::AnnotationFormatter,
40
+ ])
41
+ end
42
+ ```
43
+
44
+ When run on Buildkite, this will also output a pretty Buildkite annotation:
45
+
46
+ <img width="473" alt="Buildkite build showing a SimpleCov report in a Buildkite annotation" src="https://user-images.githubusercontent.com/282113/40627591-b8de5bc4-6274-11e8-8483-245e35c873af.png">
47
+
48
+ [Rails]: https://rubyonrails.org
49
+ [RSpec]: http://rspec.info
50
+
51
+ ## Development
52
+
53
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
54
+
55
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
56
+
57
+ ## Contributing
58
+
59
+ Bug reports and pull requests are welcome on GitHub at https://github.com/ticky/simplecov-buildkite. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant] code of conduct.
60
+
61
+ [Contributor Covenant]: http://contributor-covenant.org
62
+
63
+ ## License
64
+
65
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
66
+
67
+ ## Code of Conduct
68
+
69
+ Everyone interacting in the SimpleCov::Buildkite project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/ticky/simplecov-buildkite/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1 @@
1
+ require "simplecov/buildkite"
@@ -0,0 +1,7 @@
1
+ require "simplecov"
2
+
3
+ module SimpleCov::Buildkite
4
+ end
5
+
6
+ require "simplecov/buildkite/version"
7
+ require "simplecov/buildkite/annotation_formatter"
@@ -0,0 +1,27 @@
1
+ module SimpleCov::Buildkite
2
+ class AnnotationFormatter
3
+ def format(result)
4
+ message = "**#{format_element(result)}**\n\n"
5
+
6
+ result.groups.each do |name, group|
7
+ message += " * **#{name}**: #{format_element(group)}\n"
8
+ end
9
+
10
+ if ENV["BUILDKITE"]
11
+ system "buildkite-agent", "annotate", "--context", "simplecov", "--style", "info", message
12
+ else
13
+ puts message
14
+ end
15
+ end
16
+
17
+ private
18
+
19
+ def format_element(element)
20
+ "#{element.covered_percent.round(2)}% coverage: #{format_integer(element.covered_lines)} of #{format_integer(element.covered_lines + element.missed_lines)} lines"
21
+ end
22
+
23
+ def format_integer(integer)
24
+ integer.to_s.gsub(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1,")
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,3 @@
1
+ module SimpleCov::Buildkite
2
+ VERSION = "0.1.0"
3
+ end
metadata ADDED
@@ -0,0 +1,131 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: simplecov-buildkite
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Jessica Stokes
8
+ - Samuel Cochran
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain:
12
+ - |
13
+ -----BEGIN CERTIFICATE-----
14
+ MIIDKDCC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uUNzEHkSDe36/Rd1xYKV5JxMC2
30
+ YAttWFUs06lor2q1wwncPaMtUtbWwW35+1IV6xhs2rFY6DD/I6ZkK3GnHdY=
31
+ -----END CERTIFICATE-----
32
+ date: 2018-05-30 00:00:00.000000000 Z
33
+ dependencies:
34
+ - !ruby/object:Gem::Dependency
35
+ name: simplecov
36
+ requirement: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.16'
41
+ type: :runtime
42
+ prerelease: false
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.16'
48
+ - !ruby/object:Gem::Dependency
49
+ name: bundler
50
+ requirement: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.16'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.16'
62
+ - !ruby/object:Gem::Dependency
63
+ name: rake
64
+ requirement: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
69
+ type: :development
70
+ prerelease: false
71
+ version_requirements: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '10.0'
76
+ - !ruby/object:Gem::Dependency
77
+ name: rspec
78
+ requirement: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.0'
83
+ type: :development
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.0'
90
+ description:
91
+ email:
92
+ - hello@jessicastokes.net
93
+ - sj26@sj26.com
94
+ executables: []
95
+ extensions: []
96
+ extra_rdoc_files: []
97
+ files:
98
+ - CHANGELOG.md
99
+ - CODE_OF_CONDUCT.md
100
+ - LICENSE.md
101
+ - README.md
102
+ - lib/simplecov-buildkite.rb
103
+ - lib/simplecov/buildkite.rb
104
+ - lib/simplecov/buildkite/annotation_formatter.rb
105
+ - lib/simplecov/buildkite/version.rb
106
+ homepage: https://github.com/ticky/simplecov-buildkite
107
+ licenses:
108
+ - MIT
109
+ metadata:
110
+ changelog_uri: https://github.com/ticky/simplecov-buildkite/blob/master/CHANGELOG.md
111
+ post_install_message:
112
+ rdoc_options: []
113
+ require_paths:
114
+ - lib
115
+ required_ruby_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ required_rubygems_version: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ requirements: []
126
+ rubyforge_project:
127
+ rubygems_version: 2.7.7
128
+ signing_key:
129
+ specification_version: 4
130
+ summary: Generate SimpleCov reports for your parallel Buildkite builds
131
+ test_files: []
metadata.gz.sig ADDED
Binary file