diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..045bc6cb5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,28 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+#
+# If you find yourself ignoring temporary files generated by your text editor
+# or operating system, you probably want to add a global ignore instead:
+# git config --global core.excludesfile ~/.gitignore_global
+
+# Ignore bundler config
+/.bundle
+
+# Ignore the default SQLite database.
+/db/*.sqlite3
+
+# Ignore all logfiles and tempfiles.
+/log/*
+/tmp/*
+
+# Ignore application configuration
+/config/application.yml
+/config/config.yml
+/config/database.yml
+
+# Redis DB
+dump.rdb
+
+# Ignore test-related files
+/coverage.data
+/coverage/
+.rspec
\ No newline at end of file
diff --git a/.ruby-gemset b/.ruby-gemset
new file mode 100644
index 000000000..07c772444
--- /dev/null
+++ b/.ruby-gemset
@@ -0,0 +1 @@
+ohana-api
diff --git a/.ruby-version b/.ruby-version
new file mode 100644
index 000000000..227cea215
--- /dev/null
+++ b/.ruby-version
@@ -0,0 +1 @@
+2.0.0
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 000000000..c9b4d9e5a
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,47 @@
+source 'https://rubygems.org'
+
+ruby '2.0.0'
+gem 'rails', '3.2.13'
+
+group :assets do
+ gem 'sass-rails', '~> 3.2.3'
+ gem 'coffee-rails', '~> 3.2.1'
+ gem 'uglifier', '>= 1.0.3'
+end
+
+# Front end
+gem 'jquery-rails'
+gem "haml-rails", ">= 0.4"
+
+# Server for deployment
+gem "unicorn", ">= 4.3.1"
+
+# Test coverage
+gem 'coveralls', require: false
+
+# MongoDB ORM
+gem "mongoid", ">= 3.1.2"
+
+group :test, :development do
+ # Testing with Rspec
+ gem "rspec-rails", ">= 2.12.2"
+ gem "factory_girl_rails", ">= 4.2.0"
+end
+
+group :test do
+ # Testing with Rspec and Mongoid
+ gem "database_cleaner", ">= 1.0.0.RC1"
+ gem "mongoid-rspec", ">= 1.7.0"
+end
+
+group :development do
+ # Lets you convert HTML to HAML, including ERB
+ gem "html2haml", ">= 1.0.1"
+
+ # Debugging
+ gem "bullet"
+ gem "quiet_assets", ">= 1.0.2"
+ gem "better_errors", ">= 0.7.2"
+ gem "binding_of_caller", ">= 0.7.1", :platforms => [:mri_19, :rbx]
+end
+
diff --git a/Gemfile.lock b/Gemfile.lock
new file mode 100644
index 000000000..dca64aa7a
--- /dev/null
+++ b/Gemfile.lock
@@ -0,0 +1,202 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ actionmailer (3.2.13)
+ actionpack (= 3.2.13)
+ mail (~> 2.5.3)
+ actionpack (3.2.13)
+ activemodel (= 3.2.13)
+ activesupport (= 3.2.13)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.4)
+ rack (~> 1.4.5)
+ rack-cache (~> 1.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.2.1)
+ activemodel (3.2.13)
+ activesupport (= 3.2.13)
+ builder (~> 3.0.0)
+ activerecord (3.2.13)
+ activemodel (= 3.2.13)
+ activesupport (= 3.2.13)
+ arel (~> 3.0.2)
+ tzinfo (~> 0.3.29)
+ activeresource (3.2.13)
+ activemodel (= 3.2.13)
+ activesupport (= 3.2.13)
+ activesupport (3.2.13)
+ i18n (= 0.6.1)
+ multi_json (~> 1.0)
+ arel (3.0.2)
+ better_errors (0.9.0)
+ coderay (>= 1.0.0)
+ erubis (>= 2.6.6)
+ binding_of_caller (0.7.1)
+ debug_inspector (>= 0.0.1)
+ builder (3.0.4)
+ bullet (4.6.0)
+ uniform_notifier
+ coderay (1.0.9)
+ coffee-rails (3.2.2)
+ coffee-script (>= 2.2.0)
+ railties (~> 3.2.0)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.6.2)
+ colorize (0.5.8)
+ coveralls (0.6.7)
+ colorize
+ multi_json (~> 1.3)
+ rest-client
+ simplecov (>= 0.7)
+ thor
+ database_cleaner (1.0.1)
+ debug_inspector (0.0.2)
+ diff-lcs (1.2.4)
+ erubis (2.7.0)
+ execjs (1.4.0)
+ multi_json (~> 1.0)
+ factory_girl (4.2.0)
+ activesupport (>= 3.0.0)
+ factory_girl_rails (4.2.1)
+ factory_girl (~> 4.2.0)
+ railties (>= 3.0.0)
+ haml (4.0.3)
+ tilt
+ haml-rails (0.4)
+ actionpack (>= 3.1, < 4.1)
+ activesupport (>= 3.1, < 4.1)
+ haml (>= 3.1, < 4.1)
+ railties (>= 3.1, < 4.1)
+ hike (1.2.2)
+ hpricot (0.8.6)
+ html2haml (1.0.1)
+ erubis (~> 2.7.0)
+ haml (>= 4.0.0.rc.1)
+ hpricot (~> 0.8.6)
+ ruby_parser (~> 3.1.1)
+ i18n (0.6.1)
+ journey (1.0.4)
+ jquery-rails (2.2.1)
+ railties (>= 3.0, < 5.0)
+ thor (>= 0.14, < 2.0)
+ json (1.8.0)
+ kgio (2.8.0)
+ mail (2.5.4)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.23)
+ mongoid (3.1.4)
+ activemodel (~> 3.2)
+ moped (~> 1.4)
+ origin (~> 1.0)
+ tzinfo (~> 0.3.22)
+ mongoid-rspec (1.8.2)
+ mongoid (>= 3.0.1)
+ rake
+ rspec (>= 2.9)
+ moped (1.5.0)
+ multi_json (1.7.4)
+ origin (1.1.0)
+ polyglot (0.3.3)
+ quiet_assets (1.0.2)
+ railties (>= 3.1, < 5.0)
+ rack (1.4.5)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-ssl (1.3.3)
+ rack
+ rack-test (0.6.2)
+ rack (>= 1.0)
+ rails (3.2.13)
+ actionmailer (= 3.2.13)
+ actionpack (= 3.2.13)
+ activerecord (= 3.2.13)
+ activeresource (= 3.2.13)
+ activesupport (= 3.2.13)
+ bundler (~> 1.0)
+ railties (= 3.2.13)
+ railties (3.2.13)
+ actionpack (= 3.2.13)
+ activesupport (= 3.2.13)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (>= 0.14.6, < 2.0)
+ raindrops (0.11.0)
+ rake (10.0.4)
+ rdoc (3.12.2)
+ json (~> 1.4)
+ rest-client (1.6.7)
+ mime-types (>= 1.16)
+ rspec (2.13.0)
+ rspec-core (~> 2.13.0)
+ rspec-expectations (~> 2.13.0)
+ rspec-mocks (~> 2.13.0)
+ rspec-core (2.13.1)
+ rspec-expectations (2.13.0)
+ diff-lcs (>= 1.1.3, < 2.0)
+ rspec-mocks (2.13.1)
+ rspec-rails (2.13.2)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec-core (~> 2.13.0)
+ rspec-expectations (~> 2.13.0)
+ rspec-mocks (~> 2.13.0)
+ ruby_parser (3.1.3)
+ sexp_processor (~> 4.1)
+ sass (3.2.9)
+ sass-rails (3.2.6)
+ railties (~> 3.2.0)
+ sass (>= 3.1.10)
+ tilt (~> 1.3)
+ sexp_processor (4.2.1)
+ simplecov (0.7.1)
+ multi_json (~> 1.0)
+ simplecov-html (~> 0.7.1)
+ simplecov-html (0.7.1)
+ sprockets (2.2.2)
+ hike (~> 1.2)
+ multi_json (~> 1.0)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ thor (0.18.1)
+ tilt (1.4.1)
+ treetop (1.4.12)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.37)
+ uglifier (2.1.1)
+ execjs (>= 0.3.0)
+ multi_json (~> 1.0, >= 1.0.2)
+ unicorn (4.6.2)
+ kgio (~> 2.6)
+ rack
+ raindrops (~> 0.7)
+ uniform_notifier (1.2.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ better_errors (>= 0.7.2)
+ binding_of_caller (>= 0.7.1)
+ bullet
+ coffee-rails (~> 3.2.1)
+ coveralls
+ database_cleaner (>= 1.0.0.RC1)
+ factory_girl_rails (>= 4.2.0)
+ haml-rails (>= 0.4)
+ html2haml (>= 1.0.1)
+ jquery-rails
+ mongoid (>= 3.1.2)
+ mongoid-rspec (>= 1.7.0)
+ quiet_assets (>= 1.0.2)
+ rails (= 3.2.13)
+ rspec-rails (>= 2.12.2)
+ sass-rails (~> 3.2.3)
+ uglifier (>= 1.0.3)
+ unicorn (>= 4.3.1)
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 000000000..9925ec4ed
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,7 @@
+#!/usr/bin/env rake
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+OhanaApi::Application.load_tasks
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
new file mode 100644
index 000000000..9097d830e
--- /dev/null
+++ b/app/assets/javascripts/application.js
@@ -0,0 +1,15 @@
+// This is a manifest file that'll be compiled into application.js, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
+// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
+// GO AFTER THE REQUIRES BELOW.
+//
+//= require jquery
+//= require jquery_ujs
+//= require_tree .
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
new file mode 100644
index 000000000..3192ec897
--- /dev/null
+++ b/app/assets/stylesheets/application.css
@@ -0,0 +1,13 @@
+/*
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
+ * listed below.
+ *
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
+ *
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
+ * compiled file, but it's generally better to create a new file per style scope.
+ *
+ *= require_self
+ *= require_tree .
+ */
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
new file mode 100644
index 000000000..e8065d950
--- /dev/null
+++ b/app/controllers/application_controller.rb
@@ -0,0 +1,3 @@
+class ApplicationController < ActionController::Base
+ protect_from_forgery
+end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
new file mode 100644
index 000000000..de6be7945
--- /dev/null
+++ b/app/helpers/application_helper.rb
@@ -0,0 +1,2 @@
+module ApplicationHelper
+end
diff --git a/app/mailers/.gitkeep b/app/mailers/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/app/models/.gitkeep b/app/models/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
new file mode 100644
index 000000000..c4d1b6600
--- /dev/null
+++ b/app/views/layouts/application.html.erb
@@ -0,0 +1,14 @@
+
+
+
+ OhanaApi
+ <%= stylesheet_link_tag "application", :media => "all" %>
+ <%= javascript_include_tag "application" %>
+ <%= csrf_meta_tags %>
+
+
+
+<%= yield %>
+
+
+
diff --git a/config.ru b/config.ru
new file mode 100644
index 000000000..6d81bd54d
--- /dev/null
+++ b/config.ru
@@ -0,0 +1,4 @@
+# This file is used by Rack-based servers to start the application.
+
+require ::File.expand_path('../config/environment', __FILE__)
+run OhanaApi::Application
diff --git a/config/application.rb b/config/application.rb
new file mode 100644
index 000000000..da1393ef4
--- /dev/null
+++ b/config/application.rb
@@ -0,0 +1,82 @@
+require File.expand_path('../boot', __FILE__)
+
+# Pick the frameworks you want:
+# require "active_record/railtie"
+require "action_controller/railtie"
+require "action_mailer/railtie"
+require "active_resource/railtie"
+require "sprockets/railtie"
+# # require "rails/test_unit/railtie"
+
+if defined?(Bundler)
+ # If you precompile assets before deploying to production, use this line
+ Bundler.require(*Rails.groups(:assets => %w(development test)))
+ # If you want your assets lazily compiled in production, use this line
+ # Bundler.require(:default, :assets, Rails.env)
+end
+
+module OhanaApi
+ class Application < Rails::Application
+
+ # don't generate RSpec tests for views and helpers
+ config.generators do |g|
+
+ g.test_framework :rspec, fixture: true
+ g.fixture_replacement :factory_girl, dir: 'spec/factories'
+
+
+ g.view_specs false
+ g.helper_specs false
+ end
+
+ # Settings in config/environments/* take precedence over those specified here.
+ # Application configuration should go into files in config/initializers
+ # -- all .rb files in that directory are automatically loaded.
+
+ # Custom directories with classes and modules you want to be autoloadable.
+ # config.autoload_paths += %W(#{config.root}/extras)
+ config.autoload_paths += %W(#{config.root}/lib)
+
+
+ # Only load the plugins named here, in the order given (default is alphabetical).
+ # :all can be used as a placeholder for all plugins not explicitly named.
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
+
+ # Activate observers that should always be running.
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
+
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
+ # config.time_zone = 'Central Time (US & Canada)'
+
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
+ # config.i18n.default_locale = :de
+
+ # Configure the default encoding used in templates for Ruby 1.9.
+ config.encoding = "utf-8"
+
+ # Configure sensitive parameters which will be filtered from the log file.
+ config.filter_parameters += [:password]
+
+ # Enable escaping HTML in JSON.
+ config.active_support.escape_html_entities_in_json = true
+
+ # Use SQL instead of Active Record's schema dumper when creating the database.
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
+ # like if you have constraints or database-specific column types
+ # config.active_record.schema_format = :sql
+
+ # Enforce whitelist mode for mass assignment.
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
+ # parameters by using an attr_accessible or attr_protected declaration.
+ # config.active_record.whitelist_attributes = true
+
+ # Enable the asset pipeline
+ config.assets.enabled = true
+
+ # Version of your assets, change this if you want to expire all your assets
+ config.assets.version = '1.0'
+ end
+end
diff --git a/config/boot.rb b/config/boot.rb
new file mode 100644
index 000000000..4489e5868
--- /dev/null
+++ b/config/boot.rb
@@ -0,0 +1,6 @@
+require 'rubygems'
+
+# Set up gems listed in the Gemfile.
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
diff --git a/config/environment.rb b/config/environment.rb
new file mode 100644
index 000000000..4364e467f
--- /dev/null
+++ b/config/environment.rb
@@ -0,0 +1,5 @@
+# Load the rails application
+require File.expand_path('../application', __FILE__)
+
+# Initialize the rails application
+OhanaApi::Application.initialize!
diff --git a/config/environments/development.rb b/config/environments/development.rb
new file mode 100644
index 000000000..3fef346ed
--- /dev/null
+++ b/config/environments/development.rb
@@ -0,0 +1,31 @@
+OhanaApi::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # In the development environment your application's code is reloaded on
+ # every request. This slows down response time but is perfect for development
+ # since you don't have to restart the web server when you make code changes.
+ config.cache_classes = false
+
+ # Log error messages when you accidentally call methods on nil.
+ config.whiny_nils = true
+
+ # Show full error reports and disable caching
+ config.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
+
+ # Don't care if the mailer can't send
+ config.action_mailer.raise_delivery_errors = false
+
+ # Print deprecation notices to the Rails logger
+ config.active_support.deprecation = :log
+
+ # Only use best-standards-support built into browsers
+ config.action_dispatch.best_standards_support = :builtin
+
+
+ # Do not compress assets
+ config.assets.compress = false
+
+ # Expands the lines which load the assets
+ config.assets.debug = true
+end
diff --git a/config/environments/production.rb b/config/environments/production.rb
new file mode 100644
index 000000000..4a1a15f64
--- /dev/null
+++ b/config/environments/production.rb
@@ -0,0 +1,64 @@
+OhanaApi::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # Code is not reloaded between requests
+ config.cache_classes = true
+
+ # Full error reports are disabled and caching is turned on
+ config.consider_all_requests_local = false
+ config.action_controller.perform_caching = true
+
+ # Disable Rails's static asset server (Apache or nginx will already do this)
+ config.serve_static_assets = false
+
+ # Compress JavaScripts and CSS
+ config.assets.compress = true
+
+ # Don't fallback to assets pipeline if a precompiled asset is missed
+ config.assets.compile = false
+
+ # Generate digests for assets URLs
+ config.assets.digest = true
+
+ # Defaults to nil and saved in location specified by config.assets.prefix
+ # config.assets.manifest = YOUR_PATH
+
+ # Specifies the header that your server uses for sending files
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
+
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
+ # config.force_ssl = true
+
+ # See everything in the log (default is :info)
+ # config.log_level = :debug
+
+ # Prepend all log lines with the following tags
+ # config.log_tags = [ :subdomain, :uuid ]
+
+ # Use a different logger for distributed setups
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
+
+ # Use a different cache store in production
+ # config.cache_store = :mem_cache_store
+
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
+ # config.action_controller.asset_host = "http://assets.example.com"
+
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
+ # config.assets.precompile += %w( search.js )
+
+ # Disable delivery errors, bad email addresses will be ignored
+ # config.action_mailer.raise_delivery_errors = false
+
+ # Enable threaded mode
+ # config.threadsafe!
+
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
+ # the I18n.default_locale when a translation can not be found)
+ config.i18n.fallbacks = true
+
+ # Send deprecation notices to registered listeners
+ config.active_support.deprecation = :notify
+
+end
diff --git a/config/environments/test.rb b/config/environments/test.rb
new file mode 100644
index 000000000..e3cf4bda9
--- /dev/null
+++ b/config/environments/test.rb
@@ -0,0 +1,35 @@
+OhanaApi::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # The test environment is used exclusively to run your application's
+ # test suite. You never need to work with it otherwise. Remember that
+ # your test database is "scratch space" for the test suite and is wiped
+ # and recreated between test runs. Don't rely on the data there!
+ config.cache_classes = true
+
+ # Configure static asset server for tests with Cache-Control for performance
+ config.serve_static_assets = true
+ config.static_cache_control = "public, max-age=3600"
+
+ # Log error messages when you accidentally call methods on nil
+ config.whiny_nils = true
+
+ # Show full error reports and disable caching
+ config.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
+
+ # Raise exceptions instead of rendering exception templates
+ config.action_dispatch.show_exceptions = false
+
+ # Disable request forgery protection in test environment
+ config.action_controller.allow_forgery_protection = false
+
+ # Tell Action Mailer not to deliver emails to the real world.
+ # The :test delivery method accumulates sent emails in the
+ # ActionMailer::Base.deliveries array.
+ config.action_mailer.delivery_method = :test
+
+
+ # Print deprecation notices to the stderr
+ config.active_support.deprecation = :stderr
+end
diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb
new file mode 100644
index 000000000..59385cdf3
--- /dev/null
+++ b/config/initializers/backtrace_silencers.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
+# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
+
+# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
+# Rails.backtrace_cleaner.remove_silencers!
diff --git a/config/initializers/generators.rb b/config/initializers/generators.rb
new file mode 100644
index 000000000..4b3d83ac0
--- /dev/null
+++ b/config/initializers/generators.rb
@@ -0,0 +1,2 @@
+Rails.application.config.generators do |g|
+end
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb
new file mode 100644
index 000000000..5d8d9be23
--- /dev/null
+++ b/config/initializers/inflections.rb
@@ -0,0 +1,15 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new inflection rules using the following format
+# (all these examples are active by default):
+# ActiveSupport::Inflector.inflections do |inflect|
+# inflect.plural /^(ox)$/i, '\1en'
+# inflect.singular /^(ox)en/i, '\1'
+# inflect.irregular 'person', 'people'
+# inflect.uncountable %w( fish sheep )
+# end
+#
+# These inflection rules are supported but not enabled by default:
+# ActiveSupport::Inflector.inflections do |inflect|
+# inflect.acronym 'RESTful'
+# end
diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb
new file mode 100644
index 000000000..72aca7e44
--- /dev/null
+++ b/config/initializers/mime_types.rb
@@ -0,0 +1,5 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new mime types for use in respond_to blocks:
+# Mime::Type.register "text/richtext", :rtf
+# Mime::Type.register_alias "text/html", :iphone
diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb
new file mode 100644
index 000000000..e19e1b24d
--- /dev/null
+++ b/config/initializers/secret_token.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key for verifying the integrity of signed cookies.
+# If you change this key, all old signed cookies will become invalid!
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+OhanaApi::Application.config.secret_token = '6bb1869cc43f25b000d02cf02245a55e330d67da37f97d2c6fb8cd12af3052bab3cc0f630938f531fa35b55976026458ac987e55c103600514bf4810a1945f96'
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
new file mode 100644
index 000000000..f59ccd231
--- /dev/null
+++ b/config/initializers/session_store.rb
@@ -0,0 +1,8 @@
+# Be sure to restart your server when you modify this file.
+
+OhanaApi::Application.config.session_store :cookie_store, key: '_ohana-api_session'
+
+# Use the database for sessions instead of the cookie-based default,
+# which shouldn't be used to store highly confidential information
+# (create the session table with "rails generate session_migration")
+# OhanaApi::Application.config.session_store :active_record_store
diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb
new file mode 100644
index 000000000..369b465f8
--- /dev/null
+++ b/config/initializers/wrap_parameters.rb
@@ -0,0 +1,10 @@
+# Be sure to restart your server when you modify this file.
+#
+# This file contains settings for ActionController::ParamsWrapper which
+# is enabled by default.
+
+# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
+ActiveSupport.on_load(:action_controller) do
+ wrap_parameters format: [:json]
+end
+
diff --git a/config/locales/en.yml b/config/locales/en.yml
new file mode 100644
index 000000000..179c14ca5
--- /dev/null
+++ b/config/locales/en.yml
@@ -0,0 +1,5 @@
+# Sample localization file for English. Add more files in this directory for other locales.
+# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+en:
+ hello: "Hello world"
diff --git a/config/mongoid.yml b/config/mongoid.yml
new file mode 100644
index 000000000..12a5c231a
--- /dev/null
+++ b/config/mongoid.yml
@@ -0,0 +1,80 @@
+development:
+ # Configure available database sessions. (required)
+ sessions:
+ # Defines the default session. (required)
+ default:
+ # Defines the name of the default database that Mongoid can connect to.
+ # (required).
+ database: ohana_api_development
+ # Provides the hosts the default session can connect to. Must be an array
+ # of host:port pairs. (required)
+ hosts:
+ - localhost:27017
+ options:
+ # Change whether the session persists in safe mode by default.
+ # (default: false)
+ # safe: false
+
+ # Change the default consistency model to :eventual or :strong.
+ # :eventual will send reads to secondaries, :strong sends everything
+ # to master. (default: :eventual)
+ # consistency: :eventual
+
+ # How many times Moped should attempt to retry an operation after
+ # failure. (default: 30)
+ # max_retries: 30
+
+ # The time in seconds that Moped should wait before retrying an
+ # operation on failure. (default: 1)
+ # retry_interval: 1
+ # Configure Mongoid specific options. (optional)
+ options:
+ # Configuration for whether or not to allow access to fields that do
+ # not have a field definition on the model. (default: true)
+ # allow_dynamic_fields: true
+
+ # Enable the identity map, needed for eager loading. (default: false)
+ # identity_map_enabled: false
+
+ # Includes the root model name in json serialization. (default: false)
+ # include_root_in_json: false
+
+ # Include the _type field in serializaion. (default: false)
+ # include_type_for_serialization: false
+
+ # Preload all models in development, needed when models use
+ # inheritance. (default: false)
+ # preload_models: false
+
+ # Protect id and type from mass assignment. (default: true)
+ # protect_sensitive_fields: true
+
+ # Raise an error when performing a #find and the document is not found.
+ # (default: true)
+ # raise_not_found_error: true
+
+ # Raise an error when defining a scope with the same name as an
+ # existing method. (default: false)
+ # scope_overwrite_exception: false
+
+ # Skip the database version check, used when connecting to a db without
+ # admin access. (default: false)
+ # skip_version_check: false
+
+ # User Active Support's time zone in conversions. (default: true)
+ # use_activesupport_time_zone: true
+
+ # Ensure all times are UTC in the app side. (default: false)
+ # use_utc: false
+test:
+ sessions:
+ default:
+ database: ohana_api_test
+ hosts:
+ - localhost:27017
+ options:
+ consistency: :strong
+ # In the test environment we lower the retries and retry interval to
+ # low amounts for fast failures.
+ max_retries: 1
+ retry_interval: 0
diff --git a/config/routes.rb b/config/routes.rb
new file mode 100644
index 000000000..f3e04991e
--- /dev/null
+++ b/config/routes.rb
@@ -0,0 +1,2 @@
+OhanaApi::Application.routes.draw do
+end
diff --git a/db/seeds.rb b/db/seeds.rb
new file mode 100644
index 000000000..4edb1e857
--- /dev/null
+++ b/db/seeds.rb
@@ -0,0 +1,7 @@
+# This file should contain all the record creation needed to seed the database with its default values.
+# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
+#
+# Examples:
+#
+# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
+# Mayor.create(name: 'Emanuel', city: cities.first)
diff --git a/lib/assets/.gitkeep b/lib/assets/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/lib/tasks/.gitkeep b/lib/tasks/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/public/404.html b/public/404.html
new file mode 100644
index 000000000..9a48320a5
--- /dev/null
+++ b/public/404.html
@@ -0,0 +1,26 @@
+
+
+
+ The page you were looking for doesn't exist (404)
+
+
+
+
+
+
+
The page you were looking for doesn't exist.
+
You may have mistyped the address or the page may have moved.
+
+
+
diff --git a/public/422.html b/public/422.html
new file mode 100644
index 000000000..83660ab18
--- /dev/null
+++ b/public/422.html
@@ -0,0 +1,26 @@
+
+
+
+ The change you wanted was rejected (422)
+
+
+
+
+
+
+
The change you wanted was rejected.
+
Maybe you tried to change something you didn't have access to.
+
+
+
diff --git a/public/500.html b/public/500.html
new file mode 100644
index 000000000..f3648a0db
--- /dev/null
+++ b/public/500.html
@@ -0,0 +1,25 @@
+
+
+
+ We're sorry, but something went wrong (500)
+
+
+
+
+
+
+
We're sorry, but something went wrong.
+
+
+
diff --git a/public/favicon.ico b/public/favicon.ico
new file mode 100644
index 000000000..e69de29bb
diff --git a/public/humans.txt b/public/humans.txt
new file mode 100644
index 000000000..a61e1c210
--- /dev/null
+++ b/public/humans.txt
@@ -0,0 +1,20 @@
+/* the humans responsible & colophon */
+/* humanstxt.org */
+
+
+/* TEAM */
+ :
+ Site:
+ Twitter:
+ Location:
+
+/* THANKS */
+ Daniel Kehoe (@rails_apps) for the RailsApps project
+
+/* SITE */
+ Standards: HTML5, CSS3
+ Components: jQuery
+ Software: Ruby on Rails
+
+/* GENERATED BY */
+RailsApps application template: http://railsapps.github.io/
diff --git a/public/robots.txt b/public/robots.txt
new file mode 100644
index 000000000..085187fa5
--- /dev/null
+++ b/public/robots.txt
@@ -0,0 +1,5 @@
+# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
+#
+# To ban all spiders from the entire site uncomment the next two lines:
+# User-Agent: *
+# Disallow: /
diff --git a/script/rails b/script/rails
new file mode 100755
index 000000000..f8da2cffd
--- /dev/null
+++ b/script/rails
@@ -0,0 +1,6 @@
+#!/usr/bin/env ruby
+# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
+
+APP_PATH = File.expand_path('../../config/application', __FILE__)
+require File.expand_path('../../config/boot', __FILE__)
+require 'rails/commands'
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
new file mode 100644
index 000000000..c1961f007
--- /dev/null
+++ b/spec/spec_helper.rb
@@ -0,0 +1,54 @@
+# This file is copied to spec/ when you run 'rails generate rspec:install'
+require 'coveralls'
+Coveralls.wear!('rails')
+
+ENV["RAILS_ENV"] ||= 'test'
+require File.expand_path("../../config/environment", __FILE__)
+require 'rspec/rails'
+require 'email_spec'
+require 'rspec/autorun'
+
+# Requires supporting ruby files with custom matchers and macros, etc,
+# in spec/support/ and its subdirectories.
+Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
+
+RSpec.configure do |config|
+ config.include(EmailSpec::Helpers)
+ config.include(EmailSpec::Matchers)
+ # ## Mock Framework
+ #
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
+ #
+ # config.mock_with :mocha
+ # config.mock_with :flexmock
+ # config.mock_with :rr
+
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
+ # config.fixture_path = "#{::Rails.root}/spec/fixtures"
+
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
+ # examples within a transaction, remove the following line or assign false
+ # instead of true.
+ # config.use_transactional_fixtures = true
+
+ # If true, the base class of anonymous controllers will be inferred
+ # automatically. This will be the default behavior in future versions of
+ # rspec-rails.
+ config.infer_base_class_for_anonymous_controllers = false
+
+ # Run specs in random order to surface order dependencies. If you find an
+ # order dependency and want to debug it, you can fix the order by providing
+ # the seed, which is printed after each run.
+ # --seed 1234
+ config.order = "random"
+
+ config.before(:suite) do
+ DatabaseCleaner.strategy = :truncation
+ end
+ config.before(:each) do
+ DatabaseCleaner.start
+ end
+ config.after(:each) do
+ DatabaseCleaner.clean
+ end
+end
diff --git a/spec/support/mongoid.rb b/spec/support/mongoid.rb
new file mode 100644
index 000000000..6289c6930
--- /dev/null
+++ b/spec/support/mongoid.rb
@@ -0,0 +1,3 @@
+RSpec.configure do |config|
+ config.include Mongoid::Matchers
+end
diff --git a/vendor/assets/javascripts/.gitkeep b/vendor/assets/javascripts/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/vendor/assets/stylesheets/.gitkeep b/vendor/assets/stylesheets/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/vendor/plugins/.gitkeep b/vendor/plugins/.gitkeep
new file mode 100644
index 000000000..e69de29bb