build-tool 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitattributes ADDED
@@ -0,0 +1,3 @@
1
+ # Use the ruby diff command for ruby files
2
+ # > git config --global diff.ruby.funcname '^ *\(\(class\|module\|def\) .*\)'
3
+ *.rb diff=ruby
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ test.yaml
2
+ doc/*
3
+ tags
4
+ config/website.yml
5
+ pkg/*
6
+ *~
7
+ *.sw[p-z]
8
+ .yardoc
data/History.txt CHANGED
@@ -1,3 +1,14 @@
1
+ == 0.3.3
2
+ - Feature
3
+ - The history command now supports the -n --number [COUNT] option. Use it to specify how many
4
+ entries you want to see.
5
+ - Bugfixes
6
+ - Fix the gc command. Sqlite really starts to enforce foreign key constraints.
7
+ - Support arbitrary build options for autoconf
8
+ - Do not reassociate a module / environment with a different feature when just changing it. The
9
+ initial associtation is correct.
10
+
11
+
1
12
  == 0.3.2
2
13
  - Main Features
3
14
  - none
data/Manifest.txt CHANGED
@@ -1,3 +1,5 @@
1
+ .gitattributes
2
+ .gitignore
1
3
  History.txt
2
4
  Manifest.txt
3
5
  README.txt
data/lib/build-tool.rb CHANGED
@@ -2,6 +2,6 @@
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module BuildTool
5
- VERSION = '0.3.2'
5
+ VERSION = '0.3.3'
6
6
  end
7
7
 
@@ -31,10 +31,14 @@ def configured?
31
31
  #
32
32
 
33
33
  def[]( var )
34
+ if @options.has_key? var
35
+ return @options[var]
36
+ end
37
+
34
38
  case var
35
39
 
36
- when 'CXXFLAGS'
37
- return @options[var]
40
+ when 'libdir'
41
+ return ""
38
42
 
39
43
  else
40
44
  # *TODO* raise correct exception
@@ -197,11 +197,14 @@ class EnvironmentDeclarationNodeVisitor < ListVisitor
197
197
  def visit_EnvironmentDeclarationNode( node )
198
198
  name = node.values[0]
199
199
  @environment = configuration.environment( name )
200
- @environment = BuildTool::Environment.new( name ) if @environment.nil?
201
- configuration.add_environment( @environment )
202
- if !configuration.active_feature.nil?
203
- @environment.feature = configuration.active_feature
204
- configuration.active_feature.environments << @environment
200
+ if @environment.nil?
201
+ @environment = BuildTool::Environment.new( name )
202
+ # Only add a environment to a feature if this is the first time it is declared.
203
+ configuration.add_environment( @environment )
204
+ if !configuration.active_feature.nil?
205
+ @environment.feature = configuration.active_feature
206
+ configuration.active_feature.environments << @environment
207
+ end
205
208
  end
206
209
  if node.values[1] == :INHERITANCE
207
210
  parentName = node.values[2]
@@ -362,7 +365,7 @@ def visit_BuildSystemDeclarationNode( node )
362
365
 
363
366
  def visit_LongDescriptionNode( node )
364
367
  if @module.long_description
365
- logger.warn "Overwriting long description for feature #{@module.name}"
368
+ logger.warn "Overwriting long description for module #{@module.name}"
366
369
  end
367
370
  @module.long_description = node.values
368
371
  end
@@ -416,23 +419,24 @@ def visit_ModuleDeclarationNode( node )
416
419
  if inheritance
417
420
  raise ConfigurationError, "Attempt change existing module #{name} with inheritance!"
418
421
  end
419
- elsif inheritance
420
- parentName = node.values[2]
421
- parent = configuration.module( parentName )
422
- if parent.nil?
423
- raise ConfigurationError,
424
- "Module %s attempts to inherit from not existant module %s" %
425
- [ name, parentName ]
422
+ else
423
+ parent = nil
424
+ if inheritance
425
+ parentName = node.values[2]
426
+ parent = configuration.module( parentName )
427
+ if parent.nil?
428
+ raise ConfigurationError,
429
+ "Module %s attempts to inherit from not existant module %s" %
430
+ [ name, parentName ]
431
+ end
426
432
  end
427
433
  @module = BuildTool::Module.new( name, parent )
428
434
  configuration.add_module( @module )
429
- else
430
- @module = BuildTool::Module.new( name )
431
- configuration.add_module( @module )
432
- end
433
- if !configuration.active_feature.nil?
434
- @module.feature = configuration.active_feature
435
- configuration.active_feature.modules << @module
435
+ # Only add a module to a feature if it is the first time declared.
436
+ if !configuration.active_feature.nil?
437
+ @module.feature = configuration.active_feature
438
+ configuration.active_feature.modules << @module
439
+ end
436
440
  end
437
441
  self.visit_nodes( stmts )
438
442
  end
@@ -41,7 +41,7 @@ def do_execute( args )
41
41
  FileUtils.rm_rf( cmd.logdir ) if File.exist?( cmd.logdir )
42
42
  end
43
43
  end
44
- cmd.delete
44
+ cmd.destroy
45
45
  end
46
46
  return 0
47
47
  end
@@ -25,6 +25,12 @@ def initialize_options
25
25
  @long = true
26
26
  }
27
27
  super
28
+
29
+ @lines = nil
30
+ options.on( "-n", "--number [COUNT]", "Number of lines to show." ) { |t|
31
+ @lines = t.to_i
32
+ }
33
+ super
28
34
  end
29
35
 
30
36
  def applicable?
@@ -59,7 +65,7 @@ def show_command( cmd )
59
65
 
60
66
  def show_command_history
61
67
  # *TODO* Make the number of printed command configurable
62
- BuildTool::History::CommandLog.last(50).reverse().each do |cmd|
68
+ BuildTool::History::CommandLog.last(@lines || 50 ).reverse().each do |cmd|
63
69
  show_command cmd
64
70
  end
65
71
 
@@ -72,7 +78,7 @@ def show_module_history( modname )
72
78
  return usage( "Unknown module #{modname}" )
73
79
  end
74
80
 
75
- BuildTool::History::CommandLog.last_by_module( modname ).reverse.each do |cmd|
81
+ BuildTool::History::CommandLog.last_by_module( modname, @lines || 3 ).reverse.each do |cmd|
76
82
  show_command( cmd )
77
83
 
78
84
  last_module=""
@@ -81,6 +81,11 @@ def before_update
81
81
  end
82
82
  end
83
83
 
84
+ def before_destroy
85
+ self.module_logs_dataset.delete
86
+ super
87
+ end
88
+
84
89
  # Class Methods
85
90
  class << self
86
91
 
metadata CHANGED
@@ -1,42 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build-tool
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 2
10
- version: 0.3.2
9
+ - 3
10
+ version: 0.3.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Jansen
14
14
  autorequire:
15
15
  bindir: bin
16
- cert_chain:
17
- - |
18
- -----BEGIN CERTIFICATE-----
19
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ocRvIL0YrHUPa3
35
- bdM0RIoUSO1SXrHpXDdvfp9w4BsMZiAf87eeq974P8VuyKbHgxN9El1nwtFGEfwm
36
- M3zOaQdtTmiQPBqNIsE=
37
- -----END CERTIFICATE-----
16
+ cert_chain: []
38
17
 
39
- date: 2010-07-19 00:00:00 +02:00
18
+ date: 2010-08-08 00:00:00 +02:00
40
19
  default_executable:
41
20
  dependencies:
42
21
  - !ruby/object:Gem::Dependency
@@ -198,6 +177,8 @@ extra_rdoc_files:
198
177
  - Manifest.txt
199
178
  - README.txt
200
179
  files:
180
+ - .gitattributes
181
+ - .gitignore
201
182
  - History.txt
202
183
  - Manifest.txt
203
184
  - README.txt
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
@@ -1 +0,0 @@
1
- %z��0�B*K����3������� /�6Zo�������li��X��3�'�TW�F�u_v'hp���!�#���Wd����S��Y3 �U�a��%�q7�� ��@$2��7 g�1�_�