rubycritic 3.2.0 → 3.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +3 -0
  3. data/CHANGELOG.md +7 -0
  4. data/Gemfile +1 -0
  5. data/README.md +1 -1
  6. data/Rakefile +2 -1
  7. data/features/step_definitions/rake_task_steps.rb +1 -0
  8. data/features/step_definitions/rubycritic_steps.rb +1 -0
  9. data/features/step_definitions/sample_file_steps.rb +1 -0
  10. data/features/support/env.rb +1 -0
  11. data/lib/rubycritic.rb +1 -0
  12. data/lib/rubycritic/analysers/attributes.rb +1 -0
  13. data/lib/rubycritic/analysers/churn.rb +1 -0
  14. data/lib/rubycritic/analysers/complexity.rb +1 -0
  15. data/lib/rubycritic/analysers/helpers/ast_node.rb +2 -1
  16. data/lib/rubycritic/analysers/helpers/flay.rb +1 -0
  17. data/lib/rubycritic/analysers/helpers/flog.rb +1 -0
  18. data/lib/rubycritic/analysers/helpers/methods_counter.rb +1 -0
  19. data/lib/rubycritic/analysers/helpers/modules_locator.rb +1 -0
  20. data/lib/rubycritic/analysers/helpers/parser.rb +1 -0
  21. data/lib/rubycritic/analysers/helpers/reek.rb +1 -0
  22. data/lib/rubycritic/analysers/smells/flay.rb +1 -0
  23. data/lib/rubycritic/analysers/smells/flog.rb +1 -0
  24. data/lib/rubycritic/analysers/smells/reek.rb +1 -0
  25. data/lib/rubycritic/analysers_runner.rb +1 -0
  26. data/lib/rubycritic/analysis_summary.rb +1 -1
  27. data/lib/rubycritic/browser.rb +1 -0
  28. data/lib/rubycritic/cli/application.rb +1 -0
  29. data/lib/rubycritic/cli/options.rb +2 -1
  30. data/lib/rubycritic/colorize.rb +1 -0
  31. data/lib/rubycritic/command_factory.rb +1 -0
  32. data/lib/rubycritic/commands/base.rb +1 -0
  33. data/lib/rubycritic/commands/ci.rb +1 -0
  34. data/lib/rubycritic/commands/default.rb +1 -0
  35. data/lib/rubycritic/commands/help.rb +1 -0
  36. data/lib/rubycritic/commands/status_reporter.rb +1 -0
  37. data/lib/rubycritic/commands/version.rb +1 -0
  38. data/lib/rubycritic/configuration.rb +1 -0
  39. data/lib/rubycritic/core/analysed_module.rb +1 -0
  40. data/lib/rubycritic/core/analysed_modules_collection.rb +1 -0
  41. data/lib/rubycritic/core/location.rb +1 -0
  42. data/lib/rubycritic/core/rating.rb +1 -0
  43. data/lib/rubycritic/core/smell.rb +1 -0
  44. data/lib/rubycritic/generators/console_report.rb +1 -0
  45. data/lib/rubycritic/generators/html/assets/stylesheets/application.css +4 -0
  46. data/lib/rubycritic/generators/html/base.rb +1 -0
  47. data/lib/rubycritic/generators/html/code_file.rb +1 -0
  48. data/lib/rubycritic/generators/html/code_index.rb +1 -0
  49. data/lib/rubycritic/generators/html/line.rb +1 -0
  50. data/lib/rubycritic/generators/html/overview.rb +1 -0
  51. data/lib/rubycritic/generators/html/smells_index.rb +1 -0
  52. data/lib/rubycritic/generators/html/templates/smelly_line.html.erb +2 -2
  53. data/lib/rubycritic/generators/html/turbulence.rb +1 -0
  54. data/lib/rubycritic/generators/html/view_helpers.rb +1 -0
  55. data/lib/rubycritic/generators/html_report.rb +1 -0
  56. data/lib/rubycritic/generators/json/simple.rb +1 -0
  57. data/lib/rubycritic/generators/json_report.rb +1 -0
  58. data/lib/rubycritic/generators/text/list.rb +1 -0
  59. data/lib/rubycritic/rake_task.rb +1 -0
  60. data/lib/rubycritic/reporter.rb +1 -0
  61. data/lib/rubycritic/serializer.rb +1 -0
  62. data/lib/rubycritic/smells_status_setter.rb +1 -0
  63. data/lib/rubycritic/source_control_systems/base.rb +1 -0
  64. data/lib/rubycritic/source_control_systems/double.rb +1 -0
  65. data/lib/rubycritic/source_control_systems/git.rb +1 -0
  66. data/lib/rubycritic/source_control_systems/mercurial.rb +1 -0
  67. data/lib/rubycritic/source_control_systems/perforce.rb +1 -0
  68. data/lib/rubycritic/version.rb +1 -1
  69. data/rubycritic.gemspec +2 -1
  70. data/test/analysers_test_helper.rb +1 -0
  71. data/test/lib/rubycritic/analysers/churn_test.rb +1 -0
  72. data/test/lib/rubycritic/analysers/complexity_test.rb +1 -0
  73. data/test/lib/rubycritic/analysers/helpers/methods_counter_test.rb +1 -0
  74. data/test/lib/rubycritic/analysers/helpers/modules_locator_test.rb +1 -0
  75. data/test/lib/rubycritic/analysers/smells/flay_test.rb +1 -0
  76. data/test/lib/rubycritic/analysers/smells/flog_test.rb +1 -0
  77. data/test/lib/rubycritic/analysers/smells/reek_test.rb +1 -0
  78. data/test/lib/rubycritic/analysis_summary_test.rb +4 -3
  79. data/test/lib/rubycritic/browser_test.rb +1 -0
  80. data/test/lib/rubycritic/commands/status_reporter_test.rb +1 -0
  81. data/test/lib/rubycritic/configuration_test.rb +1 -0
  82. data/test/lib/rubycritic/core/analysed_module_test.rb +1 -0
  83. data/test/lib/rubycritic/core/analysed_modules_collection_test.rb +4 -3
  84. data/test/lib/rubycritic/core/location_test.rb +1 -0
  85. data/test/lib/rubycritic/core/smell_test.rb +1 -0
  86. data/test/lib/rubycritic/core/smells_array_test.rb +1 -0
  87. data/test/lib/rubycritic/generators/console_report_test.rb +1 -0
  88. data/test/lib/rubycritic/generators/json_report_test.rb +1 -0
  89. data/test/lib/rubycritic/generators/turbulence_test.rb +1 -0
  90. data/test/lib/rubycritic/generators/view_helpers_test.rb +1 -0
  91. data/test/lib/rubycritic/revision_comparator_test.rb +1 -0
  92. data/test/lib/rubycritic/smells_status_setter_test.rb +1 -0
  93. data/test/lib/rubycritic/source_control_systems/base_test.rb +1 -0
  94. data/test/lib/rubycritic/source_control_systems/double_test.rb +1 -0
  95. data/test/lib/rubycritic/source_control_systems/git_test.rb +1 -0
  96. data/test/lib/rubycritic/source_control_systems/interfaces/basic.rb +1 -0
  97. data/test/lib/rubycritic/source_control_systems/interfaces/time_travel.rb +1 -0
  98. data/test/lib/rubycritic/source_control_systems/mercurial_test.rb +1 -0
  99. data/test/lib/rubycritic/source_control_systems/perforce_test.rb +1 -0
  100. data/test/lib/rubycritic/source_locator_test.rb +1 -0
  101. data/test/lib/rubycritic/version_test.rb +1 -0
  102. data/test/test_helper.rb +1 -0
  103. metadata +4 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 203294c974eb1596d663eb40e75d346c56b4fc77
4
- data.tar.gz: 16cdb0ac81e39e8255bee278522b2f489760b2f3
3
+ metadata.gz: 61112a2ab4b0874d396e788776e9c7fb78cb2f1d
4
+ data.tar.gz: eb4a83e2c42fe2b8e0e80beae87fd4848782c14e
5
5
  SHA512:
6
- metadata.gz: 67b05900a1bf52a173bdcbd425f055c2fa341ccf06528720e26f49628b686172d68e426fac892f266bda23eafb524d1c15994b87e55bc358b7c0ee0ed54738c7
7
- data.tar.gz: 75d2903c9d6c34ec56992596b2a034275420953b6a5bd0f2831c006aa6b887a866dd0ffba7854d37c0f5174f191a7707e93bc500022ca6007d61f8cc35b3260e
6
+ metadata.gz: 9940478bc6a654fb3d8dc84691f8af39acc3b8bb09c6d3c8cf6cfbfe335ad7f3c4e1985675852f4d4ae1b141f825658335aba6ad14db6f8784794b698e4170fe
7
+ data.tar.gz: e87a9979ab682b815542030926535b2888aa264abc865bacb02c22487048d7b4264966a380bdb88109e6bcde103223acab43f76e2f0a018fc4a8b578c3165eef
data/.rubocop_todo.yml CHANGED
@@ -40,3 +40,6 @@ Style/MethodMissing:
40
40
  Exclude:
41
41
  - 'lib/rubycritic/configuration.rb'
42
42
 
43
+ # Offense count: 3
44
+ Style/IndentHeredoc:
45
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # master (unreleased)
2
2
 
3
+ # 3.2.1 / 2017-05-13 [(commits)](https://github.com/whitesmith/rubycritic/compare/v3.2.0...v3.2.1)
4
+
5
+ * [CHANGE] Update `rubocop` to 0.48.x from 0.47.1 (by [@koic]() and [@Onumis][])
6
+ * [BUGFIX] Nest ordered list so we don't render errors as line numbers (by [@georgedrummond][])
7
+
3
8
  # 3.2.0 / 2017-03-24
4
9
 
5
10
  * [CHANGE] Update `rubocop` to 0.47.1 from 0.42.0 (by [@jdickey][])
@@ -197,3 +202,5 @@
197
202
  [@hoshinotsuyoshi]: https://github.com/hoshinotsuyoshi
198
203
  [@thedrow]: https://github.com/thedrow
199
204
  [@jdickey]: https://github.com/jdickey
205
+ [@koic]: https://github.com/koic
206
+ [@georgedrummond]: https://github.com/georgedrummond
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  source 'https://rubygems.org'
3
4
 
4
5
  # Specify your gem's dependencies in rubycritic.gemspec
data/README.md CHANGED
@@ -80,7 +80,7 @@ If you'd rather install RubyCritic using Bundler, add this line to your
80
80
  application's Gemfile:
81
81
 
82
82
  ```ruby
83
- gem "rubycritic", :require => false
83
+ gem "rubycritic", require: false
84
84
  ```
85
85
 
86
86
  And then execute:
data/Rakefile CHANGED
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'bundler/gem_tasks'
3
4
  require 'rake/testtask'
4
5
  require 'rubocop/rake_task'
@@ -24,4 +25,4 @@ RubyCritic::RakeTask.new do |task|
24
25
  task.paths = FileList['lib/**/*.rb']
25
26
  end
26
27
 
27
- task default: [:test, :features, :reek, :rubocop]
28
+ task default: %i[test features reek rubocop]
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  When(/^I run rake (\w*) with:$/) do |name, task_def|
3
4
  rake(name, task_def)
4
5
  end
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  When(/^I run rubycritic (.*)$/) do |args|
3
4
  rubycritic(args)
4
5
  end
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  Given(/^the smelly file 'smelly.rb'/) do
3
4
  contents = <<-EOS.strip_heredoc
4
5
  class AllTheMethods
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require_relative '../../lib/rubycritic'
3
4
  require_relative '../../lib/rubycritic/cli/application'
4
5
  require_relative '../../lib/rubycritic/commands/status_reporter'
data/lib/rubycritic.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/command_factory'
3
4
 
4
5
  module RubyCritic
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/analysers/helpers/methods_counter'
3
4
  require 'rubycritic/analysers/helpers/modules_locator'
4
5
  require 'rubycritic/colorize'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/colorize'
3
4
 
4
5
  module RubyCritic
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/analysers/helpers/flog'
3
4
  require 'rubycritic/colorize'
4
5
 
@@ -1,8 +1,9 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Parser
3
4
  module AST
4
5
  class Node
5
- MODULE_TYPES = [:module, :class].freeze
6
+ MODULE_TYPES = %i[module class].freeze
6
7
 
7
8
  def count_nodes_of_type(*types)
8
9
  count = 0
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'flay'
3
4
 
4
5
  module RubyCritic
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'flog'
3
4
 
4
5
  module RubyCritic
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/analysers/helpers/parser'
3
4
 
4
5
  module RubyCritic
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/analysers/helpers/parser'
3
4
 
4
5
  module RubyCritic
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'parser/current'
3
4
  require 'rubycritic/analysers/helpers/ast_node'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'reek'
3
4
 
4
5
  module RubyCritic
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/analysers/helpers/flay'
3
4
  require 'rubycritic/core/smell'
4
5
  require 'rubycritic/colorize'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/analysers/helpers/flog'
3
4
  require 'rubycritic/core/smell'
4
5
  require 'rubycritic/colorize'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/analysers/helpers/reek'
3
4
  require 'rubycritic/core/smell'
4
5
  require 'rubycritic/colorize'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/core/analysed_modules_collection'
3
4
  require 'rubycritic/analysers/smells/flay'
4
5
  require 'rubycritic/analysers/smells/flog'
@@ -11,7 +11,7 @@ module RubyCritic
11
11
  end
12
12
 
13
13
  def generate
14
- %w(A B C D F).each_with_object({}) do |rating, summary|
14
+ %w[A B C D F].each_with_object({}) do |rating, summary|
15
15
  summary[rating] = generate_for(rating)
16
16
  end
17
17
  end
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'launchy'
3
4
 
4
5
  module RubyCritic
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic'
3
4
  require 'rubycritic/cli/options'
4
5
  require 'rubycritic/command_factory'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'optparse'
3
4
  require 'rubycritic/browser'
4
5
 
@@ -21,7 +22,7 @@ module RubyCritic
21
22
 
22
23
  opts.on(
23
24
  '-f', '--format [FORMAT]',
24
- [:html, :json, :console],
25
+ %i[html json console],
25
26
  'Report smells in the given format:',
26
27
  ' html (default; will open in a browser)',
27
28
  ' json',
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module RubyCritic
3
4
  module Colorize
4
5
  def colorize(text, color_code)
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/configuration'
3
4
 
4
5
  module RubyCritic
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/commands/status_reporter'
3
4
 
4
5
  module RubyCritic
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/source_control_systems/base'
3
4
  require 'rubycritic/analysers_runner'
4
5
  require 'rubycritic/reporter'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/source_control_systems/base'
3
4
  require 'rubycritic/analysers_runner'
4
5
  require 'rubycritic/revision_comparator'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/commands/base'
3
4
 
4
5
  module RubyCritic
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module RubyCritic
3
4
  module Command
4
5
  class StatusReporter
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/version'
3
4
  require 'rubycritic/commands/base'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/source_control_systems/base'
3
4
 
4
5
  module RubyCritic
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'virtus'
3
4
  require 'rubycritic/core/rating'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/source_locator'
3
4
  require 'rubycritic/core/analysed_module'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'pathname'
3
4
 
4
5
  module RubyCritic
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module RubyCritic
3
4
  class Rating
4
5
  def self.from_cost(cost)
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'virtus'
3
4
  require 'rubycritic/core/location'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/generators/text/list'
3
4
 
4
5
  module RubyCritic
@@ -417,6 +417,10 @@ header {
417
417
  color: #197b30;
418
418
  }
419
419
 
420
+ ol.errors {
421
+ list-style: none;
422
+ padding-left: 0px;
423
+ }
420
424
  .errors {
421
425
  background-position: 10px 25px;
422
426
  background-repeat: no-repeat;
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'erb'
3
4
  require 'pathname'
4
5
  require 'rubycritic/generators/html/view_helpers'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/generators/html/base'
3
4
  require 'rubycritic/generators/html/line'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/generators/html/base'
3
4
 
4
5
  module RubyCritic
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'cgi'
3
4
  require 'rubycritic/generators/html/base'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/generators/html/base'
3
4
  require 'rubycritic/generators/html/turbulence'
4
5
  require 'rubycritic/analysis_summary'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/generators/html/base'
3
4
 
4
5
  module RubyCritic
@@ -1,6 +1,6 @@
1
1
  <%= @text %>
2
2
 
3
- <div class="nocode errors smells">
3
+ <ol class="nocode errors smells">
4
4
  <% @smells.each do |smell| %>
5
5
  <li>
6
6
  <div class="description">
@@ -20,4 +20,4 @@
20
20
  </div>
21
21
  </li>
22
22
  <% end %>
23
- </div>
23
+ </ol>
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'json'
3
4
  module RubyCritic
4
5
  module Turbulence
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module RubyCritic
3
4
  module ViewHelpers
4
5
  def timeago_tag(time)
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'fileutils'
3
4
  require 'rubycritic/configuration'
4
5
  require 'rubycritic/generators/html/overview'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'json'
3
4
  require 'rubycritic/version'
4
5
  require 'pathname'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rubycritic/generators/json/simple'
3
4
 
4
5
  module RubyCritic
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rainbow'
3
4
 
4
5
  module RubyCritic
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rake'
3
4
  require 'rake/tasklib'
4
5
  require 'English'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module RubyCritic
3
4
  module Reporter
4
5
  def self.generate_report(analysed_modules)
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'fileutils'
3
4
 
4
5
  module RubyCritic
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module RubyCritic
3
4
  module SmellsStatusSetter
4
5
  def self.set(smells_before, smells_now)
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'shellwords'
3
4
 
4
5
  module RubyCritic
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module RubyCritic
3
4
  module SourceControlSystem
4
5
  class Double < Base
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module RubyCritic
3
4
  module SourceControlSystem
4
5
  class Git < Base
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module RubyCritic
3
4
  module SourceControlSystem
4
5
  class Mercurial < Base
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'date'
3
4
 
4
5
  module RubyCritic
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyCritic
4
- VERSION = '3.2.0'.freeze
4
+ VERSION = '3.2.1'.freeze
5
5
  end
data/rubycritic.gemspec CHANGED
@@ -1,5 +1,6 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
+
3
4
  lib = File.expand_path('../lib', __FILE__)
4
5
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
6
  require 'rubycritic/version'
@@ -37,5 +38,5 @@ Gem::Specification.new do |spec|
37
38
  spec.add_development_dependency 'minitest', '~> 5.3', '>= 5.3.0'
38
39
  spec.add_development_dependency 'mocha', '~> 1.1', '>= 1.1.0'
39
40
  spec.add_development_dependency 'rake', '~> 11.0', '>= 11.0.0'
40
- spec.add_development_dependency 'rubocop', '~> 0.47', '>= 0.47.1'
41
+ spec.add_development_dependency 'rubocop', '~> 0.48.0'
41
42
  end
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
 
4
5
  class AnalysedModuleDouble < OpenStruct; end
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'analysers_test_helper'
3
4
  require 'rubycritic/analysers/churn'
4
5
  require 'rubycritic/source_control_systems/base'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'analysers_test_helper'
3
4
  require 'rubycritic/analysers/complexity'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'analysers_test_helper'
3
4
  require 'rubycritic/analysers/helpers/methods_counter'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/analysers/helpers/modules_locator'
4
5
  require 'rubycritic/core/analysed_module'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/analysers/smells/flay'
4
5
  require 'rubycritic/core/analysed_module'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'analysers_test_helper'
3
4
  require 'rubycritic/analysers/smells/flog'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'analysers_test_helper'
3
4
  require 'rubycritic/analysers/smells/reek'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/analysis_summary'
4
5
 
@@ -7,10 +8,10 @@ module RubyCritic
7
8
  before do
8
9
  analysed_modules = AnalysedModulesCollectionDouble.new(
9
10
  [
10
- AnalysedModuleDouble.new(rating: 'A', churn: 2, smells: [:a, :b, :c]),
11
+ AnalysedModuleDouble.new(rating: 'A', churn: 2, smells: %i[a b c]),
11
12
  AnalysedModuleDouble.new(rating: 'A', churn: 3, smells: [:b]),
12
- AnalysedModuleDouble.new(rating: 'A', churn: 4, smells: [:x, :y]),
13
- AnalysedModuleDouble.new(rating: 'B', churn: 5, smells: [:a, :z])
13
+ AnalysedModuleDouble.new(rating: 'A', churn: 4, smells: %i[x y]),
14
+ AnalysedModuleDouble.new(rating: 'B', churn: 5, smells: %i[a z])
14
15
  ]
15
16
  )
16
17
  @summary = RubyCritic::AnalysisSummary.generate(analysed_modules)
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/browser'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/commands/status_reporter'
4
5
  require 'rubycritic/cli/options'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/configuration'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/core/analysed_module'
4
5
  require 'rubycritic/core/smell'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/core/analysed_modules_collection'
4
5
 
@@ -15,7 +16,7 @@ describe RubyCritic::AnalysedModulesCollection do
15
16
  end
16
17
 
17
18
  context 'with a list of files' do
18
- let(:paths) { %w(test/samples/doesnt_exist.rb test/samples/unparsable.rb test/samples/empty.rb) }
19
+ let(:paths) { %w[test/samples/doesnt_exist.rb test/samples/unparsable.rb test/samples/empty.rb] }
19
20
 
20
21
  it 'registers one AnalysedModule element per existent file' do
21
22
  subject.count.must_equal 2
@@ -32,7 +33,7 @@ describe RubyCritic::AnalysedModulesCollection do
32
33
  end
33
34
 
34
35
  context 'with redundant paths' do
35
- let(:paths) { %w(test/samples/flog test/samples/flog/complex.rb) }
36
+ let(:paths) { %w[test/samples/flog test/samples/flog/complex.rb] }
36
37
 
37
38
  it 'returns a redundant collection' do
38
39
  subject.count.must_equal 3
@@ -64,7 +65,7 @@ describe RubyCritic::AnalysedModulesCollection do
64
65
  end
65
66
  end
66
67
 
67
- let(:paths) { %w(test/samples/flog test/samples/flay) }
68
+ let(:paths) { %w[test/samples/flog test/samples/flay] }
68
69
 
69
70
  context 'with perfect modules' do
70
71
  let(:costs) { [0.0, 0.0, 0.0, 0.0] }
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/core/location'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/core/smell'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/core/smell'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/generators/console_report'
4
5
  require 'rubycritic/core/rating'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/core/analysed_modules_collection'
4
5
  require 'rubycritic/generators/json_report'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/generators/html/turbulence'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/generators/html/view_helpers'
4
5
  require 'pathname'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/revision_comparator'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/core/smell'
4
5
  require 'rubycritic/smells_status_setter'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/source_control_systems/base'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/source_control_systems/base'
4
5
  require_relative 'interfaces/basic'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/source_control_systems/base'
4
5
  require_relative 'interfaces/basic'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module BasicInterface
3
4
  def test_implements_basic_interface
4
5
  assert_respond_to @system, :revisions_count
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  # This interface is only used if `@system.revision?` returns `true`.
3
4
  module TimeTravelInterface
4
5
  def test_implements_time_travel_interface
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/source_control_systems/base'
4
5
  require_relative 'interfaces/basic'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/source_control_systems/base'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/source_locator'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'test_helper'
3
4
  require 'rubycritic/version'
4
5
 
data/test/test_helper.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'minitest/autorun'
3
4
  require 'minitest/pride'
4
5
  require 'mocha/mini_test'
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: 3.2.0
4
+ version: 3.2.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: 2017-03-24 00:00:00.000000000 Z
11
+ date: 2017-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: flay
@@ -268,20 +268,14 @@ dependencies:
268
268
  requirements:
269
269
  - - "~>"
270
270
  - !ruby/object:Gem::Version
271
- version: '0.47'
272
- - - ">="
273
- - !ruby/object:Gem::Version
274
- version: 0.47.1
271
+ version: 0.48.0
275
272
  type: :development
276
273
  prerelease: false
277
274
  version_requirements: !ruby/object:Gem::Requirement
278
275
  requirements:
279
276
  - - "~>"
280
277
  - !ruby/object:Gem::Version
281
- version: '0.47'
282
- - - ">="
283
- - !ruby/object:Gem::Version
284
- version: 0.47.1
278
+ version: 0.48.0
285
279
  description: RubyCritic is a tool that wraps around various static analysis gems to
286
280
  provide a quality report of your Ruby code.
287
281
  email: