vic-buildr 1.3.3 → 1.3.4

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.
Files changed (98) hide show
  1. data/CHANGELOG +42 -11
  2. data/Rakefile +5 -3
  3. data/_buildr +9 -31
  4. data/addon/buildr/cobertura.rb +5 -218
  5. data/addon/buildr/drb.rb +281 -0
  6. data/addon/buildr/emma.rb +5 -220
  7. data/addon/buildr/nailgun.rb +94 -686
  8. data/bin/buildr +0 -9
  9. data/buildr.gemspec +6 -6
  10. data/doc/images/favicon.png +0 -0
  11. data/doc/pages/contributing.textile +6 -4
  12. data/doc/pages/download.textile +11 -0
  13. data/doc/pages/extending.textile +2 -2
  14. data/doc/pages/getting_started.textile +4 -4
  15. data/doc/pages/index.textile +8 -11
  16. data/doc/pages/more_stuff.textile +50 -22
  17. data/doc/pages/packaging.textile +1 -1
  18. data/doc/pages/projects.textile +2 -2
  19. data/doc/pages/settings_profiles.textile +2 -2
  20. data/doc/pages/testing.textile +1 -1
  21. data/doc/pages/whats_new.textile +12 -0
  22. data/doc/site.haml +1 -0
  23. data/lib/buildr.rb +2 -4
  24. data/lib/buildr/core.rb +2 -0
  25. data/lib/buildr/core/application.rb +304 -149
  26. data/lib/buildr/core/checks.rb +3 -131
  27. data/lib/buildr/core/common.rb +0 -4
  28. data/lib/buildr/core/compile.rb +1 -7
  29. data/lib/buildr/core/environment.rb +0 -3
  30. data/lib/buildr/core/filter.rb +7 -3
  31. data/lib/buildr/core/generate.rb +50 -52
  32. data/lib/buildr/core/help.rb +2 -1
  33. data/lib/buildr/core/osx.rb +49 -0
  34. data/lib/buildr/core/progressbar.rb +1 -1
  35. data/lib/buildr/core/project.rb +7 -9
  36. data/lib/buildr/core/test.rb +4 -4
  37. data/lib/buildr/core/transports.rb +13 -30
  38. data/lib/buildr/core/util.rb +8 -3
  39. data/lib/buildr/groovy/bdd.rb +1 -0
  40. data/lib/buildr/groovy/compiler.rb +1 -1
  41. data/lib/buildr/ide/eclipse.rb +30 -20
  42. data/lib/buildr/ide/idea.rb +3 -2
  43. data/lib/buildr/ide/idea7x.rb +4 -2
  44. data/lib/buildr/java/ant.rb +1 -1
  45. data/lib/buildr/java/bdd.rb +9 -5
  46. data/lib/buildr/java/cobertura.rb +236 -0
  47. data/lib/buildr/java/commands.rb +2 -1
  48. data/lib/buildr/java/emma.rb +238 -0
  49. data/lib/buildr/java/jtestr_runner.rb.erb +2 -0
  50. data/lib/buildr/java/packaging.rb +6 -2
  51. data/lib/buildr/java/pom.rb +0 -4
  52. data/lib/buildr/java/test_result.rb +45 -15
  53. data/lib/buildr/java/tests.rb +14 -9
  54. data/lib/buildr/packaging.rb +5 -2
  55. data/lib/buildr/packaging/archive.rb +488 -0
  56. data/lib/buildr/packaging/artifact.rb +36 -7
  57. data/lib/buildr/packaging/artifact_namespace.rb +2 -2
  58. data/lib/buildr/packaging/gems.rb +3 -3
  59. data/lib/buildr/packaging/package.rb +1 -1
  60. data/lib/buildr/packaging/tar.rb +85 -3
  61. data/lib/buildr/packaging/version_requirement.rb +172 -0
  62. data/lib/buildr/packaging/zip.rb +24 -682
  63. data/lib/buildr/packaging/ziptask.rb +313 -0
  64. data/lib/buildr/scala/compiler.rb +1 -1
  65. data/lib/buildr/scala/tests.rb +2 -2
  66. data/rakelib/apache.rake +58 -8
  67. data/rakelib/package.rake +4 -1
  68. data/rakelib/rspec.rake +2 -2
  69. data/rakelib/rubyforge.rake +6 -3
  70. data/rakelib/scm.rake +1 -1
  71. data/rakelib/setup.rake +0 -5
  72. data/rakelib/stage.rake +4 -1
  73. data/spec/addon/drb_spec.rb +328 -0
  74. data/spec/core/application_spec.rb +29 -22
  75. data/spec/core/build_spec.rb +8 -0
  76. data/spec/core/checks_spec.rb +293 -311
  77. data/spec/core/common_spec.rb +8 -2
  78. data/spec/core/compile_spec.rb +17 -1
  79. data/spec/core/generate_spec.rb +33 -0
  80. data/spec/core/project_spec.rb +18 -10
  81. data/spec/core/test_spec.rb +24 -1
  82. data/spec/ide/eclipse_spec.rb +96 -28
  83. data/spec/java/ant.rb +5 -0
  84. data/spec/java/bdd_spec.rb +4 -4
  85. data/spec/{addon → java}/cobertura_spec.rb +3 -3
  86. data/spec/{addon → java}/emma_spec.rb +3 -3
  87. data/spec/java/java_spec.rb +9 -1
  88. data/spec/java/packaging_spec.rb +19 -2
  89. data/spec/{addon → java}/test_coverage_spec.rb +7 -1
  90. data/spec/java/tests_spec.rb +5 -0
  91. data/spec/packaging/archive_spec.rb +1 -1
  92. data/spec/{core → packaging}/artifact_namespace_spec.rb +2 -2
  93. data/spec/packaging/artifact_spec.rb +46 -5
  94. data/spec/packaging/packaging_spec.rb +1 -1
  95. data/spec/sandbox.rb +16 -14
  96. data/spec/spec_helpers.rb +26 -3
  97. metadata +20 -11
  98. data/lib/buildr/core/application_cli.rb +0 -139
@@ -1,139 +0,0 @@
1
- # Licensed to the Apache Software Foundation (ASF) under one or more
2
- # contributor license agreements. See the NOTICE file distributed with this
3
- # work for additional information regarding copyright ownership. The ASF
4
- # licenses this file to you under the Apache License, Version 2.0 (the
5
- # "License"); you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
- # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
- # License for the specific language governing permissions and limitations under
14
- # the License.
15
-
16
- # Portion of this file derived from Rake.
17
- # Copyright (c) 2003, 2004 Jim Weirich
18
- #
19
- # Permission is hereby granted, free of charge, to any person obtaining a copy
20
- # of this software and associated documentation files (the "Software"), to deal
21
- # in the Software without restriction, including without limitation the rights
22
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23
- # copies of the Software, and to permit persons to whom the Software is
24
- # furnished to do so, subject to the following conditions:
25
- #
26
- # The above copyright notice and this permission notice shall be included in
27
- # all copies or substantial portions of the Software.
28
- #
29
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35
- # SOFTWARE.
36
-
37
-
38
- require 'getoptlong'
39
-
40
-
41
- module Buildr
42
- module CommandLineInterface
43
-
44
- OPTIONS = [ # :nodoc:
45
- ['--help', '-h', GetoptLong::NO_ARGUMENT,
46
- 'Display this help message.'],
47
- ['--nosearch', '-n', GetoptLong::NO_ARGUMENT,
48
- 'Do not search parent directories for the buildfile.'],
49
- ['--quiet', '-q', GetoptLong::NO_ARGUMENT,
50
- 'Do not log messages to standard output.'],
51
- ['--buildfile', '-f', GetoptLong::REQUIRED_ARGUMENT,
52
- 'Use FILE as the buildfile.'],
53
- ['--require', '-r', GetoptLong::REQUIRED_ARGUMENT,
54
- 'Require MODULE before executing buildfile.'],
55
- ['--trace', '-t', GetoptLong::NO_ARGUMENT,
56
- 'Turn on invoke/execute tracing, enable full backtrace.'],
57
- ['--prereqs', '-P', GetoptLong::OPTIONAL_ARGUMENT,
58
- 'Display tasks and dependencies, then exit.'],
59
- ['--version', '-v', GetoptLong::NO_ARGUMENT,
60
- 'Display the program version.'],
61
- ['--environment', '-e', GetoptLong::REQUIRED_ARGUMENT,
62
- 'Environment name (e.g. development, test, production).']
63
- ]
64
-
65
- def collect_tasks
66
- top_level_tasks.clear
67
- ARGV.each do |arg|
68
- if arg =~ /^(\w+)=(.*)$/
69
- ENV[$1.upcase] = $2
70
- else
71
- top_level_tasks << arg
72
- end
73
- end
74
- top_level_tasks.push("default") if top_level_tasks.size == 0
75
- end
76
-
77
- def parse_options
78
- opts = GetoptLong.new(*command_line_options)
79
- opts.each { |opt, value| do_option(opt, value) }
80
- end
81
-
82
- def do_option(opt, value)
83
- case opt
84
- when '--help'
85
- help
86
- exit
87
- when '--buildfile'
88
- rakefiles.clear
89
- rakefiles << value
90
- when '--version'
91
- puts version
92
- exit
93
- when '--environment'
94
- ENV['BUILDR_ENV'] = value
95
- when '--require'
96
- requires << value
97
- when '--prereqs'
98
- options.show_prereqs = true
99
- options.show_task_pattern = Regexp.new(value || '.')
100
- when '--nosearch', '--quiet', '--trace'
101
- super
102
- end
103
- end
104
-
105
- def command_line_options
106
- OPTIONS.collect { |lst| lst[0..-2] }
107
- end
108
-
109
- def version
110
- "Buildr #{Buildr::VERSION} #{RUBY_PLATFORM[/java/] && '(JRuby '+JRUBY_VERSION+')'}"
111
- end
112
-
113
- def usage
114
- puts version
115
- puts
116
- puts 'Usage:'
117
- puts ' buildr [options] [tasks] [name=value]'
118
- end
119
-
120
- def help
121
- usage
122
- puts
123
- puts 'Options:'
124
- OPTIONS.sort.each do |long, short, mode, desc|
125
- if mode == GetoptLong::REQUIRED_ARGUMENT
126
- if desc =~ /\b([A-Z]{2,})\b/
127
- long = long + "=#{$1}"
128
- end
129
- end
130
- printf " %-20s (%s)\n", long, short
131
- printf " %s\n", desc
132
- end
133
- puts
134
- puts 'For help with your buildfile:'
135
- puts ' buildr help'
136
- end
137
-
138
- end
139
- end