touringplans 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/.rubocop.yml +13 -0
- data/.version +1 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +14 -0
- data/Gemfile.lock +51 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +16 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/lib/touringplans/version.rb +5 -0
- data/lib/touringplans.rb +33 -0
- data/touringplans.gemspec +38 -0
- metadata +74 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ac65da412a524dde7cc16db943d0f55ab38984bd5b9736fa9c209a7e6da8a5f3
|
4
|
+
data.tar.gz: e46b800c1ccd95df6e26842610a3976b1bc1bff6859de260819718cf3f4b11c0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: '08b04c00ddbbc5fc1032e6f715c0e31d65476918080ecf423c8891967cf8654709ed19cf33c18f1a4a2355921e129a3b58938e457e9883b91a1327fe14f4f6c1'
|
7
|
+
data.tar.gz: bae9ce0a3abeef04449087c28af3ec86040985d52713fa17d31fcb76c6f0e36282c46bba1a6e672d50dcf08c5bb35e2f74ffbfa8b9be273ec5ad3f32a73b5cd1
|
data/.rubocop.yml
ADDED
data/.version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.2
|
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in touringplans.gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
gem "rake", "~> 13.0"
|
9
|
+
|
10
|
+
gem "minitest", "~> 5.0"
|
11
|
+
|
12
|
+
gem "rubocop", "~> 1.7"
|
13
|
+
|
14
|
+
gem 'httparty', '~> 0.19.0'
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
touringplans (0.1.0)
|
5
|
+
httparty (~> 0.19.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.2)
|
11
|
+
httparty (0.19.0)
|
12
|
+
mime-types (~> 3.0)
|
13
|
+
multi_xml (>= 0.5.2)
|
14
|
+
mime-types (3.3.1)
|
15
|
+
mime-types-data (~> 3.2015)
|
16
|
+
mime-types-data (3.2021.0901)
|
17
|
+
minitest (5.14.4)
|
18
|
+
multi_xml (0.6.0)
|
19
|
+
parallel (1.21.0)
|
20
|
+
parser (3.0.2.0)
|
21
|
+
ast (~> 2.4.1)
|
22
|
+
rainbow (3.0.0)
|
23
|
+
rake (13.0.6)
|
24
|
+
regexp_parser (2.1.1)
|
25
|
+
rexml (3.2.5)
|
26
|
+
rubocop (1.21.0)
|
27
|
+
parallel (~> 1.10)
|
28
|
+
parser (>= 3.0.0.0)
|
29
|
+
rainbow (>= 2.2.2, < 4.0)
|
30
|
+
regexp_parser (>= 1.8, < 3.0)
|
31
|
+
rexml
|
32
|
+
rubocop-ast (>= 1.9.1, < 2.0)
|
33
|
+
ruby-progressbar (~> 1.7)
|
34
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
35
|
+
rubocop-ast (1.11.0)
|
36
|
+
parser (>= 3.0.1.1)
|
37
|
+
ruby-progressbar (1.11.0)
|
38
|
+
unicode-display_width (2.1.0)
|
39
|
+
|
40
|
+
PLATFORMS
|
41
|
+
x86_64-darwin-20
|
42
|
+
|
43
|
+
DEPENDENCIES
|
44
|
+
httparty (~> 0.19.0)
|
45
|
+
minitest (~> 5.0)
|
46
|
+
rake (~> 13.0)
|
47
|
+
rubocop (~> 1.7)
|
48
|
+
touringplans!
|
49
|
+
|
50
|
+
BUNDLED WITH
|
51
|
+
2.2.27
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2021 captproton
|
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.
|
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# Touringplans
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/touringplans`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'touringplans'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle install
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install touringplans
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/touringplans.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "bundler/gem_tasks"
|
4
|
+
require "rake/testtask"
|
5
|
+
|
6
|
+
Rake::TestTask.new(:test) do |t|
|
7
|
+
t.libs << "test"
|
8
|
+
t.libs << "lib"
|
9
|
+
t.test_files = FileList["test/**/*_test.rb"]
|
10
|
+
end
|
11
|
+
|
12
|
+
require "rubocop/rake_task"
|
13
|
+
|
14
|
+
RuboCop::RakeTask.new
|
15
|
+
|
16
|
+
task default: %i[test rubocop]
|
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "touringplans"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require "irb"
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/touringplans.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "touringplans/version"
|
4
|
+
require "httparty"
|
5
|
+
module Touringplans
|
6
|
+
class Error < StandardError; end
|
7
|
+
# Your code goes here...\
|
8
|
+
include HTTParty
|
9
|
+
base_uri "touringplans.com"
|
10
|
+
|
11
|
+
# park dining
|
12
|
+
def self.find_all_dining_at_park(park_name)
|
13
|
+
formatted_park_name = park_name.to_s.downcase.gsub(" ", "-")
|
14
|
+
response = get("/#{formatted_park_name}/dining.json").parsed_response
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.find_all_counter_service_dining_at_park(park_name)
|
18
|
+
eateries = self.find_all_dining_at_park(park_name)
|
19
|
+
eateries[0]
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.find_all_table_service_dining_at_park(park_name)
|
23
|
+
eateries = self.find_all_dining_at_park(park_name)
|
24
|
+
eateries[1]
|
25
|
+
end
|
26
|
+
|
27
|
+
# park attractions
|
28
|
+
def self.find_all_attractions_at_park(park_name)
|
29
|
+
formatted_park_name = park_name.to_s.downcase.gsub(" ", "-")
|
30
|
+
response = get("/#{formatted_park_name}/attractions.json").parsed_response
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/touringplans/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "touringplans"
|
7
|
+
spec.version = Touringplans::VERSION
|
8
|
+
spec.authors = ["captproton"]
|
9
|
+
spec.email = ["carl@wdwhub.net"]
|
10
|
+
|
11
|
+
spec.summary = "TouringPlans.com is a great fan website to plan a trip to Walt Disney World in Florida. This ruby gem makes its API easier to work with."
|
12
|
+
spec.homepage = "https://github.com/wdwhub/touringplans"
|
13
|
+
spec.license = "MIT"
|
14
|
+
spec.required_ruby_version = ">= 2.4.0"
|
15
|
+
|
16
|
+
spec.metadata["homepage_uri"] = "https://github.com/wdwhub/touringplans"
|
17
|
+
spec.metadata["source_code_uri"] = "https://github.com/wdwhub/touringplans"
|
18
|
+
spec.metadata["changelog_uri"] = "https://github.com/wdwhub/touringplans/blob/main/Changelog.md"
|
19
|
+
|
20
|
+
spec.add_dependency 'httparty', '~> 0.19.0'
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
25
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
26
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
27
|
+
end
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
# Uncomment to register a new dependency of your gem
|
34
|
+
# spec.add_dependency "example-gem", "~> 1.0"
|
35
|
+
|
36
|
+
# For more information and examples about making a new gem, checkout our
|
37
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
38
|
+
end
|
metadata
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: touringplans
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- captproton
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-09-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: httparty
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.19.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.19.0
|
27
|
+
description:
|
28
|
+
email:
|
29
|
+
- carl@wdwhub.net
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- ".rubocop.yml"
|
35
|
+
- ".version"
|
36
|
+
- CHANGELOG.md
|
37
|
+
- Gemfile
|
38
|
+
- Gemfile.lock
|
39
|
+
- LICENSE.txt
|
40
|
+
- README.md
|
41
|
+
- Rakefile
|
42
|
+
- bin/console
|
43
|
+
- bin/setup
|
44
|
+
- lib/touringplans.rb
|
45
|
+
- lib/touringplans/version.rb
|
46
|
+
- touringplans.gemspec
|
47
|
+
homepage: https://github.com/wdwhub/touringplans
|
48
|
+
licenses:
|
49
|
+
- MIT
|
50
|
+
metadata:
|
51
|
+
homepage_uri: https://github.com/wdwhub/touringplans
|
52
|
+
source_code_uri: https://github.com/wdwhub/touringplans
|
53
|
+
changelog_uri: https://github.com/wdwhub/touringplans/blob/main/Changelog.md
|
54
|
+
post_install_message:
|
55
|
+
rdoc_options: []
|
56
|
+
require_paths:
|
57
|
+
- lib
|
58
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 2.4.0
|
63
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
requirements: []
|
69
|
+
rubygems_version: 3.2.15
|
70
|
+
signing_key:
|
71
|
+
specification_version: 4
|
72
|
+
summary: TouringPlans.com is a great fan website to plan a trip to Walt Disney World
|
73
|
+
in Florida. This ruby gem makes its API easier to work with.
|
74
|
+
test_files: []
|