From 58c40c20df06138cef67121301b72246a0a70217 Mon Sep 17 00:00:00 2001 From: Marcelo JĂșnior Date: Fri, 20 May 2016 15:26:34 -0300 Subject: [PATCH] add pairwise vendorized package --- Gemfile | 22 +++++++++++++++------- Gemfile.lock | 67 ++++++++++++++++++++++++++++++++++++++++--------------------------- Rakefile | 5 +++-- config.ru | 5 +++++ config/database.yml | 18 +++--------------- config/environment.rb | 23 +++++++++++++++++++++++ config/initializers/airbrake.rb | 3 --- config/initializers/ruby2.rb | 30 ++++++++++++++++++++++++++++++ config/unicorn.rb | 13 +++++++++++++ public/stylesheets/all.css | 432 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ script/production | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ thin.yml | 15 --------------- vendor/cache/airbrake-3.1.12.gem | Bin 194560 -> 0 bytes vendor/cache/builder-3.0.0.gem | Bin 609280 -> 0 bytes vendor/cache/builder-3.2.2.gem | Bin 0 -> 31744 bytes vendor/cache/daemons-1.1.9.gem | Bin 32768 -> 0 bytes vendor/cache/daemons-1.2.3.gem | Bin 0 -> 24576 bytes vendor/cache/diff-lcs-1.1.3.gem | Bin 41472 -> 0 bytes vendor/cache/diff-lcs-1.2.5.gem | Bin 0 -> 49152 bytes vendor/cache/eventmachine-1.0.3.gem | Bin 225792 -> 0 bytes vendor/cache/ey_config-0.0.6.gem | Bin 6656 -> 0 bytes vendor/cache/ey_config-0.0.7.gem | Bin 0 -> 6656 bytes vendor/cache/hoe-3.15.0.gem | Bin 0 -> 187392 bytes vendor/cache/hoe-3.6.0.gem | Bin 128000 -> 0 bytes vendor/cache/iconv-1.0.4.gem | Bin 0 -> 20480 bytes vendor/cache/json-1.7.7.gem | Bin 148480 -> 0 bytes vendor/cache/json-1.8.3.gem | Bin 0 -> 152064 bytes vendor/cache/kgio-2.10.0.gem | Bin 0 -> 56320 bytes vendor/cache/libxml-ruby-2.2.2.gem | Bin 244736 -> 0 bytes vendor/cache/libxml-ruby-2.8.0.gem | Bin 0 -> 261120 bytes vendor/cache/mini_portile2-2.0.0.gem | Bin 0 -> 18432 bytes vendor/cache/mysql2-0.2.18.gem | Bin 49152 -> 0 bytes vendor/cache/newrelic_rpm-3.15.2.317.gem | Bin 0 -> 738816 bytes vendor/cache/newrelic_rpm-3.5.5.38.gem | Bin 381952 -> 0 bytes vendor/cache/nokogiri-1.5.5.gem | Bin 209920 -> 0 bytes vendor/cache/nokogiri-1.6.7.2.gem | Bin 0 -> 9276928 bytes vendor/cache/raindrops-0.16.0.gem | Bin 0 -> 58368 bytes vendor/cache/rake-0.9.2.2.gem | Bin 111616 -> 0 bytes vendor/cache/rake-11.1.2.gem | Bin 0 -> 129024 bytes vendor/cache/rdoc-3.12.2.gem | Bin 0 -> 326144 bytes vendor/cache/rdoc-3.12.gem | Bin 315904 -> 0 bytes vendor/cache/redis-3.0.1.gem | Bin 58368 -> 0 bytes vendor/cache/redis-3.0.7.gem | Bin 0 -> 67584 bytes vendor/cache/sqlite3-1.3.8.gem | Bin 58880 -> 0 bytes vendor/cache/term-ansicolor-1.0.7.gem | Bin 16896 -> 0 bytes vendor/cache/term-ansicolor-1.3.2.gem | Bin 0 -> 890368 bytes vendor/cache/thin-1.6.1.gem | Bin 58368 -> 0 bytes vendor/cache/tins-1.10.1.gem | Bin 0 -> 301056 bytes vendor/cache/unicorn-5.1.0.gem | Bin 0 -> 211456 bytes vendor/cache/will_paginate-2.3.16.gem | Bin 0 -> 37376 bytes 50 files changed, 649 insertions(+), 69 deletions(-) create mode 100644 config.ru delete mode 100644 config/initializers/airbrake.rb create mode 100644 config/initializers/ruby2.rb create mode 100644 config/unicorn.rb create mode 100644 public/stylesheets/all.css create mode 100755 script/production delete mode 100644 thin.yml delete mode 100644 vendor/cache/airbrake-3.1.12.gem delete mode 100644 vendor/cache/builder-3.0.0.gem create mode 100644 vendor/cache/builder-3.2.2.gem delete mode 100644 vendor/cache/daemons-1.1.9.gem create mode 100644 vendor/cache/daemons-1.2.3.gem delete mode 100644 vendor/cache/diff-lcs-1.1.3.gem create mode 100644 vendor/cache/diff-lcs-1.2.5.gem delete mode 100644 vendor/cache/eventmachine-1.0.3.gem delete mode 100644 vendor/cache/ey_config-0.0.6.gem create mode 100644 vendor/cache/ey_config-0.0.7.gem create mode 100644 vendor/cache/hoe-3.15.0.gem delete mode 100644 vendor/cache/hoe-3.6.0.gem create mode 100644 vendor/cache/iconv-1.0.4.gem delete mode 100644 vendor/cache/json-1.7.7.gem create mode 100644 vendor/cache/json-1.8.3.gem create mode 100644 vendor/cache/kgio-2.10.0.gem delete mode 100644 vendor/cache/libxml-ruby-2.2.2.gem create mode 100644 vendor/cache/libxml-ruby-2.8.0.gem create mode 100644 vendor/cache/mini_portile2-2.0.0.gem delete mode 100644 vendor/cache/mysql2-0.2.18.gem create mode 100644 vendor/cache/newrelic_rpm-3.15.2.317.gem delete mode 100644 vendor/cache/newrelic_rpm-3.5.5.38.gem delete mode 100644 vendor/cache/nokogiri-1.5.5.gem create mode 100644 vendor/cache/nokogiri-1.6.7.2.gem create mode 100644 vendor/cache/raindrops-0.16.0.gem delete mode 100644 vendor/cache/rake-0.9.2.2.gem create mode 100644 vendor/cache/rake-11.1.2.gem create mode 100644 vendor/cache/rdoc-3.12.2.gem delete mode 100644 vendor/cache/rdoc-3.12.gem delete mode 100644 vendor/cache/redis-3.0.1.gem create mode 100644 vendor/cache/redis-3.0.7.gem delete mode 100644 vendor/cache/sqlite3-1.3.8.gem delete mode 100644 vendor/cache/term-ansicolor-1.0.7.gem create mode 100644 vendor/cache/term-ansicolor-1.3.2.gem delete mode 100644 vendor/cache/thin-1.6.1.gem create mode 100644 vendor/cache/tins-1.10.1.gem create mode 100644 vendor/cache/unicorn-5.1.0.gem create mode 100644 vendor/cache/will_paginate-2.3.16.gem diff --git a/Gemfile b/Gemfile index be1aad0..0d99397 100644 --- a/Gemfile +++ b/Gemfile @@ -1,17 +1,24 @@ #source :rubygems -source 'https://www.rubygems.org' -source "http://gems.github.com" +#source 'https://www.rubygems.org' +#source "http://gems.github.com" +source "https://rubygems.org" -gem 'thin' +gem 'will_paginate', '~> 2.3.16' +gem 'unicorn' +gem 'iconv' +#gem 'thin' #gem 'postgres', '~> 0.8.1' #gem 'activerecord-pg-adapter' gem 'pg', '~> 0.17.1' gem 'activerecord-postgresql-adapter' -gem "rake", "~> 0.9.2.2" +#gem "rake", "~> 0.9.2.2" +gem "rake", "~> 11.1.2" gem "rdoc", "~> 3.12" gem "rails", "2.3.18" -gem "airbrake", :require => 'airbrake/rails' -gem "libxml-ruby", "2.2.2", :require => "libxml" +#gem "airbrake", :require => 'airbrake/rails' +#gem "airbrake" +#gem "libxml-ruby", "2.2.2", :require => "libxml" +gem "libxml-ruby", "2.8.0", :require => "libxml" gem "ambethia-smtp-tls", "1.1.2", :require => "smtp-tls" gem "paperclip", "2.3.1" gem "mime-types", "1.16", @@ -21,7 +28,8 @@ gem "xml-simple", "1.0.12", gem "yfactorial-utility_scopes", "0.2.2", :require => "utility_scopes" gem "formtastic", "~> 0.2.2" -gem "inherited_resources", "1.0.4" +#gem "inherited_resources", "1.0.4" +gem "inherited_resources" gem "has_scope", "0.4.2" gem "responders", "0.4.8" gem "thoughtbot-clearance", "0.8.2", diff --git a/Gemfile.lock b/Gemfile.lock index 7fea913..8e22b92 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,5 +1,5 @@ GEM - remote: https://www.rubygems.org/ + remote: https://rubygems.org/ specs: actionmailer (2.3.18) actionpack (= 2.3.18) @@ -8,15 +8,13 @@ GEM rack (~> 1.1.0) activerecord (2.3.18) activesupport (= 2.3.18) + activerecord-postgresql-adapter (0.0.1) + pg activeresource (2.3.18) activesupport (= 2.3.18) activesupport (2.3.18) - airbrake (3.1.12) - activesupport - builder - json ambethia-smtp-tls (1.1.2) - builder (3.0.0) + builder (3.2.2) cucumber (1.1.0) builder (>= 2.1.2) diff-lcs (>= 1.1.2) @@ -25,11 +23,11 @@ GEM term-ansicolor (>= 1.0.6) cucumber-rails (0.3.2) cucumber (>= 0.8.0) - daemons (1.1.9) + daemons (1.2.3) delayed_job (2.0.6) daemons - diff-lcs (1.1.3) - ey_config (0.0.6) + diff-lcs (1.2.5) + ey_config (0.0.7) factory_girl (1.2.3) fakeweb (1.2.5) fastercsv (1.5.1) @@ -37,23 +35,27 @@ GEM gherkin (2.5.4) json (>= 1.4.6) has_scope (0.4.2) - hoe (3.6.0) - rake (>= 0.8, < 11.0) + hoe (3.15.0) + rake (>= 0.8, < 12.0) + iconv (1.0.4) inherited_resources (1.0.4) has_scope (~> 0.4.2) responders (~> 0.4.3) jferris-mocha (0.9.5.0.1241126838) rake - json (1.7.7) + json (1.8.3) json_pure (1.4.6) jtrupiano-timecop (0.2.1) - libxml-ruby (2.2.2) + kgio (2.10.0) + libxml-ruby (2.8.0) mime-types (1.16) + mini_portile2 (2.0.0) mock_redis (0.4.1) - mysql2 (0.2.18) - newrelic_rpm (3.5.5.38) - nokogiri (1.5.5) + newrelic_rpm (3.15.2.317) + nokogiri (1.6.7.2) + mini_portile2 (~> 2.0.0.rc2) paperclip (2.3.1) + pg (0.17.1) rack (1.1.6) rails (2.3.18) actionmailer (= 2.3.18) @@ -62,10 +64,11 @@ GEM activeresource (= 2.3.18) activesupport (= 2.3.18) rake (>= 0.8.3) - rake (0.9.2.2) - rdoc (3.12) + raindrops (0.16.0) + rake (11.1.2) + rdoc (3.12.2) json (~> 1.4) - redis (3.0.1) + redis (3.0.7) responders (0.4.8) rspec (1.3.2) rspec-rails (1.3.4) @@ -76,14 +79,19 @@ GEM activesupport sendgrid (0.1.4) shoulda (2.10.3) - sqlite3 (1.3.8) - term-ansicolor (1.0.7) + term-ansicolor (1.3.2) + tins (~> 1.0) test-unit (1.2.3) hoe (>= 1.5.1) thoughtbot-clearance (0.8.2) + tins (1.10.1) + unicorn (5.1.0) + kgio (~> 2.6) + raindrops (~> 0.7) webrat (0.5.3) nokogiri (>= 1.2.0) rack (>= 1.0) + will_paginate (2.3.16) xml-simple (1.0.12) yfactorial-utility_scopes (0.2.2) activerecord (>= 2.1.0) @@ -92,7 +100,7 @@ PLATFORMS ruby DEPENDENCIES - airbrake + activerecord-postgresql-adapter ambethia-smtp-tls (= 1.1.2) cucumber (= 1.1.0) cucumber-rails (= 0.3.2) @@ -103,18 +111,19 @@ DEPENDENCIES fastercsv (= 1.5.1) formtastic (~> 0.2.2) has_scope (= 0.4.2) - inherited_resources (= 1.0.4) + iconv + inherited_resources jferris-mocha (= 0.9.5.0.1241126838) json_pure (= 1.4.6) jtrupiano-timecop (= 0.2.1) - libxml-ruby (= 2.2.2) + libxml-ruby (= 2.8.0) mime-types (= 1.16) mock_redis (= 0.4.1) - mysql2 (= 0.2.18) newrelic_rpm paperclip (= 2.3.1) + pg (~> 0.17.1) rails (= 2.3.18) - rake (~> 0.9.2.2) + rake (~> 11.1.2) rdoc (~> 3.12) redis (~> 3.0.1) responders (= 0.4.8) @@ -123,9 +132,13 @@ DEPENDENCIES rubaidh-google_analytics (= 1.1.4) sendgrid (= 0.1.4) shoulda (~> 2.10.1) - sqlite3 test-unit (= 1.2.3) thoughtbot-clearance (= 0.8.2) + unicorn webrat (= 0.5.3) + will_paginate (~> 2.3.16) xml-simple (= 1.0.12) yfactorial-utility_scopes (= 0.2.2) + +BUNDLED WITH + 1.12.4 diff --git a/Rakefile b/Rakefile index 507ab47..66fb4b3 100644 --- a/Rakefile +++ b/Rakefile @@ -5,11 +5,12 @@ require(File.join(File.dirname(__FILE__), 'config', 'boot')) require 'rake' require 'rake/testtask' -require 'rdoc/task' +#require 'rdoc/task' +require 'rake/task' require 'tasks/rails' -task :default => [:test, :features] +#task :default => [:test, :features] begin require 'delayed/tasks' diff --git a/config.ru b/config.ru new file mode 100644 index 0000000..5032ce3 --- /dev/null +++ b/config.ru @@ -0,0 +1,5 @@ +# Require your environment file to bootstrap Rails +require ::File.dirname(__FILE__) + '/config/environment' + +# Dispatch the request +run ActionController::Dispatcher.new diff --git a/config/database.yml b/config/database.yml index 4abb3a6..79c1e70 100644 --- a/config/database.yml +++ b/config/database.yml @@ -1,21 +1,9 @@ -# SQLite version 3.x -# gem install sqlite3-ruby (not necessary on OS X Leopard) - -development: &default +production: &default adapter: postgresql database: pairwise_dev pool: 5 timeout: 5000 username: pairwise - password: pairwise - port: 5434 + password: pairwise@123 + port: 5432 host: 127.0.0.1 -test: &test - adapter: sqlite3 - database: db/test.sqlite3 - -production: - <<: *default -cucumber: - <<: *test - diff --git a/config/environment.rb b/config/environment.rb index c467462..a9b27e5 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,3 +1,5 @@ +ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] + # Be sure to restart your server when you modify this file Encoding.default_external = Encoding.default_internal = Encoding::UTF_8 if defined? Encoding @@ -7,6 +9,27 @@ RAILS_GEM_VERSION = '2.3.18' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') +if RUBY_VERSION >= '2.0.0' + module Gem + def self.source_index + sources + end + + def self.cache + sources + end + + SourceIndex = Specification + + class SourceList + #If you want vendor gems, this is where to start writing code. + def search(*args); []; end + def each(&block); end + include Enumerable + end + end + end + Rails::Initializer.run do |config| # Settings in config/environments/* take precedence over those specified here. diff --git a/config/initializers/airbrake.rb b/config/initializers/airbrake.rb deleted file mode 100644 index 34b700f..0000000 --- a/config/initializers/airbrake.rb +++ /dev/null @@ -1,3 +0,0 @@ -Airbrake.configure do |config| - config.api_key = ENV['PAIRWISE_AIRBRAKE_API_KEY'] -end diff --git a/config/initializers/ruby2.rb b/config/initializers/ruby2.rb new file mode 100644 index 0000000..c1f9202 --- /dev/null +++ b/config/initializers/ruby2.rb @@ -0,0 +1,30 @@ +if Rails::VERSION::MAJOR == 2 && RUBY_VERSION >= '2.0.0' + module ActiveRecord + module Associations + class AssociationProxy + def send(method, *args) + if proxy_respond_to?(method, true) + super + else + load_target + @target.send(method, *args) + end + end + end + end + end + + module I18n + module Backend + module Base + def load_file(filename) + type = File.extname(filename).tr('.', '').downcase + # As a fix added second argument as true to respond_to? method + raise UnknownFileType.new(type, filename) unless respond_to?(:"load_#{type}", true) + data = send(:"load_#{type}", filename) # TODO raise a meaningful exception if this does not yield a Hash + data.each { |locale, d| store_translations(locale, d) } + end + end + end + end +end diff --git a/config/unicorn.rb b/config/unicorn.rb new file mode 100644 index 0000000..f103d4e --- /dev/null +++ b/config/unicorn.rb @@ -0,0 +1,13 @@ +listen "0.0.0.0:3030" +pid 'tmp/pids/unicorn.pid' + +preload_app true +GC.respond_to?(:copy_on_write_friendly=) and GC.copy_on_write_friendly = true + +before_fork do |server, worker| + ActiveRecord::Base.connection.disconnect! if defined?(ActiveRecord::Base) +end + +after_fork do |server, worker| + ActiveRecord::Base.establish_connection if defined?(ActiveRecord::Base) +end diff --git a/public/stylesheets/all.css b/public/stylesheets/all.css new file mode 100644 index 0000000..b892188 --- /dev/null +++ b/public/stylesheets/all.css @@ -0,0 +1,432 @@ +/* http://meyerweb.com/eric/tools/css/reset/ */ +/* v1.0 | 20080212 */ + +html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, +blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, +font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, +b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, +caption, tbody, tfoot, thead, tr, th, td { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-size: 100%; + vertical-align: baseline; + background: transparent; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} + +/* remember to define focus styles! */ +:focus { + outline: 0; +} + +/* remember to highlight inserts somehow! */ +ins { + text-decoration: none; +} +del { + text-decoration: line-through; +} + +/* tables still need 'cellspacing="0"' in the markup */ +table { + border-collapse: collapse; + border-spacing: 0; +} + + +body { + color: #222; + font-size: 13px; + font-family: arial, "Helvetica Neue", "Lucida Grande", Helvetica, Arial, Verdana, sans-serif; +} + +h1, h2, h3, h4, h5, h6 { + color: #111; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +/* Success, error & notice boxes for messages and errors. */ +div.error, div.notice, div.success { + padding: .8em; + margin-bottom: 1em; + border: 1px solid #ddd; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; +} +div.error { + background: #FBE3E4; + color: #D12F19; + border-color: #FBC2C4; +} +div.error a { color: #D12F19; } + +div.notice { + background: #FFF6BF; + color: #817134; + border-color: #FFD324; +} +div.notice a { color: #817134; } + +div.success { + background: #E6EFC2; + color: #529214; + border-color: #C6D880; +} +div.success a { color: #529214; } + +/* Misc classes and elements */ + +/* Use a .box to create a padded box inside a column. */ +.box { + padding: 1.5em; + margin-bottom: 1.5em; + background: #eee; +} + +/* Use this to create a horizontal ruler across a column. */ +hr { + background: #ddd; + color: #ddd; + clear: both; + float: none; + width: 100%; + height: 1px; + margin: 0 0 1.4em; + border: none; +} +hr.space { + background: #fff; + color: #fff; +} + +/* Clearfix hack I love you */ +.clearfix:after { + content:"."; + display:block; + height:0; + clear:both; + visibility:hidden; +} + +.clearfix {display:inline-block;} +/* Hide from IE Mac \*/ +.clearfix {display:block;} +/* End hide from IE Mac */ + + +/* Headings */ + +h1, h2, h3, h4, h5, h6 { font-weight: bold; } + +h1 { + font-size: 2.2em; + line-height: 1; + margin-bottom: 0.25em; +} +h2 { + font-size: 1.6em; + margin-bottom: 0.25em; + line-height: 1.1; +} +h3 { + font-size: 1.3em; + line-height: 1; + margin-bottom: .25em; +} +h4 { + font-size: 1.1em; + line-height: 1.25; + margin-bottom: .25em; +} +h5 { + font-size: 1em; + margin-bottom: .25em; +} +h6 { + font-size: 1em; + margin-bottom: .25em; +} + +/* Text elements */ + +p.last { margin-bottom: 0; } +p img { + float: left; + margin: 1.5em 1.5em 1.5em 0; + padding: 0; +} +p img.top { margin-top: 0; } /* Use this if the image is at the top of the

. */ +img { margin: 0 0 1.5em; } + +abbr, acronym { + border-bottom: 1px dotted #666; + cursor: help; +} +address { + margin-top: 1.5em; + font-style: italic; +} +del { color:#666; } + +a, a:link { + color: #1a4882; + text-decoration: underline; +} +a:visited { color: #1a4882; } +a:hover { color: #052246; } +a:active, a:focus { color: #1a4882; } + +blockquote { + margin: 1.5em 0; + color: #666; + font-style: italic; + padding-left: 1em; + border-left: 4px solid #d1d1d1; +} +strong { font-weight: bold; } +em, dfn { font-style: italic; } +dfn { font-weight: bold; } +pre, code { + margin: 1.5em 0; + white-space: pre; +} +pre, code, tt { + font: 1em 'andale mono', 'monotype.com', 'lucida console', monospace; + line-height: 1.5; +} +pre.code { + background: #000; + color: #fff; + padding: 20px; +} +tt { + display: block; + margin: 1.5em 0; + line-height: 1.5; +} + + +/* Forms */ + +form ol { + list-style: none; + margin: 0 0 1em 0; +} +form ol ol { margin-left: 0; } +form ol li { margin: 0 0 1em 0; } +form ol ol li { margin: 0 0 .25em 0; } + +form ol li.error input { background: #FBE3E4; } +p.inline-errors { color: #D12F19; } +form ol li.file { + background: #e1e1e1; + border: 1px solid #c8c8c8; + padding: 10px; +} + +form abbr { border-bottom: 0; } + +label { display: block; } +.required label { font-weight: bold; } +.checkbox_field label, .radio_field label { font-weight: normal; } + +a.cancel { color: #7d0d0d; } +.inline-hints { + font-size: .8em; + color: #666; + margin-bottom: .25em; +} + +/* Fieldsets */ +fieldset { + margin: 0 0 1.5em 0; + background: #f1f1f1; + padding: 1.5em 1.5em 1em 1.5em; + border: 1px solid #e3e3e3; +} +fieldset fieldset, fieldset fieldset fieldset { + padding: 0; + border: 0; +} +legend { font-weight: bold; } +fieldset.buttons { + background: inherit; + border: 0; + padding: 0; +} +fieldset.buttons li { display: inline; } +.radio fieldset { + padding: 0; + margin: 0; +} + +/* Text fields */ +input[type="text"], input[type="password"] { + width: 300px; + padding: 3px 2px; + font-size: inherit; +} +input[disabled='disabled'] { + background-color: #fcfcfc; + cursor:default; +} +input[type="checkbox"] { + margin: 0 3px 0 0; + vertical-align: middle; + position: relative; + top: -2px; +} +input[type="radio"] { + margin: 0 3px 0 0; + vertical-align: middle; + position: relative; + top: -2px; +} +.check_boxes label { + vertical-align: middle; + padding: 0; + display: inline; +} +.radio label { padding: 0; } + +/* Textareas */ +textarea { + width: 440px; + height: 200px; + margin: 0 0.5em 0.5em 0; + padding: 5px; + font-size: inherit; +} + +/* Select fields */ +fieldset .select select { + width:200px; + font-size: .9em; +} +optgroup { margin: 0 0 .5em 0; } + +/* Date & Time */ +form ol li.date ol li, form ol li.time ol li { + display: inline; +} +form ol li.datetime ol li { + display: inline-block; +} +form ol li.datetime select, form ol li.date select, form ol li.time select { + display: inline; + width: auto; +} +form ol li.date label, form ol li.time label { + display: none; +} + + +/* Tables */ + +table { + margin-bottom: 2em; + width: 100%; +} +th { + border-bottom: 2px solid #ccc; + font-weight: bold; + text-align: left; +} +td { border-bottom: 1px solid #ddd; } +caption, th, td { + padding: 4px 10px 4px 0; +} +caption { + background: #f1f1f1; + padding: 10px 0; + margin-bottom: 1em; +} + +/* Use this if you use span-x classes on th/td. */ +table .last { padding-right: 0; } + + +/* Lists */ + +ul, ol { + margin-bottom: 1.5em; + list-style-position: inside; +} +ul { list-style-type: disc; } +ol { list-style-type: decimal; } + +dl { + margin-bottom: 1.5em; + line-height: 1.4; +} +dl dt { + font-weight: bold; + margin-top: .5em; +} +dl dd { margin-bottom: 0em;} +dd { margin-left: .5em; } + +li { line-height: 1.4; } + +ol ol, ol ul, ul ul, ul ol { + margin-left: 1em; +} + + + + +body { + background-color: #dadada; } + +.content { + background: #fff; + padding: 40px; + margin: 40px auto; + width: 880px; + -moz-border-radius: 24px; + -webkit-border-radius: 24px; } + +/* flash color */ + +#flash_success { + background: seagreen; } +#flash_failure { + color: beige; + background: firebrick; } +#flash_notice { + color: snow; + background: dimgray; } + +/* flashes spacing */ + +#flash { + margin-bottom: 0.6em; } + +#flash_notice, #flash_success, #flash_failure, #errorExplanation ul li { + padding: 0.6em; } + +/* flash scale */ + +#flash_notice, #flash_success, #flash_failure, #errorExplanation ul li { + font-size: 1.6em; } + +/* flash weighting */ + +#flash_notice, #flash_success, #flash_failure, #errorExplanation ul li { + font-weight: bold; } + diff --git a/script/production b/script/production new file mode 100755 index 0000000..796daf7 --- /dev/null +++ b/script/production @@ -0,0 +1,85 @@ +#!/bin/sh + +set -e + +TIMEOUT=60 + +export RAILS_ENV=production + +ACTION="$1" +if [ -z "$ACTION" ]; then + echo "usage: $0 start|stop|restart" + exit 1 +fi + +app_server_start() { + ruby -S bundle exec unicorn_rails \ + --config-file config/unicorn.rb \ + --env "$RAILS_ENV" \ + --daemonize +} + +app_server_stop() { + kill -s QUIT $(cat tmp/pids/unicorn.pid) +} + +app_server_restart() { + kill -s USR2 $(cat tmp/pids/unicorn.pid) + sleep 5 + kill -s QUIT $(cat tmp/pids/unicorn.pid.oldbin) +} + +do_start() { + app_server_start +} + +do_stop() { + app_server_stop || stop_via_pid_file tmp/pids/unicorn.pid +} + +do_restart() { + app_server_restart +} + +stop_via_pid_file() { + for pidfile in $@; do + if [ -e "$pidfile" ]; then + pid=$(cat $pidfile) + echo "Sentign TERM signal to stop $pid ..." + kill -TERM "$pid" + rm -f $pidfile + fi + done +} + +do_running() { + pids=$(sed "s/.*/& /" tmp/pids/unicorn.pid 2>/dev/null | tr -d '\n') + kill -0 $pids > /dev/null 2>&1 +} + +case "$ACTION" in + start|stop) + do_$ACTION + ;; + + run) + do_start + echo "=> Running in production mode. Hit ctrl-C to stop." + trap do_stop INT TERM + tail -n 0 -f log/production.log || true + ;; + + restart) + do_restart + ;; + + running) + do_running + ;; + + *) + echo "usage: $0 start|stop|restart" + exit 1 + ;; +esac + diff --git a/thin.yml b/thin.yml deleted file mode 100644 index 72ff26b..0000000 --- a/thin.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -pid: tmp/pids/thin.pid -address: 0.0.0.0 -timeout: 30 -#wait: 30 -port: 5030 -log: log/thin.log -max_conns: 1024 -require: [] - -environment: production -max_persistent_conns: 512 -servers: 4 -daemonize: true - diff --git a/vendor/cache/airbrake-3.1.12.gem b/vendor/cache/airbrake-3.1.12.gem deleted file mode 100644 index 627d199..0000000 Binary files a/vendor/cache/airbrake-3.1.12.gem and /dev/null differ diff --git a/vendor/cache/builder-3.0.0.gem b/vendor/cache/builder-3.0.0.gem deleted file mode 100644 index a2c6d16..0000000 Binary files a/vendor/cache/builder-3.0.0.gem and /dev/null differ diff --git a/vendor/cache/builder-3.2.2.gem b/vendor/cache/builder-3.2.2.gem new file mode 100644 index 0000000..b59ef92 Binary files /dev/null and b/vendor/cache/builder-3.2.2.gem differ diff --git a/vendor/cache/daemons-1.1.9.gem b/vendor/cache/daemons-1.1.9.gem deleted file mode 100644 index 8a64804..0000000 Binary files a/vendor/cache/daemons-1.1.9.gem and /dev/null differ diff --git a/vendor/cache/daemons-1.2.3.gem b/vendor/cache/daemons-1.2.3.gem new file mode 100644 index 0000000..eacd28c Binary files /dev/null and b/vendor/cache/daemons-1.2.3.gem differ diff --git a/vendor/cache/diff-lcs-1.1.3.gem b/vendor/cache/diff-lcs-1.1.3.gem deleted file mode 100644 index 8767f39..0000000 Binary files a/vendor/cache/diff-lcs-1.1.3.gem and /dev/null differ diff --git a/vendor/cache/diff-lcs-1.2.5.gem b/vendor/cache/diff-lcs-1.2.5.gem new file mode 100644 index 0000000..e4436cc Binary files /dev/null and b/vendor/cache/diff-lcs-1.2.5.gem differ diff --git a/vendor/cache/eventmachine-1.0.3.gem b/vendor/cache/eventmachine-1.0.3.gem deleted file mode 100644 index ca7ddbb..0000000 Binary files a/vendor/cache/eventmachine-1.0.3.gem and /dev/null differ diff --git a/vendor/cache/ey_config-0.0.6.gem b/vendor/cache/ey_config-0.0.6.gem deleted file mode 100644 index f5ddf95..0000000 Binary files a/vendor/cache/ey_config-0.0.6.gem and /dev/null differ diff --git a/vendor/cache/ey_config-0.0.7.gem b/vendor/cache/ey_config-0.0.7.gem new file mode 100644 index 0000000..d1cb10c Binary files /dev/null and b/vendor/cache/ey_config-0.0.7.gem differ diff --git a/vendor/cache/hoe-3.15.0.gem b/vendor/cache/hoe-3.15.0.gem new file mode 100644 index 0000000..637c4ff Binary files /dev/null and b/vendor/cache/hoe-3.15.0.gem differ diff --git a/vendor/cache/hoe-3.6.0.gem b/vendor/cache/hoe-3.6.0.gem deleted file mode 100644 index e064deb..0000000 Binary files a/vendor/cache/hoe-3.6.0.gem and /dev/null differ diff --git a/vendor/cache/iconv-1.0.4.gem b/vendor/cache/iconv-1.0.4.gem new file mode 100644 index 0000000..e9e7171 Binary files /dev/null and b/vendor/cache/iconv-1.0.4.gem differ diff --git a/vendor/cache/json-1.7.7.gem b/vendor/cache/json-1.7.7.gem deleted file mode 100644 index db6f006..0000000 Binary files a/vendor/cache/json-1.7.7.gem and /dev/null differ diff --git a/vendor/cache/json-1.8.3.gem b/vendor/cache/json-1.8.3.gem new file mode 100644 index 0000000..6474a4f Binary files /dev/null and b/vendor/cache/json-1.8.3.gem differ diff --git a/vendor/cache/kgio-2.10.0.gem b/vendor/cache/kgio-2.10.0.gem new file mode 100644 index 0000000..92607d2 Binary files /dev/null and b/vendor/cache/kgio-2.10.0.gem differ diff --git a/vendor/cache/libxml-ruby-2.2.2.gem b/vendor/cache/libxml-ruby-2.2.2.gem deleted file mode 100644 index 8013660..0000000 Binary files a/vendor/cache/libxml-ruby-2.2.2.gem and /dev/null differ diff --git a/vendor/cache/libxml-ruby-2.8.0.gem b/vendor/cache/libxml-ruby-2.8.0.gem new file mode 100644 index 0000000..5600e5a Binary files /dev/null and b/vendor/cache/libxml-ruby-2.8.0.gem differ diff --git a/vendor/cache/mini_portile2-2.0.0.gem b/vendor/cache/mini_portile2-2.0.0.gem new file mode 100644 index 0000000..03f6246 Binary files /dev/null and b/vendor/cache/mini_portile2-2.0.0.gem differ diff --git a/vendor/cache/mysql2-0.2.18.gem b/vendor/cache/mysql2-0.2.18.gem deleted file mode 100644 index 0b82bb2..0000000 Binary files a/vendor/cache/mysql2-0.2.18.gem and /dev/null differ diff --git a/vendor/cache/newrelic_rpm-3.15.2.317.gem b/vendor/cache/newrelic_rpm-3.15.2.317.gem new file mode 100644 index 0000000..9d63686 Binary files /dev/null and b/vendor/cache/newrelic_rpm-3.15.2.317.gem differ diff --git a/vendor/cache/newrelic_rpm-3.5.5.38.gem b/vendor/cache/newrelic_rpm-3.5.5.38.gem deleted file mode 100644 index 097491b..0000000 Binary files a/vendor/cache/newrelic_rpm-3.5.5.38.gem and /dev/null differ diff --git a/vendor/cache/nokogiri-1.5.5.gem b/vendor/cache/nokogiri-1.5.5.gem deleted file mode 100644 index 9f556d5..0000000 Binary files a/vendor/cache/nokogiri-1.5.5.gem and /dev/null differ diff --git a/vendor/cache/nokogiri-1.6.7.2.gem b/vendor/cache/nokogiri-1.6.7.2.gem new file mode 100644 index 0000000..aa77f2a Binary files /dev/null and b/vendor/cache/nokogiri-1.6.7.2.gem differ diff --git a/vendor/cache/raindrops-0.16.0.gem b/vendor/cache/raindrops-0.16.0.gem new file mode 100644 index 0000000..17ce685 Binary files /dev/null and b/vendor/cache/raindrops-0.16.0.gem differ diff --git a/vendor/cache/rake-0.9.2.2.gem b/vendor/cache/rake-0.9.2.2.gem deleted file mode 100644 index f7239ac..0000000 Binary files a/vendor/cache/rake-0.9.2.2.gem and /dev/null differ diff --git a/vendor/cache/rake-11.1.2.gem b/vendor/cache/rake-11.1.2.gem new file mode 100644 index 0000000..a04ab6d Binary files /dev/null and b/vendor/cache/rake-11.1.2.gem differ diff --git a/vendor/cache/rdoc-3.12.2.gem b/vendor/cache/rdoc-3.12.2.gem new file mode 100644 index 0000000..5e24525 Binary files /dev/null and b/vendor/cache/rdoc-3.12.2.gem differ diff --git a/vendor/cache/rdoc-3.12.gem b/vendor/cache/rdoc-3.12.gem deleted file mode 100644 index 0c21498..0000000 Binary files a/vendor/cache/rdoc-3.12.gem and /dev/null differ diff --git a/vendor/cache/redis-3.0.1.gem b/vendor/cache/redis-3.0.1.gem deleted file mode 100644 index d5d78be..0000000 Binary files a/vendor/cache/redis-3.0.1.gem and /dev/null differ diff --git a/vendor/cache/redis-3.0.7.gem b/vendor/cache/redis-3.0.7.gem new file mode 100644 index 0000000..4b7a17c Binary files /dev/null and b/vendor/cache/redis-3.0.7.gem differ diff --git a/vendor/cache/sqlite3-1.3.8.gem b/vendor/cache/sqlite3-1.3.8.gem deleted file mode 100644 index b87669a..0000000 Binary files a/vendor/cache/sqlite3-1.3.8.gem and /dev/null differ diff --git a/vendor/cache/term-ansicolor-1.0.7.gem b/vendor/cache/term-ansicolor-1.0.7.gem deleted file mode 100644 index 018f094..0000000 Binary files a/vendor/cache/term-ansicolor-1.0.7.gem and /dev/null differ diff --git a/vendor/cache/term-ansicolor-1.3.2.gem b/vendor/cache/term-ansicolor-1.3.2.gem new file mode 100644 index 0000000..0050cbd Binary files /dev/null and b/vendor/cache/term-ansicolor-1.3.2.gem differ diff --git a/vendor/cache/thin-1.6.1.gem b/vendor/cache/thin-1.6.1.gem deleted file mode 100644 index 63d9b7e..0000000 Binary files a/vendor/cache/thin-1.6.1.gem and /dev/null differ diff --git a/vendor/cache/tins-1.10.1.gem b/vendor/cache/tins-1.10.1.gem new file mode 100644 index 0000000..e4d8914 Binary files /dev/null and b/vendor/cache/tins-1.10.1.gem differ diff --git a/vendor/cache/unicorn-5.1.0.gem b/vendor/cache/unicorn-5.1.0.gem new file mode 100644 index 0000000..1413930 Binary files /dev/null and b/vendor/cache/unicorn-5.1.0.gem differ diff --git a/vendor/cache/will_paginate-2.3.16.gem b/vendor/cache/will_paginate-2.3.16.gem new file mode 100644 index 0000000..f880148 Binary files /dev/null and b/vendor/cache/will_paginate-2.3.16.gem differ -- libgit2 0.21.2