danger-chikuwa 0.0.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 +7 -0
- data/.gitignore +5 -0
- data/.rubocop.yml +148 -0
- data/.travis.yml +11 -0
- data/Gemfile +6 -0
- data/Guardfile +21 -0
- data/LICENSE.txt +22 -0
- data/README.md +20 -0
- data/Rakefile +25 -0
- data/danger-chikuwa.gemspec +50 -0
- data/lib/chikuwa/gem_version.rb +5 -0
- data/lib/chikuwa/plugin.rb +95 -0
- data/lib/danger_chikuwa.rb +3 -0
- data/lib/danger_plugin.rb +3 -0
- data/spec/chikuwa_spec.rb +33 -0
- data/spec/fixtures/build.log +55 -0
- data/spec/spec_helper.rb +67 -0
- metadata +202 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 7466ad1a548b5e8348d211ca9fc4e37c53ff5db463be55e5b7e9b7ec8344e7f0
|
|
4
|
+
data.tar.gz: 800ed80939ee1392485934d460e8efc60ed755500877dbbe84aad12218762d32
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 7835aff57135f448a0b50acdf97ecbf8e38f8d60ec0e8a298bf8745bf2968591a87b9a9fdf8be17fb728ccca7bdfbd215235dd2bde6dc58c54b8b3adefc07ea9
|
|
7
|
+
data.tar.gz: dfb28907e00f2133ab855aa48b89737b9ad028b40408aabb81b92bc551843ac7835a46007f47096b0be7e883a428ccaaee0fb1584778e684d2ded05ecb256960
|
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Defaults can be found here: https://github.com/bbatsov/rubocop/blob/master/config/default.yml
|
|
2
|
+
|
|
3
|
+
# If you don't like these settings, just delete this file :)
|
|
4
|
+
|
|
5
|
+
AllCops:
|
|
6
|
+
TargetRubyVersion: 2.6
|
|
7
|
+
|
|
8
|
+
Style/StringLiterals:
|
|
9
|
+
EnforcedStyle: double_quotes
|
|
10
|
+
Enabled: true
|
|
11
|
+
|
|
12
|
+
# kind_of? is a good way to check a type
|
|
13
|
+
Style/ClassCheck:
|
|
14
|
+
EnforcedStyle: kind_of?
|
|
15
|
+
|
|
16
|
+
# specs sometimes have useless assignments, which is fine
|
|
17
|
+
Lint/UselessAssignment:
|
|
18
|
+
Exclude:
|
|
19
|
+
- '**/spec/**/*'
|
|
20
|
+
|
|
21
|
+
# We could potentially enable the 2 below:
|
|
22
|
+
Layout/FirstHashElementIndentation:
|
|
23
|
+
Enabled: false
|
|
24
|
+
|
|
25
|
+
Layout/HashAlignment:
|
|
26
|
+
Enabled: false
|
|
27
|
+
|
|
28
|
+
# HoundCI doesn't like this rule
|
|
29
|
+
Layout/DotPosition:
|
|
30
|
+
Enabled: false
|
|
31
|
+
|
|
32
|
+
# We allow !! as it's an easy way to convert ot boolean
|
|
33
|
+
Style/DoubleNegation:
|
|
34
|
+
Enabled: false
|
|
35
|
+
|
|
36
|
+
# Cop supports --auto-correct.
|
|
37
|
+
Lint/UnusedBlockArgument:
|
|
38
|
+
Enabled: false
|
|
39
|
+
|
|
40
|
+
# We want to allow class Fastlane::Class
|
|
41
|
+
Style/ClassAndModuleChildren:
|
|
42
|
+
Enabled: false
|
|
43
|
+
|
|
44
|
+
Metrics/AbcSize:
|
|
45
|
+
Max: 60
|
|
46
|
+
|
|
47
|
+
# The %w might be confusing for new users
|
|
48
|
+
Style/WordArray:
|
|
49
|
+
MinSize: 19
|
|
50
|
+
|
|
51
|
+
# raise and fail are both okay
|
|
52
|
+
Style/SignalException:
|
|
53
|
+
Enabled: false
|
|
54
|
+
|
|
55
|
+
# Better too much 'return' than one missing
|
|
56
|
+
Style/RedundantReturn:
|
|
57
|
+
Enabled: false
|
|
58
|
+
|
|
59
|
+
# Having if in the same line might not always be good
|
|
60
|
+
Style/IfUnlessModifier:
|
|
61
|
+
Enabled: false
|
|
62
|
+
|
|
63
|
+
# and and or is okay
|
|
64
|
+
Style/AndOr:
|
|
65
|
+
Enabled: false
|
|
66
|
+
|
|
67
|
+
# Configuration parameters: CountComments.
|
|
68
|
+
Metrics/ClassLength:
|
|
69
|
+
Max: 350
|
|
70
|
+
|
|
71
|
+
Metrics/CyclomaticComplexity:
|
|
72
|
+
Max: 17
|
|
73
|
+
|
|
74
|
+
# Configuration parameters: AllowURI, URISchemes.
|
|
75
|
+
Layout/LineLength:
|
|
76
|
+
Max: 370
|
|
77
|
+
|
|
78
|
+
# Configuration parameters: CountKeywordArgs.
|
|
79
|
+
Metrics/ParameterLists:
|
|
80
|
+
Max: 10
|
|
81
|
+
|
|
82
|
+
Metrics/PerceivedComplexity:
|
|
83
|
+
Max: 18
|
|
84
|
+
|
|
85
|
+
# Sometimes it's easier to read without guards
|
|
86
|
+
Style/GuardClause:
|
|
87
|
+
Enabled: false
|
|
88
|
+
|
|
89
|
+
# something = if something_else
|
|
90
|
+
# that's confusing
|
|
91
|
+
Style/ConditionalAssignment:
|
|
92
|
+
Enabled: false
|
|
93
|
+
|
|
94
|
+
# Better to have too much self than missing a self
|
|
95
|
+
Style/RedundantSelf:
|
|
96
|
+
Enabled: false
|
|
97
|
+
|
|
98
|
+
Metrics/MethodLength:
|
|
99
|
+
Max: 60
|
|
100
|
+
|
|
101
|
+
# We're not there yet
|
|
102
|
+
Style/Documentation:
|
|
103
|
+
Enabled: false
|
|
104
|
+
|
|
105
|
+
# Adds complexity
|
|
106
|
+
Style/IfInsideElse:
|
|
107
|
+
Enabled: false
|
|
108
|
+
|
|
109
|
+
# danger specific
|
|
110
|
+
|
|
111
|
+
Style/BlockComments:
|
|
112
|
+
Enabled: false
|
|
113
|
+
|
|
114
|
+
Layout/MultilineMethodCallIndentation:
|
|
115
|
+
EnforcedStyle: indented
|
|
116
|
+
|
|
117
|
+
# FIXME: 25
|
|
118
|
+
Metrics/BlockLength:
|
|
119
|
+
Max: 345
|
|
120
|
+
Exclude:
|
|
121
|
+
- "**/*_spec.rb"
|
|
122
|
+
|
|
123
|
+
Style/MixinGrouping:
|
|
124
|
+
Enabled: false
|
|
125
|
+
|
|
126
|
+
Naming/FileName:
|
|
127
|
+
Enabled: false
|
|
128
|
+
|
|
129
|
+
Layout/HeredocIndentation:
|
|
130
|
+
Enabled: false
|
|
131
|
+
|
|
132
|
+
Style/SpecialGlobalVars:
|
|
133
|
+
Enabled: false
|
|
134
|
+
|
|
135
|
+
Style/PercentLiteralDelimiters:
|
|
136
|
+
PreferredDelimiters:
|
|
137
|
+
"%": ()
|
|
138
|
+
"%i": ()
|
|
139
|
+
"%q": ()
|
|
140
|
+
"%Q": ()
|
|
141
|
+
"%r": "{}"
|
|
142
|
+
"%s": ()
|
|
143
|
+
"%w": ()
|
|
144
|
+
"%W": ()
|
|
145
|
+
"%x": ()
|
|
146
|
+
|
|
147
|
+
Security/YAMLLoad:
|
|
148
|
+
Enabled: false
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Guardfile
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# A guardfile for making Danger Plugins
|
|
4
|
+
# For more info see https://github.com/guard/guard#readme
|
|
5
|
+
|
|
6
|
+
# To run, use `bundle exec guard`.
|
|
7
|
+
|
|
8
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
|
9
|
+
require "guard/rspec/dsl"
|
|
10
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
|
11
|
+
|
|
12
|
+
# RSpec files
|
|
13
|
+
rspec = dsl.rspec
|
|
14
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
|
15
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
|
16
|
+
watch(rspec.spec_files)
|
|
17
|
+
|
|
18
|
+
# Ruby files
|
|
19
|
+
ruby = dsl.ruby
|
|
20
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
|
21
|
+
end
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2022 watanavex <y_watanabe@yumemi.co.jp>
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# danger-chikuwa
|
|
2
|
+
|
|
3
|
+
A description of danger-chikuwa.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
$ gem install danger-chikuwa
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
Methods and attributes from this plugin are available in
|
|
12
|
+
your `Dangerfile` under the `chikuwa` namespace.
|
|
13
|
+
|
|
14
|
+
## Development
|
|
15
|
+
|
|
16
|
+
1. Clone this repo
|
|
17
|
+
2. Run `bundle install` to setup dependencies.
|
|
18
|
+
3. Run `bundle exec rake spec` to run the tests.
|
|
19
|
+
4. Use `bundle exec guard` to automatically have tests run as you make changes.
|
|
20
|
+
5. Make your changes.
|
data/Rakefile
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "bundler/gem_tasks"
|
|
4
|
+
require "rspec/core/rake_task"
|
|
5
|
+
require "rubocop/rake_task"
|
|
6
|
+
|
|
7
|
+
RSpec::Core::RakeTask.new(:specs)
|
|
8
|
+
|
|
9
|
+
task default: :specs
|
|
10
|
+
|
|
11
|
+
task :spec do
|
|
12
|
+
Rake::Task["specs"].invoke
|
|
13
|
+
Rake::Task["rubocop"].invoke
|
|
14
|
+
# Rake::Task["spec_docs"].invoke
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
desc "Run RuboCop on the lib/specs directory"
|
|
18
|
+
RuboCop::RakeTask.new(:rubocop) do |task|
|
|
19
|
+
task.patterns = ["lib/**/*.rb", "spec/**/*.rb"]
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
desc "Ensure that the plugin passes `danger plugins lint`"
|
|
23
|
+
task :spec_docs do
|
|
24
|
+
sh "bundle exec danger plugins lint"
|
|
25
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
lib = File.expand_path("lib", __dir__)
|
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
|
+
require "chikuwa/gem_version"
|
|
6
|
+
|
|
7
|
+
Gem::Specification.new do |spec|
|
|
8
|
+
spec.name = "danger-chikuwa"
|
|
9
|
+
spec.version = Chikuwa::VERSION
|
|
10
|
+
spec.authors = ["watanavex"]
|
|
11
|
+
spec.email = ["watanave.tech@gmail.com"]
|
|
12
|
+
spec.description = "A short description of danger-chikuwa."
|
|
13
|
+
spec.summary = "A longer description of danger-chikuwa."
|
|
14
|
+
spec.homepage = "https://github.com/watanavex/danger-chikuwa"
|
|
15
|
+
spec.license = "MIT"
|
|
16
|
+
|
|
17
|
+
spec.files = `git ls-files`.split($/)
|
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
20
|
+
spec.require_paths = ["lib"]
|
|
21
|
+
|
|
22
|
+
spec.add_runtime_dependency "danger-plugin-api", "~> 1.0"
|
|
23
|
+
|
|
24
|
+
# General ruby development
|
|
25
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
|
26
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
|
27
|
+
|
|
28
|
+
# Testing support
|
|
29
|
+
spec.add_development_dependency "rspec", "~> 3.4"
|
|
30
|
+
|
|
31
|
+
# Linting code and docs
|
|
32
|
+
spec.add_development_dependency "rubocop"
|
|
33
|
+
spec.add_development_dependency "yard"
|
|
34
|
+
|
|
35
|
+
# Makes testing easy via `bundle exec guard`
|
|
36
|
+
spec.add_development_dependency "guard", "~> 2.14"
|
|
37
|
+
spec.add_development_dependency "guard-rspec", "~> 4.7"
|
|
38
|
+
|
|
39
|
+
# If you want to work on older builds of ruby
|
|
40
|
+
spec.add_development_dependency "listen", "3.0.7"
|
|
41
|
+
|
|
42
|
+
# This gives you the chance to run a REPL inside your tests
|
|
43
|
+
# via:
|
|
44
|
+
#
|
|
45
|
+
# require 'pry'
|
|
46
|
+
# binding.pry
|
|
47
|
+
#
|
|
48
|
+
# This will stop test execution and let you inspect the results
|
|
49
|
+
spec.add_development_dependency "pry"
|
|
50
|
+
end
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Danger
|
|
4
|
+
class DangerChikuwa < Plugin
|
|
5
|
+
attr_accessor :project_root, :inline_mode
|
|
6
|
+
|
|
7
|
+
def _project_root
|
|
8
|
+
root = @project_root || Dir.pwd
|
|
9
|
+
root += "/" unless root.end_with? "/"
|
|
10
|
+
root
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def _inline_mode
|
|
14
|
+
@inline_mode || false
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def report(file_path)
|
|
18
|
+
if File.exist?(file_path)
|
|
19
|
+
results = parse_build_log(file_path)
|
|
20
|
+
send_reports(results)
|
|
21
|
+
else
|
|
22
|
+
fail "build log file not found"
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
private
|
|
27
|
+
|
|
28
|
+
module Type
|
|
29
|
+
WARN = "w"
|
|
30
|
+
ERROR = "e"
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
class ReportData
|
|
34
|
+
attr_accessor :message, :type, :file, :line
|
|
35
|
+
|
|
36
|
+
def initialize(message, type, file, line)
|
|
37
|
+
self.message = message
|
|
38
|
+
self.type = type
|
|
39
|
+
self.file = file
|
|
40
|
+
self.line = line
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def parse_build_log(file_path)
|
|
45
|
+
report_data = []
|
|
46
|
+
File.foreach(file_path) do |line|
|
|
47
|
+
logs = line.split(":")
|
|
48
|
+
if logs.length < 4
|
|
49
|
+
next
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
case logs[0]
|
|
53
|
+
when "w"
|
|
54
|
+
type = Type::WARN
|
|
55
|
+
when "e"
|
|
56
|
+
type = Type::ERROR
|
|
57
|
+
else
|
|
58
|
+
next
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
file = Pathname(logs[1].strip).relative_path_from(_project_root).to_s
|
|
62
|
+
line_num = /(\d+)/.match(logs[2].strip).to_a[0].to_i
|
|
63
|
+
logs.shift(3)
|
|
64
|
+
message = logs.join(":").strip!
|
|
65
|
+
|
|
66
|
+
report_data.push(ReportData.new(message, type, file, line_num))
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
return report_data
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def send_reports(results)
|
|
73
|
+
results.each do |data|
|
|
74
|
+
send(data)
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def send(data)
|
|
79
|
+
case data.type
|
|
80
|
+
when Type::WARN
|
|
81
|
+
if _inline_mode
|
|
82
|
+
warn(data.message, file: data.file, line: data.line)
|
|
83
|
+
else
|
|
84
|
+
warn(data.message)
|
|
85
|
+
end
|
|
86
|
+
when Type::ERROR
|
|
87
|
+
if _inline_mode
|
|
88
|
+
failure(data.message, file: data.file, line: data.line)
|
|
89
|
+
else
|
|
90
|
+
failure(data.message)
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require File.expand_path("spec_helper", __dir__)
|
|
4
|
+
|
|
5
|
+
module Danger
|
|
6
|
+
describe Danger::DangerChikuwa do
|
|
7
|
+
it "should be a plugin" do
|
|
8
|
+
expect(Danger::DangerChikuwa.new(nil)).to be_a Danger::Plugin
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
#
|
|
12
|
+
# You should test your custom attributes and methods here
|
|
13
|
+
#
|
|
14
|
+
describe "with Dangerfile" do
|
|
15
|
+
before do
|
|
16
|
+
@dangerfile = testing_dangerfile
|
|
17
|
+
@my_plugin = @dangerfile.chikuwa
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
it "Errors on file not found" do
|
|
21
|
+
@my_plugin.report "no file"
|
|
22
|
+
expect(@dangerfile.status_report[:errors]).to eq(["build log file not found"])
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
it "Report" do
|
|
26
|
+
file_path = "#{File.dirname(__FILE__)}/fixtures/build.log"
|
|
27
|
+
@my_plugin.report file_path
|
|
28
|
+
expect(@dangerfile.status_report[:warnings]).to eq(["Parameter 'context' is never used, could be renamed to _"])
|
|
29
|
+
expect(@dangerfile.status_report[:errors]).to eq(["Unresolved reference: chikuwa"])
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
> Task :clean
|
|
2
|
+
> Task :app:clean
|
|
3
|
+
> Task :app:preBuild UP-TO-DATE
|
|
4
|
+
> Task :app:preDebugBuild UP-TO-DATE
|
|
5
|
+
> Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
|
|
6
|
+
> Task :app:compileDebugAidl NO-SOURCE
|
|
7
|
+
> Task :app:compileDebugRenderscript NO-SOURCE
|
|
8
|
+
> Task :app:dataBindingMergeDependencyArtifactsDebug
|
|
9
|
+
> Task :app:dataBindingMergeGenClassesDebug
|
|
10
|
+
> Task :app:generateDebugResValues
|
|
11
|
+
> Task :app:generateDebugResources
|
|
12
|
+
> Task :app:packageDebugResources
|
|
13
|
+
> Task :app:generateDebugBuildConfig
|
|
14
|
+
> Task :app:parseDebugLocalResources
|
|
15
|
+
> Task :app:createDebugCompatibleScreenManifests
|
|
16
|
+
> Task :app:extractDeepLinksDebug
|
|
17
|
+
> Task :app:checkDebugAarMetadata
|
|
18
|
+
> Task :app:processDebugMainManifest
|
|
19
|
+
> Task :app:processDebugManifest
|
|
20
|
+
> Task :app:javaPreCompileDebug
|
|
21
|
+
> Task :app:mergeDebugShaders
|
|
22
|
+
> Task :app:compileDebugShaders NO-SOURCE
|
|
23
|
+
> Task :app:generateDebugAssets UP-TO-DATE
|
|
24
|
+
> Task :app:mergeDebugAssets
|
|
25
|
+
> Task :app:compressDebugAssets
|
|
26
|
+
> Task :app:processDebugJavaRes NO-SOURCE
|
|
27
|
+
> Task :app:checkDebugDuplicateClasses
|
|
28
|
+
> Task :app:desugarDebugFileDependencies
|
|
29
|
+
> Task :app:mergeDebugJniLibFolders
|
|
30
|
+
> Task :app:mergeDebugNativeLibs NO-SOURCE
|
|
31
|
+
> Task :app:stripDebugDebugSymbols NO-SOURCE
|
|
32
|
+
> Task :app:validateSigningDebug
|
|
33
|
+
> Task :app:mergeLibDexDebug
|
|
34
|
+
> Task :app:mergeDebugResources
|
|
35
|
+
> Task :app:writeDebugAppMetadata
|
|
36
|
+
> Task :app:dataBindingGenBaseClassesDebug
|
|
37
|
+
> Task :app:writeDebugSigningConfigVersions
|
|
38
|
+
> Task :app:processDebugManifestForPackage
|
|
39
|
+
> Task :app:processDebugResources
|
|
40
|
+
> Task :app:mergeExtDexDebug
|
|
41
|
+
|
|
42
|
+
> Task :app:compileDebugKotlin
|
|
43
|
+
w: /private/tmp/chikuwa/app/src/main/java/tech/watanave/sample/chikuwa/MainActivity.kt: (23, 46): Parameter 'context' is never used, could be renamed to _
|
|
44
|
+
e: /private/tmp/chikuwa/app/src/main/java/tech/watanave/sample/chikuwa/MainActivity.kt: (40, 14): Unresolved reference: chikuwa
|
|
45
|
+
|
|
46
|
+
> Task :app:compileDebugJavaWithJavac
|
|
47
|
+
> Task :app:dexBuilderDebug
|
|
48
|
+
> Task :app:mergeProjectDexDebug
|
|
49
|
+
> Task :app:mergeDebugJavaResource
|
|
50
|
+
> Task :app:packageDebug
|
|
51
|
+
> Task :app:createDebugApkListingFileRedirect
|
|
52
|
+
> Task :app:assembleDebug
|
|
53
|
+
|
|
54
|
+
BUILD SUCCESSFUL in 2s
|
|
55
|
+
36 actionable tasks: 36 executed
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "pathname"
|
|
4
|
+
ROOT = Pathname.new(File.expand_path("..", __dir__))
|
|
5
|
+
$:.unshift("#{ROOT}lib".to_s)
|
|
6
|
+
$:.unshift("#{ROOT}spec".to_s)
|
|
7
|
+
|
|
8
|
+
require "bundler/setup"
|
|
9
|
+
require "pry"
|
|
10
|
+
|
|
11
|
+
require "rspec"
|
|
12
|
+
require "danger"
|
|
13
|
+
|
|
14
|
+
# if `git remote -v` == ""
|
|
15
|
+
# puts "You cannot run tests without setting a local git remote on this repo"
|
|
16
|
+
# puts "It's a weird side-effect of Danger's internals."
|
|
17
|
+
# exit(0)
|
|
18
|
+
# end
|
|
19
|
+
|
|
20
|
+
# Use coloured output, it's the best.
|
|
21
|
+
RSpec.configure do |config|
|
|
22
|
+
config.filter_gems_from_backtrace "bundler"
|
|
23
|
+
config.color = true
|
|
24
|
+
config.tty = true
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
require "danger_plugin"
|
|
28
|
+
|
|
29
|
+
# These functions are a subset of https://github.com/danger/danger/blob/master/spec/spec_helper.rb
|
|
30
|
+
# If you are expanding these files, see if it's already been done ^.
|
|
31
|
+
|
|
32
|
+
# A silent version of the user interface,
|
|
33
|
+
# it comes with an extra function `.string` which will
|
|
34
|
+
# strip all ANSI colours from the string.
|
|
35
|
+
|
|
36
|
+
# rubocop:disable Lint/NestedMethodDefinition
|
|
37
|
+
def testing_ui
|
|
38
|
+
@output = StringIO.new
|
|
39
|
+
def @output.winsize
|
|
40
|
+
[20, 9999]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
cork = Cork::Board.new(out: @output)
|
|
44
|
+
def cork.string
|
|
45
|
+
out.string.gsub(/\e\[([;\d]+)?m/, "")
|
|
46
|
+
end
|
|
47
|
+
cork
|
|
48
|
+
end
|
|
49
|
+
# rubocop:enable Lint/NestedMethodDefinition
|
|
50
|
+
|
|
51
|
+
# Example environment (ENV) that would come from
|
|
52
|
+
# running a PR on TravisCI
|
|
53
|
+
def testing_env
|
|
54
|
+
{
|
|
55
|
+
"HAS_JOSH_K_SEAL_OF_APPROVAL" => "true",
|
|
56
|
+
"TRAVIS_PULL_REQUEST" => "800",
|
|
57
|
+
"TRAVIS_REPO_SLUG" => "artsy/eigen",
|
|
58
|
+
"TRAVIS_COMMIT_RANGE" => "759adcbd0d8f...13c4dc8bb61d",
|
|
59
|
+
"DANGER_GITHUB_API_TOKEN" => "123sbdq54erfsd3422gdfio"
|
|
60
|
+
}
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# A stubbed out Dangerfile for use in tests
|
|
64
|
+
def testing_dangerfile
|
|
65
|
+
env = Danger::EnvironmentManager.new(testing_env)
|
|
66
|
+
Danger::Dangerfile.new(env, testing_ui)
|
|
67
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: danger-chikuwa
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- watanavex
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2022-06-11 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: danger-plugin-api
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '1.0'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '1.0'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: bundler
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '2.0'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '2.0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rake
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '10.0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '10.0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: rspec
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '3.4'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '3.4'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: rubocop
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - ">="
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '0'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - ">="
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: yard
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - ">="
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '0'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - ">="
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '0'
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: guard
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - "~>"
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '2.14'
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - "~>"
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '2.14'
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: guard-rspec
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
114
|
+
requirements:
|
|
115
|
+
- - "~>"
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: '4.7'
|
|
118
|
+
type: :development
|
|
119
|
+
prerelease: false
|
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
+
requirements:
|
|
122
|
+
- - "~>"
|
|
123
|
+
- !ruby/object:Gem::Version
|
|
124
|
+
version: '4.7'
|
|
125
|
+
- !ruby/object:Gem::Dependency
|
|
126
|
+
name: listen
|
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
|
128
|
+
requirements:
|
|
129
|
+
- - '='
|
|
130
|
+
- !ruby/object:Gem::Version
|
|
131
|
+
version: 3.0.7
|
|
132
|
+
type: :development
|
|
133
|
+
prerelease: false
|
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
+
requirements:
|
|
136
|
+
- - '='
|
|
137
|
+
- !ruby/object:Gem::Version
|
|
138
|
+
version: 3.0.7
|
|
139
|
+
- !ruby/object:Gem::Dependency
|
|
140
|
+
name: pry
|
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
|
142
|
+
requirements:
|
|
143
|
+
- - ">="
|
|
144
|
+
- !ruby/object:Gem::Version
|
|
145
|
+
version: '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'
|
|
153
|
+
description: A short description of danger-chikuwa.
|
|
154
|
+
email:
|
|
155
|
+
- watanave.tech@gmail.com
|
|
156
|
+
executables: []
|
|
157
|
+
extensions: []
|
|
158
|
+
extra_rdoc_files: []
|
|
159
|
+
files:
|
|
160
|
+
- ".gitignore"
|
|
161
|
+
- ".rubocop.yml"
|
|
162
|
+
- ".travis.yml"
|
|
163
|
+
- Gemfile
|
|
164
|
+
- Guardfile
|
|
165
|
+
- LICENSE.txt
|
|
166
|
+
- README.md
|
|
167
|
+
- Rakefile
|
|
168
|
+
- danger-chikuwa.gemspec
|
|
169
|
+
- lib/chikuwa/gem_version.rb
|
|
170
|
+
- lib/chikuwa/plugin.rb
|
|
171
|
+
- lib/danger_chikuwa.rb
|
|
172
|
+
- lib/danger_plugin.rb
|
|
173
|
+
- spec/chikuwa_spec.rb
|
|
174
|
+
- spec/fixtures/build.log
|
|
175
|
+
- spec/spec_helper.rb
|
|
176
|
+
homepage: https://github.com/watanavex/danger-chikuwa
|
|
177
|
+
licenses:
|
|
178
|
+
- MIT
|
|
179
|
+
metadata: {}
|
|
180
|
+
post_install_message:
|
|
181
|
+
rdoc_options: []
|
|
182
|
+
require_paths:
|
|
183
|
+
- lib
|
|
184
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
185
|
+
requirements:
|
|
186
|
+
- - ">="
|
|
187
|
+
- !ruby/object:Gem::Version
|
|
188
|
+
version: '0'
|
|
189
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
|
+
requirements:
|
|
191
|
+
- - ">="
|
|
192
|
+
- !ruby/object:Gem::Version
|
|
193
|
+
version: '0'
|
|
194
|
+
requirements: []
|
|
195
|
+
rubygems_version: 3.1.6
|
|
196
|
+
signing_key:
|
|
197
|
+
specification_version: 4
|
|
198
|
+
summary: A longer description of danger-chikuwa.
|
|
199
|
+
test_files:
|
|
200
|
+
- spec/chikuwa_spec.rb
|
|
201
|
+
- spec/fixtures/build.log
|
|
202
|
+
- spec/spec_helper.rb
|