ffi-gdal 1.0.0.beta13 → 1.0.0.beta14

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: 3a7da9b47c629fe9a1b116f1c12175858e4c259d01b1f1b87027e3060656a06b
4
- data.tar.gz: 13275d69e24bda923196ac121ddc55ea61fa61351c7ea5245b91991a2266d5a3
3
+ metadata.gz: 3afcc101b07f1be65e2cce03ed7d925ae1d94a2fb8f36e6b32c9738f97002619
4
+ data.tar.gz: caeedcff346cadb107ed4a91970b61a93f61959d6e0f0e69cc96dafc290a8851
5
5
  SHA512:
6
- metadata.gz: a46c6f0b1c318ff9ce7c0cb44d6f863cd8903194271bf9e5b93c0581b2dbd5129235829d97e64f725a561741933eadeb959d421fff09f562508097311afe0379
7
- data.tar.gz: a3efb551a19524168ffc9540854e3d99860018a062ed026621de787875576a1f6df74f3ca5f3eb0f34c31571be21b087a1262d16fbcd2e7b692da34671eefb2a
6
+ metadata.gz: 55f9c4e293410626d9fda5e624589f24fede9aeb8faff2378ab72c2fe2cd9d7f412eebfa3dddb313719710d950167e894b4a6abe4833997d27483046cf4f65c5
7
+ data.tar.gz: b315fe3b339d8d7c1479fd609660cb38e2872e5007500bb896175cd47fbd9322f8ac19f584cd9a8cf55163c5121574670ace63d5d6c6a33e300190a35ad46a04
data/History.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Format for this file derived from [http://keepachangelog.com](http://keepachangelog.com).
4
4
 
5
+ ## 1.0.0.beta14 / 2022-05-06
6
+
7
+ ### Bug Fixes
8
+
9
+ * [DEV-34133] Don't URI.parse path in `GDAL::Dataset#initialize` and `OGR::DataSource#initialize`.
10
+
5
11
  ## 1.0.0.beta13 / 2022-04-20
6
12
 
7
13
  ### Bug Fixes
@@ -2,6 +2,6 @@
2
2
 
3
3
  module FFI
4
4
  module GDAL
5
- VERSION = '1.0.0.beta13'
5
+ VERSION = '1.0.0.beta14'
6
6
  end
7
7
  end
data/lib/gdal/dataset.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'uri'
4
3
  require_relative '../gdal'
5
4
  require_relative '../ogr'
6
5
  require_relative 'major_object'
@@ -60,17 +59,10 @@ module GDAL
60
59
  def initialize(path_or_pointer, access_flag, shared_open = true)
61
60
  @c_pointer =
62
61
  if path_or_pointer.is_a? String
63
- file_path = begin
64
- uri = URI.parse(path_or_pointer)
65
- uri.scheme.nil? ? ::File.expand_path(path_or_pointer) : path_or_pointer
66
- rescue URI::InvalidURIError
67
- path_or_pointer
68
- end
69
-
70
62
  if shared_open
71
- FFI::GDAL::GDAL.GDALOpenShared(file_path, ACCESS_FLAGS[access_flag])
63
+ FFI::GDAL::GDAL.GDALOpenShared(path_or_pointer, ACCESS_FLAGS[access_flag])
72
64
  else
73
- FFI::GDAL::GDAL.GDALOpen(file_path, ACCESS_FLAGS[access_flag])
65
+ FFI::GDAL::GDAL.GDALOpen(path_or_pointer, ACCESS_FLAGS[access_flag])
74
66
  end
75
67
  else
76
68
  path_or_pointer
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'uri'
4
3
  require 'json'
5
4
  require_relative '../gdal'
6
5
  require_relative '../ogr'
@@ -41,14 +40,12 @@ module OGR
41
40
  def initialize(path_or_pointer, access_flag)
42
41
  @c_pointer =
43
42
  if path_or_pointer.is_a?(String)
44
- uri = URI.parse(path_or_pointer)
45
- file_path = uri.scheme.nil? ? ::File.expand_path(path_or_pointer) : path_or_pointer
46
- FFI::OGR::API.OGROpen(file_path, OGR._boolean_access_flag(access_flag), nil)
43
+ FFI::OGR::API.OGROpen(path_or_pointer, OGR._boolean_access_flag(access_flag), nil)
47
44
  else
48
45
  path_or_pointer
49
46
  end
50
47
 
51
- raise OGR::OpenFailure, file_path if @c_pointer.null?
48
+ raise OGR::OpenFailure, path_or_pointer if @c_pointer.null?
52
49
 
53
50
  @layers = []
54
51
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-gdal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta13
4
+ version: 1.0.0.beta14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Loveless
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-25 00:00:00.000000000 Z
11
+ date: 2022-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi