ruby-grape-danger 0.1.1 → 0.2.1
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 +5 -5
- data/.github/workflows/danger.yml +21 -0
- data/.gitignore +1 -0
- data/.rubocop_todo.yml +6 -5
- data/CHANGELOG.md +14 -2
- data/Dangerfile +11 -5
- data/Gemfile +1 -1
- data/README.md +14 -20
- data/RELEASING.md +2 -2
- data/Rakefile +3 -1
- data/lib/ruby-grape-danger/version.rb +1 -1
- data/ruby-grape-danger.gemspec +3 -2
- metadata +25 -12
- data/.travis.yml +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5491fc72b3c5201c2384eb81ce351544900fbf2ce07c06eab8cd8ef95bed582a
|
4
|
+
data.tar.gz: 7e4b79524283635bbea95c00d1d6c5c44b248512f145aefe4d418abb18fd0fba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbfe985c96d9cfcac285c88317dde56b9e368dad086469019f5a04cf1947817f8142601a7d9b5a4502fa7dca9ddf391b0fda191a0133094d45d8261cd23d797c
|
7
|
+
data.tar.gz: 57c430ad6ba3ca1ccb91b1bb24ca5eac4870f93d484e9d40cc152a54c972ac510e79da814f050be1c40e8caf11b4ce3eca6b74fb6a3f8c821226e6dc4ebdf14e
|
@@ -0,0 +1,21 @@
|
|
1
|
+
name: danger
|
2
|
+
on: pull_request
|
3
|
+
|
4
|
+
jobs:
|
5
|
+
danger:
|
6
|
+
runs-on: ubuntu-latest
|
7
|
+
steps:
|
8
|
+
- uses: actions/checkout@v4
|
9
|
+
with:
|
10
|
+
fetch-depth: 100
|
11
|
+
- name: Set up Ruby
|
12
|
+
uses: ruby/setup-ruby@v1
|
13
|
+
with:
|
14
|
+
ruby-version: 3.2
|
15
|
+
bundler-cache: true
|
16
|
+
rubygems: latest
|
17
|
+
- name: Run Danger
|
18
|
+
run: |
|
19
|
+
# the token is public, has public_repo scope and belongs to the grape-bot user owned by @dblock, this is ok
|
20
|
+
TOKEN=$(echo -n Z2hwX2lYb0dPNXNyejYzOFJyaTV3QUxUdkNiS1dtblFwZTFuRXpmMwo= | base64 --decode)
|
21
|
+
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
|
data/.gitignore
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2020-05-09 10:55:58 -0400 using RuboCop version 0.82.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
10
|
-
#
|
9
|
+
# Offense count: 14
|
10
|
+
# Cop supports --auto-correct.
|
11
|
+
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
11
12
|
# URISchemes: http, https
|
12
|
-
|
13
|
-
Max:
|
13
|
+
Layout/LineLength:
|
14
|
+
Max: 169
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,22 @@
|
|
1
1
|
### Changelog
|
2
2
|
|
3
|
-
### 0.
|
3
|
+
### 0.2.2 (Next)
|
4
|
+
|
5
|
+
* Your contribution here.
|
6
|
+
|
7
|
+
### 0.2.1 (2024/01/02)
|
8
|
+
|
9
|
+
* [#11](https://github.com/ruby-grape/danger/pull/11): Upgraded Danger to 9.x, danger-changelog 0.7.x & switched from Travis to GHA.
|
10
|
+
|
11
|
+
### 0.2.0 (2020/05/09)
|
12
|
+
|
13
|
+
* [#8](https://github.com/ruby-grape/danger/pull/8): Upgraded Danger 8.0, danger-changelog 0.6.1 and added danger-toc 0.2.0 - [@dblock](https://github.com/dblock).
|
14
|
+
|
15
|
+
### 0.1.1 (2016/12/05)
|
4
16
|
|
5
17
|
* [#7](https://github.com/ruby-grape/danger/pull/7): Upgraded to danger 4.0.1 and danger-changelog 0.2.0 - [@dblock](https://github.com/dblock).
|
6
18
|
|
7
|
-
### 0.1.0 (
|
19
|
+
### 0.1.0 (2016/09/03)
|
8
20
|
|
9
21
|
* [#5](https://github.com/ruby-grape/danger/pull/5): Initial public release as a gem for Danger 3.2.0 - [@dblock](https://github.com/dblock).
|
10
22
|
|
data/Dangerfile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# --------------------------------------------------------------------------------------------------------------------
|
2
4
|
# Has any changes happened inside the actual library code?
|
3
5
|
# --------------------------------------------------------------------------------------------------------------------
|
@@ -7,9 +9,7 @@ has_spec_changes = !git.modified_files.grep(/spec/).empty?
|
|
7
9
|
# --------------------------------------------------------------------------------------------------------------------
|
8
10
|
# You've made changes to lib, but didn't write any tests?
|
9
11
|
# --------------------------------------------------------------------------------------------------------------------
|
10
|
-
if has_app_changes && !has_spec_changes
|
11
|
-
warn("There're library changes, but not tests. That's OK as long as you're refactoring existing code.", sticky: false)
|
12
|
-
end
|
12
|
+
warn("There're library changes, but not tests. That's OK as long as you're refactoring existing code.", sticky: false) if has_app_changes && !has_spec_changes
|
13
13
|
|
14
14
|
# --------------------------------------------------------------------------------------------------------------------
|
15
15
|
# You've made changes to specs, but no library code has changed?
|
@@ -21,15 +21,21 @@ end
|
|
21
21
|
# --------------------------------------------------------------------------------------------------------------------
|
22
22
|
# Have you updated CHANGELOG.md?
|
23
23
|
# --------------------------------------------------------------------------------------------------------------------
|
24
|
-
changelog.check
|
24
|
+
changelog.check!
|
25
|
+
|
26
|
+
# --------------------------------------------------------------------------------------------------------------------
|
27
|
+
# Do you have a TOC?
|
28
|
+
# --------------------------------------------------------------------------------------------------------------------
|
29
|
+
toc.check!
|
25
30
|
|
26
31
|
# --------------------------------------------------------------------------------------------------------------------
|
27
32
|
# Don't let testing shortcuts get into master by accident,
|
28
33
|
# ensuring that we don't get green builds based on a subset of tests.
|
29
34
|
# --------------------------------------------------------------------------------------------------------------------
|
30
35
|
|
31
|
-
(git.modified_files + git.added_files - %w
|
36
|
+
(git.modified_files + git.added_files - %w[Dangerfile]).each do |file|
|
32
37
|
next unless File.file?(file)
|
38
|
+
|
33
39
|
contents = File.read(file)
|
34
40
|
if file.start_with?('spec')
|
35
41
|
fail("`xit` or `fit` left in tests (#{file})") if contents =~ /^\w*[xf]it/
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -4,23 +4,29 @@
|
|
4
4
|
|
5
5
|
[](https://travis-ci.org/ruby-grape/danger)
|
6
6
|
|
7
|
-
|
7
|
+
## Table of Contents
|
8
8
|
|
9
|
-
|
9
|
+
- [Setup](#setup)
|
10
|
+
- [Set DANGER_GITHUB_API_TOKEN in Travis-CI](#set-danger_github_api_token-in-travis-ci)
|
11
|
+
- [Add Danger](#add-danger)
|
12
|
+
- [Add Dangerfile](#add-dangerfile)
|
13
|
+
- [Add Danger to Travis-CI](#add-danger-to-travis-ci)
|
14
|
+
- [Commit via a Pull Request](#commit-via-a-pull-request)
|
15
|
+
- [License](#license)
|
10
16
|
|
11
|
-
|
17
|
+
## Setup
|
12
18
|
|
13
|
-
|
19
|
+
Enable Danger for a project within the [ruby-grape organization](https://github.com/ruby-grape).
|
14
20
|
|
15
|
-
|
21
|
+
### Add Danger
|
16
22
|
|
17
23
|
Add `ruby-grape-danger` to `Gemfile`.
|
18
24
|
|
19
25
|
```ruby
|
20
|
-
gem 'ruby-grape-danger',
|
26
|
+
gem 'ruby-grape-danger', require: false
|
21
27
|
```
|
22
28
|
|
23
|
-
|
29
|
+
### Add Dangerfile
|
24
30
|
|
25
31
|
Commit a `Dangerfile`, eg. [Grape's Dangerfile](https://github.com/ruby-grape/grape/blob/master/Dangerfile).
|
26
32
|
|
@@ -28,19 +34,7 @@ Commit a `Dangerfile`, eg. [Grape's Dangerfile](https://github.com/ruby-grape/gr
|
|
28
34
|
danger.import_dangerfile(gem: 'ruby-grape-danger')
|
29
35
|
```
|
30
36
|
|
31
|
-
|
32
|
-
|
33
|
-
Add Danger to `.travis.yml`, eg. [Grape's Travis.yml](https://github.com/ruby-grape/grape/blob/master/.travis.yml).
|
34
|
-
|
35
|
-
```yaml
|
36
|
-
matrix:
|
37
|
-
include:
|
38
|
-
- rvm: 2.3.1
|
39
|
-
script:
|
40
|
-
- bundle exec danger
|
41
|
-
```
|
42
|
-
|
43
|
-
#### Commit via a Pull Request
|
37
|
+
### Commit via a Pull Request
|
44
38
|
|
45
39
|
To test things out, make a dummy entry in `CHANGELOG.md` that doesn't match the standard format and make a pull request. Iterate until green.
|
46
40
|
|
data/RELEASING.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Releasing
|
2
2
|
|
3
|
-
There
|
3
|
+
There are no particular rules about when to release ruby-grape-danger. Release bug fixes frequently, features not so frequently and breaking API changes rarely.
|
4
4
|
|
5
5
|
### Release
|
6
6
|
|
@@ -11,7 +11,7 @@ bundle install
|
|
11
11
|
rake
|
12
12
|
```
|
13
13
|
|
14
|
-
Check that the last build succeeded in
|
14
|
+
Check that the last build succeeded in for all supported platforms.
|
15
15
|
|
16
16
|
Increment the version, modify [lib/ruby-grape-danger/version.rb](lib/ruby-grape-danger/version.rb).
|
17
17
|
|
data/Rakefile
CHANGED
data/ruby-grape-danger.gemspec
CHANGED
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
|
18
18
|
s.add_development_dependency 'rake'
|
19
19
|
s.add_development_dependency 'rspec'
|
20
|
-
s.add_runtime_dependency 'danger', '~>
|
21
|
-
s.add_runtime_dependency 'danger-changelog', '~> 0.
|
20
|
+
s.add_runtime_dependency 'danger', '~> 9'
|
21
|
+
s.add_runtime_dependency 'danger-changelog', '~> 0.7'
|
22
|
+
s.add_runtime_dependency 'danger-toc', '~> 0.2'
|
22
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-grape-danger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dblock
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -44,28 +44,42 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '9'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '9'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: danger-changelog
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: '0.7'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: '0.7'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: danger-toc
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.2'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.2'
|
69
83
|
description: Packages a Dangerfile to be used with Danger for projects within the
|
70
84
|
Ruby Grape community.
|
71
85
|
email:
|
@@ -74,11 +88,11 @@ executables: []
|
|
74
88
|
extensions: []
|
75
89
|
extra_rdoc_files: []
|
76
90
|
files:
|
91
|
+
- ".github/workflows/danger.yml"
|
77
92
|
- ".gitignore"
|
78
93
|
- ".rspec"
|
79
94
|
- ".rubocop.yml"
|
80
95
|
- ".rubocop_todo.yml"
|
81
|
-
- ".travis.yml"
|
82
96
|
- CHANGELOG.md
|
83
97
|
- CONTRIBUTING.md
|
84
98
|
- Dangerfile
|
@@ -94,7 +108,7 @@ files:
|
|
94
108
|
homepage: https://github.com/ruby-grape/danger
|
95
109
|
licenses: []
|
96
110
|
metadata: {}
|
97
|
-
post_install_message:
|
111
|
+
post_install_message:
|
98
112
|
rdoc_options: []
|
99
113
|
require_paths:
|
100
114
|
- lib
|
@@ -109,9 +123,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
123
|
- !ruby/object:Gem::Version
|
110
124
|
version: '0'
|
111
125
|
requirements: []
|
112
|
-
|
113
|
-
|
114
|
-
signing_key:
|
126
|
+
rubygems_version: 3.5.3
|
127
|
+
signing_key:
|
115
128
|
specification_version: 4
|
116
129
|
summary: Danger.systems conventions for ruby-grape projects.
|
117
130
|
test_files:
|