Skip to content
Browse files

sinatra -> rails

  • Loading branch information...
1 parent 77da74b commit dbf1fc72fe202ac936cb8da291f1e6f5ff859c04 @blahed committed Oct 29, 2012
Showing with 1,131 additions and 3,459 deletions.
  1. +15 −0 .gitignore
  2. +15 −12 Gemfile
  3. +85 −46 Gemfile.lock
  4. +0 −24 PROJECT.md
  5. +0 −1 Procfile
  6. +261 −0 README.rdoc
  7. +5 −18 Rakefile
  8. BIN app/assets/images/rails.png
  9. +15 −0 app/assets/javascripts/application.js
  10. +2 −0 app/assets/javascripts/notes.js
  11. +2 −0 app/assets/javascripts/software_licenses.js
  12. +13 −0 app/assets/stylesheets/application.css
  13. 0 {public/css → app/assets/stylesheets}/bootstrap.css
  14. +3 −0 app/controllers/application_controller.rb
  15. +2 −0 app/controllers/notes_controller.rb
  16. +2 −0 app/controllers/software_licenses_controller.rb
  17. +0 −13 app/helpers.rb
  18. +2 −0 app/helpers/application_helper.rb
  19. +2 −0 app/helpers/notes_helper.rb
  20. +2 −0 app/helpers/software_licenses_helper.rb
  21. 0 public/js/application.js → app/mailers/.gitkeep
  22. 0 public/css/application.css → app/models/.gitkeep
  23. +10 −0 app/models/generic_account.rb
  24. +8 −0 app/models/note.rb
  25. +10 −0 app/models/software_license.rb
  26. +0 −10 app/routes/pages.rb
  27. +0 −18 app/views/layout.erb
  28. +14 −0 app/views/layouts/application.html.erb
  29. +0 −21 application.rb
  30. +2 −6 config.ru
  31. +68 −0 config/application.rb
  32. +6 −0 config/boot.rb
  33. +0 −3 config/config.yml
  34. +0 −3 config/config.yml.example
  35. +0 −6 config/deploy/deploy.rb
  36. +0 −19 config/deploy/production.rb
  37. +0 −18 config/deploy/staging.rb
  38. +4 −49 config/environment.rb
  39. +31 −0 config/environments/development.rb
  40. +64 −0 config/environments/production.rb
  41. +35 −0 config/environments/test.rb
  42. +7 −0 config/initializers/backtrace_silencers.rb
  43. +15 −0 config/initializers/inflections.rb
  44. +5 −0 config/initializers/mime_types.rb
  45. +7 −0 config/initializers/secret_token.rb
  46. +8 −0 config/initializers/session_store.rb
  47. +10 −0 config/initializers/wrap_parameters.rb
  48. +5 −0 config/locales/en.yml
  49. +58 −0 config/routes.rb
  50. +0 −11 config/unicorn.rb
  51. +7 −0 db/seeds.rb
  52. +2 −0 doc/README_FOR_APP
  53. 0 public/50x.html → lib/assets/.gitkeep
  54. +0 −34 lib/roswell.rb
  55. +0 −38 lib/roswell/config.rb
  56. 0 lib/{.gitignore → tasks/.gitkeep}
  57. 0 app/views/index.erb → log/.gitkeep
  58. +26 −0 public/404.html
  59. +26 −0 public/422.html
  60. +25 −0 public/500.html
  61. +0 −1,058 public/css/bootstrap-responsive.css
  62. +0 −9 public/css/bootstrap-responsive.min.css
  63. +0 −9 public/css/bootstrap.min.css
  64. 0 app/models/.gitignore → public/favicon.ico
  65. BIN public/img/glyphicons-halflings-white.png
  66. BIN public/img/glyphicons-halflings.png
  67. +241 −0 public/index.html
  68. +0 −2,027 public/js/bootstrap.js
  69. +0 −6 public/js/bootstrap.min.js
  70. +5 −0 public/robots.txt
  71. +6 −0 script/rails
  72. 0 README.md → vendor/assets/javascripts/.gitkeep
  73. 0 vendor/assets/stylesheets/.gitkeep
  74. 0 vendor/plugins/.gitkeep
View
15 .gitignore
@@ -0,0 +1,15 @@
+# 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/*.log
+/tmp
View
27 Gemfile
@@ -1,20 +1,23 @@
-source 'http://rubygems.org'
+source 'https://rubygems.org'
-gem 'rake', '~> 0.9.2.2'
-gem 'rack', '~> 1.4.1'
-gem 'sinatra', '~> 1.3.3'
-gem 'sinatra-contrib', '~> 1.3.2'
+gem 'rails', '3.2.8'
gem 'mongoid', '~> 2.5.1'
gem 'bson_ext', '~> 1.7.0'
+gem 'bcrypt-ruby', '~> 3.0.0'
-gem 'mime-types', '~> 1.17.2'
+gem 'jquery-rails'
+gem 'unicorn'
-group :development do
- gem 'screwcap', '~> 0.8.3'
-end
-group :production do
- gem 'airbrake', '~> 3.0.9'
- gem 'unicorn', '~> 4.1.1'
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+ # See https://github.com/sstephenson/execjs#readme for more supported runtimes
+ # gem 'therubyracer', :platforms => :ruby
+
+ gem 'uglifier', '>= 1.0.3'
end
+
+# To use debugger
+# gem 'debugger'
View
131 Gemfile.lock
@@ -1,76 +1,115 @@
GEM
- remote: http://rubygems.org/
+ remote: https://rubygems.org/
specs:
- activemodel (3.1.3)
- activesupport (= 3.1.3)
+ actionmailer (3.2.8)
+ actionpack (= 3.2.8)
+ mail (~> 2.4.4)
+ actionpack (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.4)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.3)
+ activemodel (3.2.8)
+ activesupport (= 3.2.8)
+ builder (~> 3.0.0)
+ activerecord (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ arel (~> 3.0.2)
+ tzinfo (~> 0.3.29)
+ activeresource (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ activesupport (3.2.8)
i18n (~> 0.6)
- activesupport (3.1.3)
multi_json (~> 1.0)
- airbrake (3.0.9)
- activesupport
- builder
- backports (2.6.4)
+ arel (3.0.2)
+ bcrypt-ruby (3.0.1)
bson (1.7.0)
bson_ext (1.7.0)
bson (~> 1.7.0)
- builder (3.0.0)
- eventmachine (1.0.0)
+ builder (3.0.4)
+ erubis (2.7.0)
+ execjs (1.4.0)
+ multi_json (~> 1.0)
+ hike (1.2.1)
i18n (0.6.1)
- kgio (2.7.2)
- mime-types (1.17.2)
+ journey (1.0.4)
+ jquery-rails (2.1.3)
+ railties (>= 3.1.0, < 5.0)
+ thor (~> 0.14)
+ json (1.7.5)
+ kgio (2.7.4)
+ mail (2.4.4)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.19)
mongo (1.7.0)
bson (~> 1.7.0)
mongoid (2.5.1)
activemodel (~> 3.1)
mongo (~> 1.7)
tzinfo (~> 0.3.22)
- multi_json (1.0.4)
- net-scp (1.0.4)
- net-ssh (>= 1.99.1)
- net-ssh (2.2.2)
- net-ssh-gateway (1.1.0)
- net-ssh (>= 1.99.1)
+ multi_json (1.3.6)
+ polyglot (0.3.3)
rack (1.4.1)
- rack-protection (1.2.0)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-ssl (1.3.2)
rack
rack-test (0.6.2)
rack (>= 1.0)
- raindrops (0.8.0)
+ rails (3.2.8)
+ actionmailer (= 3.2.8)
+ actionpack (= 3.2.8)
+ activerecord (= 3.2.8)
+ activeresource (= 3.2.8)
+ activesupport (= 3.2.8)
+ bundler (~> 1.0)
+ railties (= 3.2.8)
+ railties (3.2.8)
+ actionpack (= 3.2.8)
+ activesupport (= 3.2.8)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (>= 0.14.6, < 2.0)
+ raindrops (0.10.0)
rake (0.9.2.2)
- screwcap (0.8.3)
- net-scp (>= 1.0.4)
- net-ssh (>= 2.0.23)
- net-ssh-gateway (>= 1.0.1)
- sinatra (1.3.3)
- rack (~> 1.3, >= 1.3.6)
- rack-protection (~> 1.2)
- tilt (~> 1.3, >= 1.3.3)
- sinatra-contrib (1.3.2)
- backports (>= 2.0)
- eventmachine
- rack-protection
- rack-test
- sinatra (~> 1.3.0)
- tilt (~> 1.3)
+ rdoc (3.12)
+ json (~> 1.4)
+ sprockets (2.1.3)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ thor (0.16.0)
tilt (1.3.3)
+ treetop (1.4.11)
+ polyglot
+ polyglot (>= 0.3.1)
tzinfo (0.3.34)
- unicorn (4.1.1)
- kgio (~> 2.4)
+ uglifier (1.3.0)
+ execjs (>= 0.3.0)
+ multi_json (~> 1.0, >= 1.0.2)
+ unicorn (4.4.0)
+ kgio (~> 2.6)
rack
- raindrops (~> 0.6)
+ raindrops (~> 0.7)
PLATFORMS
ruby
DEPENDENCIES
- airbrake (~> 3.0.9)
+ bcrypt-ruby (~> 3.0.0)
bson_ext (~> 1.7.0)
- mime-types (~> 1.17.2)
+ jquery-rails
mongoid (~> 2.5.1)
- rack (~> 1.4.1)
- rake (~> 0.9.2.2)
- screwcap (~> 0.8.3)
- sinatra (~> 1.3.3)
- sinatra-contrib (~> 1.3.2)
- unicorn (~> 4.1.1)
+ rails (= 3.2.8)
+ uglifier (>= 1.0.3)
+ unicorn
View
24 PROJECT.md
@@ -1,24 +0,0 @@
-# Project
-
-1. GenericAccounts
- * title
- * username
- * password
- * comments
- * created_at
- * updated_at
- * updated_by
- * updated_by_ip
-
-2. WebAccounts
- * url
-
-3. Notes
- * title
- * body
- * created_at
- * updated_at
- * updated_by
- * updated_by_ip
-
-4. Groups and Subgroups
View
1 Procfile
@@ -1 +0,0 @@
-sinatra: bundle exec ruby application.rb
View
261 README.rdoc
@@ -0,0 +1,261 @@
+== Welcome to Rails
+
+Rails is a web-application framework that includes everything needed to create
+database-backed web applications according to the Model-View-Control pattern.
+
+This pattern splits the view (also called the presentation) into "dumb"
+templates that are primarily responsible for inserting pre-built data in between
+HTML tags. The model contains the "smart" domain objects (such as Account,
+Product, Person, Post) that holds all the business logic and knows how to
+persist themselves to a database. The controller handles the incoming requests
+(such as Save New Account, Update Product, Show Post) by manipulating the model
+and directing data to the view.
+
+In Rails, the model is handled by what's called an object-relational mapping
+layer entitled Active Record. This layer allows you to present the data from
+database rows as objects and embellish these data objects with business logic
+methods. You can read more about Active Record in
+link:files/vendor/rails/activerecord/README.html.
+
+The controller and view are handled by the Action Pack, which handles both
+layers by its two parts: Action View and Action Controller. These two layers
+are bundled in a single package due to their heavy interdependence. This is
+unlike the relationship between the Active Record and Action Pack that is much
+more separate. Each of these packages can be used independently outside of
+Rails. You can read more about Action Pack in
+link:files/vendor/rails/actionpack/README.html.
+
+
+== Getting Started
+
+1. At the command prompt, create a new Rails application:
+ <tt>rails new myapp</tt> (where <tt>myapp</tt> is the application name)
+
+2. Change directory to <tt>myapp</tt> and start the web server:
+ <tt>cd myapp; rails server</tt> (run with --help for options)
+
+3. Go to http://localhost:3000/ and you'll see:
+ "Welcome aboard: You're riding Ruby on Rails!"
+
+4. Follow the guidelines to start developing your application. You can find
+the following resources handy:
+
+* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
+* Ruby on Rails Tutorial Book: http://www.railstutorial.org/
+
+
+== Debugging Rails
+
+Sometimes your application goes wrong. Fortunately there are a lot of tools that
+will help you debug it and get it back on the rails.
+
+First area to check is the application log files. Have "tail -f" commands
+running on the server.log and development.log. Rails will automatically display
+debugging and runtime information to these files. Debugging info will also be
+shown in the browser on requests from 127.0.0.1.
+
+You can also log your own messages directly into the log file from your code
+using the Ruby logger class from inside your controllers. Example:
+
+ class WeblogController < ActionController::Base
+ def destroy
+ @weblog = Weblog.find(params[:id])
+ @weblog.destroy
+ logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
+ end
+ end
+
+The result will be a message in your log file along the lines of:
+
+ Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1!
+
+More information on how to use the logger is at http://www.ruby-doc.org/core/
+
+Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are
+several books available online as well:
+
+* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe)
+* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
+
+These two books will bring you up to speed on the Ruby language and also on
+programming in general.
+
+
+== Debugger
+
+Debugger support is available through the debugger command when you start your
+Mongrel or WEBrick server with --debugger. This means that you can break out of
+execution at any point in the code, investigate and change the model, and then,
+resume execution! You need to install ruby-debug to run the server in debugging
+mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example:
+
+ class WeblogController < ActionController::Base
+ def index
+ @posts = Post.all
+ debugger
+ end
+ end
+
+So the controller will accept the action, run the first line, then present you
+with a IRB prompt in the server window. Here you can do things like:
+
+ >> @posts.inspect
+ => "[#<Post:0x14a6be8
+ @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>,
+ #<Post:0x14a6620
+ @attributes={"title"=>"Rails", "body"=>"Only ten..", "id"=>"2"}>]"
+ >> @posts.first.title = "hello from a debugger"
+ => "hello from a debugger"
+
+...and even better, you can examine how your runtime objects actually work:
+
+ >> f = @posts.first
+ => #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
+ >> f.
+ Display all 152 possibilities? (y or n)
+
+Finally, when you're ready to resume execution, you can enter "cont".
+
+
+== Console
+
+The console is a Ruby shell, which allows you to interact with your
+application's domain model. Here you'll have all parts of the application
+configured, just like it is when the application is running. You can inspect
+domain models, change values, and save to the database. Starting the script
+without arguments will launch it in the development environment.
+
+To start the console, run <tt>rails console</tt> from the application
+directory.
+
+Options:
+
+* Passing the <tt>-s, --sandbox</tt> argument will rollback any modifications
+ made to the database.
+* Passing an environment name as an argument will load the corresponding
+ environment. Example: <tt>rails console production</tt>.
+
+To reload your controllers and models after launching the console run
+<tt>reload!</tt>
+
+More information about irb can be found at:
+link:http://www.rubycentral.org/pickaxe/irb.html
+
+
+== dbconsole
+
+You can go to the command line of your database directly through <tt>rails
+dbconsole</tt>. You would be connected to the database with the credentials
+defined in database.yml. Starting the script without arguments will connect you
+to the development database. Passing an argument will connect you to a different
+database, like <tt>rails dbconsole production</tt>. Currently works for MySQL,
+PostgreSQL and SQLite 3.
+
+== Description of Contents
+
+The default directory structure of a generated Ruby on Rails application:
+
+ |-- app
+ | |-- assets
+ | |-- images
+ | |-- javascripts
+ | `-- stylesheets
+ | |-- controllers
+ | |-- helpers
+ | |-- mailers
+ | |-- models
+ | `-- views
+ | `-- layouts
+ |-- config
+ | |-- environments
+ | |-- initializers
+ | `-- locales
+ |-- db
+ |-- doc
+ |-- lib
+ | `-- tasks
+ |-- log
+ |-- public
+ |-- script
+ |-- test
+ | |-- fixtures
+ | |-- functional
+ | |-- integration
+ | |-- performance
+ | `-- unit
+ |-- tmp
+ | |-- cache
+ | |-- pids
+ | |-- sessions
+ | `-- sockets
+ `-- vendor
+ |-- assets
+ `-- stylesheets
+ `-- plugins
+
+app
+ Holds all the code that's specific to this particular application.
+
+app/assets
+ Contains subdirectories for images, stylesheets, and JavaScript files.
+
+app/controllers
+ Holds controllers that should be named like weblogs_controller.rb for
+ automated URL mapping. All controllers should descend from
+ ApplicationController which itself descends from ActionController::Base.
+
+app/models
+ Holds models that should be named like post.rb. Models descend from
+ ActiveRecord::Base by default.
+
+app/views
+ Holds the template files for the view that should be named like
+ weblogs/index.html.erb for the WeblogsController#index action. All views use
+ eRuby syntax by default.
+
+app/views/layouts
+ Holds the template files for layouts to be used with views. This models the
+ common header/footer method of wrapping views. In your views, define a layout
+ using the <tt>layout :default</tt> and create a file named default.html.erb.
+ Inside default.html.erb, call <% yield %> to render the view using this
+ layout.
+
+app/helpers
+ Holds view helpers that should be named like weblogs_helper.rb. These are
+ generated for you automatically when using generators for controllers.
+ Helpers can be used to wrap functionality for your views into methods.
+
+config
+ Configuration files for the Rails environment, the routing map, the database,
+ and other dependencies.
+
+db
+ Contains the database schema in schema.rb. db/migrate contains all the
+ sequence of Migrations for your schema.
+
+doc
+ This directory is where your application documentation will be stored when
+ generated using <tt>rake doc:app</tt>
+
+lib
+ Application specific libraries. Basically, any kind of custom code that
+ doesn't belong under controllers, models, or helpers. This directory is in
+ the load path.
+
+public
+ The directory available for the web server. Also contains the dispatchers and the
+ default HTML files. This should be set as the DOCUMENT_ROOT of your web
+ server.
+
+script
+ Helper scripts for automation and generation.
+
+test
+ Unit and functional tests along with fixtures. When using the rails generate
+ command, template test files will be generated for you and placed in this
+ directory.
+
+vendor
+ External libraries that the application depends on. Also includes the plugins
+ subdirectory. If the app has frozen rails, those gems also go here, under
+ vendor/rails/. This directory is in the load path.
View
23 Rakefile
@@ -1,20 +1,7 @@
-$LOAD_PATH.unshift(File.join(Rake.original_dir, 'lib'))
+#!/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.
-task :environment do
- require File.expand_path('../config/environment', __FILE__)
-end
+require File.expand_path('../config/application', __FILE__)
-task :setup do
- system "cp -f config/config.yml.example config/config.yml"
- puts "\033[32mSetup is finished\033[0m"
-end
-
-namespace :deploy do
- task :staging do
- exec "screwcap config/deploy/staging.rb deploy"
- end
-
- task :production do
- exec "screwcap config/deploy/production.rb deploy"
- end
-end
+Roswell::Application.load_tasks
View
BIN app/assets/images/rails.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
15 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 .
View
2 app/assets/javascripts/notes.js
@@ -0,0 +1,2 @@
+// Place all the behaviors and hooks related to the matching controller here.
+// All this logic will automatically be available in application.js.
View
2 app/assets/javascripts/software_licenses.js
@@ -0,0 +1,2 @@
+// Place all the behaviors and hooks related to the matching controller here.
+// All this logic will automatically be available in application.js.
View
13 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 .
+ */
View
0 public/css/bootstrap.css → app/assets/stylesheets/bootstrap.css
File renamed without changes.
View
3 app/controllers/application_controller.rb
@@ -0,0 +1,3 @@
+class ApplicationController < ActionController::Base
+ protect_from_forgery
+end
View
2 app/controllers/notes_controller.rb
@@ -0,0 +1,2 @@
+class NotesController < ApplicationController
+end
View
2 app/controllers/software_licenses_controller.rb
@@ -0,0 +1,2 @@
+class SoftwareLicensesController < ApplicationController
+end
View
13 app/helpers.rb
@@ -1,13 +0,0 @@
-module Roswell
- module ApplicationHelpers
-
- def title(page_title)
- content_for(:title) { page_title }
- end
-
- def description(desc)
- content_for(:description) { desc }
- end
-
- end
-end
View
2 app/helpers/application_helper.rb
@@ -0,0 +1,2 @@
+module ApplicationHelper
+end
View
2 app/helpers/notes_helper.rb
@@ -0,0 +1,2 @@
+module NotesHelper
+end
View
2 app/helpers/software_licenses_helper.rb
@@ -0,0 +1,2 @@
+module SoftwareLicensesHelper
+end
View
0 public/js/application.js → app/mailers/.gitkeep
File renamed without changes.
View
0 public/css/application.css → app/models/.gitkeep
File renamed without changes.
View
10 app/models/generic_account.rb
@@ -0,0 +1,10 @@
+class GenericAccount
+ include Mongoid::Document
+ include Mongoid::Timestamps
+
+ field :title, :type => String
+ field :username, :type => String
+ field :password, :type => String
+ field :comments, :type => String
+ field :updated_by_ip, :type => String
+end
View
8 app/models/note.rb
@@ -0,0 +1,8 @@
+class Note
+ include Mongoid::Document
+ include Mongoid::Timestamps
+
+ field :title, :type => String
+ field :body, :type => String
+ field :updated_by_ip, :type => String
+end
View
10 app/models/software_license.rb
@@ -0,0 +1,10 @@
+class SoftwareLicense
+ include Mongoid::Document
+ include Mongoid::Timestamps
+
+ field :title, :type => String
+ field :license_key, :type => String
+ field :licensed_to, :type => String
+ field :comments, :type => String
+ field :updated_by_ip, :type => String
+end
View
10 app/routes/pages.rb
@@ -1,10 +0,0 @@
-class Roswell::Application < Sinatra::Base
-
- before do
- end
-
- get '/' do
- erb :index
- end
-
-end
View
18 app/views/layout.erb
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <link rel="stylesheet" href="/css/application.css" type="text/css" media="screen">
- <script type="text/javascript" src="/js/jquery.js"></script>
- <script type="text/javascript" src="/js/main.js"></script>
-
- <title><%= yield_content(:title).empty? ? 'Default' : yield_content(:title) %> | Template Title</title>
- <meta name="description" value="<%= yield_content(:description).empty? ? '' : yield_content(:description) %>" />
- </head>
- <body>
- <div id="header">
- </div>
- <div id="container">
- <%= yield %>
- </div>
- </body>
-</html>
View
14 app/views/layouts/application.html.erb
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Roswell</title>
+ <%= stylesheet_link_tag "application", :media => "all" %>
+ <%= javascript_include_tag "application" %>
+ <%= csrf_meta_tags %>
+</head>
+<body>
+
+<%= yield %>
+
+</body>
+</html>
View
21 application.rb
@@ -1,21 +0,0 @@
-require 'rubygems'
-require 'bundler/setup'
-require 'sinatra/base'
-require File.expand_path('../config/environment', __FILE__)
-
-class Roswell::Application < Sinatra::Base
- set :run, lambda { __FILE__ == $0 && !running? }
-
- # Handle Errors in Production
- if production?
- not_found do
- File.read File.join(settings.root, 'public/404.html')
- end
-
- error do
- File.read File.join(settings.root, 'public/500.html')
- end
- end
-
- run! if run?
-end
View
8 config.ru
@@ -1,8 +1,4 @@
-require File.expand_path('../application', __FILE__)
-
-FileUtils.mkdir_p 'log' unless File.exists?('log')
-log = File.new("log/sinatra.log", "a+")
-$stdout.reopen(log)
-$stderr.reopen(log)
+# This file is used by Rack-based servers to start the application.
+require ::File.expand_path('../config/environment', __FILE__)
run Roswell::Application
View
68 config/application.rb
@@ -0,0 +1,68 @@
+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 Roswell
+ class Application < Rails::Application
+ # 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)
+
+ # 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
View
6 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'])
View
3 config/config.yml
@@ -1,3 +0,0 @@
-domain: localhost
-port: 13300
-
View
3 config/config.yml.example
@@ -1,3 +0,0 @@
-domain: localhost
-port: 13300
-
View
6 config/deploy/deploy.rb
@@ -1,6 +0,0 @@
-task :create_sym_links do
- run "ln -sf #{shared_dir}/config.yml #{current_dir}/config/config.yml"
- run "ln -sf #{shared_dir}/log #{current_dir}/log"
- run "ln -sf #{shared_dir}/tmp #{current_dir}/tmp"
- run "ln -sf #{shared_dir}/system #{current_dir}/public/system"
-end
View
19 config/deploy/production.rb
@@ -1,19 +0,0 @@
-use :deploy
-
-server :production, :address => 'example.com', :user => 'deploy', :forward_agent => true
-
-set :app_name, 'example.com'
-set :current_dir, "/var/www/#{app_name}/current"
-set :shared_dir, "/var/www/#{app_name}/shared"
-set :branch, "origin/production"
-
-task :restart do
- run "kill -HUP `cat #{shared_dir}/tmp/pids/unicorn.pid`"
-end
-
-task :deploy, :server => :production do
- run "cd #{current_dir}; git fetch && git reset --hard #{branch} && bundle install --deployment"
- create_sym_links
- restart
-end
-
View
18 config/deploy/staging.rb
@@ -1,18 +0,0 @@
-use :deploy
-
-server :staging, :address => 'example.com', :user => 'deploy', :forward_agent => true
-
-set :app_name, 'example.com'
-set :current_dir, "/var/www/#{app_name}/current"
-set :shared_dir, "/var/www/#{app_name}/shared"
-set :branch, "origin/master"
-
-task :restart do
- run "kill -HUP `cat #{shared_dir}/tmp/pids/unicorn.pid`"
-end
-
-task :deploy, :server => :staging do
- run "cd #{current_dir}; git fetch && git reset --hard #{branch} && bundle install --deployment"
- create_sym_links
- restart
-end
View
53 config/environment.rb
@@ -1,50 +1,5 @@
-APP_ROOT = File.expand_path('../../', __FILE__)
-$LOAD_PATH.unshift(File.join(APP_ROOT, 'lib'))
+# Load the rails application
+require File.expand_path('../application', __FILE__)
-ENV['RACK_ENV'] ||= 'development'
-
-require 'yaml'
-
-require 'mongoid'
-require 'json'
-
-require 'roswell'
-
-Dir.glob("#{APP_ROOT}/app/models/*.rb") { |route| require route }
-
-Roswell.load_config
-Roswell.environment = ENV['RACK_ENV'].to_sym
-
-
-if Roswell.production?
- require 'airbrake'
-
- Airbrake.configure do |config|
- config.api_key = Roswell.airbrake_api_key
- end
-end
-
-if defined? Sinatra
- require 'sinatra/content_for'
- require "#{APP_ROOT}/app/helpers"
-
- class Roswell::Application < Sinatra::Base
- enable :logging
- enable :show_exceptions if development?
-
- if production?
- use Airbrake::Rack
- enable :raise_errors
- end
-
-
- set :root, APP_ROOT
- set :views, lambda { File.join(root, 'app/views') }
- set :protection, :except => :frame_options
-
- helpers Sinatra::ContentFor
- helpers Roswell::ApplicationHelpers
- end
-
- Dir.glob("#{APP_ROOT}/app/routes/*.rb") { |route| require route }
-end
+# Initialize the rails application
+Roswell::Application.initialize!
View
31 config/environments/development.rb
@@ -0,0 +1,31 @@
+Roswell::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
View
64 config/environments/production.rb
@@ -0,0 +1,64 @@
+Roswell::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
View
35 config/environments/test.rb
@@ -0,0 +1,35 @@
+Roswell::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
View
7 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!
View
15 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
View
5 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
View
7 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.
+Roswell::Application.config.secret_token = '2887c37cb6ac326b36bc2244808f4cc201b5c0389ba2cdc4859303f1e561d234fc4fafe42a6fad194a70c9f5885717c90f53b9749dc0a682bce7986c65388075'
View
8 config/initializers/session_store.rb
@@ -0,0 +1,8 @@
+# Be sure to restart your server when you modify this file.
+
+Roswell::Application.config.session_store :cookie_store, key: '_roswell_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")
+# Roswell::Application.config.session_store :active_record_store
View
10 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
+
View
5 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"
View
58 config/routes.rb
@@ -0,0 +1,58 @@
+Roswell::Application.routes.draw do
+ # The priority is based upon order of creation:
+ # first created -> highest priority.
+
+ # Sample of regular route:
+ # match 'products/:id' => 'catalog#view'
+ # Keep in mind you can assign values other than :controller and :action
+
+ # Sample of named route:
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
+ # This route can be invoked with purchase_url(:id => product.id)
+
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
+ # resources :products
+
+ # Sample resource route with options:
+ # resources :products do
+ # member do
+ # get 'short'
+ # post 'toggle'
+ # end
+ #
+ # collection do
+ # get 'sold'
+ # end
+ # end
+
+ # Sample resource route with sub-resources:
+ # resources :products do
+ # resources :comments, :sales
+ # resource :seller
+ # end
+
+ # Sample resource route with more complex sub-resources
+ # resources :products do
+ # resources :comments
+ # resources :sales do
+ # get 'recent', :on => :collection
+ # end
+ # end
+
+ # Sample resource route within a namespace:
+ # namespace :admin do
+ # # Directs /admin/products/* to Admin::ProductsController
+ # # (app/controllers/admin/products_controller.rb)
+ # resources :products
+ # end
+
+ # You can have the root of your site routed with "root"
+ # just remember to delete public/index.html.
+ # root :to => 'welcome#index'
+
+ # See how all your routes lay out with "rake routes"
+
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
+ # Note: This route will make all actions in every controller accessible via GET requests.
+ # match ':controller(/:action(/:id))(.:format)'
+end
View
11 config/unicorn.rb
@@ -1,11 +0,0 @@
-APP_ROOT = File.expand_path('../../', __FILE__)
-CONFIG = YAML.load_file(File.join(APP_ROOT, 'config/config.yml'))
-
-worker_processes 4
-listen CONFIG['port']
-timeout 40
-
-working_directory APP_ROOT
-pid "#{APP_ROOT}/tmp/pids/unicorn.pid"
-stderr_path "#{APP_ROOT}/log/unicorn.stderr.log"
-stdout_path "#{APP_ROOT}/log/unicorn.stdout.log"
View
7 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)
View
2 doc/README_FOR_APP
@@ -0,0 +1,2 @@
+Use this README file to introduce your application and point to useful places in the API for learning more.
+Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
View
0 public/50x.html → lib/assets/.gitkeep
File renamed without changes.
View
34 lib/roswell.rb
@@ -1,34 +0,0 @@
-require 'logger'
-
-require 'roswell/config'
-
-module Roswell
-
- def self.log(message)
- @@logger ||= Logger.new(STDOUT)
- @@logger.info(message)
- end
-
- def self.load_config
- return unless File.exist? config_file = File.join(Roswell.app_dir, 'config/config.yml')
- yaml = YAML.load_file(config_file)
-
- Roswell.configure do |config|
- yaml.each { |key, val| config.send("#{key}=", val) if config.respond_to?(key) }
- end
- end
-
- def self.configure
- config = Roswell::Config.instance
- block_given? ? yield(config) : config
- end
-
- Roswell::Config.public_instance_methods(false).each do |name|
- (class << self; self; end).class_eval <<-EOT
- def #{name}(*args)
- configure.send("#{name}", *args)
- end
- EOT
- end
-
-end
View
38 lib/roswell/config.rb
@@ -1,38 +0,0 @@
-require 'yaml'
-require 'singleton'
-
-module Roswell
- class ConfigError < StandardError; end
-
- class Config
- include Singleton
-
- attr_accessor :environment
- attr_accessor :app_dir
- attr_accessor :domain
-
- # Airbrake
- attr_accessor :airbrake_api_key
-
- def initialize
- reset_config
- end
-
- def reset_config
- @environment = :development
- @app_dir = File.expand_path('../../../', __FILE__)
- end
-
- def development?
- @environment == :development
- end
-
- def production?
- @environment == :production
- end
-
- def testing?
- @environment == :testing
- end
- end
-end
View
0 lib/.gitignore → lib/tasks/.gitkeep
File renamed without changes.
View
0 app/views/index.erb → log/.gitkeep
File renamed without changes.
View
26 public/404.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>The page you were looking for doesn't exist (404)</title>
+ <style type="text/css">
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+ div.dialog {
+ width: 25em;
+ padding: 0 4em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #ccc;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ }
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+ </style>
+</head>
+
+<body>
+ <!-- This file lives in public/404.html -->
+ <div class="dialog">
+ <h1>The page you were looking for doesn't exist.</h1>
+ <p>You may have mistyped the address or the page may have moved.</p>
+ </div>
+</body>
+</html>
View
26 public/422.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>The change you wanted was rejected (422)</title>
+ <style type="text/css">
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+ div.dialog {
+ width: 25em;
+ padding: 0 4em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #ccc;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ }
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+ </style>
+</head>
+
+<body>
+ <!-- This file lives in public/422.html -->
+ <div class="dialog">
+ <h1>The change you wanted was rejected.</h1>
+ <p>Maybe you tried to change something you didn't have access to.</p>
+ </div>
+</body>
+</html>
View
25 public/500.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>We're sorry, but something went wrong (500)</title>
+ <style type="text/css">
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+ div.dialog {
+ width: 25em;
+ padding: 0 4em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #ccc;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ }
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+ </style>
+</head>
+
+<body>
+ <!-- This file lives in public/500.html -->
+ <div class="dialog">
+ <h1>We're sorry, but something went wrong.</h1>
+ </div>
+</body>
+</html>
View
1,058 public/css/bootstrap-responsive.css
@@ -1,1058 +0,0 @@
-/*!
- * Bootstrap Responsive v2.1.1
- *
- * Copyright 2012 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */
-
-.clearfix {
- *zoom: 1;
-}
-
-.clearfix:before,
-.clearfix:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.clearfix:after {
- clear: both;
-}
-
-.hide-text {
- font: 0/0 a;
- color: transparent;
- text-shadow: none;
- background-color: transparent;
- border: 0;
-}
-
-.input-block-level {
- display: block;
- width: 100%;
- min-height: 30px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-
-.hidden {
- display: none;
- visibility: hidden;
-}
-
-.visible-phone {
- display: none !important;
-}
-
-.visible-tablet {
- display: none !important;
-}
-
-.hidden-desktop {
- display: none !important;
-}
-
-.visible-desktop {
- display: inherit !important;
-}
-
-@media (min-width: 768px) and (max-width: 979px) {
- .hidden-desktop {
- display: inherit !important;
- }
- .visible-desktop {
- display: none !important ;
- }
- .visible-tablet {
- display: inherit !important;
- }
- .hidden-tablet {
- display: none !important;
- }
-}
-
-@media (max-width: 767px) {
- .hidden-desktop {
- display: inherit !important;
- }
- .visible-desktop {
- display: none !important;
- }
- .visible-phone {
- display: inherit !important;
- }
- .hidden-phone {
- display: none !important;
- }
-}
-
-@media (min-width: 1200px) {
- .row {
- margin-left: -30px;
- *zoom: 1;
- }
- .row:before,
- .row:after {
- display: table;
- line-height: 0;
- content: "";
- }
- .row:after {
- clear: both;
- }
- [class*="span"] {
- float: left;
- min-height: 1px;
- margin-left: 30px;
- }
- .container,
- .navbar-static-top .container,
- .navbar-fixed-top .container,
- .navbar-fixed-bottom .container {
- width: 1170px;
- }
- .span12 {
- width: 1170px;
- }
- .span11 {
- width: 1070px;
- }
- .span10 {
- width: 970px;
- }
- .span9 {
- width: 870px;
- }
- .span8 {
- width: 770px;
- }
- .span7 {
- width: 670px;
- }
- .span6 {
- width: 570px;
- }
- .span5 {
- width: 470px;
- }
- .span4 {
- width: 370px;
- }
- .span3 {
- width: 270px;
- }
- .span2 {
- width: 170px;
- }
- .span1 {
- width: 70px;
- }
- .offset12 {
- margin-left: 1230px;
- }
- .offset11 {
- margin-left: 1130px;
- }
- .offset10 {
- margin-left: 1030px;
- }
- .offset9 {
- margin-left: 930px;
- }
- .offset8 {
- margin-left: 830px;
- }
- .offset7 {
- margin-left: 730px;
- }
- .offset6 {
- margin-left: 630px;
- }
- .offset5 {
- margin-left: 530px;
- }
- .offset4 {
- margin-left: 430px;
- }
- .offset3 {
- margin-left: 330px;
- }
- .offset2 {
- margin-left: 230px;
- }
- .offset1 {
- margin-left: 130px;
- }
- .row-fluid {
- width: 100%;
- *zoom: 1;
- }
- .row-fluid:before,
- .row-fluid:after {
- display: table;
- line-height: 0;
- content: "";
- }
- .row-fluid:after {
- clear: both;
- }
- .row-fluid [class*="span"] {
- display: block;
- float: left;
- width: 100%;
- min-height: 30px;
- margin-left: 2.564102564102564%;
- *margin-left: 2.5109110747408616%;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
- .row-fluid [class*="span"]:first-child {
- margin-left: 0;
- }
- .row-fluid .span12 {
- width: 100%;
- *width: 99.94680851063829%;
- }
- .row-fluid .span11 {
- width: 91.45299145299145%;
- *width: 91.39979996362975%;
- }
- .row-fluid .span10 {
- width: 82.90598290598291%;
- *width: 82.8527914166212%;
- }
- .row-fluid .span9 {
- width: 74.35897435897436%;
- *width: 74.30578286961266%;
- }
- .row-fluid .span8 {
- width: 65.81196581196582%;
- *width: 65.75877432260411%;
- }
- .row-fluid .span7 {
- width: 57.26495726495726%;
- *width: 57.21176577559556%;
- }
- .row-fluid .span6 {
- width: 48.717948717948715%;
- *width: 48.664757228587014%;
- }
- .row-fluid .span5 {
- width: 40.17094017094017%;
- *width: 40.11774868157847%;
- }
- .row-fluid .span4 {
- width: 31.623931623931625%;
- *width: 31.570740134569924%;
- }
- .row-fluid .span3 {
- width: 23.076923076923077%;
- *width: 23.023731587561375%;
- }
- .row-fluid .span2 {
- width: 14.52991452991453%;
- *width: 14.476723040552828%;
- }
- .row-fluid .span1 {
- width: 5.982905982905983%;
- *width: 5.929714493544281%;
- }
- .row-fluid .offset12 {
- margin-left: 105.12820512820512%;
- *margin-left: 105.02182214948171%;
- }
- .row-fluid .offset12:first-child {
- margin-left: 102.56410256410257%;
- *margin-left: 102.45771958537915%;
- }
- .row-fluid .offset11 {
- margin-left: 96.58119658119658%;
- *margin-left: 96.47481360247316%;
- }
- .row-fluid .offset11:first-child {
- margin-left: 94.01709401709402%;
- *margin-left: 93.91071103837061%;
- }
- .row-fluid .offset10 {
- margin-left: 88.03418803418803%;
- *margin-left: 87.92780505546462%;
- }
- .row-fluid .offset10:first-child {
- margin-left: 85.47008547008548%;
- *margin-left: 85.36370249136206%;
- }
- .row-fluid .offset9 {
- margin-left: 79.48717948717949%;
- *margin-left: 79.38079650845607%;
- }
- .row-fluid .offset9:first-child {
- margin-left: 76.92307692307693%;
- *margin-left: 76.81669394435352%;
- }
- .row-fluid .offset8 {
- margin-left: 70.94017094017094%;
- *margin-left: 70.83378796144753%;
- }
- .row-fluid .offset8:first-child {
- margin-left: 68.37606837606839%;
- *margin-left: 68.26968539734497%;
- }
- .row-fluid .offset7 {
- margin-left: 62.393162393162385%;
- *margin-left: 62.28677941443899%;
- }
- .row-fluid .offset7:first-child {
- margin-left: 59.82905982905982%;
- *margin-left: 59.72267685033642%;
- }
- .row-fluid .offset6 {
- margin-left: 53.84615384615384%;
- *margin-left: 53.739770867430444%;
- }
- .row-fluid .offset6:first-child {
- margin-left: 51.28205128205128%;
- *margin-left: 51.175668303327875%;
- }
- .row-fluid .offset5 {
- margin-left: 45.299145299145295%;
- *margin-left: 45.1927623204219%;
- }
- .row-fluid .offset5:first-child {
- margin-left: 42.73504273504273%;
- *margin-left: 42.62865975631933%;
- }
- .row-fluid .offset4 {
- margin-left: 36.75213675213675%;
- *margin-left: 36.645753773413354%;
- }
- .row-fluid .offset4:first-child {
- margin-left: 34.18803418803419%;
- *margin-left: 34.081651209310785%;
- }
- .row-fluid .offset3 {
- margin-left: 28.205128205128204%;
- *margin-left: 28.0987452264048%;
- }
- .row-fluid .offset3:first-child {
- margin-left: 25.641025641025642%;
- *margin-left: 25.53464266230224%;
- }
- .row-fluid .offset2 {
- margin-left: 19.65811965811966%;
- *margin-left: 19.551736679396257%;
- }
- .row-fluid .offset2:first-child {
- margin-left: 17.094017094017094%;
- *margin-left: 16.98763411529369%;
- }
- .row-fluid .offset1 {
- margin-left: 11.11111111111111%;
- *margin-left: 11.004728132387708%;
- }
- .row-fluid .offset1:first-child {
- margin-left: 8.547008547008547%;
- *margin-left: 8.440625568285142%;
- }
- input,
- textarea,
- .uneditable-input {
- margin-left: 0;
- }
- .controls-row [class*="span"] + [class*="span"] {
- margin-left: 30px;
- }
- input.span12,
- textarea.span12,
- .uneditable-input.span12 {
- width: 1156px;
- }
- input.span11,
- textarea.span11,
- .uneditable-input.span11 {
- width: 1056px;
- }
- input.span10,
- textarea.span10,
- .uneditable-input.span10 {
- width: 956px;
- }
- input.span9,
- textarea.span9,
- .uneditable-input.span9 {
- width: 856px;
- }
- input.span8,
- textarea.span8,
- .uneditable-input.span8 {
- width: 756px;
- }
- input.span7,
- textarea.span7,
- .uneditable-input.span7 {
- width: 656px;
- }
- input.span6,
- textarea.span6,
- .uneditable-input.span6 {
- width: 556px;
- }
- input.span5,
- textarea.span5,
- .uneditable-input.span5 {
- width: 456px;
- }
- input.span4,
- textarea.span4,
- .uneditable-input.span4 {
- width: 356px;
- }
- input.span3,
- textarea.span3,
- .uneditable-input.span3 {
- width: 256px;
- }
- input.span2,
- textarea.span2,
- .uneditable-input.span2 {
- width: 156px;
- }
- input.span1,
- textarea.span1,
- .uneditable-input.span1 {
- width: 56px;
- }
- .thumbnails {
- margin-left: -30px;
- }
- .thumbnails > li {
- margin-left: 30px;
- }
- .row-fluid .thumbnails {
- margin-left: 0;
- }
-}
-
-@media (min-width: 768px) and (max-width: 979px) {
- .row {
- margin-left: -20px;
- *zoom: 1;
- }
- .row:before,
- .row:after {
- display: table;
- line-height: 0;
- content: "";
- }
- .row:after {
- clear: both;
- }
- [class*="span"] {
- float: left;
- min-height: 1px;
- margin-left: 20px;
- }
- .container,
- .navbar-static-top .container,
- .navbar-fixed-top .container,
- .navbar-fixed-bottom .container {
- width: 724px;
- }
- .span12 {
- width: 724px;
- }
- .span11 {
- width: 662px;
- }
- .span10 {
- width: 600px;
- }
- .span9 {
- width: 538px;
- }
- .span8 {
- width: 476px;
- }
- .span7 {
- width: 414px;
- }
- .span6 {
- width: 352px;
- }
- .span5 {
- width: 290px;
- }
- .span4 {
- width: 228px;
- }
- .span3 {
- width: 166px;
- }
- .span2 {
- width: 104px;
- }
- .span1 {
- width: 42px;
- }
- .offset12 {
- margin-left: 764px;
- }
- .offset11 {
- margin-left: 702px;
- }
- .offset10 {
- margin-left: 640px;
- }
- .offset9 {
- margin-left: 578px;
- }
- .offset8 {
- margin-left: 516px;
- }
- .offset7 {
- margin-left: 454px;
- }
- .offset6 {
- margin-left: 392px;
- }
- .offset5 {
- margin-left: 330px;
- }
- .offset4 {
- margin-left: 268px;
- }
- .offset3 {
- margin-left: 206px;
- }
- .offset2 {
- margin-left: 144px;
- }
- .offset1 {
- margin-left: 82px;
- }
- .row-fluid {
- width: 100%;
- *zoom: 1;
- }
- .row-fluid:before,
- .row-fluid:after {
- display: table;
- line-height: 0;
- content: "";
- }
- .row-fluid:after {
- clear: both;
- }
- .row-fluid [class*="span"] {
- display: block;
- float: left;
- width: 100%;
- min-height: 30px;
- margin-left: 2.7624309392265194%;
- *margin-left: 2.709239449864817%;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
- .row-fluid [class*="span"]:first-child {
- margin-left: 0;
- }
- .row-fluid .span12 {
- width: 100%;
- *width: 99.94680851063829%;
- }
- .row-fluid .span11 {
- width: 91.43646408839778%;
- *width: 91.38327259903608%;
- }
- .row-fluid .span10 {
- width: 82.87292817679558%;
- *width: 82.81973668743387%;
- }
- .row-fluid .span9 {
- width: 74.30939226519337%;
- *width: 74.25620077583166%;
- }
- .row-fluid .span8 {
- width: 65.74585635359117%;
- *width: 65.69266486422946%;
- }
- .row-fluid .span7 {
- width: 57.18232044198895%;
- *width: 57.12912895262725%;
- }
- .row-fluid .span6 {
- width: 48.61878453038674%;
- *width: 48.56559304102504%;
- }
- .row-fluid .span5 {
- width: 40.05524861878453%;
- *width: 40.00205712942283%;
- }
- .row-fluid .span4 {
- width: 31.491712707182323%;
- *width: 31.43852121782062%;
- }
- .row-fluid .span3 {
- width: 22.92817679558011%;
- *width: 22.87498530621841%;
- }
- .row-fluid .span2 {
- width: 14.3646408839779%;
- *width: 14.311449394616199%;
- }
- .row-fluid .span1 {
- width: 5.801104972375691%;
- *width: 5.747913483013988%;
- }
- .row-fluid .offset12 {
- margin-left: 105.52486187845304%;
- *margin-left: 105.41847889972962%;
- }
- .row-fluid .offset12:first-child {
- margin-left: 102.76243093922652%;
- *margin-left: 102.6560479605031%;
- }
- .row-fluid .offset11 {
- margin-left: 96.96132596685082%;
- *margin-left: 96.8549429881274%;
- }
- .row-fluid .offset11:first-child {
- margin-left: 94.1988950276243%;
- *margin-left: 94.09251204890089%;
- }
- .row-fluid .offset10 {
- margin-left: 88.39779005524862%;
- *margin-left: 88.2914070765252%;
- }
- .row-fluid .offset10:first-child {
- margin-left: 85.6353591160221%;
- *margin-left: 85.52897613729868%;
- }
- .row-fluid .offset9 {
- margin-left: 79.8342541436464%;
- *margin-left: 79.72787116492299%;
- }
- .row-fluid .offset9:first-child {
- margin-left: 77.07182320441989%;
- *margin-left: 76.96544022569647%;
- }
- .row-fluid .offset8 {
- margin-left: 71.2707182320442%;
- *margin-left: 71.16433525332079%;
- }
- .row-fluid .offset8:first-child {
- margin-left: 68.50828729281768%;
- *margin-left: 68.40190431409427%;
- }
- .row-fluid .offset7 {
- margin-left: 62.70718232044199%;
- *margin-left: 62.600799341718584%;
- }
- .row-fluid .offset7:first-child {
- margin-left: 59.94475138121547%;
- *margin-left: 59.838368402492065%;
- }
- .row-fluid .offset6 {
- margin-left: 54.14364640883978%;
- *margin-left: 54.037263430116376%;
- }
- .row-fluid .offset6:first-child {
- margin-left: 51.38121546961326%;
- *margin-left: 51.27483249088986%;
- }
- .row-fluid .offset5 {
- margin-left: 45.58011049723757%;
- *margin-left: 45.47372751851417%;
- }
- .row-fluid .offset5:first-child {
- margin-left: 42.81767955801105%;
- *margin-left: 42.71129657928765%;
- }
- .row-fluid .offset4 {
- margin-left: 37.01657458563536%;
- *margin-left: 36.91019160691196%;
- }
- .row-fluid .offset4:first-child {
- margin-left: 34.25414364640884%;
- *margin-left: 34.14776066768544%;
- }
- .row-fluid .offset3 {
- margin-left: 28.45303867403315%;
- *margin-left: 28.346655695309746%;
- }
- .row-fluid .offset3:first-child {
- margin-left: 25.69060773480663%;
- *margin-left: 25.584224756083227%;
- }
- .row-fluid .offset2 {
- margin-left: 19.88950276243094%;
- *margin-left: 19.783119783707537%;
- }
- .row-fluid .offset2:first-child {
- margin-left: 17.12707182320442%;
- *margin-left: 17.02068884448102%;
- }
- .row-fluid .offset1 {
- margin-left: 11.32596685082873%;
- *margin-left: 11.219583872105325%;
- }
- .row-fluid .offset1:first-child {
- margin-left: 8.56353591160221%;
- *margin-left: 8.457152932878806%;
- }
- input,
- textarea,
- .uneditable-input {
- margin-left: 0;
- }
- .controls-row [class*="span"] + [class*="span"] {
- margin-left: 20px;
- }
- input.span12,
- textarea.span12,
- .uneditable-input.span12 {
- width: 710px;
- }
- input.span11,
- textarea.span11,
- .uneditable-input.span11 {
- width: 648px;
- }
- input.span10,
- textarea.span10,
- .uneditable-input.span10 {
- width: 586px;
- }
- input.span9,
- textarea.span9,
- .uneditable-input.span9 {
- width: 524px;
- }
- input.span8,
- textarea.span8,
- .uneditable-input.span8 {
- width: 462px;
- }
- input.span7,
- textarea.span7,
- .uneditable-input.span7 {
- width: 400px;
- }
- input.span6,
- textarea.span6,
- .uneditable-input.span6 {
- width: 338px;
- }
- input.span5,
- textarea.span5,
- .uneditable-input.span5 {
- width: 276px;
- }
- input.span4,
- textarea.span4,
- .uneditable-input.span4 {
- width: 214px;
- }
- input.span3,
- textarea.span3,
- .uneditable-input.span3 {
- width: 152px;
- }
- input.span2,
- textarea.span2,
- .uneditable-input.span2 {
- width: 90px;
- }
- input.span1,
- textarea.span1,
- .uneditable-input.span1 {
- width: 28px;
- }
-}
-
-@media (max-width: 767px) {
- body {
- padding-right: 20px;
- padding-left: 20px;
- }
- .navbar-fixed-top,
- .navbar-fixed-bottom,
- .navbar-static-top {
- margin-right: -20px;
- margin-left: -20px;
- }
- .container-fluid {
- padding</