bridgetown-builder 2.1.2 → 2.2.0

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
  SHA256:
3
- metadata.gz: 89578d71114278092e42fd679c62b30a3ba24097fc3ed1b1f0c4f548786b1327
4
- data.tar.gz: b961d48d62d64fa924536757cd5eedbe7880f20385cd540528d6100a405c719b
3
+ metadata.gz: 6b1cf42316890dfa2096d38feb23022a963dc594c741bdb1f567e1cea02f67b6
4
+ data.tar.gz: 88218fe35fd0394e597ddd95c91b377fa691fdd8f3f310d4e1fe7c872dcdb989
5
5
  SHA512:
6
- metadata.gz: '01964f385d5262eb3f0cd5e49b01b01d571ba525fe84389be9465aabb501f2aa4adbe9b2f83fcb302016695679f1c59946266baeda253f9aae14e778777f5f8b'
7
- data.tar.gz: a21ac15c2f9a0ce226d5318ee6d235296290af589f9b19eb9dfe097b68a2b1f999cc9669a9dd267c23db33a9dba5e6f83ee1b55588a33cb7c89a93837a909c7e
6
+ metadata.gz: 3e57c54df40b079e3703a6151b911622e0c14bcd2ecd93a10226b0a31d6075b8d6144cb52bdd06741f82a0d2df105c682a003f7de431a568fd47c3b070607cad
7
+ data.tar.gz: f3c0cee3d6e9e1e05949848d5fbfba45640f4db6fd5361997f979d53f5ed781cd81d4d8bcf8df6d0ae8e91f6bc04d8de0311b9df8ca51003ccca69bb29751ce2
@@ -7,6 +7,11 @@ module Bridgetown
7
7
  module DSL
8
8
  module HTTP
9
9
  def get(url, headers: {}, parse_json: true, **params)
10
+ Deprecator.deprecation_message(
11
+ "The DSL for HTTP requests (`get`) is deprecated and will be " \
12
+ "removed in Bridgetown 3.0. Use an HTTP client such as HTTPX: " \
13
+ "https://honeyryderchuck.gitlab.io/httpx"
14
+ )
10
15
  body = begin
11
16
  connection(parse_json:).get(url, params, headers).body
12
17
  rescue Faraday::ParsingError
@@ -20,6 +25,19 @@ module Bridgetown
20
25
  end
21
26
 
22
27
  def connection(headers: {}, parse_json: true)
28
+ callers = caller_locations.map { [_1.base_label, _1.path] }
29
+ this_file_path = "bridgetown-builder/lib/bridgetown-builder/dsl/http.rb"
30
+ called_from_get = callers.any? do |base_label, path|
31
+ base_label == "get" && path.end_with?(this_file_path)
32
+ end
33
+ unless called_from_get
34
+ Deprecator.deprecation_message(
35
+ "The DSL for HTTP requests (`connection`) is deprecated and will be " \
36
+ "removed in Bridgetown 3.0. Use an HTTP client such as HTTPX: " \
37
+ "https://honeyryderchuck.gitlab.io/httpx"
38
+ )
39
+ end
40
+
23
41
  headers["Content-Type"] = "application/json" if parse_json
24
42
 
25
43
  Faraday.new(headers:) do |faraday|
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2026-05-20 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: bridgetown-core
@@ -15,14 +16,15 @@ dependencies:
15
16
  requirements:
16
17
  - - '='
17
18
  - !ruby/object:Gem::Version
18
- version: 2.1.2
19
+ version: 2.2.0
19
20
  type: :runtime
20
21
  prerelease: false
21
22
  version_requirements: !ruby/object:Gem::Requirement
22
23
  requirements:
23
24
  - - '='
24
25
  - !ruby/object:Gem::Version
25
- version: 2.1.2
26
+ version: 2.2.0
27
+ description:
26
28
  email: maintainers@bridgetownrb.com
27
29
  executables: []
28
30
  extensions: []
@@ -49,6 +51,7 @@ metadata:
49
51
  bug_tracker_uri: https://github.com/bridgetownrb/bridgetown/issues
50
52
  changelog_uri: https://github.com/bridgetownrb/bridgetown/releases
51
53
  homepage_uri: https://github.com/bridgetownrb/bridgetown/tree/main/bridgetown-builder
54
+ post_install_message:
52
55
  rdoc_options: []
53
56
  require_paths:
54
57
  - lib
@@ -63,7 +66,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
66
  - !ruby/object:Gem::Version
64
67
  version: '0'
65
68
  requirements: []
66
- rubygems_version: 3.7.2
69
+ rubygems_version: 3.5.22
70
+ signing_key:
67
71
  specification_version: 4
68
72
  summary: A Bridgetown plugin to provide a sophisticated DSL for writing plugins at
69
73
  a higher level of abstraction.