meaning 0.1.1 → 0.1.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
  SHA1:
3
- metadata.gz: ed458e3ce0358561d0da41c82ff88f41e68711d3
4
- data.tar.gz: 165d60cc898e7871f18e4140557903822301cacd
3
+ metadata.gz: 9b90081d9fc6c36b6e88eb6200a6feb0e24cf667
4
+ data.tar.gz: 7f2c3b080fcb32b7f089486e4331cba21a9bd7df
5
5
  SHA512:
6
- metadata.gz: 8f07f6672896a262104b8307e6b65ce4654d5c686368e4754a85cb55e64f1c6f71968cfae09aa0a1161e4da73ab44506f4b77cfebbb55eda1092c269be87711b
7
- data.tar.gz: a3cdc89caa5e27758a29828b4947ab58f14f1af793b78a81039bcdac4944b4b5c0fd34f7a8e987c05d9efe642122984838a11085fe02ec4e10b17564d2b2f615
6
+ metadata.gz: 6fcdfc6ab01e9f258bf51d5697ca5b62058d50672113f636878870373b49fd91026469ac0cc79d598d5bc081e1ea9a443cd47a8dafe66cb2bad306bc66c2082f
7
+ data.tar.gz: 574a0710e721e062111a45801acdc8b0d0a8608a82a2ee905a1d2a3f00199052943fa7285d158308e9ea036c0f261bbff9fb2697b994b033631f7985396eaf61
data/.gitignore CHANGED
@@ -7,3 +7,5 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /.gitignore
11
+ /LICENSE.txt
data/bin/meaning CHANGED
@@ -40,8 +40,10 @@ EOH
40
40
  puts "\n(#{word}) [#{sound}]"
41
41
  puts "\n\n Definitions:".color(:green)
42
42
  definitions.each {|dev| puts "- #{dev}\n".color(:green)}
43
- puts "\n\n Examples:".color(:orange)
44
- examples.each {|eg| puts "- #{eg}\n".color(:orange)}
43
+ unless examples.nil?
44
+ puts "\n\n Examples:".color(:orange)
45
+ examples.each {|eg| puts "- #{eg}\n".color(:orange)}
46
+ end
45
47
  end
46
48
 
47
49
  end
@@ -1,3 +1,3 @@
1
1
  module Meaning
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/meaning.rb CHANGED
@@ -14,7 +14,7 @@ module Meaning
14
14
  sound
15
15
  fetch_for("definitions",".def")
16
16
  fetch_for("examples",".eg")
17
- else
17
+ else
18
18
  @dictionary[:error] = "Not even a word!"
19
19
  end
20
20
  end
@@ -36,7 +36,7 @@ module Meaning
36
36
  @doc.css(css_class).each do |element|
37
37
  elements << sanatize_from_colon(element.text)
38
38
  end
39
- @dictionary[name.to_sym] = elements
39
+ @dictionary[name.to_sym] = elements unless elements.empty?
40
40
  end
41
41
  def sanatize_from_colon text
42
42
  text.gsub!(":",".")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meaning
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Khaled0Fares
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-03 00:00:00.000000000 Z
11
+ date: 2016-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -90,7 +90,6 @@ extra_rdoc_files: []
90
90
  files:
91
91
  - ".gitignore"
92
92
  - Gemfile
93
- - LICENSE.txt
94
93
  - README.md
95
94
  - Rakefile
96
95
  - bin/meaning
@@ -118,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
117
  version: '0'
119
118
  requirements: []
120
119
  rubyforge_project:
121
- rubygems_version: 2.5.1
120
+ rubygems_version: 2.4.6
122
121
  signing_key:
123
122
  specification_version: 4
124
123
  summary: English Dictionary(CLI and API) based on dictionary.cambridge.org
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2016 n
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.