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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e06f2d75c545a82168e3e63bd585d96c12e3a76748eec2f533321e1be322281d
4
- data.tar.gz: 42f0c731ff995206cab29f65de076e6d89b41a5e35a85082eee571684e96a6eb
3
+ metadata.gz: 758a15b97b533af6a358ceef86fa7c9714ffefdd34fd2cf2b7427bdbf30b51e8
4
+ data.tar.gz: cdc44222183121bb058bc0ea180dc1c89e4fa96f00b1a8eb9e7f84d0482182fc
5
5
  SHA512:
6
- metadata.gz: '088c6ef81bcf87086d86d9435c3716d4c1c1e96c5c3e44456d21d38248100dde56c11307ea3ad599f456cbf51b379137ed4a3ae96875012d64441849fa1a100d'
7
- data.tar.gz: 92e7b1efd6e421af33d3d3e7fedaf55d74a940f95cbc3818afdcbfed06211b79ba8c8a168babe9a83e9184133a46f6ce38fc71df2be5754a212c6be8c7a8905f
6
+ metadata.gz: 3357f7328d7d869b07fa8d158663ac9b01dde4956d8e4ef06f7dc6cb40dd1636bda263cf7946c05e186bf9aba561bce2e3895d3be3bf3147f66c18d4decbf05d
7
+ data.tar.gz: 96bbd246dff81976f388880a061ab1f68e7256afcaf5db3b77e220d238438340b4e1bff95493af3f5a7277885e193a78ca520f0b3e55eecc51782f96ab952dfd
@@ -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:
@@ -1,11 +1,11 @@
1
- require "rf/stylez/version"
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...
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Rf
3
3
  module Stylez
4
- VERSION = '0.2.18'
4
+ VERSION = '0.2.19'
5
5
  end
6
6
  end
@@ -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
@@ -25,4 +25,5 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency 'rake', '~> 10.0'
26
26
  spec.add_development_dependency 'rspec', '>= 3.4'
27
27
  spec.add_development_dependency 'byebug'
28
+ spec.add_development_dependency 'rspec_junit_formatter'
28
29
  end
@@ -30,6 +30,8 @@ Lint/NoGrapeAPI:
30
30
  Enabled: true
31
31
  Lint/UsePositiveInt32Validator:
32
32
  Enabled: true
33
+ Lint/NoJSON:
34
+ Enabled: true
33
35
 
34
36
  # Good style cops
35
37
  Layout/BlockAlignment:
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.18
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-26 00:00:00.000000000 Z
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