prebundle 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/add-gem-package-info.md +19 -0
- data/Gemfile.lock +2 -0
- data/README.md +22 -17
- data/lib/prebundle/cli.rb +36 -14
- data/lib/prebundle/version.rb +1 -1
- data/prebundle.gemspec +1 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a7b3fc3d5cf7c4774f064363b9df80d6aa9b95f985463f23d8e2ae44f6a6ae0
|
4
|
+
data.tar.gz: ebfbefc554cfdb394d0a3e7c168f0875c9742e3bc802aa047876adbdc0397319
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f10f247c161e7216163ae4690cded8b5253e93bd985929af03b24b8dd21b88c6ad36dbac26865cbb2f3deb205be660b173c51b420b8107fe5bfd67677a78c04f
|
7
|
+
data.tar.gz: f28465c018b5fa9bb164ab95951544464b4aed85ecc769c942459c893d2af596794efc950ea5fa80dfac954ccdcbd4e9d79ca710e2bf41fc585fa5ec0ed9e990
|
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
name: add gem-package-info
|
3
|
+
about: Which gem requires which package on which os?
|
4
|
+
title: "[add]"
|
5
|
+
labels: ''
|
6
|
+
assignees: kuboon
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Which os/distribution?**
|
11
|
+
paste the result of `lsb_release -sd`
|
12
|
+
|
13
|
+
**Which gem has error on install?**
|
14
|
+
mysql2, etc.
|
15
|
+
|
16
|
+
**Which command solved the error? Or what the error messages you can't solve yet?**
|
17
|
+
|
18
|
+
**Additional context**
|
19
|
+
Add any other context or screenshots about the feature request here.
|
data/Gemfile.lock
CHANGED
@@ -37,6 +37,7 @@ 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)
|
40
41
|
gherkin (5.1.0)
|
41
42
|
multi_json (1.13.1)
|
42
43
|
multi_test (0.1.2)
|
@@ -63,6 +64,7 @@ DEPENDENCIES
|
|
63
64
|
aruba
|
64
65
|
bundler (~> 1.17)
|
65
66
|
cucumber
|
67
|
+
gem-release
|
66
68
|
prebundle!
|
67
69
|
rake (~> 10.0)
|
68
70
|
rspec (~> 3.0)
|
data/README.md
CHANGED
@@ -1,38 +1,43 @@
|
|
1
1
|
# Prebundle
|
2
2
|
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/prebundle`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
3
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
|
-
|
7
|
+
Run this line on your shell:
|
10
8
|
|
11
|
-
```
|
12
|
-
gem
|
9
|
+
```sh
|
10
|
+
gem install prebundle
|
13
11
|
```
|
14
12
|
|
15
|
-
|
16
|
-
|
17
|
-
$ bundle
|
13
|
+
## Usage
|
18
14
|
|
19
|
-
|
15
|
+
prebundle is a CLI tool.
|
20
16
|
|
21
|
-
|
17
|
+
Execute at the same directory of Gemfile like this:
|
22
18
|
|
23
|
-
|
19
|
+
$ prebundle all
|
24
20
|
|
25
|
-
|
21
|
+
Or specify gem name:
|
26
22
|
|
27
|
-
|
23
|
+
$ prebundle gem mysql2
|
28
24
|
|
29
|
-
|
25
|
+
Both simply shows shell command and do nothing (for security reason).
|
26
|
+
After checking the output, you pipe to sh like this:
|
30
27
|
|
31
|
-
|
28
|
+
$ prebundle all | sudo sh
|
32
29
|
|
33
30
|
## Contributing
|
34
31
|
|
35
|
-
|
32
|
+
If your problem did not solved by prebundle, please [create new issue](https://github.com/kuboon/prebundle/issues/new?assignees=kuboon&labels=&template=add-gem-package-info.md&title=[add]).
|
33
|
+
|
34
|
+
Other bug reports and pull requests are welcome on GitHub at https://github.com/kuboon/prebundle. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
35
|
+
|
36
|
+
## Development
|
37
|
+
|
38
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
39
|
+
|
40
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
36
41
|
|
37
42
|
## License
|
38
43
|
|
@@ -40,4 +45,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
40
45
|
|
41
46
|
## Code of Conduct
|
42
47
|
|
43
|
-
Everyone interacting in the Prebundle project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
48
|
+
Everyone interacting in the Prebundle project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/kuboon/prebundle/blob/master/CODE_OF_CONDUCT.md).
|
data/lib/prebundle/cli.rb
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
require "thor"
|
2
|
-
|
2
|
+
|
3
|
+
|
4
|
+
class Linux; end
|
5
|
+
class Ubuntu < Linux
|
3
6
|
def initialize(gems)
|
4
7
|
@gems = gems
|
5
8
|
end
|
@@ -7,6 +10,7 @@ class Ubuntu
|
|
7
10
|
def packages
|
8
11
|
@gems.map do |gem|
|
9
12
|
case gem
|
13
|
+
when 'curses'; "libncursesw5-dev"
|
10
14
|
when 'mysql2'; "libmysqlclient-dev"
|
11
15
|
end
|
12
16
|
end.flatten.uniq
|
@@ -17,21 +21,39 @@ class Ubuntu
|
|
17
21
|
end
|
18
22
|
end
|
19
23
|
|
24
|
+
class CentOS < Linux; end
|
25
|
+
class AmazonLinux < CentOS
|
26
|
+
#yum install mysql-devel
|
27
|
+
end
|
28
|
+
|
29
|
+
|
20
30
|
module Prebundle
|
31
|
+
def self.distribution_class(hint = `lsb_release -sd`)
|
32
|
+
case hint
|
33
|
+
when /\AUbuntu/; Ubuntu
|
34
|
+
else raise "Unknown distribution"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.list_all_gems_in_Gemfile
|
39
|
+
%w[mysql2 curses]
|
40
|
+
end
|
41
|
+
|
21
42
|
class CLI < Thor
|
22
|
-
desc "
|
23
|
-
def
|
24
|
-
|
25
|
-
|
26
|
-
gems
|
27
|
-
|
28
|
-
#
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
puts
|
34
|
-
puts "# prebundle
|
43
|
+
desc "all", "Reads Gemfile on current dir and outputs required setup commands."
|
44
|
+
def all
|
45
|
+
gems = ::Prebundle::list_all_gems_in_Gemfile
|
46
|
+
|
47
|
+
puts Prebundle::distribution_class.new(gems).command
|
48
|
+
puts "# prebundle all | sudo sh"
|
49
|
+
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]"
|
50
|
+
end
|
51
|
+
|
52
|
+
desc "gem [gemname]", "outputs required setup commands for the gem"
|
53
|
+
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]"
|
35
57
|
end
|
36
58
|
end
|
37
59
|
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.1.
|
4
|
+
version: 0.1.1
|
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: 2020-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -94,6 +94,20 @@ 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'
|
97
111
|
description: 'I will output required actions like "yum install hogehoge", "apt install
|
98
112
|
fugafuga" etc '
|
99
113
|
email:
|
@@ -103,6 +117,7 @@ executables:
|
|
103
117
|
extensions: []
|
104
118
|
extra_rdoc_files: []
|
105
119
|
files:
|
120
|
+
- ".github/ISSUE_TEMPLATE/add-gem-package-info.md"
|
106
121
|
- ".gitignore"
|
107
122
|
- ".rspec"
|
108
123
|
- ".travis.yml"
|