mustard_client 0.1.34 → 0.1.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/MustardClient.rb +4 -0
- data/lib/MustardClient/keywords.rb +52 -0
- data/lib/MustardClient/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0e30d30d2597568e2101567b47acfefed157a47
|
4
|
+
data.tar.gz: df7752930cf025f55572587ed46286e686c06845
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bab6c1d7a4134a7c3379777063950a8194c57f93015ab36e0f3d098d2daabe56010b0d21081fc61b021c0b6f449ac5f4265bf5228bb2c02b0532093ed48ed242
|
7
|
+
data.tar.gz: a1a9f1dcef26947a9744fd9590f0357cba41d05da310a9dc11b714364b7d72ea5770e55d80a207872b9288ff6e6432d730b7025d9dfd37200d45b09e491773a4
|
data/lib/MustardClient.rb
CHANGED
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'MustardClient/client'
|
2
|
+
module MustardClient
|
3
|
+
class KeywordsClient < Client
|
4
|
+
|
5
|
+
def find keyword_id
|
6
|
+
|
7
|
+
command = {}
|
8
|
+
command[:method] = :get
|
9
|
+
command[:route] = @mustard_url + "/keywords/#{keyword_id}"
|
10
|
+
command[:headers] = {'User-Token' => @user_token}
|
11
|
+
|
12
|
+
execute(command)
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
def add keyword_params
|
17
|
+
|
18
|
+
command = {}
|
19
|
+
command[:method] = :post
|
20
|
+
command[:route] = @mustard_url + "/keywords"
|
21
|
+
command[:params] = {keyword: keyword_params}
|
22
|
+
command[:headers] = {'User-Token' => @user_token}
|
23
|
+
|
24
|
+
execute(command)
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
def delete keyword_id
|
29
|
+
|
30
|
+
command = {}
|
31
|
+
command[:method] = :delete
|
32
|
+
command[:route] = @mustard_url + "/keywords/#{keyword_id}"
|
33
|
+
command[:headers] = {'User-Token' => @user_token}
|
34
|
+
|
35
|
+
execute(command)
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
def update keyword_id, keyword_params
|
40
|
+
|
41
|
+
command = {}
|
42
|
+
command[:method] = :put
|
43
|
+
command[:route] = @mustard_url + "/keywords/#{keyword_id}"
|
44
|
+
command[:headers] = {'User-Token' => @user_token}
|
45
|
+
command[:params] = {keyword: keyword_params}
|
46
|
+
|
47
|
+
execute(command)
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mustard_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.41
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Watson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03
|
11
|
+
date: 2017-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -54,6 +54,7 @@ files:
|
|
54
54
|
- lib/MustardClient/client.rb
|
55
55
|
- lib/MustardClient/environments.rb
|
56
56
|
- lib/MustardClient/executions.rb
|
57
|
+
- lib/MustardClient/keywords.rb
|
57
58
|
- lib/MustardClient/mustard_errors.rb
|
58
59
|
- lib/MustardClient/projects.rb
|
59
60
|
- lib/MustardClient/results.rb
|
@@ -81,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
82
|
version: '0'
|
82
83
|
requirements: []
|
83
84
|
rubyforge_project:
|
84
|
-
rubygems_version: 2.
|
85
|
+
rubygems_version: 2.6.12
|
85
86
|
signing_key:
|
86
87
|
specification_version: 4
|
87
88
|
summary: Ruby Client for Mustard Results Server
|