compare_supermarkets 0.1.3 → 0.1.8

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: 18c1c49bd79c432fd1bd9c2cad8d854f4d77640ed88375638b08ca8abc64de1e
4
- data.tar.gz: 1b80fe6ee357e5f68d9ee9734fa7e17d4cb427a4666be01bf5d9f77c4aa9909d
3
+ metadata.gz: 68fc0e25b9f30c88d7c8c01f71be2291664d1de818357daa9dcebe661f7b729b
4
+ data.tar.gz: af3ee8e59c2d0c8afbc679c5461ec3e1abe3321ebcfe0d2d53ef18503cd302bf
5
5
  SHA512:
6
- metadata.gz: d88bcf9f0ee1801060596a17cde053d0d5f58427b40463391794cf7d40e705d0b08238fa9f22765c025945e6758ce874ebc8e962fef7ae30c0f6f55ee9ef5380
7
- data.tar.gz: 71039dc17290da281736be1e5a93dedffae440be505ebe747c0e0011d4c3d9bb66543b891e26eca14c267b8ee4c566b2585feb7d6d203eb054201f61bdda029f
6
+ metadata.gz: f3471c8fdc0bc2ad9b8c16b4806d0448666742f29e87bd9447de344637c36258464ff261cd672f21e34277de29518ac8e5248c886945daab6cd07fe5f23f480d
7
+ data.tar.gz: 75722b0f9fe6ee6ad09ba9e2965b7106f24d8f2cf21ee4a87656ce5bad90e80a3df56c62d0545b32c33fc46ed31638a1868c9a7ad167437b5ae299f3e90211c6
@@ -42,15 +42,15 @@ class CompareSupermarkets::CLI
42
42
  self.search_supermarkets(input)
43
43
  puts ""
44
44
  puts ""
45
- if CompareSupermarkets::Product.all_count > 10
45
+ if CompareSupermarkets::Product.count > 10
46
46
  puts ""
47
47
  puts "Ooo, jeez, seems like we have a lot of results."
48
- puts "We have #{CompareSupermarkets::Product.all_count} results for you."
48
+ puts "We have #{CompareSupermarkets::Product.count} results for you."
49
49
  puts "If you were a little more specific with your search"
50
50
  puts "term, we would have less to sort through..."
51
51
  puts ""
52
52
  change_search_term
53
- elsif CompareSupermarkets::Product.all_count == 0
53
+ elsif CompareSupermarkets::Product.count == 0
54
54
  puts ""
55
55
  puts "Ohhh man! Doesn't seem like either supermarket carry"
56
56
  puts "that product."
@@ -58,7 +58,7 @@ class CompareSupermarkets::CLI
58
58
  change_search_term
59
59
  else
60
60
  puts ""
61
- puts "Great! We have #{CompareSupermarkets::Product.all_count} items for you."
61
+ puts "Great! We have #{CompareSupermarkets::Product.count} items for you."
62
62
  puts ""
63
63
  puts ""
64
64
  puts ""
@@ -79,7 +79,7 @@ class CompareSupermarkets::CLI
79
79
  puts ""
80
80
  puts "No worries"
81
81
  puts ""
82
- if CompareSupermarkets::Product.all_count > 0
82
+ if CompareSupermarkets::Product.count > 0
83
83
  how_to_display
84
84
  else
85
85
  puts ""
@@ -26,7 +26,7 @@ class CompareSupermarkets::Product
26
26
  @all
27
27
  end
28
28
 
29
- def self.all_count
29
+ def self.count
30
30
  @@all.count
31
31
  end
32
32
 
@@ -54,7 +54,7 @@ class CompareSupermarkets::Product
54
54
  sorted = @@all.sort_by! do |s|
55
55
  price_to_sort = s.dollar_value + '.' + s.cent_value
56
56
  price_to_sort.to_f
57
- end
57
+ end
58
58
  end
59
59
 
60
60
  def self.all_top_10_sorted_by_price
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CompareSupermarkets
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compare_supermarkets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Berger Howes
@@ -84,7 +84,9 @@ description: |
84
84
  Will search Woolworths and Coles online stores for prices based on an input search parameter
85
85
  # CompareSupermarkets
86
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.
87
+ Ever wondered 'I wonder if my shampoo is cheaper at Coles or Woolworths...?' ? But can't be
88
+ bothered searching both websites and comparing? Well that's what this gem does for you. Simply
89
+ install and follow the prompts.
88
90
 
89
91
  ## Installation
90
92
 
@@ -104,18 +106,20 @@ description: |
104
106
 
105
107
  ## Usage
106
108
 
107
- To use compare_supermarkets call $ gem 'compare_supermarkets'
109
+ To use compare_supermarkets call $ 'compare_supermarkets'
108
110
  and follow the prompts. The more specific you are the faster the search results appear
109
111
  and there will be less items to compare.
110
112
 
111
113
 
112
114
  ## Contributing
113
115
 
114
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/compare_supermarkets.
116
+ Bug reports and pull requests are welcome on GitHub at https://github.com/happymelonbox/ruby_po
117
+ rtfolio_project_gem.
115
118
 
116
119
  ## License
117
120
 
118
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
121
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org
122
+ /licenses/MIT).
119
123
  email:
120
124
  - howes.j.j@gmail.com
121
125
  executables:
@@ -123,11 +127,6 @@ executables:
123
127
  extensions: []
124
128
  extra_rdoc_files: []
125
129
  files:
126
- - CHANGELOG.md
127
- - Gemfile
128
- - LICENSE.txt
129
- - README.md
130
- - Rakefile
131
130
  - bin/compare_supermarkets
132
131
  - bin/console
133
132
  - bin/setup
@@ -148,6 +147,7 @@ post_install_message:
148
147
  rdoc_options: []
149
148
  require_paths:
150
149
  - lib
150
+ - config
151
151
  required_ruby_version: !ruby/object:Gem::Requirement
152
152
  requirements:
153
153
  - - ">="
data/CHANGELOG.md DELETED
@@ -1,5 +0,0 @@
1
- ## [Unreleased]
2
-
3
- ## [0.1.0] - 2021-09-26
4
-
5
- - Initial release
data/Gemfile DELETED
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- # Specify your gem's dependencies in compare_supermarkets.gemspec
6
- gemspec
7
-
8
- gem "rake", "~> 13.0"
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2021 Justin Berger Howes
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
data/README.md DELETED
@@ -1,34 +0,0 @@
1
- # CompareSupermarkets
2
-
3
- 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.
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- ```ruby
10
- gem 'compare_supermarkets'
11
- ```
12
-
13
- And then execute:
14
-
15
- $ bundle install
16
-
17
- Or install it yourself as:
18
-
19
- $ gem install compare_supermarkets
20
-
21
- ## Usage
22
-
23
- To use compare_supermarkets call $ gem 'compare_supermarkets'
24
- and follow the prompts. The more specific you are the faster the search results appear
25
- and there will be less items to compare.
26
-
27
-
28
- ## Contributing
29
-
30
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/compare_supermarkets.
31
-
32
- ## License
33
-
34
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile DELETED
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- task default: %i[]