files.com 1.1.742 → 1.1.744

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.
@@ -0,0 +1,20 @@
1
+ # Path comparison data
2
+
3
+ `path_comparison.json` is the version 1 comparison map for MySQL
4
+ `utf8mb4_0900_ai_ci`, shared with Files.com server path comparison.
5
+ `comparison_examples.json` contains exact input/output examples.
6
+
7
+ Source: `files-rails` commit `41cec53c4cc711a193a16fff5d1dbadaffb32de4`,
8
+ `gems/files-path-native/data`, published in `files-path-native` 0.1.1914082.
9
+ SHA-256 of `path_comparison.json`: `a64d5de7fd4450f9889b57a5ac3088eb41451545985017a2beada38aaad2e371`.
10
+
11
+ Normalize path syntax first, then replace each Unicode scalar once using the
12
+ hexadecimal keys in `mapping`. Preserve scalars without entries. An empty value
13
+ removes a scalar; a value can also contain several scalars. Do not normalize,
14
+ lowercase, trim, or apply path syntax normalization after replacement. Keep the
15
+ original path for requests and display; comparison keys are for matching only.
16
+
17
+ Update the map and server examples together from an approved server revision,
18
+ record the new digest here, and run every SDK's path comparison tests. Runtime
19
+ resources under each generated SDK are copied from this shared source by the
20
+ generator; do not edit those copies independently.
@@ -8,10 +8,18 @@ RSpec.describe Files::PathUtil do
8
8
  test_cases.each do |test_case_info|
9
9
  src_chars, dst_chars = test_case_info
10
10
  example "normalizes #{src_chars} to #{dst_chars}" do
11
+ expect(Files::PathUtil.normalize_for_comparison(src_chars)).to eq(dst_chars)
12
+ expect(Files::PathUtil.normalize_for_comparison(dst_chars)).to eq(dst_chars)
11
13
  expect(Files::PathUtil.same?(src_chars, dst_chars)).to eq(true)
12
14
  end
13
15
  end
14
16
 
17
+ it "matches the server comparison examples without rewriting the result" do
18
+ JSON.parse(File.read("shared/comparison_examples.json")).each do |input, expected|
19
+ expect(Files::PathUtil.normalize_for_comparison(input)).to eq(expected)
20
+ end
21
+ end
22
+
15
23
  it "normalizes API paths without changing path identity" do
16
24
  expect(Files::PathUtil.normalize("/../../remote\\path//./to/file.txt")).to eq("remote/path/to/file.txt")
17
25
  expect(Files::PathUtil.normalize("remote/../path/to/file.txt")).to eq("remote/path/to/file.txt")
data/test.sh CHANGED
@@ -2,7 +2,7 @@
2
2
  require "bundler"
3
3
  Bundler.with_unbundled_env do
4
4
  Dir.chdir("generated/ruby") do
5
- system "bundle install" if ARGV[0] == "true"
6
- system "bundle exec rspec"
5
+ exit 1 if ARGV[0] == "true" && !system("bundle install")
6
+ exit(system("bundle exec rspec") ? 0 : 1)
7
7
  end
8
- end
8
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.742
4
+ version: 1.1.744
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 1.0.1
75
+ version: 2.14.3
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 1.0.1
82
+ version: 2.14.3
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: faraday-multipart
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -477,8 +477,11 @@ files:
477
477
  - lib/files.com/util.rb
478
478
  - lib/files.com/version.rb
479
479
  - setup.sh
480
+ - shared/comparison_examples.json
480
481
  - shared/header_test_data.json
481
482
  - shared/normalization_for_comparison_test_data.json
483
+ - shared/path_comparison.json
484
+ - shared/path_comparison.md
482
485
  - shared/url_test_data.json
483
486
  - spec/decimal_contract_spec.rb
484
487
  - spec/language_spec.rb
@@ -505,7 +508,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
505
508
  requirements:
506
509
  - - ">="
507
510
  - !ruby/object:Gem::Version
508
- version: '2.7'
511
+ version: '3.0'
509
512
  required_rubygems_version: !ruby/object:Gem::Requirement
510
513
  requirements:
511
514
  - - ">="