workhours 0.0.1 → 0.0.2
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 +4 -4
- data/.gitignore +0 -1
- data/.travis.yml +4 -3
- data/Gemfile.lock +43 -0
- data/README.md +8 -1
- data/Rakefile +7 -0
- data/lib/workhours/version.rb +1 -1
- metadata +3 -3
- data/lib/workhours/multiday_period_error.rb +0 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 321ca35606fb53de420ed25f34736e0f7aca8a32
|
|
4
|
+
data.tar.gz: 84e19844cdb9972de08e95adfc9e4de2181cd7ea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e840d6d85afb9756f36f14f421a54018ffe11ecf5326f4c5048b460c9eeb71306ebd4bf032f89b8adff7a2de6db91887174bbb503fa486dbf3397d324bd790df
|
|
7
|
+
data.tar.gz: 7d5a03f720181891a80913a5ef3dab1dae890c0adbef8bbf57d1de4c3a455e30659e0ab41702c2d89cf40296b8e052dc12f1246cd030f6ab637b95fabc01137f
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
workhours (0.0.2)
|
|
5
|
+
tod
|
|
6
|
+
|
|
7
|
+
GEM
|
|
8
|
+
remote: https://rubygems.org/
|
|
9
|
+
specs:
|
|
10
|
+
diff-lcs (1.2.5)
|
|
11
|
+
docile (1.1.5)
|
|
12
|
+
multi_json (1.10.1)
|
|
13
|
+
rake (10.3.2)
|
|
14
|
+
rspec (3.0.0)
|
|
15
|
+
rspec-core (~> 3.0.0)
|
|
16
|
+
rspec-expectations (~> 3.0.0)
|
|
17
|
+
rspec-mocks (~> 3.0.0)
|
|
18
|
+
rspec-core (3.0.3)
|
|
19
|
+
rspec-support (~> 3.0.0)
|
|
20
|
+
rspec-expectations (3.0.3)
|
|
21
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
22
|
+
rspec-support (~> 3.0.0)
|
|
23
|
+
rspec-mocks (3.0.3)
|
|
24
|
+
rspec-support (~> 3.0.0)
|
|
25
|
+
rspec-support (3.0.3)
|
|
26
|
+
simplecov (0.9.0)
|
|
27
|
+
docile (~> 1.1.0)
|
|
28
|
+
multi_json
|
|
29
|
+
simplecov-html (~> 0.8.0)
|
|
30
|
+
simplecov-html (0.8.0)
|
|
31
|
+
timecop (0.7.1)
|
|
32
|
+
tod (1.4.0)
|
|
33
|
+
|
|
34
|
+
PLATFORMS
|
|
35
|
+
ruby
|
|
36
|
+
|
|
37
|
+
DEPENDENCIES
|
|
38
|
+
bundler (~> 1.6)
|
|
39
|
+
rake
|
|
40
|
+
rspec
|
|
41
|
+
simplecov
|
|
42
|
+
timecop
|
|
43
|
+
workhours!
|
data/README.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
[](https://travis-ci.org/rs-pro/workhours)
|
|
2
|
+
[](https://www.versioneye.com/user/projects/53e73e7635080d62b2000072)
|
|
3
|
+
[](http://rubygems.org/gems/workhours)
|
|
4
|
+
[](https://github.com/rs-pro/workhours/issues)
|
|
5
|
+
[](https://github.com/rs-pro/workhours/blob/master/LICENSE.txt)
|
|
6
|
+
|
|
7
|
+
|
|
1
8
|
# Workhours
|
|
2
9
|
|
|
3
10
|
Gem to calculate *buisness hours*, things like .is_open?, .is_closed?, .opens_at, .closes_at
|
|
@@ -30,7 +37,7 @@ Initialization:
|
|
|
30
37
|
|
|
31
38
|
# custom hours or days
|
|
32
39
|
week = Workhours::Week.new(open: '12:00', close: '20:00', week: %w(mon tue fri sat))
|
|
33
|
-
week = Workhours::Week.new(holidays: [Date.parse('2014-01-01')], week: Workhours::
|
|
40
|
+
week = Workhours::Week.new(holidays: [Date.parse('2014-01-01')], week: Workhours::ALL_DAYS)
|
|
34
41
|
# fully custom work hours
|
|
35
42
|
week = Workhours::Week.new(hours: ['mon 12:00-15:10', 'mon 15:00-16:00'])
|
|
36
43
|
|
data/Rakefile
CHANGED
data/lib/workhours/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: workhours
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- glebtv
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-08-
|
|
11
|
+
date: 2014-08-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: tod
|
|
@@ -106,11 +106,11 @@ files:
|
|
|
106
106
|
- ".ruby-version"
|
|
107
107
|
- ".travis.yml"
|
|
108
108
|
- Gemfile
|
|
109
|
+
- Gemfile.lock
|
|
109
110
|
- LICENSE.txt
|
|
110
111
|
- README.md
|
|
111
112
|
- Rakefile
|
|
112
113
|
- lib/workhours.rb
|
|
113
|
-
- lib/workhours/multiday_period_error.rb
|
|
114
114
|
- lib/workhours/period.rb
|
|
115
115
|
- lib/workhours/util.rb
|
|
116
116
|
- lib/workhours/version.rb
|