colorado_trails 0.1.1 → 0.1.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
  SHA256:
3
- metadata.gz: b465227589415f06c9f58c295dd27e8933ebc3ac4bd636d75fd693ff7b8d053f
4
- data.tar.gz: 17a0f6fa6cfeb9abac785d20696aa3c2302b05e5ecb1d0cfbc7eaf67de9d52fb
3
+ metadata.gz: fc4e34f0a55ccf719ceb7ce7ceecc4aeb8ceb7a2c4c6fa6b1ae1ef8d1859fe0b
4
+ data.tar.gz: 93b3141314a612dfafbd5d935f9f4fd6dfb09d47f0b222c1ff4d7967fcc11c1c
5
5
  SHA512:
6
- metadata.gz: 3afecf468044cee564bf495e4688a2a91bdc4e86684c99a65376084367d6873bc4ab89d1270cdab27c21a933784c69a13291d4fc3f9002fce8d65c52f5b2c82c
7
- data.tar.gz: 8683b34bb7d64d6938e63d4cccfa97b62beae69644ebd363d3fac24f36cd15a490fb323bddbdb1034a8c20c65660c64e0666ac8d15201495f7294f59cbabd3b9
6
+ metadata.gz: 45715bb3b195fd2d39ec2b9e695f4deafd33df9b60a0fa8a61fb1fee666a7edfd15bc20a644812336355752788d2544419a58e535dd71784bb8d870ad7aa050a
7
+ data.tar.gz: 560776271c32a6257d7ecb411a72c31b5f7c008cee400f70211cad1fb3cac9b4359365e9a324b8a0d66d75cec4eb9f38eda51eab37bf8b9b73384f23075a995d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- colorado_trails (0.1.0)
4
+ colorado_trails (0.1.1)
5
5
  artii
6
6
  colorize
7
7
 
@@ -39,6 +39,7 @@ PLATFORMS
39
39
 
40
40
  DEPENDENCIES
41
41
  bundler (~> 2.0)
42
+ colorado_trails!
42
43
  nokogiri
43
44
  pry
44
45
  rake (~> 10.0)
data/README.md CHANGED
@@ -1 +1,45 @@
1
- # off_road_trails
1
+ Welcome to Colorado Trails!
2
+
3
+
4
+ About this Gem:
5
+
6
+ The intention for this gem was to connect my love for the outdoors with my love for code.
7
+ In the app, you will have the opportunity to explore Colorado's Top20 trails in a variety of categories.
8
+ Once you picked a specific trail, more detailed information about said trail will be displayed.
9
+
10
+
11
+ Install Instructions:
12
+
13
+ RubyGems.org option:
14
+
15
+ If you are reading this, chances are you know a bit about code and how to run a ruby gem.
16
+ If not, feel free to reach out to me on GitHub - @ChrstphGrnr or on Slack @ChrstphGrnr
17
+
18
+ This is published on RubyGems.org and thus you can install it easily with the following terminal command:
19
+
20
+ gem install colorado_trails
21
+
22
+ Once installed you will need to go into the colorado_trails/bin folder and execute the 'run' file.
23
+
24
+ This will open the app for you to use.
25
+
26
+
27
+ OR:
28
+
29
+ Fork and Clone it on GitHub and open it in your favorite local environment.
30
+ Once it's loaded in your environment, open terminal, navigate into the colorado_trails/bin folder and type ./run
31
+
32
+
33
+ This Gem is published under the MIT license - https://opensource.org/licenses/MIT
34
+
35
+
36
+ I want to thank a few people for their contribution to the development process:
37
+
38
+ !Slackers cohort - Flatiron Staff in general - particularly Alex Aguilar.
39
+
40
+ For any questions, feel free to reach out on GitHub.
41
+
42
+
43
+
44
+
45
+
@@ -16,16 +16,15 @@ Gem::Specification.new do |spec|
16
16
 
17
17
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
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"] = "https://rubygems.org"
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
21
21
 
22
- # spec.metadata["homepage_uri"] = spec.homepage
23
- # spec.metadata["source_code_uri"] = "https://github.com/ChrstphGrnr/colorado_trails"
22
+ spec.metadata["homepage_uri"] = spec.homepage
23
+ spec.metadata["source_code_uri"] = "https://github.com/ChrstphGrnr/colorado_trails"
24
24
 
25
- # else
26
- # raise "RubyGems 2.0 or newer is required to protect against " \
27
- # "public gem pushes."
28
- # end
25
+ else
26
+ raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
27
+ end
29
28
 
30
29
  # Specify which files should be added to the gem when it is released.
31
30
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -45,6 +44,4 @@ Gem::Specification.new do |spec|
45
44
  spec.add_dependency 'colorize'
46
45
  spec.add_dependency 'artii'
47
46
 
48
-
49
-
50
47
  end
@@ -56,6 +56,8 @@ class ColoradoTrails::Scraper
56
56
  trail.duration = info[i].strip
57
57
  when "distance"
58
58
  trail.distance = info[i].strip + " miles"
59
+ when "accessibility"
60
+ trail.accessibility = info[i].strip
59
61
  end
60
62
  end
61
63
 
@@ -79,7 +81,7 @@ class ColoradoTrails::Scraper
79
81
  trail.rating = "#{doc.css('div.rating-section').children.css('img').attribute('alt').text[0]}/5 stars"
80
82
 
81
83
  trail.description = nil
82
- # binding.pry
84
+
83
85
  if !doc.css('p.summary').empty?
84
86
  trail.description = doc.css('p.summary').text.delete'(/["]/)'
85
87
  else
@@ -1,7 +1,7 @@
1
1
  class ColoradoTrails::Trails
2
2
 
3
3
  attr_accessor :name, :location, :rating, :description, :type, :url,
4
- :difficulty, :distance, :duration
4
+ :difficulty, :distance, :duration, :accessibility
5
5
  @@all = []
6
6
 
7
7
  def initialize(name= nil, location= nil, rating= nil, url= nil)
@@ -33,12 +33,14 @@ class ColoradoTrails::Trails
33
33
  trail_name = self.name.delete("(/\#|[0-9]/)").strip
34
34
 
35
35
  puts "\n\nHere are the details for #{trail_name}:\n\n".colorize(:light_blue)
36
- puts "Rating: #{self.rating}".colorize(:light_blue) unless self.rating == nil || self.rating.empty?
37
- puts "Trail Type: #{self.type}".colorize(:light_blue) unless self.type == nil || self.type.empty?
38
- puts "Distance #{self.distance}".colorize(:light_blue) unless self.distance == nil || self.distance.empty?
39
- puts "Duration #{self.duration}".colorize(:light_blue) unless self.duration == nil || self.duration.empty?
40
- puts "Difficulty #{self.difficulty}".colorize(:light_blue) unless self.difficulty == nil || self.duration.empty?
41
- puts "Website #{self.url}".colorize(:light_blue)
36
+ puts "Rating: #{self.rating}".colorize(:light_blue) unless self.rating == nil
37
+ puts "Trail Type: #{self.type}".colorize(:light_blue) unless self.type == nil
38
+ puts "Distance: #{self.distance}".colorize(:light_blue) unless self.distance == nil
39
+ puts "Duration: #{self.duration}".colorize(:light_blue) unless self.duration == nil
40
+ puts "Difficulty: #{self.difficulty}".colorize(:light_blue) unless self.difficulty == nil
41
+ puts "Accessibility: #{self.accessibility}".colorize(:light_blue) unless self.accessibility == nil
42
+ puts "Website: #{self.url}".colorize(:light_blue)
43
+
42
44
 
43
45
  if self.description != nil || self.description != ""
44
46
  # binding.pry
@@ -1,3 +1,3 @@
1
1
  module ColoradoTrails
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: colorado_trails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ChrstphGrnr
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-16 00:00:00.000000000 Z
11
+ date: 2019-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -138,7 +138,10 @@ files:
138
138
  homepage: https://github.com/ChrstphGrnr/colorado_trails.git
139
139
  licenses:
140
140
  - MIT
141
- metadata: {}
141
+ metadata:
142
+ allowed_push_host: https://rubygems.org
143
+ homepage_uri: https://github.com/ChrstphGrnr/colorado_trails.git
144
+ source_code_uri: https://github.com/ChrstphGrnr/colorado_trails
142
145
  post_install_message:
143
146
  rdoc_options: []
144
147
  require_paths: