massa 0.5.0 → 0.6.0

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: 117b89c8f6657f2b09c21ee8993ec6cbe415f748
4
- data.tar.gz: 49e7a3ed5efb84fca65248bb24ac295138b623bc
2
+ SHA256:
3
+ metadata.gz: c1501e94d1e08232ca61a789e9013f6cd01b31a3cad9f6bdb01c7d9c50c2c7b2
4
+ data.tar.gz: d1fbf28b3f52d31be7f349f57cbdbf36232fec2359ccd160d547aff42e3e8b5b
5
5
  SHA512:
6
- metadata.gz: 8ede0e57e1925cc5876b121d81bb3bea76b4a4a0eb988e962273650434567c5ac5df50bb6590b5e3f3001a2d1b38f859a08adbbd4d7faeb968373e54a3845d18
7
- data.tar.gz: 3cbe381a9696facfa94769206a2e1b66125128428e9ffe420eb6ff061c146a00ff57738c308a2ada4ec39d52ace978d665c1e4bb81be36ba226ac37c6ff251bd
6
+ metadata.gz: a1f8dd215b579b94deb12f4e73597faaef6701fd2643465628047282376de1f393697b190351b8cce80b372aecc4d6a04820dfa78b595b7929647db55f3793f0
7
+ data.tar.gz: 160a9788b62833f8a51b40538fcc61eae22a665e2d504c121b4976c08c54dc565a8108bb81adf5520cb5710e6e27f205f0a229930d8734e34f98a9b8d30251d2
data/.gitignore CHANGED
@@ -3,6 +3,7 @@
3
3
  /_yardoc/
4
4
  /coverage/
5
5
  /doc/
6
+ /Gemfile.lock
6
7
  /pkg/
7
8
  /spec/reports/
8
9
  /tmp/
@@ -1,25 +1,54 @@
1
1
  require: rubocop-rspec
2
2
 
3
3
  AllCops:
4
- TargetRubyVersion: 2.3
5
- DisplayCopNames: true
6
-
7
- Exclude:
8
- # FIXME: Remove lines below when https://github.com/nevir/rubocop-rspec/issues/62 is fixed
9
- - 'spec/**/*'
10
-
11
- Metrics/LineLength:
12
- Max: 100
4
+ TargetRubyVersion: 2.7
13
5
 
14
6
  Metrics/MethodLength:
15
7
  Max: 20
16
8
 
9
+ Metrics/AbcSize:
10
+ Max: 25
11
+
17
12
  Style/Documentation:
18
13
  Enabled: false
19
14
 
15
+ Layout/LineLength:
16
+ Max: 100
17
+
18
+ Layout/EmptyLinesAroundArguments:
19
+ Enabled: false
20
+
21
+ Layout/EmptyLinesAroundAttributeAccessor:
22
+ Enabled: true
23
+
24
+ Layout/SpaceAroundMethodCallOperator:
25
+ Enabled: true
26
+
27
+ Lint/RaiseException:
28
+ Enabled: true
29
+
30
+ Lint/StructNewOverride:
31
+ Enabled: true
32
+
33
+ Style/ExponentialNotation:
34
+ Enabled: true
35
+
36
+ Style/HashEachMethods:
37
+ Enabled: true
38
+
39
+ Style/HashTransformKeys:
40
+ Enabled: true
41
+
42
+ Style/HashTransformValues:
43
+ Enabled: true
44
+
45
+ Style/SlicingWithRange:
46
+ Enabled: true
47
+
20
48
  RSpec/DescribeClass:
21
49
  Exclude:
22
- - 'spec/bin/**/*'
50
+ - spec/bin/**/*
23
51
 
24
- Metrics/AbcSize:
25
- Max: 25
52
+ RSpec/ExampleLength:
53
+ Exclude:
54
+ - spec/bin/**/*
@@ -1,8 +1,15 @@
1
1
  language: ruby
2
2
 
3
+ sudo: false
4
+
5
+ cache: bundler
6
+
7
+ script:
8
+ - bundle exec rubocop
9
+ - bundle exec rspec
10
+
3
11
  rvm:
4
- - 2.3.0
5
- before_install: gem install bundler -v 1.11.2
12
+ - 2.7
6
13
 
7
14
  addons:
8
15
  code_climate:
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 Lucas Caton
3
+ Copyright (c) Lucas Caton
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,11 +1,12 @@
1
1
  # 👌 Massa
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/massa.svg)](https://rubygems.org/gems/massa)
4
+ [![Dependency Status](https://gemnasium.com/badges/github.com/lucascaton/massa.svg)](https://gemnasium.com/github.com/lucascaton/massa)
4
5
  [![Build Status](https://travis-ci.org/lucascaton/massa.svg?branch=master)](https://travis-ci.org/lucascaton/massa)
5
6
  [![Test Coverage](https://codeclimate.com/github/lucascaton/massa/badges/coverage.svg)](https://codeclimate.com/github/lucascaton/massa/coverage)
6
7
  [![Code Climate](https://codeclimate.com/github/lucascaton/massa/badges/gpa.svg)](https://codeclimate.com/github/lucascaton/massa)
7
8
 
8
- It's not rare to have Ruby (and Rails) projects becomming hard to maintain and less fun after a while.
9
+ It's not rare to have Ruby (and Rails) projects becoming hard to maintain and less fun after a while.
9
10
  This gem helps you to keep or increase the quality, good practices and security of your projects.
10
11
 
11
12
  **Massa** can run in your CI using different code analyzers tools along with automated tests, instead of running only your automated tests.
@@ -46,6 +47,8 @@ Generate a config file (optional):
46
47
 
47
48
  $ bundle exec massa -g
48
49
 
50
+ This will generate a `config/massa.yml` file, which you can customize.
51
+
49
52
  Then, run:
50
53
 
51
54
  $ bundle exec massa
@@ -68,4 +71,4 @@ The gem is available as open source under the terms of the [MIT License](http://
68
71
 
69
72
  ## Copyright
70
73
 
71
- Copyright (c) 2016 Lucas Caton.
74
+ Copyright (c) Lucas Caton.
data/bin/massa CHANGED
@@ -4,7 +4,7 @@
4
4
  require 'optparse'
5
5
  require 'massa'
6
6
 
7
- $LOAD_PATH.push File.expand_path('../../lib', __FILE__)
7
+ $LOAD_PATH.push File.expand_path('../lib', __dir__)
8
8
 
9
9
  options = {}
10
10
 
@@ -12,7 +12,7 @@ OptionParser.new do |opts|
12
12
  opts.banner = 'Usage: massa [options]'
13
13
 
14
14
  opts.on('-g', '--generate-config', 'Generate config file') do
15
- template = File.expand_path('../../lib/massa/templates/massa.yml', __FILE__)
15
+ template = File.expand_path('../lib/massa/templates/massa.yml', __dir__)
16
16
  config_file = 'config/massa.yml'
17
17
 
18
18
  FileUtils.mkdir_p(File.dirname(config_file))
@@ -8,10 +8,11 @@ require 'English'
8
8
  module Massa
9
9
  class Analyzier
10
10
  attr_reader :verbose
11
+
11
12
  alias verbose? verbose
12
13
 
13
14
  def self.run!(options)
14
- new(options).run!
15
+ new(**options).run!
15
16
  end
16
17
 
17
18
  def initialize(verbose: false)
@@ -44,7 +45,7 @@ module Massa
44
45
  if verbose?
45
46
  system(tool.command)
46
47
  else
47
- IO.popen(tool.command, err: [:child, :out]) { |io| command_output = io.read }
48
+ IO.popen(tool.command, err: %i[child out]) { |io| command_output = io.read }
48
49
  end
49
50
 
50
51
  return if $CHILD_STATUS.success?
@@ -38,7 +38,7 @@ module Massa
38
38
  end
39
39
 
40
40
  def config_file_from_gem
41
- File.expand_path('../../../config/default_tools.yml', __FILE__)
41
+ File.expand_path('../../config/default_tools.yml', __dir__)
42
42
  end
43
43
 
44
44
  def config_file_from_project
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Massa
4
- VERSION = '0.5.0'
4
+ VERSION = '0.6.0'
5
5
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('../lib', __FILE__)
3
+ lib = File.expand_path('lib', __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  require 'massa/version'
6
6
 
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = 'Keep the quality, good practices and security of Rails projects.'
13
13
  spec.description = 'Keep the quality, good practices and security of Rails projects.'
14
- spec.homepage = 'http://github.com/lucascaton/massa'
14
+ spec.homepage = 'https://github.com/lucascaton/massa'
15
15
  spec.license = 'MIT'
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(readme|spec)/}) }
@@ -19,12 +19,14 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ['lib']
21
21
 
22
- spec.add_development_dependency 'bundler', '~> 1.11'
23
- spec.add_development_dependency 'rake', '~> 10.0'
24
- spec.add_development_dependency 'rspec', '~> 3.4'
22
+ spec.required_ruby_version = '>= 2.7'
23
+
24
+ spec.add_development_dependency 'bundler'
25
+ spec.add_development_dependency 'codeclimate-test-reporter'
25
26
  spec.add_development_dependency 'pry'
27
+ spec.add_development_dependency 'rake'
28
+ spec.add_development_dependency 'rspec'
26
29
  spec.add_development_dependency 'rubocop'
27
30
  spec.add_development_dependency 'rubocop-rspec'
28
- spec.add_development_dependency 'codeclimate-test-reporter'
29
31
  # spec.add_development_dependency 'simplecov'
30
32
  end
metadata CHANGED
@@ -1,59 +1,59 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: massa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Caton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-19 00:00:00.000000000 Z
11
+ date: 2020-05-19 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
- version: '1.11'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.11'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: codeclimate-test-reporter
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rspec
42
+ name: pry
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '3.4'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '3.4'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: pry
56
+ name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rubocop
70
+ name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rubocop-rspec
84
+ name: rubocop
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: codeclimate-test-reporter
98
+ name: rubocop-rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -121,7 +121,6 @@ files:
121
121
  - ".travis.yml"
122
122
  - CODE_OF_CONDUCT.md
123
123
  - Gemfile
124
- - Gemfile.lock
125
124
  - LICENSE.txt
126
125
  - README.md
127
126
  - Rakefile
@@ -134,7 +133,7 @@ files:
134
133
  - lib/massa/tool.rb
135
134
  - lib/massa/version.rb
136
135
  - massa.gemspec
137
- homepage: http://github.com/lucascaton/massa
136
+ homepage: https://github.com/lucascaton/massa
138
137
  licenses:
139
138
  - MIT
140
139
  metadata: {}
@@ -146,15 +145,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
146
145
  requirements:
147
146
  - - ">="
148
147
  - !ruby/object:Gem::Version
149
- version: '0'
148
+ version: '2.7'
150
149
  required_rubygems_version: !ruby/object:Gem::Requirement
151
150
  requirements:
152
151
  - - ">="
153
152
  - !ruby/object:Gem::Version
154
153
  version: '0'
155
154
  requirements: []
156
- rubyforge_project:
157
- rubygems_version: 2.5.2
155
+ rubygems_version: 3.1.2
158
156
  signing_key:
159
157
  specification_version: 4
160
158
  summary: Keep the quality, good practices and security of Rails projects.
@@ -1,70 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- massa (0.5.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- ast (2.3.0)
10
- codeclimate-test-reporter (1.0.3)
11
- simplecov
12
- coderay (1.1.1)
13
- diff-lcs (1.2.5)
14
- docile (1.1.5)
15
- json (2.0.2)
16
- method_source (0.8.2)
17
- parser (2.3.3.1)
18
- ast (~> 2.2)
19
- powerpack (0.1.1)
20
- pry (0.10.4)
21
- coderay (~> 1.1.0)
22
- method_source (~> 0.8.1)
23
- slop (~> 3.4)
24
- rainbow (2.1.0)
25
- rake (10.5.0)
26
- rspec (3.5.0)
27
- rspec-core (~> 3.5.0)
28
- rspec-expectations (~> 3.5.0)
29
- rspec-mocks (~> 3.5.0)
30
- rspec-core (3.5.4)
31
- rspec-support (~> 3.5.0)
32
- rspec-expectations (3.5.0)
33
- diff-lcs (>= 1.2.0, < 2.0)
34
- rspec-support (~> 3.5.0)
35
- rspec-mocks (3.5.0)
36
- diff-lcs (>= 1.2.0, < 2.0)
37
- rspec-support (~> 3.5.0)
38
- rspec-support (3.5.0)
39
- rubocop (0.46.0)
40
- parser (>= 2.3.1.1, < 3.0)
41
- powerpack (~> 0.1)
42
- rainbow (>= 1.99.1, < 3.0)
43
- ruby-progressbar (~> 1.7)
44
- unicode-display_width (~> 1.0, >= 1.0.1)
45
- rubocop-rspec (1.8.0)
46
- rubocop (>= 0.42.0)
47
- ruby-progressbar (1.8.1)
48
- simplecov (0.12.0)
49
- docile (~> 1.1.0)
50
- json (>= 1.8, < 3)
51
- simplecov-html (~> 0.10.0)
52
- simplecov-html (0.10.0)
53
- slop (3.6.0)
54
- unicode-display_width (1.1.2)
55
-
56
- PLATFORMS
57
- ruby
58
-
59
- DEPENDENCIES
60
- bundler (~> 1.11)
61
- codeclimate-test-reporter
62
- massa!
63
- pry
64
- rake (~> 10.0)
65
- rspec (~> 3.4)
66
- rubocop
67
- rubocop-rspec
68
-
69
- BUNDLED WITH
70
- 1.13.6