timely 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +4 -0
- data/.rspec +2 -0
- data/.travis.yml +14 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +1 -12
- data/README.md +5 -0
- data/Rakefile +1 -139
- data/gemfiles/rails3.gemfile +8 -0
- data/gemfiles/rails4.gemfile +9 -0
- data/lib/timely.rb +7 -3
- data/lib/timely/date.rb +20 -0
- data/lib/timely/date_chooser.rb +10 -5
- data/lib/timely/date_range.rb +47 -10
- data/lib/timely/rails.rb +10 -3
- data/lib/timely/rails/calendar_tag.rb +52 -0
- data/lib/timely/rails/date.rb +5 -0
- data/lib/timely/rails/date_group.rb +68 -99
- data/lib/timely/rails/date_range_validity_module.rb +27 -0
- data/lib/timely/rails/date_time.rb +20 -0
- data/lib/timely/rails/extensions.rb +23 -11
- data/lib/timely/rails/period.rb +31 -0
- data/lib/timely/rails/season.rb +65 -75
- data/lib/timely/railtie.rb +7 -0
- data/lib/timely/temporal_patterns/finder.rb +152 -0
- data/lib/timely/temporal_patterns/frequency.rb +108 -0
- data/lib/timely/temporal_patterns/interval.rb +67 -0
- data/lib/timely/temporal_patterns/pattern.rb +160 -0
- data/lib/timely/time_since.rb +17 -0
- data/lib/timely/version.rb +3 -0
- data/spec/calendar_tag_spec.rb +29 -0
- data/spec/date_chooser_spec.rb +36 -27
- data/spec/date_group_spec.rb +9 -9
- data/spec/date_range_spec.rb +58 -20
- data/spec/date_spec.rb +20 -12
- data/spec/extensions_spec.rb +32 -0
- data/spec/rails/date_spec.rb +16 -0
- data/spec/rails/date_time_spec.rb +20 -0
- data/spec/rails/period_spec.rb +17 -0
- data/spec/schema.rb +5 -0
- data/spec/season_spec.rb +21 -24
- data/spec/spec_helper.rb +5 -20
- data/spec/string_spec.rb +4 -3
- data/spec/support/coverage.rb +26 -0
- data/spec/temporal_patterns_spec.rb +28 -0
- data/spec/time_since_spec.rb +24 -0
- data/spec/time_spec.rb +14 -14
- data/spec/trackable_date_set_spec.rb +14 -14
- data/spec/week_days_spec.rb +18 -18
- data/timely.gemspec +34 -98
- metadata +244 -21
- data/lib/timely/temporal_patterns.rb +0 -441
data/timely.gemspec
CHANGED
@@ -1,99 +1,35 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
## This sections is only necessary if you have C extensions.
|
37
|
-
# s.require_paths << 'ext'
|
38
|
-
# s.extensions = %w[ext/extconf.rb]
|
39
|
-
|
40
|
-
## If your gem includes any executables, list them here.
|
41
|
-
# s.executables = ["name"]
|
42
|
-
|
43
|
-
## Specify any RDoc options here. You'll want to add your README and
|
44
|
-
## LICENSE files to the extra_rdoc_files list.
|
45
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
46
|
-
s.extra_rdoc_files = %w[README.md LICENSE]
|
47
|
-
|
48
|
-
## List your runtime dependencies here. Runtime dependencies are those
|
49
|
-
## that are needed for an end user to actually USE your code.
|
50
|
-
|
51
|
-
## List your development dependencies here. Development dependencies are
|
52
|
-
## those that are only needed during development
|
53
|
-
# s.add_development_dependency('DEVDEPNAME', [">= 1.1.0", "< 2.0.0"])
|
54
|
-
|
55
|
-
## Leave this section as-is. It will be automatically generated from the
|
56
|
-
## contents of your Git repository via the gemspec task. DO NOT REMOVE
|
57
|
-
## THE MANIFEST COMMENTS, they are used as delimiters by the task.
|
58
|
-
# = MANIFEST =
|
59
|
-
s.files = %w[
|
60
|
-
Gemfile
|
61
|
-
HISTORY.md
|
62
|
-
LICENSE
|
63
|
-
README.md
|
64
|
-
Rakefile
|
65
|
-
lib/timely.rb
|
66
|
-
lib/timely/date.rb
|
67
|
-
lib/timely/date_chooser.rb
|
68
|
-
lib/timely/date_range.rb
|
69
|
-
lib/timely/date_time.rb
|
70
|
-
lib/timely/rails.rb
|
71
|
-
lib/timely/rails/date_group.rb
|
72
|
-
lib/timely/rails/extensions.rb
|
73
|
-
lib/timely/rails/season.rb
|
74
|
-
lib/timely/range.rb
|
75
|
-
lib/timely/string.rb
|
76
|
-
lib/timely/temporal_patterns.rb
|
77
|
-
lib/timely/time.rb
|
78
|
-
lib/timely/trackable_date_set.rb
|
79
|
-
lib/timely/week_days.rb
|
80
|
-
rails/init.rb
|
81
|
-
spec/date_chooser_spec.rb
|
82
|
-
spec/date_group_spec.rb
|
83
|
-
spec/date_range_spec.rb
|
84
|
-
spec/date_spec.rb
|
85
|
-
spec/schema.rb
|
86
|
-
spec/season_spec.rb
|
87
|
-
spec/spec_helper.rb
|
88
|
-
spec/string_spec.rb
|
89
|
-
spec/time_spec.rb
|
90
|
-
spec/trackable_date_set_spec.rb
|
91
|
-
spec/week_days_spec.rb
|
92
|
-
timely.gemspec
|
93
|
-
]
|
94
|
-
# = MANIFEST =
|
95
|
-
|
96
|
-
## Test files will be grabbed from the file list. Make sure the path glob
|
97
|
-
## matches what you actually use.
|
98
|
-
s.test_files = s.files.select { |path| path =~ /^test\/test_.*\.rb/ }
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'timely/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "timely"
|
8
|
+
spec.version = Timely::VERSION
|
9
|
+
spec.authors = ["Michael Noack"]
|
10
|
+
spec.email = ["support@travellink.com.au"]
|
11
|
+
spec.description = %q{Set of time, date, weekday related methods.}
|
12
|
+
spec.summary = %q{Set of time, date, weekday related methods.}
|
13
|
+
spec.homepage = 'http://github.com/sealink/timely'
|
14
|
+
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files`.split($/)
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
23
|
+
spec.add_development_dependency "rake"
|
24
|
+
spec.add_development_dependency 'rspec'
|
25
|
+
spec.add_development_dependency 'rspec-its'
|
26
|
+
spec.add_development_dependency 'simplecov'
|
27
|
+
spec.add_development_dependency 'simplecov-rcov'
|
28
|
+
spec.add_development_dependency 'coveralls'
|
29
|
+
spec.add_development_dependency 'sqlite3'
|
30
|
+
spec.add_development_dependency 'activesupport'
|
31
|
+
spec.add_development_dependency 'activerecord'
|
32
|
+
spec.add_development_dependency 'actionpack'
|
33
|
+
spec.add_development_dependency 'timecop'
|
34
|
+
spec.add_development_dependency 'travis'
|
99
35
|
end
|
metadata
CHANGED
@@ -1,80 +1,303 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timely
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Michael Noack
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
dependencies:
|
14
|
-
|
15
|
-
|
11
|
+
date: 2016-06-15 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
|
+
- !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: rspec-its
|
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: simplecov
|
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: simplecov-rcov
|
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: coveralls
|
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: sqlite3
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: activesupport
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: activerecord
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: actionpack
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: timecop
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: travis
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
description: Set of time, date, weekday related methods.
|
196
|
+
email:
|
197
|
+
- support@travellink.com.au
|
16
198
|
executables: []
|
17
199
|
extensions: []
|
18
|
-
extra_rdoc_files:
|
19
|
-
- README.md
|
20
|
-
- LICENSE
|
200
|
+
extra_rdoc_files: []
|
21
201
|
files:
|
202
|
+
- ".gitignore"
|
203
|
+
- ".rspec"
|
204
|
+
- ".travis.yml"
|
205
|
+
- CHANGELOG.md
|
22
206
|
- Gemfile
|
23
207
|
- HISTORY.md
|
24
208
|
- LICENSE
|
25
209
|
- README.md
|
26
210
|
- Rakefile
|
211
|
+
- gemfiles/rails3.gemfile
|
212
|
+
- gemfiles/rails4.gemfile
|
27
213
|
- lib/timely.rb
|
28
214
|
- lib/timely/date.rb
|
29
215
|
- lib/timely/date_chooser.rb
|
30
216
|
- lib/timely/date_range.rb
|
31
217
|
- lib/timely/date_time.rb
|
32
218
|
- lib/timely/rails.rb
|
219
|
+
- lib/timely/rails/calendar_tag.rb
|
220
|
+
- lib/timely/rails/date.rb
|
33
221
|
- lib/timely/rails/date_group.rb
|
222
|
+
- lib/timely/rails/date_range_validity_module.rb
|
223
|
+
- lib/timely/rails/date_time.rb
|
34
224
|
- lib/timely/rails/extensions.rb
|
225
|
+
- lib/timely/rails/period.rb
|
35
226
|
- lib/timely/rails/season.rb
|
227
|
+
- lib/timely/railtie.rb
|
36
228
|
- lib/timely/range.rb
|
37
229
|
- lib/timely/string.rb
|
38
|
-
- lib/timely/temporal_patterns.rb
|
230
|
+
- lib/timely/temporal_patterns/finder.rb
|
231
|
+
- lib/timely/temporal_patterns/frequency.rb
|
232
|
+
- lib/timely/temporal_patterns/interval.rb
|
233
|
+
- lib/timely/temporal_patterns/pattern.rb
|
39
234
|
- lib/timely/time.rb
|
235
|
+
- lib/timely/time_since.rb
|
40
236
|
- lib/timely/trackable_date_set.rb
|
237
|
+
- lib/timely/version.rb
|
41
238
|
- lib/timely/week_days.rb
|
42
239
|
- rails/init.rb
|
240
|
+
- spec/calendar_tag_spec.rb
|
43
241
|
- spec/date_chooser_spec.rb
|
44
242
|
- spec/date_group_spec.rb
|
45
243
|
- spec/date_range_spec.rb
|
46
244
|
- spec/date_spec.rb
|
245
|
+
- spec/extensions_spec.rb
|
246
|
+
- spec/rails/date_spec.rb
|
247
|
+
- spec/rails/date_time_spec.rb
|
248
|
+
- spec/rails/period_spec.rb
|
47
249
|
- spec/schema.rb
|
48
250
|
- spec/season_spec.rb
|
49
251
|
- spec/spec_helper.rb
|
50
252
|
- spec/string_spec.rb
|
253
|
+
- spec/support/coverage.rb
|
254
|
+
- spec/temporal_patterns_spec.rb
|
255
|
+
- spec/time_since_spec.rb
|
51
256
|
- spec/time_spec.rb
|
52
257
|
- spec/trackable_date_set_spec.rb
|
53
258
|
- spec/week_days_spec.rb
|
54
259
|
- timely.gemspec
|
55
260
|
homepage: http://github.com/sealink/timely
|
56
|
-
licenses:
|
261
|
+
licenses:
|
262
|
+
- MIT
|
263
|
+
metadata: {}
|
57
264
|
post_install_message:
|
58
|
-
rdoc_options:
|
59
|
-
- --charset=UTF-8
|
265
|
+
rdoc_options: []
|
60
266
|
require_paths:
|
61
267
|
- lib
|
62
268
|
required_ruby_version: !ruby/object:Gem::Requirement
|
63
|
-
none: false
|
64
269
|
requirements:
|
65
|
-
- -
|
270
|
+
- - ">="
|
66
271
|
- !ruby/object:Gem::Version
|
67
272
|
version: '0'
|
68
273
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
-
none: false
|
70
274
|
requirements:
|
71
|
-
- -
|
275
|
+
- - ">="
|
72
276
|
- !ruby/object:Gem::Version
|
73
277
|
version: '0'
|
74
278
|
requirements: []
|
75
|
-
rubyforge_project:
|
76
|
-
rubygems_version:
|
279
|
+
rubyforge_project:
|
280
|
+
rubygems_version: 2.4.8
|
77
281
|
signing_key:
|
78
|
-
specification_version:
|
282
|
+
specification_version: 4
|
79
283
|
summary: Set of time, date, weekday related methods.
|
80
|
-
test_files:
|
284
|
+
test_files:
|
285
|
+
- spec/calendar_tag_spec.rb
|
286
|
+
- spec/date_chooser_spec.rb
|
287
|
+
- spec/date_group_spec.rb
|
288
|
+
- spec/date_range_spec.rb
|
289
|
+
- spec/date_spec.rb
|
290
|
+
- spec/extensions_spec.rb
|
291
|
+
- spec/rails/date_spec.rb
|
292
|
+
- spec/rails/date_time_spec.rb
|
293
|
+
- spec/rails/period_spec.rb
|
294
|
+
- spec/schema.rb
|
295
|
+
- spec/season_spec.rb
|
296
|
+
- spec/spec_helper.rb
|
297
|
+
- spec/string_spec.rb
|
298
|
+
- spec/support/coverage.rb
|
299
|
+
- spec/temporal_patterns_spec.rb
|
300
|
+
- spec/time_since_spec.rb
|
301
|
+
- spec/time_spec.rb
|
302
|
+
- spec/trackable_date_set_spec.rb
|
303
|
+
- spec/week_days_spec.rb
|