codeclimate-engine-rb 0.4.1 → 0.4.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: 55f9937b0d7f4a9a7c774730e482aeca06472201
4
- data.tar.gz: 3d5bb46cbf2fadfd59840747cbd79abdbab56feb
2
+ SHA256:
3
+ metadata.gz: 96bfcb4a51e27a6ecd8ae91d51a199ee12a0fc2150f241fba3adaecc2533bf2d
4
+ data.tar.gz: 953e685ef59776ad00b8caefe1902a4cd8f6c77d919d02d8ba513edad16cbbdf
5
5
  SHA512:
6
- metadata.gz: 61313238ea61d99a4d2b0c6d17049d27d2f610eeaef4e4e516143b1cc3dd10016b7240b106757a937396b278b49cbf71aca57ad696f1eeae0c6db8c37920577a
7
- data.tar.gz: b3e147eff1e2308acd166ab25749e20dbb741c347042efca93db2843b50d57b47bf16e55ef653a91f6b8d433c38a5da8a9a1d150fcf64b0456d534d1ba81b8c5
6
+ metadata.gz: b4d1a6cbaa5b8dce90e17386bf701bb78d6174057e3d58ea1cebc60e03805683c5c63e8ce04dfbb8ed0e99e735341dcadd353bd49bbb2362c081de3f6d3293cb
7
+ data.tar.gz: a84b3c0821b6ee29417106c847bbac103b635df98b75858377e578d8999eca66d6af1066192c415f220262375138279fa96d72fe4afb543e35c7f15b3e6cb8e9
data/.rspec CHANGED
@@ -1,2 +1,3 @@
1
1
  --format documentation
2
2
  --color
3
+ --require 'spec_helper'
data/README.md CHANGED
@@ -63,7 +63,7 @@ character.
63
63
 
64
64
  ## Code Climate engines using this gem
65
65
 
66
- * [Reek](https://github.com/troessner/reek)
66
+ * [Reek](https://docs.codeclimate.com/docs/reek)
67
67
 
68
68
  ## Development
69
69
 
@@ -19,9 +19,8 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_development_dependency "bundler", "~> 1.9"
22
+ spec.add_development_dependency "bundler", ">= 1.9", "< 3.0"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
24
  spec.add_development_dependency "rspec", "~> 3.3"
25
- spec.add_dependency "virtus", "~> 1.0"
26
25
  end
27
26
  # rubocop:enable Metrics/LineLength
@@ -25,7 +25,7 @@ module CCEngine
25
25
  private
26
26
 
27
27
  def parsed_json
28
- @parsed_json = JSON.parse(json_string)
28
+ @parsed_json ||= JSON.parse(json_string)
29
29
  end
30
30
  end
31
31
  end
@@ -1,17 +1,25 @@
1
- require "virtus"
2
1
  require "json"
3
2
 
4
3
  module CCEngine
5
4
  class Issue
6
- include Virtus.model(strict: true)
7
5
 
8
- attribute :check_name, String
9
- attribute :description, String
10
- attribute :categories, Array[String]
11
- attribute :location
12
- attribute :remediation_points
13
- attribute :content
14
- attribute :fingerprint
6
+ def initialize(
7
+ check_name:,
8
+ description:,
9
+ categories:,
10
+ location:,
11
+ remediation_points:,
12
+ content:,
13
+ fingerprint:
14
+ )
15
+ @check_name = check_name
16
+ @description = description
17
+ @categories = categories
18
+ @location = location
19
+ @remediation_points = remediation_points
20
+ @content = content
21
+ @fingerprint = fingerprint
22
+ end
15
23
 
16
24
  def render
17
25
  to_hash.to_json + "\0"
@@ -58,5 +66,15 @@ module CCEngine
58
66
  fingerprint: fingerprint
59
67
  }
60
68
  end
69
+
70
+ private
71
+
72
+ attr_reader :check_name,
73
+ :description,
74
+ :categories,
75
+ :location,
76
+ :remediation_points,
77
+ :content,
78
+ :fingerprint
61
79
  end
62
80
  end
@@ -1,12 +1,10 @@
1
- require "virtus"
2
-
3
1
  module CCEngine
4
2
  module Location
5
3
  class LineRange
6
- include Virtus.model(strict: true)
7
-
8
- attribute :path, String
9
- attribute :line_range, Range
4
+ def initialize(path:, line_range:)
5
+ @path = path
6
+ @line_range = line_range
7
+ end
10
8
 
11
9
  def to_hash
12
10
  {
@@ -17,6 +15,10 @@ module CCEngine
17
15
  }
18
16
  }
19
17
  end
18
+
19
+ private
20
+
21
+ attr_reader :path, :line_range
20
22
  end
21
23
  end
22
24
  end
@@ -1,13 +1,11 @@
1
- require "virtus"
2
-
3
1
  module CCEngine
4
2
  module Location
5
3
  class Position
6
- include Virtus.model(strict: true)
7
-
8
- attribute :path, String
9
- attribute :start_position
10
- attribute :end_position
4
+ def initialize(path:, start_position:, end_position:)
5
+ @path = path
6
+ @start_position = start_position
7
+ @end_position = end_position
8
+ end
11
9
 
12
10
  def to_hash
13
11
  {
@@ -18,6 +16,10 @@ module CCEngine
18
16
  }
19
17
  }
20
18
  end
19
+
20
+ private
21
+
22
+ attr_reader :path, :start_position, :end_position
21
23
  end
22
24
  end
23
25
  end
@@ -1,12 +1,10 @@
1
- require "virtus"
2
-
3
1
  module CCEngine
4
2
  module Position
5
3
  class Grid
6
- include Virtus.model(strict: true)
7
-
8
- attribute :line, Integer
9
- attribute :column, Integer
4
+ def initialize(line:, column:)
5
+ @line = line
6
+ @column = column
7
+ end
10
8
 
11
9
  def to_hash
12
10
  {
@@ -14,6 +12,8 @@ module CCEngine
14
12
  column: column
15
13
  }
16
14
  end
15
+
16
+ attr_reader :line, :column
17
17
  end
18
18
  end
19
19
  end
@@ -1,17 +1,19 @@
1
- require "virtus"
2
-
3
1
  module CCEngine
4
2
  module Position
5
3
  class Offset
6
- include Virtus.model(strict: true)
7
-
8
- attribute :offset, Integer
4
+ def initialize(offset:)
5
+ @offset = offset
6
+ end
9
7
 
10
8
  def to_hash
11
9
  {
12
10
  offset: offset
13
11
  }
14
12
  end
13
+
14
+ private
15
+
16
+ attr_reader :offset
15
17
  end
16
18
  end
17
19
  end
@@ -1,3 +1,3 @@
1
1
  module CCEngine
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codeclimate-engine-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Waite
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-25 00:00:00.000000000 Z
11
+ date: 2021-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.9'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '3.0'
20
23
  type: :development
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '1.9'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '3.0'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: rake
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -52,21 +58,7 @@ dependencies:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
60
  version: '3.3'
55
- - !ruby/object:Gem::Dependency
56
- name: virtus
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '1.0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '1.0'
69
- description:
61
+ description:
70
62
  email:
71
63
  - github.aw@andywaite.com
72
64
  executables: []
@@ -98,7 +90,7 @@ homepage: https://github.com/andyw8/codeclimate-engine-rb
98
90
  licenses:
99
91
  - MIT
100
92
  metadata: {}
101
- post_install_message:
93
+ post_install_message:
102
94
  rdoc_options: []
103
95
  require_paths:
104
96
  - lib
@@ -113,9 +105,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
105
  - !ruby/object:Gem::Version
114
106
  version: '0'
115
107
  requirements: []
116
- rubyforge_project:
117
- rubygems_version: 2.5.1
118
- signing_key:
108
+ rubygems_version: 3.1.6
109
+ signing_key:
119
110
  specification_version: 4
120
111
  summary: JSON issue formatter for the Code Climate engine
121
112
  test_files: []