hellobase 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hellobase/date_creation.rb +16 -14
- data/lib/hellobase/datetime_creation.rb +16 -14
- data/lib/hellobase/time_creation.rb +10 -10
- data/lib/hellobase/version.rb +1 -1
- data/lib/hellobase.rb +2 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c20deb43b88203e9d604ab4e2d2ead00bf82827b46a314227b39db47ef97a2f4
|
4
|
+
data.tar.gz: 6defacad19d9f964029239d717eae54cff49a875a73821b24f9d7073a9e01343
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 745fd0ef44520341de21921343a01f3226d537956fa1ec21b4534af9225d9adc7de94b475b8f31dca136321fb44bd1b95125640a9c93516c147f76e13b4c2630
|
7
|
+
data.tar.gz: 8a397f78ae1b1f11806485cd43741f6978f772d0a8f33a3cb3c7aaaeb976e7dbb45fc6261ac9d548e9f69f860129e0b535a2ed818a5a2634a099debb5071ec7b
|
@@ -1,19 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
Date.singleton_class.prepend(
|
2
|
+
Module.new do
|
3
|
+
def parse(string)
|
4
|
+
raise Hellobase::Error.new(:date_parse, string) unless string =~ Hellobase::DATE_FORMAT
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
begin
|
7
|
+
super
|
8
|
+
rescue ArgumentError
|
9
|
+
raise Hellobase::Error.new(:date_parse, string)
|
10
|
+
end
|
9
11
|
end
|
10
|
-
end
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
def new(*args)
|
14
|
+
begin
|
15
|
+
super
|
16
|
+
rescue ArgumentError
|
17
|
+
raise Hellobase::Error.new(:date_new, *args)
|
18
|
+
end
|
17
19
|
end
|
18
20
|
end
|
19
|
-
|
21
|
+
)
|
@@ -1,19 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
DateTime.singleton_class.prepend(
|
2
|
+
Module.new do
|
3
|
+
def parse(string)
|
4
|
+
raise Hellobase::Error.new(:datetime_parse, string) unless string =~ Hellobase::DATETIME_FORMAT
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
begin
|
7
|
+
super
|
8
|
+
rescue ArgumentError
|
9
|
+
raise Hellobase::Error.new(:datetime_parse, string)
|
10
|
+
end
|
9
11
|
end
|
10
|
-
end
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
def new(*args)
|
14
|
+
begin
|
15
|
+
super
|
16
|
+
rescue ArgumentError
|
17
|
+
raise Hellobase::Error.new(:datetime_new, *args)
|
18
|
+
end
|
17
19
|
end
|
18
20
|
end
|
19
|
-
|
21
|
+
)
|
@@ -1,21 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
def
|
4
|
-
raise Error.new(:time_parse, string) unless string =~ Hellobase::TIME_FORMAT
|
1
|
+
Tod::TimeOfDay.singleton_class.prepend(
|
2
|
+
Module.new do
|
3
|
+
def parse(string)
|
4
|
+
raise Hellobase::Error.new(:time_parse, string) unless string =~ Hellobase::TIME_FORMAT
|
5
5
|
|
6
6
|
begin
|
7
|
-
|
7
|
+
super
|
8
8
|
rescue ArgumentError
|
9
|
-
raise Error.new(:time_parse, string)
|
9
|
+
raise Hellobase::Error.new(:time_parse, string)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
def
|
13
|
+
def new(*args)
|
14
14
|
begin
|
15
|
-
|
15
|
+
super
|
16
16
|
rescue ArgumentError
|
17
|
-
raise Error.new(:time_new,
|
17
|
+
raise Hellobase::Error.new(:time_new, *args)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
21
|
-
|
21
|
+
)
|
data/lib/hellobase/version.rb
CHANGED
data/lib/hellobase.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hellobase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anthony Wang
|
@@ -64,6 +64,20 @@ dependencies:
|
|
64
64
|
- - "<"
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '5.14'
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: warning
|
69
|
+
requirement: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - "~>"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '1.0'
|
74
|
+
type: :development
|
75
|
+
prerelease: false
|
76
|
+
version_requirements: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - "~>"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '1.0'
|
67
81
|
description:
|
68
82
|
email:
|
69
83
|
- awang@hellobase.com
|