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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be79dd9f242a73aea055493be6268a0dbcc606dedf4cfe9df3106a76b0f03c68
4
- data.tar.gz: bcc72badfba9c2e8cd4ee0639c1c3044f43ba9eaea0c3b563d0d2eceab2bd3bd
3
+ metadata.gz: 0b0c84b034570a1efac9f75daa7892e14a3d0e25886b4149d8d5b5e3457e824d
4
+ data.tar.gz: 1f4c985dbd6509b98dc24aad9f65a791d0c66ce0efb883990f4fb569fe805118
5
5
  SHA512:
6
- metadata.gz: 576e362afdf6795bdb834c09b4c52c7409350b4d56e21a98b9df5ea3a2f4120f3c8d334183bdc753378075bf24ac23769ae764511c6d66f19579fe7cd731faa4
7
- data.tar.gz: ac63b86e0c2143078c7d8789de28746fd3c9c3967118794317e310e370c8f7681760b9eaa02dcb9e70015734137e03a1945598e6a34ef6a1f329dd6b8bcc0f06
6
+ metadata.gz: 616cfa541f208b525c1009d9d571ff9622466004027a54f9ae210489ccdfe13c0b42060f95171b55ba756bf9b0f7dd99006725cb60669232d71df89e05b52dc0
7
+ data.tar.gz: d50413468908393e1ac6d8965d99e9ce13fc15c2c2299a282f859c87cc78f7150dbf84e51bd9661c9b79395e0621cb123f2415ab3e87e476ae34f8b7408f634d
data/bin/setup CHANGED
@@ -3,4 +3,6 @@
3
3
  set -euo pipefail
4
4
  IFS=$'\n\t'
5
5
 
6
- bundle install
6
+ bundle install
7
+ gem install selenium-webdriver #required for watir to work
8
+ brew install --cask chromedriver #required for watir to work
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CompareSupermarkets
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.10"
5
5
  end
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.5
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-27 00:00:00.000000000 Z
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
- description: |
84
- Will search Woolworths and Coles online stores for prices based on an input search parameter
85
- # CompareSupermarkets
86
-
87
- Ever wondered 'I wonder if my shampoo is cheaper at Coles or Woolworths...?' ? But can't be bothered searching both websites and comparing? Well that's what this gem does for you. Simply install and follow the prompts.
88
-
89
- ## Installation
90
-
91
- Add this line to your application's Gemfile:
92
-
93
- ```ruby
94
- gem 'compare_supermarkets'
95
- ```
96
-
97
- And then execute:
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
- - howes.j.j@gmail.com
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/ruby_portfolio_project_gem
140
- changelog_uri: https://github.com/happymelonbox/ruby_portfolio_project_gem/blob/main/CHANGELOG.md
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
  - - ">="