bridgetown-builder 1.0.0.alpha1 → 1.0.0.alpha2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -2
- data/lib/bridgetown-builder/builder.rb +2 -1
- data/lib/bridgetown-builder/dsl/http.rb +8 -8
- data/lib/bridgetown-builder/dsl/resources.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d052e4df4a73dd7e9904d1a9ca2b9a14a3ba6539ba65133755a80a526d3ea88a
|
4
|
+
data.tar.gz: 0ef018d8a40f09aedf1946503596499d231ada3509f122aac296768eb0484eec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb054f8e6d98563ce0a51eb107541b5eb29bcba3b37a5e8f8dd2a291c09b4afca853636bd2607336d5913051df4a42ff181e2f4c53f1f23db73bd3708b01f516
|
7
|
+
data.tar.gz: 59afe7e839fe814961cca180b6fd89941b564635bf9bef5dd100812c33e2634c8ede3fa46de3381b88ad9d064034c47c5296696f7958d79a5f33790d75cb412f
|
data/.rubocop.yml
CHANGED
@@ -10,14 +10,14 @@ module Bridgetown
|
|
10
10
|
module HTTP
|
11
11
|
def get(url, headers: {}, parse_json: true)
|
12
12
|
body = begin
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
13
|
+
connection(parse_json: parse_json).get(url, headers: headers).body
|
14
|
+
rescue Faraday::ParsingError
|
15
|
+
Bridgetown.logger.error(
|
16
|
+
"Faraday::ParsingError",
|
17
|
+
"The response from #{url} did not contain valid JSON"
|
18
|
+
)
|
19
|
+
nil
|
20
|
+
end
|
21
21
|
yield body
|
22
22
|
end
|
23
23
|
|
@@ -4,7 +4,7 @@ module Bridgetown
|
|
4
4
|
module Builders
|
5
5
|
module DSL
|
6
6
|
module Resources
|
7
|
-
def add_resource(collection_name, path, &block)
|
7
|
+
def add_resource(collection_name, path, &block) # rubocop:todo Metrics/AbcSize
|
8
8
|
data = Bridgetown::Utils::RubyFrontMatter.new(scope: self).tap do |fm|
|
9
9
|
fm.define_singleton_method(:___) do |hsh|
|
10
10
|
hsh.each do |k, v|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bridgetown-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.alpha2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bridgetown Team
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.0.0.
|
19
|
+
version: 1.0.0.alpha2
|
20
20
|
type: :runtime
|
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.0.0.
|
26
|
+
version: 1.0.0.alpha2
|
27
27
|
description:
|
28
28
|
email: maintainers@bridgetownrb.com
|
29
29
|
executables: []
|