build-tool 0.5.7 → 0.6.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.rvmrc +1 -0
- data/.yardopts +1 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +56 -0
- data/History.txt +64 -0
- data/README.txt +0 -7
- data/Rakefile +8 -56
- data/bin/build-tool +4 -1
- data/build-tool.gemspec +62 -0
- data/db/migrations/20110703074000_add_command_logs.rb +17 -0
- data/db/migrations/20110703075000_add_module_logs.rb +20 -0
- data/db/migrations/20110815170000_add_features.rb +17 -0
- data/db/migrations/20120103204700_add_modules.rb +17 -0
- data/db/migrations/20120106181200_add_settings.rb +18 -0
- data/lib/build-tool.rb +3 -4
- data/lib/build-tool/application.rb +127 -37
- data/lib/build-tool/build-system/autoconf.rb +2 -8
- data/lib/build-tool/build-system/base.rb +12 -4
- data/lib/build-tool/build-system/cmake.rb +2 -0
- data/lib/build-tool/build-system/custom.rb +2 -0
- data/lib/build-tool/build-system/kdel10n.rb +2 -0
- data/lib/build-tool/build-system/make.rb +2 -0
- data/lib/build-tool/build-system/none.rb +2 -0
- data/lib/build-tool/build-system/qmake.rb +2 -0
- data/lib/build-tool/build-system/qt.rb +4 -0
- data/lib/build-tool/cfg/lexer.rex +40 -8
- data/lib/build-tool/cfg/lexer_base.rb +3 -1
- data/lib/build-tool/cfg/node.rb +17 -1
- data/lib/build-tool/cfg/parser.y +92 -10
- data/lib/build-tool/cfg/visitor.rb +202 -78
- data/lib/build-tool/command_actions.rb +26 -10
- data/lib/build-tool/commands.rb +289 -197
- data/lib/build-tool/commands/build.rb +13 -9
- data/lib/build-tool/commands/configuration.rb +25 -0
- data/lib/build-tool/commands/configuration/edit.rb +42 -0
- data/lib/build-tool/commands/configuration/list.rb +48 -0
- data/lib/build-tool/commands/configure.rb +9 -5
- data/lib/build-tool/commands/ctags.rb +8 -3
- data/lib/build-tool/commands/environments.rb +2 -4
- data/lib/build-tool/commands/environments/list.rb +13 -10
- data/lib/build-tool/commands/environments/set.rb +5 -1
- data/lib/build-tool/commands/features.rb +24 -0
- data/lib/build-tool/commands/features/disable.rb +70 -0
- data/lib/build-tool/commands/features/enable.rb +66 -0
- data/lib/build-tool/commands/features/list.rb +92 -0
- data/lib/build-tool/commands/fetch.rb +9 -3
- data/lib/build-tool/commands/files.rb +9 -5
- data/lib/build-tool/commands/gc.rb +48 -15
- data/lib/build-tool/commands/history.rb +21 -16
- data/lib/build-tool/commands/info.rb +16 -13
- data/lib/build-tool/commands/install.rb +8 -4
- data/lib/build-tool/commands/modules.rb +2 -4
- data/lib/build-tool/commands/modules/cleanup.rb +52 -0
- data/lib/build-tool/commands/modules/disable.rb +95 -0
- data/lib/build-tool/commands/modules/enable.rb +52 -0
- data/lib/build-tool/commands/modules/info.rb +44 -35
- data/lib/build-tool/commands/modules/list.rb +67 -15
- data/lib/build-tool/commands/modules/shell.rb +8 -2
- data/lib/build-tool/commands/rebase.rb +15 -7
- data/lib/build-tool/commands/recipes.rb +2 -4
- data/lib/build-tool/commands/recipes/add.rb +16 -2
- data/lib/build-tool/commands/recipes/edit.rb +72 -0
- data/lib/build-tool/commands/recipes/incoming.rb +11 -7
- data/lib/build-tool/commands/recipes/info.rb +12 -8
- data/lib/build-tool/commands/recipes/install.rb +37 -42
- data/lib/build-tool/commands/recipes/list.rb +6 -2
- data/lib/build-tool/configuration.rb +88 -3
- data/lib/build-tool/environment.rb +2 -0
- data/lib/build-tool/errors.rb +5 -0
- data/lib/build-tool/history.rb +3 -181
- data/lib/build-tool/model/command_log.rb +93 -0
- data/lib/build-tool/model/feature.rb +80 -0
- data/lib/build-tool/{module.rb → model/module.rb} +110 -29
- data/lib/build-tool/model/module_log.rb +64 -0
- data/lib/build-tool/model/setting.rb +84 -0
- data/lib/build-tool/recipe.rb +40 -18
- data/lib/build-tool/repository.rb +39 -33
- data/lib/build-tool/server.rb +27 -3
- data/lib/build-tool/singleton.rb +2 -0
- data/lib/build-tool/sshkey.rb +2 -0
- data/lib/build-tool/state_helper.rb +64 -0
- data/lib/build-tool/vcs/archive.rb +3 -1
- data/lib/build-tool/vcs/base.rb +13 -0
- data/lib/build-tool/vcs/git-svn.rb +36 -14
- data/lib/build-tool/vcs/git.rb +180 -44
- data/lib/build-tool/vcs/mercurial.rb +25 -13
- data/lib/build-tool/vcs/svn.rb +20 -15
- data/lib/build-tool/version.rb +30 -0
- data/lib/mj/error.rb +2 -0
- data/lib/mj/logging.rb +2 -0
- data/lib/mj/mixins/inherited_attributes.rb +73 -0
- data/lib/mj/tools/editor.rb +34 -0
- data/lib/mj/tools/ssh.rb +2 -0
- data/lib/mj/tools/subprocess.rb +2 -1
- data/lib/mj/vcs/git.rb +14 -2
- data/lib/mj/visitor.rb +22 -0
- data/tasks/db.rake +36 -0
- data/tasks/racc.rake +14 -0
- data/tasks/rdoc.rake +8 -0
- data/tasks/rexical.rake +14 -0
- data/tasks/test.rake +21 -0
- data/test/integration/history_test.rb +88 -0
- data/test/integration/parser_configuration.rb +36 -0
- data/test/integration/parser_environment_parser.rb +156 -0
- data/test/integration/parser_feature_test.rb +75 -0
- data/test/integration/parser_git-svn_test.rb +92 -0
- data/test/integration/parser_git_test.rb +97 -0
- data/test/integration/parser_mercurial_test.rb +77 -0
- data/test/integration/parser_module_test.rb +103 -0
- data/test/integration/parser_svn_test.rb +92 -0
- data/test/integration/parser_test.rb +73 -0
- data/test/test_helper.rb +61 -0
- data/test/unit/configuration_test.rb +36 -0
- data/test/unit/git_configuration_test.rb +163 -0
- data/test/unit/git_svn_configuration_test.rb +240 -0
- data/test/unit/mercurial_configuration_test.rb +64 -0
- data/test/unit/model/command_log_test.rb +103 -0
- data/test/unit/model/feature_test.rb +29 -0
- data/test/unit/model/module_log_test.rb +70 -0
- data/test/unit/model/module_test.rb +32 -0
- data/test/unit/repository_test.rb +110 -0
- data/test/unit/server_test.rb +66 -0
- data/test/unit/svn_configuration_test.rb +90 -0
- metadata +134 -93
- data/Manifest.txt +0 -80
- data/db/migrations/001_command_histories.rb +0 -20
- data/db/migrations/002_module_events.rb +0 -24
- data/db/migrations/003_command_histories_add_logfile.rb +0 -19
- data/lib/build-tool/GUI.rb +0 -360
- data/lib/build-tool/commands/help.rb +0 -22
- data/lib/build-tool/commands/lsfeatures.rb +0 -76
- data/lib/build-tool/feature.rb +0 -47
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'build-tool/application'
|
2
|
-
require 'build-tool/commands'
|
3
|
-
|
4
|
-
module BuildTool; module Commands;
|
5
|
-
|
6
|
-
#
|
7
|
-
# Help command
|
8
|
-
#
|
9
|
-
class Help < Standard
|
10
|
-
|
11
|
-
name "help"
|
12
|
-
description "print this help text"
|
13
|
-
|
14
|
-
def do_execute( args )
|
15
|
-
return Application::instance.cli.show_help( args )
|
16
|
-
end
|
17
|
-
|
18
|
-
end # class Help
|
19
|
-
|
20
|
-
end; # module Help
|
21
|
-
|
22
|
-
end; # module BuildTool
|
@@ -1,76 +0,0 @@
|
|
1
|
-
require 'build-tool/commands'
|
2
|
-
|
3
|
-
module BuildTool; module Commands;
|
4
|
-
|
5
|
-
#
|
6
|
-
# BuildCommand
|
7
|
-
#
|
8
|
-
class Lsfeatures < Standard
|
9
|
-
|
10
|
-
name "lsfeatures"
|
11
|
-
description "List all available features."
|
12
|
-
long_description [ "Shows the list of all features available with the current recipe or",
|
13
|
-
"detailed info about one or more features given as arguments." ]
|
14
|
-
|
15
|
-
def initialize_options
|
16
|
-
@options.banner = "Usage: #{Pathname.new($0).basename} #{self.fullname} [FEATURES]..."
|
17
|
-
super
|
18
|
-
end
|
19
|
-
|
20
|
-
def applicable?
|
21
|
-
BuildTool::Application.instance.has_recipe?
|
22
|
-
end
|
23
|
-
|
24
|
-
def do_execute( args )
|
25
|
-
if args.length > 1
|
26
|
-
# *TODO* print better message
|
27
|
-
return usage "To many arguments."
|
28
|
-
end
|
29
|
-
|
30
|
-
if args.length == 1
|
31
|
-
return show_feature( args[0] )
|
32
|
-
else
|
33
|
-
return list_features
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
def list_features
|
38
|
-
say "%-30s| %s | %s" % [ "Feature", "A", "Description" ]
|
39
|
-
say "==========================================================="
|
40
|
-
features = configuration.features
|
41
|
-
features.keys.sort.each do |name|
|
42
|
-
feature = features[name]
|
43
|
-
# Skip feature without modules
|
44
|
-
next if feature.modules.empty?
|
45
|
-
active = "N"
|
46
|
-
active = "Y" if feature.active?
|
47
|
-
say "%-30s| %s | %s" % [ name, active, feature.description ]
|
48
|
-
end
|
49
|
-
|
50
|
-
return 0
|
51
|
-
end
|
52
|
-
|
53
|
-
def show_feature( name )
|
54
|
-
feature = configuration.features[name]
|
55
|
-
|
56
|
-
if feature.nil?
|
57
|
-
logger.error( "Unknown feature '%s'" % name )
|
58
|
-
return -1
|
59
|
-
end
|
60
|
-
|
61
|
-
say "Name : %s" % feature.path
|
62
|
-
say "Modules"
|
63
|
-
say "===================================================="
|
64
|
-
feature.modules.each do |mod|
|
65
|
-
next if mod.is_template?
|
66
|
-
say " %-20s: %s" % [ mod.name, mod.description ]
|
67
|
-
end
|
68
|
-
return 0
|
69
|
-
end
|
70
|
-
|
71
|
-
end # class Info
|
72
|
-
|
73
|
-
end; end # module BuildTool::Commands
|
74
|
-
|
75
|
-
|
76
|
-
|
data/lib/build-tool/feature.rb
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
module BuildTool
|
2
|
-
|
3
|
-
class Feature
|
4
|
-
|
5
|
-
attr_writer :active
|
6
|
-
attr_accessor :description
|
7
|
-
attr_accessor :long_description
|
8
|
-
attr_reader :modules
|
9
|
-
attr_reader :environments
|
10
|
-
|
11
|
-
def initialize( name = nil, parent = nil, active = true )
|
12
|
-
@name = name
|
13
|
-
@active = active
|
14
|
-
@parent = parent
|
15
|
-
@description = nil
|
16
|
-
@long_description = nil
|
17
|
-
@modules = []
|
18
|
-
@environments = []
|
19
|
-
end
|
20
|
-
|
21
|
-
def active?
|
22
|
-
if @parent.nil?
|
23
|
-
@active
|
24
|
-
else
|
25
|
-
@parent.active? && @active
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def name
|
30
|
-
@name
|
31
|
-
end
|
32
|
-
|
33
|
-
def path
|
34
|
-
if @parent.nil?
|
35
|
-
@name
|
36
|
-
else
|
37
|
-
"%s/%s" % [ @parent.name, @name ]
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
def parent
|
42
|
-
@parent
|
43
|
-
end
|
44
|
-
|
45
|
-
end # class Feature
|
46
|
-
|
47
|
-
end # module BuildTool
|