danger-ios_logs 0.1.1 → 0.1.2
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/.travis.yml +8 -5
- data/Gemfile.lock +55 -53
- data/lib/danger_ios_logs.rb +2 -0
- data/lib/danger_plugin.rb +2 -0
- data/lib/ios_logs/file_log.rb +2 -0
- data/lib/ios_logs/gem_version.rb +3 -1
- data/lib/ios_logs/plugin.rb +7 -4
- data/spec/ios_logs_spec.rb +6 -4
- data/spec/shared_example_groups/files_in_changeset.rb +2 -0
- data/spec/shared_example_groups/files_not_in_changeset.rb +2 -0
- data/spec/shared_example_groups/logs_in_dockerfile.rb +2 -0
- data/spec/spec_helper.rb +4 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 79129222e8980c7f91544d4c0006202fe929177ff1088ab91323589e7a960991
|
4
|
+
data.tar.gz: 9603c99054329042c0e009bb2a02d89c68a2e02f336726e90bb84ee4257fe2e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00fb91938a0be26dfbb7fe944b040e30b1aef48d883eadf62fc3e53842a1f031b053019c49d113eea6878220b8e97d31131c2e94c92cc2af7c75512619d510bc
|
7
|
+
data.tar.gz: e96673cbbea1e508c78d59ab204e7cce78320bac32ac43ca212ea5c7098a0eac9c7c8dca13e6a07b82682725b4277e93f16c57f45075b32a95c9eda8eb231348
|
data/.travis.yml
CHANGED
@@ -4,10 +4,13 @@ cache:
|
|
4
4
|
- bundle
|
5
5
|
|
6
6
|
rvm:
|
7
|
-
- 2.
|
8
|
-
- 2.
|
9
|
-
- 2.
|
10
|
-
- 2.
|
7
|
+
- 2.3.8
|
8
|
+
- 2.4.6
|
9
|
+
- 2.5.5
|
10
|
+
- 2.6.3
|
11
|
+
|
12
|
+
before_install:
|
13
|
+
- gem install -v 1.17.2 bundler --no-document
|
11
14
|
|
12
15
|
script:
|
13
|
-
|
16
|
+
- bundle exec rake spec
|
data/Gemfile.lock
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
danger-ios_logs (0.1.
|
4
|
+
danger-ios_logs (0.1.2)
|
5
5
|
danger-plugin-api (~> 1.0)
|
6
6
|
git_diff_parser (~> 2.3)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
addressable (2.
|
11
|
+
addressable (2.6.0)
|
12
12
|
public_suffix (>= 2.0.2, < 4.0)
|
13
|
-
ast (2.
|
13
|
+
ast (2.4.0)
|
14
14
|
claide (1.0.2)
|
15
15
|
claide-plugins (0.9.2)
|
16
16
|
cork
|
@@ -20,33 +20,34 @@ GEM
|
|
20
20
|
colored2 (3.1.2)
|
21
21
|
cork (0.3.0)
|
22
22
|
colored2 (~> 3.1)
|
23
|
-
danger (
|
23
|
+
danger (6.0.9)
|
24
24
|
claide (~> 1.0)
|
25
25
|
claide-plugins (>= 0.9.2)
|
26
26
|
colored2 (~> 3.1)
|
27
27
|
cork (~> 0.1)
|
28
28
|
faraday (~> 0.9)
|
29
|
-
faraday-http-cache (~>
|
30
|
-
git (~> 1)
|
31
|
-
kramdown (~>
|
29
|
+
faraday-http-cache (~> 2.0)
|
30
|
+
git (~> 1.5)
|
31
|
+
kramdown (~> 2.0)
|
32
|
+
kramdown-parser-gfm (~> 1.0)
|
32
33
|
no_proxy_fix
|
33
34
|
octokit (~> 4.7)
|
34
35
|
terminal-table (~> 1)
|
35
36
|
danger-plugin-api (1.0.0)
|
36
37
|
danger (> 2.0)
|
37
38
|
diff-lcs (1.3)
|
38
|
-
faraday (0.
|
39
|
+
faraday (0.15.4)
|
39
40
|
multipart-post (>= 1.2, < 3)
|
40
|
-
faraday-http-cache (
|
41
|
+
faraday-http-cache (2.0.0)
|
41
42
|
faraday (~> 0.8)
|
42
|
-
ffi (1.
|
43
|
+
ffi (1.11.1)
|
43
44
|
formatador (0.2.5)
|
44
|
-
git (1.
|
45
|
+
git (1.5.0)
|
45
46
|
git_diff_parser (2.3.0)
|
46
|
-
guard (2.
|
47
|
+
guard (2.15.0)
|
47
48
|
formatador (>= 0.2.4)
|
48
49
|
listen (>= 2.7, < 4.0)
|
49
|
-
lumberjack (
|
50
|
+
lumberjack (>= 1.0.12, < 2.0)
|
50
51
|
nenv (~> 0.1)
|
51
52
|
notiffany (~> 0.0)
|
52
53
|
pry (>= 0.9.12)
|
@@ -57,66 +58,67 @@ GEM
|
|
57
58
|
guard (~> 2.1)
|
58
59
|
guard-compat (~> 1.1)
|
59
60
|
rspec (>= 2.99.0, < 4.0)
|
60
|
-
|
61
|
+
jaro_winkler (1.5.3)
|
62
|
+
kramdown (2.1.0)
|
63
|
+
kramdown-parser-gfm (1.1.0)
|
64
|
+
kramdown (~> 2.0)
|
61
65
|
listen (3.0.7)
|
62
66
|
rb-fsevent (>= 0.9.3)
|
63
67
|
rb-inotify (>= 0.9.7)
|
64
|
-
lumberjack (1.0.
|
65
|
-
method_source (0.9.
|
66
|
-
multipart-post (2.
|
68
|
+
lumberjack (1.0.13)
|
69
|
+
method_source (0.9.2)
|
70
|
+
multipart-post (2.1.1)
|
67
71
|
nap (1.1.0)
|
68
72
|
nenv (0.3.0)
|
69
73
|
no_proxy_fix (0.1.2)
|
70
74
|
notiffany (0.1.1)
|
71
75
|
nenv (~> 0.1)
|
72
76
|
shellany (~> 0.0)
|
73
|
-
octokit (4.
|
77
|
+
octokit (4.14.0)
|
74
78
|
sawyer (~> 0.8.0, >= 0.5.3)
|
75
79
|
open4 (1.3.4)
|
76
|
-
parallel (1.
|
77
|
-
parser (2.
|
78
|
-
ast (~> 2.
|
79
|
-
|
80
|
-
pry (0.11.3)
|
80
|
+
parallel (1.17.0)
|
81
|
+
parser (2.6.3.0)
|
82
|
+
ast (~> 2.4.0)
|
83
|
+
pry (0.12.2)
|
81
84
|
coderay (~> 1.1.0)
|
82
85
|
method_source (~> 0.9.0)
|
83
|
-
public_suffix (
|
84
|
-
rainbow (
|
85
|
-
rake
|
86
|
+
public_suffix (3.1.1)
|
87
|
+
rainbow (3.0.0)
|
86
88
|
rake (10.5.0)
|
87
|
-
rb-fsevent (0.10.
|
88
|
-
rb-inotify (0.
|
89
|
-
ffi (
|
90
|
-
rspec (3.
|
91
|
-
rspec-core (~> 3.
|
92
|
-
rspec-expectations (~> 3.
|
93
|
-
rspec-mocks (~> 3.
|
94
|
-
rspec-core (3.
|
95
|
-
rspec-support (~> 3.
|
96
|
-
rspec-expectations (3.
|
89
|
+
rb-fsevent (0.10.3)
|
90
|
+
rb-inotify (0.10.0)
|
91
|
+
ffi (~> 1.0)
|
92
|
+
rspec (3.8.0)
|
93
|
+
rspec-core (~> 3.8.0)
|
94
|
+
rspec-expectations (~> 3.8.0)
|
95
|
+
rspec-mocks (~> 3.8.0)
|
96
|
+
rspec-core (3.8.2)
|
97
|
+
rspec-support (~> 3.8.0)
|
98
|
+
rspec-expectations (3.8.4)
|
97
99
|
diff-lcs (>= 1.2.0, < 2.0)
|
98
|
-
rspec-support (~> 3.
|
99
|
-
rspec-mocks (3.
|
100
|
+
rspec-support (~> 3.8.0)
|
101
|
+
rspec-mocks (3.8.1)
|
100
102
|
diff-lcs (>= 1.2.0, < 2.0)
|
101
|
-
rspec-support (~> 3.
|
102
|
-
rspec-support (3.
|
103
|
-
rubocop (0.
|
103
|
+
rspec-support (~> 3.8.0)
|
104
|
+
rspec-support (3.8.2)
|
105
|
+
rubocop (0.72.0)
|
106
|
+
jaro_winkler (~> 1.5.1)
|
104
107
|
parallel (~> 1.10)
|
105
|
-
parser (>= 2.
|
106
|
-
|
107
|
-
rainbow (>= 2.2.2, < 3.0)
|
108
|
+
parser (>= 2.6)
|
109
|
+
rainbow (>= 2.2.2, < 4.0)
|
108
110
|
ruby-progressbar (~> 1.7)
|
109
|
-
unicode-display_width (
|
110
|
-
ruby-progressbar (1.
|
111
|
-
sawyer (0.8.
|
112
|
-
addressable (>= 2.3.5
|
113
|
-
faraday (
|
111
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
112
|
+
ruby-progressbar (1.10.1)
|
113
|
+
sawyer (0.8.2)
|
114
|
+
addressable (>= 2.3.5)
|
115
|
+
faraday (> 0.8, < 2.0)
|
114
116
|
shellany (0.0.1)
|
115
117
|
terminal-table (1.8.0)
|
116
118
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
117
|
-
thor (0.20.
|
118
|
-
unicode-display_width (1.
|
119
|
-
yard (0.9.
|
119
|
+
thor (0.20.3)
|
120
|
+
unicode-display_width (1.6.0)
|
121
|
+
yard (0.9.20)
|
120
122
|
|
121
123
|
PLATFORMS
|
122
124
|
ruby
|
@@ -134,4 +136,4 @@ DEPENDENCIES
|
|
134
136
|
yard (~> 0.9.11)
|
135
137
|
|
136
138
|
BUNDLED WITH
|
137
|
-
1.
|
139
|
+
1.17.2
|
data/lib/danger_ios_logs.rb
CHANGED
data/lib/danger_plugin.rb
CHANGED
data/lib/ios_logs/file_log.rb
CHANGED
data/lib/ios_logs/gem_version.rb
CHANGED
data/lib/ios_logs/plugin.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'git_diff_parser'
|
2
4
|
|
3
5
|
module Danger
|
@@ -20,11 +22,11 @@ module Danger
|
|
20
22
|
# @tags ios, logs, print, nslog, swift
|
21
23
|
#
|
22
24
|
class DangerIosLogs < Plugin
|
23
|
-
NSLOG_REGEXP = /\s+NSLog\s*\(
|
24
|
-
PRINT_REGEXP = /\s+print\s*\(
|
25
|
+
NSLOG_REGEXP = /\s+NSLog\s*\(/.freeze
|
26
|
+
PRINT_REGEXP = /\s+print\s*\(/.freeze
|
25
27
|
|
26
|
-
NSLOG_MESSAGE = 'There remain `NSLog` in the modified code.'
|
27
|
-
PRINT_MESSAGE = 'There remain `print` in the modified code.'
|
28
|
+
NSLOG_MESSAGE = 'There remain `NSLog` in the modified code.'
|
29
|
+
PRINT_MESSAGE = 'There remain `print` in the modified code.'
|
28
30
|
|
29
31
|
#
|
30
32
|
# Notify usage of `NSLog`. `true` by default
|
@@ -79,6 +81,7 @@ module Danger
|
|
79
81
|
# @return [Void]
|
80
82
|
def check(method = :warn)
|
81
83
|
raise 'Unsupported method' unless %i[message warn fail].include?(method)
|
84
|
+
|
82
85
|
@nslogs = []
|
83
86
|
@prints = []
|
84
87
|
|
data/spec/ios_logs_spec.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require File.expand_path('spec_helper', __dir__)
|
2
4
|
require 'shared_example_groups/files_in_changeset'
|
3
5
|
require 'shared_example_groups/files_not_in_changeset'
|
4
6
|
require 'shared_example_groups/logs_in_dockerfile'
|
@@ -30,12 +32,12 @@ PATCH
|
|
30
32
|
|
31
33
|
modified = Git::Diff::DiffFile.new(
|
32
34
|
'base',
|
33
|
-
path:
|
35
|
+
path: 'some/file.rb',
|
34
36
|
patch: patch
|
35
37
|
)
|
36
38
|
added = Git::Diff::DiffFile.new(
|
37
39
|
'base',
|
38
|
-
path:
|
40
|
+
path: 'another/stuff.rb',
|
39
41
|
patch: '+ print(\"More logs\")'
|
40
42
|
)
|
41
43
|
|
@@ -92,7 +94,7 @@ PATCH
|
|
92
94
|
before do
|
93
95
|
modified = Git::Diff::DiffFile.new(
|
94
96
|
'base',
|
95
|
-
path:
|
97
|
+
path: 'some/file.rb',
|
96
98
|
patch: '+ an added line'
|
97
99
|
)
|
98
100
|
allow(@dangerfile.git).to receive(:diff_for_file).with('some/file.rb').and_return(modified)
|
data/spec/spec_helper.rb
CHANGED
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.2
|
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:
|
12
|
+
date: 2019-07-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: danger-plugin-api
|
@@ -212,8 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
212
212
|
- !ruby/object:Gem::Version
|
213
213
|
version: '0'
|
214
214
|
requirements: []
|
215
|
-
|
216
|
-
rubygems_version: 2.6.14
|
215
|
+
rubygems_version: 3.0.3
|
217
216
|
signing_key:
|
218
217
|
specification_version: 4
|
219
218
|
summary: Scan whole iOS project and detects usage of any NSLog/print entries in the
|