what_is 1.0.2 → 1.0.3

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: 02323142fd6f70554516e9a31aef2f8b712ff242
4
- data.tar.gz: 54cfa98a19c07eafba6bcdc30d463aecad2cc0b6
3
+ metadata.gz: c17f74282e0ee8a9f6c532dd98654cc9ae11f3fc
4
+ data.tar.gz: 37fcb1c0ec278205f214d27d2d641a1ddbda404a
5
5
  SHA512:
6
- metadata.gz: 0d962ab8c1b034f6f682e61920b397d9f28444768f3a2a96811b92af6bd3e69bd418c926748f026d04803c40be14951081f7266aa3b5e61f70b13787558e88ec
7
- data.tar.gz: 69a59df41d797c249f3d699ecded139d1bd6aa079a8076c6468d13547852cdd8aebb8876cc77d03cd0f311d943a4ee7ae5dcea7f555f663367fd9d086c746cbe
6
+ metadata.gz: fd80a938ac74fb281cd01988aabe97da4d986cfd532ae19be1013caf5691a0676f18b3b93dbe015e8b10aaa3888d9612d5252b7237992946c3b2ae51a9961d2c
7
+ data.tar.gz: e491ef0aaca3f8424f4a87cfadf44da1a8d85c89dc547abf49088fe0b0e4ad05120b5ada3734e23e5fed47e2533fd525ef8c4925cf72aff523fff94c71adeea7
@@ -0,0 +1,3 @@
1
+ module WhatIs
2
+ class NoApiKeyException < StandardError; end
3
+ end
@@ -1,3 +1,3 @@
1
1
  module WhatIs
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
data/lib/what_is.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require "what_is/version"
2
2
  require "what_is/configuration"
3
+ require "what_is/exceptions"
3
4
  require "net/http"
4
5
  require "uri"
5
6
  require "nokogiri"
@@ -25,7 +26,7 @@ module WhatIs
25
26
  end
26
27
 
27
28
  def define!
28
- raise NoApiKeyException unless WhatIs.configuration.thesaurus_api_key
29
+ raise WhatIs::NoApiKeyException unless WhatIs.configuration.thesaurus_api_key
29
30
 
30
31
  thesaurus_endpoint = "http://www.dictionaryapi.com/api/v1/references/thesaurus/xml/#{@word}?key=#{WhatIs.configuration.thesaurus_api_key}"
31
32
  uri = URI.parse(thesaurus_endpoint)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: what_is
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Chavez
@@ -81,6 +81,7 @@ files:
81
81
  - Rakefile
82
82
  - lib/what_is.rb
83
83
  - lib/what_is/configuration.rb
84
+ - lib/what_is/exceptions.rb
84
85
  - lib/what_is/version.rb
85
86
  - spec/lib/what_is_spec.rb
86
87
  - spec/spec_helper.rb