danger-ios_logs 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/Gemfile.lock +52 -50
- data/danger-ios_logs.gemspec +7 -6
- data/lib/ios_logs/file_log.rb +2 -0
- data/lib/ios_logs/gem_version.rb +1 -1
- data/lib/ios_logs/plugin.rb +1 -7
- data/spec/ios_logs_spec.rb +4 -0
- metadata +16 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 289d8f9ac733ffacdff252409e7813fe2daaab8e
|
4
|
+
data.tar.gz: 44adc140fc034468413f460fbc50d240d4b5503b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e360482164d1eca7f1a25006fbea0cd5f226043f9f1ecda51de364841eed38e7043288604acca591a155d4cf662d3c8d59720d084dced313d26b6ff00b775e96
|
7
|
+
data.tar.gz: f90be4c566d2eb9af1df83343730fe0d4e7e8c63f045351d77010c678e6ea59937087f4b9c0aca55c863dab6e74b62b11c15ed09f2c81b958846e34db6ede298
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,27 +1,26 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
danger-ios_logs (0.1.
|
4
|
+
danger-ios_logs (0.1.1)
|
5
5
|
danger-plugin-api (~> 1.0)
|
6
|
-
git_diff_parser (~> 2.3
|
6
|
+
git_diff_parser (~> 2.3)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
addressable (2.5.
|
12
|
-
public_suffix (
|
11
|
+
addressable (2.5.2)
|
12
|
+
public_suffix (>= 2.0.2, < 4.0)
|
13
13
|
ast (2.3.0)
|
14
|
-
claide (1.0.
|
14
|
+
claide (1.0.2)
|
15
15
|
claide-plugins (0.9.2)
|
16
16
|
cork
|
17
17
|
nap
|
18
18
|
open4 (~> 1.3)
|
19
|
-
coderay (1.1.
|
20
|
-
colored (1.2)
|
19
|
+
coderay (1.1.2)
|
21
20
|
colored2 (3.1.2)
|
22
|
-
cork (0.
|
23
|
-
|
24
|
-
danger (
|
21
|
+
cork (0.3.0)
|
22
|
+
colored2 (~> 3.1)
|
23
|
+
danger (5.5.5)
|
25
24
|
claide (~> 1.0)
|
26
25
|
claide-plugins (>= 0.9.2)
|
27
26
|
colored2 (~> 3.1)
|
@@ -30,16 +29,17 @@ GEM
|
|
30
29
|
faraday-http-cache (~> 1.0)
|
31
30
|
git (~> 1)
|
32
31
|
kramdown (~> 1.5)
|
33
|
-
|
32
|
+
no_proxy_fix
|
33
|
+
octokit (~> 4.7)
|
34
34
|
terminal-table (~> 1)
|
35
35
|
danger-plugin-api (1.0.0)
|
36
36
|
danger (> 2.0)
|
37
37
|
diff-lcs (1.3)
|
38
|
-
faraday (0.
|
38
|
+
faraday (0.13.1)
|
39
39
|
multipart-post (>= 1.2, < 3)
|
40
40
|
faraday-http-cache (1.3.1)
|
41
41
|
faraday (~> 0.8)
|
42
|
-
ffi (1.9.
|
42
|
+
ffi (1.9.18)
|
43
43
|
formatador (0.2.5)
|
44
44
|
git (1.3.0)
|
45
45
|
git_diff_parser (2.3.0)
|
@@ -57,64 +57,66 @@ GEM
|
|
57
57
|
guard (~> 2.1)
|
58
58
|
guard-compat (~> 1.1)
|
59
59
|
rspec (>= 2.99.0, < 4.0)
|
60
|
-
kramdown (1.
|
60
|
+
kramdown (1.16.2)
|
61
61
|
listen (3.0.7)
|
62
62
|
rb-fsevent (>= 0.9.3)
|
63
63
|
rb-inotify (>= 0.9.7)
|
64
|
-
lumberjack (1.0.
|
65
|
-
method_source (0.
|
64
|
+
lumberjack (1.0.12)
|
65
|
+
method_source (0.9.0)
|
66
66
|
multipart-post (2.0.0)
|
67
67
|
nap (1.1.0)
|
68
68
|
nenv (0.3.0)
|
69
|
+
no_proxy_fix (0.1.2)
|
69
70
|
notiffany (0.1.1)
|
70
71
|
nenv (~> 0.1)
|
71
72
|
shellany (~> 0.0)
|
72
|
-
octokit (4.
|
73
|
+
octokit (4.8.0)
|
73
74
|
sawyer (~> 0.8.0, >= 0.5.3)
|
74
75
|
open4 (1.3.4)
|
75
|
-
|
76
|
-
|
76
|
+
parallel (1.12.1)
|
77
|
+
parser (2.4.0.2)
|
78
|
+
ast (~> 2.3)
|
77
79
|
powerpack (0.1.1)
|
78
|
-
pry (0.
|
80
|
+
pry (0.11.3)
|
79
81
|
coderay (~> 1.1.0)
|
80
|
-
method_source (~> 0.
|
81
|
-
slop (~> 3.4)
|
82
|
+
method_source (~> 0.9.0)
|
82
83
|
public_suffix (2.0.5)
|
83
|
-
rainbow (2.2.
|
84
|
+
rainbow (2.2.2)
|
85
|
+
rake
|
84
86
|
rake (10.5.0)
|
85
|
-
rb-fsevent (0.
|
86
|
-
rb-inotify (0.9.
|
87
|
-
ffi (>= 0.5.0)
|
88
|
-
rspec (3.
|
89
|
-
rspec-core (~> 3.
|
90
|
-
rspec-expectations (~> 3.
|
91
|
-
rspec-mocks (~> 3.
|
92
|
-
rspec-core (3.
|
93
|
-
rspec-support (~> 3.
|
94
|
-
rspec-expectations (3.
|
87
|
+
rb-fsevent (0.10.2)
|
88
|
+
rb-inotify (0.9.10)
|
89
|
+
ffi (>= 0.5.0, < 2)
|
90
|
+
rspec (3.7.0)
|
91
|
+
rspec-core (~> 3.7.0)
|
92
|
+
rspec-expectations (~> 3.7.0)
|
93
|
+
rspec-mocks (~> 3.7.0)
|
94
|
+
rspec-core (3.7.0)
|
95
|
+
rspec-support (~> 3.7.0)
|
96
|
+
rspec-expectations (3.7.0)
|
95
97
|
diff-lcs (>= 1.2.0, < 2.0)
|
96
|
-
rspec-support (~> 3.
|
97
|
-
rspec-mocks (3.
|
98
|
+
rspec-support (~> 3.7.0)
|
99
|
+
rspec-mocks (3.7.0)
|
98
100
|
diff-lcs (>= 1.2.0, < 2.0)
|
99
|
-
rspec-support (~> 3.
|
100
|
-
rspec-support (3.
|
101
|
-
rubocop (0.
|
101
|
+
rspec-support (~> 3.7.0)
|
102
|
+
rspec-support (3.7.0)
|
103
|
+
rubocop (0.50.0)
|
104
|
+
parallel (~> 1.10)
|
102
105
|
parser (>= 2.3.3.1, < 3.0)
|
103
106
|
powerpack (~> 0.1)
|
104
|
-
rainbow (>=
|
107
|
+
rainbow (>= 2.2.2, < 3.0)
|
105
108
|
ruby-progressbar (~> 1.7)
|
106
109
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
107
|
-
ruby-progressbar (1.
|
110
|
+
ruby-progressbar (1.9.0)
|
108
111
|
sawyer (0.8.1)
|
109
112
|
addressable (>= 2.3.5, < 2.6)
|
110
113
|
faraday (~> 0.8, < 1.0)
|
111
114
|
shellany (0.0.1)
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
yard (0.9.8)
|
115
|
+
terminal-table (1.8.0)
|
116
|
+
unicode-display_width (~> 1.1, >= 1.1.1)
|
117
|
+
thor (0.20.0)
|
118
|
+
unicode-display_width (1.3.0)
|
119
|
+
yard (0.9.12)
|
118
120
|
|
119
121
|
PLATFORMS
|
120
122
|
ruby
|
@@ -125,11 +127,11 @@ DEPENDENCIES
|
|
125
127
|
guard (~> 2.14)
|
126
128
|
guard-rspec (~> 4.7)
|
127
129
|
listen (= 3.0.7)
|
128
|
-
pry
|
130
|
+
pry (~> 0.10)
|
129
131
|
rake (~> 10.0)
|
130
132
|
rspec (~> 3.4)
|
131
|
-
rubocop (~> 0.
|
132
|
-
yard (~> 0.
|
133
|
+
rubocop (~> 0.49)
|
134
|
+
yard (~> 0.9.11)
|
133
135
|
|
134
136
|
BUNDLED WITH
|
135
|
-
1.
|
137
|
+
1.16.0
|
data/danger-ios_logs.gemspec
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
lib = File.expand_path('../lib', __FILE__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'ios_logs/gem_version.rb'
|
@@ -9,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
9
8
|
spec.authors = ['Bartosz Janda', 'Joanna Bednarz']
|
10
9
|
spec.email = ['bjanda@pgs-soft.com', 'jbednarz@pgs-soft.com']
|
11
10
|
spec.description = 'Danger plugin to detect any NSLog/print entries left in the code'
|
12
|
-
spec.summary = '
|
11
|
+
spec.summary = 'Scan whole iOS project and detects usage of any NSLog/print entries in the code'
|
13
12
|
spec.homepage = 'https://github.com/PGSSoft/danger-ios_logs'
|
14
13
|
spec.license = 'MIT'
|
15
14
|
|
@@ -18,8 +17,10 @@ Gem::Specification.new do |spec|
|
|
18
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
18
|
spec.require_paths = ['lib']
|
20
19
|
|
20
|
+
spec.required_ruby_version = ">= 2.0.0"
|
21
|
+
|
21
22
|
spec.add_runtime_dependency 'danger-plugin-api', '~> 1.0'
|
22
|
-
spec.add_runtime_dependency 'git_diff_parser', '~> 2.3
|
23
|
+
spec.add_runtime_dependency 'git_diff_parser', '~> 2.3'
|
23
24
|
|
24
25
|
# General ruby development
|
25
26
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
@@ -29,8 +30,8 @@ Gem::Specification.new do |spec|
|
|
29
30
|
spec.add_development_dependency 'rspec', '~> 3.4'
|
30
31
|
|
31
32
|
# Linting code and docs
|
32
|
-
spec.add_development_dependency 'rubocop', '~> 0.
|
33
|
-
spec.add_development_dependency 'yard', '~> 0.
|
33
|
+
spec.add_development_dependency 'rubocop', '~> 0.49'
|
34
|
+
spec.add_development_dependency 'yard', '~> 0.9.11'
|
34
35
|
|
35
36
|
# Makes testing easy via `bundle exec guard`
|
36
37
|
spec.add_development_dependency 'guard', '~> 2.14'
|
@@ -46,5 +47,5 @@ Gem::Specification.new do |spec|
|
|
46
47
|
# binding.pry
|
47
48
|
#
|
48
49
|
# This will stop test execution and let you inspect the results
|
49
|
-
spec.add_development_dependency 'pry'
|
50
|
+
spec.add_development_dependency 'pry', '~> 0.10'
|
50
51
|
end
|
data/lib/ios_logs/file_log.rb
CHANGED
data/lib/ios_logs/gem_version.rb
CHANGED
data/lib/ios_logs/plugin.rb
CHANGED
@@ -50,12 +50,6 @@ module Danger
|
|
50
50
|
# @return [Array<FileLog>] List of `NSLog`
|
51
51
|
attr_accessor :nslogs
|
52
52
|
|
53
|
-
#
|
54
|
-
# Combined list of both `NSLog` and `print`
|
55
|
-
#
|
56
|
-
# @return [Array<FileLog>] List of `NSLog` and `print`
|
57
|
-
attr_accessor :logs
|
58
|
-
|
59
53
|
#
|
60
54
|
# Initialize plugin
|
61
55
|
# @param dangerfile [Dangerfile] Dangerfile used to initialize plugin
|
@@ -84,7 +78,7 @@ module Danger
|
|
84
78
|
#
|
85
79
|
# @return [Void]
|
86
80
|
def check(method = :warn)
|
87
|
-
raise 'Unsupported method' unless [
|
81
|
+
raise 'Unsupported method' unless %i[message warn fail].include?(method)
|
88
82
|
@nslogs = []
|
89
83
|
@prints = []
|
90
84
|
|
data/spec/ios_logs_spec.rb
CHANGED
@@ -19,12 +19,14 @@ module Danger
|
|
19
19
|
|
20
20
|
context 'changed files containing newly introduced logs' do
|
21
21
|
before do
|
22
|
+
# rubocop:disable Layout/IndentHeredoc
|
22
23
|
patch = <<PATCH
|
23
24
|
+ NSLog("Some log")
|
24
25
|
+ func foo() {
|
25
26
|
+ }
|
26
27
|
+ print("Some other log")
|
27
28
|
PATCH
|
29
|
+
# rubocop:enable Layout/IndentHeredoc
|
28
30
|
|
29
31
|
modified = Git::Diff::DiffFile.new(
|
30
32
|
'base',
|
@@ -128,3 +130,5 @@ PATCH
|
|
128
130
|
end
|
129
131
|
end
|
130
132
|
end
|
133
|
+
|
134
|
+
# rubocop:enable Metrics/BlockLength
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-ios_logs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bartosz Janda
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-12-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: danger-plugin-api
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 2.3
|
34
|
+
version: '2.3'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 2.3
|
41
|
+
version: '2.3'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: bundler
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,28 +87,28 @@ dependencies:
|
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: '0.
|
90
|
+
version: '0.49'
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: '0.
|
97
|
+
version: '0.49'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: yard
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
104
|
+
version: 0.9.11
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
109
|
- - "~>"
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version:
|
111
|
+
version: 0.9.11
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: guard
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
@@ -155,16 +155,16 @@ dependencies:
|
|
155
155
|
name: pry
|
156
156
|
requirement: !ruby/object:Gem::Requirement
|
157
157
|
requirements:
|
158
|
-
- - "
|
158
|
+
- - "~>"
|
159
159
|
- !ruby/object:Gem::Version
|
160
|
-
version: '0'
|
160
|
+
version: '0.10'
|
161
161
|
type: :development
|
162
162
|
prerelease: false
|
163
163
|
version_requirements: !ruby/object:Gem::Requirement
|
164
164
|
requirements:
|
165
|
-
- - "
|
165
|
+
- - "~>"
|
166
166
|
- !ruby/object:Gem::Version
|
167
|
-
version: '0'
|
167
|
+
version: '0.10'
|
168
168
|
description: Danger plugin to detect any NSLog/print entries left in the code
|
169
169
|
email:
|
170
170
|
- bjanda@pgs-soft.com
|
@@ -205,7 +205,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
205
205
|
requirements:
|
206
206
|
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version:
|
208
|
+
version: 2.0.0
|
209
209
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
210
210
|
requirements:
|
211
211
|
- - ">="
|
@@ -213,10 +213,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
213
|
version: '0'
|
214
214
|
requirements: []
|
215
215
|
rubyforge_project:
|
216
|
-
rubygems_version: 2.6.
|
216
|
+
rubygems_version: 2.6.14
|
217
217
|
signing_key:
|
218
218
|
specification_version: 4
|
219
|
-
summary:
|
219
|
+
summary: Scan whole iOS project and detects usage of any NSLog/print entries in the
|
220
|
+
code
|
220
221
|
test_files:
|
221
222
|
- spec/ios_logs_spec.rb
|
222
223
|
- spec/shared_example_groups/files_in_changeset.rb
|