ucb_deployer 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rake'
3
3
  require 'echoe'
4
4
  require 'spec/rake/spectask'
5
5
 
6
- Echoe.new('ucb_deployer', '0.0.6') do |p|
6
+ Echoe.new('ucb_deployer', '0.0.7') do |p|
7
7
  p.description = "Tool for deploying (Java/JRuby) war files to tomcat"
8
8
  p.url = "http://ucbrb.rubyforge.org"
9
9
  p.author = "Steven Hansen"
data/bin/deployer CHANGED
@@ -1,10 +1,15 @@
1
1
  #!/usr/bin/env ruby
2
+
3
+ require 'pp'
4
+ require 'rubygems'
2
5
  require 'rake'
6
+ # $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/../lib'))
3
7
  require 'ucb_deployer'
4
8
 
9
+
5
10
  Rake.application.init("ucb_deployer")
6
11
 
7
- USAGE = "Usage: deployer APP=<confluence|jira> VERSION=x.x.x"
12
+ USAGE = "Usage: deployer <task> APP=<confluence|jira> VERSION=x.x.x"
8
13
 
9
14
  task :deploy => [:build] do
10
15
  @deployer.deploy()
@@ -24,8 +29,8 @@ end
24
29
 
25
30
  task :init => [:check_usage] do
26
31
  begin
32
+ UcbDeployer.debug_mode = true if ENV["DEBUG"]
27
33
  @deployer = UcbDeployer.factory(ENV["APP"].to_sym)
28
- @deployer.debug_mode = true if ENV["DEBUG"]
29
34
  rescue UcbDeployer::ConfigError => e
30
35
  $stderr.puts(USAGE)
31
36
  $stderr.puts(e.message)
@@ -3,7 +3,7 @@ module UcbDeployer
3
3
  class ConfluenceDeployer < Deployer
4
4
 
5
5
  def initialize(config_file = "#{ENV['HOME']}/config/confluence/deploy.yml")
6
- FileUtils.touch(config_file) if !File.exists?(config_file)
6
+ debug("Using config file: #{config_file}")
7
7
  load_config(config_file)
8
8
  end
9
9
 
@@ -56,9 +56,9 @@ module UcbDeployer
56
56
  # +data_dir+
57
57
  #
58
58
  def load_config(config_file)
59
- debug("Using config file: #{config_file}")
60
- debug("Setting options:")
61
59
  hash = YAML.load_file(config_file)
60
+
61
+ debug("Setting options:")
62
62
  hash.each do |key, val|
63
63
  debug("#{key}: #{val}")
64
64
  if CONFIG_OPTIONS.include?(key.to_sym)
data/lib/ucb_deployer.rb CHANGED
@@ -21,13 +21,17 @@ module UcbDeployer
21
21
  # @return [UcbDeployer::Deployer]
22
22
  #
23
23
  def self.factory(app_name)
24
- if app_name == :confluence
25
- UcbDeployer::ConfluenceDeployer.new()
26
- elsif app_name == :jira
27
- UcbDeployer::JiraDeployer.new()
28
- else
29
- raise(ConfigError, "Unrecognized app_name: #{app_name}")
24
+ begin
25
+ if app_name == :confluence
26
+ return UcbDeployer::ConfluenceDeployer.new()
27
+ elsif app_name == :jira
28
+ return UcbDeployer::JiraDeployer.new()
29
+ end
30
+ rescue => e
31
+ raise(UcbDeployer::ConfigError, e)
30
32
  end
33
+
34
+ raise(ConfigError, "Unrecognized app_name: #{app_name}")
31
35
  end
32
36
 
33
37
  def self.debug(str)
data/ucb_deployer.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{ucb_deployer}
5
- s.version = "0.0.6"
5
+ s.version = "0.0.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Steven Hansen"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ucb_deployer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 6
10
- version: 0.0.6
9
+ - 7
10
+ version: 0.0.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Steven Hansen