hmtime 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Manifest +2 -1
- data/README +0 -0
- data/Rakefile +1 -1
- data/hmtime.gemspec +5 -5
- data/lib/hmtime.rb +4 -2
- metadata +6 -4
data/Manifest
CHANGED
data/README
ADDED
File without changes
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('hmtime','0.1.
|
5
|
+
Echoe.new('hmtime','0.1.1') do |p|
|
6
6
|
p.description = "A simple HMTime object for representing and performing math on hours and minutes. HHH:MM"
|
7
7
|
p.url = "http://github.com/advorak/hmtime"
|
8
8
|
p.author = "Andrew Dvorak"
|
data/hmtime.gemspec
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "hmtime"
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Andrew Dvorak"]
|
9
|
-
s.date = "2012-04-
|
9
|
+
s.date = "2012-04-09"
|
10
10
|
s.description = "A simple HMTime object for representing and performing math on hours and minutes. HHH:MM"
|
11
11
|
s.email = "advorak@gmail.com"
|
12
|
-
s.extra_rdoc_files = ["README.rdoc", "lib/hmtime.rb"]
|
13
|
-
s.files = ["README.rdoc", "Rakefile", "lib/hmtime.rb", "
|
12
|
+
s.extra_rdoc_files = ["README", "README.rdoc", "lib/hmtime.rb"]
|
13
|
+
s.files = ["Manifest", "README", "README.rdoc", "Rakefile", "lib/hmtime.rb", "hmtime.gemspec"]
|
14
14
|
s.homepage = "http://github.com/advorak/hmtime"
|
15
|
-
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Hmtime", "--main", "README
|
15
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Hmtime", "--main", "README"]
|
16
16
|
s.require_paths = ["lib"]
|
17
17
|
s.rubyforge_project = "hmtime"
|
18
18
|
s.rubygems_version = "1.8.11"
|
data/lib/hmtime.rb
CHANGED
@@ -105,9 +105,11 @@ class HMTime
|
|
105
105
|
elsif (!value.is_a?(String))
|
106
106
|
raise TypeError, ERROR_MESSAGE_1
|
107
107
|
|
108
|
-
# Is the argument a string of format "hhh:mm"? If not, raise an error.
|
109
|
-
elsif !(arguments = value.strip.match(/^(\d+|\s+)?:(\d{2})$/).to_a[1..2])
|
108
|
+
# Is the argument a string of format ("hhh:mm" or " ".strip.empty?)? If not, raise an error.
|
109
|
+
elsif !value.strip.empty? && !(arguments = value.strip.match(/^(\d+|\s+)?:(\d{2})$/).to_a[1..2])
|
110
110
|
raise ArgumentError, ERROR_MESSAGE_1
|
111
|
+
elsif value.strip.empty?
|
112
|
+
arguments = [0,0]
|
111
113
|
end
|
112
114
|
|
113
115
|
### How to do a warning?? Is this correct?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hmtime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-09 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A simple HMTime object for representing and performing math on hours
|
15
15
|
and minutes. HHH:MM
|
@@ -17,13 +17,15 @@ email: advorak@gmail.com
|
|
17
17
|
executables: []
|
18
18
|
extensions: []
|
19
19
|
extra_rdoc_files:
|
20
|
+
- README
|
20
21
|
- README.rdoc
|
21
22
|
- lib/hmtime.rb
|
22
23
|
files:
|
24
|
+
- Manifest
|
25
|
+
- README
|
23
26
|
- README.rdoc
|
24
27
|
- Rakefile
|
25
28
|
- lib/hmtime.rb
|
26
|
-
- Manifest
|
27
29
|
- hmtime.gemspec
|
28
30
|
homepage: http://github.com/advorak/hmtime
|
29
31
|
licenses: []
|
@@ -34,7 +36,7 @@ rdoc_options:
|
|
34
36
|
- --title
|
35
37
|
- Hmtime
|
36
38
|
- --main
|
37
|
-
- README
|
39
|
+
- README
|
38
40
|
require_paths:
|
39
41
|
- lib
|
40
42
|
required_ruby_version: !ruby/object:Gem::Requirement
|