hmtime 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/Manifest +2 -1
  2. data/README +0 -0
  3. data/Rakefile +1 -1
  4. data/hmtime.gemspec +5 -5
  5. data/lib/hmtime.rb +4 -2
  6. metadata +6 -4
data/Manifest CHANGED
@@ -1,4 +1,5 @@
1
+ Manifest
2
+ README
1
3
  README.rdoc
2
4
  Rakefile
3
5
  lib/hmtime.rb
4
- Manifest
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.0') do |p|
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"
@@ -2,17 +2,17 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "hmtime"
5
- s.version = "0.1.0"
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-03"
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", "Manifest", "hmtime.gemspec"]
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.rdoc"]
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"
@@ -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.0
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-03 00:00:00.000000000 Z
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.rdoc
39
+ - README
38
40
  require_paths:
39
41
  - lib
40
42
  required_ruby_version: !ruby/object:Gem::Requirement