hudson 0.3.0.beta.9 → 0.3.0.beta.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hudson (0.3.0.beta.9)
4
+ hudson (0.3.0.beta.10)
5
5
  builder (~> 2.1.2)
6
6
  hpricot
7
7
  httparty (~> 0.6.1)
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{hudson}
5
- s.version = "0.3.0.beta.9"
5
+ s.version = "0.3.0.beta.10"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Charles Lowell", "Dr Nic Williams"]
@@ -1,5 +1,5 @@
1
1
  module Hudson
2
- VERSION = "0.3.0.beta.9"
2
+ VERSION = "0.3.0.beta.10"
3
3
  HUDSON_VERSION = "1.380"
4
4
  WAR = File.expand_path(File.dirname(__FILE__) + "/hudson/hudson.war")
5
5
  PLUGINS = File.expand_path(File.dirname(__FILE__) + "/hudson/plugins")
@@ -56,7 +56,7 @@ module Hudson
56
56
  unless scm = Hudson::ProjectScm.discover
57
57
  error "Cannot determine project SCM. Currently supported: #{Hudson::ProjectScm.supported}"
58
58
  end
59
- job_config = Hudson::JobConfigBuilder.new(:rubygem) do |c|
59
+ job_config = Hudson::JobConfigBuilder.new(:rails) do |c|
60
60
  c.scm = scm.url
61
61
  c.assigned_node = options[:assigned_node] if options[:assigned_node]
62
62
  end
@@ -108,6 +108,7 @@ module Hudson
108
108
  def build_steps(b)
109
109
  b.builders do
110
110
  if job_type == "rails"
111
+ build_shell_step b, "bundle install"
111
112
  build_ruby_step b, <<-RUBY.gsub(/^ /, '')
112
113
  unless File.exist?("config/database.yml")
113
114
  require 'fileutils'
@@ -116,15 +117,23 @@ module Hudson
116
117
  FileUtils.cp example, "config/database.yml"
117
118
  end
118
119
  RUBY
119
- build_rake_step b, "db:schema:load"
120
- build_rake_step b, "features"
121
- build_rake_step b, "spec"
120
+ build_shell_step b, "bundle exec rake db:schema:load"
121
+ build_shell_step b, "bundle exec rake"
122
122
  elsif job_type == "rubygem"
123
123
  build_rake_step b, "features"
124
124
  end
125
125
  end
126
126
  end
127
127
 
128
+ # <hudson.tasks.Shell>
129
+ # <command>bundle install</command>
130
+ # </hudson.tasks.Shell>
131
+ def build_shell_step(b, command)
132
+ b.tag! "hudson.tasks.Shell" do
133
+ b.command command.to_xs.gsub(%r{"}, '&quot;').gsub(%r{'}, '&apos;')
134
+ end
135
+ end
136
+
128
137
  # <hudson.plugins.ruby.Ruby>
129
138
  # <command>unless File.exist?(&quot;config/database.yml&quot;)
130
139
  # require &apos;fileutils&apos;
@@ -38,6 +38,9 @@
38
38
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
39
39
  <concurrentBuild>false</concurrentBuild>
40
40
  <builders>
41
+ <hudson.tasks.Shell>
42
+ <command>bundle install</command>
43
+ </hudson.tasks.Shell>
41
44
  <hudson.plugins.ruby.Ruby>
42
45
  <command>
43
46
  unless File.exist?(&quot;config/database.yml&quot;)
@@ -48,30 +51,12 @@ unless File.exist?(&quot;config/database.yml&quot;)
48
51
  end
49
52
  </command>
50
53
  </hudson.plugins.ruby.Ruby>
51
- <hudson.plugins.rake.Rake>
52
- <rakeInstallation>(Default)</rakeInstallation>
53
- <rakeFile/>
54
- <rakeLibDir/>
55
- <rakeWorkingDir/>
56
- <tasks>db:schema:load</tasks>
57
- <silent>false</silent>
58
- </hudson.plugins.rake.Rake>
59
- <hudson.plugins.rake.Rake>
60
- <rakeInstallation>(Default)</rakeInstallation>
61
- <rakeFile/>
62
- <rakeLibDir/>
63
- <rakeWorkingDir/>
64
- <tasks>features</tasks>
65
- <silent>false</silent>
66
- </hudson.plugins.rake.Rake>
67
- <hudson.plugins.rake.Rake>
68
- <rakeInstallation>(Default)</rakeInstallation>
69
- <rakeFile/>
70
- <rakeLibDir/>
71
- <rakeWorkingDir/>
72
- <tasks>spec</tasks>
73
- <silent>false</silent>
74
- </hudson.plugins.rake.Rake>
54
+ <hudson.tasks.Shell>
55
+ <command>bundle exec rake db:schema:load</command>
56
+ </hudson.tasks.Shell>
57
+ <hudson.tasks.Shell>
58
+ <command>bundle exec rake</command>
59
+ </hudson.tasks.Shell>
75
60
  </builders>
76
61
  <publishers/>
77
62
  <buildWrappers/>
@@ -11,8 +11,7 @@ describe Hudson::JobConfigBuilder do
11
11
  end
12
12
  end
13
13
  it "builds config.xml" do
14
- config_xml = config_xml("rails", "single")
15
- config_xml.should == @config.to_xml
14
+ config_xml("rails", "single").should == @config.to_xml
16
15
  end
17
16
  end
18
17
 
@@ -23,8 +22,7 @@ describe Hudson::JobConfigBuilder do
23
22
  end
24
23
  end
25
24
  it "builds config.xml" do
26
- config_xml = config_xml("rubygem")
27
- config_xml.should == @config.to_xml
25
+ config_xml("rubygem").should == @config.to_xml
28
26
  end
29
27
  end
30
28
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hudson
3
3
  version: !ruby/object:Gem::Version
4
- hash: 62196353
4
+ hash: 62196359
5
5
  prerelease: true
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
9
  - 0
10
10
  - beta
11
- - 9
12
- version: 0.3.0.beta.9
11
+ - 10
12
+ version: 0.3.0.beta.10
13
13
  platform: ruby
14
14
  authors:
15
15
  - Charles Lowell