datamuse_rb 0.1.0 → 0.1.1

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: f4ee277bd681187dff1df809c7f2ae89775bd6fb69607e42887742cf6dcdafe2
4
- data.tar.gz: a16e92e24885ac681b8f7193f9a2f904558a7bf2596f39f111cf6ac651ddc343
3
+ metadata.gz: ae56ca25f841eaff18296862d348b30a4325b3a16d7a466f370ffc9be6c220de
4
+ data.tar.gz: d74cfee5328f859cc5930c3d6b8732f943e429f4599515a6e15f4316a028ca74
5
5
  SHA512:
6
- metadata.gz: 991a5a558cf201d84e4d8851953639357fe1225564a4a4caed7fdde22d114c9328f912f4e7150d88af4bf7a4f381cb37683a14c9d833da58eb003f641e1a945e
7
- data.tar.gz: 3ddb5e522a033eee4c306418abf07c10427c37b2dfc8606f36ec77e65a15bede96f6bddb4c44bf5bf6183054d69e501940dbd2c6f139ce17f4362de6fb3b1fb4
6
+ metadata.gz: 80d518dd0aa2bf1b29dbdbbb5def839cf8401b976fef6269de2620420341509e2919297ad845695914f278bf3bb377cc21ec81e56b0955b4d28fa39e399f6c81
7
+ data.tar.gz: a3e2b7c5838efb034d3cfb54304ae2ed3b303fb02702da22a1c395708574b1360326687b12f8d51dbc3882d8717087ccd1ed2726c1a88ab3e0f3cc3f174e01b7
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+ *.gem
data/.travis.yml CHANGED
@@ -1,5 +1,10 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 1.9.3
4
+ - 2.5.1
5
5
  before_install: gem install bundler -v 1.16.1
6
+ deploy:
7
+ provider: rubygems
8
+ api_key:
9
+ secure: bBnSezmwj2Gg7sRQzm1ma2eksxszpqNMqb7Srm9JcBpR9oq+1k3dZFLdRDCNLy9x2otXe4xS58YKXRr/YKYEEMpxOdro0tA5ffs1cH8IviwhocwMFypMdl80heFltLZmVy/I0+C8908wnxTUNiv/tH4AVyuFRAiz/SUCszhOs32bz7s7BPfJ/8RXXqh2sYaBaFja7hOfXTDAXKRJbVZjumx2rdEcI/Xcm0hD7lgnvey6tiUWMkBvCjXFD8wuMcfBKN+awsTBN87iwIpR1s1vu6Ow5cYqi82nI30kk5Ih7vJU31G31fW1ASxZLJp+XsX0eLeIqi7ryrWAqD4klefIIW4uekDw+r66CgEMDwMwIUA4IfCGhDkrLTFDAoxNimENp4fHkxsmbCZZnK0FC/Cb1ok481hYCoLEeBG9lcIaDwmKA9MqhvHFq2Zh+VHn/pl2jAVeYumGTsIgdXagQKLkfPhJilaNsbF/vrTxPYfYGsRg9oggdHBUvUkbmfwBuoBGffby8TUEk+/mW3CbNp8sH4LnZriz3C+dT7GscQYnqoe2Cob/xMZYNCKIpiaX92RuZx7gHj7sGZGUcOOAjDOTxGirHYY6Zt8EDJqsZX0jQps7hlfbg7r1i86xKX+E1nMVRvJxn06CT8VhCKonPCTZely+qOrKXC7zYkCIsyg2CCw=
10
+
@@ -0,0 +1,46 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ * Using welcoming and inclusive language
12
+ * Being respectful of differing viewpoints and experiences
13
+ * Gracefully accepting constructive criticism
14
+ * Focusing on what is best for the community
15
+ * Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ * Trolling, insulting/derogatory comments, and personal or political attacks
21
+ * Public or private harassment
22
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at bynarlogic@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+ ## Attribution
42
+
43
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44
+
45
+ [homepage]: http://contributor-covenant.org
46
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile.lock CHANGED
@@ -2,14 +2,23 @@ PATH
2
2
  remote: .
3
3
  specs:
4
4
  datamuse_rb (0.1.0)
5
+ coveralls
5
6
  httparty
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
9
10
  specs:
11
+ coveralls (0.8.22)
12
+ json (>= 1.8, < 3)
13
+ simplecov (~> 0.16.1)
14
+ term-ansicolor (~> 1.3)
15
+ thor (~> 0.19.4)
16
+ tins (~> 1.6)
10
17
  diff-lcs (1.3)
18
+ docile (1.3.1)
11
19
  httparty (0.16.2)
12
20
  multi_xml (>= 0.5.2)
21
+ json (2.1.0)
13
22
  multi_xml (0.6.0)
14
23
  rake (10.5.0)
15
24
  rspec (3.8.0)
@@ -25,6 +34,15 @@ GEM
25
34
  diff-lcs (>= 1.2.0, < 2.0)
26
35
  rspec-support (~> 3.8.0)
27
36
  rspec-support (3.8.0)
37
+ simplecov (0.16.1)
38
+ docile (~> 1.1)
39
+ json (>= 1.8, < 3)
40
+ simplecov-html (~> 0.10.0)
41
+ simplecov-html (0.10.2)
42
+ term-ansicolor (1.6.0)
43
+ tins (~> 1.0)
44
+ thor (0.19.4)
45
+ tins (1.16.3)
28
46
 
29
47
  PLATFORMS
30
48
  ruby
data/README.md CHANGED
@@ -1,3 +1,6 @@
1
+ [![Build Status](https://travis-ci.org/bynarlogic/datamuse-rb.svg?branch=master)](https://travis-ci.org/bynarlogic/datamuse-rb)
2
+ [![Coverage Status](https://coveralls.io/repos/github/bynarlogic/datamuse-rb/badge.svg?branch=master)](https://coveralls.io/github/bynarlogic/datamuse-rb?branch=master)
3
+
1
4
  # DatamuseRb
2
5
 
3
6
  DatamuseRb is yet another Ruby wrapper for the wonderful [Datamuse API](https://www.datamuse.com/api/). The approach for this gem is a little different. DatamuseRb extends the Ruby String Class with Datamuse methods. Methods can be chained much like the actual Datamuse API allows.
data/datamuse-rb.gemspec CHANGED
@@ -35,4 +35,5 @@ Gem::Specification.new do |spec|
35
35
  spec.add_development_dependency "rake", "~> 10.0"
36
36
  spec.add_development_dependency "rspec", "~> 3.0"
37
37
  spec.add_dependency "httparty"
38
+ spec.add_dependency "coveralls"
38
39
  end
data/lib/datamuse_rb.rb CHANGED
@@ -10,7 +10,7 @@ module DatamuseRB
10
10
 
11
11
  def self.send(endpoint,**queries)
12
12
  response = get(endpoint,query: queries)
13
- DatamuseResultList.new(response.parsed_response)
13
+ DatamuseResultList.new(response.parsed_response,queries)
14
14
  end
15
15
  end
16
16
 
@@ -19,13 +19,15 @@ module DatamuseRB
19
19
  attr_accessor :results
20
20
  delegate [:first, :each] => :@results
21
21
 
22
- def initialize(response)
22
+ def initialize(response,query)
23
23
  @results = response.map {|r| DatamuseResult.new(r)}
24
+ @query = query
24
25
  end
25
26
 
26
27
  def method_missing(name,*args)
27
28
  super unless WORD_METHODS[name] && args.first
28
- DatamuseRequest.send("/words",{WORD_METHODS[name] => args.first})
29
+ @query.merge! WORD_METHODS[name] => args.first
30
+ DatamuseRequest.send("/words",@query)
29
31
  end
30
32
  end
31
33
 
@@ -1,3 +1,3 @@
1
1
  module DatamuseRB
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datamuse_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua D Jarvis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-08 00:00:00.000000000 Z
11
+ date: 2018-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: coveralls
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  description: Extends String with datamuse functions. Datamuse https://www.datamuse.com/api/
70
84
  is an open api described as a word-finding query engine for developers.
71
85
  email:
@@ -77,6 +91,7 @@ files:
77
91
  - ".gitignore"
78
92
  - ".rspec"
79
93
  - ".travis.yml"
94
+ - CODE_OF_CONDUCT.md
80
95
  - Gemfile
81
96
  - Gemfile.lock
82
97
  - LICENSE.txt