Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added Bundler support, and removed dependence on Jeweler.

  • Loading branch information...
commit 3fb220d0a6e674d781ffd8e8833d1144032de9f0 1 parent cb3189d
@glv glv authored
View
6 .gitignore
@@ -17,5 +17,11 @@ tmtags
coverage
rdoc
pkg
+.bundle
+.rvmrc
+.rbenv-version
+.rbenv-gemsets
## PROJECT::SPECIFIC
+# for binstubs, since this gem has no executables
+bin
View
2  Gemfile
@@ -0,0 +1,2 @@
+source "http://rubygems.org"
+gemspec
View
20 Gemfile.lock
@@ -0,0 +1,20 @@
+PATH
+ remote: .
+ specs:
+ business_time (0.4.0)
+ activesupport (>= 2.0.0)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ activesupport (2.3.4)
+ rake (0.9.2.2)
+ shoulda (2.11.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ business_time!
+ rake
+ shoulda
View
2  LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2009 bokmann
+Copyright (c) 2009,2010,2011,2012 bokmann
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View
8 README.rdoc
@@ -149,8 +149,12 @@ This can lead to some wierd looking effects if, say, you are in the Eastern time
* While there have been requests to add 'business minutes' and even 'business seconds' to this gem, I won't
entertain a pullup request with such things. If you find it useful, great. Most users won't, and they don't
need the baggage.
-
+* I'm torn on the inclusion of some kind of business_duration_between two Times, for the following reasons:
+ * As a duration, it will be in seconds. This would naturally be business-seconds, which I trimmed out above.
+ * The logic is complex and error prone.
+ * There is no logical place to put it, as most of this gem mirrors the Timehelpers in ActiveSupport.
+ As a result I'm unlikely to add it unless I have an epiphany or someone wows me with an awesome pullup request.
== Copyright
-Copyright (c) 2010 bokmann. See LICENSE for details.
+Copyright (c) 2010,2011,2012 bokmann. See LICENSE for details.
View
23 Rakefile
@@ -1,24 +1,7 @@
require 'rubygems'
require 'rake'
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "business_time"
- gem.summary = %Q{Support for doing time math in business hours and days}
- gem.description = %Q{Have you ever wanted to do things like "6.business_days.from_now" and have weekends and holidays taken into account? Now you can.}
- gem.email = "dbock@codesherpas.com"
- gem.homepage = "http://github.com/bokmann/business_time"
- gem.authors = ["bokmann"]
- gem.add_development_dependency "shoulda", ">= 0"
- gem.add_dependency('activesupport','>= 2.0.0')
- gem.files += FileList['lib/generators/**/*.rb']
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
- end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
-end
+require "bundler/gem_tasks"
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
@@ -36,11 +19,11 @@ begin
end
rescue LoadError
task :rcov do
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install rcov"
end
end
-task :test => :check_dependencies
+# task :test => :check_dependencies
task :default => :test
View
20 business_time.gemspec
@@ -0,0 +1,20 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "business_time/version"
+
+Gem::Specification.new do |s|
+ s.name = "business_time"
+ s.version = BusinessTime::VERSION
+ s.summary = %Q{Support for doing time math in business hours and days}
+ s.description = %Q{Have you ever wanted to do things like "6.business_days.from_now" and have weekends and holidays taken into account? Now you can.}
+ s.homepage = "http://github.com/bokmann/business_time"
+ s.authors = ["bokmann"]
+ s.email = "dbock@codesherpas.com"
+
+ s.files = `git ls-files -- {lib,rails_generators,LICENSE,README.rdoc}`.split("\n")
+
+ s.add_dependency('activesupport','>= 2.0.0')
+
+ s.add_development_dependency 'rake'
+ s.add_development_dependency "shoulda", ">= 0"
+end
View
3  lib/business_time/version.rb
@@ -0,0 +1,3 @@
+module BusinessTime
+ VERSION = "0.4.0"
+end
Please sign in to comment.
Something went wrong with that request. Please try again.