buildr 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. data/CHANGELOG +68 -11
  2. data/_buildr +2 -0
  3. data/addon/buildr/hibernate.rb +8 -5
  4. data/addon/buildr/jetty.rb +1 -1
  5. data/addon/buildr/openjpa.rb +0 -2
  6. data/addon/buildr/xmlbeans.rb +1 -1
  7. data/buildr.gemspec +13 -9
  8. data/doc/_layouts/default.html +3 -1
  9. data/doc/contributing.textile +10 -2
  10. data/doc/css/default.css +6 -6
  11. data/doc/download.textile +7 -7
  12. data/doc/languages.textile +2 -2
  13. data/doc/more_stuff.textile +41 -33
  14. data/doc/packaging.textile +6 -3
  15. data/doc/releasing.textile +116 -0
  16. data/doc/scripts/install-linux.sh +7 -6
  17. data/doc/testing.textile +14 -0
  18. data/lib/buildr.rb +2 -2
  19. data/lib/buildr/core.rb +0 -6
  20. data/lib/buildr/core/application.rb +25 -2
  21. data/lib/buildr/core/build.rb +66 -15
  22. data/lib/buildr/core/compile.rb +10 -1
  23. data/lib/buildr/core/filter.rb +1 -1
  24. data/lib/buildr/core/progressbar.rb +8 -3
  25. data/lib/buildr/core/test.rb +57 -6
  26. data/lib/buildr/core/transports.rb +18 -13
  27. data/lib/buildr/core/util.rb +19 -3
  28. data/lib/buildr/groovy/compiler.rb +2 -2
  29. data/lib/buildr/ide/eclipse.rb +32 -12
  30. data/lib/buildr/java/ant.rb +3 -3
  31. data/lib/buildr/java/bdd.rb +1 -2
  32. data/lib/buildr/java/cobertura.rb +10 -9
  33. data/lib/buildr/java/commands.rb +22 -21
  34. data/lib/buildr/java/compiler.rb +2 -2
  35. data/lib/buildr/java/doc.rb +1 -1
  36. data/lib/buildr/java/ecj.rb +71 -0
  37. data/lib/buildr/java/emma.rb +1 -1
  38. data/lib/buildr/java/external.rb +9 -9
  39. data/lib/buildr/java/jruby.rb +5 -0
  40. data/lib/buildr/java/packaging.rb +4 -3
  41. data/lib/buildr/java/rjb.rb +4 -6
  42. data/lib/buildr/java/tests.rb +9 -4
  43. data/lib/buildr/packaging/archive.rb +7 -3
  44. data/lib/buildr/packaging/artifact.rb +153 -38
  45. data/lib/buildr/packaging/gems.rb +2 -3
  46. data/lib/buildr/packaging/package.rb +19 -12
  47. data/lib/buildr/packaging/tar.rb +1 -1
  48. data/lib/buildr/packaging/ziptask.rb +1 -1
  49. data/lib/buildr/scala/bdd.rb +7 -3
  50. data/lib/buildr/scala/compiler.rb +2 -2
  51. data/lib/buildr/scala/doc.rb +3 -3
  52. data/lib/buildr/scala/tests.rb +7 -3
  53. data/lib/buildr/version.rb +18 -0
  54. data/rakelib/all-in-one.rake +1 -1
  55. data/rakelib/doc.rake +13 -3
  56. data/rakelib/metrics.rake +39 -0
  57. data/spec/core/application_spec.rb +13 -12
  58. data/spec/core/build_spec.rb +166 -7
  59. data/spec/core/cc_spec.rb +1 -1
  60. data/spec/core/checks_spec.rb +1 -1
  61. data/spec/core/common_spec.rb +10 -1
  62. data/spec/core/compile_spec.rb +1 -1
  63. data/spec/core/extension_spec.rb +1 -1
  64. data/spec/core/generate_spec.rb +1 -1
  65. data/spec/core/project_spec.rb +1 -1
  66. data/spec/core/test_spec.rb +124 -11
  67. data/spec/core/transport_spec.rb +10 -3
  68. data/spec/core/util_spec.rb +18 -2
  69. data/spec/groovy/bdd_spec.rb +1 -1
  70. data/spec/groovy/compiler_spec.rb +3 -3
  71. data/spec/ide/eclipse_spec.rb +63 -1
  72. data/spec/ide/idea7x_spec.rb +1 -1
  73. data/spec/java/ant_spec.rb +1 -1
  74. data/spec/java/bdd_spec.rb +1 -1
  75. data/spec/java/cobertura_spec.rb +29 -2
  76. data/spec/java/commands_spec.rb +61 -2
  77. data/spec/java/compiler_spec.rb +3 -3
  78. data/spec/java/ecj_spec.rb +115 -0
  79. data/spec/java/emma_spec.rb +1 -1
  80. data/spec/java/external_spec.rb +10 -8
  81. data/spec/java/java_spec.rb +14 -6
  82. data/spec/java/packaging_spec.rb +41 -15
  83. data/spec/java/test_coverage_helper.rb +1 -1
  84. data/spec/java/tests_spec.rb +1 -1
  85. data/spec/packaging/archive_spec.rb +12 -1
  86. data/spec/packaging/artifact_namespace_spec.rb +1 -1
  87. data/spec/packaging/artifact_spec.rb +197 -7
  88. data/spec/packaging/packaging_spec.rb +12 -12
  89. data/spec/sandbox.rb +8 -3
  90. data/spec/scala/bdd_spec.rb +3 -3
  91. data/spec/scala/compiler_spec.rb +7 -7
  92. data/spec/scala/scala.rb +3 -3
  93. data/spec/scala/tests_spec.rb +3 -3
  94. data/spec/spec_helpers.rb +11 -1
  95. data/spec/version_requirement_spec.rb +1 -1
  96. metadata +212 -81
  97. data/rakelib/jekylltask.rb +0 -120
@@ -1,120 +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
-
17
- gem 'mojombo-jekyll', '~> 0.5.2' # skip past some buggy versions
18
- require 'rake/tasklib'
19
- require 'jekyll'
20
-
21
-
22
- class JekyllTask < Rake::TaskLib
23
- def initialize(name=:jekyll) # :yield: self
24
- @name = name
25
- @source = name
26
- @target = name
27
- yield self if block_given?
28
- task name, :auto, :needs=>[@source] do |task, args|
29
- generate args.auto
30
- end
31
- if @source != @target
32
- file @target=>FileList["#{@source}/**/*"] do
33
- generate
34
- end
35
- task 'clobber' do
36
- rm_rf @target
37
- end
38
- end
39
- end
40
-
41
- attr_accessor :source
42
- attr_accessor :target
43
-
44
- def generate(auto = false)
45
- options = { 'source'=>source, 'destination'=>target }
46
- options = Jekyll.configuration(options)
47
- site = Jekyll::Site.new(options)
48
-
49
- if auto
50
- require 'directory_watcher'
51
- puts "Auto generating: just edit a page and save, watch the console to see when we're done regenerating pages"
52
- dw = DirectoryWatcher.new(source)
53
- dw.interval = 1
54
- dw.glob = Dir.chdir(source) do
55
- dirs = Dir['*'].select { |x| File.directory?(x) }
56
- dirs -= [target]
57
- dirs = dirs.map { |x| "#{x}/**/*" }
58
- dirs += ['*']
59
- end
60
- dw.start
61
- dw.add_observer do |*args|
62
- t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
63
- puts "[#{t}] regeneration: #{args.size} files changed"
64
- site.process
65
- puts "Done"
66
- end
67
- loop { sleep 1 }
68
- else
69
- puts "Generating documentation in #{target}"
70
- site.process
71
- touch target
72
- end
73
- end
74
- end
75
-
76
-
77
- module TocFilter
78
- def toc(input)
79
- input.scan(/<(h2)(?:>|\s+(.*?)>)([^<]*)<\/\1\s*>/mi).inject(%{<ol class="toc">}) { |toc, entry|
80
- id = entry[1][/^id=(['"])(.*)\1$/, 2]
81
- title = entry[2].gsub(/<(\w*).*?>(.*?)<\/\1\s*>/m, '\2').strip
82
- toc << %{<li><a href="##{id}">#{title}</a></li>}
83
- } << "</ol>"
84
- end
85
- end
86
- Liquid::Template.register_filter(TocFilter)
87
-
88
-
89
-
90
- # Under Ruby 1.9 [a,b,c].to_s doesn't join the array first. (Jekyll 0.5.2 requires this)
91
- module Jekyll
92
- class HighlightBlock < Liquid::Block
93
- def render(context)
94
- if context.registers[:site].pygments
95
- render_pygments(context, super.join)
96
- else
97
- render_codehighlighter(context, super.join)
98
- end
99
- end
100
- end
101
- end
102
-
103
- # Ruby 1.9 has sane closure scoping which manages to mess Liquid filters. (Liquid 2.0.0 requires this)
104
- module Liquid
105
- class Variable
106
- def render(context)
107
- return '' if @name.nil?
108
- @filters.inject(context[@name]) do |output, filter|
109
- filterargs = filter[1].to_a.collect do |a|
110
- context[a]
111
- end
112
- begin
113
- context.invoke(filter[0], output, *filterargs)
114
- rescue FilterNotFound
115
- raise FilterNotFound, "Error - filter '#{filter[0]}' in '#{@markup.strip}' could not be found."
116
- end
117
- end
118
- end
119
- end
120
- end