granite 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/granite/version.rb +1 -1
- data/lib/rubocop-granite.rb +8 -0
- data/lib/rubocop/granite.rb +9 -0
- data/lib/rubocop/granite/inject.rb +20 -0
- metadata +24 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5ed01c6853ba3bf3e13e4881c89aac4bdaa5d58737237878602df69ae494bba
|
4
|
+
data.tar.gz: 8c4a75737a577c8f1fb36a8fbb12413aaa0d2d5722e990135f43d6cea52ef619
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8b7af99f9099f4e2b49bcd1a6addbab8d03d0439371d65365b652d529b622312ce4ae9c553d55222ddaf6b91b4ba9f0562c5fc15c27834f7c4c306e70c485ed
|
7
|
+
data.tar.gz: 939fb9e924c7a14b08430d85b83b864ae8afb7880f8476b58ecc61e7ec23c6c1906c87ab73d1542f9b25cab701dd54bb75be308e982b3d25f6b528759e628aee
|
data/lib/granite/version.rb
CHANGED
@@ -0,0 +1,9 @@
|
|
1
|
+
module RuboCop
|
2
|
+
module Granite
|
3
|
+
PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze
|
4
|
+
CONFIG_DEFAULT = PROJECT_ROOT.join('config', 'rubocop-default.yml').freeze
|
5
|
+
CONFIG = YAML.safe_load(CONFIG_DEFAULT.read).freeze
|
6
|
+
|
7
|
+
private_constant(:CONFIG_DEFAULT, :PROJECT_ROOT)
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The original code is from https://github.com/rubocop-hq/rubocop-rspec/blob/master/lib/rubocop/rspec/inject.rb
|
4
|
+
# See https://github.com/rubocop-hq/rubocop-rspec/blob/master/MIT-LICENSE.md
|
5
|
+
module RuboCop
|
6
|
+
module Granite
|
7
|
+
# Because RuboCop doesn't yet support plugins, we have to monkey patch in a
|
8
|
+
# bit of our configuration.
|
9
|
+
module Inject
|
10
|
+
def self.defaults!
|
11
|
+
path = CONFIG_DEFAULT.to_s
|
12
|
+
hash = ConfigLoader.load_file(path)
|
13
|
+
config = Config.new(hash, path).tap(&:make_excludes_absolute)
|
14
|
+
puts "configuration from #{path}" if ConfigLoader.debug?
|
15
|
+
config = ConfigLoader.merge_with_default(config, path)
|
16
|
+
ConfigLoader.instance_variable_set(:@default_configuration, config)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: granite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arkadiy Zabazhanov & friends
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -244,28 +244,42 @@ dependencies:
|
|
244
244
|
requirements:
|
245
245
|
- - "~>"
|
246
246
|
- !ruby/object:Gem::Version
|
247
|
-
version:
|
247
|
+
version: 0.78.0
|
248
248
|
type: :development
|
249
249
|
prerelease: false
|
250
250
|
version_requirements: !ruby/object:Gem::Requirement
|
251
251
|
requirements:
|
252
252
|
- - "~>"
|
253
253
|
- !ruby/object:Gem::Version
|
254
|
-
version:
|
254
|
+
version: 0.78.0
|
255
|
+
- !ruby/object:Gem::Dependency
|
256
|
+
name: rubocop-rails
|
257
|
+
requirement: !ruby/object:Gem::Requirement
|
258
|
+
requirements:
|
259
|
+
- - "~>"
|
260
|
+
- !ruby/object:Gem::Version
|
261
|
+
version: 2.4.1
|
262
|
+
type: :development
|
263
|
+
prerelease: false
|
264
|
+
version_requirements: !ruby/object:Gem::Requirement
|
265
|
+
requirements:
|
266
|
+
- - "~>"
|
267
|
+
- !ruby/object:Gem::Version
|
268
|
+
version: 2.4.1
|
255
269
|
- !ruby/object:Gem::Dependency
|
256
270
|
name: rubocop-rspec
|
257
271
|
requirement: !ruby/object:Gem::Requirement
|
258
272
|
requirements:
|
259
273
|
- - "~>"
|
260
274
|
- !ruby/object:Gem::Version
|
261
|
-
version:
|
275
|
+
version: 1.37.0
|
262
276
|
type: :development
|
263
277
|
prerelease: false
|
264
278
|
version_requirements: !ruby/object:Gem::Requirement
|
265
279
|
requirements:
|
266
280
|
- - "~>"
|
267
281
|
- !ruby/object:Gem::Version
|
268
|
-
version:
|
282
|
+
version: 1.37.0
|
269
283
|
- !ruby/object:Gem::Dependency
|
270
284
|
name: simplecov
|
271
285
|
requirement: !ruby/object:Gem::Requirement
|
@@ -349,6 +363,9 @@ files:
|
|
349
363
|
- lib/granite/translations.rb
|
350
364
|
- lib/granite/typecasters.rb
|
351
365
|
- lib/granite/version.rb
|
366
|
+
- lib/rubocop-granite.rb
|
367
|
+
- lib/rubocop/granite.rb
|
368
|
+
- lib/rubocop/granite/inject.rb
|
352
369
|
homepage: https://github.com/toptal/granite
|
353
370
|
licenses:
|
354
371
|
- MIT
|
@@ -368,7 +385,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
368
385
|
- !ruby/object:Gem::Version
|
369
386
|
version: '0'
|
370
387
|
requirements: []
|
371
|
-
rubygems_version: 3.0.
|
388
|
+
rubygems_version: 3.0.3
|
372
389
|
signing_key:
|
373
390
|
specification_version: 4
|
374
391
|
summary: Another business actions architecture for Rails apps
|