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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14ab6cbc7e52cee5aef0da19345109cc3813074b
4
- data.tar.gz: 80a2b8276d71363bcf2d6afb58ade5292d8761fb
3
+ metadata.gz: 98d14d0be1c92b1fa1526826f64265c88951c343
4
+ data.tar.gz: 3cc0324fd9efd9cf8c7df8ff1affd354bb3f955f
5
5
  SHA512:
6
- metadata.gz: 8247f4b7843ecd799040301f44dc9237fe14b05df0e78b09b46731494a51847c285b8ae87f67dad2d91f1846ba707e9c896ace8def9d85309e5cee534c87296e
7
- data.tar.gz: 81c596dae34a0bd523e5ec69c13bbcbd3b20c6cac29b793187c68cdf168abc67b9c7fa7151b7303bea67244070b032694c3da530d0d1130b0d3b6a88e3a63fd3
6
+ metadata.gz: 8e1b4d508aa151a593ba3702c54b0b613cd5470375a2b0583c80d0129da80b38daf37834cbf0840cb9c775b7f5b18329b6b86345386ae8efa9531fea0d4ccae6
7
+ data.tar.gz: 16cd87cad22b39a0c9f12bb09af850555003471ba8e2d7d6f53792709ae58f32900a771fa051254732f15ebecf7863f2d2848d4933edeb61df18e90d7c431976
data/README.md CHANGED
@@ -1,39 +1,30 @@
1
1
  # Tirofinale
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/tirofinale`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ 'Tiro finale!' to build ruby native extension.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ This is experimental gem and not work fine yet for any enviroment and gem.
6
6
 
7
7
  ## Installation
8
8
 
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
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
- TODO: Write usage instructions here
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
- ## Contributing
17
+ Show packages which is required to build `nokogiri` gem.
34
18
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/tirofinale. 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.
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
- gem_name = ARGV[0]
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
- alpine_version = "3.4-stable"
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
- apkbuild_url = "http://git.alpinelinux.org/cgit/aports/plain/unmaintained/ruby-#{gem_name}/APKBUILD?h=#{alpine_version}"
26
+ alpine_version = detect_version_alpine()
10
27
 
11
- apkbuild = open(apkbuild_url){|f| f.read}
28
+ apkbuild = search_apkbuild(gem_name, alpine_version)
12
29
 
13
30
  makedepends = apkbuild.match(/^makedepends="(.*?)"/).to_a[1].strip.split(' ')
14
31
 
@@ -1,3 +1,3 @@
1
1
  module Tirofinale
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-06-21 00:00:00.000000000 Z
11
+ date: 2016-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler