Skip to content

Commit 56844fd

Browse files
committed
rails-api initial commit
1 parent a023cf2 commit 56844fd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2065
-0
lines changed

.project

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>SAPI</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>com.aptana.ide.core.unifiedBuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.radrails.rails.core.railsnature</nature>
16+
<nature>com.aptana.ruby.core.rubynature</nature>
17+
</natures>
18+
</projectDescription>

Capfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Generated with 'brightbox' on 2012-05-08 09:53:55 +0100
2+
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
3+
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
4+
load 'config/deploy'

Gemfile

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
require 'rbconfig'
2+
HOST_OS = RbConfig::CONFIG['host_os']
3+
4+
source 'https://rubygems.org'
5+
6+
gem 'rails', '3.2.3'
7+
8+
# Bundle edge Rails instead:
9+
# gem 'rails', :git => 'git://github.com/rails/rails.git'
10+
11+
gem 'rails-api'
12+
13+
gem 'pg'
14+
gem 'foreigner'
15+
gem 'immigrant'
16+
gem 'awesome_nested_set'
17+
18+
19+
# To use ActiveModel has_secure_password
20+
# gem 'bcrypt-ruby', '~> 3.0.0'
21+
22+
# To use Jbuilder templates for JSON
23+
# gem 'jbuilder'
24+
25+
# Use unicorn as the app server
26+
# gem 'unicorn'
27+
28+
# Deploy with Capistrano
29+
gem 'capistrano', :group => :development
30+
31+
# To use debugger
32+
# gem 'ruby-debug19', :require => 'ruby-debug'
33+
34+
guard_notifications = true
35+
group :development do
36+
case HOST_OS
37+
when /darwin/i
38+
gem 'rb-fsevent'
39+
gem 'ruby_gntp' if guard_notifications
40+
when /linux/i
41+
gem 'libnotify'
42+
gem 'rb-inotify'
43+
when /mswin|windows/i
44+
gem 'rb-fchange'
45+
gem 'win32console'
46+
gem 'rb-notifu' if guard_notifications
47+
end
48+
end
49+
50+
group :development do
51+
gem "guard-livereload"
52+
gem "yajl-ruby"
53+
gem "rack-livereload"
54+
gem "guard-bundler"
55+
gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git'
56+
gem 'ruby-debug19'
57+
end
58+
59+
gem "sqlite3", :group => [:test]
60+
61+
group :test, :development do
62+
gem "rspec-rails"
63+
gem "factory_girl"
64+
end

Gemfile.lock

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
GIT
2+
remote: git://github.com/ctran/annotate_models.git
3+
revision: 18cd39ad01829deba5aa34634b8540d6675ab978
4+
specs:
5+
annotate (2.4.1.beta1)
6+
7+
GEM
8+
remote: https://rubygems.org/
9+
specs:
10+
actionmailer (3.2.3)
11+
actionpack (= 3.2.3)
12+
mail (~> 2.4.4)
13+
actionpack (3.2.3)
14+
activemodel (= 3.2.3)
15+
activesupport (= 3.2.3)
16+
builder (~> 3.0.0)
17+
erubis (~> 2.7.0)
18+
journey (~> 1.0.1)
19+
rack (~> 1.4.0)
20+
rack-cache (~> 1.2)
21+
rack-test (~> 0.6.1)
22+
sprockets (~> 2.1.2)
23+
activemodel (3.2.3)
24+
activesupport (= 3.2.3)
25+
builder (~> 3.0.0)
26+
activerecord (3.2.3)
27+
activemodel (= 3.2.3)
28+
activesupport (= 3.2.3)
29+
arel (~> 3.0.2)
30+
tzinfo (~> 0.3.29)
31+
activeresource (3.2.3)
32+
activemodel (= 3.2.3)
33+
activesupport (= 3.2.3)
34+
activesupport (3.2.3)
35+
i18n (~> 0.6)
36+
multi_json (~> 1.0)
37+
addressable (2.2.8)
38+
archive-tar-minitar (0.5.2)
39+
arel (3.0.2)
40+
awesome_nested_set (2.1.3)
41+
activerecord (>= 3.0.0)
42+
builder (3.0.0)
43+
capistrano (2.12.0)
44+
highline
45+
net-scp (>= 1.0.0)
46+
net-sftp (>= 2.0.0)
47+
net-ssh (>= 2.0.14)
48+
net-ssh-gateway (>= 1.1.0)
49+
columnize (0.3.6)
50+
diff-lcs (1.1.3)
51+
em-websocket (0.3.6)
52+
addressable (>= 2.1.1)
53+
eventmachine (>= 0.12.9)
54+
erubis (2.7.0)
55+
eventmachine (0.12.10)
56+
factory_girl (3.2.0)
57+
activesupport (>= 3.0.0)
58+
ffi (1.0.11)
59+
foreigner (1.1.6)
60+
activerecord (>= 3.0.0)
61+
guard (1.0.2)
62+
ffi (>= 0.5.0)
63+
thor (~> 0.14.6)
64+
guard-bundler (0.1.3)
65+
bundler (>= 1.0.0)
66+
guard (>= 0.2.2)
67+
guard-livereload (0.4.2)
68+
em-websocket (>= 0.2.0)
69+
guard (>= 0.10.0)
70+
multi_json (~> 1.0)
71+
highline (1.6.12)
72+
hike (1.2.1)
73+
i18n (0.6.0)
74+
immigrant (0.1.1)
75+
activerecord (>= 3.0)
76+
foreigner (>= 1.1.3)
77+
journey (1.0.3)
78+
json (1.7.1)
79+
libnotify (0.7.2)
80+
linecache19 (0.5.12)
81+
ruby_core_source (>= 0.1.4)
82+
mail (2.4.4)
83+
i18n (>= 0.4.0)
84+
mime-types (~> 1.16)
85+
treetop (~> 1.4.8)
86+
mime-types (1.18)
87+
multi_json (1.3.4)
88+
net-scp (1.0.4)
89+
net-ssh (>= 1.99.1)
90+
net-sftp (2.0.5)
91+
net-ssh (>= 2.0.9)
92+
net-ssh (2.3.0)
93+
net-ssh-gateway (1.1.0)
94+
net-ssh (>= 1.99.1)
95+
pg (0.13.2)
96+
polyglot (0.3.3)
97+
rack (1.4.1)
98+
rack-cache (1.2)
99+
rack (>= 0.4)
100+
rack-livereload (0.3.6)
101+
rack
102+
rack-ssl (1.3.2)
103+
rack
104+
rack-test (0.6.1)
105+
rack (>= 1.0)
106+
rails (3.2.3)
107+
actionmailer (= 3.2.3)
108+
actionpack (= 3.2.3)
109+
activerecord (= 3.2.3)
110+
activeresource (= 3.2.3)
111+
activesupport (= 3.2.3)
112+
bundler (~> 1.0)
113+
railties (= 3.2.3)
114+
rails-api (0.0.1)
115+
actionpack (>= 3.2.0)
116+
railties (>= 3.2.0)
117+
tzinfo (~> 0.3.31)
118+
railties (3.2.3)
119+
actionpack (= 3.2.3)
120+
activesupport (= 3.2.3)
121+
rack-ssl (~> 1.3.2)
122+
rake (>= 0.8.7)
123+
rdoc (~> 3.4)
124+
thor (~> 0.14.6)
125+
rake (0.9.2.2)
126+
rb-inotify (0.8.8)
127+
ffi (>= 0.5.0)
128+
rdoc (3.12)
129+
json (~> 1.4)
130+
rspec (2.10.0)
131+
rspec-core (~> 2.10.0)
132+
rspec-expectations (~> 2.10.0)
133+
rspec-mocks (~> 2.10.0)
134+
rspec-core (2.10.0)
135+
rspec-expectations (2.10.0)
136+
diff-lcs (~> 1.1.3)
137+
rspec-mocks (2.10.1)
138+
rspec-rails (2.10.1)
139+
actionpack (>= 3.0)
140+
activesupport (>= 3.0)
141+
railties (>= 3.0)
142+
rspec (~> 2.10.0)
143+
ruby-debug-base19 (0.11.25)
144+
columnize (>= 0.3.1)
145+
linecache19 (>= 0.5.11)
146+
ruby_core_source (>= 0.1.4)
147+
ruby-debug19 (0.11.6)
148+
columnize (>= 0.3.1)
149+
linecache19 (>= 0.5.11)
150+
ruby-debug-base19 (>= 0.11.19)
151+
ruby_core_source (0.1.5)
152+
archive-tar-minitar (>= 0.5.2)
153+
sprockets (2.1.3)
154+
hike (~> 1.2)
155+
rack (~> 1.0)
156+
tilt (~> 1.1, != 1.3.0)
157+
sqlite3 (1.3.6)
158+
thor (0.14.6)
159+
tilt (1.3.3)
160+
treetop (1.4.10)
161+
polyglot
162+
polyglot (>= 0.3.1)
163+
tzinfo (0.3.33)
164+
yajl-ruby (1.1.0)
165+
166+
PLATFORMS
167+
ruby
168+
169+
DEPENDENCIES
170+
annotate!
171+
awesome_nested_set
172+
capistrano
173+
factory_girl
174+
foreigner
175+
guard-bundler
176+
guard-livereload
177+
immigrant
178+
libnotify
179+
pg
180+
rack-livereload
181+
rails (= 3.2.3)
182+
rails-api
183+
rb-inotify
184+
rspec-rails
185+
ruby-debug19
186+
sqlite3
187+
yajl-ruby

Guardfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# A sample Guardfile
2+
# More info at https://github.com/guard/guard#readme
3+
4+
guard 'bundler' do
5+
watch('Gemfile')
6+
# Uncomment next line if Gemfile contain `gemspec' command
7+
# watch(/^.+\.gemspec/)
8+
end
9+
10+
guard 'livereload' do
11+
watch(%r{app/views/.+\.(erb|haml|slim)})
12+
watch(%r{app/helpers/.+\.rb})
13+
watch(%r{public/.+\.(css|js|html)})
14+
watch(%r{config/locales/.+\.yml})
15+
# Rails Assets Pipeline
16+
watch(%r{(app|vendor)/assets/\w+/(.+\.(css|js|html)).*}) { |m| "/assets/#{m[2]}" }
17+
end

README.rdoc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
== CITES Checklist
2+
3+
Try to apply these coding guidelines:
4+
5+
http://pub.cozmixng.org/~the-rwiki/rw-cgi.rb?cmd=view;name=RubyCodingConvention
6+
7+
== Importing data for development
8+
FILE=lib/assets/files/20_animal_species.csv rake import:species
9+
10+
== Taxonomic glossaries
11+
http://ibot.sav.sk/icbn/no%20frames/0120AppendixVII.htm
12+
http://bionomenclature-glossary.gbif.org/
13+
14+
== Project glossary
15+
16+
- taxon concept - represents a unique combination of a name and a reference
17+
- usage - represents an association of a taxon concept with a name (not necessarily the defining name). can be used to apply multiple name systems to a taxon concept
18+
19+
An older standard for plants naming conventions (is there an up to date version of that?): http://www.nhm.ac.uk/hosted_sites/tdwg/plants.html
20+
21+
===Taxon concept relationships:
22+
23+
inter-designational:
24+
- equal =
25+
- includes <
26+
- included in >
27+
- overlaps ><
28+
- disjunct |
29+
30+
intra-designational:
31+
- synonym
32+
- homonym

Rakefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env rake
2+
# Add your own tasks in files placed in lib/tasks ending in .rake,
3+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4+
5+
require File.expand_path('../config/application', __FILE__)
6+
7+
SAPI::Application.load_tasks
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class ApplicationController < ActionController::API
2+
end
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class ChecklistsController < ApplicationController
2+
def index
3+
@animalia = TaxonConcept.find_by_taxon_name_id(
4+
TaxonName.find_by_scientific_name('Animalia').id
5+
)
6+
@plantae = TaxonConcept.find_by_taxon_name_id(
7+
TaxonName.find_by_scientific_name('Plantae').id
8+
)
9+
render :json => {:animalia => @animalia, :plantae => @plantae}
10+
end
11+
end

app/mailers/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)