natural_time 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm ree-1.8.7-2011.03@natural_time
data/Rakefile CHANGED
@@ -18,31 +18,3 @@ begin
18
18
  rescue LoadError
19
19
  puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
20
20
  end
21
-
22
- require 'spec/rake/spectask'
23
- Spec::Rake::SpecTask.new(:spec) do |spec|
24
- spec.libs << 'lib' << 'spec'
25
- spec.spec_files = FileList['spec/**/*_spec.rb']
26
- spec.spec_opts = ['-c']
27
- end
28
-
29
- Spec::Rake::SpecTask.new(:rcov) do |spec|
30
- spec.libs << 'lib' << 'spec'
31
- spec.pattern = 'spec/**/*_spec.rb'
32
- spec.rcov_opts = ['--exclude', '.gem,Library,spec', '--sort', 'coverage']
33
- spec.rcov = true
34
- end
35
-
36
- task :spec => :check_dependencies
37
-
38
- task :default => :spec
39
-
40
- require 'rake/rdoctask'
41
- Rake::RDocTask.new do |rdoc|
42
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
43
-
44
- rdoc.rdoc_dir = 'rdoc'
45
- rdoc.title = "naturaltime #{version}"
46
- rdoc.rdoc_files.include('README*')
47
- rdoc.rdoc_files.include('lib/**/*.rb')
48
- end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
data/lib/natural_time.rb CHANGED
@@ -44,6 +44,8 @@ class NaturalTime
44
44
  end
45
45
 
46
46
  def elapsed_time(duration_in_seconds)
47
+ return "0 seconds" if duration_in_seconds <= 0
48
+
47
49
  elapsed_time = []
48
50
 
49
51
  seconds_left = duration_in_seconds
@@ -65,4 +67,4 @@ class NaturalTime
65
67
  elapsed_time.compact
66
68
  end
67
69
  end
68
- end
70
+ end
data/natural_time.gemspec CHANGED
@@ -4,20 +4,21 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{natural_time}
8
- s.version = "0.0.4"
7
+ s.name = "natural_time"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jeff Coleman"]
12
- s.date = %q{2011-04-04}
13
- s.description = %q{Smart enumeration of durations in natural language--"4 hours, 3 minutes and 2 seconds"}
14
- s.email = %q{progressions@gmail.com}
12
+ s.date = "2012-05-11"
13
+ s.description = "Smart enumeration of durations in natural language--\"4 hours, 3 minutes and 2 seconds\""
14
+ s.email = "progressions@gmail.com"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
17
  "README.rdoc"
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
+ ".rvmrc",
21
22
  "History.txt",
22
23
  "LICENSE",
23
24
  "README.rdoc",
@@ -29,17 +30,12 @@ Gem::Specification.new do |s|
29
30
  "spec/spec.opts",
30
31
  "spec/spec_helper.rb"
31
32
  ]
32
- s.homepage = %q{http://github.com/progressions/natural_time}
33
+ s.homepage = "http://github.com/progressions/natural_time"
33
34
  s.require_paths = ["lib"]
34
- s.rubygems_version = %q{1.3.7}
35
- s.summary = %q{Smart enumeration of durations in natural language}
36
- s.test_files = [
37
- "spec/natural_time_spec.rb",
38
- "spec/spec_helper.rb"
39
- ]
35
+ s.rubygems_version = "1.8.12"
36
+ s.summary = "Smart enumeration of durations in natural language"
40
37
 
41
38
  if s.respond_to? :specification_version then
42
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
43
39
  s.specification_version = 3
44
40
 
45
41
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: natural_time
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease: false
4
+ hash: 21
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeff Coleman
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-04 00:00:00 -05:00
19
- default_executable:
18
+ date: 2012-05-11 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: activesupport
@@ -43,6 +42,7 @@ extra_rdoc_files:
43
42
  - README.rdoc
44
43
  files:
45
44
  - .document
45
+ - .rvmrc
46
46
  - History.txt
47
47
  - LICENSE
48
48
  - README.rdoc
@@ -53,7 +53,6 @@ files:
53
53
  - spec/natural_time_spec.rb
54
54
  - spec/spec.opts
55
55
  - spec/spec_helper.rb
56
- has_rdoc: true
57
56
  homepage: http://github.com/progressions/natural_time
58
57
  licenses: []
59
58
 
@@ -83,10 +82,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
82
  requirements: []
84
83
 
85
84
  rubyforge_project:
86
- rubygems_version: 1.3.7
85
+ rubygems_version: 1.8.12
87
86
  signing_key:
88
87
  specification_version: 3
89
88
  summary: Smart enumeration of durations in natural language
90
- test_files:
91
- - spec/natural_time_spec.rb
92
- - spec/spec_helper.rb
89
+ test_files: []
90
+