build-tool 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- ���{t6�q�g�]O06�Z؞c�z�x ?�X �"S _0&6�����i��L�����s�g!�(r~�u-1��_��8I%��E?R m�l��-�U���zg)���K��_G���]���J�?�5~!57�k���eN��`�h�.�npm���d�-(zx��V����}��ܕ�����v�3o>)e? $��x�2clsw����eQ�� B&�/�,������K��/�$�{&��8�ɓw
1
+ Q#^F��Ox�����C<�7���j�1|(%r��fRe#���7�����"��eQ]��m)G�߼9��� /$�rEl<|�|j�����ǯ�t��^߀���A!>�4N>ss���?�^�h��+��x�+M/Xv���
2
+ ���g � �A���t����d;���\�?�d�,�Q�V����=�|֟T��p��MA���i��h�+�F��$H;��N)� �5%�D��Hr?���������YMd�� ׄnDt�
data/History.txt CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.4.3
2
+ - Ruby 1.9 Compatibility.
3
+
1
4
  == 0.4.2
2
5
  - Enhancements
3
6
  - Usability: When working on many modules show (current number/total number) of modules for information.
data/Manifest.txt CHANGED
@@ -5,7 +5,6 @@ Manifest.txt
5
5
  README.txt
6
6
  Rakefile
7
7
  bin/build-tool
8
- bin/build-tool-1.9
9
8
  db/migrations/001_command_histories.rb
10
9
  db/migrations/002_module_events.rb
11
10
  db/migrations/003_command_histories_add_logfile.rb
data/Rakefile CHANGED
@@ -10,9 +10,13 @@ Hoe.plugin :debugging
10
10
 
11
11
  # Generate all the Rake tasks
12
12
  # Run 'rake -T' to see list of generated tasks (from gem root directory)
13
- Hoe.spec( 'build-tool' ) do |build_tool|
14
- build_tool.developer 'Michael Jansen', 'info@michael-jansen.biz'
15
- build_tool.post_install_message = <<-EOS
13
+ Hoe.spec( 'build-tool' ) do
14
+
15
+ self.developer 'Michael Jansen', 'info@michael-jansen.biz'
16
+
17
+ self.version = BuildTool::VERSION
18
+
19
+ self.post_install_message = <<-EOS
16
20
  To start with build-tool try the following commands:
17
21
  > build-tool recipe add git://gitorious.org/build-tool/kde-trunk-recipe.git kde
18
22
  > build-tool recipe list
@@ -21,22 +25,20 @@ Hoe.spec( 'build-tool' ) do |build_tool|
21
25
  For documentation see http://michael-jansen.biz/build-tool
22
26
 
23
27
  EOS
24
- build_tool.rubyforge_name = build_tool.name
28
+ self.rubyforge_name = self.name
25
29
 
26
- build_tool.extra_deps = [
27
- ['logging', ">= 1.4.3"],
28
- ['sequel', ">= 3.18.0"],
29
- ['sqlite3-ruby', ">= 1.3.1" ],
30
+ self.extra_deps <<
31
+ ['logging', ">= 1.4.3"] <<
32
+ ['sequel', ">= 3.18.0"] <<
33
+ ['sqlite3-ruby', ">= 1.3.1" ] <<
30
34
  ['ansi', '>= 1.2.2' ]
31
- ]
32
35
 
33
- build_tool.extra_dev_deps = [
34
- ['hoe-debugging', ">= 1.0.1"],
35
- ['hoe-doofus', ">= 1.0.0"],
36
- ['hoe-git', ">= 1.3.0"],
37
- ['racc', ">= 1.4.6"],
36
+ self.extra_dev_deps <<
37
+ ['hoe-debugging', ">= 1.0.1"] <<
38
+ ['hoe-doofus', ">= 1.0.0"] <<
39
+ ['hoe-git', ">= 1.3.0"] <<
40
+ ['racc', ">= 1.4.6"] <<
38
41
  ['rexical', ">= 1.0.5"]
39
- ]
40
42
 
41
43
  end
42
44
 
data/bin/build-tool CHANGED
@@ -7,15 +7,9 @@ require 'pathname'
7
7
  require 'rubygems'
8
8
 
9
9
  # libs relative to the link target
10
- if File.symlink?(__FILE__)
11
- root_directory = File.dirname(File.readlink(__FILE__))
12
- else
13
- root_directory = File.dirname(__FILE__)
14
- end
15
-
16
- root_directory = Pathname.new( root_directory ).join( '..' )
17
- require File.expand_path( root_directory + "lib/build-tool")
10
+ root_directory = Pathname.new(__FILE__).realpath.dirname.dirname
18
11
 
12
+ require root_directory.join( 'lib/build-tool')
19
13
  require 'build-tool/application'
20
14
 
21
15
  exit BuildTool.main( $0, ARGV, root_directory );
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.4.2'
5
+ VERSION = '0.4.3'
6
6
  end
7
7
 
@@ -122,6 +122,10 @@ def main( args )
122
122
  end
123
123
  end
124
124
 
125
+ def has_recipe?
126
+ not BuildTool::Application.instance.name.start_with? "build-tool"
127
+ end
128
+
125
129
  end # class Application
126
130
 
127
131
  end # module BuildTool
@@ -1,6 +1,6 @@
1
1
  require 'ansi'
2
2
  require 'logging'
3
- require 'ftools'
3
+ require 'fileutils'
4
4
 
5
5
  module BuildTool
6
6
 
@@ -767,7 +767,7 @@ def load_commands( path, parentmod, submod = nil )
767
767
  # Get the obj
768
768
  obj = parentmod.const_get( objname )
769
769
  # :TODO: Better solution
770
- next if [ "Standard", "ModuleBasedCommand", "Base", "SubCommands", "Shell" ].include? objname
770
+ next if [ "Standard", "ModuleBasedCommand", "Base", "SubCommands", "Shell" ].include? objname.to_s
771
771
  next if ! obj.kind_of? Class
772
772
 
773
773
  tmp = obj
@@ -58,7 +58,7 @@ def initialize_options
58
58
  end
59
59
 
60
60
  def applicable?
61
- BuildTool::Application.instance.name != "build-tool"
61
+ BuildTool::Application.instance.has_recipe?
62
62
  end
63
63
 
64
64
  def is_module_ready?( mod )
@@ -46,7 +46,7 @@ def initialize_options
46
46
  end
47
47
 
48
48
  def applicable?
49
- BuildTool::Application.instance.name != "build-tool"
49
+ BuildTool::Application.instance.has_recipe?
50
50
  end
51
51
 
52
52
  def is_module_ready?( mod )
@@ -21,7 +21,7 @@ def initialize_options
21
21
  end
22
22
 
23
23
  def applicable?
24
- BuildTool::Application.instance.name != "build-tool"
24
+ BuildTool::Application.instance.has_recipe?
25
25
  end
26
26
 
27
27
  def do_execute_module( mod )
@@ -12,7 +12,7 @@ def initialize_options
12
12
  end
13
13
 
14
14
  def applicable?
15
- BuildTool::Application.instance.name != "build-tool"
15
+ BuildTool::Application.instance.has_recipe?
16
16
  end
17
17
 
18
18
  def do_execute
@@ -23,7 +23,7 @@ def log?
23
23
  end
24
24
 
25
25
  def applicable?
26
- BuildTool::Application.instance.name != "build-tool"
26
+ BuildTool::Application.instance.has_recipe?
27
27
  end
28
28
 
29
29
  def initialize_options
@@ -14,7 +14,7 @@ class Files < Standard
14
14
  "or the content of the given file if one is specified." ]
15
15
 
16
16
  def applicable?
17
- BuildTool::Application.instance.name != "build-tool"
17
+ BuildTool::Application.instance.has_recipe?
18
18
  end
19
19
 
20
20
  def do_execute( args )
@@ -19,13 +19,13 @@ def initialize_options
19
19
  end
20
20
 
21
21
  def applicable?
22
- BuildTool::Application.instance.name != "build-tool"
22
+ BuildTool::Application.instance.has_recipe?
23
23
  end
24
24
 
25
25
  def do_execute( args )
26
26
  case args.length
27
27
 
28
- when 0:
28
+ when 0
29
29
  # Nothing
30
30
  #
31
31
  else
@@ -39,18 +39,18 @@ def initialize_options
39
39
  end
40
40
 
41
41
  def applicable?
42
- BuildTool::Application.instance.name != "build-tool"
42
+ BuildTool::Application.instance.has_recipe?
43
43
  end
44
44
 
45
45
  def do_execute( args )
46
46
  case args.length
47
47
 
48
- when 0:
48
+ when 0
49
49
  return show_command_history
50
- when 1:
50
+ when 1
51
51
  return show_detailed_command_history( args[0] ) if args[0] =~ /^[0-9]+/
52
52
  case args[0][0,1]
53
- when '+':
53
+ when '+'
54
54
  return show_detailed_command_history( args[0] )
55
55
  else
56
56
  return show_module_history( args[0] )
@@ -17,7 +17,7 @@ def initialize_options
17
17
  end
18
18
 
19
19
  def applicable?
20
- BuildTool::Application.instance.name != "build-tool"
20
+ BuildTool::Application.instance.has_recipe?
21
21
  end
22
22
 
23
23
  def do_execute( args )
@@ -33,7 +33,7 @@ def initialize_options
33
33
  end
34
34
 
35
35
  def applicable?
36
- BuildTool::Application.instance.name != "build-tool"
36
+ BuildTool::Application.instance.has_recipe?
37
37
  end
38
38
 
39
39
  def is_module_ready?( mod )
@@ -18,7 +18,7 @@ def initialize_options
18
18
  end
19
19
 
20
20
  def applicable?
21
- BuildTool::Application.instance.name != "build-tool"
21
+ BuildTool::Application.instance.has_recipe?
22
22
  end
23
23
 
24
24
  def do_execute( args )
@@ -12,7 +12,7 @@ def initialize_options
12
12
  end
13
13
 
14
14
  def applicable?
15
- BuildTool::Application.instance.name != "build-tool"
15
+ BuildTool::Application.instance.has_recipe?
16
16
  end
17
17
 
18
18
  def do_execute
@@ -21,7 +21,7 @@ def log?
21
21
  end
22
22
 
23
23
  def applicable?
24
- BuildTool::Application.instance.name != "build-tool"
24
+ BuildTool::Application.instance.has_recipe?
25
25
  end
26
26
 
27
27
  def initialize_options
@@ -13,7 +13,7 @@ class Incoming < Standard
13
13
  description "Show the incoming changes to the recipe from the repository."
14
14
 
15
15
  def applicable?
16
- BuildTool::Application.instance.name != "build-tool"
16
+ BuildTool::Application.instance.has_recipe?
17
17
  end
18
18
 
19
19
  def initialize_options
@@ -1,7 +1,7 @@
1
1
  require 'build-tool/commands'
2
2
  require 'build-tool/recipe'
3
3
 
4
- require 'ftools'
4
+ require 'fileutils'
5
5
 
6
6
  module BuildTool; module Commands; module Recipes
7
7
 
@@ -1,6 +1,6 @@
1
1
  require 'build-tool/application'
2
2
  require 'build-tool/commands'
3
- require 'ftools'
3
+ require 'fileutils'
4
4
 
5
5
  module BuildTool; module Commands; module Recipes
6
6
 
@@ -40,7 +40,7 @@ def do_execute(args)
40
40
  conffile = Application::instance.local_configuration_dir.join("#{commandname}.yaml")
41
41
 
42
42
  # Our executable
43
- buildtool = Application::instance.application_root.join( 'bin', 'build-tool' ).to_s
43
+ buildtool = Application::instance.application_root.join( 'bin', $0 ).to_s
44
44
 
45
45
  # Load the recipe
46
46
  recipe = Recipe.find_recipe(recipename)
@@ -138,7 +138,7 @@ def do_execute(args)
138
138
  logger.error( "Local configuration for #{commandname} already exists." )
139
139
  else
140
140
  FileUtils.mkdir_p( Application::instance.local_configuration_dir.join( commandname ) )
141
- File.copy(recipe.join("recipe-local"),
141
+ FileUtils.cp(recipe.join("recipe-local"),
142
142
  Application::instance.local_configuration_dir.join( commandname, 'recipe' ))
143
143
  end
144
144
 
data/tasks/rspec.rake CHANGED
@@ -1,11 +1,11 @@
1
1
  begin
2
- require 'spec'
2
+ require 'rspec'
3
3
  rescue LoadError
4
4
  require 'rubygems' unless ENV['NO_RUBYGEMS']
5
- require 'spec'
5
+ require 'rspec'
6
6
  end
7
7
  begin
8
- require 'spec/rake/spectask'
8
+ require 'rspec/core/rake_task'
9
9
  rescue LoadError
10
10
  puts <<-EOS
11
11
  To use rspec for testing you must install rspec gem:
@@ -15,7 +15,8 @@ EOS
15
15
  end
16
16
 
17
17
  desc "Run the specs under spec/models"
18
- Spec::Rake::SpecTask.new do |t|
19
- t.spec_opts = ['--options', "spec/spec.opts"]
20
- t.spec_files = FileList['spec/**/*_spec.rb']
18
+ RSpec::Core::RakeTask.new do |t|
19
+ t.rspec_opts = ['--options', "spec/spec.opts"]
20
+ # :TODO: Port me
21
+ # t.spec_files = FileList['spec/**/*_spec.rb']
21
22
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build-tool
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
5
- prerelease: false
4
+ hash: 9
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 2
10
- version: 0.4.2
9
+ - 3
10
+ version: 0.4.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Jansen
@@ -36,7 +36,7 @@ cert_chain:
36
36
  M3zOaQdtTmiQPBqNIsE=
37
37
  -----END CERTIFICATE-----
38
38
 
39
- date: 2011-01-02 00:00:00 +01:00
39
+ date: 2011-01-04 00:00:00 +01:00
40
40
  default_executable:
41
41
  dependencies:
42
42
  - !ruby/object:Gem::Dependency
@@ -208,7 +208,6 @@ email:
208
208
  - info@michael-jansen.biz
209
209
  executables:
210
210
  - build-tool
211
- - build-tool-1.9
212
211
  extensions: []
213
212
 
214
213
  extra_rdoc_files:
@@ -223,7 +222,6 @@ files:
223
222
  - README.txt
224
223
  - Rakefile
225
224
  - bin/build-tool
226
- - bin/build-tool-1.9
227
225
  - db/migrations/001_command_histories.rb
228
226
  - db/migrations/002_module_events.rb
229
227
  - db/migrations/003_command_histories_add_logfile.rb
@@ -343,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
343
341
  requirements: []
344
342
 
345
343
  rubyforge_project: build-tool
346
- rubygems_version: 1.3.7
344
+ rubygems_version: 1.4.1
347
345
  signing_key:
348
346
  specification_version: 3
349
347
  summary: This project is inspired by kdesrc-build[http://kdesrc-build.kde.org/]
metadata.gz.sig CHANGED
Binary file
data/bin/build-tool-1.9 DELETED
@@ -1,21 +0,0 @@
1
- #!/usr/bin/env ruby1.9
2
- #
3
- # Created by Michael Jansen on 2009-8-31.
4
- # Copyright (c) 2009. All rights reserved.
5
-
6
- require 'pathname'
7
- require 'rubygems'
8
-
9
- # libs relative to the link target
10
- if File.symlink?(__FILE__)
11
- root_directory = File.dirname(File.readlink(__FILE__))
12
- else
13
- root_directory = File.dirname(__FILE__)
14
- end
15
-
16
- root_directory = Pathname.new( root_directory ).join( '..' )
17
- require File.expand_path( root_directory + "lib/build-tool")
18
-
19
- require 'build-tool/application'
20
-
21
- exit BuildTool.main( $0, ARGV, root_directory );