context.dev 1.0.0 → 1.1.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: ce18332b3f13961ff9ad6786e5bd9b70ce0e8fdac85e9b9fa96464d92d216912
4
- data.tar.gz: 8d3fee6ed1a2234af48f4708eef681a15f09bd4abe808826151884dd2436e981
3
+ metadata.gz: 992781edb281733a62362aae314841eadb371c812bb605b62d95753e8dd98b66
4
+ data.tar.gz: 99bfe0d4870306b6d341e7fd305bb263ddb1d7daefce0fde7700b8ea2f2c313a
5
5
  SHA512:
6
- metadata.gz: a3ca40512236273d4e58a969c8ec3beabf09b4e0ed93eeeeb2295fc9e0ae3fdc740f5b7ab24bf9425ab5411280c4eb900aed05b6bde0b7038b2e7fedfdd2838e
7
- data.tar.gz: 9a1fbc45a9482ffbb6da7bb67b44a359f47ae3a6dfb09d1a69a99f035358e094a62d5127a83d87e07eb5435837e7a60b0eee170d52654e43b58bcc024af477d2
6
+ metadata.gz: a8e792e0e07285853aac66b6d7e2643a38d8e832c68e56e29f52367081710386db7e8a6422241ae87b0e0f75796523f3f151b611889110c6ea3503b33d05c3c9
7
+ data.tar.gz: 475f8211124320e8e80cdebd5b5e28b1a575308ec021622fbc98604f547070c9f8c23b6a994468e1aa5db4dd747842bdeb5f307f26f3f4125bd49238b5a7b8b7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.0 (2026-03-28)
4
+
5
+ Full Changelog: [v1.0.0...v1.1.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.0.0...v1.1.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([9ae9b10](https://github.com/context-dot-dev/context-ruby-sdk/commit/9ae9b108ce2737b42574a6f781103410a546f704))
10
+ * **api:** api update ([58ed755](https://github.com/context-dot-dev/context-ruby-sdk/commit/58ed7551637936ea3c007e28af3358eb96a339ca))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **internal:** correct multipart form field name encoding ([221d059](https://github.com/context-dot-dev/context-ruby-sdk/commit/221d0598148243acddae6c9679c949c07e1dcd7a))
16
+
17
+
18
+ ### Chores
19
+
20
+ * **ci:** support opting out of skipping builds on metadata-only commits ([aad82ac](https://github.com/context-dot-dev/context-ruby-sdk/commit/aad82ac90dd1c55ca4db05e63b70b46abded53e3))
21
+
3
22
  ## 1.0.0 (2026-03-25)
4
23
 
5
24
  Full Changelog: [v0.4.0...v1.0.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v0.4.0...v1.0.0)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "context.dev", "~> 1.0.0"
29
+ gem "context.dev", "~> 1.1.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -571,8 +571,7 @@ module ContextDev
571
571
  y << "Content-Disposition: form-data"
572
572
 
573
573
  unless key.nil?
574
- name = ERB::Util.url_encode(key.to_s)
575
- y << "; name=\"#{name}\""
574
+ y << "; name=\"#{key}\""
576
575
  end
577
576
 
578
577
  case val
@@ -75,6 +75,10 @@ module ContextDev
75
75
  LINK = :link
76
76
  SOURCE = :source
77
77
  VIDEO = :video
78
+ CSS = :css
79
+ OBJECT = :object
80
+ META = :meta
81
+ BACKGROUND = :background
78
82
 
79
83
  # @!method self.values
80
84
  # @return [Array<Symbol>]
@@ -32,7 +32,14 @@ module ContextDev
32
32
  # @return [Boolean, nil]
33
33
  optional :shorten_base64_images, ContextDev::Internal::Type::Boolean
34
34
 
35
- # @!method initialize(url:, include_images: nil, include_links: nil, shorten_base64_images: nil, request_options: {})
35
+ # @!attribute use_main_content_only
36
+ # Extract only the main content of the page, excluding headers, footers, sidebars,
37
+ # and navigation
38
+ #
39
+ # @return [Boolean, nil]
40
+ optional :use_main_content_only, ContextDev::Internal::Type::Boolean
41
+
42
+ # @!method initialize(url:, include_images: nil, include_links: nil, shorten_base64_images: nil, use_main_content_only: nil, request_options: {})
36
43
  # Some parameter documentations has been truncated, see
37
44
  # {ContextDev::Models::WebWebScrapeMdParams} for more details.
38
45
  #
@@ -44,6 +51,8 @@ module ContextDev
44
51
  #
45
52
  # @param shorten_base64_images [Boolean] Shorten base64-encoded image data in the Markdown output
46
53
  #
54
+ # @param use_main_content_only [Boolean] Extract only the main content of the page, excluding headers, footers, sidebars,
55
+ #
47
56
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
48
57
  end
49
58
  end
@@ -92,7 +92,7 @@ module ContextDev
92
92
  # Scrapes the given URL, converts the HTML content to Markdown, and returns the
93
93
  # result.
94
94
  #
95
- # @overload web_scrape_md(url:, include_images: nil, include_links: nil, shorten_base64_images: nil, request_options: {})
95
+ # @overload web_scrape_md(url:, include_images: nil, include_links: nil, shorten_base64_images: nil, use_main_content_only: nil, request_options: {})
96
96
  #
97
97
  # @param url [String] Full URL to scrape and convert to markdown (must include http:// or https:// pro
98
98
  #
@@ -102,6 +102,8 @@ module ContextDev
102
102
  #
103
103
  # @param shorten_base64_images [Boolean] Shorten base64-encoded image data in the Markdown output
104
104
  #
105
+ # @param use_main_content_only [Boolean] Extract only the main content of the page, excluding headers, footers, sidebars,
106
+ #
105
107
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
106
108
  #
107
109
  # @return [ContextDev::Models::WebWebScrapeMdResponse]
@@ -116,7 +118,8 @@ module ContextDev
116
118
  query: query.transform_keys(
117
119
  include_images: "includeImages",
118
120
  include_links: "includeLinks",
119
- shorten_base64_images: "shortenBase64Images"
121
+ shorten_base64_images: "shortenBase64Images",
122
+ use_main_content_only: "useMainContentOnly"
120
123
  ),
121
124
  model: ContextDev::Models::WebWebScrapeMdResponse,
122
125
  options: options
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ContextDev
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  end
@@ -172,6 +172,26 @@ module ContextDev
172
172
  :video,
173
173
  ContextDev::Models::WebWebScrapeImagesResponse::Image::Element::TaggedSymbol
174
174
  )
175
+ CSS =
176
+ T.let(
177
+ :css,
178
+ ContextDev::Models::WebWebScrapeImagesResponse::Image::Element::TaggedSymbol
179
+ )
180
+ OBJECT =
181
+ T.let(
182
+ :object,
183
+ ContextDev::Models::WebWebScrapeImagesResponse::Image::Element::TaggedSymbol
184
+ )
185
+ META =
186
+ T.let(
187
+ :meta,
188
+ ContextDev::Models::WebWebScrapeImagesResponse::Image::Element::TaggedSymbol
189
+ )
190
+ BACKGROUND =
191
+ T.let(
192
+ :background,
193
+ ContextDev::Models::WebWebScrapeImagesResponse::Image::Element::TaggedSymbol
194
+ )
175
195
 
176
196
  sig do
177
197
  override.returns(
@@ -37,12 +37,21 @@ module ContextDev
37
37
  sig { params(shorten_base64_images: T::Boolean).void }
38
38
  attr_writer :shorten_base64_images
39
39
 
40
+ # Extract only the main content of the page, excluding headers, footers, sidebars,
41
+ # and navigation
42
+ sig { returns(T.nilable(T::Boolean)) }
43
+ attr_reader :use_main_content_only
44
+
45
+ sig { params(use_main_content_only: T::Boolean).void }
46
+ attr_writer :use_main_content_only
47
+
40
48
  sig do
41
49
  params(
42
50
  url: String,
43
51
  include_images: T::Boolean,
44
52
  include_links: T::Boolean,
45
53
  shorten_base64_images: T::Boolean,
54
+ use_main_content_only: T::Boolean,
46
55
  request_options: ContextDev::RequestOptions::OrHash
47
56
  ).returns(T.attached_class)
48
57
  end
@@ -56,6 +65,9 @@ module ContextDev
56
65
  include_links: nil,
57
66
  # Shorten base64-encoded image data in the Markdown output
58
67
  shorten_base64_images: nil,
68
+ # Extract only the main content of the page, excluding headers, footers, sidebars,
69
+ # and navigation
70
+ use_main_content_only: nil,
59
71
  request_options: {}
60
72
  )
61
73
  end
@@ -67,6 +79,7 @@ module ContextDev
67
79
  include_images: T::Boolean,
68
80
  include_links: T::Boolean,
69
81
  shorten_base64_images: T::Boolean,
82
+ use_main_content_only: T::Boolean,
70
83
  request_options: ContextDev::RequestOptions
71
84
  }
72
85
  )
@@ -76,6 +76,7 @@ module ContextDev
76
76
  include_images: T::Boolean,
77
77
  include_links: T::Boolean,
78
78
  shorten_base64_images: T::Boolean,
79
+ use_main_content_only: T::Boolean,
79
80
  request_options: ContextDev::RequestOptions::OrHash
80
81
  ).returns(ContextDev::Models::WebWebScrapeMdResponse)
81
82
  end
@@ -89,6 +90,9 @@ module ContextDev
89
90
  include_links: nil,
90
91
  # Shorten base64-encoded image data in the Markdown output
91
92
  shorten_base64_images: nil,
93
+ # Extract only the main content of the page, excluding headers, footers, sidebars,
94
+ # and navigation
95
+ use_main_content_only: nil,
92
96
  request_options: {}
93
97
  )
94
98
  end
@@ -57,7 +57,16 @@ module ContextDev
57
57
  type: ContextDev::Models::WebWebScrapeImagesResponse::Image::type_
58
58
  }
59
59
 
60
- type element = :img | :svg | :link | :source | :video
60
+ type element =
61
+ :img
62
+ | :svg
63
+ | :link
64
+ | :source
65
+ | :video
66
+ | :css
67
+ | :object
68
+ | :meta
69
+ | :background
61
70
 
62
71
  module Element
63
72
  extend ContextDev::Internal::Type::Enum
@@ -67,6 +76,10 @@ module ContextDev
67
76
  LINK: :link
68
77
  SOURCE: :source
69
78
  VIDEO: :video
79
+ CSS: :css
80
+ OBJECT: :object
81
+ META: :meta
82
+ BACKGROUND: :background
70
83
 
71
84
  def self?.values: -> ::Array[ContextDev::Models::WebWebScrapeImagesResponse::Image::element]
72
85
  end
@@ -5,7 +5,8 @@ module ContextDev
5
5
  url: String,
6
6
  include_images: bool,
7
7
  include_links: bool,
8
- :shorten_base64_images => bool
8
+ :shorten_base64_images => bool,
9
+ use_main_content_only: bool
9
10
  }
10
11
  & ContextDev::Internal::Type::request_parameters
11
12
 
@@ -27,11 +28,16 @@ module ContextDev
27
28
 
28
29
  def shorten_base64_images=: (bool) -> bool
29
30
 
31
+ attr_reader use_main_content_only: bool?
32
+
33
+ def use_main_content_only=: (bool) -> bool
34
+
30
35
  def initialize: (
31
36
  url: String,
32
37
  ?include_images: bool,
33
38
  ?include_links: bool,
34
39
  ?shorten_base64_images: bool,
40
+ ?use_main_content_only: bool,
35
41
  ?request_options: ContextDev::request_opts
36
42
  ) -> void
37
43
 
@@ -40,6 +46,7 @@ module ContextDev
40
46
  include_images: bool,
41
47
  include_links: bool,
42
48
  :shorten_base64_images => bool,
49
+ use_main_content_only: bool,
43
50
  request_options: ContextDev::RequestOptions
44
51
  }
45
52
  end
@@ -24,6 +24,7 @@ module ContextDev
24
24
  ?include_images: bool,
25
25
  ?include_links: bool,
26
26
  ?shorten_base64_images: bool,
27
+ ?use_main_content_only: bool,
27
28
  ?request_options: ContextDev::request_opts
28
29
  ) -> ContextDev::Models::WebWebScrapeMdResponse
29
30
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: context.dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Context Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-03-25 00:00:00.000000000 Z
11
+ date: 2026-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi