jeql 0.2.1 → 0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.devcontainer/Dockerfile +3 -0
- data/.devcontainer/devcontainer.json +8 -0
- data/.github/workflows/main.yml +29 -0
- data/.gitignore +1 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +49 -45
- data/README.md +17 -9
- data/jeql.gemspec +3 -3
- data/lib/jeql/version.rb +1 -1
- metadata +17 -15
- data/.travis.yml +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63b172d68458c2361a9a2f83f1050ea8a1cf010506db46409bea539fb970d790
|
4
|
+
data.tar.gz: 681675092984ad6a431761371168e859cf5c303f152ca6189850158d1b697548
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3157683fdf569c2e9c3de4707adf7aae7ebab944d383203366c2eb8fef4fa0e6ad0280666260d6f91a5e1a657c012e840ad8c93901cf55eda750ec32ff7af6e6
|
7
|
+
data.tar.gz: ad1fd504a156034d3ac73dcb740472dfbb494288f20639a5f42a73079e5b7c1a61b6dce792da84c9cb4a0f29613edc86109b77a8a0a4948fe7360a8a00ace6f8
|
@@ -0,0 +1,29 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
steps:
|
14
|
+
|
15
|
+
- uses: actions/checkout@v2
|
16
|
+
- uses: ruby/setup-ruby@v1
|
17
|
+
name: Set up ruby
|
18
|
+
- uses: actions/cache@v1
|
19
|
+
with:
|
20
|
+
path: vendor/bundle
|
21
|
+
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
22
|
+
restore-keys: |
|
23
|
+
${{ runner.os }}-gems-
|
24
|
+
- name: Install dependencies
|
25
|
+
run: |
|
26
|
+
bundle config path vendor/bundle
|
27
|
+
bundle install --jobs 4 --retry 3
|
28
|
+
- name: Run tests
|
29
|
+
run: bundle exec rake
|
data/.gitignore
CHANGED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.7.0
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jeql (0.
|
4
|
+
jeql (0.3)
|
5
5
|
faraday
|
6
|
-
jekyll (~>
|
6
|
+
jekyll (~> 4.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
addressable (2.
|
12
|
-
public_suffix (>= 2.0.2, <
|
11
|
+
addressable (2.7.0)
|
12
|
+
public_suffix (>= 2.0.2, < 5.0)
|
13
13
|
colorator (1.1.0)
|
14
14
|
concurrent-ruby (1.1.5)
|
15
15
|
crack (0.4.3)
|
@@ -19,81 +19,85 @@ GEM
|
|
19
19
|
eventmachine (>= 0.12.9)
|
20
20
|
http_parser.rb (~> 0.6.0)
|
21
21
|
eventmachine (1.2.7)
|
22
|
-
faraday (0.
|
22
|
+
faraday (0.17.1)
|
23
23
|
multipart-post (>= 1.2, < 3)
|
24
|
-
ffi (1.11.
|
24
|
+
ffi (1.11.3)
|
25
25
|
forwardable-extended (2.6.0)
|
26
|
-
hashdiff (0.
|
26
|
+
hashdiff (1.0.0)
|
27
27
|
http_parser.rb (0.6.0)
|
28
|
-
i18n (
|
28
|
+
i18n (1.7.0)
|
29
29
|
concurrent-ruby (~> 1.0)
|
30
|
-
jekyll (
|
30
|
+
jekyll (4.0.0)
|
31
31
|
addressable (~> 2.4)
|
32
32
|
colorator (~> 1.0)
|
33
33
|
em-websocket (~> 0.5)
|
34
|
-
i18n (
|
35
|
-
jekyll-sass-converter (~>
|
34
|
+
i18n (>= 0.9.5, < 2)
|
35
|
+
jekyll-sass-converter (~> 2.0)
|
36
36
|
jekyll-watch (~> 2.0)
|
37
|
-
kramdown (~> 1
|
37
|
+
kramdown (~> 2.1)
|
38
|
+
kramdown-parser-gfm (~> 1.0)
|
38
39
|
liquid (~> 4.0)
|
39
40
|
mercenary (~> 0.3.3)
|
40
41
|
pathutil (~> 0.9)
|
41
|
-
rouge (
|
42
|
+
rouge (~> 3.0)
|
42
43
|
safe_yaml (~> 1.0)
|
43
|
-
|
44
|
-
|
44
|
+
terminal-table (~> 1.8)
|
45
|
+
jekyll-sass-converter (2.0.1)
|
46
|
+
sassc (> 2.0.1, < 3.0)
|
45
47
|
jekyll-watch (2.2.1)
|
46
48
|
listen (~> 3.0)
|
47
|
-
kramdown (
|
49
|
+
kramdown (2.3.0)
|
50
|
+
rexml
|
51
|
+
kramdown-parser-gfm (1.1.0)
|
52
|
+
kramdown (~> 2.0)
|
48
53
|
liquid (4.0.3)
|
49
|
-
listen (3.
|
50
|
-
rb-fsevent (~> 0.
|
51
|
-
rb-inotify (~> 0.9, >= 0.9.
|
52
|
-
ruby_dep (~> 1.2)
|
54
|
+
listen (3.2.0)
|
55
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
56
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
53
57
|
mercenary (0.3.6)
|
54
58
|
multipart-post (2.1.1)
|
55
59
|
pathutil (0.16.2)
|
56
60
|
forwardable-extended (~> 2.6)
|
57
|
-
public_suffix (
|
58
|
-
rake (
|
61
|
+
public_suffix (4.0.1)
|
62
|
+
rake (13.0.1)
|
59
63
|
rb-fsevent (0.10.3)
|
60
64
|
rb-inotify (0.10.0)
|
61
65
|
ffi (~> 1.0)
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
rspec-
|
66
|
-
rspec-
|
67
|
-
|
68
|
-
|
69
|
-
|
66
|
+
rexml (3.2.4)
|
67
|
+
rouge (3.13.0)
|
68
|
+
rspec (3.9.0)
|
69
|
+
rspec-core (~> 3.9.0)
|
70
|
+
rspec-expectations (~> 3.9.0)
|
71
|
+
rspec-mocks (~> 3.9.0)
|
72
|
+
rspec-core (3.9.0)
|
73
|
+
rspec-support (~> 3.9.0)
|
74
|
+
rspec-expectations (3.9.0)
|
70
75
|
diff-lcs (>= 1.2.0, < 2.0)
|
71
|
-
rspec-support (~> 3.
|
72
|
-
rspec-mocks (3.
|
76
|
+
rspec-support (~> 3.9.0)
|
77
|
+
rspec-mocks (3.9.0)
|
73
78
|
diff-lcs (>= 1.2.0, < 2.0)
|
74
|
-
rspec-support (~> 3.
|
75
|
-
rspec-support (3.
|
76
|
-
ruby_dep (1.5.0)
|
79
|
+
rspec-support (~> 3.9.0)
|
80
|
+
rspec-support (3.9.0)
|
77
81
|
safe_yaml (1.0.5)
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
webmock (3.
|
82
|
+
sassc (2.2.1)
|
83
|
+
ffi (~> 1.9)
|
84
|
+
terminal-table (1.8.0)
|
85
|
+
unicode-display_width (~> 1.1, >= 1.1.1)
|
86
|
+
unicode-display_width (1.6.0)
|
87
|
+
webmock (3.7.6)
|
84
88
|
addressable (>= 2.3.6)
|
85
89
|
crack (>= 0.3.2)
|
86
|
-
hashdiff
|
90
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
87
91
|
|
88
92
|
PLATFORMS
|
89
93
|
ruby
|
90
94
|
|
91
95
|
DEPENDENCIES
|
92
|
-
bundler (~> 1
|
96
|
+
bundler (~> 2.1)
|
93
97
|
jeql!
|
94
|
-
rake (~>
|
98
|
+
rake (~> 13.0)
|
95
99
|
rspec (~> 3.0)
|
96
100
|
webmock
|
97
101
|
|
98
102
|
BUNDLED WITH
|
99
|
-
1.
|
103
|
+
2.1.2
|
data/README.md
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
# jeql
|
1
|
+
# jeql - Jekyll with GraphQL
|
2
|
+
|
3
|
+
![](https://github.com/Crunch09/jeql/workflows/CI/badge.svg) [![Gem Version](https://badge.fury.io/rb/jeql.svg)](https://badge.fury.io/rb/jeql)
|
2
4
|
|
3
5
|
## Installation
|
4
6
|
|
@@ -21,7 +23,7 @@ After this run `bundle install` within your site's directory.
|
|
21
23
|
|
22
24
|
### GraphQL endpoints
|
23
25
|
|
24
|
-
You need to define graphQL endpoints within your
|
26
|
+
You need to define graphQL endpoints within your Jekyll config. Within the key
|
25
27
|
`jeql` list all your providers in the format:
|
26
28
|
```yml
|
27
29
|
jeql:
|
@@ -30,7 +32,7 @@ jeql:
|
|
30
32
|
header:
|
31
33
|
Authorization: "HTTP AUTHORIZATION HEADER - SECRET"
|
32
34
|
```
|
33
|
-
An example config to access the graphQL - API from
|
35
|
+
An example config to access the graphQL - API from GitHub would look like this:
|
34
36
|
```yml
|
35
37
|
jeql:
|
36
38
|
github:
|
@@ -38,21 +40,24 @@ jeql:
|
|
38
40
|
header:
|
39
41
|
Authorization: "bearer my-secret-header"
|
40
42
|
```
|
43
|
+
|
41
44
|
**Attention**: Make sure to *not* commit authorization tokens in a public repository.
|
42
|
-
Instead make use of
|
45
|
+
Instead make use of Jekyll's multiple-config-file feature and add these tokens to a
|
43
46
|
private config file which is not checked into your version control system.
|
44
47
|
|
45
48
|
### GraphQL queries
|
46
49
|
|
47
|
-
Queries in `jeql` are specified as *json* files and live within the `
|
48
|
-
of your
|
50
|
+
Queries in `jeql` are specified as *json* files and live within the `_graphql` directory
|
51
|
+
of your Jekyll site.
|
52
|
+
|
49
53
|
An example query file would have the following content:
|
54
|
+
|
50
55
|
```json
|
51
56
|
{
|
52
57
|
"query": "query { viewer { name repositories(last: 3){ nodes { name }} }}"
|
53
58
|
}
|
54
59
|
```
|
55
|
-
and would e.g. be stored as `/
|
60
|
+
and would e.g. be stored as `/_graphql/last_touched_repositories.json`.
|
56
61
|
|
57
62
|
### Using it in liquid
|
58
63
|
|
@@ -63,10 +68,11 @@ The `graphql` tag expects two parameters:
|
|
63
68
|
- query
|
64
69
|
|
65
70
|
`endpoint` is the name of the graphQL - API endpoint as you have it defined in your
|
66
|
-
|
67
|
-
the graphQL query that should be executed against the endpoint (
|
71
|
+
Jekyll config file. `query` is the name of the file under `_graphql` in which you stored
|
72
|
+
the graphQL query that should be executed against the endpoint (without the *.json* extension).
|
68
73
|
|
69
74
|
An example which uses the settings and query from the paragraphs above would look like this:
|
75
|
+
|
70
76
|
```html
|
71
77
|
{% graphql endpoint: "github", query: "last_touched_repositories" %}
|
72
78
|
...
|
@@ -74,6 +80,7 @@ An example which uses the settings and query from the paragraphs above would loo
|
|
74
80
|
```
|
75
81
|
Between the opening and closing `graphql` tag you have access to the variable `data`
|
76
82
|
which will contain the response of the graphQL query:
|
83
|
+
|
77
84
|
```html
|
78
85
|
<ul>
|
79
86
|
{% graphql endpoint: "github", query: "last_touched_repositories" %}
|
@@ -90,6 +97,7 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
90
97
|
|
91
98
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
92
99
|
|
100
|
+
|
93
101
|
## Contributing
|
94
102
|
|
95
103
|
Bug reports and pull requests are welcome on GitHub at https://github.com/Crunch09/jeql. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
data/jeql.gemspec
CHANGED
@@ -29,10 +29,10 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
30
30
|
spec.require_paths = ["lib"]
|
31
31
|
|
32
|
-
spec.add_development_dependency "bundler", "~> 1
|
33
|
-
spec.add_development_dependency "rake", "~>
|
32
|
+
spec.add_development_dependency "bundler", "~> 2.1"
|
33
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
34
34
|
spec.add_development_dependency "rspec", "~> 3.0"
|
35
35
|
spec.add_development_dependency "webmock"
|
36
36
|
spec.add_dependency "faraday"
|
37
|
-
spec.add_dependency "jekyll", "~>
|
37
|
+
spec.add_dependency "jekyll", "~> 4.0"
|
38
38
|
end
|
data/lib/jeql/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jeql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.3'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Thomas
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1
|
19
|
+
version: '2.1'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1
|
26
|
+
version: '2.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,24 +86,27 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '4.0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
97
|
-
description:
|
96
|
+
version: '4.0'
|
97
|
+
description:
|
98
98
|
email:
|
99
99
|
- flo@florianthomas.net
|
100
100
|
executables: []
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
+
- ".devcontainer/Dockerfile"
|
105
|
+
- ".devcontainer/devcontainer.json"
|
106
|
+
- ".github/workflows/main.yml"
|
104
107
|
- ".gitignore"
|
105
108
|
- ".rspec"
|
106
|
-
- ".
|
109
|
+
- ".ruby-version"
|
107
110
|
- CHANGELOG.md
|
108
111
|
- CODE_OF_CONDUCT.md
|
109
112
|
- Gemfile
|
@@ -123,7 +126,7 @@ licenses:
|
|
123
126
|
- MIT
|
124
127
|
metadata:
|
125
128
|
allowed_push_host: https://rubygems.org
|
126
|
-
post_install_message:
|
129
|
+
post_install_message:
|
127
130
|
rdoc_options: []
|
128
131
|
require_paths:
|
129
132
|
- lib
|
@@ -138,9 +141,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
141
|
- !ruby/object:Gem::Version
|
139
142
|
version: '0'
|
140
143
|
requirements: []
|
141
|
-
|
142
|
-
|
143
|
-
signing_key:
|
144
|
+
rubygems_version: 3.1.2
|
145
|
+
signing_key:
|
144
146
|
specification_version: 4
|
145
147
|
summary: jeql is a GraphQL plugin for jekyll
|
146
148
|
test_files: []
|