time_diff 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -65,7 +65,7 @@ class Time
65
65
  end
66
66
 
67
67
  def Time.pluralize(word, count)
68
- return count > 1 ? word.pluralize : word
68
+ return count != 1 ? word.pluralize : word
69
69
  end
70
70
 
71
71
  def Time.remove_format_string_for_zero_components(time_diff_components, format_string)
@@ -13,8 +13,8 @@ class TestTimeDiff < Test::Unit::TestCase
13
13
 
14
14
  should "return the time difference in a formatted text" do
15
15
  assert_test_scenarios_for_formatted_diff(Time.parse('2010-03-06 12:30:00'), Time.parse('2011-03-07 12:30:30'), '%y, %d and %h:%m:%s', '1 year and 18:00:30')
16
- assert_test_scenarios_for_formatted_diff(Time.parse('2010-03-06 12:30:00'), Time.parse('2011-03-07 12:30:30'), '%d %H %N %S', '366 days 0 hour 0 minute 30 seconds')
17
- assert_test_scenarios_for_formatted_diff(Time.parse('2011-03-06 12:30:00'), Time.parse('2011-03-07 12:30:30'), '%H %N %S', '24 hours 0 minute 30 seconds')
16
+ assert_test_scenarios_for_formatted_diff(Time.parse('2010-03-06 12:30:00'), Time.parse('2011-03-07 12:30:30'), '%d %H %N %S', '366 days 0 hours 0 minutes 30 seconds')
17
+ assert_test_scenarios_for_formatted_diff(Time.parse('2011-03-06 12:30:00'), Time.parse('2011-03-07 12:30:30'), '%H %N %S', '24 hours 0 minutes 30 seconds')
18
18
  end
19
19
 
20
20
  def assert_test_scenarios(start_date, end_date, expected_result)
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{time_diff}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["abhilash"]
12
- s.date = %q{2011-04-10}
11
+ s.authors = [%q{abhilash}]
12
+ s.date = %q{2011-09-14}
13
13
  s.description = %q{It returns a hash file with the difference in terms of year, month, week, day, hour, minute and second}
14
14
  s.email = %q{abhidsm@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -32,9 +32,9 @@ Gem::Specification.new do |s|
32
32
  "time_diff.gemspec"
33
33
  ]
34
34
  s.homepage = %q{http://github.com/abhidsm/time_diff}
35
- s.licenses = ["MIT"]
36
- s.require_paths = ["lib"]
37
- s.rubygems_version = %q{1.5.0}
35
+ s.licenses = [%q{MIT}]
36
+ s.require_paths = [%q{lib}]
37
+ s.rubygems_version = %q{1.8.6}
38
38
  s.summary = %q{Gem to get the difference between two time}
39
39
  s.test_files = [
40
40
  "test/helper.rb",
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: time_diff
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - abhilash
@@ -15,11 +15,12 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-10 00:00:00 +05:30
19
- default_executable:
18
+ date: 2011-09-14 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: activesupport
22
+ type: :runtime
23
+ prerelease: false
23
24
  version_requirements: &id001 !ruby/object:Gem::Requirement
24
25
  none: false
25
26
  requirements:
@@ -29,11 +30,11 @@ dependencies:
29
30
  segments:
30
31
  - 0
31
32
  version: "0"
32
- prerelease: false
33
- type: :runtime
34
33
  requirement: *id001
35
34
  - !ruby/object:Gem::Dependency
36
35
  name: i18n
36
+ type: :runtime
37
+ prerelease: false
37
38
  version_requirements: &id002 !ruby/object:Gem::Requirement
38
39
  none: false
39
40
  requirements:
@@ -43,11 +44,11 @@ dependencies:
43
44
  segments:
44
45
  - 0
45
46
  version: "0"
46
- prerelease: false
47
- type: :runtime
48
47
  requirement: *id002
49
48
  - !ruby/object:Gem::Dependency
50
49
  name: shoulda
50
+ type: :development
51
+ prerelease: false
51
52
  version_requirements: &id003 !ruby/object:Gem::Requirement
52
53
  none: false
53
54
  requirements:
@@ -57,11 +58,11 @@ dependencies:
57
58
  segments:
58
59
  - 0
59
60
  version: "0"
60
- prerelease: false
61
- type: :development
62
61
  requirement: *id003
63
62
  - !ruby/object:Gem::Dependency
64
63
  name: bundler
64
+ type: :development
65
+ prerelease: false
65
66
  version_requirements: &id004 !ruby/object:Gem::Requirement
66
67
  none: false
67
68
  requirements:
@@ -73,11 +74,11 @@ dependencies:
73
74
  - 0
74
75
  - 0
75
76
  version: 1.0.0
76
- prerelease: false
77
- type: :development
78
77
  requirement: *id004
79
78
  - !ruby/object:Gem::Dependency
80
79
  name: jeweler
80
+ type: :development
81
+ prerelease: false
81
82
  version_requirements: &id005 !ruby/object:Gem::Requirement
82
83
  none: false
83
84
  requirements:
@@ -89,11 +90,11 @@ dependencies:
89
90
  - 5
90
91
  - 2
91
92
  version: 1.5.2
92
- prerelease: false
93
- type: :development
94
93
  requirement: *id005
95
94
  - !ruby/object:Gem::Dependency
96
95
  name: rcov
96
+ type: :development
97
+ prerelease: false
97
98
  version_requirements: &id006 !ruby/object:Gem::Requirement
98
99
  none: false
99
100
  requirements:
@@ -103,8 +104,6 @@ dependencies:
103
104
  segments:
104
105
  - 0
105
106
  version: "0"
106
- prerelease: false
107
- type: :development
108
107
  requirement: *id006
109
108
  description: It returns a hash file with the difference in terms of year, month, week, day, hour, minute and second
110
109
  email: abhidsm@gmail.com
@@ -129,7 +128,6 @@ files:
129
128
  - test/helper.rb
130
129
  - test/test_time_diff.rb
131
130
  - time_diff.gemspec
132
- has_rdoc: true
133
131
  homepage: http://github.com/abhidsm/time_diff
134
132
  licenses:
135
133
  - MIT
@@ -159,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
157
  requirements: []
160
158
 
161
159
  rubyforge_project:
162
- rubygems_version: 1.5.0
160
+ rubygems_version: 1.8.6
163
161
  signing_key:
164
162
  specification_version: 3
165
163
  summary: Gem to get the difference between two time