jiff 0.0.1
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.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.travis.yml +11 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +22 -0
- data/README.md +223 -0
- data/Rakefile +4 -0
- data/jiff.gemspec +28 -0
- data/lib/jiff.rb +64 -0
- data/lib/jiff/manipulate.rb +32 -0
- data/lib/jiff/timezone.rb +9 -0
- data/spec/jiff_spec.rb +62 -0
- data/spec/manipulate_spec.rb +95 -0
- data/spec/spec_helper.rb +4 -0
- data/spec/timezone_spec.rb +22 -0
- metadata +174 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 951d699915d4ea5e0d75788428898e3a89a19c36
|
4
|
+
data.tar.gz: 24a37e3f47cff1c38493ca5642925916bfec0570
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 987ca0406640756887c757990b1e761c07dc0a89622200c10b92bc093c63487c631a8794ef9b59d67013789e20be395022613d056815850450c9c14b0b061972
|
7
|
+
data.tar.gz: 77db212d00f873e8d6f471dd51ee4cd5657365505ade0669bc7cab9baa0256b9f752e69ad785322baafa98f925fa875debdaf2367b8918cc9b39a1da9336cca9
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Charlie Revett
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,223 @@
|
|
1
|
+
# Jiff
|
2
|
+
|
3
|
+
[](https://travis-ci.org/revett/jiff)
|
4
|
+
|
5
|
+
Parse, validate, manipulate, and display dates in Ruby.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'jiff'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install jiff
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
Create a new **Jiff** set to the current date/time:
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
Jiff.new
|
29
|
+
```
|
30
|
+
|
31
|
+
Access the date/time object at any point:
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
j = Jiff.new
|
35
|
+
j.date
|
36
|
+
# -> 1992-06-08 10:30:15 +0100
|
37
|
+
```
|
38
|
+
|
39
|
+
### Get
|
40
|
+
|
41
|
+
Once you have created a **Jiff**, you can access any of the data within it. Overloaded getters and setters are used here, thus calling a method without parameters treats it as a `getter`, and calling them with a parameter treats it as a `setter`.
|
42
|
+
|
43
|
+
*Note* - not all methods currently have `setter` functionality (see [#3](https://github.com/revett/jiff/issues/3)).
|
44
|
+
|
45
|
+
#### .year
|
46
|
+
|
47
|
+
Gets the year.
|
48
|
+
|
49
|
+
```ruby
|
50
|
+
Jiff.new.year
|
51
|
+
# -> 2014
|
52
|
+
```
|
53
|
+
|
54
|
+
#### .quarter
|
55
|
+
|
56
|
+
Gets the quarter (`1..4`).
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
Jiff.new.quarter
|
60
|
+
# -> 3
|
61
|
+
```
|
62
|
+
|
63
|
+
#### .month
|
64
|
+
|
65
|
+
Gets the month (`1..12`).
|
66
|
+
|
67
|
+
```ruby
|
68
|
+
Jiff.new.month
|
69
|
+
# -> 6
|
70
|
+
```
|
71
|
+
|
72
|
+
#### .week_of_year
|
73
|
+
|
74
|
+
Gets the week of the year, where a week starts on Monday (`0..53`).
|
75
|
+
|
76
|
+
`0` - week partially in previous year.
|
77
|
+
`1-52` - weeks fully in current year.
|
78
|
+
`53` - week partially in next year.
|
79
|
+
|
80
|
+
```ruby
|
81
|
+
Jiff.new.week_of_year
|
82
|
+
# -> 24
|
83
|
+
```
|
84
|
+
|
85
|
+
#### .day_of_year
|
86
|
+
|
87
|
+
Gets the day of the year (`1..366`).
|
88
|
+
|
89
|
+
```ruby
|
90
|
+
Jiff.new.day_of_year
|
91
|
+
# -> 260
|
92
|
+
```
|
93
|
+
|
94
|
+
#### .day_of_week
|
95
|
+
|
96
|
+
Gets the day of the week (`1..7`), where `1` is Monday.
|
97
|
+
|
98
|
+
```ruby
|
99
|
+
Jiff.new.day_of_week
|
100
|
+
# -> 2
|
101
|
+
```
|
102
|
+
|
103
|
+
#### .day
|
104
|
+
|
105
|
+
Gets the day of the month (`1..31`).
|
106
|
+
|
107
|
+
```ruby
|
108
|
+
Jiff.new.day
|
109
|
+
# -> 14
|
110
|
+
```
|
111
|
+
|
112
|
+
#### .hour
|
113
|
+
|
114
|
+
Gets the hour (`0..23`).
|
115
|
+
|
116
|
+
```ruby
|
117
|
+
Jiff.new.hour
|
118
|
+
# -> 15
|
119
|
+
```
|
120
|
+
|
121
|
+
#### .minute
|
122
|
+
|
123
|
+
Gets the minutes (`0..59`).
|
124
|
+
|
125
|
+
```ruby
|
126
|
+
Jiff.new.minute
|
127
|
+
# -> 31
|
128
|
+
```
|
129
|
+
|
130
|
+
#### .second
|
131
|
+
|
132
|
+
Gets the seconds (`0..60`).
|
133
|
+
|
134
|
+
```ruby
|
135
|
+
Jiff.new.second
|
136
|
+
# -> 55
|
137
|
+
```
|
138
|
+
|
139
|
+
#### .millisecond
|
140
|
+
|
141
|
+
Gets the milliseconds (`0..999`).
|
142
|
+
|
143
|
+
```ruby
|
144
|
+
Jiff.new.millisecond
|
145
|
+
# -> 456
|
146
|
+
```
|
147
|
+
|
148
|
+
### Manipulate
|
149
|
+
|
150
|
+
After creating a **Jiff**, you can manipulate it in a number of ways. The [fluent interface](http://en.wikipedia.org/wiki/Fluent_interface) pattern, also known as [method chaining](http://en.wikipedia.org/wiki/Method_chaining), is used. Allowing you to write more readable code and do crazy stuff such as:
|
151
|
+
|
152
|
+
```ruby
|
153
|
+
Jiff.new.add(14, 'd').add(6, 'M').subtract(10, 'y').week_of_year
|
154
|
+
# -> 39
|
155
|
+
```
|
156
|
+
|
157
|
+
#### .add
|
158
|
+
|
159
|
+
Add a specific amount of time to your current **Jiff**:
|
160
|
+
|
161
|
+
```ruby
|
162
|
+
Jiff.new.add(amount, type)
|
163
|
+
```
|
164
|
+
|
165
|
+
To add time, pass the key of what time unit you want to add, and the amount you want to add.
|
166
|
+
|
167
|
+
#### .subtract
|
168
|
+
|
169
|
+
Subtract a specific amount of time from your current **Jiff**:
|
170
|
+
|
171
|
+
```ruby
|
172
|
+
Jiff.new.subtract(amount, type)
|
173
|
+
```
|
174
|
+
|
175
|
+
This is exactly the same as **.add**, only instead of adding time, it subtracts time.
|
176
|
+
|
177
|
+
#### Keys
|
178
|
+
|
179
|
+
|**Key**|**Description**|
|
180
|
+
|-------|---------------|
|
181
|
+
|y |Year |
|
182
|
+
|M |Month |
|
183
|
+
|w |Week |
|
184
|
+
|d |Day |
|
185
|
+
|h |Hour |
|
186
|
+
|m |Minute |
|
187
|
+
|s |Second |
|
188
|
+
|ms |Millisecond |
|
189
|
+
|
190
|
+
### Timezone
|
191
|
+
|
192
|
+
Once you have created a **Jiff**, you can alter its timezone.
|
193
|
+
|
194
|
+
#### .timezone
|
195
|
+
|
196
|
+
Gets the timezone.
|
197
|
+
|
198
|
+
```ruby
|
199
|
+
Jiff.new.timezone
|
200
|
+
# -> "BST"
|
201
|
+
```
|
202
|
+
|
203
|
+
#### .timezone(location)
|
204
|
+
|
205
|
+
Sets the timezone.
|
206
|
+
|
207
|
+
```ruby
|
208
|
+
Jiff.new.timezone 'London'
|
209
|
+
```
|
210
|
+
|
211
|
+
## Contributing
|
212
|
+
|
213
|
+
1. [Fork it!](https://github.com/revett/jiff/fork)
|
214
|
+
2. Create your feature branch: `git checkout -b my-new-feature`
|
215
|
+
3. Commit your changes: `git commit -am 'Add some feature'`
|
216
|
+
4. Push to the branch: `git push origin my-new-feature`
|
217
|
+
5. Create a new [Pull Request](https://github.com/revett/jiff/pulls).
|
218
|
+
|
219
|
+
Please create an [issue](https://github.com/revett/jiff/issues/new) if you find a bug or think of an enhancement that could be made.
|
220
|
+
|
221
|
+
## Credits
|
222
|
+
|
223
|
+
Heavily influenced by [Moment.js](http://momentjs.com/)
|
data/Rakefile
ADDED
data/jiff.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "jiff"
|
7
|
+
spec.version = '0.0.1'
|
8
|
+
spec.authors = ["Charlie Revett"]
|
9
|
+
spec.email = ["charlierevett@gmail.com"]
|
10
|
+
spec.summary = %q{Parse, validate, manipulate, and display dates in Ruby.}
|
11
|
+
spec.homepage = "http://github.com/revett/jiff"
|
12
|
+
spec.license = "MIT"
|
13
|
+
|
14
|
+
spec.files = `git ls-files -z`.split("\x0")
|
15
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
16
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
|
+
spec.require_paths = ["lib"]
|
18
|
+
|
19
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
20
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
21
|
+
spec.add_development_dependency "rspec"
|
22
|
+
spec.add_development_dependency "rake-rspec"
|
23
|
+
spec.add_development_dependency "timecop"
|
24
|
+
spec.add_development_dependency "rspec-nc"
|
25
|
+
spec.add_development_dependency "pry"
|
26
|
+
|
27
|
+
spec.add_runtime_dependency "activesupport"
|
28
|
+
end
|
data/lib/jiff.rb
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'time'
|
2
|
+
require_relative 'jiff/manipulate'
|
3
|
+
require_relative 'jiff/timezone'
|
4
|
+
|
5
|
+
class Jiff
|
6
|
+
include Manipulate
|
7
|
+
include Timezone
|
8
|
+
|
9
|
+
attr_reader :date
|
10
|
+
|
11
|
+
def initialize
|
12
|
+
@date = Time.new
|
13
|
+
end
|
14
|
+
|
15
|
+
def day
|
16
|
+
date.day
|
17
|
+
end
|
18
|
+
|
19
|
+
def day_of_week
|
20
|
+
pattern '%u'
|
21
|
+
end
|
22
|
+
|
23
|
+
def day_of_year
|
24
|
+
date.yday
|
25
|
+
end
|
26
|
+
|
27
|
+
def hour
|
28
|
+
date.hour
|
29
|
+
end
|
30
|
+
|
31
|
+
def millisecond
|
32
|
+
pattern '%L'
|
33
|
+
end
|
34
|
+
|
35
|
+
def minute
|
36
|
+
date.min
|
37
|
+
end
|
38
|
+
|
39
|
+
def month
|
40
|
+
date.month
|
41
|
+
end
|
42
|
+
|
43
|
+
def quarter
|
44
|
+
((month - 1) / 3) + 1
|
45
|
+
end
|
46
|
+
|
47
|
+
def second
|
48
|
+
date.sec
|
49
|
+
end
|
50
|
+
|
51
|
+
def week_of_year
|
52
|
+
(pattern '%W') + 1
|
53
|
+
end
|
54
|
+
|
55
|
+
def year
|
56
|
+
date.year
|
57
|
+
end
|
58
|
+
|
59
|
+
private
|
60
|
+
|
61
|
+
def pattern(format, to_int = true)
|
62
|
+
date.strftime(format).tap { |d| return d.to_i if to_int }
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Manipulate
|
2
|
+
def add(amount, type)
|
3
|
+
manipulate(amount, type.to_sym, '+')
|
4
|
+
end
|
5
|
+
|
6
|
+
def subtract(amount, type)
|
7
|
+
manipulate(amount, type.to_sym, '-')
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
SECONDS = {
|
13
|
+
y: 31556926,
|
14
|
+
M: 2629743.83,
|
15
|
+
w: 604800,
|
16
|
+
d: 86400,
|
17
|
+
h: 3600,
|
18
|
+
m: 60,
|
19
|
+
s: 1,
|
20
|
+
ms: 0.001
|
21
|
+
}
|
22
|
+
|
23
|
+
def manipulate(amount, type, operator)
|
24
|
+
raise ArgumentError, 'Invalid Type' unless type_exist? type
|
25
|
+
@date = @date.send(operator, (amount * SECONDS[type]))
|
26
|
+
self
|
27
|
+
end
|
28
|
+
|
29
|
+
def type_exist?(type)
|
30
|
+
SECONDS.key? type
|
31
|
+
end
|
32
|
+
end
|
data/spec/jiff_spec.rb
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
describe Jiff do
|
4
|
+
subject { Jiff.new }
|
5
|
+
let(:time) { Time.new(1992, 6, 8, 10, 30, 15) }
|
6
|
+
|
7
|
+
before { Timecop.freeze time }
|
8
|
+
|
9
|
+
after { Timecop.return }
|
10
|
+
|
11
|
+
describe '#date' do
|
12
|
+
specify { expect(subject.date).to eq time }
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '#day' do
|
16
|
+
specify { expect(subject.day).to eq 8 }
|
17
|
+
end
|
18
|
+
|
19
|
+
describe '#day_of_week' do
|
20
|
+
specify { expect(subject.day_of_week).to eq 1 }
|
21
|
+
end
|
22
|
+
|
23
|
+
describe '#day_of_year' do
|
24
|
+
specify { expect(subject.day_of_year).to eq 160 }
|
25
|
+
end
|
26
|
+
|
27
|
+
describe '#hour' do
|
28
|
+
specify { expect(subject.hour).to eq 10 }
|
29
|
+
end
|
30
|
+
|
31
|
+
describe '#millisecond' do
|
32
|
+
specify { expect(subject.millisecond).to eq 0 }
|
33
|
+
end
|
34
|
+
|
35
|
+
describe '#minute' do
|
36
|
+
specify { expect(subject.minute).to eq 30 }
|
37
|
+
end
|
38
|
+
|
39
|
+
describe '#month' do
|
40
|
+
specify { expect(subject.month).to eq 6 }
|
41
|
+
end
|
42
|
+
|
43
|
+
describe '#quarter' do
|
44
|
+
specify { expect(subject.quarter).to eq 2 }
|
45
|
+
end
|
46
|
+
|
47
|
+
describe '#second' do
|
48
|
+
specify { expect(subject.second).to eq 15 }
|
49
|
+
end
|
50
|
+
|
51
|
+
describe '#week_of_year' do
|
52
|
+
specify { expect(subject.week_of_year).to eq 24 }
|
53
|
+
end
|
54
|
+
|
55
|
+
describe '#year' do
|
56
|
+
specify { expect(subject.year).to eq 1992 }
|
57
|
+
end
|
58
|
+
|
59
|
+
context 'check method chaining words' do
|
60
|
+
specify { expect(subject.add(2, 'w').subtract(2, 'd').day).to eq 20 }
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,95 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
describe Jiff do
|
4
|
+
subject { described_class.new }
|
5
|
+
|
6
|
+
let(:time) { Time.new(1992, 6, 8, 10, 30, 15) }
|
7
|
+
|
8
|
+
before { Timecop.freeze time }
|
9
|
+
|
10
|
+
after { Timecop.return }
|
11
|
+
|
12
|
+
describe '#add' do
|
13
|
+
context 'using a valid type' do
|
14
|
+
context 'adding 1 year' do
|
15
|
+
specify { expect(subject.add(1, 'y').year).to eq 1993 }
|
16
|
+
end
|
17
|
+
|
18
|
+
context 'adding 1 month' do
|
19
|
+
specify { expect(subject.add(1, 'M').month).to eq 7 }
|
20
|
+
end
|
21
|
+
|
22
|
+
context 'adding 1 week' do
|
23
|
+
specify { expect(subject.add(1, 'w').day).to eq 15 }
|
24
|
+
end
|
25
|
+
|
26
|
+
context 'adding 1 day' do
|
27
|
+
specify { expect(subject.add(1, 'd').day).to eq 9 }
|
28
|
+
end
|
29
|
+
|
30
|
+
context 'adding 1 hour' do
|
31
|
+
specify { expect(subject.add(1, 'h').hour).to eq 11 }
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'adding 1 minute' do
|
35
|
+
specify { expect(subject.add(1, 'm').minute).to eq 31 }
|
36
|
+
end
|
37
|
+
|
38
|
+
context 'adding 1 second' do
|
39
|
+
specify { expect(subject.add(1, 's').second).to eq 16 }
|
40
|
+
end
|
41
|
+
|
42
|
+
context 'adding 1 millisecond' do
|
43
|
+
specify { expect(subject.add(1, 'ms').millisecond).to eq 1 }
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
context 'using an invalid type' do
|
48
|
+
specify do
|
49
|
+
expect{ subject.add(5, 'batman') }.to raise_error ArgumentError
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe '#subtract' do
|
55
|
+
context 'using a valid type' do
|
56
|
+
context 'subtracting 1 year' do
|
57
|
+
specify { expect(subject.subtract(1, 'y').year).to eq 1991 }
|
58
|
+
end
|
59
|
+
|
60
|
+
context 'subtracting 1 month' do
|
61
|
+
specify { expect(subject.subtract(1, 'M').month).to eq 5 }
|
62
|
+
end
|
63
|
+
|
64
|
+
context 'subtracting 1 week' do
|
65
|
+
specify { expect(subject.subtract(1, 'w').day).to eq 1 }
|
66
|
+
end
|
67
|
+
|
68
|
+
context 'subtracting 1 day' do
|
69
|
+
specify { expect(subject.subtract(1, 'd').day).to eq 7 }
|
70
|
+
end
|
71
|
+
|
72
|
+
context 'subtracting 1 hour' do
|
73
|
+
specify { expect(subject.subtract(1, 'h').hour).to eq 9 }
|
74
|
+
end
|
75
|
+
|
76
|
+
context 'subtracting 1 minute' do
|
77
|
+
specify { expect(subject.subtract(1, 'm').minute).to eq 29 }
|
78
|
+
end
|
79
|
+
|
80
|
+
context 'subtracting 1 second' do
|
81
|
+
specify { expect(subject.subtract(1, 's').second).to eq 14 }
|
82
|
+
end
|
83
|
+
|
84
|
+
context 'subtracting 1 millisecond' do
|
85
|
+
specify { expect(subject.subtract(1, 'ms').millisecond).to eq 998 }
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
context 'using an invalid type' do
|
90
|
+
specify do
|
91
|
+
expect{ subject.subtract(5, 'batman') }.to raise_error ArgumentError
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
describe Jiff do
|
4
|
+
subject { described_class.new }
|
5
|
+
|
6
|
+
let(:bst_time) { Time.new(1992, 6, 8, 10, 30, 15) }
|
7
|
+
let(:gmt_time) { Time.new(1992, 1, 8, 10, 30, 15) }
|
8
|
+
|
9
|
+
describe '#timezone' do
|
10
|
+
context 'using GMT time' do
|
11
|
+
before { Timecop.freeze gmt_time }
|
12
|
+
specify { expect(subject.timezone('London').timezone).to eq 'GMT' }
|
13
|
+
end
|
14
|
+
|
15
|
+
context 'using BST time' do
|
16
|
+
before { Timecop.freeze bst_time }
|
17
|
+
specify { expect(subject.timezone('London').timezone).to eq 'BST' }
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
after { Timecop.return }
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,174 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jiff
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Charlie Revett
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-10-25 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.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake-rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: timecop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec-nc
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: activesupport
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description:
|
126
|
+
email:
|
127
|
+
- charlierevett@gmail.com
|
128
|
+
executables: []
|
129
|
+
extensions: []
|
130
|
+
extra_rdoc_files: []
|
131
|
+
files:
|
132
|
+
- .gitignore
|
133
|
+
- .travis.yml
|
134
|
+
- Gemfile
|
135
|
+
- LICENSE.txt
|
136
|
+
- README.md
|
137
|
+
- Rakefile
|
138
|
+
- jiff.gemspec
|
139
|
+
- lib/jiff.rb
|
140
|
+
- lib/jiff/manipulate.rb
|
141
|
+
- lib/jiff/timezone.rb
|
142
|
+
- spec/jiff_spec.rb
|
143
|
+
- spec/manipulate_spec.rb
|
144
|
+
- spec/spec_helper.rb
|
145
|
+
- spec/timezone_spec.rb
|
146
|
+
homepage: http://github.com/revett/jiff
|
147
|
+
licenses:
|
148
|
+
- MIT
|
149
|
+
metadata: {}
|
150
|
+
post_install_message:
|
151
|
+
rdoc_options: []
|
152
|
+
require_paths:
|
153
|
+
- lib
|
154
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - '>='
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
159
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - '>='
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '0'
|
164
|
+
requirements: []
|
165
|
+
rubyforge_project:
|
166
|
+
rubygems_version: 2.0.14
|
167
|
+
signing_key:
|
168
|
+
specification_version: 4
|
169
|
+
summary: Parse, validate, manipulate, and display dates in Ruby.
|
170
|
+
test_files:
|
171
|
+
- spec/jiff_spec.rb
|
172
|
+
- spec/manipulate_spec.rb
|
173
|
+
- spec/spec_helper.rb
|
174
|
+
- spec/timezone_spec.rb
|