ffi-gdal 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f3fc9ffcfff9c381ae50a8db5dd1e478ab46500
4
- data.tar.gz: 8ec7abeee47f6f1078e3c5e28c3082655908c129
3
+ metadata.gz: 647e3eeffef3a444a35f32abcc8918172685030f
4
+ data.tar.gz: 0b30d6ff25a55d01d8859ea2f679a78ecf04cb5b
5
5
  SHA512:
6
- metadata.gz: e9298a86799585825fcf49845e2fc785ce7446f11a7c76b3bc43b151d909b12534f10fd3ae1272d7fea3e22f5416296e7f00f689bd1e6175908cd4b343e4e1ee
7
- data.tar.gz: 105d5bfd2ff92ca1a9e18eab465e9f2bd738904edfd0ec0ac7be6a0f4cd1efa24051fe35c50deba214c81295f4f9cea7013b369e6a9354a334b11bf753d93b55
6
+ metadata.gz: 6f59779cfb110c9e8eae87a8731df55a78437df2d2e495c138cffaa5054231c22ea69373afae68cc6bdb4814261fcd767da3b964300d4f6db152246351642405
7
+ data.tar.gz: 62d6225c376ced220a3270f0ca31f3c3b54a4761ed3df3cc5cde46e36c3295493ac7c0da9293975db2f0e5d78357599785e96beb1874670ba3bb08f6c0a40bef
data/History.md ADDED
@@ -0,0 +1,8 @@
1
+ ### 0.0.2 / 2014-09-26
2
+
3
+ * New things
4
+ * Added ability to pass a URL into `GDAL::Dataset`.
5
+
6
+ ### 0.0.1 / 2014-09-26
7
+
8
+ * Happy Birthday!
@@ -1,5 +1,5 @@
1
1
  module FFI
2
2
  module GDAL
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
  end
5
5
  end
@@ -1,3 +1,4 @@
1
+ require 'uri'
1
2
  require_relative '../ffi/gdal'
2
3
  require_relative '../ffi-gdal'
3
4
  require_relative 'driver'
@@ -21,10 +22,13 @@ module GDAL
21
22
  'w' => :GA_Update
22
23
  }
23
24
 
24
- # @param path [String] Path to the file that contains the dataset.
25
+ # @param path [String] Path to the file that contains the dataset. Can be
26
+ # a local file or a URL.
25
27
  # @param access_flag [String] 'r' or 'w'.
26
28
  def self.open(path, access_flag)
27
- file_path = ::File.expand_path(path)
29
+ uri = URI.parse(path)
30
+ file_path = u.scheme.nil? ? ::File.expand_path(path) : path
31
+
28
32
  pointer = FFI::GDAL.GDALOpen(file_path, ACCESS_FLAGS[access_flag])
29
33
  raise OpenFailure.new(file_path) if pointer.null?
30
34
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-gdal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Loveless
@@ -132,6 +132,7 @@ files:
132
132
  - ".gitignore"
133
133
  - ".rspec"
134
134
  - Gemfile
135
+ - History.md
135
136
  - LICENSE.txt
136
137
  - README.md
137
138
  - Rakefile