warbler 1.0.1 → 1.0.2

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.
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ == 1.0.2
2
+
3
+ * Add 'warble pluginize' task back. This task now just creates a
4
+ vendor/plugins/warbler/tasks/warbler.rake file. There's no need to
5
+ "vendor" all of Warbler into your application anymore.
6
+
1
7
  == 1.0.1
2
8
 
3
9
  * Fix careless bug where Warbler doesn't work with JRuby 1.4
@@ -39,7 +39,22 @@ class Warbler::Application < Rake::Application
39
39
  end
40
40
  end
41
41
 
42
- desc "Display version of warbler"
42
+ desc "Install Warbler tasks in your Rails application for use by Rake"
43
+ task :pluginize do
44
+ if !Dir["vendor/plugins/warbler*"].empty? && ENV["FORCE"].nil?
45
+ puts "I found an old nest in vendor/plugins; please trash it so I can make a new one"
46
+ puts "(directory vendor/plugins/warbler* exists)"
47
+ else
48
+ rm_rf FileList["vendor/plugins/warbler*"], :verbose => false
49
+ mkdir_p "vendor/plugins/warbler/tasks"
50
+ File.open("vendor/plugins/warbler/tasks/warbler.rake", "w") do |f|
51
+ f.puts "require 'warbler'"
52
+ f.puts "Warbler::Task.new"
53
+ end
54
+ end
55
+ end
56
+
57
+ desc "Display version of Warbler"
43
58
  task :version do
44
59
  puts "Warbler version #{Warbler::VERSION}"
45
60
  end
@@ -6,5 +6,5 @@
6
6
  #++
7
7
 
8
8
  module Warbler
9
- VERSION = "1.0.1"
9
+ VERSION = "1.0.2"
10
10
  end
data/lib/warbler_war.jar CHANGED
Binary file
@@ -26,6 +26,7 @@ describe Warbler::Application do
26
26
  Warbler.application = nil
27
27
  Warbler.framework_detection = @detection
28
28
  @argv.reverse.each {|a| ARGV.unshift a}
29
+ rm_rf FileList['vendor/plugins/warbler']
29
30
  Dir.chdir(@pwd)
30
31
  end
31
32
 
@@ -67,6 +68,20 @@ describe Warbler::Application do
67
68
  end
68
69
  end
69
70
 
71
+ it "should refuse to pluginize if the vendor/plugins/warbler directory exists" do
72
+ mkdir_p "vendor/plugins/warbler"
73
+ ARGV.unshift "pluginize"
74
+ silence { Warbler::Application.new.run }
75
+ File.exist?("vendor/plugins/warbler/tasks/warbler.rake").should_not be_true
76
+ end
77
+
78
+ it "should define a pluginize task for adding the tasks to a Rails application" do
79
+ ARGV.unshift "pluginize"
80
+ # silence { Warbler::Application.new.run }
81
+ Warbler::Application.new.run
82
+ File.exist?("vendor/plugins/warbler/tasks/warbler.rake").should be_true
83
+ end
84
+
70
85
  it "should provide a means to load the project Rakefile" do
71
86
  Warbler::Application.new.load_project_rakefile
72
87
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 1
9
- version: 1.0.1
8
+ - 2
9
+ version: 1.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nick Sieger
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-06 00:00:00 -05:00
17
+ date: 2010-05-06 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency