sixarm_ruby_date_stamp 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/README.md +85 -0
- data/VERSION +1 -1
- data/lib/sixarm_ruby_date_stamp.rb +1 -1
- data/test/sixarm_ruby_date_stamp_test.rb +13 -11
- metadata +3 -6
- metadata.gz.sig +0 -0
- data/CHANGELOG.txt +0 -4
- data/INSTALL.txt +0 -32
- data/LICENSE.txt +0 -12
- data/README.rdoc +0 -7
data.tar.gz.sig
CHANGED
Binary file
|
data/README.md
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
# SixArm.com » Ruby » <br> Date.stamp method for ISO RFC date stamp
|
2
|
+
|
3
|
+
* Docs: <http://sixarm.com/sixarm_ruby_date_stamp/doc>
|
4
|
+
* Repo: <http://github.com/sixarm/sixarm_ruby_date_stamp>
|
5
|
+
* Email: Joel Parker Henderson, <joel@sixarm.com>
|
6
|
+
|
7
|
+
|
8
|
+
## Introduction
|
9
|
+
|
10
|
+
Provides datestamp methods Date.stamp and Date#stamp
|
11
|
+
|
12
|
+
For docs go to <http://sixarm.com/sixarm_ruby_date_stamp/doc>
|
13
|
+
|
14
|
+
Want to help? We're happy to get pull requests.
|
15
|
+
|
16
|
+
|
17
|
+
## Quickstart
|
18
|
+
|
19
|
+
Install:
|
20
|
+
|
21
|
+
gem install sixarm_ruby_date_stamp
|
22
|
+
|
23
|
+
Bundler:
|
24
|
+
|
25
|
+
gem "sixarm_ruby_date_stamp", "=1.0.2"
|
26
|
+
|
27
|
+
Require:
|
28
|
+
|
29
|
+
require "sixarm_ruby_date_stamp"
|
30
|
+
|
31
|
+
|
32
|
+
## High Security (Optional)
|
33
|
+
|
34
|
+
To enable high security for all our gems:
|
35
|
+
|
36
|
+
wget http://sixarm.com/sixarm.pem
|
37
|
+
gem cert --add sixarm.pem
|
38
|
+
gem sources --add http://sixarm.com
|
39
|
+
|
40
|
+
To install with high security:
|
41
|
+
|
42
|
+
gem install sixarm_ruby_date_stamp --test --trust-policy HighSecurity
|
43
|
+
|
44
|
+
|
45
|
+
## Examples
|
46
|
+
|
47
|
+
puts Date.stamp #=> "2010-12-31"
|
48
|
+
puts Date.today.stamp #=> "2010-12-31"
|
49
|
+
|
50
|
+
|
51
|
+
## Changes
|
52
|
+
|
53
|
+
|
54
|
+
* 2012-03-16 1.0.2 Upgrade for Ruby 1.9.3, minitest/spec, and improved docs.
|
55
|
+
* 2011-11-29 1.0.1 Bug fix.
|
56
|
+
* 2011-11-29 1.0.0 Refactored from sixarm_ruby_ramp to this independent gem.
|
57
|
+
|
58
|
+
|
59
|
+
## License
|
60
|
+
|
61
|
+
You may choose any of these open source licenses:
|
62
|
+
|
63
|
+
* Apache License
|
64
|
+
* BSD License
|
65
|
+
* CreativeCommons License, Non-commercial Share Alike
|
66
|
+
* GNU General Public License Version 2 (GPL 2)
|
67
|
+
* GNU Lesser General Public License (LGPL)
|
68
|
+
* MIT License
|
69
|
+
* Perl Artistic License
|
70
|
+
* Ruby License
|
71
|
+
|
72
|
+
The software is provided "as is", without warranty of any kind,
|
73
|
+
express or implied, including but not limited to the warranties of
|
74
|
+
merchantability, fitness for a particular purpose and noninfringement.
|
75
|
+
|
76
|
+
In no event shall the authors or copyright holders be liable for any
|
77
|
+
claim, damages or other liability, whether in an action of contract,
|
78
|
+
tort or otherwise, arising from, out of or in connection with the
|
79
|
+
software or the use or other dealings in the software.
|
80
|
+
|
81
|
+
This license is for the included software that is created by SixArm;
|
82
|
+
some of the included software may have its own licenses, copyrights,
|
83
|
+
authors, etc. and these do take precedence over the SixArm license.
|
84
|
+
|
85
|
+
Copyright (c) 2005-2013 Joel Parker Henderson
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.2
|
@@ -1,20 +1,22 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
|
-
require '
|
2
|
+
require 'minitest/autorun'
|
3
3
|
require 'simplecov'
|
4
4
|
SimpleCov.start
|
5
5
|
require 'sixarm_ruby_date_stamp'
|
6
6
|
|
7
|
-
|
7
|
+
describe Date do
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
describe "#stamp" do
|
10
|
+
|
11
|
+
it "with class method" do
|
12
|
+
Date.stamp.must_match /^\d\d\d\d-\d\d-\d\d$/
|
13
|
+
end
|
14
|
+
|
15
|
+
it "with_instance_method" do
|
16
|
+
Date.today.stamp.must_match /^\d\d\d\d-\d\d-\d\d$/
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
13
20
|
|
14
|
-
def test_stamp_with_instance_method
|
15
|
-
d=Date.today.stamp
|
16
|
-
assert(d=~/^\d\d\d\d-\d\d-\d\d$/,d)
|
17
|
-
end
|
18
|
-
|
19
21
|
end
|
20
22
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sixarm_ruby_date_stamp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
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:
|
38
|
+
date: 2012-03-16 00:00:00.000000000 Z
|
39
39
|
dependencies: []
|
40
40
|
description:
|
41
41
|
email: sixarm@sixarm.com
|
@@ -44,11 +44,8 @@ extensions: []
|
|
44
44
|
extra_rdoc_files: []
|
45
45
|
files:
|
46
46
|
- .gemtest
|
47
|
-
- CHANGELOG.txt
|
48
|
-
- INSTALL.txt
|
49
|
-
- LICENSE.txt
|
50
47
|
- Rakefile
|
51
|
-
- README.
|
48
|
+
- README.md
|
52
49
|
- VERSION
|
53
50
|
- lib/sixarm_ruby_date_stamp.rb
|
54
51
|
- test/sixarm_ruby_date_stamp_test.rb
|
metadata.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.txt
DELETED
data/INSTALL.txt
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
|
2
|
-
= SixArm.com Ruby Gem Install
|
3
|
-
|
4
|
-
|
5
|
-
First-time users: add our gem certificate and source.
|
6
|
-
When you do this once, it works for all our gems.
|
7
|
-
|
8
|
-
sudo wget http://sixarm.com/sixarm.pem
|
9
|
-
sudo gem cert --add sixarm.pem
|
10
|
-
sudo gem sources --add http://sixarm.com
|
11
|
-
|
12
|
-
Install the gem with advanced options.
|
13
|
-
|
14
|
-
sudo gem install sixarm_ruby_date_stamp --test --trust-policy HighSecurity
|
15
|
-
|
16
|
-
|
17
|
-
== Notes
|
18
|
-
|
19
|
-
Do you have any questions, comments, suggestions, or feedback?
|
20
|
-
Let us know, we're happy to help. Our email is sixarm@sixarm.com
|
21
|
-
|
22
|
-
Do you want to create your own high security gems?
|
23
|
-
Learn how at http://www.rubygems.org/read/chapter/21
|
24
|
-
|
25
|
-
To see your current gem certificate list:
|
26
|
-
|
27
|
-
sudo gem cert --list
|
28
|
-
|
29
|
-
Our cert looks like this:
|
30
|
-
|
31
|
-
/C=US/ST=California/L=San Francisco/O=SixArm/CN=sixarm.com
|
32
|
-
|
data/LICENSE.txt
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
LICENSE
|
2
|
-
|
3
|
-
You may choose any of these licenses:
|
4
|
-
|
5
|
-
- CreativeCommons License, Non-commercial Share Alike
|
6
|
-
- LGPL, GNU Lesser General Public License
|
7
|
-
- MIT License
|
8
|
-
- Ruby License
|
9
|
-
|
10
|
-
THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
11
|
-
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
12
|
-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|