caphub 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 339a4d6f4002daf3fc04c5d7fcb98f73a5dc353b
4
+ data.tar.gz: e0b1af10ae3c4827af04e51d49253e27374945f3
5
+ SHA512:
6
+ metadata.gz: bfaf980200608639a1e66cf72ecd9ac630a90b137d221918ba328b99cc9900aa685a0afb170951e3673c658f71b7ae2d0e1c5e4b2a21c9aa49c8c8848cca2bda
7
+ data.tar.gz: 355065085c6566cdbafbf31ac6d44683f348e3c95f77ee7e2ea97f773f6ff4cd59c4280f627aa3f88999434a5a8e55c3014e82f492e3e56bb9c839521163e573
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ pkg/*
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ <img src="https://github.com/railsware/caphub/raw/master/caphub.png" style="float:right" />
2
+
1
3
  ## Caphub
2
4
 
3
5
  Generate centralized capistrano skeleton for multiple deployment.
@@ -23,13 +25,6 @@ Caphub is simple generation tool that follows *caphub concept*.
23
25
  Caphub generates similar layout that does usual `capify` command.
24
26
  Core of caphub skeleton is [capistrano-multiconfig](https://github.com/railsware/capistrano-multiconfig) gem that allows to recursively build multiple configurations.
25
27
 
26
- Another included gems are optional but might be useful:
27
-
28
- * [capistrano_colors](https://github.com/stjernstrom/capistrano_colors)
29
- * [capistrano-uptodate](https://github.com/railsware/capistrano-uptodate/README.md)
30
- * [capistrano-patch](https://github.com/railsware/capistrano-patch/README.md)
31
- * [capistrano-calendar](https://github.com/railsware/capistrano-calendar/README.md)
32
-
33
28
  ## Installation
34
29
 
35
30
  $ gem install caphub
@@ -38,7 +33,17 @@ Another included gems are optional but might be useful:
38
33
 
39
34
  Generate caphub layout:
40
35
 
41
- $ cuphub my-deploy
36
+ #### Capistrano 3
37
+
38
+ $ caphub my-deploy
39
+
40
+ Creating directory my-deploy
41
+ Creating capistrano skeleton in my-deploy
42
+ Initializating git repository in my-deploy
43
+
44
+ #### Capistrano 2
45
+
46
+ $ caphub --cap 2 my-deploy
42
47
 
43
48
  Creating directory my-deploy
44
49
  Creating capistrano skeleton in my-deploy
@@ -53,8 +58,7 @@ Layout example:
53
58
  │   └── deploy.rb
54
59
  ├── recipes
55
60
  ├── Capfile
56
- ├── Gemfile
57
- └── Gemfile.lock
61
+ └── Gemfile
58
62
 
59
63
  Review gems into `Gemfile` and initialize gems:
60
64
 
@@ -89,10 +93,8 @@ Put own recipes to `recipes` directory.
89
93
  ## References
90
94
 
91
95
  * [capistrano](https://github.com/capistrano/capistrano)
92
- * [capistrano-ext](https://github.com/capistrano/capistrano-ext)
93
- * [capistrano_colors](https://github.com/stjernstrom/capistrano_colors)
94
96
  * [capistrano-multiconfig](https://github.com/railsware/capistrano-multiconfig)
95
- * [capistrano-uptodate](https://github.com/railsware/capistrano-uptodate/README.md)
96
- * [capistrano-patch](https://github.com/railsware/capistrano-patch/README.md)
97
- * [capistrano-calendar](https://github.com/railsware/capistrano-calendar/README.md)
97
+ * [capistrano-uptodate](https://github.com/railsware/capistrano-uptodate#readme)
98
+ * [capistrano-patch](https://github.com/railsware/capistrano-patch#readme)
99
+ * [capistrano-calendar](https://github.com/railsware/capistrano-calendar#readme)
98
100
 
File without changes
data/caphub.png ADDED
Binary file
data/lib/caphub/runner.rb CHANGED
@@ -13,7 +13,7 @@ module Caphub
13
13
 
14
14
  def initialize(args)
15
15
  @args = args.dup
16
- @options = {}
16
+ @options = { cap: 3 }
17
17
  end
18
18
 
19
19
  attr_reader :options
@@ -21,6 +21,7 @@ module Caphub
21
21
  def parse_options!
22
22
  OptionParser.new do |opts|
23
23
  opts.banner = "Usage: #{File.basename($0)} [path]"
24
+ opts.on("-c", "--cap", "Capistrano version 2 or 3") { |v| options[:cap] = v }
24
25
  opts.on_tail("-h", "--help", "Show this message") { puts opts; exit }
25
26
  opts.on_tail('-v', '--version', "Show version") { puts Caphub::VERSION; exit }
26
27
 
@@ -40,7 +41,7 @@ module Caphub
40
41
  end
41
42
 
42
43
  def skeleton_dir
43
- File.expand_path('../../../skeleton', __FILE__)
44
+ File.expand_path("../../../skeletons/cap#{options[:cap]}", __FILE__)
44
45
  end
45
46
 
46
47
  def run!
@@ -1,3 +1,3 @@
1
1
  module Caphub
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -7,19 +7,19 @@ load 'deploy'
7
7
  # Configure libraries/recipes from Gemfile
8
8
  #
9
9
 
10
- # https://github.com/stjernstrom/capistrano_colors/README.rdoc
10
+ # https://github.com/stjernstrom/capistrano_colors/blob/master/README.rdoc
11
11
  require 'capistrano_colors'
12
12
 
13
- # https://github.com/railsware/capistrano-multiconfig/README.md
13
+ # https://github.com/railsware/capistrano-multiconfig/blob/master/README.md
14
14
  require 'capistrano/multiconfig'
15
15
 
16
- # https://github.com/railsware/capistrano-uptodate/README.md
16
+ # https://github.com/railsware/capistrano-uptodate/blob/master/README.md
17
17
  require 'capistrano/uptodate'
18
18
 
19
- # https://github.com/railsware/capistrano-patch/README.md
19
+ # https://github.com/railsware/capistrano-patch/blob/master/README.md
20
20
  require 'capistrano/patch'
21
21
 
22
- # https://github.com/railsware/capistrano-calendar/README.md
22
+ # https://github.com/railsware/capistrano-calendar/blob/master/README.md
23
23
  require 'capistrano/calendar'
24
24
 
25
25
  #
@@ -1,10 +1,10 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
- gem "capistrano"
3
+ gem "capistrano", "~> 2.15.4"
4
4
 
5
5
  gem "capistrano_colors"
6
6
 
7
- gem "capistrano-multiconfig"
7
+ gem "capistrano-multiconfig", "~> 0.0.4"
8
8
  gem "capistrano-uptodate"
9
9
  gem "capistrano-patch"
10
10
  gem "capistrano-calendar"
File without changes
@@ -2,7 +2,7 @@
2
2
  # Put here shared configuration shared among all children
3
3
  #
4
4
  # Read more about configurations:
5
- # https://github.com/railsware/capistrano-multiconfig/README.md
5
+ # https://github.com/railsware/capistrano-multiconfig/blob/master/README.md
6
6
 
7
7
  # Configuration example for layout like:
8
8
  # config/deploy/{NAMESPACE}/.../#{PROJECT_NAME}/{STAGE_NAME}.rb
File without changes
File without changes
@@ -0,0 +1,35 @@
1
+ # Load DSL and Setup multiple configurations
2
+ # https://github.com/railsware/capistrano-multiconfig
3
+ require 'capistrano/multiconfig'
4
+
5
+ # Includes default deployment tasks
6
+ require 'capistrano/deploy'
7
+
8
+ # Includes tasks from other gems included in your Gemfile
9
+ #
10
+ # For documentation on these, see for example:
11
+ #
12
+ # https://github.com/capistrano/rvm
13
+ # https://github.com/capistrano/rbenv
14
+ # https://github.com/capistrano/chruby
15
+ # https://github.com/capistrano/bundler
16
+ # https://github.com/capistrano/rails/tree/master/assets
17
+ # https://github.com/capistrano/rails/tree/master/migrations
18
+ # https://github.com/railsware/capistrano-uptodate
19
+ # https://github.com/railsware/capistrano-patch
20
+ # https://github.com/railsware/capistrano-calendar
21
+ #
22
+ # require 'capistrano/rvm'
23
+ # require 'capistrano/rbenv'
24
+ # require 'capistrano/chruby'
25
+ # require 'capistrano/bundler'
26
+ # require 'capistrano/rails/assets'
27
+ # require 'capistrano/rails/migrations'
28
+ # require 'capistrano/uptodate'
29
+ # require 'capistrano/patch'
30
+ # require 'capistrano/calendar'
31
+
32
+ # Loads custom tasks
33
+ Dir.glob('tasks/*.cap').each { |r| import r }
34
+
35
+ # vim syntax=ruby
@@ -0,0 +1,12 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "capistrano", ">=3.0.0"
4
+
5
+ gem "capistrano-multiconfig", ">=3.0.0"
6
+
7
+ # gem "capistrano-bundler", ">=1.0.0"
8
+ # gem "capistrano-rbenv", ">=1.0.5"
9
+ # gem "capistrano-rails", ">=1.0.0"
10
+ # gem "capistrano-uptodate", ">=0.0.2"
11
+ # gem "capistrano-patch", ">=0.0.2"
12
+ # gem "capistrano-calendar", ">=0.1.2"
File without changes
@@ -0,0 +1,29 @@
1
+ #
2
+ # Put here shared configuration shared among all children
3
+ #
4
+ # Read more about configurations:
5
+ # https://github.com/railsware/capistrano-multiconfig/blob/master/README.md
6
+
7
+ ask :branch, 'master'
8
+
9
+ set :application, proc { fetch(:config_name).split(':').reverse[1] }
10
+
11
+ set :repo_url, proc { "git@github.com:me/#{fetch(:application)}.git" }
12
+
13
+ set :deploy_to, proc { "/var/www/#{fetch(:application)}" }
14
+
15
+ set :scm, :git
16
+
17
+ set :format, :pretty
18
+
19
+ set :log_level, :debug
20
+
21
+ set :pty, true
22
+
23
+ set :linked_files, %w{config/database.yml}
24
+
25
+ set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
26
+
27
+ set :default_env, { path: "/opt/ruby/bin:$PATH" }
28
+
29
+ set :keep_releases, 5
File without changes
File without changes
metadata CHANGED
@@ -1,79 +1,65 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: caphub
3
- version: !ruby/object:Gem::Version
4
- hash: 29
5
- prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 1
10
- version: 0.0.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Andriy Yanko
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2011-11-04 00:00:00 Z
11
+ date: 2013-10-17 00:00:00.000000000 Z
19
12
  dependencies: []
20
-
21
13
  description: Generate centralized capistrano skeleton for multiple deployment
22
- email:
14
+ email:
23
15
  - andriy.yanko@gmail.com
24
- executables:
16
+ executables:
25
17
  - caphub
26
18
  extensions: []
27
-
28
19
  extra_rdoc_files: []
29
-
30
- files:
20
+ files:
21
+ - .gitignore
31
22
  - README.md
32
23
  - Rakefile
33
24
  - bin/caphub
34
- - caphup.gemspec
25
+ - caphub.gemspec
26
+ - caphub.png
35
27
  - lib/caphub.rb
36
28
  - lib/caphub/runner.rb
37
29
  - lib/caphub/version.rb
38
- - skeleton/.rvmrc
39
- - skeleton/Capfile
40
- - skeleton/Gemfile
41
- - skeleton/Gemfile.lock
42
- - skeleton/config/deploy.rb
43
- - skeleton/config/deploy/.gitkeep
44
- - skeleton/recipes/.gitkeep
30
+ - skeletons/cap2/Capfile
31
+ - skeletons/cap2/Gemfile
32
+ - skeletons/cap2/Gemfile.lock
33
+ - skeletons/cap2/config/deploy.rb
34
+ - skeletons/cap2/config/deploy/.gitkeep
35
+ - skeletons/cap2/recipes/.gitkeep
36
+ - skeletons/cap3/Capfile
37
+ - skeletons/cap3/Gemfile
38
+ - skeletons/cap3/Gemfile.lock
39
+ - skeletons/cap3/config/deploy.rb
40
+ - skeletons/cap3/config/deploy/.gitkeep
41
+ - skeletons/cap3/tasks/.gitkeep
45
42
  homepage: https://github.com/railsware/caphub
46
43
  licenses: []
47
-
44
+ metadata: {}
48
45
  post_install_message:
49
46
  rdoc_options: []
50
-
51
- require_paths:
47
+ require_paths:
52
48
  - lib
53
- required_ruby_version: !ruby/object:Gem::Requirement
54
- none: false
55
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- hash: 3
59
- segments:
60
- - 0
61
- version: "0"
62
- required_rubygems_version: !ruby/object:Gem::Requirement
63
- none: false
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- hash: 3
68
- segments:
69
- - 0
70
- version: "0"
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
71
59
  requirements: []
72
-
73
60
  rubyforge_project: caphub
74
- rubygems_version: 1.8.6
61
+ rubygems_version: 2.0.3
75
62
  signing_key:
76
- specification_version: 3
63
+ specification_version: 4
77
64
  summary: Generate centralized capistrano skeleton for multiple deployment
78
65
  test_files: []
79
-
data/skeleton/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm ruby-1.8.7