supportify_client 0.0.3 → 0.0.4

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: 0f68f223ab2ce52bbe10e166b0e4aa1229c2a556
4
- data.tar.gz: 919ed84d5e222006400775e9e062822ff474e9ad
3
+ metadata.gz: 954039452dda6a2e714591e122952552fdd0acd4
4
+ data.tar.gz: c7c986655ac97c67bd8a29831ac14a69f3d8485e
5
5
  SHA512:
6
- metadata.gz: 9cf4d571d22ef01e494238bc1dfc1d36ea22a55ba130914fb7d813e1ccf6235e6acd479fd33d71cdc61deaf4ebf00b89048f9b194b420eb57e88be0c95fbf48b
7
- data.tar.gz: b77f1b834519dcc91ddceff90bd686d0cb8dba8d8ef4406ad8c6cd40e84a85d15d1dd67186c93281cc1489c06a491cd53335aad9dc07c8bcfc5ade8230a6b74e
6
+ metadata.gz: ed3546bf0adaca876c9e88ba18970b10e027a11ac9ab1fb22a29e74d94c7c13d6590550c4d7f05001bf0a6baa48dcaffeb97e4f7b961449ba25c8fc698099c01
7
+ data.tar.gz: 25f4c53ba8f0d7f66506042b425b54daaa865bfae215b868b43e2ea0ed7dfeab823dfac756e17ac42b45075010d1f810758759ee8c7ce852dfacd97ac5310689
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -0,0 +1,9 @@
1
+ module Supportify
2
+ module Api
3
+ class Search
4
+ def self.resource_name
5
+ 'search'
6
+ end
7
+ end
8
+ end
9
+ end
@@ -1,4 +1,5 @@
1
1
  require 'supportify_client/api/category'
2
2
  require 'supportify_client/api/error'
3
3
  require 'supportify_client/api/faq'
4
+ require 'supportify_client/api/search'
4
5
  require 'supportify_client/api/tag'
@@ -12,6 +12,10 @@ module Supportify
12
12
  get Supportify::Api::Tag, args
13
13
  end
14
14
 
15
+ def search(*args)
16
+ get Supportify::Api::Search, args
17
+ end
18
+
15
19
  def vote(*args)
16
20
  post Supportify::Api::Faq, args
17
21
  end
@@ -0,0 +1,29 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
+
3
+ describe "Searching" do
4
+ let(:api_key) { 'api_key' }
5
+ let(:app_key) { 'app_key' }
6
+ let(:version) { 'v1' }
7
+
8
+ subject do
9
+ Supportify::Client.new api_key: api_key,
10
+ app_key: app_key,
11
+ version: version
12
+ end
13
+
14
+ describe "When searching for content" do
15
+ let(:query) { 'testing' }
16
+
17
+ before do
18
+ stub_request(:get, "https://api.supportify.io/v1/search").
19
+ to_return(:status => 200, :body => "", :headers => {})
20
+
21
+ subject.search query: query
22
+ end
23
+
24
+ it "should have passed along the arguments" do
25
+ WebMock.should have_requested(:get, "https://api.supportify.io/v1/search")
26
+ .with(body: { query: query })
27
+ end
28
+ end
29
+ end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "supportify_client"
8
- s.version = "0.0.3"
8
+ s.version = "0.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jordan Yaker", "Supportify, Inc."]
12
- s.date = "2014-08-27"
12
+ s.date = "2014-09-06"
13
13
  s.description = "Ruby client for the Supportify.io help and support API."
14
14
  s.email = "jordan.yaker@supportify.io"
15
15
  s.extra_rdoc_files = [
@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
30
30
  "lib/supportify_client/api/category.rb",
31
31
  "lib/supportify_client/api/error.rb",
32
32
  "lib/supportify_client/api/faq.rb",
33
+ "lib/supportify_client/api/search.rb",
33
34
  "lib/supportify_client/api/tag.rb",
34
35
  "lib/supportify_client/client.rb",
35
36
  "lib/supportify_client/factory.rb",
@@ -41,6 +42,7 @@ Gem::Specification.new do |s|
41
42
  "spec/features/client_spec.rb",
42
43
  "spec/features/errors_spec.rb",
43
44
  "spec/features/faqs_spec.rb",
45
+ "spec/features/search_spec.rb",
44
46
  "spec/features/tags_spec.rb",
45
47
  "spec/spec_helper.rb",
46
48
  "spec/support/factory_girl.rb",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: supportify_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Yaker
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-27 00:00:00.000000000 Z
12
+ date: 2014-09-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -130,6 +130,7 @@ files:
130
130
  - lib/supportify_client/api/category.rb
131
131
  - lib/supportify_client/api/error.rb
132
132
  - lib/supportify_client/api/faq.rb
133
+ - lib/supportify_client/api/search.rb
133
134
  - lib/supportify_client/api/tag.rb
134
135
  - lib/supportify_client/client.rb
135
136
  - lib/supportify_client/factory.rb
@@ -141,6 +142,7 @@ files:
141
142
  - spec/features/client_spec.rb
142
143
  - spec/features/errors_spec.rb
143
144
  - spec/features/faqs_spec.rb
145
+ - spec/features/search_spec.rb
144
146
  - spec/features/tags_spec.rb
145
147
  - spec/spec_helper.rb
146
148
  - spec/support/factory_girl.rb