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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: efe9aedb65271311321dc107a2b7c98df335c741
4
- data.tar.gz: adf759a2801d14156b0606891bd333ddb7c4fe0f
3
+ metadata.gz: 321ca35606fb53de420ed25f34736e0f7aca8a32
4
+ data.tar.gz: 84e19844cdb9972de08e95adfc9e4de2181cd7ea
5
5
  SHA512:
6
- metadata.gz: 7cb8ba8f431fa514d2e3ff6760eca5f701faa8c013625a0b78416ac34c81e0197f33e6d889b6750b427068f853f2b4ed1dd28ffc48fbde7a1c5b1959da34c694
7
- data.tar.gz: f26e5f6071f6cb862ba4aa7008ee5f6176c80cebde302d015a937703254805910decea3eb8a34c7d7c81b8a9b439c427c05ae1c0c0b4f31fb816f9f4d3f97778
6
+ metadata.gz: e840d6d85afb9756f36f14f421a54018ffe11ecf5326f4c5048b460c9eeb71306ebd4bf032f89b8adff7a2de6db91887174bbb503fa486dbf3397d324bd790df
7
+ data.tar.gz: 7d5a03f720181891a80913a5ef3dab1dae890c0adbef8bbf57d1de4c3a455e30659e0ab41702c2d89cf40296b8e052dc12f1246cd030f6ab637b95fabc01137f
data/.gitignore CHANGED
@@ -3,7 +3,6 @@
3
3
  .bundle
4
4
  .config
5
5
  .yardoc
6
- Gemfile.lock
7
6
  InstalledFiles
8
7
  _yardoc
9
8
  coverage
data/.travis.yml CHANGED
@@ -1,8 +1,9 @@
1
1
  language: ruby
2
2
  services: mongodb
3
3
 
4
+ notifications:
5
+ email: false
6
+
4
7
  rvm:
5
- - 1.9.3
6
- - 2.0.0
7
- - 2.1.1
8
+ - 2.1.2
8
9
 
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
+ [![Build Status](https://travis-ci.org/rs-pro/workhours.svg)](https://travis-ci.org/rs-pro/workhours)
2
+ [![Dependency Status](https://www.versioneye.com/user/projects/53e73e7635080d62b2000072/badge.svg)](https://www.versioneye.com/user/projects/53e73e7635080d62b2000072)
3
+ [![Gem version](http://img.shields.io/gem/v/workhours.svg)](http://rubygems.org/gems/workhours)
4
+ [![Issues](http://img.shields.io/github/issues/rs-pro/workhours.svg)](https://github.com/rs-pro/workhours/issues)
5
+ [![License](http://img.shields.io/:license-mit-blue.svg)](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::ALL_WEEK)
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
@@ -1,2 +1,9 @@
1
1
  require "bundler/gem_tasks"
2
2
 
3
+ require 'rspec/core/rake_task'
4
+
5
+ desc 'Default: run specs.'
6
+ task :default => :spec
7
+
8
+ desc "Run specs"
9
+ RSpec::Core::RakeTask.new
@@ -1,3 +1,3 @@
1
1
  module Workhours
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
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.1
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-02 00:00:00.000000000 Z
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
@@ -1,4 +0,0 @@
1
- module Workhours
2
-
3
- end
4
-