sls_adf 0.0.1 → 0.0.2
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 +5 -5
- data/Gemfile.lock +8 -8
- data/README.md +13 -4
- data/lib/sls_adf/base.rb +11 -6
- data/lib/sls_adf/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: df1ccdda043c8f6caa11705d83b919241d788a5d6430277df6ab916672d6f282
|
|
4
|
+
data.tar.gz: ba3fc0de73314c84e43b1e8c7ab0bb75fa1622e0236c96cf82c5cdf1c7214926
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 34f878df0cda468816e404608acc0d84bcc3b6b3133ef3cc49e7808042f1ba53592b06347403ac1fa2e75daa871a3e41436011ef2a001d5a01005b2c05006c50
|
|
7
|
+
data.tar.gz: 60f820067bfb460b9adb7d3a6424f289d58537f996c074a520c4f7aad846fec782f94e695306b1449380a557e168d0e0c33e0d23797a8f02c2ce43b10b73b40b
|
data/Gemfile.lock
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
sls_adf (0.0.
|
|
4
|
+
sls_adf (0.0.2)
|
|
5
5
|
graphql-client (~> 0.12)
|
|
6
6
|
typhoeus (~> 1.3)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
activesupport (5.1.
|
|
11
|
+
activesupport (5.1.5)
|
|
12
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
13
13
|
i18n (~> 0.7)
|
|
14
14
|
minitest (~> 5.1)
|
|
@@ -23,16 +23,16 @@ GEM
|
|
|
23
23
|
dotenv (2.2.1)
|
|
24
24
|
ethon (0.11.0)
|
|
25
25
|
ffi (>= 1.3.0)
|
|
26
|
-
ffi (1.9.
|
|
27
|
-
graphql (1.7.
|
|
26
|
+
ffi (1.9.23)
|
|
27
|
+
graphql (1.7.13)
|
|
28
28
|
graphql-client (0.12.2)
|
|
29
29
|
activesupport (>= 3.0, < 6.0)
|
|
30
30
|
graphql (~> 1.6)
|
|
31
31
|
hashdiff (0.3.7)
|
|
32
|
-
i18n (0.9.
|
|
32
|
+
i18n (0.9.5)
|
|
33
33
|
concurrent-ruby (~> 1.0)
|
|
34
34
|
json (2.1.0)
|
|
35
|
-
minitest (5.
|
|
35
|
+
minitest (5.11.3)
|
|
36
36
|
public_suffix (3.0.1)
|
|
37
37
|
rake (10.5.0)
|
|
38
38
|
rdoc (6.0.0)
|
|
@@ -58,7 +58,7 @@ GEM
|
|
|
58
58
|
thread_safe (0.3.6)
|
|
59
59
|
typhoeus (1.3.0)
|
|
60
60
|
ethon (>= 0.9.0)
|
|
61
|
-
tzinfo (1.2.
|
|
61
|
+
tzinfo (1.2.5)
|
|
62
62
|
thread_safe (~> 0.1)
|
|
63
63
|
webmock (3.1.1)
|
|
64
64
|
addressable (>= 2.3.6)
|
|
@@ -79,4 +79,4 @@ DEPENDENCIES
|
|
|
79
79
|
webmock
|
|
80
80
|
|
|
81
81
|
BUNDLED WITH
|
|
82
|
-
1.16.
|
|
82
|
+
1.16.1
|
data/README.md
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
[](https://badge.fury.io/rb/sls_adf)
|
|
2
|
+
[](https://travis-ci.org/moexmen/sls_adf)
|
|
3
|
+
[](http://inch-ci.org/github/moexmen/sls_adf)
|
|
4
|
+
[](https://codeclimate.com/github/moexmen/sls_adf/maintainability)
|
|
2
5
|
|
|
3
6
|
# SLS ADF - Ruby Client Library
|
|
4
7
|
|
|
@@ -66,9 +69,15 @@ extended or replaced to support different use cases.
|
|
|
66
69
|
|
|
67
70
|
#### Customised GraphQL Calls
|
|
68
71
|
|
|
69
|
-
`sls_adf` provides pre-defined GraphQL calls to ADF. Should you require
|
|
70
|
-
you may
|
|
71
|
-
|
|
72
|
+
`sls_adf` provides pre-defined GraphQL calls to ADF. Should you require other calls,
|
|
73
|
+
you may:
|
|
74
|
+
|
|
75
|
+
1. Declare your custom GraphQL queries or mutations using the
|
|
76
|
+
[graphql-client DSL](https://github.com/github/graphql-client#defining-queries),
|
|
77
|
+
then execute them using `SlsAdf.query` with the appropriate variables.
|
|
78
|
+
2. For easy reuse, create a new class that inherits from `SlsAdf::Base` to wrap your custom
|
|
79
|
+
queries, mutations or fragments.
|
|
80
|
+
|
|
72
81
|
|
|
73
82
|
## Development
|
|
74
83
|
|
data/lib/sls_adf/base.rb
CHANGED
|
@@ -6,13 +6,18 @@ module SlsAdf
|
|
|
6
6
|
class << self
|
|
7
7
|
protected
|
|
8
8
|
|
|
9
|
-
# Helper method used to execute queries.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
# @param [Hash] vars Variables to be passed into the query.
|
|
13
|
-
def execute_query(template, vars = {})
|
|
14
|
-
SlsAdf.client.query(template, variables: vars)
|
|
9
|
+
# Helper method used to execute queries. See {SlsAdf.query}.
|
|
10
|
+
def execute_query(*args)
|
|
11
|
+
SlsAdf.query(*args)
|
|
15
12
|
end
|
|
16
13
|
end
|
|
17
14
|
end
|
|
15
|
+
|
|
16
|
+
# Syntactic sugar to reduce verbosity of standard queries.
|
|
17
|
+
#
|
|
18
|
+
# @param [GraphQL::Client::Definition] template The template to be used.
|
|
19
|
+
# @param [Hash] vars Variables to be passed into the query.
|
|
20
|
+
def self.query(template, vars = {})
|
|
21
|
+
SlsAdf.client.query(template, variables: vars)
|
|
22
|
+
end
|
|
18
23
|
end
|
data/lib/sls_adf/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sls_adf
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Toh Weiqing
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-03-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: graphql-client
|
|
@@ -204,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
204
204
|
version: '0'
|
|
205
205
|
requirements: []
|
|
206
206
|
rubyforge_project:
|
|
207
|
-
rubygems_version: 2.6
|
|
207
|
+
rubygems_version: 2.7.6
|
|
208
208
|
signing_key:
|
|
209
209
|
specification_version: 4
|
|
210
210
|
summary: Ruby client library for SLS (in progress).
|