sixarm_ruby_time_stamp 1.1.0 → 1.1.2
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.tar.gz.sig +0 -0
- data/README.md +8 -6
- data/VERSION +1 -1
- data/lib/sixarm_ruby_time_stamp.rb +2 -2
- data/test/sixarm_ruby_time_stamp_test.rb +2 -2
- metadata +3 -3
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# SixArm.com » Ruby » <br> Time.stamp method for ISO RFC date and time stamp
|
2
2
|
|
3
|
-
*
|
3
|
+
* Doc: <http://sixarm.com/sixarm_ruby_time_stamp/doc>
|
4
|
+
* Gem: <http://rubygems.org/gems/sixarm_ruby_time_stamp>
|
4
5
|
* Repo: <http://github.com/sixarm/sixarm_ruby_time_stamp>
|
5
6
|
* Email: Joel Parker Henderson, <joel@sixarm.com>
|
6
7
|
|
@@ -13,7 +14,7 @@ For docs go to <http://sixarm.com/sixarm_ruby_time_stamp/doc>
|
|
13
14
|
Want to help? We're happy to get pull requests.
|
14
15
|
|
15
16
|
|
16
|
-
##
|
17
|
+
## Install quickstart
|
17
18
|
|
18
19
|
Install:
|
19
20
|
|
@@ -21,14 +22,14 @@ Install:
|
|
21
22
|
|
22
23
|
Bundler:
|
23
24
|
|
24
|
-
gem "sixarm_ruby_time_stamp", "
|
25
|
+
gem "sixarm_ruby_time_stamp", "~>1.1.0"
|
25
26
|
|
26
27
|
Require:
|
27
28
|
|
28
29
|
require "sixarm_ruby_time_stamp"
|
29
30
|
|
30
31
|
|
31
|
-
##
|
32
|
+
## Install with security (optional)
|
32
33
|
|
33
34
|
To enable high security for all our gems:
|
34
35
|
|
@@ -43,12 +44,13 @@ To install with high security:
|
|
43
44
|
|
44
45
|
## Examples
|
45
46
|
|
46
|
-
puts Time.stamp #=> "2010-12-
|
47
|
-
puts Time.now.stamp #=> "2010-12-
|
47
|
+
puts Time.stamp #=> "2010-12-31T12:59:59Z"
|
48
|
+
puts Time.now.stamp #=> "2010-12-31T12:59:59Z"
|
48
49
|
|
49
50
|
|
50
51
|
## Changes
|
51
52
|
|
53
|
+
* 2012-07-15 1.1.2 Improve standardization by adding "T" to indicate time start.
|
52
54
|
* 2012-03-16 1.1.0 Upgrade for Ruby 1.9.3, minitest/spec, and improved docs.
|
53
55
|
* 2011-11-07 1.0.0 Copied from sixarm_ruby_ramp to this independent gem
|
54
56
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.1.0
|
@@ -18,7 +18,7 @@ class Time
|
|
18
18
|
# => "2010-12-31 12:59:59Z"
|
19
19
|
|
20
20
|
def stamp
|
21
|
-
getutc.strftime('%Y-%m-%
|
21
|
+
getutc.strftime('%Y-%m-%dT%H:%M:%SZ')
|
22
22
|
end
|
23
23
|
|
24
24
|
|
@@ -26,7 +26,7 @@ class Time
|
|
26
26
|
#
|
27
27
|
# @example
|
28
28
|
# Time.stamp
|
29
|
-
# => "2010-12-
|
29
|
+
# => "2010-12-31T12:59:59Z"
|
30
30
|
#
|
31
31
|
# @return [String] Time.now.stamp
|
32
32
|
|
@@ -9,11 +9,11 @@ describe Time do
|
|
9
9
|
describe "#stamp" do
|
10
10
|
|
11
11
|
it "with class method" do
|
12
|
-
Time.stamp.must_match /^\d\d\d\d-\d\d-\d\
|
12
|
+
Time.stamp.must_match /^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\dZ$/
|
13
13
|
end
|
14
14
|
|
15
15
|
it "with instance method" do
|
16
|
-
Time.now.stamp.must_match /^\d\d\d\d-\d\d-\d\
|
16
|
+
Time.now.stamp.must_match /^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\dZ$/
|
17
17
|
end
|
18
18
|
|
19
19
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sixarm_ruby_time_stamp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
L2RORkllUkVIekVSClpEUlFZTXFydTlURU1uYTZIRDl6cGNzdEY3dndUaEdv
|
36
36
|
dmxPUSszWTZwbFE0bk16aXBYY1o5VEhxczY1UElMMHEKZWFid3BDYkFvcG89
|
37
37
|
Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
|
38
|
-
date: 2012-
|
38
|
+
date: 2012-07-15 00:00:00.000000000 Z
|
39
39
|
dependencies: []
|
40
40
|
description:
|
41
41
|
email: sixarm@sixarm.com
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
version: '0'
|
70
70
|
requirements: []
|
71
71
|
rubyforge_project:
|
72
|
-
rubygems_version: 1.8.
|
72
|
+
rubygems_version: 1.8.23
|
73
73
|
signing_key:
|
74
74
|
specification_version: 3
|
75
75
|
summary: SixArm.com » Ruby » Time.stamp method for RFC ISO date and time
|
metadata.gz.sig
CHANGED
Binary file
|