Permalink
Browse files

Initial commit

  • Loading branch information...
0 parents commit 9db2bcfb3053d3aa84145c4f038de5b1696c81a2 @alindeman committed Mar 5, 2012
Showing with 147 additions and 0 deletions.
  1. +17 −0 .gitignore
  2. +4 −0 Gemfile
  3. +22 −0 LICENSE
  4. +74 −0 README.md
  5. +2 −0 Rakefile
  6. +5 −0 lib/zonebie.rb
  7. +3 −0 lib/zonebie/version.rb
  8. +20 −0 zonebie.gemspec
@@ -0,0 +1,17 @@
+*.gem
+*.rbc
+.bundle
+.config
+.yardoc
+Gemfile.lock
+InstalledFiles
+_yardoc
+coverage
+doc/
+lib/bundler/man
+pkg
+rdoc
+spec/reports
+test/tmp
+test/version_tmp
+tmp
@@ -0,0 +1,4 @@
+source 'https://rubygems.org'
+
+# Specify your gem's dependencies in zonebie.gemspec
+gemspec
@@ -0,0 +1,22 @@
+Copyright (c) 2012 Andy Lindeman
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,74 @@
+# Zonebie
+
+TODO: Travis-CI build image
+
+Zonebie prevents bugs in code that deals with timezones by randomly assigning a
+zone on every run.
+
+## Requirements
+
+Tests must run green against:
+
+* Ruby 1.8.7, 1.9.2, 1.9.3
+* JRuby 1.6 (1.8 and 1.9 mode)
+* Rubinius 1.2 and 2.0 (1.8 and 1.9 mode)
+
+A gem that adds timezone support; currently supported is:
+
+* `active_support` >= 2.3 (compatible with Rails 2.3, 3.0, 3.1, 3.2)
+
+OR
+
+* **Unimplemented** `tzinfo`
+
+## Installation
+
+If using Bundler (recommended), add to Gemfile:
+
+ gem 'zonebie'
+
+### Test::Unit & Minitest
+
+**Unimplemented**
+
+Add to `test/test_helper.rb`:
+
+ Zonebie.assign_random_timezone
+
+### RSpec
+
+**Unimplemented**
+
+Add to `spec/spec_helper.rb` after `require "rspec"` or `require "rspec/rails"`:
+
+ require "zonebie/rspec"
+
+### Cucumber
+
+**Unimplemented**
+
+Add to `features/support/env.rb` after `require "cucumber"` or `require "cucumber/rails"`:
+
+ require "zonebie/cucumber"
+
+## Usage
+
+When `Zonebie.assign_random_timezone` is called (if using RSpec or Cucumber,
+this call is automatically setup for you), Zonebie assigns a timezone and
+prints a message to STDOUT:
+
+ [Zonebie] Setting timezone to "Eastern Time (US & Pacific)"
+
+To rerun tests with a specific timezone (e.g., to reproduce a bug that only
+seems present in one zone), set the `ZONE` environment variable:
+
+ # Assuming tests run with simply `rake`
+ ZONE="Eastern Time (US & Pacific)" rake
+
+## Contributing
+
+1. Fork it
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Added some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create new Pull Request
@@ -0,0 +1,2 @@
+#!/usr/bin/env rake
+require "bundler/gem_tasks"
@@ -0,0 +1,5 @@
+require "zonebie/version"
+
+module Zonebie
+ # Your code goes here...
+end
@@ -0,0 +1,3 @@
+module Zonebie
+ VERSION = "0.0.1"
+end
@@ -0,0 +1,20 @@
+# -*- encoding: utf-8 -*-
+require File.expand_path('../lib/zonebie/version', __FILE__)
+
+Gem::Specification.new do |gem|
+ gem.authors = ["Andy Lindeman"]
+ gem.email = ["alindeman@gmail.com"]
+ gem.description = %q{Runs your tests in a random timezone}
+ gem.summary = %q{Zonebie prevents bugs in code that deals with timezones by randomly assigning a zone on every run}
+ gem.homepage = "https://github.com/highgroove/zonebie"
+
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ gem.files = `git ls-files`.split("\n")
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ gem.name = "zonebie"
+ gem.require_paths = ["lib"]
+ gem.version = Zonebie::VERSION
+
+ gem.add_development_dependency "rspec", "~>2.8"
+ gem.add_development_dependency "active_support", ">=2.3"
+end

0 comments on commit 9db2bcf

Please sign in to comment.