se_climbing_videos 0.1.4 → 0.1.5

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
  SHA1:
3
- metadata.gz: a3b57436e9ac646427939cee72df74e264391653
4
- data.tar.gz: b001e8608d9ecd590e4581d0e3ca5545c2a96ea4
3
+ metadata.gz: b71d4aa93294605cd75c30c86eca10cbb9a46c8c
4
+ data.tar.gz: ccffc335b9147f176ebdb7738b292d3df6c8a5f5
5
5
  SHA512:
6
- metadata.gz: 549ed51cefc4ffccd08546ded715a90a8aaa7dfc742df4be4666228f2549cc64683144ab50f3491301946e23eed633fd23131d4b8052d6d0e86a8072f709edb4
7
- data.tar.gz: 97052db00adf9049b26058b59a43342950cbad783a49e94a8ddbb3d23eadd63efeb7e7720a0d9c31f71ee51db3bcaaa1f0ba7fd594299eebb0ddffa9380183ce
6
+ metadata.gz: 593ec5320420cdc547583cfd64dc99bb95ffb53c35f658ef60ab6275bed5cd9226824e6c86365bfe4b24cac01505e933752f87a721cbcf959ef4d7b87a39d8ad
7
+ data.tar.gz: 1172ee6a58f7cbf1401f2f9e42628e9dff8ccd9394f7612682e9f1cdbaf2a6d846f2d7edc593392db56bd454eedf4fce670238d006645a77eff4cc83b9d9a00e
@@ -1,30 +1,15 @@
1
- require_relative '../config/environment'
1
+ #require_relative '../config/environment'
2
2
 
3
- module SeClimbingVideos
4
- SEARCH_LINKS = {
5
- "1" => {
6
- location: "Boone, NC",
7
- link: "https://www.youtube.com/results?sp=CAI%253D&q=Boone+NC+bouldering"
8
- },
9
- "2" => {
10
- location: "Grayson Highlands, VA",
11
- link: "https://www.youtube.com/results?q=Grayson+Highlands+bouldering&sp=CAI%253D"
12
- },
13
- "3" => {
14
- location: "Horse Pens 40, AL",
15
- link: "https://www.youtube.com/results?q=horse+pens+40+bouldering&sp=CAI%253D"
16
- },
17
- "4" => {
18
- location: "Rocktown, GA",
19
- link: "https://www.youtube.com/results?q=Rocktown+bouldering&sp=CAI%253D"
20
- },
21
- "5" => {
22
- location: "Rumbling Bald, NC",
23
- link: "https://www.youtube.com/results?q=rumbling+bald+bouldering&sp=CAI%253D"
24
- },
25
- "6" => {
26
- location: "Stone Fort (LRC), TN",
27
- link: "https://www.youtube.com/results?sp=CAI%253D&q=Stone+Fort+LRC+bouldering"
28
- }
29
- }
30
- end
3
+ #module SeClimbingVideos
4
+ #
5
+ #end
6
+
7
+ require 'pry'
8
+ require 'nokogiri'
9
+ require 'open-uri'
10
+ require 'colorize'
11
+
12
+ require_relative '../lib/se_climbing_videos/version'
13
+ require_relative '../lib/se_climbing_videos/cli'
14
+ require_relative '../lib/se_climbing_videos/scraper'
15
+ require_relative '../lib/se_climbing_videos/video'
@@ -1,5 +1,32 @@
1
1
  class SeClimbingVideos::CLI
2
2
 
3
+ SEARCH_LINKS = {
4
+ "1" => {
5
+ location: "Boone, NC",
6
+ link: "https://www.youtube.com/results?sp=CAI%253D&q=Boone+NC+bouldering"
7
+ },
8
+ "2" => {
9
+ location: "Grayson Highlands, VA",
10
+ link: "https://www.youtube.com/results?q=Grayson+Highlands+bouldering&sp=CAI%253D"
11
+ },
12
+ "3" => {
13
+ location: "Horse Pens 40, AL",
14
+ link: "https://www.youtube.com/results?q=horse+pens+40+bouldering&sp=CAI%253D"
15
+ },
16
+ "4" => {
17
+ location: "Rocktown, GA",
18
+ link: "https://www.youtube.com/results?q=Rocktown+bouldering&sp=CAI%253D"
19
+ },
20
+ "5" => {
21
+ location: "Rumbling Bald, NC",
22
+ link: "https://www.youtube.com/results?q=rumbling+bald+bouldering&sp=CAI%253D"
23
+ },
24
+ "6" => {
25
+ location: "Stone Fort (LRC), TN",
26
+ link: "https://www.youtube.com/results?sp=CAI%253D&q=Stone+Fort+LRC+bouldering"
27
+ }
28
+ }
29
+
3
30
  attr_accessor :location_input
4
31
 
5
32
  def call
@@ -30,7 +57,7 @@ class SeClimbingVideos::CLI
30
57
  self.location_input = gets.strip
31
58
 
32
59
  if ["1", "2", "3", "4", "5", "6"].include?(@location_input)
33
- SeClimbingVideos::Scraper.new.make_videos(SeClimbingVideos::SEARCH_LINKS[@location_input][:link], SeClimbingVideos::SEARCH_LINKS[@location_input][:location])
60
+ SeClimbingVideos::Scraper.new.make_videos(SeClimbingVideos::CLI::SEARCH_LINKS[@location_input][:link], SeClimbingVideos::CLI::SEARCH_LINKS[@location_input][:location])
34
61
 
35
62
  elsif @location_input =="exit"
36
63
  goodbye
@@ -42,10 +69,10 @@ class SeClimbingVideos::CLI
42
69
  end
43
70
 
44
71
  def print_videos
45
- puts "---Latest 20 videos from #{SeClimbingVideos::SEARCH_LINKS[@location_input][:location]}---".colorize(:light_blue)
72
+ puts "---Latest 20 videos from #{SeClimbingVideos::CLI::SEARCH_LINKS[@location_input][:location]}---".colorize(:light_blue)
46
73
  puts ""
47
74
  SeClimbingVideos::Video.all.each.with_index(1) do |video, i|
48
- if video.location == SeClimbingVideos::SEARCH_LINKS[@location_input][:location]
75
+ if video.location == SeClimbingVideos::CLI::SEARCH_LINKS[@location_input][:location]
49
76
  puts "#{i}. "+"#{video.name}".colorize(:light_blue)+" - #{video.upload_user} - #{video.upload_date}"
50
77
  end
51
78
  end
@@ -1,3 +1,3 @@
1
1
  module SeClimbingVideos
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -27,7 +27,6 @@ Gem::Specification.new do |spec|
27
27
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
28
28
  f.match(%r{^(test|spec|features)/})
29
29
  end
30
- spec.files << "config/environment.rb"
31
30
  spec.bindir = "bin"
32
31
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
33
32
  spec.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: se_climbing_videos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liah Wallace