From 8bb93bf5f15fe254a302f4099d0ad6f1b8986cb7 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Thu, 25 Nov 2010 22:50:07 +0000 Subject: [PATCH 1/5] moved all dependencies to gemspec --- Gemfile | 5 ----- time_ext.gemspec | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 0a5465e..d1715ca 100644 --- a/Gemfile +++ b/Gemfile @@ -2,8 +2,3 @@ source 'http://rubygems.org/' # Specify your gem's dependencies in time_ext.gemspec gemspec - -group :development do - gem 'rspec', '>= 2.1.0' - gem 'yard', '>= 0.6.3' -end diff --git a/time_ext.gemspec b/time_ext.gemspec index 8bf27f0..50b5317 100644 --- a/time_ext.gemspec +++ b/time_ext.gemspec @@ -21,4 +21,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'activesupport', '>= 2.3.0' s.add_runtime_dependency 'i18n', '>= 0.4.2' + + s.add_development_dependency 'rspec', '>= 2.1.0' + s.add_development_dependency 'yard', '>= 0.6.3' end From 59c96c0246064b48092a0918703d38df685401d4 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Wed, 2 Mar 2011 01:23:13 +0000 Subject: [PATCH 2/5] updated rdoc.info link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b3a3228..0782324 100644 --- a/README.md +++ b/README.md @@ -99,5 +99,5 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. [as]: http://as.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Time/Calculations.html -[docs]: http://rdoc.info/projects/jimeh/time_ext +[docs]: http://rdoc.info/gems/time_ext/frames [rdoc.info]: http://rdoc.info/ \ No newline at end of file From 950a57dc6699439dfb43b5894dd03de9f546aed4 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Wed, 2 Mar 2011 01:23:59 +0000 Subject: [PATCH 3/5] removed Gemfile.lock file, this is a gem, not an app --- .gitignore | 1 + Gemfile.lock | 32 -------------------------------- 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 Gemfile.lock diff --git a/.gitignore b/.gitignore index 7ae5b54..b236e19 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ tmtags ## PROJECT::GENERAL coverage rdoc +Gemfile.lock pkg/* *.gem .bundle diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index f6dec94..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,32 +0,0 @@ -PATH - remote: . - specs: - time_ext (0.2.7) - activesupport (>= 2.3.0) - i18n (>= 0.4.2) - -GEM - remote: http://rubygems.org/ - specs: - activesupport (3.0.3) - diff-lcs (1.1.2) - i18n (0.4.2) - rspec (2.1.0) - rspec-core (~> 2.1.0) - rspec-expectations (~> 2.1.0) - rspec-mocks (~> 2.1.0) - rspec-core (2.1.0) - rspec-expectations (2.1.0) - diff-lcs (~> 1.1.2) - rspec-mocks (2.1.0) - yard (0.6.3) - -PLATFORMS - ruby - -DEPENDENCIES - activesupport (>= 2.3.0) - i18n (>= 0.4.2) - rspec (>= 2.1.0) - time_ext! - yard (>= 0.6.3) From 4b1327306d547fbefdac1716cf0d4ba5a3f44ac8 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Fri, 11 Mar 2011 11:01:39 +0000 Subject: [PATCH 4/5] fixed some weird loading/require issues which seemed to be happening on rare occasions when used in a rails project --- lib/time_ext.rb | 4 ---- lib/time_ext/core_ext/numeric.rb | 2 ++ lib/time_ext/core_ext/time.rb | 4 ++++ time_ext.gemspec | 4 +++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/time_ext.rb b/lib/time_ext.rb index 3544f1e..73b975e 100644 --- a/lib/time_ext.rb +++ b/lib/time_ext.rb @@ -1,8 +1,4 @@ require 'rubygems' -require 'active_support' - -# support both Active Support 2.x and 3.x -require 'active_support/time' if !Time.respond_to?(:days_in_month) require 'time_ext/calculations' require 'time_ext/iterations' diff --git a/lib/time_ext/core_ext/numeric.rb b/lib/time_ext/core_ext/numeric.rb index e7c112c..5f31973 100644 --- a/lib/time_ext/core_ext/numeric.rb +++ b/lib/time_ext/core_ext/numeric.rb @@ -1,3 +1,5 @@ +require 'active_support/core_ext/numeric/time' unless Numeric.new.respond_to?(:seconds) # fixes rare loading issue + class Numeric alias :sec :seconds alias :min :minutes diff --git a/lib/time_ext/core_ext/time.rb b/lib/time_ext/core_ext/time.rb index aa5c599..c3ca9ed 100644 --- a/lib/time_ext/core_ext/time.rb +++ b/lib/time_ext/core_ext/time.rb @@ -1,3 +1,7 @@ +require 'active_support' +require 'active_support/time' unless Time.respond_to?(:days_in_month) # support both Active Support 2.x and 3.x +require 'active_support/core_ext/time/calculations' unless Time.new.respond_to?(:ago) # fixes rare loading issue + class Time include TimeExt::Support include TimeExt::Calculations diff --git a/time_ext.gemspec b/time_ext.gemspec index 50b5317..fc32bd8 100644 --- a/time_ext.gemspec +++ b/time_ext.gemspec @@ -19,9 +19,11 @@ Gem::Specification.new do |s| s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] - s.add_runtime_dependency 'activesupport', '>= 2.3.0' + s.add_runtime_dependency 'activesupport', '>= 2.3.2' s.add_runtime_dependency 'i18n', '>= 0.4.2' + s.add_development_dependency 'rake', '>= 0.8.7' s.add_development_dependency 'rspec', '>= 2.1.0' s.add_development_dependency 'yard', '>= 0.6.3' + s.add_development_dependency 'ruby-debug' end From dad55fb6f989943ec3172c31d675a0c44d9cbb5a Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Fri, 11 Mar 2011 11:02:28 +0000 Subject: [PATCH 5/5] started release v0.2.9 --- lib/time_ext/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/time_ext/version.rb b/lib/time_ext/version.rb index 4f22656..b9f91fd 100644 --- a/lib/time_ext/version.rb +++ b/lib/time_ext/version.rb @@ -1,3 +1,3 @@ module TimeExt - VERSION = "0.2.8" + VERSION = "0.2.9" end