underglow 0.0.92 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.rspec CHANGED
File without changes
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 1.9.3-p327
data/Gemfile CHANGED
File without changes
data/LICENSE.txt CHANGED
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
@@ -0,0 +1,8 @@
1
+ Capistrano::Configuration.instance.load do
2
+ namespace :db do
3
+ desc "Seed database"
4
+ task :seed, roles: :db do
5
+ run "#{rake_command} db:seed"
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,18 @@
1
+ Capistrano::Configuration.instance.load do
2
+ namespace :rails do
3
+ desc "Run rails console"
4
+ task :console, roles: :app do
5
+ run_remote "cd #{current_path} && #{deploy_to}/environment bin/rails c"
6
+ end
7
+
8
+ desc "View rails log"
9
+ task :log, roles: :app do
10
+ run_remote "cd #{current_path} && vi log/#{stage}.log"
11
+ end
12
+
13
+ desc "Tail rails log"
14
+ task :tail, roles: :app do
15
+ run_remote "cd #{current_path} && tail -f log/#{stage}.log"
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ Capistrano::Configuration.instance.load do
2
+ namespace :unicorn do
3
+ # Sends a USR2 signal to master unicorn to spawn a new master (based on the updated codebase)
4
+ # When new master spawns new workers, the old master process is killed
5
+ # This allows for zero downtime
6
+ desc "Restarts Unicorn gracefully to serve updated code"
7
+ task :restart, roles: :web do
8
+ kill "unicorn", "USR2"
9
+ end
10
+
11
+ desc "Kill Unicorn"
12
+ task :reset, roles: :web do
13
+ kill "unicorn", "SIGTERM"
14
+ end
15
+ end
16
+ end
File without changes
@@ -4,6 +4,11 @@ Capistrano::Configuration.instance.load do
4
4
  set :rails_env, stage
5
5
  end
6
6
 
7
+ # Run remote command via SSH
8
+ def run_remote(command)
9
+ exec "ssh #{stage} -t 'source ~/.profile && #{command}'"
10
+ end
11
+
7
12
  # Can't use File.exists? because it'll check the local filesystem, not remote
8
13
  def remote_file_exists?(path)
9
14
  'true' == capture("if [ -e #{path} ]; then echo 'true'; fi").strip
@@ -1,3 +1,6 @@
1
1
  require 'underglow/capistrano/helpers'
2
2
  require 'underglow/capistrano/deploy'
3
- require 'underglow/capistrano/rake'
3
+ require 'underglow/capistrano/deploy/db'
4
+ require 'underglow/capistrano/deploy/rails'
5
+ require 'underglow/capistrano/deploy/rake'
6
+ require 'underglow/capistrano/deploy/unicorn'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,3 @@
1
1
  module Underglow
2
- VERSION = "0.0.92"
2
+ VERSION = "0.1.0"
3
3
  end
data/lib/underglow.rb CHANGED
File without changes
File without changes
File without changes
data/spec/spec_helper.rb CHANGED
File without changes
data/underglow.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "underglow"
8
- s.version = "0.0.92"
8
+ s.version = "0.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["James Hu"]
12
- s.date = "2012-12-08"
12
+ s.date = "2013-06-29"
13
13
  s.description = "A library that makes life easier."
14
14
  s.email = "axsuul@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -18,6 +18,7 @@ Gem::Specification.new do |s|
18
18
  ]
19
19
  s.files = [
20
20
  ".rspec",
21
+ ".ruby-version",
21
22
  "Gemfile",
22
23
  "LICENSE.txt",
23
24
  "README.md",
@@ -25,8 +26,11 @@ Gem::Specification.new do |s|
25
26
  "lib/underglow.rb",
26
27
  "lib/underglow/capistrano.rb",
27
28
  "lib/underglow/capistrano/deploy.rb",
29
+ "lib/underglow/capistrano/deploy/db.rb",
30
+ "lib/underglow/capistrano/deploy/rails.rb",
31
+ "lib/underglow/capistrano/deploy/rake.rb",
32
+ "lib/underglow/capistrano/deploy/unicorn.rb",
28
33
  "lib/underglow/capistrano/helpers.rb",
29
- "lib/underglow/capistrano/rake.rb",
30
34
  "lib/underglow/extensions/string.rb",
31
35
  "lib/underglow/extensions/symbol.rb",
32
36
  "lib/underglow/rails/environment.rb",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: underglow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.92
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-08 00:00:00.000000000 Z
12
+ date: 2013-06-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -84,6 +84,7 @@ extra_rdoc_files:
84
84
  - README.md
85
85
  files:
86
86
  - .rspec
87
+ - .ruby-version
87
88
  - Gemfile
88
89
  - LICENSE.txt
89
90
  - README.md
@@ -91,8 +92,11 @@ files:
91
92
  - lib/underglow.rb
92
93
  - lib/underglow/capistrano.rb
93
94
  - lib/underglow/capistrano/deploy.rb
95
+ - lib/underglow/capistrano/deploy/db.rb
96
+ - lib/underglow/capistrano/deploy/rails.rb
97
+ - lib/underglow/capistrano/deploy/rake.rb
98
+ - lib/underglow/capistrano/deploy/unicorn.rb
94
99
  - lib/underglow/capistrano/helpers.rb
95
- - lib/underglow/capistrano/rake.rb
96
100
  - lib/underglow/extensions/string.rb
97
101
  - lib/underglow/extensions/symbol.rb
98
102
  - lib/underglow/rails/environment.rb
@@ -119,7 +123,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
119
123
  version: '0'
120
124
  segments:
121
125
  - 0
122
- hash: 820083652646455417
126
+ hash: 4569539885811564498
123
127
  required_rubygems_version: !ruby/object:Gem::Requirement
124
128
  none: false
125
129
  requirements: