rf-stylez 0.2.18 → 0.2.19
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 +4 -4
- data/.circleci/config.yml +47 -0
- data/lib/rf/stylez.rb +2 -2
- data/lib/rf/stylez/version.rb +1 -1
- data/lib/rubocop/cop/lint/no_json.rb +25 -0
- data/rf-stylez.gemspec +1 -0
- data/ruby/rubocop.yml +2 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 758a15b97b533af6a358ceef86fa7c9714ffefdd34fd2cf2b7427bdbf30b51e8
|
4
|
+
data.tar.gz: cdc44222183121bb058bc0ea180dc1c89e4fa96f00b1a8eb9e7f84d0482182fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3357f7328d7d869b07fa8d158663ac9b01dde4956d8e4ef06f7dc6cb40dd1636bda263cf7946c05e186bf9aba561bce2e3895d3be3bf3147f66c18d4decbf05d
|
7
|
+
data.tar.gz: 96bbd246dff81976f388880a061ab1f68e7256afcaf5db3b77e220d238438340b4e1bff95493af3f5a7277885e193a78ca520f0b3e55eecc51782f96ab952dfd
|
data/.circleci/config.yml
CHANGED
@@ -1,6 +1,47 @@
|
|
1
1
|
version: 2
|
2
2
|
|
3
3
|
jobs:
|
4
|
+
style_check:
|
5
|
+
docker:
|
6
|
+
- image: rainforestapp/circlemator:latest
|
7
|
+
steps:
|
8
|
+
- checkout
|
9
|
+
- run:
|
10
|
+
name: Style check
|
11
|
+
command: circlemator style-check --base-branch=master
|
12
|
+
|
13
|
+
test:
|
14
|
+
docker:
|
15
|
+
- image: circleci/ruby:2.5.1
|
16
|
+
steps:
|
17
|
+
- checkout
|
18
|
+
- restore_cache:
|
19
|
+
key: v1-rf-stylez-{{ checksum "Gemfile.lock" }}
|
20
|
+
- run:
|
21
|
+
name: Install Ruby gems
|
22
|
+
command: |
|
23
|
+
bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
|
24
|
+
- save_cache:
|
25
|
+
key: v1-rf-stylez-{{ checksum "Gemfile.lock" }}
|
26
|
+
paths:
|
27
|
+
- ~/project/vendor/bundle
|
28
|
+
- run:
|
29
|
+
name: Set up test output directory
|
30
|
+
command: sudo install -o circleci -d ~/rspec
|
31
|
+
- run:
|
32
|
+
name: RSpec
|
33
|
+
command: |
|
34
|
+
bundle exec rspec \
|
35
|
+
--color \
|
36
|
+
--require spec_helper \
|
37
|
+
--format documentation \
|
38
|
+
--format RspecJunitFormatter \
|
39
|
+
--out ~/rspec/rspec.xml
|
40
|
+
- store_artifacts:
|
41
|
+
path: ~/rspec
|
42
|
+
- store_test_results:
|
43
|
+
path: ~/rspec
|
44
|
+
|
4
45
|
push_to_rubygems:
|
5
46
|
docker:
|
6
47
|
- image: circleci/ruby:2.5.1
|
@@ -24,6 +65,12 @@ workflows:
|
|
24
65
|
version: 2
|
25
66
|
gem_release:
|
26
67
|
jobs:
|
68
|
+
- test
|
69
|
+
- style_check:
|
70
|
+
filters:
|
71
|
+
branches:
|
72
|
+
ignore:
|
73
|
+
- master
|
27
74
|
- push_to_rubygems:
|
28
75
|
filters:
|
29
76
|
branches:
|
data/lib/rf/stylez.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
require
|
1
|
+
require 'rf/stylez/version'
|
2
2
|
require 'rubocop/cop/lint/no_env'
|
3
|
+
require 'rubocop/cop/lint/no_json'
|
3
4
|
require 'rubocop/cop/lint/no_http_party'
|
4
5
|
require 'rubocop/cop/lint/obscure'
|
5
6
|
require 'rubocop/cop/lint/no_grape_api'
|
6
7
|
require 'rubocop/cop/lint/use_positive_int32_validator'
|
7
8
|
|
8
|
-
|
9
9
|
module Rf
|
10
10
|
module Stylez
|
11
11
|
# Your code goes here...
|
data/lib/rf/stylez/version.rb
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module Lint
|
6
|
+
# @example
|
7
|
+
# # bad
|
8
|
+
# JSON.parse(...)
|
9
|
+
#
|
10
|
+
# # good
|
11
|
+
# MultiJson.load(...)
|
12
|
+
#
|
13
|
+
class NoJSON < Cop
|
14
|
+
MSG = 'Use `MultiJson` instead of `JSON`.'.freeze
|
15
|
+
|
16
|
+
def_node_matcher :is_JSON?, '(const nil? :JSON)'
|
17
|
+
|
18
|
+
def on_const(node)
|
19
|
+
return unless is_JSON?(node)
|
20
|
+
add_offense(node)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/rf-stylez.gemspec
CHANGED
data/ruby/rubocop.yml
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rf-stylez
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emanuel Evans
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec_junit_formatter
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
description: Configurations for Rubocop and other style enforcers/linters
|
84
98
|
email:
|
85
99
|
- emanuel@rainforestqa.com
|
@@ -102,6 +116,7 @@ files:
|
|
102
116
|
- lib/rubocop/cop/lint/no_env.rb
|
103
117
|
- lib/rubocop/cop/lint/no_grape_api.rb
|
104
118
|
- lib/rubocop/cop/lint/no_http_party.rb
|
119
|
+
- lib/rubocop/cop/lint/no_json.rb
|
105
120
|
- lib/rubocop/cop/lint/obscure.rb
|
106
121
|
- lib/rubocop/cop/lint/use_positive_int32_validator.rb
|
107
122
|
- rf-stylez.gemspec
|