Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
modify for bundle & travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Aug 21, 2012
1 parent aa35e4f commit 7f342a3
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 25 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Expand Up @@ -13,6 +13,9 @@ test/tmp
test/version_tmp
tmp

# bundler
vendor/

# YARD artifacts
.yardoc
_yardoc
Expand All @@ -24,3 +27,6 @@ doc/
# editor
*~
.redcar

# other
*.lock
8 changes: 8 additions & 0 deletions .travis.yml
@@ -0,0 +1,8 @@
language: ruby
rvm:
- ruby-head
- 1.9.3
- 1.9.2
- jruby-head
- jruby-19mode # JRuby in 1.9 mode
- rbx-19mode # Rubinius in 1.9 mode
12 changes: 12 additions & 0 deletions Gemfile
@@ -0,0 +1,12 @@
source 'https://rubygems.org'

gemspec

group :development do
gem 'rake'
gem 'yard', '>=0.8.2.1'
end

group :test do
gem 'rake'
end
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,4 +1,4 @@
(The MIT X11 License)
(The MIT X License)

Copyright (c) 2011 Kenichi Kamiya

Expand Down
4 changes: 3 additions & 1 deletion Manifest.txt
Expand Up @@ -3,8 +3,10 @@ LICENSE
History.rdoc
Manifest.txt
Rakefile
Gemfile
integer-base.gemspec
lib/integer/base.rb
lib/integer/base/singleton_class.rb
lib/integer/base/singletonclass.rb
lib/integer/base/standard_chars.rb
lib/integer/base/version.rb
lib/integer/base/ext.rb
Expand Down
30 changes: 20 additions & 10 deletions README.rdoc
@@ -1,11 +1,10 @@
= integer-base

code :: http://github.com/kachick/integer-base
gem :: http://rubygems.org/gems/integer-base
{<img src="https://secure.travis-ci.org/kachick/integer-base.png" />}[http://travis-ci.org/kachick/integer-base]

== Description

Own formats come into positional/unary numeral systems.
Original formats come into positional/unary numeral systems.

== Feautures

Expand All @@ -21,49 +20,60 @@ Own formats come into positional/unary numeral systems.
== Usage

* Setup

require 'integer/base'

* Basic

Integer::Base.parse '10', %w[0 1] #=> 2

* Extend Ruby's Interface

require 'integer/base/ext'

* to_i

'a'.to_i ['0', *'A'..'I'] #=> 1
'a0'.to_i ['0', *'A'..'I'] #=> 10
'aib'.to_i ['0', *'A'..'I'] #=> 192

* to_s

192.to_s ['0', *'A'..'I'] #=> 'aib'

* Already defined useful chars

'10'.to_i Integer::Base::STANDARD_CHARS[36].last #=> :Z
'10'.to_i Integer::Base::STANDARD_CHARS[:BINARY].last #=> :"1"

* Get own formats

'a'.to_i %w[0 a] #=> 1
'a0'.to_i %w[0 a] #=> 2

* Upper 36 basenumbers

'1!'.to_i([*Integer::Base::STANDARD_CHARS[36], '!']) #=> 73

== Requirements

* Ruby 1.9.2 or later

Focusing

* 1.9.3-p194
* 1.9.2-p290

== Installation

* gem install integer-base
gem install integer-base

== Links

code :: https://github.com/kachick/integer-base
issues :: https://github.com/kachick/integer-base/issues
CI :: http://travis-ci.org/#!/kachick/integer-base
gem :: https://rubygems.org/gems/integer-base
gem+ :: http://metagem.info/gems/integer-base

== License

The MIT X11 License
The MIT X License

Copyright (c) 2011 Kenichi Kamiya

Expand Down
19 changes: 7 additions & 12 deletions Rakefile
@@ -1,16 +1,11 @@
require 'rubygems'
gem 'hoe', '~> 3.0.6'
require 'hoe'
require 'fileutils'
#!/usr/bin/env rake
require 'bundler/gem_tasks'

Hoe.plugin :newgem
require 'rake/testtask'

$hoe = Hoe.spec 'integer-base' do
developer 'Kenichi Kamiya', 'kachick1+ruby@gmail.com'
self.rubyforge_name = name
require_ruby_version '>= 1.9.2'
dependency 'yard', '~> 0.8.1', :development
task default: [:test]

Rake::TestTask.new do |tt|
tt.verbose = true
end

require 'newgem/tasks'
Dir['tasks/**/*.rake'].each { |t| load t }
22 changes: 22 additions & 0 deletions integer-base.gemspec
@@ -0,0 +1,22 @@
# I don't know why dose occur errors below.
# require_relative 'lib/integer/base/version'
require File.expand_path('../lib/integer/base/version', __FILE__)

Gem::Specification.new do |gem|
gem.authors = ['Kenichi Kamiya']
gem.email = ['kachick1+ruby@gmail.com']
gem.description = %q{Original formats come into positional/unary numeral systems.}
gem.summary = %q{Original formats come into positional/unary numeral systems.}
gem.homepage = 'https://github.com/kachick/integer-base'

gem.files = `git ls-files`.split($\)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features|declare)/})
gem.name = 'integer-base'
gem.require_paths = ['lib']
gem.version = Integer::Base::VERSION.dup # dup for https://github.com/rubygems/rubygems/commit/48f1d869510dcd325d6566df7d0147a086905380#-P0

gem.required_ruby_version = '>=1.9.2'
gem.add_development_dependency 'yard', '>=0.8.2.1'
end

2 changes: 1 addition & 1 deletion lib/integer/base.rb
Expand Up @@ -13,5 +13,5 @@ class InvalidCharacter < TypeError; end
end

require_relative 'base/version'
require_relative 'base/singleton_class'
require_relative 'base/singletonclass'
require_relative 'base/standard_chars'
File renamed without changes.

0 comments on commit 7f342a3

Please sign in to comment.