time_spanner 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +13 -0
- data/LICENSE.txt +22 -0
- data/README.md +60 -0
- data/Rakefile +11 -0
- data/lib/time_spanner.rb +8 -0
- data/lib/time_spanner/duration_chain.rb +55 -0
- data/lib/time_spanner/errors.rb +8 -0
- data/lib/time_spanner/time_span.rb +34 -0
- data/lib/time_spanner/time_unit_collector.rb +59 -0
- data/lib/time_spanner/time_units.rb +17 -0
- data/lib/time_spanner/time_units/base/calendar_unit.rb +30 -0
- data/lib/time_spanner/time_units/base/time_unit.rb +39 -0
- data/lib/time_spanner/time_units/base/unit.rb +31 -0
- data/lib/time_spanner/time_units/century.rb +30 -0
- data/lib/time_spanner/time_units/day.rb +25 -0
- data/lib/time_spanner/time_units/decade.rb +25 -0
- data/lib/time_spanner/time_units/hour.rb +15 -0
- data/lib/time_spanner/time_units/microsecond.rb +15 -0
- data/lib/time_spanner/time_units/millennium.rb +25 -0
- data/lib/time_spanner/time_units/millisecond.rb +15 -0
- data/lib/time_spanner/time_units/minute.rb +15 -0
- data/lib/time_spanner/time_units/month.rb +25 -0
- data/lib/time_spanner/time_units/nanosecond.rb +15 -0
- data/lib/time_spanner/time_units/second.rb +15 -0
- data/lib/time_spanner/time_units/week.rb +25 -0
- data/lib/time_spanner/time_units/year.rb +25 -0
- data/lib/time_spanner/version.rb +3 -0
- data/test/test_helper.rb +9 -0
- data/test/time_spanner/duration_chain_test.rb +267 -0
- data/test/time_spanner/time_spanner_test.rb +27 -0
- data/test/time_spanner/time_unit_collector_test.rb +66 -0
- data/test/time_spanner/time_units/base/calendar_unit_test.rb +17 -0
- data/test/time_spanner/time_units/base/time_unit_test.rb +18 -0
- data/test/time_spanner/time_units/base/unit_test.rb +37 -0
- data/test/time_spanner/time_units/century_test.rb +55 -0
- data/test/time_spanner/time_units/day_test.rb +84 -0
- data/test/time_spanner/time_units/decade_test.rb +67 -0
- data/test/time_spanner/time_units/hour_test.rb +56 -0
- data/test/time_spanner/time_units/microsecond_test.rb +56 -0
- data/test/time_spanner/time_units/millennium_test.rb +69 -0
- data/test/time_spanner/time_units/millisecond_test.rb +56 -0
- data/test/time_spanner/time_units/minute_test.rb +84 -0
- data/test/time_spanner/time_units/month_test.rb +68 -0
- data/test/time_spanner/time_units/nanosecond_test.rb +40 -0
- data/test/time_spanner/time_units/second_test.rb +56 -0
- data/test/time_spanner/time_units/week_test.rb +55 -0
- data/test/time_spanner/time_units/year_test.rb +91 -0
- data/time_spanner.gemspec +23 -0
- metadata +143 -0
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'time_spanner/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'time_spanner'
|
8
|
+
spec.version = TimeSpanner::VERSION
|
9
|
+
spec.authors = ['Andreas Busold']
|
10
|
+
spec.email = ['an.bu@gmx.net']
|
11
|
+
spec.description = %q{Returns a time span splitted in desired units given two timestamps.}
|
12
|
+
spec.summary = %q{Returns a time span splitted in desired units given two timestamps.}
|
13
|
+
spec.homepage = 'https://github.com/shlub/time_spanner/'
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
22
|
+
spec.add_development_dependency 'rake'
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,143 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: time_spanner
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Andreas Busold
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-07-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: Returns a time span splitted in desired units given two timestamps.
|
42
|
+
email:
|
43
|
+
- an.bu@gmx.net
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- .gitignore
|
49
|
+
- .ruby-gemset
|
50
|
+
- .ruby-version
|
51
|
+
- Gemfile
|
52
|
+
- LICENSE.txt
|
53
|
+
- README.md
|
54
|
+
- Rakefile
|
55
|
+
- lib/time_spanner.rb
|
56
|
+
- lib/time_spanner/duration_chain.rb
|
57
|
+
- lib/time_spanner/errors.rb
|
58
|
+
- lib/time_spanner/time_span.rb
|
59
|
+
- lib/time_spanner/time_unit_collector.rb
|
60
|
+
- lib/time_spanner/time_units.rb
|
61
|
+
- lib/time_spanner/time_units/base/calendar_unit.rb
|
62
|
+
- lib/time_spanner/time_units/base/time_unit.rb
|
63
|
+
- lib/time_spanner/time_units/base/unit.rb
|
64
|
+
- lib/time_spanner/time_units/century.rb
|
65
|
+
- lib/time_spanner/time_units/day.rb
|
66
|
+
- lib/time_spanner/time_units/decade.rb
|
67
|
+
- lib/time_spanner/time_units/hour.rb
|
68
|
+
- lib/time_spanner/time_units/microsecond.rb
|
69
|
+
- lib/time_spanner/time_units/millennium.rb
|
70
|
+
- lib/time_spanner/time_units/millisecond.rb
|
71
|
+
- lib/time_spanner/time_units/minute.rb
|
72
|
+
- lib/time_spanner/time_units/month.rb
|
73
|
+
- lib/time_spanner/time_units/nanosecond.rb
|
74
|
+
- lib/time_spanner/time_units/second.rb
|
75
|
+
- lib/time_spanner/time_units/week.rb
|
76
|
+
- lib/time_spanner/time_units/year.rb
|
77
|
+
- lib/time_spanner/version.rb
|
78
|
+
- test/test_helper.rb
|
79
|
+
- test/time_spanner/duration_chain_test.rb
|
80
|
+
- test/time_spanner/time_spanner_test.rb
|
81
|
+
- test/time_spanner/time_unit_collector_test.rb
|
82
|
+
- test/time_spanner/time_units/base/calendar_unit_test.rb
|
83
|
+
- test/time_spanner/time_units/base/time_unit_test.rb
|
84
|
+
- test/time_spanner/time_units/base/unit_test.rb
|
85
|
+
- test/time_spanner/time_units/century_test.rb
|
86
|
+
- test/time_spanner/time_units/day_test.rb
|
87
|
+
- test/time_spanner/time_units/decade_test.rb
|
88
|
+
- test/time_spanner/time_units/hour_test.rb
|
89
|
+
- test/time_spanner/time_units/microsecond_test.rb
|
90
|
+
- test/time_spanner/time_units/millennium_test.rb
|
91
|
+
- test/time_spanner/time_units/millisecond_test.rb
|
92
|
+
- test/time_spanner/time_units/minute_test.rb
|
93
|
+
- test/time_spanner/time_units/month_test.rb
|
94
|
+
- test/time_spanner/time_units/nanosecond_test.rb
|
95
|
+
- test/time_spanner/time_units/second_test.rb
|
96
|
+
- test/time_spanner/time_units/week_test.rb
|
97
|
+
- test/time_spanner/time_units/year_test.rb
|
98
|
+
- time_spanner.gemspec
|
99
|
+
homepage: https://github.com/shlub/time_spanner/
|
100
|
+
licenses:
|
101
|
+
- MIT
|
102
|
+
metadata: {}
|
103
|
+
post_install_message:
|
104
|
+
rdoc_options: []
|
105
|
+
require_paths:
|
106
|
+
- lib
|
107
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - '>='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - '>='
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
requirements: []
|
118
|
+
rubyforge_project:
|
119
|
+
rubygems_version: 2.0.3
|
120
|
+
signing_key:
|
121
|
+
specification_version: 4
|
122
|
+
summary: Returns a time span splitted in desired units given two timestamps.
|
123
|
+
test_files:
|
124
|
+
- test/test_helper.rb
|
125
|
+
- test/time_spanner/duration_chain_test.rb
|
126
|
+
- test/time_spanner/time_spanner_test.rb
|
127
|
+
- test/time_spanner/time_unit_collector_test.rb
|
128
|
+
- test/time_spanner/time_units/base/calendar_unit_test.rb
|
129
|
+
- test/time_spanner/time_units/base/time_unit_test.rb
|
130
|
+
- test/time_spanner/time_units/base/unit_test.rb
|
131
|
+
- test/time_spanner/time_units/century_test.rb
|
132
|
+
- test/time_spanner/time_units/day_test.rb
|
133
|
+
- test/time_spanner/time_units/decade_test.rb
|
134
|
+
- test/time_spanner/time_units/hour_test.rb
|
135
|
+
- test/time_spanner/time_units/microsecond_test.rb
|
136
|
+
- test/time_spanner/time_units/millennium_test.rb
|
137
|
+
- test/time_spanner/time_units/millisecond_test.rb
|
138
|
+
- test/time_spanner/time_units/minute_test.rb
|
139
|
+
- test/time_spanner/time_units/month_test.rb
|
140
|
+
- test/time_spanner/time_units/nanosecond_test.rb
|
141
|
+
- test/time_spanner/time_units/second_test.rb
|
142
|
+
- test/time_spanner/time_units/week_test.rb
|
143
|
+
- test/time_spanner/time_units/year_test.rb
|