wordwise 1.0.1 → 1.0.2

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: 99a36ef9c82936438b25a032e7cb1f03b8e5cd8f96105803db203e2c394bef2a
4
- data.tar.gz: 5885f44b63cc2df2153c5cb12c671a8694be326c77e9da6ed0f398a9dc9a547f
3
+ metadata.gz: 3a6a72ee92f0010545c5c66451ce603c1ef67dbe3c4076ce34f431014669eb7c
4
+ data.tar.gz: ddcd399cbe26b08ef15a3225ab2496d724d6d4f0375dfdc3cf38c1322a0b6bb9
5
5
  SHA512:
6
- metadata.gz: 14a465eb78f020015d9b15a7e8b9da7f71d63c962ce65b5c53038934f82bd5b77d2e383b6d85058ff66f0d9f4df4e5f92610749709064c9b1adfb18095e3547d
7
- data.tar.gz: df39cdd9eb3f25c1496d6efb6716919c6285c95ef776f69ec5ba5e34f02c641bbd7fbcea22e751e92de0cd1f3706347c5d55fe02c56e2b919dc0731032033458
6
+ metadata.gz: fe73c8062470e5226c4f39c4583e693e4e027a140d844a6736d9724af1b8bd45413676f66011ddbee03152d5b4239763d3a530d8064453724be26a83fceae328
7
+ data.tar.gz: 5db81eab8f68ff4f60d25fcea1f1b47710fb1d592f3b75980c97c93ce7e33ee42efde91aaaefae04d4bb4f47b1f7bfa9d78df1832c721ca345d5e70b475597eb
data/Gemfile CHANGED
@@ -6,7 +6,6 @@ gem 'bundler'
6
6
  gem 'rake'
7
7
  gem 'pry'
8
8
  gem 'require_all'
9
- gem 'nokogiri'
10
-
9
+ gem "nokogiri", ">= 1.10.4"
11
10
  # Specify your gem's dependencies in wordwise.gemspec
12
11
  gemspec
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wordwise (1.0.1)
4
+ wordwise (1.0.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -10,7 +10,7 @@ GEM
10
10
  diff-lcs (1.3)
11
11
  method_source (0.9.2)
12
12
  mini_portile2 (2.4.0)
13
- nokogiri (1.10.1)
13
+ nokogiri (1.10.4)
14
14
  mini_portile2 (~> 2.4.0)
15
15
  pry (0.12.2)
16
16
  coderay (~> 1.1.0)
@@ -36,7 +36,7 @@ PLATFORMS
36
36
 
37
37
  DEPENDENCIES
38
38
  bundler
39
- nokogiri
39
+ nokogiri (>= 1.10.4)
40
40
  pry
41
41
  rake
42
42
  require_all
@@ -44,4 +44,4 @@ DEPENDENCIES
44
44
  wordwise!
45
45
 
46
46
  BUNDLED WITH
47
- 1.16.6
47
+ 1.17.3
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2018 Ron Sala
3
+ Copyright (c) 2018-2019 Ron Sala
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -4,6 +4,8 @@ A quiz game. Challenge your vocabulary! Given a random word, choose the correct
4
4
 
5
5
  You can read a blog post about the writing of this gem at <https://ronsala.net/makefile_002_cli_data_gem--notes_to_a_junior_to_me_dev>.
6
6
 
7
+ *Not affiliated with Dictionary.com or Oxford University Press.*
8
+
7
9
  ## Installation
8
10
 
9
11
  Add this line to your application's Gemfile:
@@ -14,11 +16,11 @@ gem 'wordwise'
14
16
 
15
17
  And then execute:
16
18
 
17
- $ bundle
19
+ $ bundle
18
20
 
19
21
  Or install it yourself as:
20
22
 
21
- $ gem install wordwise
23
+ $ gem install wordwise
22
24
 
23
25
  ## Usage
24
26
 
@@ -32,7 +34,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
34
 
33
35
  ## Contributing
34
36
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/ronsala/wordwise. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
37
+ Bug reports and pull requests are welcome on GitHub at <https://github.com/ronsala/wordwise>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
38
 
37
39
  ## License
38
40
 
@@ -40,4 +42,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
40
42
 
41
43
  ## Code of Conduct
42
44
 
43
- Everyone interacting in the Wordwise project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/ronsala/wordwise/blob/master/CODE_OF_CONDUCT.md).
45
+ Everyone interacting in the Wordwise project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/ronsala/wordwise/blob/master/CODE_OF_CONDUCT.md).
data/lib/cli.rb CHANGED
@@ -41,6 +41,7 @@ class Wordwise::CLI
41
41
 
42
42
  # Asks user for category selection.
43
43
  def ask_list
44
+ #
44
45
  puts "Please enter the number of the category you want:"
45
46
  input = gets.strip.to_i
46
47
  size = Wordwise::Scraper.scrape_word_lists.size
@@ -8,6 +8,7 @@ class Wordwise::Scraper
8
8
  def self.scrape_word_lists
9
9
  html = Nokogiri::HTML(open(BASEPATH + '/explore/word-lists'))
10
10
  @list_urls, lists = [], []
11
+
11
12
  # Populates arrays of word list names and urls.
12
13
  (0..html.css('.record').size - 1).each do |i|
13
14
  @list_urls << BASEPATH + html.css('.record a')[i].attribute('href').value
@@ -16,12 +17,14 @@ class Wordwise::Scraper
16
17
 
17
18
  # Removes list not fitting format.
18
19
  @list_urls.delete_if { |u| u =~ /phobias/ }
19
- lists.delete_if { |l| l =~ /phobias/ }
20
+ lists.delete_if { |l| l =~ /Phobias/ }
21
+
20
22
  lists
21
23
  end
22
24
 
23
25
  # Scrapes a page with a word list.
24
26
  def self.scrape_word_list(page_idx)
27
+
25
28
  doc = Nokogiri::HTML(open(@list_urls[page_idx]))
26
29
  @words_defs = {}
27
30
 
@@ -1,3 +1,3 @@
1
1
  module Wordwise
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wordwise
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ron Sala
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-08 00:00:00.000000000 Z
11
+ date: 2019-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -67,7 +67,6 @@ files:
67
67
  - Gemfile
68
68
  - Gemfile.lock
69
69
  - LICENSE
70
- - LICENSE.txt
71
70
  - NOTES.md
72
71
  - README.md
73
72
  - Rakefile
@@ -101,8 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
100
  - !ruby/object:Gem::Version
102
101
  version: '0'
103
102
  requirements: []
104
- rubyforge_project:
105
- rubygems_version: 2.7.8
103
+ rubygems_version: 3.0.4
106
104
  signing_key:
107
105
  specification_version: 4
108
106
  summary: A quiz game. Challenge your vocabulary!
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2018 RonSala
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.