capistrano-gvm 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/Gemfile +4 -0
- data/README.md +0 -0
- data/Rakefile +1 -0
- data/capistrano-gvm.gemspec +21 -0
- data/lib/capistrano/gvm.rb +1 -0
- data/lib/capistrano/tasks/gvm.rake +53 -0
- data/lib/capistrano-gvm.rb +0 -0
- metadata +80 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 138a085edebb16fa5dddbd4e7e5e010e83d594f0
|
4
|
+
data.tar.gz: 2c8f555b8b20a246cef434eedff7fc9ac60d2570
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4916e21c5fb57fdff9e16e5f1d8233b5d027c0ac7a3a65d6e7897ce2a736053a44f414cf086e954c5f2cec7246e5850d89a76e2e74ee3baf83d57925ed54eef0
|
7
|
+
data.tar.gz: 3e7d0d80002e8f46e9ed8604056894a2dc18ba47a01a62f91f6a7f399f7170e86ac1b12a8302e4e198a67a3af1c5402b36f86828f31be52166a6dc0872fa7fe0
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
File without changes
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
Gem::Specification.new do |gem|
|
6
|
+
gem.name = "capistrano-gvm"
|
7
|
+
gem.version = '0.1.0'
|
8
|
+
gem.authors = ["Alex Neill"]
|
9
|
+
gem.email = ["alex.neill@blacksquaremedia.com"]
|
10
|
+
gem.description = %q{GVM integration for Capistrano}
|
11
|
+
gem.summary = %q{GVM integration for Capistrano}
|
12
|
+
gem.homepage = "https://github.com/bsm/capistrano-gvm"
|
13
|
+
gem.licenses = ["MIT"]
|
14
|
+
|
15
|
+
gem.files = `git ls-files`.split($/)
|
16
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
17
|
+
gem.require_paths = ["lib"]
|
18
|
+
|
19
|
+
gem.add_dependency 'capistrano', '~> 3.0'
|
20
|
+
gem.add_dependency 'sshkit', '~> 1.3'
|
21
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path("../tasks/gvm.rake", __FILE__)
|
@@ -0,0 +1,53 @@
|
|
1
|
+
namespace :gvm do
|
2
|
+
|
3
|
+
desc "Prints the GVM & Go version on the target host"
|
4
|
+
task :status do
|
5
|
+
on roles(fetch(:gvm_roles)) do
|
6
|
+
info capture(:gvm, "version").gsub(/[\t\r\n]/, "")
|
7
|
+
info capture(:go, "version")
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
desc "Install Go on the target host"
|
12
|
+
task :install do
|
13
|
+
on roles(fetch(:gvm_roles)) do
|
14
|
+
execute :gvm, "install #{fetch(:gvm_go_version)}"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
task :hook do
|
19
|
+
on roles(fetch(:gvm_roles)) do
|
20
|
+
root = fetch(:gvm_path)
|
21
|
+
SSHKit.config.command_map[:go] = "#{root}/gos/#{fetch(:gvm_go_version)}/bin/go"
|
22
|
+
SSHKit.config.command_map.prefix[:gvm].unshift "GVM_ROOT=#{root} PATH=#{root}/bin:$PATH"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
task :check do
|
27
|
+
on roles(fetch(:gvm_roles)) do
|
28
|
+
if not test "[ -d #{fetch(:gvm_path)} ]"
|
29
|
+
error "gvm: not found in #{fetch(:gvm_path)}"
|
30
|
+
exit 1
|
31
|
+
end
|
32
|
+
|
33
|
+
if not test "[ -f #{SSHKit.config.command_map[:go]} ]"
|
34
|
+
error "gvm: #{fetch(:gvm_go_version)} not installed or not found in #{SSHKit.config.command_map[:go]}, please run gvm:install"
|
35
|
+
exit 1
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
Capistrano::DSL.stages.each do |stage|
|
43
|
+
after stage, 'gvm:hook'
|
44
|
+
after stage, 'gvm:check'
|
45
|
+
end
|
46
|
+
|
47
|
+
namespace :load do
|
48
|
+
task :defaults do
|
49
|
+
set :gvm_go_version, "go1.2"
|
50
|
+
set :gvm_path, "~/.gvm"
|
51
|
+
set :gvm_roles, :all
|
52
|
+
end
|
53
|
+
end
|
File without changes
|
metadata
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-gvm
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alex Neill
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-01-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: capistrano
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: sshkit
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.3'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.3'
|
41
|
+
description: GVM integration for Capistrano
|
42
|
+
email:
|
43
|
+
- alex.neill@blacksquaremedia.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".gitignore"
|
49
|
+
- Gemfile
|
50
|
+
- README.md
|
51
|
+
- Rakefile
|
52
|
+
- capistrano-gvm.gemspec
|
53
|
+
- lib/capistrano-gvm.rb
|
54
|
+
- lib/capistrano/gvm.rb
|
55
|
+
- lib/capistrano/tasks/gvm.rake
|
56
|
+
homepage: https://github.com/bsm/capistrano-gvm
|
57
|
+
licenses:
|
58
|
+
- MIT
|
59
|
+
metadata: {}
|
60
|
+
post_install_message:
|
61
|
+
rdoc_options: []
|
62
|
+
require_paths:
|
63
|
+
- lib
|
64
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
74
|
+
requirements: []
|
75
|
+
rubyforge_project:
|
76
|
+
rubygems_version: 2.2.0.rc.1
|
77
|
+
signing_key:
|
78
|
+
specification_version: 4
|
79
|
+
summary: GVM integration for Capistrano
|
80
|
+
test_files: []
|