rubycritic 2.9.1 → 2.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +38 -19
- data/docs/building-own-code-climate.md +152 -0
- data/docs/core-metrics.md +72 -0
- data/lib/rubycritic/version.rb +1 -1
- data/rubycritic.gemspec +5 -5
- metadata +16 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22e5c323d28fee5bc92ef613ca7435aae70d50a0
|
4
|
+
data.tar.gz: 3836b3346a5b98e90c99d6ac1da9f2faaaeabbff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e349b4ba246bc9c2d40544eeba7908d1cdc71b8af6f7c0a5b54f929f4a085acfcde10d15047e53a956310b44e4739a95b3dd7d52d566c843e3d60b80a389b2b
|
7
|
+
data.tar.gz: b1e9c59fd761ac53096663b9a0deea0433f0d2158618595e1d88c8fa038116f68b0f31e11625ef8157a596883c156d9abe1f270202c0faad0deb12b0000972b3
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# 2.9.2 / 2016-07-01
|
2
|
+
|
3
|
+
* [CHANGE] Upgrade rubocop to 0.41.1 (by nijikon)
|
4
|
+
* [CHANGE] Upgrade flog to 4.4.0 (by nijikon)
|
5
|
+
* [CHANGE] Upgrade flay to 2.8.0 (by nijikon)
|
6
|
+
* [CHANGE] Upgrade Reek to 4.1.0 and Parser to 2.3.1.2 (by y-yagi)
|
7
|
+
|
1
8
|
# 2.9.1 / 2016-05-16
|
2
9
|
|
3
10
|
* [CHANGE] Upgrade 'parser' to 2.3.1.0 (by y-yagi)
|
data/README.md
CHANGED
@@ -8,6 +8,22 @@ RubyCritic
|
|
8
8
|
<img src="http://i.imgur.com/66HACCD.png" alt="RubyCritic Icon" align="right" />
|
9
9
|
RubyCritic is a gem that wraps around static analysis gems such as [Reek][1], [Flay][2] and [Flog][3] to provide a quality report of your Ruby code.
|
10
10
|
|
11
|
+
**Table of Contents**
|
12
|
+
|
13
|
+
- [Overview](#overview)
|
14
|
+
- [Getting Started](#getting-started)
|
15
|
+
- [Usage](#usage)
|
16
|
+
+ [Analyzer Configuration](#analyzer-configuration)
|
17
|
+
+ [Alternative Usage Methods](#alternative-usage-methods)
|
18
|
+
+ [Rake Task](#rake-task)
|
19
|
+
- [Compatibility](#compatibility)
|
20
|
+
- [Improving RubyCritic](#improving-rubyCritic)
|
21
|
+
- [Contributors](#contributors)
|
22
|
+
- [Credits](#credits)
|
23
|
+
|
24
|
+
|
25
|
+
## Overview
|
26
|
+
|
11
27
|
This gem provides features such as:
|
12
28
|
|
13
29
|
1. An overview of your project:
|
@@ -48,8 +64,10 @@ This gem provides features such as:
|
|
48
64
|
**Warning**: If your code is not as you expect it to be after running
|
49
65
|
RubyCritic, please check your source control system stash.
|
50
66
|
|
51
|
-
|
52
|
-
|
67
|
+
Checkout the `/docs` if you want to read more about our [core metrics](./docs/core-metrics.md).
|
68
|
+
|
69
|
+
|
70
|
+
## Getting Started
|
53
71
|
|
54
72
|
RubyCritic can be installed with the following command:
|
55
73
|
|
@@ -70,8 +88,8 @@ And then execute:
|
|
70
88
|
$ bundle
|
71
89
|
```
|
72
90
|
|
73
|
-
|
74
|
-
|
91
|
+
|
92
|
+
## Usage
|
75
93
|
|
76
94
|
Running `rubycritic` with no arguments will analyse all the Ruby files in the
|
77
95
|
current directory:
|
@@ -101,8 +119,8 @@ $ rubycritic --help
|
|
101
119
|
| `--deduplicate-symlinks` | De-duplicate symlinks based on their final target |
|
102
120
|
| `--suppress-ratings` | Suppress letter ratings |
|
103
121
|
|
104
|
-
|
105
|
-
|
122
|
+
|
123
|
+
### Analyzer Configuration
|
106
124
|
|
107
125
|
* [`Reek`](https://github.com/troessner/reek): `RubyCritic` utilizes `Reek`'s default [configuration loading mechanism](https://github.com/troessner/reek#configuration-file).
|
108
126
|
This means that if you have an existing `Reek` configuration file, you can just put this into your
|
@@ -113,15 +131,15 @@ Analyzer Configuration
|
|
113
131
|
* `continue`: Makes it so that `flog` does not abort when a ruby file cannot be parsed.
|
114
132
|
* `methods`: Configures `flog` to skip code outside of methods. It prevents `flog` from reporting on the "methods" `private` and `protected`. It also prevents `flog` from reporting on Rails methods like `before_action` and `has_many`.
|
115
133
|
|
116
|
-
|
117
|
-
|
134
|
+
|
135
|
+
### Alternative Usage Methods
|
118
136
|
|
119
137
|
If you're fond of Guard you might like [guard-rubycritic][4]. It automatically analyses your Ruby files as they are modified.
|
120
138
|
|
121
139
|
For continuous integration, you can give [Jenkins CI][5] a spin. With it, you can [easily build your own (poor-man's) Code Climate][6]!
|
122
140
|
|
123
|
-
|
124
|
-
|
141
|
+
|
142
|
+
### Rake Task
|
125
143
|
|
126
144
|
You can use RubyCritic as Rake command in its most simple form like this:
|
127
145
|
|
@@ -159,8 +177,8 @@ RubyCritic::RakeTask.new do |task|
|
|
159
177
|
end
|
160
178
|
```
|
161
179
|
|
162
|
-
|
163
|
-
|
180
|
+
|
181
|
+
## Compatibility
|
164
182
|
|
165
183
|
RubyCritic is supporting:
|
166
184
|
|
@@ -168,8 +186,8 @@ RubyCritic is supporting:
|
|
168
186
|
* 2.2
|
169
187
|
* 2.3
|
170
188
|
|
171
|
-
|
172
|
-
|
189
|
+
|
190
|
+
## Improving RubyCritic
|
173
191
|
|
174
192
|
RubyCritic doesn't have to remain a second choice to other code quality analysis services. Together, we can improve it and continue to build on the great code metric tools that are available in the Ruby ecosystem.
|
175
193
|
|
@@ -179,8 +197,9 @@ Similarly, Pull Requests that improve the look and feel of the gem, that tweak t
|
|
179
197
|
|
180
198
|
See RubyCritic's [contributing guidelines](CONTRIBUTING.md) about how to proceed.
|
181
199
|
|
182
|
-
|
183
|
-
|
200
|
+
|
201
|
+
## Contributors
|
202
|
+
|
184
203
|
|
185
204
|
`RubyCritics` initial author was [Guilherme Simões](https://github.com/guilhermesimoes).
|
186
205
|
|
@@ -190,8 +209,8 @@ The current core team consists of:
|
|
190
209
|
* [Lucas Mazza](https://github.com/lucasmazza)
|
191
210
|
* [Timo Rößner](https://github.com/troessner)
|
192
211
|
|
193
|
-
|
194
|
-
|
212
|
+
|
213
|
+
## Credits
|
195
214
|
|
196
215
|
![Whitesmith](http://i.imgur.com/Si2l3kd.png)
|
197
216
|
|
@@ -202,7 +221,7 @@ RubyCritic is maintained and funded by [Whitesmith][9]. Tweet your questions or
|
|
202
221
|
[3]: https://github.com/seattlerb/flog
|
203
222
|
[4]: https://github.com/whitesmith/guard-rubycritic
|
204
223
|
[5]: http://jenkins-ci.org/
|
205
|
-
[6]:
|
224
|
+
[6]: ./docs/building-own-code-climate.md
|
206
225
|
[7]: https://github.com/charliesome/better_errors
|
207
226
|
[8]: https://github.com/charliesome/better_errors/pull/22
|
208
227
|
[9]: http://www.whitesmith.co/
|
@@ -0,0 +1,152 @@
|
|
1
|
+
# Building your own Code Climate
|
2
|
+
|
3
|
+
## Installing Jenkins
|
4
|
+
|
5
|
+
There are [official guides for installing Jenkins][1] on pretty much any platform. After following the most suitable one, Jenkins should be running on the Build Server (your machine or AWS, for example).
|
6
|
+
|
7
|
+
From this point forward, everything should be installed under the Jenkins user account on the Build Server. Switching user accounts can be achieved by running the Switch User command:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
$ sudo su - jenkins
|
11
|
+
```
|
12
|
+
|
13
|
+
In the likely event that you don't know your Jenkins user's password, run the following command to change it:
|
14
|
+
|
15
|
+
```bash
|
16
|
+
$ sudo passwd jenkins
|
17
|
+
```
|
18
|
+
|
19
|
+
## Installing Ruby
|
20
|
+
|
21
|
+
There are many different [ways to install Ruby][2], RVM and rbenv being the two most popular ones. RVM has a nice [guide on using RVM with Jenkins][3]. Regardless of what you choose, you should now have Ruby running on the Build Server and be able to install any gems.
|
22
|
+
|
23
|
+
Ensure that everything is working correctly by running the following command:
|
24
|
+
|
25
|
+
```bash
|
26
|
+
$ ruby --version
|
27
|
+
```
|
28
|
+
|
29
|
+
## Installing gems
|
30
|
+
|
31
|
+
You should install two gems after installing Ruby: Bundler and RubyCritic. You can do so with the following command:
|
32
|
+
|
33
|
+
```bash
|
34
|
+
$ gem install bundler rubycritic
|
35
|
+
```
|
36
|
+
|
37
|
+
## Installing Git
|
38
|
+
|
39
|
+
Next up, Git should be installed since Jenkins needs it to be able to clone your repositories in order to analyse them. [This is the installation guide recommended][4] to install Git.
|
40
|
+
|
41
|
+
Ensure that everything is working correctly by running the following command:
|
42
|
+
|
43
|
+
```bash
|
44
|
+
$ git --version
|
45
|
+
```
|
46
|
+
|
47
|
+
## Generating SSH Keys
|
48
|
+
|
49
|
+
SSH keys are a way to identify trusted computers without involving passwords. GitHub has an excellent guide on [generating SSH keys][5] which you should definitely follow.
|
50
|
+
|
51
|
+
However, you may want to create a GitHub account just for your Jenkins user. The alternative requires you to add the new SSH Key to your account which, from a security standpoint, is probably a bad idea.
|
52
|
+
|
53
|
+
Ensure that everything is working correctly by running the following command:
|
54
|
+
|
55
|
+
```bash
|
56
|
+
$ ssh -T git@github.com
|
57
|
+
```
|
58
|
+
|
59
|
+
## Configuring Jenkins
|
60
|
+
|
61
|
+
Jenkins should be running automatically after being installed. The Jenkins UI should be accessible at `http://localhost:8080/` in your browser. The next few steps all take place in that UI.
|
62
|
+
|
63
|
+
### Enabling Security
|
64
|
+
|
65
|
+
By default Jenkins is not secure which means anyone is able to run commands on the Build Server and access your private projects. There are many [ways to secure Jenkins][6], but the simplest one is standard authentication with a username and password.
|
66
|
+
|
67
|
+
From the main page, head to `Manage Jenkins` and then to `Configure Global Security` where the option `Enable security` should be checked. Still on the same page, select `Jenkins' own user database` under `Security Realm` and leave `Allow users to sign up` enabled for now.
|
68
|
+
|
69
|
+
After configuring these options, a new `sign up` link should appear in the top right corner of every page. After signing up and returning to the `Configure Global Security` page where you were before, it's time to set up some restrictions. The easiest way to do so is to select the option `Logged-in users can do anything` instead of the usual `Anyone can do anything` under `Authorization` and then deselect the option `Allow users to sign up`.
|
70
|
+
|
71
|
+
Ensure that everything is working correctly by logging out and logging in again. If you have any problems after these steps and can no longer access Jenkins, you can [reset its security settings][7] and try again.
|
72
|
+
|
73
|
+
### Installing Plugins
|
74
|
+
|
75
|
+
Installing a Jenkins Plugin is extremely easy. All you have to do is proceed to `Manage Jenkins`, go to `Manage Plugins`, select the `Available` tab and then check the desired plugin.
|
76
|
+
|
77
|
+
To build your own Code Climate, three plugins are needed:
|
78
|
+
|
79
|
+
* [GitHub][8], which triggers jobs when you push to a GitHub repository.
|
80
|
+
|
81
|
+
* [Git][9], which allows cloning Git repositories.
|
82
|
+
|
83
|
+
* [HTML Publisher][10], which persists RubyCritic's reports and creates a web interface to access them.
|
84
|
+
|
85
|
+
However, you can install many other plugins that will improve your Build server, like:
|
86
|
+
|
87
|
+
* [Jenkins ci skip][11], which skips a build when `[ci skip]` is added to a commit's message.
|
88
|
+
|
89
|
+
## Creating Your First Job
|
90
|
+
|
91
|
+
Finally, it's time to set up the job that will run in the Build Server after every push. Head to the main page and then to `New Item`. Give the job a name (like the name of your project) and select the option `Build a free-style software project`. Clicking the `OK` button will create the job and take you to the configuration page for that job.
|
92
|
+
|
93
|
+
Under `Source Code Management` select `Git` and enter your project's repository URL. If your project is private, then you need to set up Jenkins' credentials so that GitHub can authorize it. This was the reason for setting up Jenkins' SSH key beforehand. Now all that has to be done is to click the `Add` button on the far right, pick the `kind` of credentials `SSH Username with private key` and select the `Private key` option `from the Jenkins master ~/.ssh`. Confirm these new credentials by clicking another `Add` button.
|
94
|
+
|
95
|
+
Under `Branches to build` you can enter one or more branches that you want Jenkins to build against. The default is `*/master` but you can leave the `branch` field blank so that Jenkins builds against any changed branch.
|
96
|
+
|
97
|
+
Under `Build Triggers` select `Build when a change is pushed to GitHub`, and start configuring the `Build` script. Click the dropdown `Add build step`, select the `Execute shell` option and in the new textarea enter the script to be run after every push. The possibilities here are endless. You could:
|
98
|
+
|
99
|
+
* Build a Continuous Integration server like Travis. To do so, the script could consist in just the following commands:
|
100
|
+
|
101
|
+
```bash
|
102
|
+
bundle
|
103
|
+
rake
|
104
|
+
```
|
105
|
+
|
106
|
+
These commands would install all the gems defined in your project's Gemfile and run the project's tests.
|
107
|
+
|
108
|
+
If you had installed Ruby through RVM, your project was a gem and you wished to test it using different, stable Ruby versions, you might change the script to something like this:
|
109
|
+
|
110
|
+
```bash
|
111
|
+
#!/bin/bash
|
112
|
+
rvm use 1.9.3
|
113
|
+
bundle
|
114
|
+
rake
|
115
|
+
rvm use 2.1
|
116
|
+
bundle
|
117
|
+
rake
|
118
|
+
```
|
119
|
+
|
120
|
+
Please note that the first line specifies bash as the shell that runs the script and is **necessary** for the script to successfully run.
|
121
|
+
|
122
|
+
* Build a service like Code Climate using the RubyCritic gem. In that case, the script could consist in just the following command:
|
123
|
+
|
124
|
+
```bash
|
125
|
+
rubycritic app lib
|
126
|
+
```
|
127
|
+
|
128
|
+
However, Jenkins isolates and cleans the workspace after every build thus making it necessary to use the HTML Publisher plugin (previously installed) to persist the reports generated by RubyCritic.
|
129
|
+
|
130
|
+
Under `Post-build Actions` select `Publish HTML reports`, enter `tmp/rubycritic/` as the `HTML directory to archive`, `overview.html` as the `Index page` and give a title to the report. If you select the option `Keep past HTML reports`, you'll be able to access previous RubyCritic reports, giving you more insight into where your project has been and where it is heading.
|
131
|
+
|
132
|
+
Finally, click the `Save` button to save your job configuration. You can try out your build right away by clicking the `Build Now` button.
|
133
|
+
|
134
|
+
## Setting Up A GitHub Service
|
135
|
+
|
136
|
+
The last step is to set up GitHub integration so that a push triggers a new job in the Build Server. You’ll need admin access to your project's repository to be able to change its settings. On the repository page navigate to `Settings`, `Webhooks & Services` and click the `Add service` button. Select the `Jenkins (GitHub plugin)` options and set the `Jenkins hook url`.
|
137
|
+
|
138
|
+
This URL is the same as the one you use to access the Jenkins UI followed by `/github-webhook/`. On AWS, for example, your URL could look something like `http://ec2-12-34-567-890.amazonaws.com:8080/github-webhook/`.
|
139
|
+
|
140
|
+
And you're finally done! After every push to GitHub your Build Server should run RubyCritic and present its results, very much like Code Climate!
|
141
|
+
|
142
|
+
[1]: https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins
|
143
|
+
[2]: https://www.ruby-lang.org/en/installation/
|
144
|
+
[3]: https://rvm.io/integration/jenkins
|
145
|
+
[4]: http://git-scm.com/book/en/Getting-Started-Installing-Git
|
146
|
+
[5]: https://help.github.com/articles/generating-ssh-keys
|
147
|
+
[6]: https://wiki.jenkins-ci.org/display/JENKINS/Securing+Jenkins
|
148
|
+
[7]: https://wiki.jenkins-ci.org/display/JENKINS/Disable+security
|
149
|
+
[8]: https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin
|
150
|
+
[9]: https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin
|
151
|
+
[10]: https://wiki.jenkins-ci.org/display/JENKINS/HTML+Publisher+Plugin
|
152
|
+
[11]: https://github.com/banyan/jenkins-ci-skip-plugin
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# Core Metrics, Score and Rating
|
2
|
+
|
3
|
+
RubyCritic wraps around static analysis gems such as [Reek][2], [Flay][3] and [Flog][4] to provide a quality report of your Ruby code.
|
4
|
+
|
5
|
+
Each of these gems are internally wrapped as an **Analyser**, with a collection of **AnalysedModule**s, which give us calculations of key metrics.
|
6
|
+
The most important ones are **churn**, **complexity**, **cost** and **rating**.
|
7
|
+
|
8
|
+
The output of RubyCritic will give you four values to help you judge your code's _odorousness_:
|
9
|
+
|
10
|
+
- [**Score**](#score): A generic number representing overall quality of the analysed code
|
11
|
+
- [**Churn**](#churn-and-complexity): Number of times a file was changed
|
12
|
+
- [**Complexity**](#churn-and-complexity): Amount of _pain_ in your code
|
13
|
+
- [**Rating**](#rating): The grade assigned to a file
|
14
|
+
|
15
|
+
RubyCritic's **rating** system was inspired by Code Climate's, you can [read more about how that works here][1].
|
16
|
+
Note that the global **score** is fairly different from Code Climate's GPA, although it serves the same purpose.
|
17
|
+
|
18
|
+
## Score
|
19
|
+
|
20
|
+
Is a value that ranges from 0 to 100, where higher values are better (less code smells detected) and is intended to provide a quick insight about the overall code quality.
|
21
|
+
|
22
|
+
This is basically an average of the calculated [cost](#cost) of each file.
|
23
|
+
There is a [threshold][6] to avoid very bad modules from having excessive impact.
|
24
|
+
|
25
|
+
## Churn and complexity
|
26
|
+
|
27
|
+
Churn is very simple to calculate - it is the number of times the file was committed.
|
28
|
+
|
29
|
+
Complexity is the output of [Flog][4]. You can [read more about how it works][7], but here's a quick summary:
|
30
|
+
|
31
|
+
> It works based on counting your code's ABCs:
|
32
|
+
>
|
33
|
+
> A - Assignments. When more objects are assigned, the complexity goes up - foo = 1 + 1.
|
34
|
+
>
|
35
|
+
> B - Branches. When code branches, there are multiple paths that it might follow. This also increases it's complexity.
|
36
|
+
>
|
37
|
+
> C - Calls. When code calls other code, the complexity increases because they caller and callee are now connected. A call is both a method call or other action like eval or puts.
|
38
|
+
>
|
39
|
+
> All code has assignments, branches, and calls. Flog's job is to check that they aren't used excessively or abused.
|
40
|
+
|
41
|
+
Both **churn** and **complexity** are presented as a chart:
|
42
|
+
|
43
|
+
![RubyCritic overview screenshot](http://i.imgur.com/oiE5O3X.png)
|
44
|
+
|
45
|
+
Each file is represented by a dot. **The closer they are to the bottom-left corner, the better.**
|
46
|
+
But keep in mind that you cannot reduce churn (well... not unless you re-write your repo's history :neckbeard:), so try to keep the dots as close to the bottom as possible.
|
47
|
+
Chad made a nice [summary if you want to know more][8] about the meaning behind each quadrant.
|
48
|
+
|
49
|
+
|
50
|
+
## Rating
|
51
|
+
|
52
|
+
This is a letter from `A` to `F`, `A` being the best. This serves as a baseline to tell you how *smelly* a file is.
|
53
|
+
Generally `A`'s & `B`'s are good enough, `C`'s serve as a warning and `D`'s & `F`'s are the ones you should be fixing.
|
54
|
+
|
55
|
+
**Rating** is simply [a conversion][5] from the calculated **cost** to a letter.
|
56
|
+
|
57
|
+
![RubyCritic code index screenshot](http://i.imgur.com/a0GCn48.png)
|
58
|
+
|
59
|
+
### Cost
|
60
|
+
|
61
|
+
The definition of this **cost** varies from tool to tool, but it's always a non-negative number, with high values indicating worse smells.
|
62
|
+
The **complexity** of a file also (slightly) affects its final cost.
|
63
|
+
|
64
|
+
|
65
|
+
[1]: https://gist.github.com/brynary/21369b5892525e1bd102
|
66
|
+
[2]: https://github.com/troessner/reek
|
67
|
+
[3]: https://github.com/seattlerb/flay
|
68
|
+
[4]: https://github.com/seattlerb/flog
|
69
|
+
[5]: https://github.com/whitesmith/rubycritic/blob/master/lib/rubycritic/core/rating.rb
|
70
|
+
[6]: https://github.com/whitesmith/rubycritic/blob/master/lib/rubycritic/core/analysed_modules_collection.rb
|
71
|
+
[7]: http://www.railsinside.com/tutorials/487-how-to-score-your-rails-apps-complexity-before-refactoring.html
|
72
|
+
[8]: https://github.com/chad/turbulence#hopefully-meaningful-metrics
|
data/lib/rubycritic/version.rb
CHANGED
data/rubycritic.gemspec
CHANGED
@@ -21,10 +21,10 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.require_path = 'lib'
|
22
22
|
|
23
23
|
spec.add_runtime_dependency 'virtus', '~> 1.0'
|
24
|
-
spec.add_runtime_dependency 'flay', '2.
|
25
|
-
spec.add_runtime_dependency 'flog', '4.
|
26
|
-
spec.add_runtime_dependency 'reek', '4.0
|
27
|
-
spec.add_runtime_dependency 'parser', '2.3.1.
|
24
|
+
spec.add_runtime_dependency 'flay', '2.8.0'
|
25
|
+
spec.add_runtime_dependency 'flog', '4.4.0'
|
26
|
+
spec.add_runtime_dependency 'reek', '4.1.0'
|
27
|
+
spec.add_runtime_dependency 'parser', '2.3.1.2'
|
28
28
|
spec.add_runtime_dependency 'ruby_parser', '~> 3.8'
|
29
29
|
spec.add_runtime_dependency 'colorize'
|
30
30
|
spec.add_runtime_dependency 'launchy', '2.4.3'
|
@@ -35,6 +35,6 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.add_development_dependency 'rake'
|
36
36
|
spec.add_development_dependency 'minitest', '~> 5.3'
|
37
37
|
spec.add_development_dependency 'mocha', '~> 1.1'
|
38
|
-
spec.add_development_dependency 'rubocop', '0.
|
38
|
+
spec.add_development_dependency 'rubocop', '>= 0.41.1'
|
39
39
|
spec.add_development_dependency 'pry-byebug'
|
40
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubycritic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guilherme Simoes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: virtus
|
@@ -30,56 +30,56 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.
|
33
|
+
version: 2.8.0
|
34
34
|
type: :runtime
|
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: 2.
|
40
|
+
version: 2.8.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: flog
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 4.
|
47
|
+
version: 4.4.0
|
48
48
|
type: :runtime
|
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: 4.
|
54
|
+
version: 4.4.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: reek
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 4.0
|
61
|
+
version: 4.1.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 4.0
|
68
|
+
version: 4.1.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: parser
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 2.3.1.
|
75
|
+
version: 2.3.1.2
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 2.3.1.
|
82
|
+
version: 2.3.1.2
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: ruby_parser
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -210,16 +210,16 @@ dependencies:
|
|
210
210
|
name: rubocop
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
|
-
- -
|
213
|
+
- - ">="
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version: 0.
|
215
|
+
version: 0.41.1
|
216
216
|
type: :development
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
|
-
- -
|
220
|
+
- - ">="
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version: 0.
|
222
|
+
version: 0.41.1
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
224
|
name: pry-byebug
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -255,6 +255,8 @@ files:
|
|
255
255
|
- README.md
|
256
256
|
- Rakefile
|
257
257
|
- bin/rubycritic
|
258
|
+
- docs/building-own-code-climate.md
|
259
|
+
- docs/core-metrics.md
|
258
260
|
- features/command_line_interface/minimum_score.feature
|
259
261
|
- features/command_line_interface/options.feature
|
260
262
|
- features/rake_task.feature
|
@@ -454,4 +456,3 @@ test_files:
|
|
454
456
|
- test/samples/reek/smelly.rb
|
455
457
|
- test/samples/unparsable.rb
|
456
458
|
- test/test_helper.rb
|
457
|
-
has_rdoc:
|