Skip to content

Commit

Permalink
Updates for version 0.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dazuma committed Jan 7, 2012
1 parent 4520046 commit c572d31
Show file tree
Hide file tree
Showing 13 changed files with 396 additions and 280 deletions.
6 changes: 6 additions & 0 deletions History.rdoc
@@ -1,3 +1,9 @@
=== 0.2.3 / 2012-01-09

* The dbf gem is now a hard dependency (now that it no longer pulls in ActiveSupport).
* Reader#initialize no longer tries to modify its parameters in place. (Reported by Brad Johnson.)
* Added an "rgeo-shapefile.rb" wrapper so bundler's auto-require will work without modification. (Reported by Mauricio Pasquier Juan.)

=== 0.2.2 / 2011-04-11

* A .gemspec file is now available for gem building and bundler git integration.
Expand Down
8 changes: 3 additions & 5 deletions README.rdoc
Expand Up @@ -38,10 +38,8 @@ Example:
RGeo::Shapefile has the following requirements:

* Ruby 1.8.7 or later. Ruby 1.9.2 or later preferred.
* \RGeo 0.2.8 or later.
* The "dbf" gem, version 1.5.2 or later, is recommended. This gem is
needed to read the attributes file. If it is not present, shapefiles
can still be read, but attributes will not be available.
* rgeo 0.3.3 or later.
* dbf 1.6 or later.

Install RGeo::Shapefile as a gem:

Expand Down Expand Up @@ -79,7 +77,7 @@ ESRI shapefiles, we did borrow a bunch of their test cases.

=== License

Copyright 2010-2011 Daniel Azuma
Copyright 2010-2012 Daniel Azuma

All rights reserved.

Expand Down
39 changes: 21 additions & 18 deletions Rakefile
@@ -1,15 +1,15 @@
# -----------------------------------------------------------------------------
#
# RGeo::Shapefile Rakefile
#
#
# Generic Gem Rakefile
#
# -----------------------------------------------------------------------------
# Copyright 2010 Daniel Azuma
#
# Copyright 2010-2012 Daniel Azuma
#
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
Expand All @@ -18,7 +18,7 @@
# * Neither the name of the copyright holder, nor the names of any other
# contributors to this software, may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Expand All @@ -34,9 +34,11 @@
;


RAKEFILE_CONFIG = {
:product_visible_name => 'RGeo::Shapefile',
}
# Load config if present

config_path_ = ::File.expand_path('rakefile_config.rb', ::File.dirname(__FILE__))
load(config_path_) if ::File.exists?(config_path_)
RAKEFILE_CONFIG = {} unless defined?(::RAKEFILE_CONFIG)


# Gemspec
Expand All @@ -45,12 +47,11 @@ require 'rubygems'
gemspec_ = eval(::File.read(::Dir.glob('*.gemspec').first))
release_gemspec_ = eval(::File.read(::Dir.glob('*.gemspec').first))
release_gemspec_.version = gemspec_.version.to_s.sub(/\.build\d+$/, '')
RAKEFILE_CONFIG = {} unless defined?(::RAKEFILE_CONFIG)


# Platform info

dlext_ = ::Config::CONFIG['DLEXT']
dlext_ = ::RbConfig::CONFIG['DLEXT']

platform_ =
case ::RUBY_DESCRIPTION
Expand Down Expand Up @@ -147,9 +148,9 @@ end
clean_files_ = [doc_directory_, pkg_directory_, tmp_directory_] +
::Dir.glob('ext/**/Makefile*') +
::Dir.glob('ext/**/*.{o,class,log,dSYM}') +
::Dir.glob("**/*.{#{dlext_},rbc,jar}") +
::Dir.glob("**/*.{bundle,so,dll,rbc,jar}") +
(::RAKEFILE_CONFIG[:extra_clean_files] || [])
task :clean do
task :clean do
clean_files_.each{ |path_| rm_rf path_ }
end

Expand Down Expand Up @@ -184,13 +185,15 @@ end

# Gem release tasks

task :build_gem do
task :build_other

task :build_gem => :build_other do
::Gem::Builder.new(gemspec_).build
mkdir_p(pkg_directory_)
mv "#{gemspec_.name}-#{gemspec_.version}.gem", "#{pkg_directory_}/"
end

task :build_release do
task :build_release => :build_other do
::Gem::Builder.new(release_gemspec_).build
mkdir_p(pkg_directory_)
mv "#{release_gemspec_.name}-#{release_gemspec_.version}.gem", "#{pkg_directory_}/"
Expand All @@ -205,7 +208,7 @@ end

# Unit test task

task :test => :build_ext do
task :test => [:build_ext, :build_other] do
$:.unshift(::File.expand_path('lib', ::File.dirname(__FILE__)))
if ::ENV['TESTCASE']
test_files_ = ::Dir.glob("test/#{::ENV['TESTCASE']}.rb")
Expand Down
2 changes: 1 addition & 1 deletion Version
@@ -1 +1 @@
0.2.2
0.2.3
36 changes: 36 additions & 0 deletions lib/rgeo-shapefile.rb
@@ -0,0 +1,36 @@
# -----------------------------------------------------------------------------
#
# Shapefile processing for RGeo
#
# -----------------------------------------------------------------------------
# Copyright 2010-2012 Daniel Azuma
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of the copyright holder, nor the names of any other
# contributors to this software, may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# -----------------------------------------------------------------------------
;

require 'rgeo/shapefile'
26 changes: 13 additions & 13 deletions lib/rgeo/shapefile.rb
@@ -1,15 +1,15 @@
# -----------------------------------------------------------------------------
#
#
# Shapefile processing for RGeo
#
#
# -----------------------------------------------------------------------------
# Copyright 2010 Daniel Azuma
#
# Copyright 2010-2012 Daniel Azuma
#
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
Expand All @@ -18,7 +18,7 @@
# * Neither the name of the copyright holder, nor the names of any other
# contributors to this software, may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Expand All @@ -39,22 +39,22 @@


# RGeo is a spatial data library for Ruby, provided by the "rgeo" gem.
#
#
# The optional RGeo::Shapefile module provides a set of tools for reading
# ESRI shapefiles.

module RGeo


# This module contains an implementation of ESRI Shapefiles.
# Use the Shapefile::Reader class to read a shapefile, extracting
# geometry and attribute data from it.
# RGeo does not yet have support for writing shapefiles.

module Shapefile
end


end


Expand Down

0 comments on commit c572d31

Please sign in to comment.