metric_fu 4.7.1 → 4.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1f178e3ced89b43d43144587d8fcf0faa6adc38
4
- data.tar.gz: 7c302eeb598ec42c3810c05d1baf0b6a15893c5b
3
+ metadata.gz: c6609b8b2f3f1b288dbbd391ffd0f7548bd3e202
4
+ data.tar.gz: d11c89b1d760cd87d5bf080a5becc5b9618d5f77
5
5
  SHA512:
6
- metadata.gz: c5713971e8fe128c947156a94bc35e799135f4c80bd3ed67a9434659b4b87f89ab918f55c7473c0d1230dda327f5cf25be406e845dc8c7dd220ac215a9ea4a01
7
- data.tar.gz: a06b341d9d74afda7e93449d12fc0511d014a19bfe0bd018105af2864c27c2fa7fe27a465ff4ea7fbb7fdd2e3f9600ad16b7449f714d9f926ccbb853c5a44d4f
6
+ metadata.gz: 7617be07d98b212407966904330efa61bd069c4fbec1d7a41c80deec88d88067be33b21275a1545910eb4998593313aee241ddc4c00e6a3c70ce36b7072953f7
7
+ data.tar.gz: 7bfb8ed55f600b1a4676db9d55d5720af968da181966aa5530b778558fd3eceedd4dc11759830606e5dfa2dbde914a4eb26074f3c8e88bcb6c9d2fce81f9369a
Binary file
data.tar.gz.sig CHANGED
Binary file
data/HISTORY.md CHANGED
@@ -4,13 +4,20 @@ Each change should fall into categories that would affect whether the release is
4
4
 
5
5
  As such, a _Feature_ would map to either major or minor. A _bug fix_ to a patch. And _misc_ is either minor or patch, the difference being kind of fuzzy for the purposes of history. Adding tests would be patch level.
6
6
 
7
- ### Master [changes](https://github.com/metricfu/metric_fu/compare/v4.7.1...master)
7
+ ### Master [changes](https://github.com/metricfu/metric_fu/compare/v4.7.2...master)
8
8
 
9
9
  * Breaking Changes
10
10
  * Features
11
11
  * Fixes
12
12
  * Misc
13
13
 
14
+ ### [4.7.2 / 2014-01-21](https://github.com/metricfu/metric_fu/compare/v4.7.1...v4.7.2)
15
+
16
+ * Fixes
17
+ * Open Saikuro scratch files in BINARY; fixes #190. (Benjamin Fleischer, #195)
18
+ * Update to churn 0.0.35 for API compatibility. (Przemysław Dąbek, #193)
19
+ * Only specify reek config when set; disable line numbers. (Benjamin Fleischer, #196)
20
+
14
21
  ### [4.7.1 / 2014-01-01](https://github.com/metricfu/metric_fu/compare/v4.7.0...v4.7.1)
15
22
 
16
23
  * Fixes
@@ -0,0 +1 @@
1
+ c7769b05094f900a0b48c1e8b9e4df67372223e0540d97c94109eb00af5acf32cb20615c8c5adcf7352a3ee1ad1b3106b5b20b87ebccc3dfc86a21ca5709490b
@@ -0,0 +1 @@
1
+ b2ddfe5790f9f70a13b468dd588a2397b171c813d34315ee91ab2f2e64ec5b0297a256e77fec3c00d0139cfee93fe64ee8916f42e50d299871594b627eaf24de
@@ -6,7 +6,7 @@ module MetricFu
6
6
  end
7
7
 
8
8
  def default_run_options
9
- {
9
+ {
10
10
  :start_date => %q("1 year ago"),
11
11
  :minimum_churn_count => 10,
12
12
  :ignore_files => [],
@@ -23,7 +23,7 @@ module MetricFu
23
23
  end
24
24
 
25
25
  def activate
26
- activate_library('churn/churn_calculator')
26
+ activate_library('churn/calculator')
27
27
  super
28
28
  end
29
29
 
@@ -6,8 +6,10 @@ module MetricFu
6
6
  end
7
7
 
8
8
  def default_run_options
9
- { :dirs_to_reek => MetricFu::Io::FileSystem.directory('code_dirs'),
10
- :config_file_pattern => 'config/*.reek'}
9
+ {
10
+ :dirs_to_reek => MetricFu::Io::FileSystem.directory('code_dirs'),
11
+ :config_file_pattern => nil,
12
+ }
11
13
  end
12
14
 
13
15
  def has_graph?
@@ -94,15 +94,25 @@ module MetricFu
94
94
  end
95
95
 
96
96
  def cli_options(files)
97
- '--line-number ' <<
98
- config_option(options[:config_file_pattern]) << ' ' <<
97
+ [
98
+ disable_line_number_option,
99
+ config_option,
99
100
  files.join(' ')
101
+ ].join(' ')
100
102
  end
101
103
 
102
- def config_option(location)
103
- return '' if location.to_s.empty?
104
- option = "--config #{location}"
105
- '--config .reek ' << option unless location == '.reek'
104
+ # TODO: Check that specified line config file exists
105
+ def config_option
106
+ config_file_pattern = options[:config_file_pattern]
107
+ if config_file_pattern.to_s.empty?
108
+ ''
109
+ else
110
+ "--config #{config_file_pattern}"
111
+ end
112
+ end
113
+
114
+ def disable_line_number_option
115
+ '-n'
106
116
  end
107
117
 
108
118
  end
@@ -20,13 +20,13 @@ module MetricFu
20
20
  def initialize(path)
21
21
  @path = path
22
22
  @elements = []
23
- File.open(@path, "r") do |file|
23
+ File.open(@path, "rb") do |file|
24
24
  get_elements(file)
25
25
  end
26
26
  end
27
27
 
28
28
  def self.is_valid_text_file?(path)
29
- File.open(path, "r") do |file|
29
+ File.open(path, "rb") do |file|
30
30
  if file.eof? || !file.readline.match(/--/)
31
31
  return false
32
32
  else
@@ -1,3 +1,3 @@
1
1
  module MetricFu
2
- VERSION = '4.7.1'
2
+ VERSION = '4.7.2'
3
3
  end
@@ -43,12 +43,12 @@ Gem::Specification.new do |s|
43
43
 
44
44
  # metric dependencies
45
45
  s.add_runtime_dependency 'flay', ['>= 2.0.1', '~> 2.1']
46
- s.add_runtime_dependency 'churn', ['~> 0.0.28']
46
+ s.add_runtime_dependency 'churn', ['~> 0.0.35']
47
47
  s.add_runtime_dependency 'flog', ['>= 4.1.1', '~> 4.1']
48
48
  s.add_runtime_dependency 'reek', ['>= 1.3.4', '~> 1.3']
49
49
  s.add_runtime_dependency 'cane', ['>= 2.5.2', '~> 2.5']
50
50
  s.add_runtime_dependency 'rails_best_practices', ['>= 1.14.3', '~> 1.14']
51
- s.add_runtime_dependency 'metric_fu-Saikuro', ['>= 1.1.1.0']
51
+ s.add_runtime_dependency 'metric_fu-Saikuro', ['>= 1.1.3', '~> 1.1']
52
52
  s.add_runtime_dependency 'roodi', ['~> 3.1']
53
53
  s.add_runtime_dependency 'code_metrics', ['~> 0.1']
54
54
 
@@ -177,7 +177,7 @@ describe MetricFu::Configuration do
177
177
  it 'should set @reek to {:dirs_to_reek => @code_dirs}' do
178
178
  load_metric 'reek'
179
179
  expect(MetricFu::Metric.get_metric(:reek).run_options).to eq(
180
- {:config_file_pattern=>'config/*.reek', :dirs_to_reek => ['lib']}
180
+ {:config_file_pattern=>nil, :dirs_to_reek => ['lib']}
181
181
  )
182
182
  end
183
183
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metric_fu
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.7.1
4
+ version: 4.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Scruggs
@@ -42,7 +42,7 @@ cert_chain:
42
42
  WONz9vT6h053kHZYMrd4Gs/NdaA4tJSxrhZlXdajAm/0vAOzLIqUHHQk3R0tf7aY
43
43
  d/w=
44
44
  -----END CERTIFICATE-----
45
- date: 2014-01-01 00:00:00.000000000 Z
45
+ date: 2014-01-21 00:00:00.000000000 Z
46
46
  dependencies:
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: flay
@@ -70,14 +70,14 @@ dependencies:
70
70
  requirements:
71
71
  - - ~>
72
72
  - !ruby/object:Gem::Version
73
- version: 0.0.28
73
+ version: 0.0.35
74
74
  type: :runtime
75
75
  prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
78
  - - ~>
79
79
  - !ruby/object:Gem::Version
80
- version: 0.0.28
80
+ version: 0.0.35
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: flog
83
83
  requirement: !ruby/object:Gem::Requirement
@@ -164,14 +164,20 @@ dependencies:
164
164
  requirements:
165
165
  - - '>='
166
166
  - !ruby/object:Gem::Version
167
- version: 1.1.1.0
167
+ version: 1.1.3
168
+ - - ~>
169
+ - !ruby/object:Gem::Version
170
+ version: '1.1'
168
171
  type: :runtime
169
172
  prerelease: false
170
173
  version_requirements: !ruby/object:Gem::Requirement
171
174
  requirements:
172
175
  - - '>='
173
176
  - !ruby/object:Gem::Version
174
- version: 1.1.1.0
177
+ version: 1.1.3
178
+ - - ~>
179
+ - !ruby/object:Gem::Version
180
+ version: '1.1'
175
181
  - !ruby/object:Gem::Dependency
176
182
  name: roodi
177
183
  requirement: !ruby/object:Gem::Requirement
@@ -327,6 +333,8 @@ files:
327
333
  - checksum/metric_fu-4.5.2.gem.sha512
328
334
  - checksum/metric_fu-4.6.0.gem.sha512
329
335
  - checksum/metric_fu-4.7.0.gem.sha512
336
+ - checksum/metric_fu-4.7.1.gem.sha512
337
+ - checksum/metric_fu-4.7.2.gem.sha512
330
338
  - config/roodi_config.yml
331
339
  - gem_tasks/build.rake
332
340
  - gemfiles/Gemfile.travis
metadata.gz.sig CHANGED
Binary file