danger-ios_logs 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 289d8f9ac733ffacdff252409e7813fe2daaab8e
4
- data.tar.gz: 44adc140fc034468413f460fbc50d240d4b5503b
2
+ SHA256:
3
+ metadata.gz: 79129222e8980c7f91544d4c0006202fe929177ff1088ab91323589e7a960991
4
+ data.tar.gz: 9603c99054329042c0e009bb2a02d89c68a2e02f336726e90bb84ee4257fe2e1
5
5
  SHA512:
6
- metadata.gz: e360482164d1eca7f1a25006fbea0cd5f226043f9f1ecda51de364841eed38e7043288604acca591a155d4cf662d3c8d59720d084dced313d26b6ff00b775e96
7
- data.tar.gz: f90be4c566d2eb9af1df83343730fe0d4e7e8c63f045351d77010c678e6ea59937087f4b9c0aca55c863dab6e74b62b11c15ed09f2c81b958846e34db6ede298
6
+ metadata.gz: 00fb91938a0be26dfbb7fe944b040e30b1aef48d883eadf62fc3e53842a1f031b053019c49d113eea6878220b8e97d31131c2e94c92cc2af7c75512619d510bc
7
+ data.tar.gz: e96673cbbea1e508c78d59ab204e7cce78320bac32ac43ca212ea5c7098a0eac9c7c8dca13e6a07b82682725b4277e93f16c57f45075b32a95c9eda8eb231348
@@ -4,10 +4,13 @@ cache:
4
4
  - bundle
5
5
 
6
6
  rvm:
7
- - 2.0
8
- - 2.1.3
9
- - 2.3.3
10
- - 2.4.0
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
- - bundle exec rake spec
16
+ - bundle exec rake spec
@@ -1,16 +1,16 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- danger-ios_logs (0.1.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.5.2)
11
+ addressable (2.6.0)
12
12
  public_suffix (>= 2.0.2, < 4.0)
13
- ast (2.3.0)
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 (5.5.5)
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 (~> 1.0)
30
- git (~> 1)
31
- kramdown (~> 1.5)
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.13.1)
39
+ faraday (0.15.4)
39
40
  multipart-post (>= 1.2, < 3)
40
- faraday-http-cache (1.3.1)
41
+ faraday-http-cache (2.0.0)
41
42
  faraday (~> 0.8)
42
- ffi (1.9.18)
43
+ ffi (1.11.1)
43
44
  formatador (0.2.5)
44
- git (1.3.0)
45
+ git (1.5.0)
45
46
  git_diff_parser (2.3.0)
46
- guard (2.14.1)
47
+ guard (2.15.0)
47
48
  formatador (>= 0.2.4)
48
49
  listen (>= 2.7, < 4.0)
49
- lumberjack (~> 1.0)
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
- kramdown (1.16.2)
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.12)
65
- method_source (0.9.0)
66
- multipart-post (2.0.0)
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.8.0)
77
+ octokit (4.14.0)
74
78
  sawyer (~> 0.8.0, >= 0.5.3)
75
79
  open4 (1.3.4)
76
- parallel (1.12.1)
77
- parser (2.4.0.2)
78
- ast (~> 2.3)
79
- powerpack (0.1.1)
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 (2.0.5)
84
- rainbow (2.2.2)
85
- rake
86
+ public_suffix (3.1.1)
87
+ rainbow (3.0.0)
86
88
  rake (10.5.0)
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)
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.7.0)
99
- rspec-mocks (3.7.0)
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.7.0)
102
- rspec-support (3.7.0)
103
- rubocop (0.50.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.3.3.1, < 3.0)
106
- powerpack (~> 0.1)
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 (~> 1.0, >= 1.0.1)
110
- ruby-progressbar (1.9.0)
111
- sawyer (0.8.1)
112
- addressable (>= 2.3.5, < 2.6)
113
- faraday (~> 0.8, < 1.0)
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.0)
118
- unicode-display_width (1.3.0)
119
- yard (0.9.12)
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.16.0
139
+ 1.17.2
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'ios_logs/gem_version'
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'ios_logs/plugin'
2
4
  require 'ios_logs/file_log'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # rubocop:disable Style/StructInheritance
2
4
 
3
5
  module Danger
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module IosLogs
2
- VERSION = '0.1.1'.freeze
4
+ VERSION = '0.1.2'
3
5
  end
@@ -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.'.freeze
27
- PRINT_MESSAGE = 'There remain `print` in the modified code.'.freeze
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
 
@@ -1,4 +1,6 @@
1
- require File.expand_path('../spec_helper', __FILE__)
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: 'some/file.rb',
35
+ path: 'some/file.rb',
34
36
  patch: patch
35
37
  )
36
38
  added = Git::Diff::DiffFile.new(
37
39
  'base',
38
- path: 'another/stuff.rb',
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: 'some/file.rb',
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)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  shared_examples_for 'files in changeset' do
2
4
  it 'should have three logs' do
3
5
  expect(log_method.length).to eq(3)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  shared_examples_for 'files not in changeset' do
2
4
  it 'should have no message' do
3
5
  expect(messages).to be_empty
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  shared_examples_for 'logs in dockerfile' do |log_files|
2
4
  it "should have #{log_files.count} logs" do
3
5
  expect(logs.length).to eq(log_files.count)
@@ -1,5 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pathname'
2
- ROOT = Pathname.new(File.expand_path('../../', __FILE__))
4
+
5
+ ROOT = Pathname.new(File.expand_path('..', __dir__))
3
6
  $LOAD_PATH.unshift((ROOT + 'lib').to_s)
4
7
  $LOAD_PATH.unshift((ROOT + 'spec').to_s)
5
8
 
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.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: 2017-12-21 00:00:00.000000000 Z
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
- rubyforge_project:
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