Permalink
Browse files

Improve environments

  • Loading branch information...
1 parent d38da95 commit 993e06488189adc90b93504cccd09343e3474852 @kachick committed Mar 31, 2013
Showing with 165 additions and 67 deletions.
  1. +37 −0 .gitignore
  2. +17 −0 .travis.yml
  3. +11 −0 Gemfile
  4. +0 −5 History.rdoc
  5. +0 −7 Manifest.txt
  6. +50 −0 README.md
  7. +0 −35 README.rdoc
  8. +8 −20 Rakefile
  9. 0 LICENSE → WTFPL-LICENSE
  10. +21 −0 aprilfool.gemspec
  11. +17 −0 spec/aprilfool_spec.rb
  12. +4 −0 spec/helper.rb
View
@@ -0,0 +1,37 @@
+*.gem
+*.rbc
+.bundle
+.config
+.ruby-version
+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
+*.bak
+tool/
+*\#*
+.rbx/
View
@@ -0,0 +1,17 @@
+language: ruby
+rvm:
+ - ruby-head
+ - 2.0.0
+ - 1.9.3
+ - 1.9.2
+ - rbx-19mode
+ - jruby-head
+ - jruby-19mode
+matrix:
+ allow_failures:
+ - rvm: ruby-head
+ - rvm: rbx-19mode
+ - rvm: jruby-head
+ - rvm: jruby-19mode
+before_install:
+ - gem install bundler
View
11 Gemfile
@@ -0,0 +1,11 @@
+source 'https://rubygems.org'
+
+gemspec
+
+group :development do
+ gem 'rake'
+end
+
+group :test do
+ gem 'rake'
+end
View
@@ -1,5 +0,0 @@
-=== 0.0.1 2012-04-01
-
-* 1 major enhancement:
- * Initial release
-
View
@@ -1,7 +0,0 @@
-README.rdoc
-LICENSE
-History.rdoc
-Manifest.txt
-Rakefile
-example.rb
-lib/aprilfool.rb
View
@@ -0,0 +1,50 @@
+aprilfool
+=============
+
+[![Build Status](https://secure.travis-ci.org/kachick/aprilfool.png)](http://travis-ci.org/kachick/aprilfool)
+[![Gem Version](https://badge.fury.io/rb/aprilfool.png)](http://badge.fury.io/rb/aprilfool)
+
+Description
+-----------
+
+A joke gem
+
+Features
+--------
+
+* :)
+
+Usage
+-----
+
+```ruby
+require 'aprilfool'
+
+p foobar
+```
+
+Requirements
+-------------
+
+* [Ruby 1.9.2 or later](http://travis-ci.org/#!/kachick/aprilfool)
+
+Install
+-------
+
+```bash
+$ gem install aprilfool
+```
+
+Link
+----
+
+* [code](https://github.com/kachick/aprilfool)
+* [issues](https://github.com/kachick/aprilfool/issues)
+* [CI](http://travis-ci.org/#!/kachick/aprilfool)
+* [gem](https://rubygems.org/gems/aprilfool)
+
+License
+--------
+
+WTFPL v2
+See WTFPL-LICENSE for further details
View
@@ -1,35 +0,0 @@
-= April Fool
-
-* http://github.com/kachick/aprilfool
-* http://rubygems.org/gems/aprilfool
-
-== Description
-
-A joke gem.
-
-== Usage
-
-* setup
- require 'aprilfool'
-
-* see
- p SOMETHING
-
-== Requirements
-
-* Ruby
-
- target release versions
-
- * 1.9.3-p125
- * 1.9.2-p290
-
-== Installation
-
-* gem install aprilfool
-
-== License
-
-Copyright (C) 2012 Kenichi Kamiya
-
-WTFPL (See the file LICENSE)
View
@@ -1,23 +1,11 @@
-require 'rubygems'
-gem 'hoe', '~> 3.0.1'
-require 'hoe'
-require 'fileutils'
+#!/usr/bin/env rake
+require 'bundler/gem_tasks'
-Hoe.plugin :newgem
-# Hoe.plugin :website
-# Hoe.plugin :cucumberfeatures
+require 'rspec/core/rake_task'
-# Generate all the Rake tasks
-# Run 'rake -T' to see list of generated tasks (from gem root directory)
-$hoe = Hoe.spec 'aprilfool' do
- developer 'Kenichi Kamiya', 'kachick1+ruby@gmail.com'
- self.rubyforge_name = self.name
- dependency 'yard', '~> 0.7.5', :development
-end
+task default: [:spec]
-require 'newgem/tasks'
-Dir['tasks/**/*.rake'].each { |t| load t }
-
-# TODO - want other tests/tasks run by default? Add them to the list
-# remove_task :default
-# task :default => [:spec, :features]
+RSpec::Core::RakeTask.new(:spec) do |t|
+ t.pattern = 'spec/**/*_spec.rb'
+ t.ruby_opts = %w[-w]
+end
File renamed without changes.
View
@@ -0,0 +1,21 @@
+Gem::Specification.new do |gem|
+ gem.authors = ['Kenichi Kamiya']
+ gem.email = ['kachick1+ruby@gmail.com']
+ gem.description = %q{A joke gem.}
+ gem.summary = gem.description.dup
+ gem.homepage = 'https://github.com/kachick/aprilfool'
+
+ 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)/})
+ gem.name = 'aprilfool'
+ gem.require_paths = ['lib']
+ gem.version = '0.0.1.1'
+
+ gem.required_ruby_version = '>= 1.9.2'
+
+ gem.add_development_dependency 'yard', '>= 0.8.5.2', '< 2'
+ gem.add_development_dependency 'rspec', '>= 2.13', '< 3'
+ gem.add_development_dependency 'rake', '>= 10', '< 20'
+ gem.add_development_dependency 'bundler', '>= 1.3.0', '< 2'
+end
View
@@ -0,0 +1,17 @@
+require_relative 'helper'
+
+describe "aprilfool" do
+ context Time do
+ context "#aprilfool" do
+ it "returns true when the current date is 4/1" do
+ expect(Time.local(2013, 4, 1).aprilfool?).to equal(true)
+ end
+
+ it "returns false when the current date is not 4/1" do
+ expect(Time.local(2013, 3, 31).aprilfool?).to equal(false)
+ expect(Time.local(2013, 4, 2).aprilfool?).to equal(false)
+ expect(Time.local(2013, 5, 1).aprilfool?).to equal(false)
+ end
+ end
+ end
+end
View
@@ -0,0 +1,4 @@
+require 'rspec'
+require 'stringio'
+
+require_relative '../lib/aprilfool'

0 comments on commit 993e064

Please sign in to comment.