opening_hours_converter 1.13.7 → 1.13.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 323387cf1e5e01948cf29e1e2a8f0037b3b70c827ac5d20e7fd68e557e87ad22
4
- data.tar.gz: 83f7ca5fa616cb1d53fe156512689540d36624b34988e79cf335f959b6dfc156
3
+ metadata.gz: 246bb142155bcbb71be257921ab532cab3db6a7a266e141d63d8a5a7ddd45ddc
4
+ data.tar.gz: 625fda5fdacbd0d87010df460b46113de0307c9fdbf3b646f66863c8d958f909
5
5
  SHA512:
6
- metadata.gz: d89ba9be9286a35eec8eb7b0424be359cf080e303a561241ddfe35ee68702bf48cd70f74a0bfe3c6eaa219b70f6ae27b254490a0ce1de3c61218e91c9fc0a1a5
7
- data.tar.gz: ab7e7d65a6b9bde071d9030cc3e8d7c8ffcc9cd6280c5e36d3182c0345722ef27a3d37ebc0ab67054a12effb08ae361713f85ee062232158b751ba5501f45e8d
6
+ metadata.gz: 363ac0c2e07547bbcb68524bfd9c77e5e751062576baf4af0a8ba593e10fb2c24066d8e10a2b6f86516547fc6f394372e87bedc42dec1682be3bc0ba645cf374
7
+ data.tar.gz: f386100e7b74a1eaeebac6eb9c15a88255f7e6f9769e6b5a57a4f8afa4e19904ba7ee232bd4a923ffa3ddbcb5c269c1d471fce23620dbd1f0bc52ef03e266d80
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Unable to parse Opening Hours String
4
+ class OpeningHoursConverter::ParseError < StandardError; end
@@ -1,7 +1,7 @@
1
1
  module OpeningHoursConverter
2
2
  require 'date'
3
3
  require_relative './opening_hours_converter/utils'
4
- require_relative './opening_hours_converter/errors.rb'
4
+ require_relative './opening_hours_converter/errors'
5
5
  require_relative './opening_hours_converter/regex_handler'
6
6
  require_relative './opening_hours_converter/date_range'
7
7
  require_relative './opening_hours_converter/token'
data/readme.md ADDED
@@ -0,0 +1,40 @@
1
+ # Opening Hours Converter
2
+
3
+ ![](https://github.com/Publidata/opening_hours_converter/workflows/CI/badge.svg)
4
+
5
+ OpenStreetMap Opening Hours to Date & Date to Opening Hours
6
+
7
+ See [Wiki](https://wiki.openstreetmap.org/wiki/Key:opening_hours/specification) for OpenStreetMap Opening Hours specification.
8
+
9
+ # Installation
10
+
11
+ ```
12
+ gem install opening_hours_converter
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```ruby
18
+ require 'opening_hours_converter'
19
+
20
+ parsed_oh = OpeningHoursConverter::OpeningHoursParser.new.parse('Mo 10:00-12:00')
21
+ oh_string = OpeningHoursConverter::OpeningHoursBuilder.new.build(parsed_oh)
22
+ ```
23
+
24
+ ## Test
25
+
26
+ Install the dependencies with:
27
+
28
+ ```
29
+ bundle install
30
+ ```
31
+
32
+ Then run all the tests with:
33
+
34
+ ```
35
+ rspec spec --format=documentation
36
+ ```
37
+
38
+ ## Credits
39
+
40
+ Done with [YoHours](https://framagit.org/PanierAvide/YoHours) as inspiration and with constant help from the [Evaluation tool](http://openingh.openstreetmap.de/evaluation_tool/)/[repository](https://github.com/opening-hours/opening_hours.js).
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opening_hours_converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.7
4
+ version: 1.13.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ziserman Martin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-17 00:00:00.000000000 Z
11
+ date: 2020-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -38,8 +38,36 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description: Datetime range to openinghours, openinghours to datetime range. Very
42
- strongly inspired by yohours.
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: pry
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
+ description: Datetime range to opening hours, opening hours to datetime range. Very
70
+ strongly inspired by YoHours.
43
71
  email: tech@publidata.io
44
72
  executables: []
45
73
  extensions: []
@@ -49,6 +77,7 @@ files:
49
77
  - lib/opening_hours_converter/constants.rb
50
78
  - lib/opening_hours_converter/date_range.rb
51
79
  - lib/opening_hours_converter/day.rb
80
+ - lib/opening_hours_converter/errors.rb
52
81
  - lib/opening_hours_converter/interval.rb
53
82
  - lib/opening_hours_converter/iterator.rb
54
83
  - lib/opening_hours_converter/opening_hours_builder.rb
@@ -66,6 +95,7 @@ files:
66
95
  - lib/opening_hours_converter/week_index.rb
67
96
  - lib/opening_hours_converter/wide_interval.rb
68
97
  - lib/opening_hours_converter/year.rb
98
+ - readme.md
69
99
  homepage: https://github.com/Publidata/opening_hours_converter
70
100
  licenses:
71
101
  - AGPL-3.0
@@ -85,8 +115,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
115
  - !ruby/object:Gem::Version
86
116
  version: '0'
87
117
  requirements: []
88
- rubygems_version: 3.0.3
118
+ rubyforge_project:
119
+ rubygems_version: 2.7.10
89
120
  signing_key:
90
121
  specification_version: 4
91
- summary: Datetime range to openinghours, openinghours to datetime range
122
+ summary: Datetime range to opening hours, opening hours to datetime range
92
123
  test_files: []