synonymous 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eed895bc363bd870ea81dd3cac60383036adff307cddc74b35197d0412662502
4
- data.tar.gz: 86c2674c2c720e364df64e08a4fd449339de2d3f99e1bbfa66b23ad9082cf4f7
3
+ metadata.gz: f031c3ee949b55d4f7e9832ecfb5b30869eb9a31e328b02608ac85be9c5fbe23
4
+ data.tar.gz: 06ff2efc5b85e8591e3c4c080eabf4ffce5ab3d0cebd499c2c906ebc3d138523
5
5
  SHA512:
6
- metadata.gz: 0e8e497c887a3ebbad13228f61d6c7cd00a9bfe674cc1ffd5bf96e15b8818bfeb84d5b409e2bf8654d0fccfcbe411c93aa95f251c8eaf4147f93243afe0ae019
7
- data.tar.gz: 845ac280cdebb59604a0bcec2afed8fa18cbb3ac4db7e6fca5716c5af69597bb77d94dee855b6c98c5450c82a7c1321a871f4363bc65d3cc4365bbaa1bf59566
6
+ metadata.gz: d6ab7373fdb3a3513ec42c7ff95c408bbd055b8f5be0bd9ce4e8535b2bb7b08670b47170b01a13d92373b137a459d4468de7367b0246f97494cdfce27c25fc55
7
+ data.tar.gz: 00dc21993887e93f610a591c50e7769cca764d3fae26ff4e6d336c0d9c614b359b00e5ade75f361f3f93c4eb8afa13b5a999c0617d07a3f8cd585964ba1b7873
data/Gemfile.lock CHANGED
@@ -1,33 +1,37 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- synonymous (0.1.0)
4
+ synonymous (0.2.0)
5
5
  faraday
6
6
  faraday-raise-errors
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- addressable (2.6.0)
12
- public_suffix (>= 2.0.2, < 4.0)
13
- crack (0.4.3)
14
- safe_yaml (~> 1.0.0)
15
- faraday (0.15.4)
11
+ addressable (2.7.0)
12
+ public_suffix (>= 2.0.2, < 5.0)
13
+ crack (0.4.5)
14
+ rexml
15
+ faraday (1.3.0)
16
+ faraday-net_http (~> 1.0)
16
17
  multipart-post (>= 1.2, < 3)
18
+ ruby2_keywords
19
+ faraday-net_http (1.0.1)
17
20
  faraday-raise-errors (0.3.0)
18
21
  faraday
19
- hashdiff (0.3.7)
20
- minitest (5.11.3)
22
+ hashdiff (1.0.1)
23
+ minitest (5.14.4)
21
24
  multipart-post (2.1.1)
22
- public_suffix (3.0.3)
23
- rake (10.5.0)
24
- safe_yaml (1.0.5)
25
- shoulda-context (1.2.2)
26
- vcr (5.0.0)
27
- webmock (3.4.2)
25
+ public_suffix (4.0.6)
26
+ rake (13.0.3)
27
+ rexml (3.2.4)
28
+ ruby2_keywords (0.0.4)
29
+ shoulda-context (2.0.0)
30
+ vcr (6.0.0)
31
+ webmock (3.12.1)
28
32
  addressable (>= 2.3.6)
29
33
  crack (>= 0.3.2)
30
- hashdiff
34
+ hashdiff (>= 0.4.0, < 2.0.0)
31
35
 
32
36
  PLATFORMS
33
37
  ruby
@@ -35,7 +39,7 @@ PLATFORMS
35
39
  DEPENDENCIES
36
40
  bundler (~> 1.17)
37
41
  minitest (~> 5.0)
38
- rake (~> 10.0)
42
+ rake (~> 13.0)
39
43
  shoulda-context
40
44
  synonymous!
41
45
  vcr
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Synonymous
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/synonymous`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ An API client for Merriam-Webster's Collegiate Thesaurus
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,7 +20,14 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ ```ruby
24
+ require "synonymous"
25
+ client = Synonymous::Client.new(api_key: API_KEY)
26
+ client.get("hello")
27
+ ```
28
+
29
+ You can get an API key from https://dictionaryapi.com/register/index
30
+
26
31
 
27
32
  ## Development
28
33
 
@@ -32,7 +37,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
37
 
33
38
  ## Contributing
34
39
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/synonymous.
40
+ Bug reports and pull requests are welcome on GitHub at https://github.com/boblail/synonymous.
36
41
 
37
42
  ## License
38
43
 
@@ -13,7 +13,7 @@ module Synonymous
13
13
  end
14
14
 
15
15
  def get(word)
16
- Response.new(word, client.get("#{URI.escape(word)}?key=#{api_key}"))
16
+ Response.new(word, client.get("#{URI.encode_www_form_component(word).gsub("+", "%20")}?key=#{api_key}"))
17
17
  end
18
18
 
19
19
  private
@@ -1,3 +1,3 @@
1
1
  module Synonymous
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
data/synonymous.gemspec CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.add_dependency "faraday-raise-errors"
28
28
 
29
29
  spec.add_development_dependency "bundler", "~> 1.17"
30
- spec.add_development_dependency "rake", "~> 10.0"
30
+ spec.add_development_dependency "rake", "~> 13.0"
31
31
  spec.add_development_dependency "minitest", "~> 5.0"
32
32
  spec.add_development_dependency "shoulda-context"
33
33
  spec.add_development_dependency "vcr"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synonymous
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Lail
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-24 00:00:00.000000000 Z
11
+ date: 2021-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '13.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '13.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -171,8 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  - !ruby/object:Gem::Version
172
172
  version: '0'
173
173
  requirements: []
174
- rubyforge_project:
175
- rubygems_version: 2.7.6
174
+ rubygems_version: 3.1.4
176
175
  signing_key:
177
176
  specification_version: 4
178
177
  summary: Merriam-Webster's Collegiate Thesaurus