files.com 1.1.766 → 1.1.767

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: 0bb1d5b48b96119ec91525d8f055be9455d19406b796869d5e9db694bc10e34d
4
- data.tar.gz: 3b963488ee21b159a12a9bd256e343d0e86987f4ac8701de9e3eccc1fdc86876
3
+ metadata.gz: 0f28911c7269ba7bca7b67e635c974300c1766dffd95239e2755bc3e6fd59309
4
+ data.tar.gz: 10abf8ff3c46f32c466f3658c2c86b9953771c13664af3665fee10a4108d3cf4
5
5
  SHA512:
6
- metadata.gz: ebe6a92f79a33732e665c36dec9269f648bb77be622659921ae9594fb703eebc457e628b058daa103ba693a15df62410b8c0e87f9b4f1f0eda714cda06937a15
7
- data.tar.gz: 279cacd8d1dbadfb490ecbbecfd8a1069b019633469e731c1fac550aa42791f601c2f173868681b8d78fc71ed5d9f1dded664bc45c3cd27ac524e9e9e647e4e7
6
+ metadata.gz: a44129f9828a4d647097cb1d86af56940f5402e71c389e6fdc74ba693e3a60f06b4f724201b5a625c5ee13c3768db7daf9f8b2ab31379c66b3a3c35240fbcd1a
7
+ data.tar.gz: 6337ed3e62e953bd9d51d0da29f2d87079b4b8d0b1408061cc6a571405255f3b3c7247247da48bea29a6c7e473ee98b01889ca731467e4c47dd5c6a8c35d9e12
data/README.md CHANGED
@@ -791,18 +791,45 @@ end
791
791
 
792
792
  ## Mock Server
793
793
 
794
- Files.com publishes a Files.com API server, which is useful for testing your use of the Files.com
794
+ Files.com publishes a mock Files.com API server, which is useful for testing your use of the Files.com
795
795
  SDKs and other direct integrations against the Files.com API in an integration test environment.
796
-
797
- It is a Ruby app that operates as a minimal server for the purpose of testing basic network
798
- operations and JSON encoding for your SDK or API client. It does not maintain state and it does not
799
- deeply inspect your submissions for correctness.
800
-
801
- Eventually we will add more features intended for integration testing, such as the ability to
802
- intentionally provoke errors.
796
+ It never checks credentials: send any placeholder API key, and never use real Files.com credentials
797
+ with it.
798
+
799
+ The server has two modes, chosen when it starts:
800
+
801
+ * **Legacy mode** (the default) checks required parameters and parameter types, then returns a fixed
802
+ example response for each API endpoint. It does not maintain state and it does not deeply inspect
803
+ your submissions for correctness, which makes it useful for testing basic network operations and
804
+ JSON encoding for your SDK or API client.
805
+ * **Simulation mode** keeps records, files and folders in memory, so a test can create, list, update
806
+ and delete resources, upload a file and download the same bytes, and make chosen requests fail,
807
+ stall or lose their connection on purpose. Requests it does not simulate fail with a clear error
808
+ instead of returning an example response.
809
+
810
+ Start the server from its source with Ruby and Bundler. `FILES_MOCK_MODE` is read once at startup:
811
+ leaving it unset or setting it to `legacy` starts legacy mode, `simulation` starts simulation mode,
812
+ and any other value stops startup with an error. Legacy mode listens on port 4041 on all IPv4
813
+ interfaces, and simulation mode on `127.0.0.1:4041`.
814
+
815
+ Simulation mode keeps its state only in the server process. Its control endpoints under
816
+ `/__files_mock/v1` report when the server is ready, reset it with your fixtures, add fault rules
817
+ and return the journal of the requests it received. It refuses work over its limits instead of
818
+ truncating it. The README in the source describes all of these, the operations it simulates and
819
+ how to configure its limits.
803
820
 
804
821
  Download the server as a Docker image via [Docker Hub](https://hub.docker.com/r/filescom/files-mock-server).
822
+ The image's `latest` tag moves to whichever server was published last, so it need not include
823
+ simulation mode; to run exactly the server the README describes, build the image from the source.
805
824
 
806
825
  The Source Code is also available on [GitHub](https://github.com/Files-com/files-mock-server).
807
826
 
808
- A README is available on the GitHub link.
827
+ ```shell title="Start the Mock Server"
828
+ bundle install
829
+
830
+ ## Legacy mode
831
+ bundle exec puma
832
+
833
+ ## Simulation mode
834
+ FILES_MOCK_MODE=simulation bundle exec puma
835
+ ```
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.766
1
+ 1.1.767
data/docs/ai_task.md CHANGED
@@ -80,7 +80,7 @@ Files::AiTask.list
80
80
 
81
81
  * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
82
82
  * `per_page` (int64): Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
83
- * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `id`, `disabled` or `updated_at`.
83
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `name`, `disabled` or `updated_at`.
84
84
  * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `disabled`, `trigger` or `workspace_id`. Valid field combinations are `[ workspace_id, disabled ]`.
85
85
 
86
86
 
@@ -303,7 +303,7 @@ module Files
303
303
  # Parameters:
304
304
  # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
305
305
  # per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
306
- # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `id`, `disabled` or `updated_at`.
306
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `name`, `disabled` or `updated_at`.
307
307
  # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `disabled`, `trigger` or `workspace_id`. Valid field combinations are `[ workspace_id, disabled ]`.
308
308
  def self.list(params = {}, options = {})
309
309
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
- VERSION = "1.1.766"
4
+ VERSION = "1.1.767"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.766
4
+ version: 1.1.767
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-05 00:00:00.000000000 Z
11
+ date: 2026-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable