serverkit-rbenv 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +9 -0
- data/lib/serverkit/rbenv/version.rb +1 -1
- data/lib/serverkit/rbenv.rb +1 -0
- data/lib/serverkit/resources/rbenv_dependent_packages.rb +95 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39add0e459763d84b5ccefc786b613f63b047bea
|
4
|
+
data.tar.gz: 641ad6126ee65e64ca453d4283ea366e7fae489e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2772e4dd9a97ed977e28273aceb08ee02c305f86a512b7104673520954a15acaccb4450c6e1b9350f8b59b81ba53863d36b9a3326999655b81d9a42b5223e12
|
7
|
+
data.tar.gz: 23af430bc153be2819788bee196cb874025d347628a15a2a43e35f399e1227afe371dc61b481f14ba2794d53ea2c28b98ef1c5936c6552ea61fd8e800c56ce0b
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
data/lib/serverkit/rbenv.rb
CHANGED
@@ -0,0 +1,95 @@
|
|
1
|
+
require "serverkit/resources/base"
|
2
|
+
|
3
|
+
module Serverkit
|
4
|
+
module Resources
|
5
|
+
class RbenvDependentPackages < Base
|
6
|
+
PACKAGE_NAMES_FOR_APT = %w[
|
7
|
+
autoconf
|
8
|
+
bison
|
9
|
+
build-essential
|
10
|
+
git
|
11
|
+
libffi-dev
|
12
|
+
libgdbm-dev
|
13
|
+
libgdbm3
|
14
|
+
libncurses5-dev
|
15
|
+
libreadline6-dev
|
16
|
+
libssl-dev
|
17
|
+
libyaml-dev
|
18
|
+
zlib1g-dev
|
19
|
+
]
|
20
|
+
|
21
|
+
PACKAGE_NAMES_FOR_PACMAN = %w[
|
22
|
+
base-devel
|
23
|
+
libffi
|
24
|
+
libyaml
|
25
|
+
openssl
|
26
|
+
zlib
|
27
|
+
]
|
28
|
+
|
29
|
+
PACKAGE_NAMES_FOR_YUM = %w[
|
30
|
+
gcc
|
31
|
+
gdbm-devel
|
32
|
+
git
|
33
|
+
libffi-devel
|
34
|
+
libyaml-devel
|
35
|
+
ncurses-devel
|
36
|
+
openssl-devel
|
37
|
+
readline-devel
|
38
|
+
zlib-devel
|
39
|
+
]
|
40
|
+
|
41
|
+
PACKAGE_NAMES_FOR_ZYPPER = %w[
|
42
|
+
automake
|
43
|
+
gcc
|
44
|
+
gdbm-devel
|
45
|
+
libffi-devel
|
46
|
+
libyaml-devel
|
47
|
+
ncurses-devel
|
48
|
+
openssl-devel
|
49
|
+
readline-devel
|
50
|
+
zlib-devel
|
51
|
+
]
|
52
|
+
|
53
|
+
# @note Override
|
54
|
+
def apply
|
55
|
+
packages.each(&:apply)
|
56
|
+
end
|
57
|
+
|
58
|
+
# @note Override
|
59
|
+
def check
|
60
|
+
packages.all?(&:check)
|
61
|
+
end
|
62
|
+
|
63
|
+
private
|
64
|
+
|
65
|
+
# @return [Array<Serverkit::Resources::Package>]
|
66
|
+
def packages
|
67
|
+
package_names.map do |package_name|
|
68
|
+
Serverkit::Resources::Package.new(@recipe, "name" => package_name).tap do |package|
|
69
|
+
package.backend = backend
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# @todo
|
75
|
+
# @return [Array<String>]
|
76
|
+
# @example ["gcc", "git", "gdbm-devel", ...]
|
77
|
+
def package_names
|
78
|
+
@package_names ||= begin
|
79
|
+
case get_command_from_identifier(:install_package, "dummy")
|
80
|
+
when /\bapt-get\b/
|
81
|
+
PACKAGE_NAMES_FOR_APT
|
82
|
+
when /\bpacman\b/
|
83
|
+
PACKAGE_NAMES_FOR_PACMAN
|
84
|
+
when /\byum\b/
|
85
|
+
PACKAGE_NAMES_FOR_YUM
|
86
|
+
when /\bzypper\b/
|
87
|
+
PACKAGE_NAMES_FOR_ZYPPER
|
88
|
+
else
|
89
|
+
[]
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverkit-rbenv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: serverkit
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- bin/setup
|
70
70
|
- lib/serverkit/rbenv.rb
|
71
71
|
- lib/serverkit/rbenv/version.rb
|
72
|
+
- lib/serverkit/resources/rbenv_dependent_packages.rb
|
72
73
|
- lib/serverkit/resources/rbenv_ruby.rb
|
73
74
|
- serverkit-rbenv.gemspec
|
74
75
|
homepage: https://github.com/r7kamura/serverkit-rbenv
|