compare_supermarkets 0.1.5 → 0.1.10
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 +4 -4
- data/bin/setup +3 -1
- data/config/environment.rb +13 -0
- data/lib/compare_supermarkets/cli.rb +4 -1
- data/lib/compare_supermarkets/version.rb +1 -1
- metadata +23 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b0c84b034570a1efac9f75daa7892e14a3d0e25886b4149d8d5b5e3457e824d
|
4
|
+
data.tar.gz: 1f4c985dbd6509b98dc24aad9f65a791d0c66ce0efb883990f4fb569fe805118
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 616cfa541f208b525c1009d9d571ff9622466004027a54f9ae210489ccdfe13c0b42060f95171b55ba756bf9b0f7dd99006725cb60669232d71df89e05b52dc0
|
7
|
+
data.tar.gz: d50413468908393e1ac6d8965d99e9ce13fc15c2c2299a282f859c87cc78f7150dbf84e51bd9661c9b79395e0621cb123f2415ab3e87e476ae34f8b7408f634d
|
data/bin/setup
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'pry'
|
2
|
+
require 'nokogiri'
|
3
|
+
require 'watir'
|
4
|
+
|
5
|
+
#gem install selenium-webdriver - required for watir to work
|
6
|
+
#brew install --cask chromedriver - required for watir to work
|
7
|
+
|
8
|
+
require_relative '../lib/compare_supermarkets/scraper'
|
9
|
+
require_relative '../lib/compare_supermarkets/product'
|
10
|
+
require_relative '../lib/compare_supermarkets/cli'
|
11
|
+
require_relative '../lib/compare_supermarkets/version'
|
12
|
+
|
13
|
+
Watir.default_timeout = 0
|
@@ -113,6 +113,10 @@ class CompareSupermarkets::CLI
|
|
113
113
|
puts ""
|
114
114
|
input = gets.strip
|
115
115
|
puts ""
|
116
|
+
choice(input)
|
117
|
+
end
|
118
|
+
|
119
|
+
def choice(input)
|
116
120
|
if input == "1"
|
117
121
|
choice = CompareSupermarkets::Product.all_top_10_sorted_by_price
|
118
122
|
print_items(choice, "asc")
|
@@ -140,7 +144,6 @@ class CompareSupermarkets::CLI
|
|
140
144
|
invalid_input
|
141
145
|
how_to_display
|
142
146
|
end
|
143
|
-
|
144
147
|
end
|
145
148
|
|
146
149
|
def finished
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: compare_supermarkets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Berger Howes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,44 +80,24 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
$ bundle install
|
100
|
-
|
101
|
-
Or install it yourself as:
|
102
|
-
|
103
|
-
$ gem install compare_supermarkets
|
104
|
-
|
105
|
-
## Usage
|
106
|
-
|
107
|
-
To use compare_supermarkets call $ gem 'compare_supermarkets'
|
108
|
-
and follow the prompts. The more specific you are the faster the search results appear
|
109
|
-
and there will be less items to compare.
|
110
|
-
|
111
|
-
|
112
|
-
## Contributing
|
113
|
-
|
114
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/compare_supermarkets.
|
115
|
-
|
116
|
-
## License
|
117
|
-
|
118
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: watir
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 6.19.1
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 6.19.1
|
97
|
+
description: Will search Woolworths and Coles online stores for prices based on an
|
98
|
+
input search parameter
|
119
99
|
email:
|
120
|
-
-
|
100
|
+
- happymelonbox@gmail.com
|
121
101
|
executables:
|
122
102
|
- compare_supermarkets
|
123
103
|
extensions: []
|
@@ -126,6 +106,7 @@ files:
|
|
126
106
|
- bin/compare_supermarkets
|
127
107
|
- bin/console
|
128
108
|
- bin/setup
|
109
|
+
- config/environment.rb
|
129
110
|
- lib/compare_supermarkets.rb
|
130
111
|
- lib/compare_supermarkets/cli.rb
|
131
112
|
- lib/compare_supermarkets/product.rb
|
@@ -136,12 +117,13 @@ licenses:
|
|
136
117
|
- MIT
|
137
118
|
metadata:
|
138
119
|
homepage_uri: http://rubygems.org/gems/compare_supermarkets
|
139
|
-
source_code_uri: https://github.com/happymelonbox/
|
140
|
-
changelog_uri: https://github.com/happymelonbox/
|
120
|
+
source_code_uri: https://github.com/happymelonbox/compare_supermarkets
|
121
|
+
changelog_uri: https://github.com/happymelonbox/compare_supermarkets/blob/main/CHANGELOG.md
|
141
122
|
post_install_message:
|
142
123
|
rdoc_options: []
|
143
124
|
require_paths:
|
144
125
|
- lib
|
126
|
+
- config
|
145
127
|
required_ruby_version: !ruby/object:Gem::Requirement
|
146
128
|
requirements:
|
147
129
|
- - ">="
|