rubycritic 3.1.1 → 3.1.2

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
2
  SHA1:
3
- metadata.gz: 0555c63872e8ba208eed9e2b2ba2e409b6bcc2af
4
- data.tar.gz: 4ec5b4de84de9b3f9ab6c864d9cf1056f38c07b8
3
+ metadata.gz: f8f2f85163f5b08fc060734e2d5f0bd1a507a8a3
4
+ data.tar.gz: 96e256ad688633e3fcd70241ca88e83c2bd1b985
5
5
  SHA512:
6
- metadata.gz: 652e9d64e4ac113cb346833907e4d05b289f98f236aaa52970b40f9d472b38bf56bcb48fff30fc31d4e4774f28740dbbfafc5950a75c356d6bc3894b0dbf00bc
7
- data.tar.gz: 20d381594ebb3ab984e95e0d62b00086ea379f119bbbd63698c51439f8e8b7ce83145b5d9bfba57d1d5c4e2868dee0cea239d5b3ef40d961decae640de9d240f
6
+ metadata.gz: f01945bea4bab8706ecd0df163bc0295edc6f28d300b45aa91dac33af99888694b50d819d9cb072782afc2514d26b72815b53b886919534e4d797c82fa76072b
7
+ data.tar.gz: 2fdd9bece78a7604c76f5d0ddaf4a197000463eb1c42854603f6452ba663d875b98e6e9706916c5c81d7f1be69aa4e697b4dd6365856e0424a41e6815305e3f3
data/.travis.yml CHANGED
@@ -5,9 +5,9 @@ before_install: gem update bundler
5
5
  matrix:
6
6
  include:
7
7
  - rvm: 2.1.0
8
- - rvm: 2.1.10
9
- - rvm: 2.2.5
10
- - rvm: 2.3.1
8
+ - rvm: 2.1
9
+ - rvm: 2.2
10
+ - rvm: 2.3.3
11
11
  - rvm: ruby-head
12
12
  - rvm: jruby-9.1.5.0
13
13
  env: JRUBY_OPTS='--debug' # get more accurate coverage data
data/CHANGELOG.md CHANGED
@@ -1,7 +1,13 @@
1
- # 3.1.1 / 2016-12-01
1
+ # 3.1.2 / 2016-12-17
2
+
3
+ * [BUGFIX] Fix lack of the GPA chart when used with rake/rails (by hoshinotsuyoshi)
4
+ * [BUGFIX] Fix code navigation links in the new UI (by rohitcy)
5
+
6
+ # 3.1.1 / 2016-12-02
2
7
 
3
8
  * [FEATURE] Implement search and filter on code and smells view (rohitcy)
4
9
  * [CHANGE] Use Ruby's File instead of `wc` system command (by tejasbubane)
10
+ * [CHANGE] Add MRI 2.3.3 compatibility by updating `parser` to v2.3.3.1 (by josephpage)
5
11
  * [BUGFIX] Fix code navigation links in the new UI (by rohitcy)
6
12
  * [BUGFIX] Add missing method 'head_reference' for Perforce source control (Rataah)
7
13
 
@@ -1,4 +1,6 @@
1
1
  # frozen_string_literal: true
2
+ require 'rubycritic/source_control_systems/base'
3
+
2
4
  module RubyCritic
3
5
  class Configuration
4
6
  attr_reader :root
@@ -18,6 +20,11 @@ module RubyCritic
18
20
  def root=(path)
19
21
  @root = File.expand_path(path)
20
22
  end
23
+
24
+ def source_control_present?
25
+ source_control_system &&
26
+ !source_control_system.is_a?(SourceControlSystem::Double)
27
+ end
21
28
  end
22
29
 
23
30
  module Config
@@ -20,12 +20,16 @@
20
20
  <!--Churn vs Complexity graph-->
21
21
  <div class="col-xs-7 col-sm-7 col-md-6 col-lg-8">
22
22
  <div class="Graph_Cards fadeIn">
23
+ <% if Config.source_control_present? %>
24
+ <div id="churn-vs-complexity-graph-container" class="chart-container"></div>
25
+ <% else %>
26
+ <div id="churn-error">We can't show you Churn-vs-Complexity graph because this project does not seem to be under a source code management system like git or perforce at the moment. This doesn't mean that anything is wrong, it just means certain features like this one are not avaiable.</div>
27
+ <% end %>
23
28
 
24
- <div id="churn-vs-complexity-graph-container" class="chart-container"></div>
25
- <script type="text/javascript">
26
- var turbulenceData = <%= @turbulence_data %>;
27
- var score = <%= @score %>;
28
- </script>
29
+ <script type="text/javascript">
30
+ var turbulenceData = <%= @turbulence_data %>;
31
+ var score = <%= @score %>;
32
+ </script>
29
33
  </div>
30
34
  </div>
31
35
  <!--End Churn vs Complexity graph-->
@@ -8,7 +8,7 @@ module RubyCritic
8
8
  name: analysed_module.name,
9
9
  x: analysed_module.churn,
10
10
  y: analysed_module.complexity,
11
- rating: analysed_module.rating
11
+ rating: analysed_module.rating.to_s
12
12
  }
13
13
  end.to_json
14
14
  end
@@ -19,7 +19,9 @@ module RubyCritic
19
19
  if supported_system
20
20
  supported_system.new
21
21
  else
22
- puts "RubyCritic can provide more feedback if you use a #{connected_system_names} repository."
22
+ puts 'RubyCritic can provide more feedback if you use '\
23
+ "a #{connected_system_names} repository. "\
24
+ 'Churn will not be calculated.'
23
25
  Double.new
24
26
  end
25
27
  end
@@ -3,7 +3,7 @@ module RubyCritic
3
3
  module SourceControlSystem
4
4
  class Double < Base
5
5
  def revisions_count(_)
6
- 'N/A'
6
+ 0
7
7
  end
8
8
 
9
9
  def date_of_last_commit(_)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyCritic
4
- VERSION = '3.1.1'.freeze
4
+ VERSION = '3.1.2'.freeze
5
5
  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: 3.1.1
4
+ version: 3.1.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-12-02 00:00:00.000000000 Z
11
+ date: 2016-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: virtus
@@ -493,4 +493,3 @@ test_files:
493
493
  - test/samples/reek/smelly.rb
494
494
  - test/samples/unparsable.rb
495
495
  - test/test_helper.rb
496
- has_rdoc: