oxen_deployer 1.0.0

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 (2) hide show
  1. data/lib/oxen_deployer.rb +86 -0
  2. metadata +49 -0
@@ -0,0 +1,86 @@
1
+ require 'rubygems'
2
+ require 'thread'
3
+ require 'rake/remote_task'
4
+
5
+ $TESTING ||= false
6
+
7
+ ##
8
+ # Deployer - Pragmatic application deployment automation,
9
+ # without mercy.
10
+ #
11
+ # Please read doco/getting_started.txt or http://rubyhitsquad.com/
12
+ #
13
+ # === Basic scenario:
14
+ #
15
+ # 1. rake deployer:setup (first time only)
16
+ # 2. rake deployer:update
17
+ # 3. rake deployer:migrate (optional)
18
+ # 4. rake deployer:start
19
+
20
+ module OxenDeployer
21
+
22
+ ##
23
+ # This is the version of Deployer you are running.
24
+ VERSION = "1.0.0"
25
+
26
+ ##
27
+ # Loads tasks file +tasks_file+ and various recipe styles as a hash
28
+ # of category/style pairs. Recipes default to:
29
+ #
30
+ # :app => :passenger
31
+ # :config => 'config/deploy.rb'
32
+ # :core => :core
33
+ # :scm => :subversion
34
+ # :web => :apache
35
+ #
36
+ # You can override individual values and/or set to nil to
37
+ # deactivate. :config will get loaded last to ensure that user
38
+ # variables override default values.
39
+ #
40
+ # And by all means, feel free to skip this entirely if it doesn't
41
+ # fit for you. All it does is a fancy-pants require. Require
42
+ # whatever files you need as you see fit straight from your
43
+ # Rakefile. YAY for simple and clean!
44
+
45
+ def self.load options = {}
46
+ options = {:config => options} if String === options
47
+ order = [:core, :type, :app, :config, :scm, :web]
48
+ order += options.keys - order
49
+
50
+ recipes = {
51
+ :app => :passenger,
52
+ :type => :rails,
53
+ :config => 'config/deploy.rb',
54
+ :core => :core,
55
+ :scm => :subversion,
56
+ :web => :apache,
57
+ }.merge(options)
58
+
59
+ order.each do |flavor|
60
+ recipe = recipes[flavor]
61
+ next if recipe.nil? or flavor == :config
62
+ begin
63
+ require "Deployer/#{recipe}"
64
+ rescue LoadError => e
65
+ re = RuntimeError.new e.message
66
+ re.backtrace = e.backtrace
67
+ raise re
68
+ end
69
+ end
70
+
71
+ set :skip_scm, false
72
+
73
+ Kernel.load recipes[:config]
74
+ Kernel.load "#{File.dirname(recipes[:config])}/deploy_#{ENV['to']}.rb" if ENV['to']
75
+ end
76
+ end
77
+
78
+ class String #:nodoc:
79
+ def cleanup
80
+ if ENV['FULL'] then
81
+ gsub(/\s+/, ' ').strip
82
+ else
83
+ self[/\A.*?\./]
84
+ end
85
+ end
86
+ end
metadata ADDED
@@ -0,0 +1,49 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: oxen_deployer
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Walther Diechmann
9
+ - Enrique Phillips
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2013-07-18 00:00:00.000000000 Z
14
+ dependencies: []
15
+ description: OxenDeployer was born out of desperation with Vlad accepting commits
16
+ email:
17
+ - walther@diechmann.net
18
+ - enrique.phillips.wac@gmail.com
19
+ executables: []
20
+ extensions: []
21
+ extra_rdoc_files: []
22
+ files:
23
+ - lib/oxen_deployer.rb
24
+ homepage: https://github.com/wdiechmann/oxen_deployer
25
+ licenses: []
26
+ post_install_message:
27
+ rdoc_options: []
28
+ require_paths:
29
+ - lib
30
+ required_ruby_version: !ruby/object:Gem::Requirement
31
+ none: false
32
+ requirements:
33
+ - - ! '>='
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ required_rubygems_version: !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirements:
39
+ - - ! '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ requirements: []
43
+ rubyforge_project:
44
+ rubygems_version: 1.8.23
45
+ signing_key:
46
+ specification_version: 3
47
+ summary: OxenDeployer - Vlad with a vengeance
48
+ test_files: []
49
+ has_rdoc: