zone_detect 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/CHANGELOG.markdown +5 -0
- data/Gemfile +11 -0
- data/LICENSE +48 -0
- data/README.markdown +46 -0
- data/ext/zone_detect/contrib/ZoneDetect/LICENSE +24 -0
- data/ext/zone_detect/contrib/ZoneDetect/library/zonedetect.c +1260 -0
- data/ext/zone_detect/contrib/ZoneDetect/library/zonedetect.h +92 -0
- data/ext/zone_detect/extconf.rb +9 -0
- data/ext/zone_detect/zone_detect.c +49 -0
- data/ext/zone_detect/zone_detect.h +8 -0
- data/lib/zone_detect/version.rb +5 -0
- data/lib/zone_detect.rb +4 -0
- data/sig/zone_detect.rbs +7 -0
- data/zone_detect.gemspec +34 -0
- metadata +61 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f74a81499efffb49b63519c5206da7a679fa04810586fa1d3af612696d91ab72
|
4
|
+
data.tar.gz: b6be4177fcb50c5b88fa4f3c7a8586950e3be4e269ba2e955ac64ace722770d7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4bfc7dd6883badcfcd138a821b267da5b437899c4a7276ab74cc18c45a524b56e953f5aa1539ce297c5a27a0f285317cd0a7dffe20910a54244d38800b6052d4
|
7
|
+
data.tar.gz: 132fb305d66ed4129b5c51fb0f4f44bc80dff950d72c7ad31c7f346f08cf2acffd066c51391591c92daac81b1eff29440133e8b1255a7917669ebb4fde6f4c04
|
data/CHANGELOG.markdown
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2023 Alexander Cederblad
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
22
|
+
|
23
|
+
Required software ZoneDetect is provided under license:
|
24
|
+
|
25
|
+
Copyright (c) 2018-2019, Bertold Van den Bergh (vandenbergh@bertold.org)
|
26
|
+
All rights reserved.
|
27
|
+
|
28
|
+
Redistribution and use in source and binary forms, with or without
|
29
|
+
modification, are permitted provided that the following conditions are met:
|
30
|
+
* Redistributions of source code must retain the above copyright
|
31
|
+
notice, this list of conditions and the following disclaimer.
|
32
|
+
* Redistributions in binary form must reproduce the above copyright
|
33
|
+
notice, this list of conditions and the following disclaimer in the
|
34
|
+
documentation and/or other materials provided with the distribution.
|
35
|
+
* Neither the name of the author nor the
|
36
|
+
names of its contributors may be used to endorse or promote products
|
37
|
+
derived from this software without specific prior written permission.
|
38
|
+
|
39
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
40
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
41
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
42
|
+
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR DISTRIBUTOR BE LIABLE FOR ANY
|
43
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
44
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
45
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
46
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
47
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
48
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.markdown
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# ZoneDetect
|
2
|
+
|
3
|
+
Find time zone from given coordinates.
|
4
|
+
|
5
|
+
The gem builds on and is namesake of <https://github.com/BertoldVdb/ZoneDetect>,
|
6
|
+
third-party license included in [LICENSE](LICENSE).
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Install the gem and add to the application's Gemfile by executing:
|
11
|
+
|
12
|
+
```
|
13
|
+
$ bundle add zone_detect
|
14
|
+
```
|
15
|
+
|
16
|
+
If bundler is not being used to manage dependencies, install the gem by
|
17
|
+
executing:
|
18
|
+
|
19
|
+
```
|
20
|
+
$ gem install zone_detect
|
21
|
+
```
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
require "zone_detect"
|
27
|
+
zd = ZoneDetect.new
|
28
|
+
zd.find(59.329, 18.063)
|
29
|
+
# => "Europe/Stockholm"
|
30
|
+
```
|
31
|
+
|
32
|
+
## Development
|
33
|
+
|
34
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
35
|
+
`rake test` to run the tests. You can also run `bin/console` for an interactive
|
36
|
+
prompt that will allow you to experiment.
|
37
|
+
|
38
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To
|
39
|
+
release a new version, update the version number in `version.rb`, and then run
|
40
|
+
`bundle exec rake release`, which will create a git tag for the version, push
|
41
|
+
git commits and the created tag, and push the `.gem` file to
|
42
|
+
[rubygems.org](https://rubygems.org).
|
43
|
+
|
44
|
+
## License
|
45
|
+
|
46
|
+
[LICENSE](LICENSE)
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Copyright (c) 2018-2019, Bertold Van den Bergh (vandenbergh@bertold.org)
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
6
|
+
* Redistributions of source code must retain the above copyright
|
7
|
+
notice, this list of conditions and the following disclaimer.
|
8
|
+
* Redistributions in binary form must reproduce the above copyright
|
9
|
+
notice, this list of conditions and the following disclaimer in the
|
10
|
+
documentation and/or other materials provided with the distribution.
|
11
|
+
* Neither the name of the author nor the
|
12
|
+
names of its contributors may be used to endorse or promote products
|
13
|
+
derived from this software without specific prior written permission.
|
14
|
+
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
16
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
17
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR DISTRIBUTOR BE LIABLE FOR ANY
|
19
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
20
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
21
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
22
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
23
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
24
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|