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 +4 -4
- data/bin/find-gas +8 -0
- data/cheapest_gas_CLI.gemspec +4 -4
- data/lib/{command_line_interface.rb → cheapest_gas_CLI.rb} +8 -6
- metadata +7 -6
- data/bin/console +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9245d56366275dee7a85f8ce7e723eb81f1a65c60c19a020b8b728231a4a8b0a
|
4
|
+
data.tar.gz: a5d884fb04d4220be632a7a11d0678028933adbfd5788223aad6ed3bc336b157
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9ea81fc8c2f6b205e3813caff3d2a4614ab2fa96d3ce0df155f334bfaab895b82312a38dc1b4c564eb2134ba0e8c63c243bb3407ec07c38171ca12e68c933eb
|
7
|
+
data.tar.gz: 9ebbd27bc773ccb95b44894afc1c2ad20cbe0fb26656a2d43817de281ca0f7f012e725922c2537c33ca3b7194c64fe8300112247113062086e100c6f4e5c5c72
|
data/bin/find-gas
ADDED
data/cheapest_gas_CLI.gemspec
CHANGED
@@ -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/
|
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.
|
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 = "
|
27
|
-
spec.executables =
|
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
|
-
|
2
|
-
|
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
|
-
|
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.
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cloe Kouadjo
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
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/
|
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
|