sixarm_ruby_time_terse 1.0.0

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.
Binary file
File without changes
@@ -0,0 +1,3 @@
1
+ CHANGELOG
2
+
3
+ 2011-11-07 1.0.0 Copied from sixarm_ruby_ramp to this independent gem
@@ -0,0 +1,32 @@
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_time_terse --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
+
@@ -0,0 +1,12 @@
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.
@@ -0,0 +1,7 @@
1
+ = SixArm.com » Ruby » Time.terse method for ISO RFC date and time terse
2
+
3
+ Author:: Joel Parker Henderson, joel@joelparkerhenderson.com
4
+ Copyright:: Copyright (c) 2006-2011 Joel Parker Henderson
5
+ License:: See LICENSE.txt file
6
+
7
+
@@ -0,0 +1,8 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'rake'
3
+ require 'rake/testtask'
4
+
5
+ Rake::TestTask.new(:test) do |t|
6
+ t.libs << 'lib' << 'test'
7
+ t.pattern = 'test/*.rb'
8
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0
@@ -0,0 +1,36 @@
1
+ # -*- coding: utf-8 -*-
2
+ =begin rdoc
3
+ Please see README.rdoc
4
+ =end
5
+
6
+
7
+ class Time
8
+
9
+
10
+ # @return [String] time packed into a short string: "YYYYMMDDHHMMSS"
11
+ #
12
+ # The time is converted to UTC.
13
+ #
14
+ # @example
15
+ # Time.now.terse
16
+ # => "20101231125959"
17
+
18
+ def terse
19
+ getutc.strftime('%Y%m%d%H%M%S')
20
+ end
21
+
22
+
23
+ # Shorthand for Time.now.terse
24
+ #
25
+ # @example
26
+ # Time.terse
27
+ # => "20101231125959"
28
+ #
29
+ # @return [String] Time.now.terse
30
+
31
+ def self.terse
32
+ now.terse
33
+ end
34
+
35
+
36
+ end
@@ -0,0 +1,20 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'test/unit'
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+ require 'sixarm_ruby_time_terse'
6
+
7
+ class TimeTest < Test::Unit::TestCase
8
+
9
+ def test_terse_with_class_method
10
+ t=Time.terse
11
+ assert(t=~/^\d\d\d\d\d\d\d\d\d\d\d\d\d\d$/,t)
12
+ end
13
+
14
+ def test_terse_with_instance_method
15
+ t=Time.now.terse
16
+ assert(t=~/^\d\d\d\d\d\d\d\d\d\d\d\d\d\d$/,t)
17
+ end
18
+
19
+ end
20
+
metadata ADDED
@@ -0,0 +1,93 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sixarm_ruby_time_terse
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
+ prerelease:
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 0
10
+ version: 1.0.0
11
+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B+ExRwWadGwaNPUA56d39qwavwP+iu+3JpeonNMVvbWXF5naCX/dNFIeREHzER
34
+ ZDRQYMqru9TEMna6HD9zpcstF7vwThGovlOQ+3Y6plQ4nMzipXcZ9THqs65PIL0q
35
+ eabwpCbAopo=
36
+ -----END CERTIFICATE-----
37
+
38
+ date: 2011-11-08 00:00:00 Z
39
+ dependencies: []
40
+
41
+ description:
42
+ email: sixarm@sixarm.com
43
+ executables: []
44
+
45
+ extensions: []
46
+
47
+ extra_rdoc_files: []
48
+
49
+ files:
50
+ - .gemtest
51
+ - CHANGELOG.txt
52
+ - INSTALL.txt
53
+ - LICENSE.txt
54
+ - Rakefile
55
+ - README.rdoc
56
+ - VERSION
57
+ - lib/sixarm_ruby_time_terse.rb
58
+ - test/sixarm_ruby_time_terse_test.rb
59
+ homepage: http://sixarm.com/
60
+ licenses: []
61
+
62
+ post_install_message:
63
+ rdoc_options: []
64
+
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ none: false
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ hash: 3
73
+ segments:
74
+ - 0
75
+ version: "0"
76
+ required_rubygems_version: !ruby/object:Gem::Requirement
77
+ none: false
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ hash: 3
82
+ segments:
83
+ - 0
84
+ version: "0"
85
+ requirements: []
86
+
87
+ rubyforge_project:
88
+ rubygems_version: 1.8.11
89
+ signing_key:
90
+ specification_version: 3
91
+ summary: "SixArm.com \xC2\xBB Ruby \xC2\xBB Time.terse method to get YYYYMMDDHHMMSS string"
92
+ test_files:
93
+ - test/sixarm_ruby_time_terse_test.rb
Binary file