cheapest_gas_CLI 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 711050f306fc40b905c01d00745823f32422605385cb9369c54a5c75dbb833b1
4
- data.tar.gz: 441125ac0954aa7c5859d02c1e87f41da47b947953bf2e2d81ec9e83ef4bc899
3
+ metadata.gz: 9245d56366275dee7a85f8ce7e723eb81f1a65c60c19a020b8b728231a4a8b0a
4
+ data.tar.gz: a5d884fb04d4220be632a7a11d0678028933adbfd5788223aad6ed3bc336b157
5
5
  SHA512:
6
- metadata.gz: b1331983f6020fb28ec18e561635b15ca495bca990e251140eb02c702a308717bf27b8045b9339e5002fc34f428e854750dcaa4f8a5b8a9b95bc08c181b59974
7
- data.tar.gz: 104db77cd61ac3c897a73801b2fe680097667e4b17ef037648b3518ead596f09a6091ebd1b1e45626ad9fdc0ef25536844a07d129a62e50aa3f6b7e92e642570
6
+ metadata.gz: b9ea81fc8c2f6b205e3813caff3d2a4614ab2fa96d3ce0df155f334bfaab895b82312a38dc1b4c564eb2134ba0e8c63c243bb3407ec07c38171ca12e68c933eb
7
+ data.tar.gz: 9ebbd27bc773ccb95b44894afc1c2ad20cbe0fb26656a2d43817de281ca0f7f012e725922c2537c33ca3b7194c64fe8300112247113062086e100c6f4e5c5c72
data/bin/find-gas ADDED
@@ -0,0 +1,8 @@
1
+ !/usr/bin/env ruby
2
+ require_relative '../config/environment'
3
+ require "bundler/setup"
4
+ require_relative '../lib/cheapest_gas_CLI.rb'
5
+
6
+ CommandLineInterface.new
7
+
8
+
@@ -1,10 +1,10 @@
1
1
  lib = File.expand_path("lib", __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "cheapest_gas_CLI/version"
3
+ #require "cheapest_gas_CLI/command_line_interface"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "cheapest_gas_CLI"
7
- spec.version = "0.0.0"
7
+ spec.version = "0.0.1"
8
8
  spec.authors = ["Cloe Kouadjo"]
9
9
  spec.email = ["armelfli50@gmail.com"]
10
10
 
@@ -23,8 +23,8 @@ Gem::Specification.new do |spec|
23
23
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
24
24
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
25
  end
26
- spec.bindir = "exe"
27
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
+ spec.bindir = "bin"
27
+ spec.executables = "find-gas"
28
28
  spec.require_paths = ["lib"]
29
29
 
30
30
  spec.add_development_dependency "bundler", "~> 2.0"
@@ -1,14 +1,16 @@
1
- require "/Users/home/Desktop/learn.co/cheapest_gas_CLI/lib/gas_station.rb"
2
- require "/Users/home/Desktop/learn.co/cheapest_gas_CLI/lib/scraper.rb"
1
+ require_relative "./gas_station.rb"
2
+ require_relative "./scraper.rb"
3
3
  require 'nokogiri'
4
4
  require 'colorize'
5
5
  require 'pry'
6
6
 
7
7
 
8
- class CommandLineInterface
9
- attr_accessor :url
8
+ class CommandLineInterface
9
+
10
+
11
+ attr_accessor :url, :the_user_zip_code
10
12
 
11
- def initialize
13
+ def initialize(the_user_zip_code = nil)
12
14
  welcome
13
15
  proccess
14
16
  end
@@ -77,7 +79,7 @@ class CommandLineInterface
77
79
  the_user_zip_code = gets.strip
78
80
  while !valid?(the_user_zip_code) do
79
81
  puts "Please enter a valid zip code"
80
- the_user_zip_code = gets.strip
82
+ @the_user_zip_code = gets.strip
81
83
  end
82
84
  url ="https://www.gasbuddy.com/home?search=#{the_user_zip_code}&fuel=1"
83
85
  gas_stations = Scraper.scraper_the_cheapest_nearby(url)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cheapest_gas_CLI
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloe Kouadjo
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-04 00:00:00.000000000 Z
11
+ date: 2019-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -41,7 +41,8 @@ dependencies:
41
41
  description:
42
42
  email:
43
43
  - armelfli50@gmail.com
44
- executables: []
44
+ executables:
45
+ - find-gas
45
46
  extensions: []
46
47
  extra_rdoc_files: []
47
48
  files:
@@ -53,11 +54,11 @@ files:
53
54
  - LICENSE.txt
54
55
  - README.md
55
56
  - Rakefile
56
- - bin/console
57
+ - bin/find-gas
57
58
  - cheapest_gas_CLI.gemspec
58
59
  - config/environment
60
+ - lib/cheapest_gas_CLI.rb
59
61
  - lib/cheapest_gas_CLI/version.rb
60
- - lib/command_line_interface.rb
61
62
  - lib/gas_station.rb
62
63
  - lib/scraper.rb
63
64
  homepage: https://github.com/armel50/cheapest_gas.CLI
data/bin/console DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # require_relative '../config/environment'
3
- # require "bundler/setup"
4
- require '/Users/home/Desktop/learn.co/cheapest_gas_CLI/lib/command_line_interface.rb'
5
-
6
-
7
- CommandLineInterface.new
8
-
9
-