mwilden-metric_fu 1.1.3 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY CHANGED
@@ -1,3 +1,11 @@
1
+ === MetricFu 1.1.5 / 2009-8-13
2
+
3
+ * Previous Ruby 1.9 fix was not quite fix-y enough
4
+
5
+ === MetricFu 1.1.4 / 2009-7-13
6
+
7
+ * Fixed another Ruby 1.9x bug
8
+
1
9
  === MetricFu 1.1.3 / 2009-7-10
2
10
 
3
11
  * MetricFu is now Ruby 1.9x compatible
@@ -129,7 +129,11 @@ module MetricFu
129
129
  "--no-color",
130
130
  "--profile",
131
131
  "--rails",
132
- "--exclude /gems/,/Library/,/usr/,spec"]}
132
+ "--exclude /gems/,/Library/,/usr/,spec,features"],
133
+ :feature_files => ['features/*.feature'],
134
+ :cucumber_executable => '/usr/bin/cucumber',
135
+ :cucumber_opts => ["--format profile"]}
136
+
133
137
 
134
138
  @graph_theme = { :colors => %w(orange purple green white red blue pink yellow),
135
139
  :marker_color => 'blue',
@@ -3,12 +3,8 @@ module MetricFu
3
3
  class Flog < Generator
4
4
  attr_reader :pages
5
5
 
6
- def self.flog_command
7
- File.dirname(__FILE__) + '/../../vendor/flog/flog'
8
- end
9
-
10
6
  def self.verify_dependencies!
11
- `#{flog_command} --help`
7
+ `flog --help`
12
8
  raise 'sudo gem install flog # if you want the flog tasks' unless $?.success?
13
9
  end
14
10
 
@@ -23,7 +19,7 @@ module MetricFu
23
19
  output_dir = "#{metric_dir}/#{filename.split("/")[0..-2].join("/")}"
24
20
  mkdir_p(output_dir, :verbose => false) unless File.directory?(output_dir)
25
21
  if MetricFu::MD5Tracker.file_changed?(filename, metric_dir)
26
- `#{self.class.flog_command} -ad #{filename} > #{metric_dir}/#{filename.split('.')[0]}.txt`
22
+ `flog -ad #{filename} > #{metric_dir}/#{filename.split('.')[0]}.txt`
27
23
  end
28
24
  end
29
25
  end
@@ -37,6 +37,14 @@ module MetricFu
37
37
  rcov_opts = MetricFu.rcov[:rcov_opts].join(' ')
38
38
  output = ">> #{MetricFu::Rcov.metric_directory}/rcov.txt"
39
39
  `rcov #{test_files} #{rcov_opts} #{output}`
40
+
41
+ if MetricFu.rcov[:run_cucumber]
42
+ cucumber_opts = MetricFu.rcov[:cucumber_opts].join(' ')
43
+ cucumber_executable = MetricFu.rcov[:cucumber_executable]
44
+ feature_files = FileList[*MetricFu.rcov[:feature_files]].join(' ')
45
+ `rcov #{rcov_opts} #{cucumber_executable} -- #{cucumber_opts} #{feature_files} #{output}`
46
+ end
47
+
40
48
  rescue LoadError
41
49
  if RUBY_PLATFORM =~ /java/
42
50
  puts 'running in jruby - rcov tasks not available'
@@ -1105,9 +1105,14 @@ if __FILE__ == $0
1105
1105
  require 'getoptlong'
1106
1106
  require 'fileutils'
1107
1107
  require 'find'
1108
- require 'rdoc/ri/ri_paths'
1109
- require 'rdoc/usage'
1110
-
1108
+ begin
1109
+ require 'rdoc/ri/ri_paths'
1110
+ require 'rdoc/usage'
1111
+ rescue LoadError
1112
+ # these requires cause problems in Ruby 1.9x that I'm not really sure how to fix
1113
+ require 'rdoc/ri/paths'
1114
+ #Still not sure what the equivalent of rdoc/usage is. I know it has been removed from 1.9
1115
+ end
1111
1116
  include ResultIndexGenerator
1112
1117
 
1113
1118
  #Returns the path without the file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mwilden-metric_fu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Scruggs