restivus-gis 0.0.3

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.
data/.DS_Store ADDED
Binary file
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/Gemfile ADDED
@@ -0,0 +1,20 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ # Add dependencies to develop your gem here.
7
+ # Include everything needed to run rake, tests, features, etc.
8
+ group :development do
9
+ gem "shoulda", ">= 0"
10
+ gem "bundler", "~> 1.0.0"
11
+ gem "jeweler", "~> 1.6.4"
12
+ gem "rcov", ">= 0"
13
+ end
14
+
15
+ gem "sinatra", :require => "sinatra/base"
16
+ gem "sinatra-respond_to"
17
+ gem "json"
18
+ gem "active_support"
19
+ gem "fastercsv"
20
+ gem "rest-client"
data/Gemfile.lock ADDED
@@ -0,0 +1,48 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ active_support (3.0.0)
5
+ activesupport (= 3.0.0)
6
+ activesupport (3.0.0)
7
+ fastercsv (1.5.4)
8
+ git (1.2.5)
9
+ jeweler (1.6.4)
10
+ bundler (~> 1.0)
11
+ git (>= 1.2.5)
12
+ rake
13
+ json (1.6.5)
14
+ mime-types (1.17.2)
15
+ rack (1.4.1)
16
+ rack-protection (1.2.0)
17
+ rack
18
+ rake (0.9.2.2)
19
+ rcov (0.9.11)
20
+ rest-client (1.6.7)
21
+ mime-types (>= 1.16)
22
+ shoulda (3.0.0)
23
+ shoulda-context (~> 1.0.0)
24
+ shoulda-matchers (~> 1.0.0)
25
+ shoulda-context (1.0.0)
26
+ shoulda-matchers (1.0.0)
27
+ sinatra (1.3.2)
28
+ rack (~> 1.3, >= 1.3.6)
29
+ rack-protection (~> 1.2)
30
+ tilt (~> 1.3, >= 1.3.3)
31
+ sinatra-respond_to (0.8.0)
32
+ sinatra (~> 1.3)
33
+ tilt (1.3.3)
34
+
35
+ PLATFORMS
36
+ ruby
37
+
38
+ DEPENDENCIES
39
+ active_support
40
+ bundler (~> 1.0.0)
41
+ fastercsv
42
+ jeweler (~> 1.6.4)
43
+ json
44
+ rcov
45
+ rest-client
46
+ shoulda
47
+ sinatra
48
+ sinatra-respond_to
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012 Alan deLevie
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # Restivus
2
+
3
+ REST APIs for the rest of us.
4
+
5
+ ## Description
6
+
7
+ Restivus makes it easy to expose a CSV file as a fully-documented REST API.
8
+
9
+ The restivus-gis fork's purpose is to add GIS File Formats such as SHP and KML.
10
+
11
+ This is a very early release, the code is not stable, tested, or reliable...yet. Use at your own risk, yada yada yada (see LICENSE.txt for the real terms).
12
+
13
+ ## Installation
14
+
15
+ `gem install restivus-gis`
16
+
17
+ ## Usage
18
+
19
+ The `Restivus` class inherits from `Sinatra::Base`. A Restivus app can be just a few lines of code:
20
+
21
+ ```ruby
22
+ require 'restivus-gis'
23
+
24
+ class Bank < RestivusGis
25
+ pk "Bank_Name" # defaults to "id"
26
+ csv "banklist.csv" # from http://www.fdic.gov/bank/individual/failed/banklist.csv
27
+ end
28
+
29
+ Bank.run! # visit localhost:4567/docs
30
+ ```
31
+
32
+
33
+ Copyright (c) 2012 Christian Frugard. See LICENSE.txt for
34
+ further details.
35
+
36
+ Based on the excellent work by Alan deLevie in the original Restivus Gem.
37
+
38
+ Copyright (c) 2012 Alan deLevie. See LICENSE.txt for
39
+ further details.
40
+
data/Rakefile ADDED
@@ -0,0 +1,53 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "restivus-gis"
18
+ gem.homepage = "http://github.com/frugardc/restivus-gis"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{REST APIs for the rest of us.}
21
+ gem.description = %Q{Restivus eats CSV,SHP,KML files and spits out fully-documented RESTful endpoints.}
22
+ gem.email = "frugardc@gmail.com"
23
+ gem.authors = ["Alan deLevie","Christian Frugard"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+ require 'rake/testtask'
29
+ Rake::TestTask.new(:test) do |test|
30
+ test.libs << 'lib' << 'test'
31
+ test.pattern = 'test/**/test_*.rb'
32
+ test.verbose = true
33
+ end
34
+
35
+ require 'rcov/rcovtask'
36
+ Rcov::RcovTask.new do |test|
37
+ test.libs << 'test'
38
+ test.pattern = 'test/**/test_*.rb'
39
+ test.verbose = true
40
+ test.rcov_opts << '--exclude "gems/*"'
41
+ end
42
+
43
+ task :default => :test
44
+
45
+ require 'rake/rdoctask'
46
+ Rake::RDocTask.new do |rdoc|
47
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
48
+
49
+ rdoc.rdoc_dir = 'rdoc'
50
+ rdoc.title = "restivus #{version}"
51
+ rdoc.rdoc_files.include('README*')
52
+ rdoc.rdoc_files.include('lib/**/*.rb')
53
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.3
@@ -0,0 +1,3 @@
1
+ source :rubygems
2
+
3
+ gem "restivus", "~> 0.0.3"
@@ -0,0 +1,34 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ active_support (3.0.0)
5
+ activesupport (= 3.0.0)
6
+ activesupport (3.0.0)
7
+ fastercsv (1.5.4)
8
+ json (1.6.5)
9
+ mime-types (1.17.2)
10
+ rack (1.4.1)
11
+ rack-protection (1.2.0)
12
+ rack
13
+ rest-client (1.6.7)
14
+ mime-types (>= 1.16)
15
+ restivus (0.0.3)
16
+ active_support
17
+ fastercsv
18
+ json
19
+ rest-client
20
+ sinatra
21
+ sinatra-respond_to
22
+ sinatra (1.3.2)
23
+ rack (~> 1.3, >= 1.3.6)
24
+ rack-protection (~> 1.2)
25
+ tilt (~> 1.3, >= 1.3.3)
26
+ sinatra-respond_to (0.8.0)
27
+ sinatra (~> 1.3)
28
+ tilt (1.3.3)
29
+
30
+ PLATFORMS
31
+ ruby
32
+
33
+ DEPENDENCIES
34
+ restivus (~> 0.0.3)