rbgccxml 0.1 → 0.1.1

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 CHANGED
@@ -4,7 +4,7 @@ require 'rake/contrib/sshpublisher'
4
4
  require 'rake/gempackagetask'
5
5
 
6
6
  PROJECT_NAME = "rbgccxml"
7
- RBGCCXML_VERSION = "0.1"
7
+ RBGCCXML_VERSION = "0.1.1"
8
8
 
9
9
  task :default => :test
10
10
 
@@ -46,7 +46,7 @@ spec = Gem::Specification.new do |s|
46
46
  s.email = 'jameskilton@gmail.com'
47
47
 
48
48
  s.add_dependency "hpricot", "0.6"
49
- s.add_dependency "gccxml_gem", "0.9"
49
+ s.add_dependency "gccxml_gem", "0.9.1"
50
50
 
51
51
  s.description = <<-END
52
52
  Rbgccxml is a library that parses out GCCXML (http://www.gccxml.org) output
@@ -13,6 +13,10 @@ module RbGCCXML
13
13
  @gccxml.add_include includes
14
14
  end
15
15
 
16
+ if flags = config.delete(:cxxflags)
17
+ @gccxml.add_cxxflags flags
18
+ end
19
+
16
20
  validate_glob(config[:files])
17
21
  end
18
22
 
@@ -15,7 +15,8 @@ module RbGCCXML
15
15
  #
16
16
  # +options+ can be any of:
17
17
  #
18
- # includes:: A single string, or an array of strings of directory includes (-I directives)
18
+ # includes: A single string, or an array of strings of directory includes (-I directives)
19
+ # cxxflags: A single string, or an array of strings of other command line flags
19
20
  #
20
21
  # Returns the Namespace Node linked to the global namespace "::".
21
22
  #
@@ -31,7 +32,8 @@ module RbGCCXML
31
32
  # Run gccxml on the expected file
32
33
  # 5. Parse out XML into class tree
33
34
 
34
- @parser = Parser.new :files => files, :includes => options[:includes]
35
+ options.merge!(:files => files)
36
+ @parser = Parser.new options
35
37
  @parser.parse
36
38
  end
37
39
 
data/test/parser_test.rb CHANGED
@@ -17,7 +17,8 @@ context "Default parsing configuration" do
17
17
  specify "can parse all files in a directory" do
18
18
  should.not.raise do
19
19
  RbGCCXML.parse(full_dir("headers"),
20
- :includes => full_dir("headers/include"))
20
+ :includes => full_dir("headers/include"),
21
+ :cxxflags => "-DMUST_BE_DEFINED")
21
22
  end
22
23
  end
23
24
 
@@ -62,4 +63,11 @@ context "Configurable parsing configuration" do
62
63
  :includes => full_dir("headers/include")
63
64
  found.namespaces("code").should.not.be.nil
64
65
  end
66
+
67
+ specify "can be given extra cxxflags for parsing" do
68
+ should.not.raise do
69
+ RbGCCXML.parse full_dir("headers/requires_define.hxx"),
70
+ :cxxflags => "-DMUST_BE_DEFINED"
71
+ end
72
+ end
65
73
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbgccxml
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.1"
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Roelofs
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-05-04 00:00:00 -04:00
12
+ date: 2008-05-11 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -28,7 +28,7 @@ dependencies:
28
28
  requirements:
29
29
  - - "="
30
30
  - !ruby/object:Gem::Version
31
- version: "0.9"
31
+ version: 0.9.1
32
32
  version:
33
33
  description: Rbgccxml is a library that parses out GCCXML (http://www.gccxml.org) output and provides a simple but very powerful querying API for finding exactly what you want out of the C++ source code
34
34
  email: jameskilton@gmail.com