Browse files

modify for bundler & travis-ci

  • Loading branch information...
1 parent 2ee322a commit c519e2b48801d7f7dc830c6bb857b5bc25f40e62 @kachick committed Aug 21, 2012
Showing with 101 additions and 27 deletions.
  1. +31 −0 .gitignore
  2. +8 −0 .travis.yml
  3. +12 −0 Gemfile
  4. +21 −16 README.rdoc
  5. +7 −11 Rakefile
  6. +22 −0 instancevalue.gemspec
View
31 .gitignore
@@ -1 +1,32 @@
+*.gem
+*.rbc
+.bundle
+.config
+coverage
+coverage.data
+InstalledFiles
+lib/bundler/man
+pkg
+rdoc
+spec/reports
+test/tmp
+test/version_tmp
+tmp
+
+# bundler
+vendor/
+
+# YARD artifacts
+.yardoc
+_yardoc
+doc/
+
+# tmp-old
+.old
+
+# editor
*~
+.redcar
+
+# other
+*.lock
View
8 .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
View
12 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
View
37 README.rdoc
@@ -1,22 +1,21 @@
-= Instance Value
+= instancevalue
-* http://github.com/kachick/instancevalue
-* http://rubygems.org/gems/instancevalue
-* http://rubyforge.org/projects/instancevalue
+{<img src="https://secure.travis-ci.org/kachick/instancevalue.png" />}[http://travis-ci.org/kachick/instancevalue]
== Description
Set constant values for each instance.
== Usage
-* setup
+* Setup
require 'instancevalue'
-* overview
+* Overview
class Person
+
include InstanceValue
value_reader :birthday
@@ -28,14 +27,15 @@ Set constant values for each instance.
def age
(Time.now - birthday) / (60 * 60 * 24 * 365)
end
+
end
person = Person.new Time.at YOUR_BIRTHDAY
person.birthday #=> YOUR_BIRTHDAY
person.age #=> age at runtime
person.instance_eval{val :birthday, Time.now} #=> Exception
-* It has instance_variable like API:
+* It has instance_variable like API
* .value_reader
* #instance_value_defined?
@@ -44,25 +44,30 @@ Set constant values for each instance.
* #instance_values
* #remove_instance_value
-* Aliased shortname:
+* Aliased shortname
* #val
== Requirements
* Ruby 1.9.2 or later
-
- target release versions
-
- * 1.9.3-p125
- * 1.9.2-p290
== Installation
-* gem install instancevalue
+ gem install instancevalue
+
+== Links
+
+code :: https://github.com/kachick/instancevalue
+issues :: https://github.com/kachick/instancevalue/issues
+CI :: http://travis-ci.org/#!/kachick/instancevalue
+gem :: https://rubygems.org/gems/instancevalue
+gem+ :: http://metagem.info/gems/instancevalue
== License
-Copyright (C) 2012 Kenichi Kamiya
+The MIT X License
+
+Copyright (c) 2012 Kenichi Kamiya
-The MIT/X11 License (See the file LICENSE)
+See the file LICENSE for further details.
View
18 Rakefile
@@ -1,15 +1,11 @@
-gem 'hoe', '~> 3.0.3'
-require 'hoe'
-require 'fileutils'
+#!/usr/bin/env rake
+require 'bundler/gem_tasks'
-Hoe.plugin :newgem
+require 'rake/testtask'
-$hoe = Hoe.spec 'instancevalue' do
- developer 'Kenichi Kamiya', 'kachick1+ruby@gmail.com'
- self.rubyforge_name = name
- require_ruby_version '>= 1.9.2'
- dependency 'yard', '~> 0.7.5', :development
+task default: [:test]
+
+Rake::TestTask.new do |tt|
+ tt.verbose = true
end
-require 'newgem/tasks'
-Dir['tasks/**/*.rake'].each { |t| load t }
View
22 instancevalue.gemspec
@@ -0,0 +1,22 @@
+# I don't know why dose occur errors below.
+# require_relative 'lib/instancevalue/version'
+require File.expand_path('../lib/instancevalue/version', __FILE__)
+
+Gem::Specification.new do |gem|
+ gem.authors = ['Kenichi Kamiya']
+ gem.email = ['kachick1+ruby@gmail.com']
+ gem.description = %q{Set constant values for each instance.}
+ gem.summary = %q{Set constant values for each instance.}
+ gem.homepage = 'https://github.com/kachick/instancevalue'
+
+ 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 = 'instancevalue'
+ gem.require_paths = ['lib']
+ gem.version = InstanceValue::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
+

0 comments on commit c519e2b

Please sign in to comment.