teamtailor 0.4.1 → 0.5.0

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
  SHA256:
3
- metadata.gz: 875df74665c08b8bf0e4635883a05948da1f081112b482a3a0131603d453e708
4
- data.tar.gz: 6cc44d2eed9d30462bbad0869da85d17da1a1a5a275667cbe940eb376eded6f3
3
+ metadata.gz: a3c5016ea7f30bfad3cedc6f375d495b1a998c74e74e16d0a02456c6af9f7211
4
+ data.tar.gz: 2248deff3a6d9c943c0d2302ae4435fb07cd3d6e62eae93f3e53e3b57c32357a
5
5
  SHA512:
6
- metadata.gz: f689da0ed44d1ea65c5d724b4025c133ce54a51e6e6f6941e06eddabaab85fcb98686522e92e745f14d72e0db2a8dff404f9ddd7af11078c9f8d6a7ed67a140e
7
- data.tar.gz: 1a97c168e9081d1b4c565d324eced4fbb48611e6af34fba45e9d2fcaa1029788f4bac3328192d5bd87872971102968bdaa1f44a5609836b235afbf7e938820d3
6
+ metadata.gz: 37db447ae0d55f7fe2e8139c7d8d045e9472787f61b7034e66d9c8d07013079a2bf4409a934e256bdc7b1130cb0954754db099b0b959b7c1c39e6aeb27c3ea35
7
+ data.tar.gz: 63f111aa5ab9ae0931ced51074a653af946af6b9838f40d5c1402f64266fb47b1cb89cd079febadf8035d99f687818d104c81b57c7f1b977bbe6520fad35c549
@@ -6,7 +6,7 @@ jobs:
6
6
  fail-fast: true
7
7
  matrix:
8
8
  os: [ubuntu-latest]
9
- ruby: [2.6, 2.7, "3.0", 3.1, 3.2, 3.3, 3.4] # Due to https://github.com/actions/runner/issues/849
9
+ ruby: ["3.0", 3.1, 3.2, 3.3] # Due to https://github.com/actions/runner/issues/849
10
10
  runs-on: ${{ matrix.os }}
11
11
  steps:
12
12
  - uses: actions/checkout@v2
@@ -15,13 +15,3 @@ jobs:
15
15
  ruby-version: ${{ matrix.ruby }}
16
16
  bundler-cache: true
17
17
  - run: bundle exec rake
18
-
19
- lint:
20
- runs-on: ubuntu-latest
21
- steps:
22
- - uses: actions/checkout@v2
23
- - uses: ruby/setup-ruby@v1
24
- with:
25
- ruby-version: 2.7
26
- bundler-cache: true
27
- - run: bundle exec rubocop
@@ -0,0 +1,2 @@
1
+ plugins:
2
+ - rubocop-rake
data/.standard.yml ADDED
@@ -0,0 +1,2 @@
1
+ extend_config:
2
+ - .rubocop-rake-rspec.yml
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## Unreleased
2
2
 
3
+ ## v0.4.1 - 2025-04-09
4
+
5
+ - Handle more errors [#15](https://github.com/Teamtailor/teamtailor-rb/pull/15)
6
+ - Fix issue with invalid request header [#14](https://github.com/Teamtailor/teamtailor-rb/pull/14)
7
+
3
8
  ## v0.4.0 - 2021-09-06
4
9
 
5
10
  - Added `Client#create_upload`
data/Gemfile CHANGED
@@ -9,9 +9,9 @@ gem "rake", "~> 12.0"
9
9
 
10
10
  group :test do
11
11
  gem "rspec", "~> 3.0"
12
- gem "rubocop"
13
- gem "rubocop-rake"
14
- gem "rubocop-rspec"
15
12
  gem "webmock", "~> 3.4", ">= 3.4.2"
16
13
  gem "simplecov", require: false
14
+
15
+ gem "standard"
16
+ gem "rubocop-rake"
17
17
  end
data/Gemfile.lock CHANGED
@@ -1,31 +1,39 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- teamtailor (0.4.1)
4
+ teamtailor (0.5.0)
5
5
  typhoeus (~> 1.4.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- addressable (2.8.0)
11
- public_suffix (>= 2.0.2, < 5.0)
12
- ast (2.4.2)
13
- crack (0.4.3)
14
- safe_yaml (~> 1.0.0)
10
+ addressable (2.8.7)
11
+ public_suffix (>= 2.0.2, < 7.0)
12
+ ast (2.4.3)
13
+ bigdecimal (3.1.9)
14
+ crack (1.0.0)
15
+ bigdecimal
16
+ rexml
15
17
  diff-lcs (1.3)
16
18
  docile (1.3.2)
17
19
  ethon (0.16.0)
18
20
  ffi (>= 1.15.0)
19
21
  ffi (1.17.0)
20
- hashdiff (1.0.1)
21
- parallel (1.20.1)
22
- parser (3.0.0.0)
22
+ hashdiff (1.1.2)
23
+ json (2.10.2)
24
+ language_server-protocol (3.17.0.4)
25
+ lint_roller (1.1.0)
26
+ parallel (1.26.3)
27
+ parser (3.3.7.4)
23
28
  ast (~> 2.4.1)
24
- public_suffix (4.0.7)
25
- rainbow (3.0.0)
29
+ racc
30
+ prism (1.4.0)
31
+ public_suffix (6.0.1)
32
+ racc (1.8.1)
33
+ rainbow (3.1.1)
26
34
  rake (12.3.3)
27
- regexp_parser (2.0.3)
28
- rexml (3.2.5)
35
+ regexp_parser (2.10.0)
36
+ rexml (3.4.1)
29
37
  rspec (3.9.0)
30
38
  rspec-core (~> 3.9.0)
31
39
  rspec-expectations (~> 3.9.0)
@@ -39,33 +47,51 @@ GEM
39
47
  diff-lcs (>= 1.2.0, < 2.0)
40
48
  rspec-support (~> 3.9.0)
41
49
  rspec-support (3.9.2)
42
- rubocop (1.9.1)
50
+ rubocop (1.75.2)
51
+ json (~> 2.3)
52
+ language_server-protocol (~> 3.17.0.2)
53
+ lint_roller (~> 1.1.0)
43
54
  parallel (~> 1.10)
44
- parser (>= 3.0.0.0)
55
+ parser (>= 3.3.0.2)
45
56
  rainbow (>= 2.2.2, < 4.0)
46
- regexp_parser (>= 1.8, < 3.0)
47
- rexml
48
- rubocop-ast (>= 1.2.0, < 2.0)
57
+ regexp_parser (>= 2.9.3, < 3.0)
58
+ rubocop-ast (>= 1.44.0, < 2.0)
49
59
  ruby-progressbar (~> 1.7)
50
- unicode-display_width (>= 1.4.0, < 3.0)
51
- rubocop-ast (1.4.1)
52
- parser (>= 2.7.1.5)
53
- rubocop-rake (0.5.1)
54
- rubocop
55
- rubocop-rspec (2.2.0)
56
- rubocop (~> 1.0)
57
- rubocop-ast (>= 1.1.0)
58
- ruby-progressbar (1.11.0)
59
- safe_yaml (1.0.5)
60
+ unicode-display_width (>= 2.4.0, < 4.0)
61
+ rubocop-ast (1.44.0)
62
+ parser (>= 3.3.7.2)
63
+ prism (~> 1.4)
64
+ rubocop-performance (1.25.0)
65
+ lint_roller (~> 1.1)
66
+ rubocop (>= 1.75.0, < 2.0)
67
+ rubocop-ast (>= 1.38.0, < 2.0)
68
+ rubocop-rake (0.7.1)
69
+ lint_roller (~> 1.1)
70
+ rubocop (>= 1.72.1)
71
+ ruby-progressbar (1.13.0)
60
72
  simplecov (0.18.5)
61
73
  docile (~> 1.1)
62
74
  simplecov-html (~> 0.11)
63
75
  simplecov-html (0.12.3)
76
+ standard (1.49.0)
77
+ language_server-protocol (~> 3.17.0.2)
78
+ lint_roller (~> 1.0)
79
+ rubocop (~> 1.75.2)
80
+ standard-custom (~> 1.0.0)
81
+ standard-performance (~> 1.8)
82
+ standard-custom (1.0.2)
83
+ lint_roller (~> 1.0)
84
+ rubocop (~> 1.50)
85
+ standard-performance (1.8.0)
86
+ lint_roller (~> 1.1)
87
+ rubocop-performance (~> 1.25.0)
64
88
  typhoeus (1.4.1)
65
89
  ethon (>= 0.9.0)
66
- unicode-display_width (2.0.0)
67
- webmock (3.8.3)
68
- addressable (>= 2.3.6)
90
+ unicode-display_width (3.1.4)
91
+ unicode-emoji (~> 4.0, >= 4.0.4)
92
+ unicode-emoji (4.0.4)
93
+ webmock (3.25.1)
94
+ addressable (>= 2.8.0)
69
95
  crack (>= 0.3.2)
70
96
  hashdiff (>= 0.4.0, < 2.0.0)
71
97
 
@@ -75,12 +101,11 @@ PLATFORMS
75
101
  DEPENDENCIES
76
102
  rake (~> 12.0)
77
103
  rspec (~> 3.0)
78
- rubocop
79
104
  rubocop-rake
80
- rubocop-rspec
81
105
  simplecov
106
+ standard
82
107
  teamtailor!
83
108
  webmock (~> 3.4, >= 3.4.2)
84
109
 
85
110
  BUNDLED WITH
86
- 2.2.22
111
+ 2.5.23
data/Rakefile CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  require "bundler/gem_tasks"
4
4
  require "rspec/core/rake_task"
5
+ require "standard/rake"
5
6
 
6
7
  RSpec::Core::RakeTask.new(:spec)
7
8
 
8
- task default: :spec
9
+ task default: [:spec, :standard]
@@ -17,7 +17,7 @@ module Teamtailor
17
17
  api_version: api_version,
18
18
  path: "/v1/company",
19
19
  params: {
20
- "include" => include.join(","),
20
+ "include" => include.join(",")
21
21
  }
22
22
  ).call
23
23
  end
@@ -31,25 +31,25 @@ module Teamtailor
31
31
  params: {
32
32
  "page[number]" => page,
33
33
  "page[size]" => 30,
34
- "include" => include.join(","),
34
+ "include" => include.join(",")
35
35
  }
36
36
  ).call
37
37
  end
38
38
 
39
39
  def create_candidate(attributes:, relationships:)
40
40
  Teamtailor::Request.new(
41
- base_url: base_url,
42
- api_token: api_token,
43
- api_version: api_version,
44
- path: "/v1/candidates",
45
- method: :post,
46
- body: {
47
- data: {
48
- type: "candidates",
49
- attributes: attributes.transform_keys { |k| k.to_s.gsub("_", "-") },
50
- relationships: relationships,
51
- },
41
+ base_url: base_url,
42
+ api_token: api_token,
43
+ api_version: api_version,
44
+ path: "/v1/candidates",
45
+ method: :post,
46
+ body: {
47
+ data: {
48
+ type: "candidates",
49
+ attributes: attributes.transform_keys { |k| k.to_s.tr("_", "-") },
50
+ relationships: relationships
52
51
  }
52
+ }
53
53
  ).call
54
54
  end
55
55
 
@@ -64,7 +64,7 @@ module Teamtailor
64
64
  params: {
65
65
  "page[number]" => page,
66
66
  "page[size]" => 30,
67
- "include" => include.join(","),
67
+ "include" => include.join(",")
68
68
  }.merge(filter_params)
69
69
  ).call
70
70
  end
@@ -78,42 +78,42 @@ module Teamtailor
78
78
  params: {
79
79
  "page[number]" => page,
80
80
  "page[size]" => 30,
81
- "include" => include.join(","),
81
+ "include" => include.join(",")
82
82
  }
83
83
  ).call
84
84
  end
85
85
 
86
86
  def create_upload(attributes:, relationships:)
87
87
  Teamtailor::Request.new(
88
- base_url: base_url,
89
- api_token: api_token,
90
- api_version: api_version,
91
- path: "/v1/uploads",
92
- method: :post,
93
- body: {
94
- data: {
95
- type: "uploads",
96
- attributes: attributes.transform_keys { |k| k.to_s.gsub("_", "-") },
97
- relationships: relationships,
98
- },
88
+ base_url: base_url,
89
+ api_token: api_token,
90
+ api_version: api_version,
91
+ path: "/v1/uploads",
92
+ method: :post,
93
+ body: {
94
+ data: {
95
+ type: "uploads",
96
+ attributes: attributes.transform_keys { |k| k.to_s.tr("_", "-") },
97
+ relationships: relationships
99
98
  }
99
+ }
100
100
  ).call
101
101
  end
102
102
 
103
103
  def create_job_application(attributes:, relationships:)
104
104
  Teamtailor::Request.new(
105
- base_url: base_url,
106
- api_token: api_token,
107
- api_version: api_version,
108
- path: "/v1/job-applications",
109
- method: :post,
110
- body: {
111
- data: {
112
- type: "job-applications",
113
- attributes: attributes.transform_keys { |k| k.to_s.gsub("_", "-") },
114
- relationships: relationships,
115
- },
105
+ base_url: base_url,
106
+ api_token: api_token,
107
+ api_version: api_version,
108
+ path: "/v1/job-applications",
109
+ method: :post,
110
+ body: {
111
+ data: {
112
+ type: "job-applications",
113
+ attributes: attributes.transform_keys { |k| k.to_s.tr("_", "-") },
114
+ relationships: relationships
116
115
  }
116
+ }
117
117
  ).call
118
118
  end
119
119
 
@@ -126,7 +126,7 @@ module Teamtailor
126
126
  params: {
127
127
  "page[number]" => page,
128
128
  "page[size]" => 30,
129
- "include" => include.join(","),
129
+ "include" => include.join(",")
130
130
  }
131
131
  ).call
132
132
  end
@@ -140,7 +140,7 @@ module Teamtailor
140
140
  params: {
141
141
  "page[number]" => page,
142
142
  "page[size]" => 30,
143
- "include" => include.join(","),
143
+ "include" => include.join(",")
144
144
  }
145
145
  ).call
146
146
  end
@@ -154,7 +154,7 @@ module Teamtailor
154
154
  params: {
155
155
  "page[number]" => page,
156
156
  "page[size]" => 30,
157
- "include" => include.join(","),
157
+ "include" => include.join(",")
158
158
  }
159
159
  ).call
160
160
  end
@@ -168,7 +168,7 @@ module Teamtailor
168
168
  params: {
169
169
  "page[number]" => page,
170
170
  "page[size]" => 30,
171
- "include" => include.join(","),
171
+ "include" => include.join(",")
172
172
  }
173
173
  ).call
174
174
  end
@@ -182,7 +182,7 @@ module Teamtailor
182
182
  params: {
183
183
  "page[number]" => page,
184
184
  "page[size]" => 30,
185
- "include" => include.join(","),
185
+ "include" => include.join(",")
186
186
  }
187
187
  ).call
188
188
  end
@@ -196,7 +196,7 @@ module Teamtailor
196
196
  params: {
197
197
  "page[number]" => page,
198
198
  "page[size]" => 30,
199
- "include" => include.join(","),
199
+ "include" => include.join(",")
200
200
  }
201
201
  ).call
202
202
  end
@@ -210,7 +210,7 @@ module Teamtailor
210
210
  params: {
211
211
  "page[number]" => page,
212
212
  "page[size]" => 30,
213
- "include" => include.join(","),
213
+ "include" => include.join(",")
214
214
  }
215
215
  ).call
216
216
  end
@@ -224,7 +224,7 @@ module Teamtailor
224
224
  params: {
225
225
  "page[number]" => page,
226
226
  "page[size]" => 30,
227
- "include" => include.join(","),
227
+ "include" => include.join(",")
228
228
  }
229
229
  ).call
230
230
  end
@@ -238,7 +238,7 @@ module Teamtailor
238
238
  params: {
239
239
  "page[number]" => page,
240
240
  "page[size]" => 30,
241
- "include" => include.join(","),
241
+ "include" => include.join(",")
242
242
  }
243
243
  ).call
244
244
  end
@@ -252,7 +252,7 @@ module Teamtailor
252
252
  params: {
253
253
  "page[number]" => page,
254
254
  "page[size]" => 30,
255
- "include" => include.join(","),
255
+ "include" => include.join(",")
256
256
  }
257
257
  ).call
258
258
  end
@@ -14,6 +14,8 @@ module Teamtailor
14
14
  Teamtailor::InvalidApiVersionError.new(error_message)
15
15
  when 422
16
16
  Teamtailor::UnprocessableEntityError.new(error_message)
17
+ when 429
18
+ RateLimitError.new
17
19
  when 400..499
18
20
  ClientError.new(error_message)
19
21
  when 500..599
@@ -24,11 +26,9 @@ module Teamtailor
24
26
  end
25
27
 
26
28
  def self.parse_body(body)
27
- begin
28
- JSON.parse(body)
29
- rescue JSON::ParserError => e
30
- {}
31
- end
29
+ JSON.parse(body)
30
+ rescue JSON::ParserError
31
+ {}
32
32
  end
33
33
  end
34
34
 
@@ -48,5 +48,7 @@ module Teamtailor
48
48
 
49
49
  class UnprocessableEntityError < ClientError; end
50
50
 
51
+ class RateLimitError < ClientError; end
52
+
51
53
  class UnknownResponseError < Error; end
52
54
  end
@@ -15,20 +15,24 @@ module Teamtailor
15
15
  def serialize
16
16
  {
17
17
  data: data,
18
- included: included,
18
+ included: included
19
19
  }.to_json
20
20
  end
21
21
 
22
22
  def method_missing(m)
23
23
  if m == :id
24
24
  data.dig("id").to_i
25
- elsif relationship_keys.include?(m.to_s.gsub("_", "-"))
26
- build_relationship(m.to_s.gsub("_", "-"))
25
+ elsif relationship_keys.include?(m.to_s.tr("_", "-"))
26
+ build_relationship(m.to_s.tr("_", "-"))
27
27
  else
28
- data.dig("attributes", m.to_s.gsub("_", "-"))
28
+ data.dig("attributes", m.to_s.tr("_", "-"))
29
29
  end
30
30
  end
31
31
 
32
+ def respond_to_missing?(m, include_private = false)
33
+ m == :id || relationship_keys.include?(m.to_s.tr("_", "-")) || data.dig("attributes")&.key?(m.to_s.tr("_", "-")) || super
34
+ end
35
+
32
36
  private
33
37
 
34
38
  attr_reader :data, :included
@@ -19,7 +19,7 @@ module Teamtailor
19
19
  record_ids.include?(k["id"]) && k["type"] == record_type
20
20
  end
21
21
 
22
- Teamtailor::Parser.parse({ "data" => record_json, "included" => included })
22
+ Teamtailor::Parser.parse({"data" => record_json, "included" => included})
23
23
  end
24
24
 
25
25
  private
@@ -43,10 +43,10 @@ module Teamtailor
43
43
 
44
44
  def request_headers
45
45
  {
46
- "Authorization": "Token token=#{api_token}",
46
+ :Authorization => "Token token=#{api_token}",
47
47
  "X-Api-Version" => api_version,
48
48
  "User-Agent" => "teamtailor-rb v#{Teamtailor::VERSION}",
49
- "Content-Type" => "application/vnd.api+json",
49
+ "Content-Type" => "application/vnd.api+json"
50
50
  }
51
51
  end
52
52
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Teamtailor
4
- VERSION = "0.4.1"
4
+ VERSION = "0.5.0"
5
5
  end
data/teamtailor.gemspec CHANGED
@@ -3,19 +3,19 @@
3
3
  require_relative "lib/teamtailor/version"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = "teamtailor"
7
- spec.version = Teamtailor::VERSION
8
- spec.authors = ["André Ligné"]
9
- spec.email = ["hi@andreligne.se"]
6
+ spec.name = "teamtailor"
7
+ spec.version = Teamtailor::VERSION
8
+ spec.authors = ["André Ligné", "Jonas Brusman"]
9
+ spec.email = ["andre@teamtailor.com", "jonas@teamtailor.com"]
10
10
 
11
- spec.summary = "Library for interacting with the Teamtailor API"
12
- spec.homepage = "https://github.com/teamtailor/teamtailor-gem"
13
- spec.license = "MIT"
11
+ spec.summary = "Library for interacting with the Teamtailor API"
12
+ spec.homepage = "https://github.com/Teamtailor/teamtailor-rb"
13
+ spec.license = "MIT"
14
14
  spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
15
15
 
16
16
  spec.metadata["homepage_uri"] = spec.homepage
17
- spec.metadata["source_code_uri"] = "https://github.com/bzf/teamtailor-rb"
18
- spec.metadata["changelog_uri"] = "https://github.com/bzf/teamtailor-rb/main/CHANGELOG.md"
17
+ spec.metadata["source_code_uri"] = "https://github.com/Teamtailor/teamtailor-rb"
18
+ spec.metadata["changelog_uri"] = "https://github.com/Teamtailor/teamtailor-rb/main/CHANGELOG.md"
19
19
 
20
20
  spec.extra_rdoc_files = ["README.md"]
21
21
 
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
30
30
  f.match(%r{^(test|spec|features)/})
31
31
  end
32
32
  end
33
- spec.bindir = "exe"
34
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
33
+ spec.bindir = "exe"
34
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
35
35
  spec.require_paths = ["lib"]
36
36
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teamtailor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Ligné
8
+ - Jonas Brusman
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2025-04-09 00:00:00.000000000 Z
12
+ date: 2025-09-16 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rspec
@@ -40,7 +41,8 @@ dependencies:
40
41
  version: 1.4.0
41
42
  description:
42
43
  email:
43
- - hi@andreligne.se
44
+ - andre@teamtailor.com
45
+ - jonas@teamtailor.com
44
46
  executables: []
45
47
  extensions: []
46
48
  extra_rdoc_files:
@@ -49,7 +51,8 @@ files:
49
51
  - ".github/workflows/ruby.yml"
50
52
  - ".gitignore"
51
53
  - ".rspec"
52
- - ".rubocop.yml"
54
+ - ".rubocop-rake-rspec.yml"
55
+ - ".standard.yml"
53
56
  - ".travis.yml"
54
57
  - CHANGELOG.md
55
58
  - Gemfile
@@ -85,13 +88,13 @@ files:
85
88
  - lib/teamtailor/request.rb
86
89
  - lib/teamtailor/version.rb
87
90
  - teamtailor.gemspec
88
- homepage: https://github.com/teamtailor/teamtailor-gem
91
+ homepage: https://github.com/Teamtailor/teamtailor-rb
89
92
  licenses:
90
93
  - MIT
91
94
  metadata:
92
- homepage_uri: https://github.com/teamtailor/teamtailor-gem
93
- source_code_uri: https://github.com/bzf/teamtailor-rb
94
- changelog_uri: https://github.com/bzf/teamtailor-rb/main/CHANGELOG.md
95
+ homepage_uri: https://github.com/Teamtailor/teamtailor-rb
96
+ source_code_uri: https://github.com/Teamtailor/teamtailor-rb
97
+ changelog_uri: https://github.com/Teamtailor/teamtailor-rb/main/CHANGELOG.md
95
98
  post_install_message:
96
99
  rdoc_options: []
97
100
  require_paths:
data/.rubocop.yml DELETED
@@ -1,129 +0,0 @@
1
- require:
2
- - rubocop-rake
3
- - rubocop-rspec
4
-
5
- AllCops:
6
- TargetRubyVersion: 2.7
7
- # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
8
- # to ignore them, so only the ones explicitly set in this file are enabled.
9
- DisabledByDefault: true
10
-
11
- # Prefer &&/|| over and/or.
12
- Style/AndOr:
13
- Enabled: true
14
-
15
- # Align `when` with `case`.
16
- Layout/CaseIndentation:
17
- Enabled: false
18
-
19
- # Align comments with method definitions.
20
- Layout/CommentIndentation:
21
- Enabled: true
22
-
23
- # No extra empty lines.
24
- Layout/EmptyLines:
25
- Enabled: true
26
-
27
- # In a regular class definition, no empty lines around the body.
28
- Layout/EmptyLinesAroundClassBody:
29
- Enabled: true
30
-
31
- # In a regular method definition, no empty lines around the body.
32
- Layout/EmptyLinesAroundMethodBody:
33
- Enabled: true
34
-
35
- # In a regular module definition, no empty lines around the body.
36
- Layout/EmptyLinesAroundModuleBody:
37
- Enabled: true
38
-
39
- # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
40
- Style/HashSyntax:
41
- Enabled: true
42
-
43
- # Method definitions after `private` or `protected` isolated calls need one
44
- # extra level of indentation.
45
- Layout/IndentationConsistency:
46
- Enabled: false
47
-
48
- # Two spaces, no tabs (for indentation).
49
- Layout/IndentationWidth:
50
- Enabled: true
51
-
52
- Layout/SpaceAfterColon:
53
- Enabled: true
54
-
55
- Layout/SpaceAfterComma:
56
- Enabled: true
57
-
58
- Layout/SpaceAroundEqualsInParameterDefault:
59
- Enabled: true
60
-
61
- Layout/SpaceAroundKeyword:
62
- Enabled: true
63
-
64
- Layout/EmptyLinesAroundBlockBody:
65
- Enabled: true
66
-
67
- Layout/SpaceAroundOperators:
68
- Enabled: true
69
-
70
- Layout/SpaceBeforeFirstArg:
71
- Enabled: true
72
-
73
- # Defining a method with parameters needs parentheses.
74
- Style/MethodDefParentheses:
75
- Enabled: true
76
-
77
- # Use `foo {}` not `foo{}`.
78
- Layout/SpaceBeforeBlockBraces:
79
- Enabled: true
80
-
81
- # Use `foo { bar }` not `foo {bar}`.
82
- Layout/SpaceInsideBlockBraces:
83
- Enabled: true
84
-
85
- # Use `{ a: 1 }` not `{a:1}`.
86
- Layout/SpaceInsideHashLiteralBraces:
87
- Enabled: true
88
-
89
- Layout/SpaceInsideParens:
90
- Enabled: true
91
-
92
- # Check quotes usage according to lint rule below.
93
- Style/StringLiterals:
94
- Enabled: true
95
- EnforcedStyle: double_quotes
96
-
97
- # Detect hard tabs, no hard tabs.
98
- Layout/IndentationStyle:
99
- Enabled: true
100
-
101
- # Blank lines should not have any spaces.
102
- Layout/TrailingEmptyLines:
103
- Enabled: true
104
-
105
- # No trailing whitespace.
106
- Layout/TrailingWhitespace:
107
- Enabled: true
108
-
109
- # Use quotes for string literals when they are enough.
110
- Style/RedundantPercentQ:
111
- Enabled: true
112
-
113
- # Align `end` with the matching keyword or starting expression except for
114
- # assignments, where it should be aligned with the LHS.
115
- Layout/EndAlignment:
116
- Enabled: true
117
- EnforcedStyleAlignWith: variable
118
-
119
- # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
120
- Lint/RequireParentheses:
121
- Enabled: true
122
-
123
- Style/TrailingCommaInArrayLiteral:
124
- Enabled: true
125
- EnforcedStyleForMultiline: consistent_comma
126
-
127
- Style/TrailingCommaInHashLiteral:
128
- Enabled: true
129
- EnforcedStyleForMultiline: consistent_comma