rubycritic 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CONTRIBUTING.md +4 -4
- data/README.md +6 -5
- data/lib/rubycritic/analysers/stats.rb +2 -0
- data/lib/rubycritic/report_generators/overview.rb +1 -1
- data/lib/rubycritic/{turbulence.rb → report_generators/turbulence.rb} +0 -0
- data/lib/rubycritic/version.rb +1 -1
- data/test/lib/rubycritic/analysers/stats_test.rb +10 -0
- data/test/lib/rubycritic/{turbulence_test.rb → report_generators/turbulence_test.rb} +1 -1
- data/test/lib/rubycritic/source_control_systems/source_control_system_test.rb +9 -0
- data/test/samples/stats/unparsable_example.rb +2 -0
- data/test/test_helper.rb +9 -0
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bac336ae6297b7cfdb084f9ee1fa9949ad558f37
|
4
|
+
data.tar.gz: 943f7a6bf54bd37bdd76a8513c8c8e7ef5b7cfed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 244083a692cd49119bf6d4e56376b84045bed3562544e5c01b92085cfc113cce96dfee13b87f9889fb62deda74aa16138f80f283e231225d0f7cadfb978cb801
|
7
|
+
data.tar.gz: 0eb796e93bae55f8f4de65c4e0c4c74609d107758964cd3dca4ca40e62cf673dcf357c7c0a2a8527e29eefba634f07d9dd158c55d4244c35cb1410d227edd935
|
data/.travis.yml
CHANGED
data/CONTRIBUTING.md
CHANGED
@@ -10,7 +10,7 @@ RubyCritic is open source and contributions from the community are encouraged! N
|
|
10
10
|
Writing some Code
|
11
11
|
-----------------
|
12
12
|
|
13
|
-
If you want to squash a bug or add a new feature,
|
13
|
+
If you want to squash a bug or add a new feature, please:
|
14
14
|
|
15
15
|
1. Fork the project.
|
16
16
|
|
@@ -31,14 +31,14 @@ Each commit should do one thing and one thing only. For example, all whitespace
|
|
31
31
|
8. [Hide the sausage making][3]. Squash, split and reorder commits if necessary (`git rebase -i`).
|
32
32
|
For a more in-depth look at interactive rebasing, be sure to check [how to rewrite history][4].
|
33
33
|
|
34
|
-
9. Push
|
34
|
+
9. Push the branch to GitHub (`git push origin my-new-feature`).
|
35
35
|
|
36
36
|
10. Create a new [Pull Request][5] and send it to be merged with the master branch.
|
37
37
|
|
38
38
|
Improving the Documentation
|
39
39
|
---------------------------
|
40
40
|
|
41
|
-
You are
|
41
|
+
You are welcome to clarify how something works or simply fix a typo. Please include `[ci skip]` on a new line in each of your commit messages. This will signal [Travis][2] that running the test suite is not necessary for these changes.
|
42
42
|
|
43
43
|
Reporting a Bug
|
44
44
|
---------------
|
@@ -65,4 +65,4 @@ If you are experiencing unexpected behavior and, after having read Rubycritic's
|
|
65
65
|
[3]: http://sethrobertson.github.io/GitBestPractices/#sausage
|
66
66
|
[4]: http://git-scm.com/book/en/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages
|
67
67
|
[5]: https://help.github.com/articles/creating-a-pull-request
|
68
|
-
[6]: https://github.com/whitesmith/rubycritic/
|
68
|
+
[6]: https://github.com/whitesmith/rubycritic/search?type=Issues
|
data/README.md
CHANGED
@@ -96,23 +96,24 @@ Alternative Usage Methods
|
|
96
96
|
|
97
97
|
If you're fond of Guard you might like [guard-rubycritic][4]. It automatically analyses your Ruby files as they are modified.
|
98
98
|
|
99
|
-
For continuous integration, you can give [Jenkins CI][5] a spin. With it, you can easily build your own (poor-man's) Code Climate!
|
99
|
+
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]!
|
100
100
|
|
101
101
|
Improving RubyCritic
|
102
102
|
--------------------
|
103
103
|
|
104
104
|
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.
|
105
105
|
|
106
|
-
Arguably, the [better_errors gem][
|
106
|
+
Arguably, the [better_errors gem][7] only got popular after receiving a [(pretty awesome) Pull Request][8] that changed its page design.
|
107
107
|
|
108
108
|
Similarly, Pull Requests that improve the look and feel of the gem, that tweak the calculation of ratings or that fix existing issues will be most welcome. This is my first gem, so just commenting on an issue and giving some insight into how something should work will be appreciated. No contribution is too small.
|
109
109
|
|
110
|
-
See RubyCritic's [
|
110
|
+
See RubyCritic's [contributing guidelines](CONTRIBUTING.md) about how to proceed.
|
111
111
|
|
112
112
|
[1]: https://github.com/troessner/reek
|
113
113
|
[2]: https://github.com/seattlerb/flay
|
114
114
|
[3]: https://github.com/seattlerb/flog
|
115
115
|
[4]: https://github.com/whitesmith/guard-rubycritic
|
116
116
|
[5]: http://jenkins-ci.org/
|
117
|
-
[6]: https://github.com/
|
118
|
-
[7]: https://github.com/charliesome/better_errors
|
117
|
+
[6]: https://github.com/whitesmith/rubycritic/wiki/Building-your-own-Code-Climate
|
118
|
+
[7]: https://github.com/charliesome/better_errors
|
119
|
+
[8]: https://github.com/charliesome/better_errors/pull/22
|
File without changes
|
data/lib/rubycritic/version.rb
CHANGED
@@ -17,4 +17,14 @@ describe Rubycritic::Analyser::Stats do
|
|
17
17
|
analysed_file.methods_count.must_equal 0
|
18
18
|
end
|
19
19
|
end
|
20
|
+
|
21
|
+
context "when a file is unparsable" do
|
22
|
+
it "does not blow up" do
|
23
|
+
analysed_file = AnalysedFileDouble.new(:path => "test/samples/stats/unparsable_example.rb")
|
24
|
+
capture_output_streams do
|
25
|
+
Rubycritic::Analyser::Stats.new([analysed_file]).run
|
26
|
+
end
|
27
|
+
analysed_file.methods_count.must_equal 0
|
28
|
+
end
|
29
|
+
end
|
20
30
|
end
|
@@ -16,5 +16,14 @@ describe Rubycritic::SourceControlSystem do
|
|
16
16
|
system.must_be_instance_of Rubycritic::SourceControlSystem::Git
|
17
17
|
end
|
18
18
|
end
|
19
|
+
|
20
|
+
describe "when no source control system is found" do
|
21
|
+
it "creates a source control system double" do
|
22
|
+
capture_output_streams do
|
23
|
+
system = Rubycritic::SourceControlSystem::Base.create
|
24
|
+
system.must_be_instance_of Rubycritic::SourceControlSystem::Double
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
19
28
|
end
|
20
29
|
end
|
data/test/test_helper.rb
CHANGED
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: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guilherme Simoes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: virtus
|
@@ -198,6 +198,7 @@ files:
|
|
198
198
|
- lib/rubycritic/report_generators/templates/overview.html.erb
|
199
199
|
- lib/rubycritic/report_generators/templates/smells_index.html.erb
|
200
200
|
- lib/rubycritic/report_generators/templates/smelly_line.html.erb
|
201
|
+
- lib/rubycritic/report_generators/turbulence.rb
|
201
202
|
- lib/rubycritic/report_generators/view_helpers.rb
|
202
203
|
- lib/rubycritic/reporters/base.rb
|
203
204
|
- lib/rubycritic/reporters/main.rb
|
@@ -209,7 +210,6 @@ files:
|
|
209
210
|
- lib/rubycritic/source_control_systems/double.rb
|
210
211
|
- lib/rubycritic/source_control_systems/git.rb
|
211
212
|
- lib/rubycritic/source_locator.rb
|
212
|
-
- lib/rubycritic/turbulence.rb
|
213
213
|
- lib/rubycritic/version.rb
|
214
214
|
- rubycritic.gemspec
|
215
215
|
- test/analysers_test_helper.rb
|
@@ -224,11 +224,11 @@ files:
|
|
224
224
|
- test/lib/rubycritic/core/location_test.rb
|
225
225
|
- test/lib/rubycritic/core/smell_test.rb
|
226
226
|
- test/lib/rubycritic/core/smells_array_test.rb
|
227
|
+
- test/lib/rubycritic/report_generators/turbulence_test.rb
|
227
228
|
- test/lib/rubycritic/report_generators/view_helpers_test.rb
|
228
229
|
- test/lib/rubycritic/smells_status_setter_test.rb
|
229
230
|
- test/lib/rubycritic/source_control_systems/source_control_system_test.rb
|
230
231
|
- test/lib/rubycritic/source_locator_test.rb
|
231
|
-
- test/lib/rubycritic/turbulence_test.rb
|
232
232
|
- test/lib/rubycritic/version_test.rb
|
233
233
|
- test/samples/flay/smelly.rb
|
234
234
|
- test/samples/flog/complex.rb
|
@@ -241,6 +241,7 @@ files:
|
|
241
241
|
- test/samples/reek/smelly.rb
|
242
242
|
- test/samples/stats/empty_example.rb
|
243
243
|
- test/samples/stats/example.rb
|
244
|
+
- test/samples/stats/unparsable_example.rb
|
244
245
|
- test/test_helper.rb
|
245
246
|
homepage: https://github.com/whitesmith/rubycritic
|
246
247
|
licenses:
|
@@ -262,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
262
263
|
version: '0'
|
263
264
|
requirements: []
|
264
265
|
rubyforge_project:
|
265
|
-
rubygems_version: 2.
|
266
|
+
rubygems_version: 2.4.1
|
266
267
|
signing_key:
|
267
268
|
specification_version: 4
|
268
269
|
summary: Ruby code smell detector
|
@@ -279,11 +280,11 @@ test_files:
|
|
279
280
|
- test/lib/rubycritic/core/location_test.rb
|
280
281
|
- test/lib/rubycritic/core/smell_test.rb
|
281
282
|
- test/lib/rubycritic/core/smells_array_test.rb
|
283
|
+
- test/lib/rubycritic/report_generators/turbulence_test.rb
|
282
284
|
- test/lib/rubycritic/report_generators/view_helpers_test.rb
|
283
285
|
- test/lib/rubycritic/smells_status_setter_test.rb
|
284
286
|
- test/lib/rubycritic/source_control_systems/source_control_system_test.rb
|
285
287
|
- test/lib/rubycritic/source_locator_test.rb
|
286
|
-
- test/lib/rubycritic/turbulence_test.rb
|
287
288
|
- test/lib/rubycritic/version_test.rb
|
288
289
|
- test/samples/flay/smelly.rb
|
289
290
|
- test/samples/flog/complex.rb
|
@@ -296,4 +297,5 @@ test_files:
|
|
296
297
|
- test/samples/reek/smelly.rb
|
297
298
|
- test/samples/stats/empty_example.rb
|
298
299
|
- test/samples/stats/example.rb
|
300
|
+
- test/samples/stats/unparsable_example.rb
|
299
301
|
- test/test_helper.rb
|