cxxproject 0.6.11 → 0.6.12

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.
@@ -172,7 +172,7 @@ module Cxxproject
172
172
 
173
173
  exclude_files = Set.new
174
174
  exclude_sources.each do |p|
175
- if p.include?".."
175
+ if p.include?("..")
176
176
  Printer.printError "Error: Exclude source file pattern '#{p}' must not include '..'"
177
177
  return nil
178
178
  end
@@ -182,7 +182,7 @@ module Cxxproject
182
182
  files = Set.new # do not build the same file twice
183
183
 
184
184
  sources.each do |f|
185
- if f.include?".."
185
+ if f.include?("..")
186
186
  Printer.printError "Error: Source file '#{f}' must not include '..'"
187
187
  return nil
188
188
  end
@@ -194,7 +194,7 @@ module Cxxproject
194
194
  end
195
195
 
196
196
  source_patterns.each do |p|
197
- if p.include?".."
197
+ if p.include?("..")
198
198
  Printer.printError "Error: Source file pattern '#{p}' must not include '..'"
199
199
  return nil
200
200
  end
@@ -253,17 +253,17 @@ module Cxxproject
253
253
  dep_file = nil
254
254
  if type != :ASM
255
255
  dep_file = get_dep_file(objectRel)
256
- dep_file = "\""+dep_file+"\"" if dep_file.include?" "
256
+ dep_file = "\""+dep_file+"\"" if dep_file.include?(" ")
257
257
  depStr = the_tcs[:COMPILER][type][:DEP_FLAGS]
258
258
  end
259
259
 
260
260
  res = typed_file_task Rake::Task::OBJECT, object => source do
261
261
  compiler = the_tcs[:COMPILER][type]
262
-
262
+
263
263
  if Rake::application.preproFlags and compiler[:PREPRO_FLAGS] == ""
264
264
  Printer.printInfo("Info: No preprocessor option available for " + sourceRel)
265
265
  else
266
-
266
+
267
267
  i_array = the_tcs == @tcs ? @include_string[type] : get_include_string(the_tcs, type)
268
268
  d_array = the_tcs == @tcs ? @define_string[type] : get_define_string(the_tcs, type)
269
269
 
@@ -285,12 +285,12 @@ module Cxxproject
285
285
  cmd << sourceRel
286
286
 
287
287
  if Cxxproject::Utils.old_ruby?
288
- cmd.map! {|c| ((c.include?" ") ? ("\""+c+"\"") : c )}
288
+ cmd.map! {|c| ((c.include?(" ")) ? ("\""+c+"\"") : c )}
289
289
  cmdLine = cmd.join(" ")
290
290
  if cmdLine.length > 8000
291
291
  inputName = objectRel+".tmp"
292
292
  File.open(inputName,"wb") { |f| f.write(cmd[1..-1].join(" ")) }
293
- inputName = "\""+inputName+"\"" if inputName.include?" "
293
+ inputName = "\""+inputName+"\"" if inputName.include?(" ")
294
294
  consoleOutput = `#{compiler[:COMMAND] + " @" + inputName}`
295
295
  else
296
296
  consoleOutput = `#{cmd.join(" ")} 2>&1`
@@ -9,7 +9,6 @@ require 'cxxproject/ext/hash'
9
9
 
10
10
  require 'cxxproject/utils/optional'
11
11
  require 'cxxproject/utils/utils'
12
- require 'cxxproject/utils/stats'
13
12
 
14
13
  require 'cxxproject/toolchain/provider'
15
14
 
@@ -1,7 +1,7 @@
1
1
  module Cxxproject
2
2
  class Version
3
3
  def self.cxxproject
4
- '0.6.11'
4
+ '0.6.12'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: cxxproject
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.6.11
5
+ version: 0.6.12
6
6
  platform: ruby
7
7
  authors:
8
8
  - oliver mueller
@@ -10,10 +10,11 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-07-12 00:00:00 Z
13
+ date: 2012-07-14 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: colored
17
+ prerelease: false
17
18
  requirement: &id001 !ruby/object:Gem::Requirement
18
19
  none: false
19
20
  requirements:
@@ -21,10 +22,10 @@ dependencies:
21
22
  - !ruby/object:Gem::Version
22
23
  version: "0"
23
24
  type: :runtime
24
- prerelease: false
25
25
  version_requirements: *id001
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: frazzle
28
+ prerelease: false
28
29
  requirement: &id002 !ruby/object:Gem::Requirement
29
30
  none: false
30
31
  requirements:
@@ -32,7 +33,6 @@ dependencies:
32
33
  - !ruby/object:Gem::Version
33
34
  version: "0"
34
35
  type: :runtime
35
- prerelease: false
36
36
  version_requirements: *id002
37
37
  description: " Some more high level building blocks for cpp projects.\n"
38
38
  email: oliver.mueller@gmail.com
@@ -43,74 +43,73 @@ extensions: []
43
43
  extra_rdoc_files: []
44
44
 
45
45
  files:
46
- - lib/cxxproject/errorparser/error_parser.rb
47
- - lib/cxxproject/utils/optional.rb
48
- - lib/cxxproject/utils/cleanup.rb
49
- - lib/cxxproject/utils/exit_helper.rb
50
- - lib/cxxproject/utils/rbcurse_progress.rb
51
- - lib/cxxproject/utils/process.rb
52
- - lib/cxxproject/utils/ubigraph.rb
53
- - lib/cxxproject/utils/printer.rb
54
- - lib/cxxproject/utils/stats.rb
55
- - lib/cxxproject/utils/rbcurse.rb
56
- - lib/cxxproject/utils/progress_helper.rb
57
- - lib/cxxproject/utils/rbcurse_executable_ext.rb
58
- - lib/cxxproject/utils/utils.rb
59
- - lib/cxxproject/utils/rbcurse_tasktable.rb
60
- - lib/cxxproject/utils/progress.rb
61
- - lib/cxxproject/utils/graphstream.rb
62
- - lib/cxxproject/toolchain/provider.rb
63
- - lib/cxxproject/toolchain/colorizing_formatter.rb
64
- - lib/cxxproject/toolchain/toolchain.rb
65
- - lib/cxxproject/version.rb
66
- - lib/cxxproject/ide_interface.rb
67
- - lib/cxxproject/ext/rake_listener.rb
68
- - lib/cxxproject/ext/filelist.rb
69
- - lib/cxxproject/ext/string.rb
70
- - lib/cxxproject/ext/rake.rb
71
- - lib/cxxproject/ext/progressbar.rb
72
- - lib/cxxproject/ext/stdout.rb
73
- - lib/cxxproject/ext/hash.rb
74
- - lib/cxxproject/ext/rake_dirty.rb
75
- - lib/cxxproject/ext/file.rb
76
- - lib/cxxproject/context.rb
77
- - lib/cxxproject/plugin_context.rb
46
+ - lib/cxxproject/buildingblocks/binary_library.rb
78
47
  - lib/cxxproject/buildingblocks/building_block.rb
79
- - lib/cxxproject/buildingblocks/has_libraries_mixin.rb
48
+ - lib/cxxproject/buildingblocks/command_line.rb
80
49
  - lib/cxxproject/buildingblocks/custom_building_block.rb
81
- - lib/cxxproject/buildingblocks/makefile.rb
50
+ - lib/cxxproject/buildingblocks/executable.rb
51
+ - lib/cxxproject/buildingblocks/has_dependencies_mixin.rb
82
52
  - lib/cxxproject/buildingblocks/has_includes_mixin.rb
53
+ - lib/cxxproject/buildingblocks/has_libraries_mixin.rb
83
54
  - lib/cxxproject/buildingblocks/has_sources_mixin.rb
84
- - lib/cxxproject/buildingblocks/binary_library.rb
85
- - lib/cxxproject/buildingblocks/executable.rb
55
+ - lib/cxxproject/buildingblocks/makefile.rb
86
56
  - lib/cxxproject/buildingblocks/module.rb
87
57
  - lib/cxxproject/buildingblocks/single_source.rb
88
- - lib/cxxproject/buildingblocks/has_dependencies_mixin.rb
89
58
  - lib/cxxproject/buildingblocks/source_library.rb
90
- - lib/cxxproject/buildingblocks/command_line.rb
91
- - lib/cxxproject/eval_context.rb
59
+ - lib/cxxproject/context.rb
92
60
  - lib/cxxproject/cxxproject.rb
61
+ - lib/cxxproject/errorparser/error_parser.rb
62
+ - lib/cxxproject/eval_context.rb
63
+ - lib/cxxproject/ext/file.rb
64
+ - lib/cxxproject/ext/filelist.rb
65
+ - lib/cxxproject/ext/hash.rb
66
+ - lib/cxxproject/ext/progressbar.rb
67
+ - lib/cxxproject/ext/rake.rb
68
+ - lib/cxxproject/ext/rake_dirty.rb
69
+ - lib/cxxproject/ext/rake_listener.rb
70
+ - lib/cxxproject/ext/stdout.rb
71
+ - lib/cxxproject/ext/string.rb
72
+ - lib/cxxproject/ide_interface.rb
73
+ - lib/cxxproject/plugin_context.rb
74
+ - lib/cxxproject/toolchain/colorizing_formatter.rb
75
+ - lib/cxxproject/toolchain/provider.rb
76
+ - lib/cxxproject/toolchain/toolchain.rb
77
+ - lib/cxxproject/utils/cleanup.rb
78
+ - lib/cxxproject/utils/exit_helper.rb
79
+ - lib/cxxproject/utils/graphstream.rb
80
+ - lib/cxxproject/utils/optional.rb
81
+ - lib/cxxproject/utils/printer.rb
82
+ - lib/cxxproject/utils/process.rb
83
+ - lib/cxxproject/utils/progress.rb
84
+ - lib/cxxproject/utils/progress_helper.rb
85
+ - lib/cxxproject/utils/rbcurse.rb
86
+ - lib/cxxproject/utils/rbcurse_executable_ext.rb
87
+ - lib/cxxproject/utils/rbcurse_progress.rb
88
+ - lib/cxxproject/utils/rbcurse_tasktable.rb
89
+ - lib/cxxproject/utils/ubigraph.rb
90
+ - lib/cxxproject/utils/utils.rb
91
+ - lib/cxxproject/version.rb
93
92
  - Rakefile.rb
94
- - spec/string_spec.rb
95
- - spec/project_path_spec.rb
93
+ - spec/building_block_spec.rb
94
+ - spec/cxxproject_2_rake_spec.rb
95
+ - spec/file_ext_spec.rb
96
96
  - spec/ide_interface_spec.rb
97
- - spec/spec_helper.rb
98
97
  - spec/object_dependency_spec.rb
99
- - spec/building_block_spec.rb
100
- - spec/provider_spec.rb
101
98
  - spec/plugin_context_spec.rb
102
- - spec/file_ext_spec.rb
99
+ - spec/project_path_spec.rb
100
+ - spec/provider_spec.rb
101
+ - spec/rake_listener_ext_spec.rb
102
+ - spec/spec_helper.rb
103
+ - spec/string_spec.rb
103
104
  - spec/testdata/basic/exe12/project.rb
104
105
  - spec/testdata/basic/lib1/project.rb
105
106
  - spec/testdata/basic/lib2/project.rb
106
- - spec/testdata/onlyOneHeader/Rakefile.rb
107
- - spec/testdata/onlyOneHeader/project.rb
108
107
  - spec/testdata/multiple_levels/libs/lib1/project.rb
109
108
  - spec/testdata/multiple_levels/libs/lib2/project.rb
110
109
  - spec/testdata/multiple_levels/mainproject/basic/project.rb
111
- - spec/cxxproject_2_rake_spec.rb
110
+ - spec/testdata/onlyOneHeader/project.rb
111
+ - spec/testdata/onlyOneHeader/Rakefile.rb
112
112
  - spec/toolchain_spec.rb
113
- - spec/rake_listener_ext_spec.rb
114
113
  homepage: https://github.com/marcmo/cxxproject
115
114
  licenses: []
116
115
 
@@ -124,9 +123,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
124
123
  requirements:
125
124
  - - ">="
126
125
  - !ruby/object:Gem::Version
127
- hash: -2691399920648710728
128
- segments:
129
- - 0
130
126
  version: "0"
131
127
  required_rubygems_version: !ruby/object:Gem::Requirement
132
128
  none: false
@@ -137,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
133
  requirements: []
138
134
 
139
135
  rubyforge_project:
140
- rubygems_version: 1.8.24
136
+ rubygems_version: 1.8.16
141
137
  signing_key:
142
138
  specification_version: 3
143
139
  summary: Cpp Support for Rake.
@@ -1,60 +0,0 @@
1
- module Cxxproject
2
- module Utils
3
- define_stats = lambda do
4
- require 'haml'
5
-
6
- def count_sources(bbs)
7
- return bbs.inject(0) do |memo, bb|
8
- memo += bb.sources.size if bb.kind_of?(HasSources)
9
- memo
10
- end
11
- end
12
- def print_sources(io, bbs, indent)
13
- io.puts(indent + '%div.details')
14
- bbs.each do |bb|
15
- if bb.kind_of?(HasSources)
16
- io.puts(indent + " %p Sources of #{bb.name}: #{bb.sources.size}")
17
- io.puts(indent + ' %ul')
18
- bb.sources.each do |s|
19
- io.puts(indent + " %li #{s}")
20
- end
21
- end
22
- end
23
- end
24
-
25
- def handle_exe(io, bb, indent)
26
- if bb.kind_of?(Executable)
27
- io.puts(indent + "%h1")
28
- bbs = bb.all_dependencies.map{|name|ALL_BUILDING_BLOCKS[name]}
29
- io.puts(indent + " %p.details_toggle Executable '#{bb.name}' total sources: #{count_sources(bbs)}")
30
- print_sources(io, bbs, indent + ' '*2)
31
- end
32
- end
33
-
34
- directory 'build'
35
-
36
- desc 'print building block stats'
37
- task :stats => 'build' do
38
- io = StringIO.new
39
- io.puts('%html')
40
- io.puts(' %head')
41
- io.puts(' %title Some Stats')
42
- io.puts(' %script{ :type => "text/javascript", :src=>"http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"}')
43
- io.puts(' :javascript')
44
- io.puts(' $(document).ready(function() {$("div.details").hide();$("p.details_toggle").click(function() {$(this).siblings().last().toggle();});});')
45
- io.puts(' %body')
46
- res = ALL_BUILDING_BLOCKS.inject(io) do |memo, pair|
47
- key, bb = pair
48
- handle_exe(memo, bb, ' '*4)
49
- memo
50
- end
51
- engine = Haml::Engine.new(res.string)
52
- File.open(File.join('build','stats.out.html'), 'w') do |out|
53
- out.puts(engine.render)
54
- end
55
- end
56
- end
57
-
58
- optional_package(define_stats, nil)
59
- end
60
- end