cxxproject_valgrind 1.0
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.
- data/Rakefile.rb +34 -0
- data/lib/plugin.rb +27 -0
- metadata +64 -0
data/Rakefile.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'rake/clean'
|
2
|
+
require 'rubygems/package_task'
|
3
|
+
|
4
|
+
desc "Default Task"
|
5
|
+
task :default => [:install]
|
6
|
+
|
7
|
+
PKG_VERSION = 1.0
|
8
|
+
PKG_FILES = FileList[
|
9
|
+
"lib/**/*.rb",
|
10
|
+
"Rakefile.rb",
|
11
|
+
"spec/**/*.rb",
|
12
|
+
]
|
13
|
+
|
14
|
+
spec = Gem::Specification.new do |s|
|
15
|
+
s.name = "cxxproject_valgrind"
|
16
|
+
s.version = PKG_VERSION
|
17
|
+
s.summary = "valgrind plugin for cxxproject."
|
18
|
+
s.description = <<-EOF
|
19
|
+
provides valgrind executable environment.
|
20
|
+
EOF
|
21
|
+
s.files = PKG_FILES.to_a
|
22
|
+
s.require_path = "lib"
|
23
|
+
s.author = "christian koestlin"
|
24
|
+
s.email = "christian.koestlin@gmail.com"
|
25
|
+
s.homepage = "https://github.com/marcmo/cxxproject_valgrind"
|
26
|
+
s.add_dependency("cxxproject")
|
27
|
+
end
|
28
|
+
|
29
|
+
Gem::PackageTask.new(spec) {|pkg|}
|
30
|
+
|
31
|
+
desc "install gem"
|
32
|
+
task :install => [:gem] do
|
33
|
+
sh "gem install pkg/#{spec.name}-#{spec.version}.gem"
|
34
|
+
end
|
data/lib/plugin.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
cxx_plugin do |cxxproject2rake, building_blocks, log|
|
2
|
+
def available?
|
3
|
+
return system 'which valgrind'
|
4
|
+
end
|
5
|
+
|
6
|
+
if not available?
|
7
|
+
log.error('you should install valgrind or disable the valgrind plugin')
|
8
|
+
return
|
9
|
+
else
|
10
|
+
cxxproject2rake.create_filter_task_with_namespace(:valgrind)
|
11
|
+
end
|
12
|
+
|
13
|
+
building_blocks.each_value.to_a.select do |bb|
|
14
|
+
bb.is_a? Cxxproject::Executable
|
15
|
+
end.each do |bb|
|
16
|
+
name = bb.name
|
17
|
+
executable = bb.get_task_name
|
18
|
+
namespace 'valgrind' do
|
19
|
+
desc "run executable #{executable} with valgrind"
|
20
|
+
res = task name => executable do |t|
|
21
|
+
sh "valgrind #{executable}"
|
22
|
+
end
|
23
|
+
res.type = Rake::Task::RUN
|
24
|
+
res
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cxxproject_valgrind
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '1.0'
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- christian koestlin
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-07-10 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: cxxproject
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
description: ! ' provides valgrind executable environment.
|
31
|
+
|
32
|
+
'
|
33
|
+
email: christian.koestlin@gmail.com
|
34
|
+
executables: []
|
35
|
+
extensions: []
|
36
|
+
extra_rdoc_files: []
|
37
|
+
files:
|
38
|
+
- lib/plugin.rb
|
39
|
+
- Rakefile.rb
|
40
|
+
homepage: https://github.com/marcmo/cxxproject_valgrind
|
41
|
+
licenses: []
|
42
|
+
post_install_message:
|
43
|
+
rdoc_options: []
|
44
|
+
require_paths:
|
45
|
+
- lib
|
46
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
47
|
+
none: false
|
48
|
+
requirements:
|
49
|
+
- - ! '>='
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ! '>='
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '0'
|
58
|
+
requirements: []
|
59
|
+
rubyforge_project:
|
60
|
+
rubygems_version: 1.8.24
|
61
|
+
signing_key:
|
62
|
+
specification_version: 3
|
63
|
+
summary: valgrind plugin for cxxproject.
|
64
|
+
test_files: []
|