accesslint-ci 0.3.2 → 0.3.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7da60da100d04bcced79a9165eedfc5db0d9bfaf
4
- data.tar.gz: d7b549726868cd90d19e39288e2baba6ad9c1902
3
+ metadata.gz: fc7d03c6fe140d07adf3557128826ae1b7d34514
4
+ data.tar.gz: 0f1affafa39da2ef1ab894b318655773c0da97de
5
5
  SHA512:
6
- metadata.gz: 66755f6a5746ae03dff16a82ba0bbc0d92e07e6e30ae25e98ab900c1bba8c73bcf8062431a73385c435c385e7bde3580cc4716511e021cced15c1f85615b6e2e
7
- data.tar.gz: f21570bdd6fe8fc1c329b97455cde9e6ba145aebb7a66d2092bff82abeca6c1c21d8ea9b8c2434907a95e5aa52391bf90bdcc0974832b9b097fa28b1cf2fec83
6
+ metadata.gz: 790c001b8800c1b7a840c9cc86e59db3682cfe1de40073446fd5ded4e9cf02b0e6f5a55ebe1d1adfc698fbca784dab45528851245415303c741b8217598705f1
7
+ data.tar.gz: f8649486cd713d78bc03e5f337e71eabee4424514182c573c7e630c43ace0c0b32df7a1eb57684082210fa796f695f30b48a2dbfc6bbb1faa9af70b0523073e3
@@ -21,71 +21,71 @@ module Accesslint
21
21
  end
22
22
  end
23
23
 
24
- no_commands do
25
- attr_reader :host
24
+ private
26
25
 
27
- def skip_ci?
28
- options[:"skip-ci"]
29
- end
26
+ attr_reader :host
30
27
 
31
- def pr?
32
- ENV.fetch("CIRCLE_BRANCH") != "master"
33
- end
28
+ def skip_ci?
29
+ options[:"skip-ci"]
30
+ end
34
31
 
35
- def changes?
36
- new_diff.any?
37
- end
32
+ def pr?
33
+ ENV.fetch("CIRCLE_BRANCH") != "master"
34
+ end
38
35
 
39
- def new_diff
40
- new_errors - existing_diff
41
- end
36
+ def changes?
37
+ new_diff.any?
38
+ end
42
39
 
43
- def new_errors
44
- current_errors - baseline_errors
45
- end
40
+ def new_diff
41
+ new_errors - existing_diff
42
+ end
46
43
 
47
- def current_errors
48
- @current_errors ||= Scanner.perform(host: host).split("\n")
49
- end
44
+ def new_errors
45
+ current_errors - baseline_errors
46
+ end
50
47
 
51
- def baseline_errors
52
- if baseline_file
53
- @baseline_errors ||= ReadAccesslintLog.perform(baseline_file)
54
- else
55
- []
56
- end
57
- end
48
+ def current_errors
49
+ @current_errors ||= Scanner.perform(host: host).split("\n")
50
+ end
58
51
 
59
- def baseline_file
60
- options[:base]
52
+ def baseline_errors
53
+ if baseline_file
54
+ @baseline_errors ||= ReadAccesslintLog.perform(baseline_file)
55
+ else
56
+ []
61
57
  end
58
+ end
62
59
 
63
- def existing_diff
64
- if previous_diff_file
65
- @existing_diff ||= ReadAccesslintLog.perform(previous_diff_file)
66
- else
67
- @existing_diff ||= LogManager.get.split("\n")
68
- end
69
- end
60
+ def baseline_file
61
+ options[:base]
62
+ end
70
63
 
71
- def previous_diff_file
72
- options[:compare]
64
+ def existing_diff
65
+ if previous_diff_file
66
+ @existing_diff ||= ReadAccesslintLog.perform(previous_diff_file)
67
+ else
68
+ @existing_diff ||= LogManager.get.split("\n")
73
69
  end
70
+ end
74
71
 
75
- def save_diff
76
- WriteAccesslintLog.perform(
77
- file_name: new_diff_file,
78
- contents: new_diff.join("\n"),
79
- )
80
- end
72
+ def previous_diff_file
73
+ options[:compare]
74
+ end
81
75
 
82
- def new_diff_file
83
- options[:outfile] || previous_diff_file
84
- end
76
+ def save_diff
77
+ WriteAccesslintLog.perform(
78
+ file_name: new_diff_file,
79
+ contents: new_diff.join("\n"),
80
+ )
81
+ end
85
82
 
86
- def post_comment
87
- Commenter.perform(new_diff)
88
- end
83
+ def new_diff_file
84
+ options[:outfile] || previous_diff_file
85
+ end
86
+
87
+ def post_comment
88
+ Commenter.perform(new_diff)
89
89
  end
90
90
  end
91
91
 
@@ -1,5 +1,5 @@
1
1
  module Accesslint
2
2
  module Ci
3
- VERSION = "0.3.2"
3
+ VERSION = "0.3.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: accesslint-ci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Cundiff