tirofinale 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +15 -24
- data/exe/tirofinale +22 -5
- data/lib/tirofinale/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98d14d0be1c92b1fa1526826f64265c88951c343
|
4
|
+
data.tar.gz: 3cc0324fd9efd9cf8c7df8ff1affd354bb3f955f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e1b4d508aa151a593ba3702c54b0b613cd5470375a2b0583c80d0129da80b38daf37834cbf0840cb9c775b7f5b18329b6b86345386ae8efa9531fea0d4ccae6
|
7
|
+
data.tar.gz: 16cd87cad22b39a0c9f12bb09af850555003471ba8e2d7d6f53792709ae58f32900a771fa051254732f15ebecf7863f2d2848d4933edeb61df18e90d7c431976
|
data/README.md
CHANGED
@@ -1,39 +1,30 @@
|
|
1
1
|
# Tirofinale
|
2
2
|
|
3
|
-
|
3
|
+
'Tiro finale!' to build ruby native extension.
|
4
4
|
|
5
|
-
|
5
|
+
This is experimental gem and not work fine yet for any enviroment and gem.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
gem 'tirofinale'
|
13
|
-
```
|
14
|
-
|
15
|
-
And then execute:
|
16
|
-
|
17
|
-
$ bundle
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
$ gem install tirofinale
|
9
|
+
~~~~
|
10
|
+
# gem install tirofinale
|
11
|
+
~~~~
|
22
12
|
|
23
13
|
## Usage
|
24
14
|
|
25
|
-
|
26
|
-
|
27
|
-
## Development
|
28
|
-
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
-
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
15
|
+
On Alpine Linux v3.4 only.
|
32
16
|
|
33
|
-
|
17
|
+
Show packages which is required to build `nokogiri` gem.
|
34
18
|
|
35
|
-
|
19
|
+
~~~~
|
20
|
+
$ tirofinale nokogiri
|
21
|
+
ruby-dev libxml2-dev libxslt-dev
|
22
|
+
~~~~
|
23
|
+
You can install packages by `apk` following line.
|
36
24
|
|
25
|
+
~~~~
|
26
|
+
# apk add `tirofinale nokogiri`
|
27
|
+
~~~~
|
37
28
|
|
38
29
|
## License
|
39
30
|
|
data/exe/tirofinale
CHANGED
@@ -1,14 +1,31 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
2
|
+
#
|
3
3
|
require 'open-uri'
|
4
4
|
|
5
|
-
|
5
|
+
def detect_version_alpine
|
6
|
+
content = open('/etc/alpine-release'){|f| f.read }
|
7
|
+
major_minor = content.match(/\A(\d\.\d)/)
|
8
|
+
major_minor ? major_minor[1] : nil
|
9
|
+
end
|
6
10
|
|
7
|
-
|
11
|
+
def search_apkbuild(gem_name, alpine_version)
|
12
|
+
dir_list = ['community', 'main', 'non-free', 'testing', 'unmaintained']
|
13
|
+
dir_list.each{|dir_name|
|
14
|
+
apkbuild_url = "http://git.alpinelinux.org/cgit/aports/plain/#{dir_name}/ruby-#{gem_name}/APKBUILD?h=#{alpine_version + '-stable'}"
|
15
|
+
begin
|
16
|
+
return open(apkbuild_url){|f| f.read}
|
17
|
+
rescue OpenURI::HTTPError => e
|
18
|
+
next
|
19
|
+
end
|
20
|
+
}
|
21
|
+
false
|
22
|
+
end
|
23
|
+
|
24
|
+
gem_name = ARGV[0]
|
8
25
|
|
9
|
-
|
26
|
+
alpine_version = detect_version_alpine()
|
10
27
|
|
11
|
-
apkbuild =
|
28
|
+
apkbuild = search_apkbuild(gem_name, alpine_version)
|
12
29
|
|
13
30
|
makedepends = apkbuild.match(/^makedepends="(.*?)"/).to_a[1].strip.split(' ')
|
14
31
|
|
data/lib/tirofinale/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tirofinale
|
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
|
- xmisao
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|