rvm-capistrano-ruby193deps-centos 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +42 -0
- data/Rakefile +2 -0
- data/lib/rvm-capistrano-ruby193deps-centos.rb +95 -0
- data/lib/rvm-capistrano-ruby193deps-centos/version.rb +9 -0
- data/rvm-capistrano-ruby193deps-centos.gemspec +19 -0
- metadata +69 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Takeshi KOMIYA
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# Rvm::Capistrano::Ruby193deps::Centos
|
2
|
+
|
3
|
+
Capistrano task to install build-dependencies of Ruby 1.9.3 for CentOS 5.x and 6.x
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'rvm-capistrano-ruby193deps-centos'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install rvm-capistrano-ruby193deps-centos
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
load rvm-capistrano-ruby193deps-centos in your config/deploy.rb:
|
22
|
+
|
23
|
+
require 'rvm-capistrano-ruby193deps-centos'
|
24
|
+
|
25
|
+
And then, rvm-capistrano-ruby193deps-centos runs before rvm:install_ruby task,
|
26
|
+
and install build-dependencies of ruby1.9.3.
|
27
|
+
|
28
|
+
So, you can install ruby 1.9.3 with very simple configuration:
|
29
|
+
|
30
|
+
require 'rvm-capistrano'
|
31
|
+
require 'rvm-capistrano-ruby193deps-centos'
|
32
|
+
set :rvm_ruby_string , "ruby-1.9.3-p374@#{application}"
|
33
|
+
before 'deploy:setup', 'rvm:install_rvm'
|
34
|
+
before 'deploy:setup', 'rvm:install_ruby'
|
35
|
+
|
36
|
+
## Contributing
|
37
|
+
|
38
|
+
1. Fork it
|
39
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
40
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
41
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
42
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
require "rvm-capistrano-ruby193deps-centos/version"
|
2
|
+
require "capistrano-platform-recognizer"
|
3
|
+
|
4
|
+
|
5
|
+
Capistrano::Configuration.instance.load do
|
6
|
+
namespace :rvm do
|
7
|
+
namespace :ruby193deps do
|
8
|
+
namespace :centos do
|
9
|
+
desc "Install build dpendencies of Ruby"
|
10
|
+
task :install do
|
11
|
+
pkgs = %w(gcc-c++ git patch readline readline-devel zlib zlib-devel libyaml-devel libxml2-devel libxslt-devel
|
12
|
+
libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel)
|
13
|
+
run "#{sudo} yum -y install #{pkgs.join(" ")}", :shell => 'bash'
|
14
|
+
end
|
15
|
+
before 'rvm:install_ruby', 'rvm:ruby193deps:centos:install'
|
16
|
+
|
17
|
+
namespace :centos5 do
|
18
|
+
task(:install_i386,
|
19
|
+
:only => {:distro => :centos5, :arch => :i386},
|
20
|
+
:except => { :no_release => true },
|
21
|
+
:on_no_matching_servers => :continue) do
|
22
|
+
install(:i386)
|
23
|
+
end
|
24
|
+
before 'rvm:install_ruby', 'rvm:ruby193deps:centos:centos5:install_i386'
|
25
|
+
|
26
|
+
task(:install_x86_64,
|
27
|
+
:only => {:distro => :centos5, :arch => :x86_64},
|
28
|
+
:except => { :no_release => true },
|
29
|
+
:on_no_matching_servers => :continue) do
|
30
|
+
install(:x86_64)
|
31
|
+
end
|
32
|
+
before 'rvm:install_ruby', 'rvm:ruby193deps:centos:centos5:install_x86_64'
|
33
|
+
|
34
|
+
def install(arch)
|
35
|
+
urls = %w(http://dl.fedoraproject.org/pub/epel/5/x86_64/perl-Error-0.17010-1.el5.noarch.rpm
|
36
|
+
http://dl.fedoraproject.org/pub/epel/5/x86_64/perl-Git-1.7.4.1-1.el5.x86_64.rpm
|
37
|
+
http://dl.fedoraproject.org/pub/epel/5/x86_64/git-1.7.4.1-1.el5.x86_64.rpm
|
38
|
+
http://dl.fedoraproject.org/pub/epel/5/x86_64/libffi-3.0.5-1.el5.x86_64.rpm
|
39
|
+
http://dl.fedoraproject.org/pub/epel/5/x86_64/libffi-devel-3.0.5-1.el5.x86_64.rpm
|
40
|
+
http://dl.fedoraproject.org/pub/epel/5/x86_64/libyaml-0.1.2-3.el5.x86_64.rpm
|
41
|
+
http://dl.fedoraproject.org/pub/epel/5/x86_64/libyaml-devel-0.1.2-3.el5.x86_64.rpm
|
42
|
+
http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/autoconf26x-2.63-4.ius.el5.noarch.rpm)
|
43
|
+
|
44
|
+
filenames = []
|
45
|
+
urls.each do |url|
|
46
|
+
url.gsub!('x86_64', arch.to_s)
|
47
|
+
filename = "/tmp/#{File.basename(url)}"
|
48
|
+
|
49
|
+
run "wget -O #{filename} #{url}", :shell => 'bash'
|
50
|
+
filenames << filename
|
51
|
+
end
|
52
|
+
|
53
|
+
run "#{sudo} rpm -ivh #{filenames.join(" ")} || true", :shell => 'bash'
|
54
|
+
run "rm #{filenames.join(" ")}", :shell => 'bash'
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
namespace :centos6 do
|
59
|
+
task(:install_i386,
|
60
|
+
:only => {:distro => :centos6, :arch => :i386},
|
61
|
+
:except => { :no_release => true },
|
62
|
+
:on_no_matching_servers => :continue) do
|
63
|
+
install(:i386)
|
64
|
+
end
|
65
|
+
before 'rvm:install_ruby', 'rvm:ruby193deps:centos:centos6:install_i386'
|
66
|
+
|
67
|
+
task(:install_x86_64,
|
68
|
+
:only => {:distro => :centos6, :arch => :x86_64},
|
69
|
+
:except => { :no_release => true },
|
70
|
+
:on_no_matching_servers => :continue) do
|
71
|
+
install(:x86_64)
|
72
|
+
end
|
73
|
+
before 'rvm:install_ruby', 'rvm:ruby193deps:centos:centos6:install_x86_64'
|
74
|
+
|
75
|
+
def install(arch)
|
76
|
+
urls = %w(http://dl.fedoraproject.org/pub/epel/6/x86_64/libyaml-0.1.3-1.el6.x86_64.rpm
|
77
|
+
http://dl.fedoraproject.org/pub/epel/6/x86_64/libyaml-devel-0.1.3-1.el6.x86_64.rpm)
|
78
|
+
|
79
|
+
filenames = []
|
80
|
+
urls.each do |url|
|
81
|
+
url.gsub!('x86_64', arch.to_s)
|
82
|
+
filename = "/tmp/#{File.basename(url)}"
|
83
|
+
|
84
|
+
run "wget -O #{filename} #{url}", :shell => 'bash'
|
85
|
+
filenames << filename
|
86
|
+
end
|
87
|
+
|
88
|
+
run "#{sudo} rpm -ivh #{filenames.join(" ")} || true", :shell => 'bash'
|
89
|
+
run "rm #{filenames.join(" ")}", :shell => 'bash'
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/rvm-capistrano-ruby193deps-centos/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Takeshi KOMIYA"]
|
6
|
+
gem.email = ["i.tkomiya@gmail.com"]
|
7
|
+
gem.description = %q{Capistrano task to install build-dependencies of Ruby 1.9.3}
|
8
|
+
gem.summary = %q{Capistrano task to install build-dependencies of Ruby 1.9.3}
|
9
|
+
gem.homepage = "https://github.com/tk0miya/rvm-capistrano-ruby193deps-centos"
|
10
|
+
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
+
gem.name = "rvm-capistrano-ruby193deps-centos"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = Rvm::Capistrano::Ruby193deps::Centos::VERSION
|
17
|
+
|
18
|
+
gem.add_dependency 'capistrano-platform-recognizer'
|
19
|
+
end
|
metadata
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rvm-capistrano-ruby193deps-centos
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Takeshi KOMIYA
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-04-21 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: capistrano-platform-recognizer
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
description: Capistrano task to install build-dependencies of Ruby 1.9.3
|
31
|
+
email:
|
32
|
+
- i.tkomiya@gmail.com
|
33
|
+
executables: []
|
34
|
+
extensions: []
|
35
|
+
extra_rdoc_files: []
|
36
|
+
files:
|
37
|
+
- .gitignore
|
38
|
+
- Gemfile
|
39
|
+
- LICENSE
|
40
|
+
- README.md
|
41
|
+
- Rakefile
|
42
|
+
- lib/rvm-capistrano-ruby193deps-centos.rb
|
43
|
+
- lib/rvm-capistrano-ruby193deps-centos/version.rb
|
44
|
+
- rvm-capistrano-ruby193deps-centos.gemspec
|
45
|
+
homepage: https://github.com/tk0miya/rvm-capistrano-ruby193deps-centos
|
46
|
+
licenses: []
|
47
|
+
post_install_message:
|
48
|
+
rdoc_options: []
|
49
|
+
require_paths:
|
50
|
+
- lib
|
51
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ! '>='
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
requirements: []
|
64
|
+
rubyforge_project:
|
65
|
+
rubygems_version: 1.8.24
|
66
|
+
signing_key:
|
67
|
+
specification_version: 3
|
68
|
+
summary: Capistrano task to install build-dependencies of Ruby 1.9.3
|
69
|
+
test_files: []
|