prebundle 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +0 -2
- data/lib/prebundle/cli.rb +21 -7
- data/lib/prebundle/version.rb +1 -1
- data/prebundle.gemspec +0 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b57ae1225f0ff3c8436ed38fce0d6224287c5ce1fbd73c4fbce5194d12e88ac
|
4
|
+
data.tar.gz: ddc7d36e6d2f1b7b3f2a36c4f4342148eed6b6c538cf9b1e4ebd2f3833280a1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32db874b2832f5877faeee5e1ce46253da098c39ce181b7a652f5b0ca4be6f321403f9e80ac4951cd9db60311c261030e518663da5ccaca0bbc4a8364f47d851
|
7
|
+
data.tar.gz: fd7596a1a8a9a525b9766afa290fe43536c360a24535d7cda659e7c18d7bdc58022034f003b9c7bc9f35af15d7e89cd8bd9512813ab46f237766266633a1221a
|
data/Gemfile.lock
CHANGED
@@ -37,7 +37,6 @@ GEM
|
|
37
37
|
cucumber-wire (0.0.1)
|
38
38
|
diff-lcs (1.3)
|
39
39
|
ffi (1.10.0)
|
40
|
-
gem-release (2.1.1)
|
41
40
|
gherkin (5.1.0)
|
42
41
|
multi_json (1.13.1)
|
43
42
|
multi_test (0.1.2)
|
@@ -64,7 +63,6 @@ DEPENDENCIES
|
|
64
63
|
aruba
|
65
64
|
bundler (~> 1.17)
|
66
65
|
cucumber
|
67
|
-
gem-release
|
68
66
|
prebundle!
|
69
67
|
rake (~> 10.0)
|
70
68
|
rspec (~> 3.0)
|
data/lib/prebundle/cli.rb
CHANGED
@@ -1,17 +1,19 @@
|
|
1
1
|
require "thor"
|
2
2
|
|
3
3
|
|
4
|
-
class
|
5
|
-
class Ubuntu < Linux
|
4
|
+
class OS
|
6
5
|
def initialize(gems)
|
7
6
|
@gems = gems
|
8
7
|
end
|
8
|
+
end
|
9
9
|
|
10
|
+
class Linux < OS; end
|
11
|
+
class Ubuntu < Linux
|
10
12
|
def packages
|
11
13
|
@gems.map do |gem|
|
12
14
|
case gem
|
13
|
-
when 'curses'; "libncursesw5-dev"
|
14
15
|
when 'mysql2'; "libmysqlclient-dev"
|
16
|
+
when 'nokogiri'; %w[build-essential patch ruby-dev zlib1g-dev liblzma-dev]
|
15
17
|
end
|
16
18
|
end.flatten.uniq
|
17
19
|
end
|
@@ -26,6 +28,21 @@ class AmazonLinux < CentOS
|
|
26
28
|
#yum install mysql-devel
|
27
29
|
end
|
28
30
|
|
31
|
+
class BSD < OS; end
|
32
|
+
class OpenBSD < BSD
|
33
|
+
def packages
|
34
|
+
@gems.map do |gem|
|
35
|
+
case gem
|
36
|
+
when 'nokogiri'; 'gcc' # OpenBSD<6.2
|
37
|
+
end
|
38
|
+
end.flatten.uniq
|
39
|
+
end
|
40
|
+
def command
|
41
|
+
"pkg_add -v #{packages.join(' ')}"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
|
29
46
|
|
30
47
|
module Prebundle
|
31
48
|
def self.distribution_class(hint = `lsb_release -sd`)
|
@@ -36,7 +53,7 @@ module Prebundle
|
|
36
53
|
end
|
37
54
|
|
38
55
|
def self.list_all_gems_in_Gemfile
|
39
|
-
|
56
|
+
["mysql2"]
|
40
57
|
end
|
41
58
|
|
42
59
|
class CLI < Thor
|
@@ -51,9 +68,6 @@ module Prebundle
|
|
51
68
|
|
52
69
|
desc "gem [gemname]", "outputs required setup commands for the gem"
|
53
70
|
def gem(gemname)
|
54
|
-
puts Prebundle::distribution_class.new([gemname]).command
|
55
|
-
puts "# prebundle gem #{gemname} | sudo sh"
|
56
|
-
STDERR.puts "# Unless it helped you, please report the issue https://github.com/kuboon/prebundle/issues/new?assignees=kuboon&labels=&template=add-gem-package-info.md&title=[add]"
|
57
71
|
end
|
58
72
|
end
|
59
73
|
end
|
data/lib/prebundle/version.rb
CHANGED
data/prebundle.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prebundle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kuboon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -94,20 +94,6 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: gem-release
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
97
|
description: 'I will output required actions like "yum install hogehoge", "apt install
|
112
98
|
fugafuga" etc '
|
113
99
|
email:
|