danger-android_permissions_checker 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 +7 -0
- data/.rubocop.yml +152 -0
- data/.travis.yml +12 -0
- data/Gemfile +4 -0
- data/Guardfile +19 -0
- data/LICENSE.txt +22 -0
- data/README.md +40 -0
- data/Rakefile +16 -0
- data/danger-android_permissions_checker.gemspec +30 -0
- data/lib/android_permissions_checker/gem_version.rb +3 -0
- data/lib/android_permissions_checker/plugin.rb +47 -0
- data/lib/danger_android_permissions_checker.rb +1 -0
- data/lib/danger_plugin.rb +1 -0
- data/spec/android_permissions_checker_spec.rb +88 -0
- data/spec/spec_helper.rb +65 -0
- metadata +131 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fdf24f242e47cdb8747df24c5bd11582e1d39fc796c9b69594dd8557f7422be0
|
4
|
+
data.tar.gz: c4613888afe9b9d5cd19cd01ad8f899473f79361f8c012f9cb27523e15bcbb75
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fd9a62832f25f7e35ecacd1540ffeceae187dc088f94856581cb890bcfee70f947073bcd8a6ce8a4220cee1b7d88d00ca912fd7cdcf3104eb0b54d3891478f69
|
7
|
+
data.tar.gz: 28fb881a56412ecebe8d938440f917a3cca6c03a3ca0ea42accce1cb74fad5b63d255b8fcd36bff633478018541c35c80b37d4bb766b09413117c9d49a884c35
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,152 @@
|
|
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.0
|
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
|
+
# It's better to be more explicit about the type
|
17
|
+
Style/BracesAroundHashParameters:
|
18
|
+
Enabled: false
|
19
|
+
|
20
|
+
# specs sometimes have useless assignments, which is fine
|
21
|
+
Lint/UselessAssignment:
|
22
|
+
Exclude:
|
23
|
+
- '**/spec/**/*'
|
24
|
+
|
25
|
+
# We could potentially enable the 2 below:
|
26
|
+
Layout/IndentHash:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
Layout/AlignHash:
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
# HoundCI doesn't like this rule
|
33
|
+
Layout/DotPosition:
|
34
|
+
Enabled: false
|
35
|
+
|
36
|
+
# We allow !! as it's an easy way to convert ot boolean
|
37
|
+
Style/DoubleNegation:
|
38
|
+
Enabled: false
|
39
|
+
|
40
|
+
# Cop supports --auto-correct.
|
41
|
+
Lint/UnusedBlockArgument:
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
# We want to allow class Fastlane::Class
|
45
|
+
Style/ClassAndModuleChildren:
|
46
|
+
Enabled: false
|
47
|
+
|
48
|
+
Metrics/AbcSize:
|
49
|
+
Max: 60
|
50
|
+
|
51
|
+
# The %w might be confusing for new users
|
52
|
+
Style/WordArray:
|
53
|
+
MinSize: 19
|
54
|
+
|
55
|
+
# raise and fail are both okay
|
56
|
+
Style/SignalException:
|
57
|
+
Enabled: false
|
58
|
+
|
59
|
+
# Better too much 'return' than one missing
|
60
|
+
Style/RedundantReturn:
|
61
|
+
Enabled: false
|
62
|
+
|
63
|
+
# Having if in the same line might not always be good
|
64
|
+
Style/IfUnlessModifier:
|
65
|
+
Enabled: false
|
66
|
+
|
67
|
+
# and and or is okay
|
68
|
+
Style/AndOr:
|
69
|
+
Enabled: false
|
70
|
+
|
71
|
+
# Configuration parameters: CountComments.
|
72
|
+
Metrics/ClassLength:
|
73
|
+
Max: 350
|
74
|
+
|
75
|
+
Metrics/CyclomaticComplexity:
|
76
|
+
Max: 17
|
77
|
+
|
78
|
+
# Configuration parameters: AllowURI, URISchemes.
|
79
|
+
Metrics/LineLength:
|
80
|
+
Max: 370
|
81
|
+
|
82
|
+
# Configuration parameters: CountKeywordArgs.
|
83
|
+
Metrics/ParameterLists:
|
84
|
+
Max: 10
|
85
|
+
|
86
|
+
Metrics/PerceivedComplexity:
|
87
|
+
Max: 18
|
88
|
+
|
89
|
+
# Sometimes it's easier to read without guards
|
90
|
+
Style/GuardClause:
|
91
|
+
Enabled: false
|
92
|
+
|
93
|
+
# something = if something_else
|
94
|
+
# that's confusing
|
95
|
+
Style/ConditionalAssignment:
|
96
|
+
Enabled: false
|
97
|
+
|
98
|
+
# Better to have too much self than missing a self
|
99
|
+
Style/RedundantSelf:
|
100
|
+
Enabled: false
|
101
|
+
|
102
|
+
Metrics/MethodLength:
|
103
|
+
Max: 60
|
104
|
+
|
105
|
+
# We're not there yet
|
106
|
+
Style/Documentation:
|
107
|
+
Enabled: false
|
108
|
+
|
109
|
+
# Adds complexity
|
110
|
+
Style/IfInsideElse:
|
111
|
+
Enabled: false
|
112
|
+
|
113
|
+
# danger specific
|
114
|
+
|
115
|
+
Style/BlockComments:
|
116
|
+
Enabled: false
|
117
|
+
|
118
|
+
Layout/MultilineMethodCallIndentation:
|
119
|
+
EnforcedStyle: indented
|
120
|
+
|
121
|
+
# FIXME: 25
|
122
|
+
Metrics/BlockLength:
|
123
|
+
Max: 345
|
124
|
+
Exclude:
|
125
|
+
- "**/*_spec.rb"
|
126
|
+
|
127
|
+
Style/MixinGrouping:
|
128
|
+
Enabled: false
|
129
|
+
|
130
|
+
Style/FileName:
|
131
|
+
Enabled: false
|
132
|
+
|
133
|
+
Layout/IndentHeredoc:
|
134
|
+
Enabled: false
|
135
|
+
|
136
|
+
Style/SpecialGlobalVars:
|
137
|
+
Enabled: false
|
138
|
+
|
139
|
+
PercentLiteralDelimiters:
|
140
|
+
PreferredDelimiters:
|
141
|
+
"%": ()
|
142
|
+
"%i": ()
|
143
|
+
"%q": ()
|
144
|
+
"%Q": ()
|
145
|
+
"%r": "{}"
|
146
|
+
"%s": ()
|
147
|
+
"%w": ()
|
148
|
+
"%W": ()
|
149
|
+
"%x": ()
|
150
|
+
|
151
|
+
Security/YAMLLoad:
|
152
|
+
Enabled: false
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# A guardfile for making Danger Plugins
|
2
|
+
# For more info see https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
# To run, use `bundle exec guard`.
|
5
|
+
|
6
|
+
guard :rspec, cmd: 'bundle exec rspec' do
|
7
|
+
require 'guard/rspec/dsl'
|
8
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
9
|
+
|
10
|
+
# RSpec files
|
11
|
+
rspec = dsl.rspec
|
12
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
13
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
14
|
+
watch(rspec.spec_files)
|
15
|
+
|
16
|
+
# Ruby files
|
17
|
+
ruby = dsl.ruby
|
18
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
19
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2018 Takuma Homma <nagomimatcha@gmail.com>
|
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,40 @@
|
|
1
|
+
# danger-android_permissions_checker
|
2
|
+
|
3
|
+
A [Danger](https://danger.systems/ruby) plugin to check diff of android apk permissions.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
$ gem install danger-android_permissions_checker
|
8
|
+
|
9
|
+
## How to check
|
10
|
+
|
11
|
+
Check permissions between current permissions and apk generated on CI service. if changed, show permissions which added or deleted.
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
Create permission list file of your apk using aapt, like this.
|
16
|
+
|
17
|
+
```bash
|
18
|
+
$ aapt d permissions /path/to/release_apk > permissions.txt
|
19
|
+
```
|
20
|
+
|
21
|
+
Add this to Dangerfile. Specify apk generated by CI service and permission list file generated by above command.
|
22
|
+
|
23
|
+
```
|
24
|
+
android_permissions_checker.check(
|
25
|
+
apk: '/path/to/generated_apk_by_CI',
|
26
|
+
permission_list_file: /path/to/generated_permission_list
|
27
|
+
)
|
28
|
+
```
|
29
|
+
|
30
|
+
## NOTE
|
31
|
+
|
32
|
+
This gem uses `aapt` command to parse permissions of generated apk, so you need to add /path/to/aapt (Android Build-tools) to $PATH on your CI service.
|
33
|
+
|
34
|
+
|
35
|
+
## Development
|
36
|
+
|
37
|
+
1. Clone this repo
|
38
|
+
2. Run `bundle install` to setup dependencies.
|
39
|
+
3. Run `bundle exec rake spec` to run the tests.
|
40
|
+
4. Make your changes.
|
data/Rakefile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
|
4
|
+
RSpec::Core::RakeTask.new(:specs)
|
5
|
+
|
6
|
+
task default: :specs
|
7
|
+
|
8
|
+
task :spec do
|
9
|
+
Rake::Task['specs'].invoke
|
10
|
+
Rake::Task['spec_docs'].invoke
|
11
|
+
end
|
12
|
+
|
13
|
+
desc 'Ensure that the plugin passes `danger plugins lint`'
|
14
|
+
task :spec_docs do
|
15
|
+
sh 'bundle exec danger plugins lint'
|
16
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'android_permissions_checker/gem_version.rb'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'danger-android_permissions_checker'
|
8
|
+
spec.version = AndroidPermissionsChecker::VERSION
|
9
|
+
spec.authors = ['mataku']
|
10
|
+
spec.email = ['sfprhythnn@gmail.com']
|
11
|
+
spec.description = %q{A Danger plugin to check diff of android apk permissions.}
|
12
|
+
spec.summary = %q{A Danger plugin to check diff of android apk permissions.}
|
13
|
+
spec.homepage = 'https://github.com/mataku/danger-android_permissions_checker'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_runtime_dependency 'danger-plugin-api', '~> 1.0'
|
22
|
+
|
23
|
+
# General ruby development
|
24
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
25
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
26
|
+
|
27
|
+
# Testing support
|
28
|
+
spec.add_development_dependency 'rspec', '~> 3.4'
|
29
|
+
spec.add_development_dependency 'pry'
|
30
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
|
3
|
+
module Danger
|
4
|
+
class DangerAndroidPermissionsChecker < Plugin
|
5
|
+
def check(apk: nil, permission_list_file: nil)
|
6
|
+
if apk.nil? || !File.exist?(apk)
|
7
|
+
raise "Can\'t find apk: #{apk}"
|
8
|
+
end
|
9
|
+
|
10
|
+
if permission_list_file.nil? || !File.exist?(permission_list_file)
|
11
|
+
raise "Can't find permission list file: #{permission_list_file}\n"
|
12
|
+
end
|
13
|
+
|
14
|
+
unless system 'which aapt > /dev/null 2>&1'
|
15
|
+
raise 'Can\'t find required command: aapt. Set PATH to Android Build-tools.'
|
16
|
+
end
|
17
|
+
|
18
|
+
generated_permissions = `aapt d permissions #{apk}`.split("\n")
|
19
|
+
current_permissions = File.open(permission_list_file).readlines.map(&:chomp)
|
20
|
+
|
21
|
+
deleted = current_permissions - generated_permissions
|
22
|
+
added = generated_permissions - current_permissions
|
23
|
+
message = ""
|
24
|
+
|
25
|
+
if deleted.length > 0
|
26
|
+
message += "### Deleted permissions\n"
|
27
|
+
deleted.each do |v|
|
28
|
+
message += "- #{v}\n"
|
29
|
+
end
|
30
|
+
message += "\n"
|
31
|
+
end
|
32
|
+
|
33
|
+
if added.length > 0
|
34
|
+
message += "### Added Permissions\n"
|
35
|
+
|
36
|
+
added.each do |v|
|
37
|
+
message += "- #{v}\n"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
unless message.empty?
|
42
|
+
markdown(message)
|
43
|
+
warn('APK permissions changed, see below.')
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require "android_permissions_checker/gem_version"
|
@@ -0,0 +1 @@
|
|
1
|
+
require "android_permissions_checker/plugin"
|
@@ -0,0 +1,88 @@
|
|
1
|
+
require File.expand_path("../spec_helper", __FILE__)
|
2
|
+
|
3
|
+
module Danger
|
4
|
+
describe Danger::DangerAndroidPermissionsChecker do
|
5
|
+
let(:dangerfile) { testing_dangerfile }
|
6
|
+
let(:plugin) { dangerfile.android_permissions_checker }
|
7
|
+
|
8
|
+
it "should be a plugin" do
|
9
|
+
expect(Danger::DangerAndroidPermissionsChecker.new(nil)).to be_a Danger::Plugin
|
10
|
+
end
|
11
|
+
|
12
|
+
describe "#check" do
|
13
|
+
|
14
|
+
let(:tmp_file) { '/tmp/permissions.txt' }
|
15
|
+
let(:current_permission_file) { 'permissions.txt' }
|
16
|
+
let(:apk) { '/tmp/app.apk' }
|
17
|
+
let(:aapt_command) { "aapt d permissions #{apk}" }
|
18
|
+
let(:generated_permissions) do
|
19
|
+
"package: com.mataku.scrobscrob.dev\nuses-permission: name='android.permission.INTERNET'\n"
|
20
|
+
end
|
21
|
+
|
22
|
+
let(:current_permission_list) do
|
23
|
+
[
|
24
|
+
"package: com.mataku.scrobscrob.dev\n",
|
25
|
+
"uses-permission: name='android.permission.INTERNET'\n"
|
26
|
+
]
|
27
|
+
end
|
28
|
+
|
29
|
+
before do
|
30
|
+
allow(current_permission_file).to receive(:nil?).and_return(false)
|
31
|
+
allow(apk).to receive(:nil?).and_return(false)
|
32
|
+
allow(File).to receive(:exist?).with(current_permission_file).and_return(true)
|
33
|
+
allow(File).to receive(:exist?).with(apk).and_return(true)
|
34
|
+
allow_any_instance_of(Kernel).to receive(:system).with('which aapt > /dev/null 2>&1').and_return(true)
|
35
|
+
allow_any_instance_of(Kernel).to receive(:`).with(aapt_command).and_return(generated_permissions)
|
36
|
+
allow(File).to receive_message_chain(:open, :readlines).with(current_permission_file).with(no_args).and_return(current_permission_list)
|
37
|
+
end
|
38
|
+
|
39
|
+
it do
|
40
|
+
plugin.check(apk: apk, permission_list_file: current_permission_file)
|
41
|
+
expect(dangerfile.status_report[:warnings].length).to eq(0)
|
42
|
+
end
|
43
|
+
|
44
|
+
context 'Permission added' do
|
45
|
+
let(:generated_permissions) do
|
46
|
+
"package: com.mataku.scrobscrob.dev\nuses-permission: name='android.permission.INTERNET'\nuses-permission: name='com.mataku.INTERNET'\n"
|
47
|
+
end
|
48
|
+
|
49
|
+
it do
|
50
|
+
plugin.check(apk: apk, permission_list_file: current_permission_file)
|
51
|
+
expect(dangerfile.status_report[:warnings].length).to eq(1)
|
52
|
+
expect(dangerfile.status_report[:warnings][0]).to eq('APK permissions changed, see below.')
|
53
|
+
expect(dangerfile.status_report[:markdowns][0].message).not_to include('Deleted')
|
54
|
+
expect(dangerfile.status_report[:markdowns][0].message).to include('Added')
|
55
|
+
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
context 'Permission deleted' do
|
60
|
+
let(:generated_permissions) do
|
61
|
+
"package: com.mataku.scrobscrob.dev\n"
|
62
|
+
end
|
63
|
+
|
64
|
+
it do
|
65
|
+
plugin.check(apk: apk, permission_list_file: current_permission_file)
|
66
|
+
expect(dangerfile.status_report[:warnings].length).to eq(1)
|
67
|
+
expect(dangerfile.status_report[:warnings][0]).to eq('APK permissions changed, see below.')
|
68
|
+
expect(dangerfile.status_report[:markdowns][0].message).to include('Deleted')
|
69
|
+
expect(dangerfile.status_report[:markdowns][0].message).not_to include('Added')
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
context 'Permission added' do
|
74
|
+
let(:generated_permissions) do
|
75
|
+
"package: com.mataku.scrobscrob.dev\nuses-permission: name='com.mataku.INTERNET'"
|
76
|
+
end
|
77
|
+
|
78
|
+
it do
|
79
|
+
plugin.check(apk: apk, permission_list_file: current_permission_file)
|
80
|
+
expect(dangerfile.status_report[:warnings].length).to eq(1)
|
81
|
+
expect(dangerfile.status_report[:warnings][0]).to eq('APK permissions changed, see below.')
|
82
|
+
expect(dangerfile.status_report[:markdowns][0].message).to include('Deleted')
|
83
|
+
expect(dangerfile.status_report[:markdowns][0].message).to include('Added')
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
require "pathname"
|
2
|
+
ROOT = Pathname.new(File.expand_path("../../", __FILE__))
|
3
|
+
$:.unshift((ROOT + "lib").to_s)
|
4
|
+
$:.unshift((ROOT + "spec").to_s)
|
5
|
+
|
6
|
+
require "bundler/setup"
|
7
|
+
require "pry"
|
8
|
+
|
9
|
+
require "rspec"
|
10
|
+
require "danger"
|
11
|
+
|
12
|
+
if `git remote -v` == ''
|
13
|
+
puts "You cannot run tests without setting a local git remote on this repo"
|
14
|
+
puts "It's a weird side-effect of Danger's internals."
|
15
|
+
exit(0)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Use coloured output, it's the best.
|
19
|
+
RSpec.configure do |config|
|
20
|
+
config.filter_gems_from_backtrace "bundler"
|
21
|
+
config.color = true
|
22
|
+
config.tty = true
|
23
|
+
end
|
24
|
+
|
25
|
+
require "danger_plugin"
|
26
|
+
|
27
|
+
# These functions are a subset of https://github.com/danger/danger/blob/master/spec/spec_helper.rb
|
28
|
+
# If you are expanding these files, see if it's already been done ^.
|
29
|
+
|
30
|
+
# A silent version of the user interface,
|
31
|
+
# it comes with an extra function `.string` which will
|
32
|
+
# strip all ANSI colours from the string.
|
33
|
+
|
34
|
+
# rubocop:disable Lint/NestedMethodDefinition
|
35
|
+
def testing_ui
|
36
|
+
@output = StringIO.new
|
37
|
+
def @output.winsize
|
38
|
+
[20, 9999]
|
39
|
+
end
|
40
|
+
|
41
|
+
cork = Cork::Board.new(out: @output)
|
42
|
+
def cork.string
|
43
|
+
out.string.gsub(/\e\[([;\d]+)?m/, "")
|
44
|
+
end
|
45
|
+
cork
|
46
|
+
end
|
47
|
+
# rubocop:enable Lint/NestedMethodDefinition
|
48
|
+
|
49
|
+
# Example environment (ENV) that would come from
|
50
|
+
# running a PR on TravisCI
|
51
|
+
def testing_env
|
52
|
+
{
|
53
|
+
"HAS_JOSH_K_SEAL_OF_APPROVAL" => "true",
|
54
|
+
"TRAVIS_PULL_REQUEST" => "800",
|
55
|
+
"TRAVIS_REPO_SLUG" => "artsy/eigen",
|
56
|
+
"TRAVIS_COMMIT_RANGE" => "759adcbd0d8f...13c4dc8bb61d",
|
57
|
+
"DANGER_GITHUB_API_TOKEN" => "123sbdq54erfsd3422gdfio"
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# A stubbed out Dangerfile for use in tests
|
62
|
+
def testing_dangerfile
|
63
|
+
env = Danger::EnvironmentManager.new(testing_env)
|
64
|
+
Danger::Dangerfile.new(env, testing_ui)
|
65
|
+
end
|
metadata
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: danger-android_permissions_checker
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- mataku
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-05-27 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: '1.3'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.3'
|
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: pry
|
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
|
+
description: A Danger plugin to check diff of android apk permissions.
|
84
|
+
email:
|
85
|
+
- sfprhythnn@gmail.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- ".rubocop.yml"
|
92
|
+
- ".travis.yml"
|
93
|
+
- Gemfile
|
94
|
+
- Guardfile
|
95
|
+
- LICENSE.txt
|
96
|
+
- README.md
|
97
|
+
- Rakefile
|
98
|
+
- danger-android_permissions_checker.gemspec
|
99
|
+
- lib/android_permissions_checker/gem_version.rb
|
100
|
+
- lib/android_permissions_checker/plugin.rb
|
101
|
+
- lib/danger_android_permissions_checker.rb
|
102
|
+
- lib/danger_plugin.rb
|
103
|
+
- spec/android_permissions_checker_spec.rb
|
104
|
+
- spec/spec_helper.rb
|
105
|
+
homepage: https://github.com/mataku/danger-android_permissions_checker
|
106
|
+
licenses:
|
107
|
+
- MIT
|
108
|
+
metadata: {}
|
109
|
+
post_install_message:
|
110
|
+
rdoc_options: []
|
111
|
+
require_paths:
|
112
|
+
- lib
|
113
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0'
|
123
|
+
requirements: []
|
124
|
+
rubyforge_project:
|
125
|
+
rubygems_version: 2.7.6
|
126
|
+
signing_key:
|
127
|
+
specification_version: 4
|
128
|
+
summary: A Danger plugin to check diff of android apk permissions.
|
129
|
+
test_files:
|
130
|
+
- spec/android_permissions_checker_spec.rb
|
131
|
+
- spec/spec_helper.rb
|