tidy-ext 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +44 -25
- data/VERSION +1 -1
- data/features/step_definitions/tidy_steps.rb +1 -1
- data/spec/tidy/compat_spec.rb +1 -1
- data/spec/tidy/remote_uri_spec.rb +2 -2
- data/spec/tidy/tidy_spec.rb +1 -1
- metadata +4 -4
data/Rakefile
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake'
|
3
|
-
require 'rake/extensiontask'
|
4
3
|
|
5
4
|
begin
|
6
5
|
require 'jeweler'
|
@@ -14,6 +13,8 @@ begin
|
|
14
13
|
gem.extensions = FileList["ext/**/extconf.rb"]
|
15
14
|
end
|
16
15
|
Jeweler::GemcutterTasks.new
|
16
|
+
|
17
|
+
task :spec => :check_dependencies
|
17
18
|
rescue LoadError
|
18
19
|
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
19
20
|
end
|
@@ -23,21 +24,23 @@ task :console do
|
|
23
24
|
exec("irb -I lib -r tidy/alone")
|
24
25
|
end
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
spec
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
33
|
-
spec.libs << 'lib' << 'spec'
|
34
|
-
spec.pattern = 'spec/**/*_spec.rb'
|
35
|
-
spec.rcov = true
|
36
|
-
end
|
27
|
+
begin
|
28
|
+
require 'spec/rake/spectask'
|
29
|
+
Spec::Rake::SpecTask.new(:spec) do |spec|
|
30
|
+
spec.libs << 'lib' << 'spec'
|
31
|
+
spec.spec_files = FileList['spec/**/*_spec.rb']
|
32
|
+
end
|
37
33
|
|
38
|
-
|
34
|
+
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
35
|
+
spec.libs << 'lib' << 'spec'
|
36
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
37
|
+
spec.rcov = true
|
38
|
+
end
|
39
39
|
|
40
|
-
task :default => :spec
|
40
|
+
task :default => :spec
|
41
|
+
rescue LoadError
|
42
|
+
puts "RSpec (or a dependency) not available. Install it with: gem install rspec"
|
43
|
+
end
|
41
44
|
|
42
45
|
require 'rake/rdoctask'
|
43
46
|
Rake::RDocTask.new do |rdoc|
|
@@ -49,19 +52,35 @@ Rake::RDocTask.new do |rdoc|
|
|
49
52
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
50
53
|
end
|
51
54
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
55
|
+
begin
|
56
|
+
require 'rake/extensiontask'
|
57
|
+
Rake::ExtensionTask.new do |ext|
|
58
|
+
ext.name = 'tidy'
|
59
|
+
ext.ext_dir = 'ext/tidy'
|
60
|
+
ext.config_options << '--with-coverage' if ENV['COV']
|
61
|
+
end
|
62
|
+
rescue LoadError
|
63
|
+
puts "rake-compiler not available. Install it with: gem install rake-compiler"
|
56
64
|
end
|
57
65
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
66
|
+
namespace :gcov do
|
67
|
+
|
68
|
+
desc "Recompile with gcc coverage options"
|
69
|
+
task :compile do |t|
|
70
|
+
ENV['COV'] = '1'
|
71
|
+
Rake::Task["compile"].invoke
|
72
|
+
end
|
73
|
+
|
74
|
+
desc "Run specs and output gcov info"
|
75
|
+
task :spec do |t|
|
76
|
+
Rake::Task[:spec].invoke
|
77
|
+
obj = Dir.glob('**/ruby-tidy.o').first
|
78
|
+
puts %x{cd #{File.dirname(obj)} && gcov -b --object-file #{File.basename(obj)} ruby-tidy.c}
|
79
|
+
end
|
80
|
+
|
81
|
+
desc "Clean, compile with gcc coverage and run specs"
|
82
|
+
task :all, :needs => ["clean", :compile, :spec] do |t|
|
83
|
+
end
|
63
84
|
|
64
|
-
ruby_tidy_o = Dir.glob('**/ruby-tidy.o').first
|
65
|
-
puts %x{gcov --no-output --object-file #{ruby_tidy_o} ext/tidy/ruby-tidy.c}
|
66
85
|
end
|
67
86
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.11
|
@@ -8,7 +8,7 @@ Given /^(.+) is tidy$/ do |page_name|
|
|
8
8
|
out = tidy.clean(response.body)
|
9
9
|
end
|
10
10
|
|
11
|
-
tidy.errors.scan(/(\d+)
|
11
|
+
tidy.errors.scan(/(\d+) warnings?, (\d+) errors? were found!/) do |w,e|
|
12
12
|
warnings = w.to_i
|
13
13
|
errors = e.to_i
|
14
14
|
unless warnings == 0 && errors == 0
|
data/spec/tidy/compat_spec.rb
CHANGED
data/spec/tidy/tidy_spec.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tidy-ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 11
|
10
|
+
version: 0.1.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Carl Douglas
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-02-16 00:00:00 +11:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|