gyms 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 306801ddee326f026eab782787d53ad0fd029d70b3c65ac3cfc2b7767fd4b6d3
4
+ data.tar.gz: fbb642c4855e83495e7a4481c694b258fb6a8efd24a96aeddcd9c62753f3f0a7
5
+ SHA512:
6
+ metadata.gz: 5ff437a7e204ad4227b4afa4cf8b72c1d32305ec50170de2fcdd26734d176ffc14e790b5aed7b7be898f098268613fbb517e7de02eabc24b9b5dca971d95fa22
7
+ data.tar.gz: ca3527c849b89447ecee7fcd64940d8ab20c7de78548a9d662c8427f66fb012c7e9ad07af18265f53717167e9eb1dea6027445c86969d71bd6f665d709ef2915
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.5.1
5
+ before_install: gem install bundler -v 1.16.1
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at joshuacesana@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in gyms.gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,45 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ gyms (0.1.0)
5
+ nokogiri (~> 1.8, >= 1.8.3)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ coderay (1.1.2)
11
+ diff-lcs (1.3)
12
+ method_source (0.9.0)
13
+ mini_portile2 (2.3.0)
14
+ nokogiri (1.8.3)
15
+ mini_portile2 (~> 2.3.0)
16
+ pry (0.11.3)
17
+ coderay (~> 1.1.0)
18
+ method_source (~> 0.9.0)
19
+ rake (10.5.0)
20
+ rspec (3.7.0)
21
+ rspec-core (~> 3.7.0)
22
+ rspec-expectations (~> 3.7.0)
23
+ rspec-mocks (~> 3.7.0)
24
+ rspec-core (3.7.1)
25
+ rspec-support (~> 3.7.0)
26
+ rspec-expectations (3.7.0)
27
+ diff-lcs (>= 1.2.0, < 2.0)
28
+ rspec-support (~> 3.7.0)
29
+ rspec-mocks (3.7.0)
30
+ diff-lcs (>= 1.2.0, < 2.0)
31
+ rspec-support (~> 3.7.0)
32
+ rspec-support (3.7.1)
33
+
34
+ PLATFORMS
35
+ ruby
36
+
37
+ DEPENDENCIES
38
+ bundler (~> 1.16)
39
+ gyms!
40
+ pry (~> 0)
41
+ rake (~> 10.0)
42
+ rspec (~> 3.0)
43
+
44
+ BUNDLED WITH
45
+ 1.16.1
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Josh Cesana
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/NOTES.md ADDED
@@ -0,0 +1,28 @@
1
+ <!-- How to Build a CLI Gem
2
+
3
+ 1. Plan your gem, imagine your interface
4
+ 2. Start with the project structure - google
5
+ 3. Start with the entry point - the file run
6
+ 4. Force that to build the CLI interface
7
+ 5. Stub out the interface
8
+ 6. Start making things real
9
+ 7. Discover objects.
10
+ 8. Program
11
+
12
+
13
+ - A command line interface to locate nearby gyms, giving details of the gym (name, location, phone)
14
+
15
+ user types zip code
16
+ data: http://www.gymsandfitnessclubs.com/gyms-by-location/results.php?postal_code=94582
17
+
18
+ list of 10 nearest gyms is displayed
19
+
20
+
21
+ user picks number option to show name, address, phone of selected gym
22
+
23
+ 24 Hour Fitness
24
+ 4450 Norris Canyon Rd
25
+ San Ramon, CA 94583-5415
26
+ (925) 244-9855
27
+
28
+ user can continue to make number selections for detailed info
data/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # Gyms
2
+
3
+ Gyms will help you locate a nearby gym (using a zip code) and will display the gym name, address, and phone number.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'gyms'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install gyms
20
+
21
+ ## Usage
22
+
23
+ $ .bin/gyms
24
+
25
+ ## Development
26
+
27
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
28
+
29
+ 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
30
+
31
+ ## Contributing
32
+
33
+ Bug reports and pull requests are welcome on GitHub at https://github.com/JCesana/gyms. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
34
+
35
+ ## License
36
+
37
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
38
+
39
+ ## Code of Conduct
40
+
41
+ Everyone interacting in the Gyms project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/gyms/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "gyms"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/gyms ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "gyms"
5
+
6
+ Gyms::CLI.new.call
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/gyms.gemspec ADDED
@@ -0,0 +1,41 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "gyms/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "gyms"
8
+ spec.version = Gyms::VERSION
9
+ spec.authors = ["Josh Cesana"]
10
+ spec.email = ["joshuacesana@gmail.com"]
11
+
12
+ spec.summary = %q{Find gyms by zip code.}
13
+ spec.description = %q{Locate details of gyms within a certain zip code.}
14
+ spec.homepage = "https://github.com/JCesana"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ # if spec.respond_to?(:metadata)
20
+ # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
21
+ # else
22
+ # raise "RubyGems 2.0 or newer is required to protect against " \
23
+ # "public gem pushes."
24
+ # end
25
+
26
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
27
+ f.match(%r{^(test|spec|features)/})
28
+ end
29
+ spec.bindir = "exe"
30
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
+ spec.require_paths = ["lib"]
32
+
33
+ spec.add_development_dependency "bundler", "~> 1.16"
34
+ spec.add_development_dependency "rake", "~> 10.0"
35
+ spec.add_development_dependency "rspec", "~> 3.0"
36
+ spec.add_development_dependency 'pry', '~> 0'
37
+
38
+ spec.add_dependency 'nokogiri', '~> 1.8', '>= 1.8.3'
39
+
40
+
41
+ end
data/lib/gyms/cli.rb ADDED
@@ -0,0 +1,87 @@
1
+ require 'pry'
2
+ class Gyms::CLI
3
+ attr_accessor :zip
4
+
5
+ def call
6
+ title
7
+ zip = get_zip
8
+ get_gyms(zip)
9
+ menu
10
+ goodbye
11
+ end
12
+
13
+ def title
14
+ puts ""
15
+ puts "Gym Locator"
16
+ puts ""
17
+ end
18
+
19
+ def get_gyms(zip)
20
+ @gyms = Gyms::Gym.get_local_gyms(zip)
21
+ end
22
+
23
+ def menu
24
+ input = nil
25
+ list_gyms
26
+
27
+ while input != "exit"
28
+ input = get_detail_input
29
+ display_detail(input)
30
+ end
31
+ end
32
+
33
+ def get_zip
34
+ puts "Enter zip code: "
35
+ input = gets.strip
36
+
37
+ if input.length != 5 || !string_only_numbers?(input) || input == nil
38
+ puts "* * * Invalid entry. Try again. * * * "
39
+ puts ""
40
+
41
+ get_zip
42
+ end
43
+
44
+ input
45
+ end
46
+
47
+ def string_only_numbers?(string)
48
+ string.scan(/\D/).empty?
49
+ end
50
+
51
+ def get_detail_input
52
+ puts "Type number for gym details or type exit:"
53
+ input = gets.strip
54
+
55
+ if input == "exit"
56
+ goodbye
57
+ elsif input == nil || input.to_i < 0 || input.to_i > 8 || input.count("a-zA-Z") > 0
58
+ puts "* * * Invalid entry. Try again. * * * "
59
+ puts ""
60
+ get_detail_input
61
+ else
62
+ input
63
+ end
64
+ end
65
+
66
+ def list_gyms
67
+ @gyms.each.with_index(1) do |gym, i|
68
+ puts "#{i}. #{gym.name}"
69
+ end
70
+ end
71
+
72
+ def display_detail(input)
73
+ puts ""
74
+ puts @gyms[input.to_i - 1].name
75
+ puts @gyms[input.to_i - 1].address1
76
+ puts @gyms[input.to_i - 1].address2
77
+ puts @gyms[input.to_i - 1].phone
78
+ puts ""
79
+ end
80
+
81
+ def goodbye
82
+ puts ""
83
+ puts "Enjoy your workout!"
84
+ puts ""
85
+ exit
86
+ end
87
+ end
data/lib/gyms/gym.rb ADDED
@@ -0,0 +1,135 @@
1
+ class Gyms::Gym
2
+ attr_accessor :name, :url, :address1, :address2, :phone
3
+
4
+ def self.get_local_gyms(zip)
5
+ puts ""
6
+ puts "Finding your gyms..."
7
+ puts ""
8
+
9
+ main_url = "http://www.gymsandfitnessclubs.com"
10
+ http = "http://www.gymsandfitnessclubs.com/gyms-by-location/results.php?postal_code=#{zip}"
11
+ doc = Nokogiri::HTML(open(http))
12
+
13
+ # Invalid zip code ("Sorry" is found on webpage when invalid zip code is entered by user)
14
+ if doc.search("#marquee_content").text.include?("Sorry")
15
+ puts ""
16
+ puts "* * * Invalid zip code. Try again. * * * "
17
+ puts ""
18
+ Gyms::CLI.new.call
19
+ end
20
+
21
+ gyms = []
22
+
23
+ gym_1 = self.new
24
+ gym_1.name = doc.search("#marquee_content").css("ul")[0].css("a strong").text.strip
25
+ gym_1.url = doc.search("#marquee_content").css("ul")[0].css("a").attribute("href").text.strip
26
+
27
+ gym_1_detail_doc = Nokogiri::HTML(open("#{main_url}#{gym_1.url}"))
28
+ gym_1_data = gym_1_detail_doc.search("#marquee_content p").text
29
+
30
+ gym_1.address1 = gym_1_detail_doc.search(".address1").text.strip
31
+ gym_1.address2 = gym_1_detail_doc.search(".address2").text.strip
32
+ gym_1.phone = /(\(\d{3}\) \d{3}-\d{4})/.match(gym_1_data)[1] #<-- do not change this index
33
+
34
+ gyms << gym_1
35
+
36
+
37
+ gym_2 = self.new
38
+ gym_2.name = doc.search("#marquee_content").css("ul")[1].css("a strong").text
39
+ gym_2.url = doc.search("#marquee_content").css("ul")[1].css("a").attribute("href").text
40
+
41
+ gym_2_detail_doc = Nokogiri::HTML(open("#{main_url}#{gym_2.url}"))
42
+ gym_2_data = gym_2_detail_doc.search("#marquee_content p").text
43
+
44
+ gym_2.address1 = gym_2_detail_doc.search(".address1").text.strip
45
+ gym_2.address2 = gym_2_detail_doc.search(".address2").text.strip
46
+ gym_2.phone = /(\(\d{3}\) \d{3}-\d{4})/.match(gym_2_data)[1] #<-- do not change this index
47
+
48
+ gyms << gym_2
49
+
50
+
51
+ gym_3 = self.new
52
+ gym_3.name = doc.search("#marquee_content").css("ul")[2].css("a strong").text
53
+ gym_3.url = doc.search("#marquee_content").css("ul")[2].css("a").attribute("href").text
54
+
55
+ gym_3_detail_doc = Nokogiri::HTML(open("#{main_url}#{gym_3.url}"))
56
+ gym_3_data = gym_3_detail_doc.search("#marquee_content p").text
57
+
58
+ gym_3.address1 = gym_3_detail_doc.search(".address1").text.strip
59
+ gym_3.address2 = gym_3_detail_doc.search(".address2").text.strip
60
+ gym_3.phone = /(\(\d{3}\) \d{3}-\d{4})/.match(gym_3_data)[1] #<-- do not change this index
61
+
62
+ gyms << gym_3
63
+
64
+
65
+ gym_4 = self.new
66
+ gym_4.name = doc.search("#marquee_content").css("ul")[3].css("a strong").text
67
+ gym_4.url = doc.search("#marquee_content").css("ul")[3].css("a").attribute("href").text
68
+
69
+ gym_4_detail_doc = Nokogiri::HTML(open("#{main_url}#{gym_4.url}"))
70
+ gym_4_data = gym_4_detail_doc.search("#marquee_content p").text
71
+
72
+ gym_4.address1 = gym_4_detail_doc.search(".address1").text.strip
73
+ gym_4.address2 = gym_4_detail_doc.search(".address2").text.strip
74
+ gym_4.phone = /(\(\d{3}\) \d{3}-\d{4})/.match(gym_4_data)[1] #<-- do not change this index
75
+
76
+ gyms << gym_4
77
+
78
+
79
+ gym_5 = self.new
80
+ gym_5.name = doc.search("#marquee_content").css("ul")[4].css("a strong").text
81
+ gym_5.url = doc.search("#marquee_content").css("ul")[4].css("a").attribute("href").text
82
+
83
+ gym_5_detail_doc = Nokogiri::HTML(open("#{main_url}#{gym_5.url}"))
84
+ gym_5_data = gym_5_detail_doc.search("#marquee_content p").text
85
+
86
+ gym_5.address1 = gym_5_detail_doc.search(".address1").text.strip
87
+ gym_5.address2 = gym_5_detail_doc.search(".address2").text.strip
88
+ gym_5.phone = /(\(\d{3}\) \d{3}-\d{4})/.match(gym_5_data)[1] #<-- do not change this index
89
+
90
+ gyms << gym_5
91
+
92
+
93
+ gym_6 = self.new
94
+ gym_6.name = doc.search("#marquee_content").css("ul")[5].css("a strong").text
95
+ gym_6.url = doc.search("#marquee_content").css("ul")[5].css("a").attribute("href").text
96
+
97
+ gym_6_detail_doc = Nokogiri::HTML(open("#{main_url}#{gym_6.url}"))
98
+ gym_6_data = gym_6_detail_doc.search("#marquee_content p").text
99
+
100
+ gym_6.address1 = gym_6_detail_doc.search(".address1").text.strip
101
+ gym_6.address2 = gym_6_detail_doc.search(".address2").text.strip
102
+ gym_6.phone = /(\(\d{3}\) \d{3}-\d{4})/.match(gym_6_data)[1] #<-- do not change this index
103
+
104
+ gyms << gym_6
105
+
106
+
107
+ gym_7 = self.new
108
+ gym_7.name = doc.search("#marquee_content").css("ul")[6].css("a strong").text
109
+ gym_7.url = doc.search("#marquee_content").css("ul")[6].css("a").attribute("href").text
110
+
111
+ gym_7_detail_doc = Nokogiri::HTML(open("#{main_url}#{gym_7.url}"))
112
+ gym_7_data = gym_7_detail_doc.search("#marquee_content p").text
113
+
114
+ gym_7.address1 = gym_7_detail_doc.search(".address1").text.strip
115
+ gym_7.address2 = gym_7_detail_doc.search(".address2").text.strip
116
+ gym_7.phone = /(\(\d{3}\) \d{3}-\d{4})/.match(gym_7_data)[1] #<-- do not change this index
117
+
118
+ gyms << gym_7
119
+
120
+
121
+ gym_8 = self.new
122
+ gym_8.name = doc.search("#marquee_content").css("ul")[7].css("a strong").text
123
+ gym_8.url = doc.search("#marquee_content").css("ul")[7].css("a").attribute("href").text
124
+
125
+ gym_8_detail_doc = Nokogiri::HTML(open("#{main_url}#{gym_8.url}"))
126
+ gym_8_data = gym_8_detail_doc.search("#marquee_content p").text
127
+
128
+ gym_8.address1 = gym_8_detail_doc.search(".address1").text.strip
129
+ gym_8.address2 = gym_8_detail_doc.search(".address2").text.strip
130
+ gym_8.phone = /(\(\d{3}\) \d{3}-\d{4})/.match(gym_8_data)[1] #<-- do not change this index
131
+
132
+ gyms << gym_8
133
+ end
134
+
135
+ end
@@ -0,0 +1,3 @@
1
+ module Gyms
2
+ VERSION = "0.1.0"
3
+ end
data/lib/gyms.rb ADDED
@@ -0,0 +1,7 @@
1
+ require 'nokogiri'
2
+ require 'open-uri'
3
+ require 'pry'
4
+
5
+ require_relative "./gyms/version"
6
+ require_relative './gyms/cli'
7
+ require_relative './gyms/gym'
data/spec.md ADDED
@@ -0,0 +1,6 @@
1
+ # Specifications for the CLI Assessment
2
+
3
+ Specs:
4
+ - [x] Have a CLI for interfacing with the application
5
+ - [x] Pull data from an external source
6
+ - [x] Implement both list and detail views
metadata ADDED
@@ -0,0 +1,139 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gyms
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Josh Cesana
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-06-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.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
+ - !ruby/object:Gem::Dependency
70
+ name: nokogiri
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.8'
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: 1.8.3
79
+ type: :runtime
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - "~>"
84
+ - !ruby/object:Gem::Version
85
+ version: '1.8'
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: 1.8.3
89
+ description: Locate details of gyms within a certain zip code.
90
+ email:
91
+ - joshuacesana@gmail.com
92
+ executables: []
93
+ extensions: []
94
+ extra_rdoc_files: []
95
+ files:
96
+ - ".gitignore"
97
+ - ".rspec"
98
+ - ".travis.yml"
99
+ - CODE_OF_CONDUCT.md
100
+ - Gemfile
101
+ - Gemfile.lock
102
+ - LICENSE.txt
103
+ - NOTES.md
104
+ - README.md
105
+ - Rakefile
106
+ - bin/console
107
+ - bin/gyms
108
+ - bin/setup
109
+ - gyms.gemspec
110
+ - lib/gyms.rb
111
+ - lib/gyms/cli.rb
112
+ - lib/gyms/gym.rb
113
+ - lib/gyms/version.rb
114
+ - spec.md
115
+ homepage: https://github.com/JCesana
116
+ licenses:
117
+ - MIT
118
+ metadata: {}
119
+ post_install_message:
120
+ rdoc_options: []
121
+ require_paths:
122
+ - lib
123
+ required_ruby_version: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - ">="
126
+ - !ruby/object:Gem::Version
127
+ version: '0'
128
+ required_rubygems_version: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ requirements: []
134
+ rubyforge_project:
135
+ rubygems_version: 2.7.6
136
+ signing_key:
137
+ specification_version: 4
138
+ summary: Find gyms by zip code.
139
+ test_files: []