danger-textlint 1.2.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dependabot/config.yml +18 -0
- data/.devcontainer/Dockerfile +18 -0
- data/.devcontainer/devcontainer.json +35 -0
- data/.github/dependabot.yml +12 -0
- data/.github/release-drafter.yml +39 -0
- data/.github/workflows/ci.yml +29 -0
- data/.github/workflows/publish.yml +63 -0
- data/.rubocop.yml +5 -8
- data/Gemfile.lock +102 -70
- data/README.md +31 -1
- data/danger-textlint.gemspec +6 -3
- data/lib/textlint/gem_version.rb +1 -1
- data/lib/textlint/plugin.rb +2 -0
- data/spec/spec_helper.rb +3 -3
- data/spec/textlint_spec.rb +2 -2
- metadata +30 -11
- data/.travis.yml +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c78f465651253ec82a384886832cb3cfe1fc9ea298cb4b60c3ab9774af1bb57
|
4
|
+
data.tar.gz: bd5fdeded9422419c4478cc2de447edd3ce8f03a1110d0f1e7021fd57af8d9fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9b6fb5716b98459288cc9b61bbf90619f073f86dd68bc4d75e5deba4afb9a3981c8c5f1894bd48312d404d529a97644b9c70e1f356d2057463d827c8384b4e0
|
7
|
+
data.tar.gz: 4f762d3b363bc1dee2556fb3dc819a494e6a990baaa5bfb0eff80cee441316114b6ebc96a116ef1b6b8dc9deed50ce4e171a711f8d3290acff0d1b857d7902c8
|
@@ -0,0 +1,18 @@
|
|
1
|
+
version: 1
|
2
|
+
|
3
|
+
update_configs:
|
4
|
+
- package_manager: "ruby:bundler"
|
5
|
+
directory: "/"
|
6
|
+
update_schedule: "monthly"
|
7
|
+
|
8
|
+
allowed_updates:
|
9
|
+
- match:
|
10
|
+
update_type: "security"
|
11
|
+
automerged_updates:
|
12
|
+
- match:
|
13
|
+
dependency_type: "all"
|
14
|
+
update_type: "security:patch"
|
15
|
+
- match:
|
16
|
+
dependency_type: "development"
|
17
|
+
update_type: "semver:minor"
|
18
|
+
version_requirement_updates: "off"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.134.1/containers/ruby/.devcontainer/base.Dockerfile
|
2
|
+
ARG VARIANT="2"
|
3
|
+
FROM mcr.microsoft.com/vscode/devcontainers/ruby:0-${VARIANT}
|
4
|
+
|
5
|
+
# [Optional] Install a version of Node.js using nvm for front end dev
|
6
|
+
ARG INSTALL_NODE="true"
|
7
|
+
ARG NODE_VERSION="lts/*"
|
8
|
+
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
|
9
|
+
|
10
|
+
# [Optional] Uncomment this section to install additional OS packages.
|
11
|
+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
12
|
+
&& apt-get -y install --no-install-recommends git vim
|
13
|
+
|
14
|
+
# [Optional] Uncomment this line to install additional gems.
|
15
|
+
# RUN gem install <your-gem-names-here>
|
16
|
+
|
17
|
+
# [Optional] Uncomment this line to install global node packages.
|
18
|
+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
|
@@ -0,0 +1,35 @@
|
|
1
|
+
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
|
2
|
+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.134.1/containers/ruby
|
3
|
+
{
|
4
|
+
"name": "Ruby",
|
5
|
+
"build": {
|
6
|
+
"dockerfile": "Dockerfile",
|
7
|
+
"args": {
|
8
|
+
// Update 'VARIANT' to pick a Ruby version: 2, 2.7, 2.6, 2.5
|
9
|
+
"VARIANT": "2.7",
|
10
|
+
// Options
|
11
|
+
"INSTALL_NODE": "true",
|
12
|
+
"NODE_VERSION": "lts/*"
|
13
|
+
}
|
14
|
+
},
|
15
|
+
|
16
|
+
// Set *default* container specific settings.json values on container create.
|
17
|
+
"settings": {
|
18
|
+
"terminal.integrated.shell.linux": "/bin/bash"
|
19
|
+
},
|
20
|
+
|
21
|
+
// Add the IDs of extensions you want installed when the container is created.
|
22
|
+
"extensions": [
|
23
|
+
"rebornix.Ruby"
|
24
|
+
],
|
25
|
+
|
26
|
+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
27
|
+
// "forwardPorts": [],
|
28
|
+
|
29
|
+
// Use 'postCreateCommand' to run commands after the container is created.
|
30
|
+
// "postCreateCommand": "ruby --version",
|
31
|
+
|
32
|
+
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
|
33
|
+
"remoteUser": "vscode"
|
34
|
+
|
35
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
3
|
+
# Please see the documentation for all configuration options:
|
4
|
+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
5
|
+
|
6
|
+
version: 2
|
7
|
+
updates:
|
8
|
+
- package-ecosystem: "bundler" # See documentation for possible values
|
9
|
+
directory: "/" # Location of package manifests
|
10
|
+
schedule:
|
11
|
+
interval: "monthly"
|
12
|
+
timezone: "Asia/Tokyo"
|
@@ -0,0 +1,39 @@
|
|
1
|
+
name-template: 'v$RESOLVED_VERSION'
|
2
|
+
tag-template: 'v$RESOLVED_VERSION'
|
3
|
+
categories:
|
4
|
+
- title: 'BREAKING CHANGES'
|
5
|
+
labels:
|
6
|
+
- 'BREAKING CHANGES'
|
7
|
+
- title: 'Features'
|
8
|
+
labels:
|
9
|
+
- 'feature'
|
10
|
+
- 'enhancement'
|
11
|
+
- title: 'Fixes'
|
12
|
+
labels:
|
13
|
+
- 'bug'
|
14
|
+
- 'security'
|
15
|
+
- title: 'Dependencies'
|
16
|
+
label: 'dependencies'
|
17
|
+
- title: 'Documentation'
|
18
|
+
label: 'document'
|
19
|
+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
20
|
+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
|
21
|
+
version-resolver:
|
22
|
+
major:
|
23
|
+
labels:
|
24
|
+
- 'BREAKING CHANGES'
|
25
|
+
minor:
|
26
|
+
labels:
|
27
|
+
- 'feature'
|
28
|
+
- 'enhancement'
|
29
|
+
patch:
|
30
|
+
labels:
|
31
|
+
- 'bug'
|
32
|
+
- 'security'
|
33
|
+
default: patch
|
34
|
+
template: |
|
35
|
+
[Compare $PREVIOUS_TAG with v$RESOLVED_VERSION](https://github.com/Kesin11/danger-textlint/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION)
|
36
|
+
|
37
|
+
## Changes
|
38
|
+
|
39
|
+
$CHANGES
|
@@ -0,0 +1,29 @@
|
|
1
|
+
name: CI
|
2
|
+
on: [push]
|
3
|
+
|
4
|
+
jobs:
|
5
|
+
test:
|
6
|
+
name: Test
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
image: [ 'ruby:2.5', 'ruby:2.6', 'ruby:2.7' ]
|
11
|
+
container:
|
12
|
+
image: ${{ matrix.image }}
|
13
|
+
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v2
|
16
|
+
|
17
|
+
- name: Setup bundler
|
18
|
+
run: gem install bundler
|
19
|
+
|
20
|
+
- name: bundle install
|
21
|
+
run: bundle install --jobs=4 --retry=3 --path=./vendor
|
22
|
+
|
23
|
+
- name: Show versions
|
24
|
+
run: |
|
25
|
+
ruby --version
|
26
|
+
bundle --version
|
27
|
+
|
28
|
+
- name: test
|
29
|
+
run: bundle exec rake spec
|
@@ -0,0 +1,63 @@
|
|
1
|
+
name: Publish gems
|
2
|
+
|
3
|
+
on:
|
4
|
+
workflow_dispatch:
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
draft_release:
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
outputs:
|
10
|
+
tag_name: ${{ steps.release-drafter.outputs.tag_name }}
|
11
|
+
steps:
|
12
|
+
# Get next version
|
13
|
+
- uses: release-drafter/release-drafter@v5
|
14
|
+
id: release-drafter
|
15
|
+
env:
|
16
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
17
|
+
|
18
|
+
publish_release:
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
environment: prod
|
21
|
+
needs: draft_release
|
22
|
+
steps:
|
23
|
+
# Create version string from tag (v1.0.0 -> 1.0.0)
|
24
|
+
- name: Create version string
|
25
|
+
run: |
|
26
|
+
export TAG_NAME=${{ needs.draft_release.outputs.tag_name }}
|
27
|
+
echo "VERSION=${TAG_NAME:1}" >> $GITHUB_ENV
|
28
|
+
|
29
|
+
# Publish rubygems
|
30
|
+
- uses: actions/checkout@v2
|
31
|
+
- run: |
|
32
|
+
git config --global user.name "github-actions"
|
33
|
+
git config --global user.email "github-actions@github.com"
|
34
|
+
- name: Setup rubygems credentials
|
35
|
+
run: |
|
36
|
+
mkdir -p ~/.gem
|
37
|
+
cat << EOF > ~/.gem/credentials
|
38
|
+
---
|
39
|
+
:rubygems_api_key: ${RUBYGEMS_API_KEY}
|
40
|
+
EOF
|
41
|
+
|
42
|
+
chmod 0600 ~/.gem/credentials
|
43
|
+
env:
|
44
|
+
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
45
|
+
- uses: ruby/setup-ruby@v1
|
46
|
+
with:
|
47
|
+
ruby-version: 3
|
48
|
+
bundler-cache: true
|
49
|
+
- name: Release rubygems
|
50
|
+
run: |
|
51
|
+
bundle config unset --local deployment
|
52
|
+
bundle exec bump set $VERSION
|
53
|
+
bundle install
|
54
|
+
bundle exec rake release
|
55
|
+
env:
|
56
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
57
|
+
|
58
|
+
# Publish github releases
|
59
|
+
- uses: release-drafter/release-drafter@v5
|
60
|
+
with:
|
61
|
+
publish: true
|
62
|
+
env:
|
63
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
data/.rubocop.yml
CHANGED
@@ -3,7 +3,8 @@
|
|
3
3
|
# If you don't like these settings, just delete this file :)
|
4
4
|
|
5
5
|
AllCops:
|
6
|
-
TargetRubyVersion: 2.
|
6
|
+
TargetRubyVersion: 2.7
|
7
|
+
NewCops: disable
|
7
8
|
|
8
9
|
Style/StringLiterals:
|
9
10
|
EnforcedStyle: double_quotes
|
@@ -13,20 +14,16 @@ Style/StringLiterals:
|
|
13
14
|
Style/ClassCheck:
|
14
15
|
EnforcedStyle: kind_of?
|
15
16
|
|
16
|
-
# It's better to be more explicit about the type
|
17
|
-
Style/BracesAroundHashParameters:
|
18
|
-
Enabled: false
|
19
|
-
|
20
17
|
# specs sometimes have useless assignments, which is fine
|
21
18
|
Lint/UselessAssignment:
|
22
19
|
Exclude:
|
23
20
|
- '**/spec/**/*'
|
24
21
|
|
25
22
|
# We could potentially enable the 2 below:
|
26
|
-
Layout/
|
23
|
+
Layout/FirstHashElementIndentation:
|
27
24
|
Enabled: false
|
28
25
|
|
29
|
-
Layout/
|
26
|
+
Layout/HashAlignment:
|
30
27
|
Enabled: false
|
31
28
|
|
32
29
|
# HoundCI doesn't like this rule
|
@@ -130,7 +127,7 @@ Style/MixinGrouping:
|
|
130
127
|
Naming/FileName:
|
131
128
|
Enabled: false
|
132
129
|
|
133
|
-
Layout/
|
130
|
+
Layout/HeredocIndentation:
|
134
131
|
Enabled: false
|
135
132
|
|
136
133
|
Style/SpecialGlobalVars:
|
data/Gemfile.lock
CHANGED
@@ -1,53 +1,73 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
danger-textlint (
|
4
|
+
danger-textlint (2.0.2)
|
5
5
|
danger-plugin-api (~> 1.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
addressable (2.
|
11
|
-
public_suffix (>= 2.0.2, <
|
12
|
-
ast (2.4.
|
13
|
-
|
10
|
+
addressable (2.8.0)
|
11
|
+
public_suffix (>= 2.0.2, < 5.0)
|
12
|
+
ast (2.4.2)
|
13
|
+
bump (0.10.0)
|
14
|
+
claide (1.0.3)
|
14
15
|
claide-plugins (0.9.2)
|
15
16
|
cork
|
16
17
|
nap
|
17
18
|
open4 (~> 1.3)
|
18
|
-
coderay (1.1.
|
19
|
+
coderay (1.1.3)
|
19
20
|
colored2 (3.1.2)
|
20
21
|
cork (0.3.0)
|
21
22
|
colored2 (~> 3.1)
|
22
|
-
danger (
|
23
|
+
danger (8.3.1)
|
23
24
|
claide (~> 1.0)
|
24
25
|
claide-plugins (>= 0.9.2)
|
25
26
|
colored2 (~> 3.1)
|
26
27
|
cork (~> 0.1)
|
27
|
-
faraday (
|
28
|
-
faraday-http-cache (~>
|
29
|
-
git (~> 1)
|
30
|
-
kramdown (~>
|
28
|
+
faraday (>= 0.9.0, < 2.0)
|
29
|
+
faraday-http-cache (~> 2.0)
|
30
|
+
git (~> 1.7)
|
31
|
+
kramdown (~> 2.3)
|
32
|
+
kramdown-parser-gfm (~> 1.0)
|
31
33
|
no_proxy_fix
|
32
34
|
octokit (~> 4.7)
|
33
|
-
terminal-table (
|
35
|
+
terminal-table (>= 1, < 4)
|
34
36
|
danger-plugin-api (1.0.0)
|
35
37
|
danger (> 2.0)
|
36
|
-
diff-lcs (1.
|
37
|
-
faraday (
|
38
|
+
diff-lcs (1.4.4)
|
39
|
+
faraday (1.7.1)
|
40
|
+
faraday-em_http (~> 1.0)
|
41
|
+
faraday-em_synchrony (~> 1.0)
|
42
|
+
faraday-excon (~> 1.1)
|
43
|
+
faraday-httpclient (~> 1.0.1)
|
44
|
+
faraday-net_http (~> 1.0)
|
45
|
+
faraday-net_http_persistent (~> 1.1)
|
46
|
+
faraday-patron (~> 1.0)
|
47
|
+
faraday-rack (~> 1.0)
|
38
48
|
multipart-post (>= 1.2, < 3)
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
49
|
+
ruby2_keywords (>= 0.0.4)
|
50
|
+
faraday-em_http (1.0.0)
|
51
|
+
faraday-em_synchrony (1.0.0)
|
52
|
+
faraday-excon (1.1.0)
|
53
|
+
faraday-http-cache (2.2.0)
|
54
|
+
faraday (>= 0.8)
|
55
|
+
faraday-httpclient (1.0.1)
|
56
|
+
faraday-net_http (1.0.1)
|
57
|
+
faraday-net_http_persistent (1.2.0)
|
58
|
+
faraday-patron (1.0.0)
|
59
|
+
faraday-rack (1.0.0)
|
60
|
+
ffi (1.15.3)
|
61
|
+
formatador (0.3.0)
|
62
|
+
git (1.9.1)
|
63
|
+
rchardet (~> 1.8)
|
64
|
+
guard (2.18.0)
|
45
65
|
formatador (>= 0.2.4)
|
46
66
|
listen (>= 2.7, < 4.0)
|
47
67
|
lumberjack (>= 1.0.12, < 2.0)
|
48
68
|
nenv (~> 0.1)
|
49
69
|
notiffany (~> 0.0)
|
50
|
-
pry (>= 0.
|
70
|
+
pry (>= 0.13.0)
|
51
71
|
shellany (~> 0.0)
|
52
72
|
thor (>= 0.18.1)
|
53
73
|
guard-compat (1.2.1)
|
@@ -55,80 +75,92 @@ GEM
|
|
55
75
|
guard (~> 2.1)
|
56
76
|
guard-compat (~> 1.1)
|
57
77
|
rspec (>= 2.99.0, < 4.0)
|
58
|
-
kramdown (
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
78
|
+
kramdown (2.3.1)
|
79
|
+
rexml
|
80
|
+
kramdown-parser-gfm (1.1.0)
|
81
|
+
kramdown (~> 2.0)
|
82
|
+
listen (3.7.0)
|
83
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
84
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
85
|
+
lumberjack (1.2.8)
|
86
|
+
method_source (1.0.0)
|
87
|
+
multipart-post (2.1.1)
|
65
88
|
nap (1.1.0)
|
66
89
|
nenv (0.3.0)
|
67
90
|
no_proxy_fix (0.1.2)
|
68
|
-
notiffany (0.1.
|
91
|
+
notiffany (0.1.3)
|
69
92
|
nenv (~> 0.1)
|
70
93
|
shellany (~> 0.0)
|
71
|
-
octokit (4.
|
94
|
+
octokit (4.21.0)
|
95
|
+
faraday (>= 0.9)
|
72
96
|
sawyer (~> 0.8.0, >= 0.5.3)
|
73
97
|
open4 (1.3.4)
|
74
|
-
parallel (1.
|
75
|
-
parser (
|
76
|
-
ast (~> 2.
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
public_suffix (3.0.2)
|
98
|
+
parallel (1.20.1)
|
99
|
+
parser (3.0.2.0)
|
100
|
+
ast (~> 2.4.1)
|
101
|
+
pry (0.14.1)
|
102
|
+
coderay (~> 1.1)
|
103
|
+
method_source (~> 1.0)
|
104
|
+
public_suffix (4.0.6)
|
82
105
|
rainbow (3.0.0)
|
83
|
-
rake (
|
84
|
-
rb-fsevent (0.
|
85
|
-
rb-inotify (0.
|
86
|
-
ffi (
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
rspec-
|
93
|
-
|
106
|
+
rake (13.0.6)
|
107
|
+
rb-fsevent (0.11.0)
|
108
|
+
rb-inotify (0.10.1)
|
109
|
+
ffi (~> 1.0)
|
110
|
+
rchardet (1.8.0)
|
111
|
+
regexp_parser (2.1.1)
|
112
|
+
rexml (3.2.5)
|
113
|
+
rspec (3.10.0)
|
114
|
+
rspec-core (~> 3.10.0)
|
115
|
+
rspec-expectations (~> 3.10.0)
|
116
|
+
rspec-mocks (~> 3.10.0)
|
117
|
+
rspec-core (3.10.0)
|
118
|
+
rspec-support (~> 3.10.0)
|
119
|
+
rspec-expectations (3.10.0)
|
94
120
|
diff-lcs (>= 1.2.0, < 2.0)
|
95
|
-
rspec-support (~> 3.
|
96
|
-
rspec-mocks (3.
|
121
|
+
rspec-support (~> 3.10.0)
|
122
|
+
rspec-mocks (3.10.0)
|
97
123
|
diff-lcs (>= 1.2.0, < 2.0)
|
98
|
-
rspec-support (~> 3.
|
99
|
-
rspec-support (3.
|
100
|
-
rubocop (
|
124
|
+
rspec-support (~> 3.10.0)
|
125
|
+
rspec-support (3.10.0)
|
126
|
+
rubocop (1.20.0)
|
101
127
|
parallel (~> 1.10)
|
102
|
-
parser (>=
|
103
|
-
powerpack (~> 0.1)
|
128
|
+
parser (>= 3.0.0.0)
|
104
129
|
rainbow (>= 2.2.2, < 4.0)
|
130
|
+
regexp_parser (>= 1.8, < 3.0)
|
131
|
+
rexml
|
132
|
+
rubocop-ast (>= 1.9.1, < 2.0)
|
105
133
|
ruby-progressbar (~> 1.7)
|
106
|
-
unicode-display_width (
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
134
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
135
|
+
rubocop-ast (1.11.0)
|
136
|
+
parser (>= 3.0.1.1)
|
137
|
+
ruby-progressbar (1.11.0)
|
138
|
+
ruby2_keywords (0.0.5)
|
139
|
+
sawyer (0.8.2)
|
140
|
+
addressable (>= 2.3.5)
|
141
|
+
faraday (> 0.8, < 2.0)
|
111
142
|
shellany (0.0.1)
|
112
|
-
terminal-table (
|
113
|
-
unicode-display_width (
|
114
|
-
thor (
|
115
|
-
unicode-display_width (1.
|
116
|
-
yard (0.9.
|
143
|
+
terminal-table (3.0.1)
|
144
|
+
unicode-display_width (>= 1.1.1, < 3)
|
145
|
+
thor (1.1.0)
|
146
|
+
unicode-display_width (1.7.0)
|
147
|
+
yard (0.9.26)
|
117
148
|
|
118
149
|
PLATFORMS
|
119
150
|
ruby
|
120
151
|
|
121
152
|
DEPENDENCIES
|
122
|
-
|
153
|
+
bump (~> 0.10.0)
|
154
|
+
bundler (~> 2.0)
|
123
155
|
danger-textlint!
|
124
156
|
guard (~> 2.14)
|
125
157
|
guard-rspec (~> 4.7)
|
126
|
-
listen (= 3.0
|
158
|
+
listen (= 3.7.0)
|
127
159
|
pry
|
128
|
-
rake (~>
|
160
|
+
rake (~> 13.0)
|
129
161
|
rspec (~> 3.4)
|
130
162
|
rubocop
|
131
163
|
yard
|
132
164
|
|
133
165
|
BUNDLED WITH
|
134
|
-
1.
|
166
|
+
2.1.4
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# danger-textlint
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/danger-textlint.svg)](https://badge.fury.io/rb/danger-textlint)
|
3
|
-
[![
|
3
|
+
[![](https://github.com/Kesin11/danger-textlint/workflows/CI/badge.svg)](https://github.com/Kesin11/danger-textlint/actions)
|
4
4
|
|
5
5
|
|
6
6
|
[Danger](http://danger.systems/ruby/) plugin for [textlint](https://textlint.github.io/).
|
@@ -41,6 +41,36 @@ choice: nil or "warn"
|
|
41
41
|
|
42
42
|
`lint` - Execute textlint and send comment
|
43
43
|
|
44
|
+
## Usage(Github Actions)
|
45
|
+
Puts this code into your .github/workflows/
|
46
|
+
|
47
|
+
```yaml
|
48
|
+
name: "textlint"
|
49
|
+
on:
|
50
|
+
pull_request:
|
51
|
+
|
52
|
+
jobs:
|
53
|
+
textlint:
|
54
|
+
runs-on: ubuntu-latest
|
55
|
+
steps:
|
56
|
+
- uses: actions/checkout@v2
|
57
|
+
|
58
|
+
- name: Setup node version
|
59
|
+
uses: actions/setup-node@v2
|
60
|
+
with:
|
61
|
+
node-version: '14'
|
62
|
+
cache: 'npm'
|
63
|
+
- run: npm ci
|
64
|
+
|
65
|
+
- uses: ruby/setup-ruby@v1
|
66
|
+
with:
|
67
|
+
ruby-version: 3
|
68
|
+
bundler-cache: true
|
69
|
+
- run: bundle exec danger
|
70
|
+
env:
|
71
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
72
|
+
```
|
73
|
+
|
44
74
|
## Development
|
45
75
|
|
46
76
|
1. Clone this repo
|
data/danger-textlint.gemspec
CHANGED
@@ -21,8 +21,8 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_runtime_dependency 'danger-plugin-api', '~> 1.0'
|
22
22
|
|
23
23
|
# General ruby development
|
24
|
-
spec.add_development_dependency 'bundler', '~>
|
25
|
-
spec.add_development_dependency 'rake', '~>
|
24
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
25
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
26
26
|
|
27
27
|
# Testing support
|
28
28
|
spec.add_development_dependency 'rspec', '~> 3.4'
|
@@ -36,7 +36,10 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_development_dependency 'guard-rspec', '~> 4.7'
|
37
37
|
|
38
38
|
# If you want to work on older builds of ruby
|
39
|
-
spec.add_development_dependency 'listen', '3.0
|
39
|
+
spec.add_development_dependency 'listen', '3.7.0'
|
40
|
+
|
41
|
+
# Help gem version up when release new version
|
42
|
+
spec.add_development_dependency 'bump', '~> 0.10.0'
|
40
43
|
|
41
44
|
# This gives you the chance to run a REPL inside your tests
|
42
45
|
# via:
|
data/lib/textlint/gem_version.rb
CHANGED
data/lib/textlint/plugin.rb
CHANGED
@@ -41,6 +41,7 @@ module Danger
|
|
41
41
|
# @return [void]
|
42
42
|
def lint
|
43
43
|
return if target_files.empty?
|
44
|
+
|
44
45
|
bin = textlint_path
|
45
46
|
result_json = run_textlint(bin, target_files)
|
46
47
|
errors = parse(result_json)
|
@@ -58,6 +59,7 @@ module Danger
|
|
58
59
|
|
59
60
|
# File.exist?(local) ? local : find_executable("textlint")
|
60
61
|
raise "textlint not found in ./node_modules/.bin/textlint" unless File.exist?(local)
|
62
|
+
|
61
63
|
local
|
62
64
|
end
|
63
65
|
|
data/spec/spec_helper.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require "pathname"
|
2
|
-
ROOT = Pathname.new(File.expand_path("
|
3
|
-
$:.unshift(
|
4
|
-
$:.unshift(
|
2
|
+
ROOT = Pathname.new(File.expand_path("..", __dir__))
|
3
|
+
$:.unshift("#{ROOT}lib".to_s)
|
4
|
+
$:.unshift("#{ROOT}spec".to_s)
|
5
5
|
|
6
6
|
require "bundler/setup"
|
7
7
|
require "pry"
|
data/spec/textlint_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require File.expand_path("
|
1
|
+
require File.expand_path("spec_helper", __dir__)
|
2
2
|
|
3
3
|
module Danger
|
4
4
|
describe "with Dangerfile" do
|
@@ -15,7 +15,7 @@ module Danger
|
|
15
15
|
end
|
16
16
|
|
17
17
|
let(:fixture) do
|
18
|
-
fixture_path = File.expand_path("
|
18
|
+
fixture_path = File.expand_path("fixtures/textlint_result.json", __dir__)
|
19
19
|
File.read(fixture_path)
|
20
20
|
end
|
21
21
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-textlint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kesin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger-plugin-api
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '2.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '13.0'
|
48
48
|
type: :development
|
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: '13.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,14 +128,28 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - '='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 3.0
|
131
|
+
version: 3.7.0
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - '='
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 3.0
|
138
|
+
version: 3.7.0
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: bump
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.10.0
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.10.0
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: pry
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -157,9 +171,15 @@ executables: []
|
|
157
171
|
extensions: []
|
158
172
|
extra_rdoc_files: []
|
159
173
|
files:
|
174
|
+
- ".dependabot/config.yml"
|
175
|
+
- ".devcontainer/Dockerfile"
|
176
|
+
- ".devcontainer/devcontainer.json"
|
177
|
+
- ".github/dependabot.yml"
|
178
|
+
- ".github/release-drafter.yml"
|
179
|
+
- ".github/workflows/ci.yml"
|
180
|
+
- ".github/workflows/publish.yml"
|
160
181
|
- ".gitignore"
|
161
182
|
- ".rubocop.yml"
|
162
|
-
- ".travis.yml"
|
163
183
|
- Gemfile
|
164
184
|
- Gemfile.lock
|
165
185
|
- Guardfile
|
@@ -193,8 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
193
213
|
- !ruby/object:Gem::Version
|
194
214
|
version: '0'
|
195
215
|
requirements: []
|
196
|
-
|
197
|
-
rubygems_version: 2.7.5
|
216
|
+
rubygems_version: 3.2.22
|
198
217
|
signing_key:
|
199
218
|
specification_version: 4
|
200
219
|
summary: Danger plugin for textlint.
|