Commit 58c40c20df06138cef67121301b72246a0a70217
1 parent
5c18a693
Exists in
production-vendorized
add pairwise vendorized package
Showing
50 changed files
with
649 additions
and
69 deletions
Show diff stats
Gemfile
1 | #source :rubygems | 1 | #source :rubygems |
2 | -source 'https://www.rubygems.org' | ||
3 | -source "http://gems.github.com" | 2 | +#source 'https://www.rubygems.org' |
3 | +#source "http://gems.github.com" | ||
4 | +source "https://rubygems.org" | ||
4 | 5 | ||
5 | -gem 'thin' | 6 | +gem 'will_paginate', '~> 2.3.16' |
7 | +gem 'unicorn' | ||
8 | +gem 'iconv' | ||
9 | +#gem 'thin' | ||
6 | #gem 'postgres', '~> 0.8.1' | 10 | #gem 'postgres', '~> 0.8.1' |
7 | #gem 'activerecord-pg-adapter' | 11 | #gem 'activerecord-pg-adapter' |
8 | gem 'pg', '~> 0.17.1' | 12 | gem 'pg', '~> 0.17.1' |
9 | gem 'activerecord-postgresql-adapter' | 13 | gem 'activerecord-postgresql-adapter' |
10 | -gem "rake", "~> 0.9.2.2" | 14 | +#gem "rake", "~> 0.9.2.2" |
15 | +gem "rake", "~> 11.1.2" | ||
11 | gem "rdoc", "~> 3.12" | 16 | gem "rdoc", "~> 3.12" |
12 | gem "rails", "2.3.18" | 17 | gem "rails", "2.3.18" |
13 | -gem "airbrake", :require => 'airbrake/rails' | ||
14 | -gem "libxml-ruby", "2.2.2", :require => "libxml" | 18 | +#gem "airbrake", :require => 'airbrake/rails' |
19 | +#gem "airbrake" | ||
20 | +#gem "libxml-ruby", "2.2.2", :require => "libxml" | ||
21 | +gem "libxml-ruby", "2.8.0", :require => "libxml" | ||
15 | gem "ambethia-smtp-tls", "1.1.2", :require => "smtp-tls" | 22 | gem "ambethia-smtp-tls", "1.1.2", :require => "smtp-tls" |
16 | gem "paperclip", "2.3.1" | 23 | gem "paperclip", "2.3.1" |
17 | gem "mime-types", "1.16", | 24 | gem "mime-types", "1.16", |
@@ -21,7 +28,8 @@ gem "xml-simple", "1.0.12", | @@ -21,7 +28,8 @@ gem "xml-simple", "1.0.12", | ||
21 | gem "yfactorial-utility_scopes", "0.2.2", | 28 | gem "yfactorial-utility_scopes", "0.2.2", |
22 | :require => "utility_scopes" | 29 | :require => "utility_scopes" |
23 | gem "formtastic", "~> 0.2.2" | 30 | gem "formtastic", "~> 0.2.2" |
24 | -gem "inherited_resources", "1.0.4" | 31 | +#gem "inherited_resources", "1.0.4" |
32 | +gem "inherited_resources" | ||
25 | gem "has_scope", "0.4.2" | 33 | gem "has_scope", "0.4.2" |
26 | gem "responders", "0.4.8" | 34 | gem "responders", "0.4.8" |
27 | gem "thoughtbot-clearance", "0.8.2", | 35 | gem "thoughtbot-clearance", "0.8.2", |
Gemfile.lock
1 | GEM | 1 | GEM |
2 | - remote: https://www.rubygems.org/ | 2 | + remote: https://rubygems.org/ |
3 | specs: | 3 | specs: |
4 | actionmailer (2.3.18) | 4 | actionmailer (2.3.18) |
5 | actionpack (= 2.3.18) | 5 | actionpack (= 2.3.18) |
@@ -8,15 +8,13 @@ GEM | @@ -8,15 +8,13 @@ GEM | ||
8 | rack (~> 1.1.0) | 8 | rack (~> 1.1.0) |
9 | activerecord (2.3.18) | 9 | activerecord (2.3.18) |
10 | activesupport (= 2.3.18) | 10 | activesupport (= 2.3.18) |
11 | + activerecord-postgresql-adapter (0.0.1) | ||
12 | + pg | ||
11 | activeresource (2.3.18) | 13 | activeresource (2.3.18) |
12 | activesupport (= 2.3.18) | 14 | activesupport (= 2.3.18) |
13 | activesupport (2.3.18) | 15 | activesupport (2.3.18) |
14 | - airbrake (3.1.12) | ||
15 | - activesupport | ||
16 | - builder | ||
17 | - json | ||
18 | ambethia-smtp-tls (1.1.2) | 16 | ambethia-smtp-tls (1.1.2) |
19 | - builder (3.0.0) | 17 | + builder (3.2.2) |
20 | cucumber (1.1.0) | 18 | cucumber (1.1.0) |
21 | builder (>= 2.1.2) | 19 | builder (>= 2.1.2) |
22 | diff-lcs (>= 1.1.2) | 20 | diff-lcs (>= 1.1.2) |
@@ -25,11 +23,11 @@ GEM | @@ -25,11 +23,11 @@ GEM | ||
25 | term-ansicolor (>= 1.0.6) | 23 | term-ansicolor (>= 1.0.6) |
26 | cucumber-rails (0.3.2) | 24 | cucumber-rails (0.3.2) |
27 | cucumber (>= 0.8.0) | 25 | cucumber (>= 0.8.0) |
28 | - daemons (1.1.9) | 26 | + daemons (1.2.3) |
29 | delayed_job (2.0.6) | 27 | delayed_job (2.0.6) |
30 | daemons | 28 | daemons |
31 | - diff-lcs (1.1.3) | ||
32 | - ey_config (0.0.6) | 29 | + diff-lcs (1.2.5) |
30 | + ey_config (0.0.7) | ||
33 | factory_girl (1.2.3) | 31 | factory_girl (1.2.3) |
34 | fakeweb (1.2.5) | 32 | fakeweb (1.2.5) |
35 | fastercsv (1.5.1) | 33 | fastercsv (1.5.1) |
@@ -37,23 +35,27 @@ GEM | @@ -37,23 +35,27 @@ GEM | ||
37 | gherkin (2.5.4) | 35 | gherkin (2.5.4) |
38 | json (>= 1.4.6) | 36 | json (>= 1.4.6) |
39 | has_scope (0.4.2) | 37 | has_scope (0.4.2) |
40 | - hoe (3.6.0) | ||
41 | - rake (>= 0.8, < 11.0) | 38 | + hoe (3.15.0) |
39 | + rake (>= 0.8, < 12.0) | ||
40 | + iconv (1.0.4) | ||
42 | inherited_resources (1.0.4) | 41 | inherited_resources (1.0.4) |
43 | has_scope (~> 0.4.2) | 42 | has_scope (~> 0.4.2) |
44 | responders (~> 0.4.3) | 43 | responders (~> 0.4.3) |
45 | jferris-mocha (0.9.5.0.1241126838) | 44 | jferris-mocha (0.9.5.0.1241126838) |
46 | rake | 45 | rake |
47 | - json (1.7.7) | 46 | + json (1.8.3) |
48 | json_pure (1.4.6) | 47 | json_pure (1.4.6) |
49 | jtrupiano-timecop (0.2.1) | 48 | jtrupiano-timecop (0.2.1) |
50 | - libxml-ruby (2.2.2) | 49 | + kgio (2.10.0) |
50 | + libxml-ruby (2.8.0) | ||
51 | mime-types (1.16) | 51 | mime-types (1.16) |
52 | + mini_portile2 (2.0.0) | ||
52 | mock_redis (0.4.1) | 53 | mock_redis (0.4.1) |
53 | - mysql2 (0.2.18) | ||
54 | - newrelic_rpm (3.5.5.38) | ||
55 | - nokogiri (1.5.5) | 54 | + newrelic_rpm (3.15.2.317) |
55 | + nokogiri (1.6.7.2) | ||
56 | + mini_portile2 (~> 2.0.0.rc2) | ||
56 | paperclip (2.3.1) | 57 | paperclip (2.3.1) |
58 | + pg (0.17.1) | ||
57 | rack (1.1.6) | 59 | rack (1.1.6) |
58 | rails (2.3.18) | 60 | rails (2.3.18) |
59 | actionmailer (= 2.3.18) | 61 | actionmailer (= 2.3.18) |
@@ -62,10 +64,11 @@ GEM | @@ -62,10 +64,11 @@ GEM | ||
62 | activeresource (= 2.3.18) | 64 | activeresource (= 2.3.18) |
63 | activesupport (= 2.3.18) | 65 | activesupport (= 2.3.18) |
64 | rake (>= 0.8.3) | 66 | rake (>= 0.8.3) |
65 | - rake (0.9.2.2) | ||
66 | - rdoc (3.12) | 67 | + raindrops (0.16.0) |
68 | + rake (11.1.2) | ||
69 | + rdoc (3.12.2) | ||
67 | json (~> 1.4) | 70 | json (~> 1.4) |
68 | - redis (3.0.1) | 71 | + redis (3.0.7) |
69 | responders (0.4.8) | 72 | responders (0.4.8) |
70 | rspec (1.3.2) | 73 | rspec (1.3.2) |
71 | rspec-rails (1.3.4) | 74 | rspec-rails (1.3.4) |
@@ -76,14 +79,19 @@ GEM | @@ -76,14 +79,19 @@ GEM | ||
76 | activesupport | 79 | activesupport |
77 | sendgrid (0.1.4) | 80 | sendgrid (0.1.4) |
78 | shoulda (2.10.3) | 81 | shoulda (2.10.3) |
79 | - sqlite3 (1.3.8) | ||
80 | - term-ansicolor (1.0.7) | 82 | + term-ansicolor (1.3.2) |
83 | + tins (~> 1.0) | ||
81 | test-unit (1.2.3) | 84 | test-unit (1.2.3) |
82 | hoe (>= 1.5.1) | 85 | hoe (>= 1.5.1) |
83 | thoughtbot-clearance (0.8.2) | 86 | thoughtbot-clearance (0.8.2) |
87 | + tins (1.10.1) | ||
88 | + unicorn (5.1.0) | ||
89 | + kgio (~> 2.6) | ||
90 | + raindrops (~> 0.7) | ||
84 | webrat (0.5.3) | 91 | webrat (0.5.3) |
85 | nokogiri (>= 1.2.0) | 92 | nokogiri (>= 1.2.0) |
86 | rack (>= 1.0) | 93 | rack (>= 1.0) |
94 | + will_paginate (2.3.16) | ||
87 | xml-simple (1.0.12) | 95 | xml-simple (1.0.12) |
88 | yfactorial-utility_scopes (0.2.2) | 96 | yfactorial-utility_scopes (0.2.2) |
89 | activerecord (>= 2.1.0) | 97 | activerecord (>= 2.1.0) |
@@ -92,7 +100,7 @@ PLATFORMS | @@ -92,7 +100,7 @@ PLATFORMS | ||
92 | ruby | 100 | ruby |
93 | 101 | ||
94 | DEPENDENCIES | 102 | DEPENDENCIES |
95 | - airbrake | 103 | + activerecord-postgresql-adapter |
96 | ambethia-smtp-tls (= 1.1.2) | 104 | ambethia-smtp-tls (= 1.1.2) |
97 | cucumber (= 1.1.0) | 105 | cucumber (= 1.1.0) |
98 | cucumber-rails (= 0.3.2) | 106 | cucumber-rails (= 0.3.2) |
@@ -103,18 +111,19 @@ DEPENDENCIES | @@ -103,18 +111,19 @@ DEPENDENCIES | ||
103 | fastercsv (= 1.5.1) | 111 | fastercsv (= 1.5.1) |
104 | formtastic (~> 0.2.2) | 112 | formtastic (~> 0.2.2) |
105 | has_scope (= 0.4.2) | 113 | has_scope (= 0.4.2) |
106 | - inherited_resources (= 1.0.4) | 114 | + iconv |
115 | + inherited_resources | ||
107 | jferris-mocha (= 0.9.5.0.1241126838) | 116 | jferris-mocha (= 0.9.5.0.1241126838) |
108 | json_pure (= 1.4.6) | 117 | json_pure (= 1.4.6) |
109 | jtrupiano-timecop (= 0.2.1) | 118 | jtrupiano-timecop (= 0.2.1) |
110 | - libxml-ruby (= 2.2.2) | 119 | + libxml-ruby (= 2.8.0) |
111 | mime-types (= 1.16) | 120 | mime-types (= 1.16) |
112 | mock_redis (= 0.4.1) | 121 | mock_redis (= 0.4.1) |
113 | - mysql2 (= 0.2.18) | ||
114 | newrelic_rpm | 122 | newrelic_rpm |
115 | paperclip (= 2.3.1) | 123 | paperclip (= 2.3.1) |
124 | + pg (~> 0.17.1) | ||
116 | rails (= 2.3.18) | 125 | rails (= 2.3.18) |
117 | - rake (~> 0.9.2.2) | 126 | + rake (~> 11.1.2) |
118 | rdoc (~> 3.12) | 127 | rdoc (~> 3.12) |
119 | redis (~> 3.0.1) | 128 | redis (~> 3.0.1) |
120 | responders (= 0.4.8) | 129 | responders (= 0.4.8) |
@@ -123,9 +132,13 @@ DEPENDENCIES | @@ -123,9 +132,13 @@ DEPENDENCIES | ||
123 | rubaidh-google_analytics (= 1.1.4) | 132 | rubaidh-google_analytics (= 1.1.4) |
124 | sendgrid (= 0.1.4) | 133 | sendgrid (= 0.1.4) |
125 | shoulda (~> 2.10.1) | 134 | shoulda (~> 2.10.1) |
126 | - sqlite3 | ||
127 | test-unit (= 1.2.3) | 135 | test-unit (= 1.2.3) |
128 | thoughtbot-clearance (= 0.8.2) | 136 | thoughtbot-clearance (= 0.8.2) |
137 | + unicorn | ||
129 | webrat (= 0.5.3) | 138 | webrat (= 0.5.3) |
139 | + will_paginate (~> 2.3.16) | ||
130 | xml-simple (= 1.0.12) | 140 | xml-simple (= 1.0.12) |
131 | yfactorial-utility_scopes (= 0.2.2) | 141 | yfactorial-utility_scopes (= 0.2.2) |
142 | + | ||
143 | +BUNDLED WITH | ||
144 | + 1.12.4 |
Rakefile
@@ -5,11 +5,12 @@ require(File.join(File.dirname(__FILE__), 'config', 'boot')) | @@ -5,11 +5,12 @@ require(File.join(File.dirname(__FILE__), 'config', 'boot')) | ||
5 | 5 | ||
6 | require 'rake' | 6 | require 'rake' |
7 | require 'rake/testtask' | 7 | require 'rake/testtask' |
8 | -require 'rdoc/task' | 8 | +#require 'rdoc/task' |
9 | +require 'rake/task' | ||
9 | 10 | ||
10 | require 'tasks/rails' | 11 | require 'tasks/rails' |
11 | 12 | ||
12 | -task :default => [:test, :features] | 13 | +#task :default => [:test, :features] |
13 | 14 | ||
14 | begin | 15 | begin |
15 | require 'delayed/tasks' | 16 | require 'delayed/tasks' |
config/database.yml
1 | -# SQLite version 3.x | ||
2 | -# gem install sqlite3-ruby (not necessary on OS X Leopard) | ||
3 | - | ||
4 | -development: &default | 1 | +production: &default |
5 | adapter: postgresql | 2 | adapter: postgresql |
6 | database: pairwise_dev | 3 | database: pairwise_dev |
7 | pool: 5 | 4 | pool: 5 |
8 | timeout: 5000 | 5 | timeout: 5000 |
9 | username: pairwise | 6 | username: pairwise |
10 | - password: pairwise | ||
11 | - port: 5434 | 7 | + password: pairwise@123 |
8 | + port: 5432 | ||
12 | host: 127.0.0.1 | 9 | host: 127.0.0.1 |
13 | -test: &test | ||
14 | - adapter: sqlite3 | ||
15 | - database: db/test.sqlite3 | ||
16 | - | ||
17 | -production: | ||
18 | - <<: *default | ||
19 | -cucumber: | ||
20 | - <<: *test | ||
21 | - |
config/environment.rb
1 | +ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] | ||
2 | + | ||
1 | # Be sure to restart your server when you modify this file | 3 | # Be sure to restart your server when you modify this file |
2 | Encoding.default_external = Encoding.default_internal = Encoding::UTF_8 if defined? Encoding | 4 | Encoding.default_external = Encoding.default_internal = Encoding::UTF_8 if defined? Encoding |
3 | 5 | ||
@@ -7,6 +9,27 @@ RAILS_GEM_VERSION = '2.3.18' unless defined? RAILS_GEM_VERSION | @@ -7,6 +9,27 @@ RAILS_GEM_VERSION = '2.3.18' unless defined? RAILS_GEM_VERSION | ||
7 | # Bootstrap the Rails environment, frameworks, and default configuration | 9 | # Bootstrap the Rails environment, frameworks, and default configuration |
8 | require File.join(File.dirname(__FILE__), 'boot') | 10 | require File.join(File.dirname(__FILE__), 'boot') |
9 | 11 | ||
12 | +if RUBY_VERSION >= '2.0.0' | ||
13 | + module Gem | ||
14 | + def self.source_index | ||
15 | + sources | ||
16 | + end | ||
17 | + | ||
18 | + def self.cache | ||
19 | + sources | ||
20 | + end | ||
21 | + | ||
22 | + SourceIndex = Specification | ||
23 | + | ||
24 | + class SourceList | ||
25 | + #If you want vendor gems, this is where to start writing code. | ||
26 | + def search(*args); []; end | ||
27 | + def each(&block); end | ||
28 | + include Enumerable | ||
29 | + end | ||
30 | + end | ||
31 | + end | ||
32 | + | ||
10 | Rails::Initializer.run do |config| | 33 | Rails::Initializer.run do |config| |
11 | # Settings in config/environments/* take precedence over those specified here. | 34 | # Settings in config/environments/* take precedence over those specified here. |
12 | 35 |
config/initializers/airbrake.rb
@@ -0,0 +1,30 @@ | @@ -0,0 +1,30 @@ | ||
1 | +if Rails::VERSION::MAJOR == 2 && RUBY_VERSION >= '2.0.0' | ||
2 | + module ActiveRecord | ||
3 | + module Associations | ||
4 | + class AssociationProxy | ||
5 | + def send(method, *args) | ||
6 | + if proxy_respond_to?(method, true) | ||
7 | + super | ||
8 | + else | ||
9 | + load_target | ||
10 | + @target.send(method, *args) | ||
11 | + end | ||
12 | + end | ||
13 | + end | ||
14 | + end | ||
15 | + end | ||
16 | + | ||
17 | + module I18n | ||
18 | + module Backend | ||
19 | + module Base | ||
20 | + def load_file(filename) | ||
21 | + type = File.extname(filename).tr('.', '').downcase | ||
22 | + # As a fix added second argument as true to respond_to? method | ||
23 | + raise UnknownFileType.new(type, filename) unless respond_to?(:"load_#{type}", true) | ||
24 | + data = send(:"load_#{type}", filename) # TODO raise a meaningful exception if this does not yield a Hash | ||
25 | + data.each { |locale, d| store_translations(locale, d) } | ||
26 | + end | ||
27 | + end | ||
28 | + end | ||
29 | + end | ||
30 | +end |
@@ -0,0 +1,13 @@ | @@ -0,0 +1,13 @@ | ||
1 | +listen "0.0.0.0:3030" | ||
2 | +pid 'tmp/pids/unicorn.pid' | ||
3 | + | ||
4 | +preload_app true | ||
5 | +GC.respond_to?(:copy_on_write_friendly=) and GC.copy_on_write_friendly = true | ||
6 | + | ||
7 | +before_fork do |server, worker| | ||
8 | + ActiveRecord::Base.connection.disconnect! if defined?(ActiveRecord::Base) | ||
9 | +end | ||
10 | + | ||
11 | +after_fork do |server, worker| | ||
12 | + ActiveRecord::Base.establish_connection if defined?(ActiveRecord::Base) | ||
13 | +end |
@@ -0,0 +1,432 @@ | @@ -0,0 +1,432 @@ | ||
1 | +/* http://meyerweb.com/eric/tools/css/reset/ */ | ||
2 | +/* v1.0 | 20080212 */ | ||
3 | + | ||
4 | +html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, | ||
5 | +blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, | ||
6 | +font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, | ||
7 | +b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, | ||
8 | +caption, tbody, tfoot, thead, tr, th, td { | ||
9 | + margin: 0; | ||
10 | + padding: 0; | ||
11 | + border: 0; | ||
12 | + outline: 0; | ||
13 | + font-size: 100%; | ||
14 | + vertical-align: baseline; | ||
15 | + background: transparent; | ||
16 | +} | ||
17 | +body { | ||
18 | + line-height: 1; | ||
19 | +} | ||
20 | +ol, ul { | ||
21 | + list-style: none; | ||
22 | +} | ||
23 | +blockquote, q { | ||
24 | + quotes: none; | ||
25 | +} | ||
26 | +blockquote:before, blockquote:after, | ||
27 | +q:before, q:after { | ||
28 | + content: ''; | ||
29 | + content: none; | ||
30 | +} | ||
31 | + | ||
32 | +/* remember to define focus styles! */ | ||
33 | +:focus { | ||
34 | + outline: 0; | ||
35 | +} | ||
36 | + | ||
37 | +/* remember to highlight inserts somehow! */ | ||
38 | +ins { | ||
39 | + text-decoration: none; | ||
40 | +} | ||
41 | +del { | ||
42 | + text-decoration: line-through; | ||
43 | +} | ||
44 | + | ||
45 | +/* tables still need 'cellspacing="0"' in the markup */ | ||
46 | +table { | ||
47 | + border-collapse: collapse; | ||
48 | + border-spacing: 0; | ||
49 | +} | ||
50 | + | ||
51 | + | ||
52 | +body { | ||
53 | + color: #222; | ||
54 | + font-size: 13px; | ||
55 | + font-family: arial, "Helvetica Neue", "Lucida Grande", Helvetica, Arial, Verdana, sans-serif; | ||
56 | +} | ||
57 | + | ||
58 | +h1, h2, h3, h4, h5, h6 { | ||
59 | + color: #111; | ||
60 | + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | ||
61 | +} | ||
62 | + | ||
63 | +/* Success, error & notice boxes for messages and errors. */ | ||
64 | +div.error, div.notice, div.success { | ||
65 | + padding: .8em; | ||
66 | + margin-bottom: 1em; | ||
67 | + border: 1px solid #ddd; | ||
68 | + -moz-border-radius: 8px; | ||
69 | + -webkit-border-radius: 8px; | ||
70 | +} | ||
71 | +div.error { | ||
72 | + background: #FBE3E4; | ||
73 | + color: #D12F19; | ||
74 | + border-color: #FBC2C4; | ||
75 | +} | ||
76 | +div.error a { color: #D12F19; } | ||
77 | + | ||
78 | +div.notice { | ||
79 | + background: #FFF6BF; | ||
80 | + color: #817134; | ||
81 | + border-color: #FFD324; | ||
82 | +} | ||
83 | +div.notice a { color: #817134; } | ||
84 | + | ||
85 | +div.success { | ||
86 | + background: #E6EFC2; | ||
87 | + color: #529214; | ||
88 | + border-color: #C6D880; | ||
89 | +} | ||
90 | +div.success a { color: #529214; } | ||
91 | + | ||
92 | +/* Misc classes and elements */ | ||
93 | + | ||
94 | +/* Use a .box to create a padded box inside a column. */ | ||
95 | +.box { | ||
96 | + padding: 1.5em; | ||
97 | + margin-bottom: 1.5em; | ||
98 | + background: #eee; | ||
99 | +} | ||
100 | + | ||
101 | +/* Use this to create a horizontal ruler across a column. */ | ||
102 | +hr { | ||
103 | + background: #ddd; | ||
104 | + color: #ddd; | ||
105 | + clear: both; | ||
106 | + float: none; | ||
107 | + width: 100%; | ||
108 | + height: 1px; | ||
109 | + margin: 0 0 1.4em; | ||
110 | + border: none; | ||
111 | +} | ||
112 | +hr.space { | ||
113 | + background: #fff; | ||
114 | + color: #fff; | ||
115 | +} | ||
116 | + | ||
117 | +/* Clearfix hack I love you */ | ||
118 | +.clearfix:after { | ||
119 | + content:"."; | ||
120 | + display:block; | ||
121 | + height:0; | ||
122 | + clear:both; | ||
123 | + visibility:hidden; | ||
124 | +} | ||
125 | + | ||
126 | +.clearfix {display:inline-block;} | ||
127 | +/* Hide from IE Mac \*/ | ||
128 | +.clearfix {display:block;} | ||
129 | +/* End hide from IE Mac */ | ||
130 | + | ||
131 | + | ||
132 | +/* Headings */ | ||
133 | + | ||
134 | +h1, h2, h3, h4, h5, h6 { font-weight: bold; } | ||
135 | + | ||
136 | +h1 { | ||
137 | + font-size: 2.2em; | ||
138 | + line-height: 1; | ||
139 | + margin-bottom: 0.25em; | ||
140 | +} | ||
141 | +h2 { | ||
142 | + font-size: 1.6em; | ||
143 | + margin-bottom: 0.25em; | ||
144 | + line-height: 1.1; | ||
145 | +} | ||
146 | +h3 { | ||
147 | + font-size: 1.3em; | ||
148 | + line-height: 1; | ||
149 | + margin-bottom: .25em; | ||
150 | +} | ||
151 | +h4 { | ||
152 | + font-size: 1.1em; | ||
153 | + line-height: 1.25; | ||
154 | + margin-bottom: .25em; | ||
155 | +} | ||
156 | +h5 { | ||
157 | + font-size: 1em; | ||
158 | + margin-bottom: .25em; | ||
159 | +} | ||
160 | +h6 { | ||
161 | + font-size: 1em; | ||
162 | + margin-bottom: .25em; | ||
163 | +} | ||
164 | + | ||
165 | +/* Text elements */ | ||
166 | + | ||
167 | +p.last { margin-bottom: 0; } | ||
168 | +p img { | ||
169 | + float: left; | ||
170 | + margin: 1.5em 1.5em 1.5em 0; | ||
171 | + padding: 0; | ||
172 | +} | ||
173 | +p img.top { margin-top: 0; } /* Use this if the image is at the top of the <p>. */ | ||
174 | +img { margin: 0 0 1.5em; } | ||
175 | + | ||
176 | +abbr, acronym { | ||
177 | + border-bottom: 1px dotted #666; | ||
178 | + cursor: help; | ||
179 | +} | ||
180 | +address { | ||
181 | + margin-top: 1.5em; | ||
182 | + font-style: italic; | ||
183 | +} | ||
184 | +del { color:#666; } | ||
185 | + | ||
186 | +a, a:link { | ||
187 | + color: #1a4882; | ||
188 | + text-decoration: underline; | ||
189 | +} | ||
190 | +a:visited { color: #1a4882; } | ||
191 | +a:hover { color: #052246; } | ||
192 | +a:active, a:focus { color: #1a4882; } | ||
193 | + | ||
194 | +blockquote { | ||
195 | + margin: 1.5em 0; | ||
196 | + color: #666; | ||
197 | + font-style: italic; | ||
198 | + padding-left: 1em; | ||
199 | + border-left: 4px solid #d1d1d1; | ||
200 | +} | ||
201 | +strong { font-weight: bold; } | ||
202 | +em, dfn { font-style: italic; } | ||
203 | +dfn { font-weight: bold; } | ||
204 | +pre, code { | ||
205 | + margin: 1.5em 0; | ||
206 | + white-space: pre; | ||
207 | +} | ||
208 | +pre, code, tt { | ||
209 | + font: 1em 'andale mono', 'monotype.com', 'lucida console', monospace; | ||
210 | + line-height: 1.5; | ||
211 | +} | ||
212 | +pre.code { | ||
213 | + background: #000; | ||
214 | + color: #fff; | ||
215 | + padding: 20px; | ||
216 | +} | ||
217 | +tt { | ||
218 | + display: block; | ||
219 | + margin: 1.5em 0; | ||
220 | + line-height: 1.5; | ||
221 | +} | ||
222 | + | ||
223 | + | ||
224 | +/* Forms */ | ||
225 | + | ||
226 | +form ol { | ||
227 | + list-style: none; | ||
228 | + margin: 0 0 1em 0; | ||
229 | +} | ||
230 | +form ol ol { margin-left: 0; } | ||
231 | +form ol li { margin: 0 0 1em 0; } | ||
232 | +form ol ol li { margin: 0 0 .25em 0; } | ||
233 | + | ||
234 | +form ol li.error input { background: #FBE3E4; } | ||
235 | +p.inline-errors { color: #D12F19; } | ||
236 | +form ol li.file { | ||
237 | + background: #e1e1e1; | ||
238 | + border: 1px solid #c8c8c8; | ||
239 | + padding: 10px; | ||
240 | +} | ||
241 | + | ||
242 | +form abbr { border-bottom: 0; } | ||
243 | + | ||
244 | +label { display: block; } | ||
245 | +.required label { font-weight: bold; } | ||
246 | +.checkbox_field label, .radio_field label { font-weight: normal; } | ||
247 | + | ||
248 | +a.cancel { color: #7d0d0d; } | ||
249 | +.inline-hints { | ||
250 | + font-size: .8em; | ||
251 | + color: #666; | ||
252 | + margin-bottom: .25em; | ||
253 | +} | ||
254 | + | ||
255 | +/* Fieldsets */ | ||
256 | +fieldset { | ||
257 | + margin: 0 0 1.5em 0; | ||
258 | + background: #f1f1f1; | ||
259 | + padding: 1.5em 1.5em 1em 1.5em; | ||
260 | + border: 1px solid #e3e3e3; | ||
261 | +} | ||
262 | +fieldset fieldset, fieldset fieldset fieldset { | ||
263 | + padding: 0; | ||
264 | + border: 0; | ||
265 | +} | ||
266 | +legend { font-weight: bold; } | ||
267 | +fieldset.buttons { | ||
268 | + background: inherit; | ||
269 | + border: 0; | ||
270 | + padding: 0; | ||
271 | +} | ||
272 | +fieldset.buttons li { display: inline; } | ||
273 | +.radio fieldset { | ||
274 | + padding: 0; | ||
275 | + margin: 0; | ||
276 | +} | ||
277 | + | ||
278 | +/* Text fields */ | ||
279 | +input[type="text"], input[type="password"] { | ||
280 | + width: 300px; | ||
281 | + padding: 3px 2px; | ||
282 | + font-size: inherit; | ||
283 | +} | ||
284 | +input[disabled='disabled'] { | ||
285 | + background-color: #fcfcfc; | ||
286 | + cursor:default; | ||
287 | +} | ||
288 | +input[type="checkbox"] { | ||
289 | + margin: 0 3px 0 0; | ||
290 | + vertical-align: middle; | ||
291 | + position: relative; | ||
292 | + top: -2px; | ||
293 | +} | ||
294 | +input[type="radio"] { | ||
295 | + margin: 0 3px 0 0; | ||
296 | + vertical-align: middle; | ||
297 | + position: relative; | ||
298 | + top: -2px; | ||
299 | +} | ||
300 | +.check_boxes label { | ||
301 | + vertical-align: middle; | ||
302 | + padding: 0; | ||
303 | + display: inline; | ||
304 | +} | ||
305 | +.radio label { padding: 0; } | ||
306 | + | ||
307 | +/* Textareas */ | ||
308 | +textarea { | ||
309 | + width: 440px; | ||
310 | + height: 200px; | ||
311 | + margin: 0 0.5em 0.5em 0; | ||
312 | + padding: 5px; | ||
313 | + font-size: inherit; | ||
314 | +} | ||
315 | + | ||
316 | +/* Select fields */ | ||
317 | +fieldset .select select { | ||
318 | + width:200px; | ||
319 | + font-size: .9em; | ||
320 | +} | ||
321 | +optgroup { margin: 0 0 .5em 0; } | ||
322 | + | ||
323 | +/* Date & Time */ | ||
324 | +form ol li.date ol li, form ol li.time ol li { | ||
325 | + display: inline; | ||
326 | +} | ||
327 | +form ol li.datetime ol li { | ||
328 | + display: inline-block; | ||
329 | +} | ||
330 | +form ol li.datetime select, form ol li.date select, form ol li.time select { | ||
331 | + display: inline; | ||
332 | + width: auto; | ||
333 | +} | ||
334 | +form ol li.date label, form ol li.time label { | ||
335 | + display: none; | ||
336 | +} | ||
337 | + | ||
338 | + | ||
339 | +/* Tables */ | ||
340 | + | ||
341 | +table { | ||
342 | + margin-bottom: 2em; | ||
343 | + width: 100%; | ||
344 | +} | ||
345 | +th { | ||
346 | + border-bottom: 2px solid #ccc; | ||
347 | + font-weight: bold; | ||
348 | + text-align: left; | ||
349 | +} | ||
350 | +td { border-bottom: 1px solid #ddd; } | ||
351 | +caption, th, td { | ||
352 | + padding: 4px 10px 4px 0; | ||
353 | +} | ||
354 | +caption { | ||
355 | + background: #f1f1f1; | ||
356 | + padding: 10px 0; | ||
357 | + margin-bottom: 1em; | ||
358 | +} | ||
359 | + | ||
360 | +/* Use this if you use span-x classes on th/td. */ | ||
361 | +table .last { padding-right: 0; } | ||
362 | + | ||
363 | + | ||
364 | +/* Lists */ | ||
365 | + | ||
366 | +ul, ol { | ||
367 | + margin-bottom: 1.5em; | ||
368 | + list-style-position: inside; | ||
369 | +} | ||
370 | +ul { list-style-type: disc; } | ||
371 | +ol { list-style-type: decimal; } | ||
372 | + | ||
373 | +dl { | ||
374 | + margin-bottom: 1.5em; | ||
375 | + line-height: 1.4; | ||
376 | +} | ||
377 | +dl dt { | ||
378 | + font-weight: bold; | ||
379 | + margin-top: .5em; | ||
380 | +} | ||
381 | +dl dd { margin-bottom: 0em;} | ||
382 | +dd { margin-left: .5em; } | ||
383 | + | ||
384 | +li { line-height: 1.4; } | ||
385 | + | ||
386 | +ol ol, ol ul, ul ul, ul ol { | ||
387 | + margin-left: 1em; | ||
388 | +} | ||
389 | + | ||
390 | + | ||
391 | + | ||
392 | + | ||
393 | +body { | ||
394 | + background-color: #dadada; } | ||
395 | + | ||
396 | +.content { | ||
397 | + background: #fff; | ||
398 | + padding: 40px; | ||
399 | + margin: 40px auto; | ||
400 | + width: 880px; | ||
401 | + -moz-border-radius: 24px; | ||
402 | + -webkit-border-radius: 24px; } | ||
403 | + | ||
404 | +/* flash color */ | ||
405 | + | ||
406 | +#flash_success { | ||
407 | + background: seagreen; } | ||
408 | +#flash_failure { | ||
409 | + color: beige; | ||
410 | + background: firebrick; } | ||
411 | +#flash_notice { | ||
412 | + color: snow; | ||
413 | + background: dimgray; } | ||
414 | + | ||
415 | +/* flashes spacing */ | ||
416 | + | ||
417 | +#flash { | ||
418 | + margin-bottom: 0.6em; } | ||
419 | + | ||
420 | +#flash_notice, #flash_success, #flash_failure, #errorExplanation ul li { | ||
421 | + padding: 0.6em; } | ||
422 | + | ||
423 | +/* flash scale */ | ||
424 | + | ||
425 | +#flash_notice, #flash_success, #flash_failure, #errorExplanation ul li { | ||
426 | + font-size: 1.6em; } | ||
427 | + | ||
428 | +/* flash weighting */ | ||
429 | + | ||
430 | +#flash_notice, #flash_success, #flash_failure, #errorExplanation ul li { | ||
431 | + font-weight: bold; } | ||
432 | + |
@@ -0,0 +1,85 @@ | @@ -0,0 +1,85 @@ | ||
1 | +#!/bin/sh | ||
2 | + | ||
3 | +set -e | ||
4 | + | ||
5 | +TIMEOUT=60 | ||
6 | + | ||
7 | +export RAILS_ENV=production | ||
8 | + | ||
9 | +ACTION="$1" | ||
10 | +if [ -z "$ACTION" ]; then | ||
11 | + echo "usage: $0 start|stop|restart" | ||
12 | + exit 1 | ||
13 | +fi | ||
14 | + | ||
15 | +app_server_start() { | ||
16 | + ruby -S bundle exec unicorn_rails \ | ||
17 | + --config-file config/unicorn.rb \ | ||
18 | + --env "$RAILS_ENV" \ | ||
19 | + --daemonize | ||
20 | +} | ||
21 | + | ||
22 | +app_server_stop() { | ||
23 | + kill -s QUIT $(cat tmp/pids/unicorn.pid) | ||
24 | +} | ||
25 | + | ||
26 | +app_server_restart() { | ||
27 | + kill -s USR2 $(cat tmp/pids/unicorn.pid) | ||
28 | + sleep 5 | ||
29 | + kill -s QUIT $(cat tmp/pids/unicorn.pid.oldbin) | ||
30 | +} | ||
31 | + | ||
32 | +do_start() { | ||
33 | + app_server_start | ||
34 | +} | ||
35 | + | ||
36 | +do_stop() { | ||
37 | + app_server_stop || stop_via_pid_file tmp/pids/unicorn.pid | ||
38 | +} | ||
39 | + | ||
40 | +do_restart() { | ||
41 | + app_server_restart | ||
42 | +} | ||
43 | + | ||
44 | +stop_via_pid_file() { | ||
45 | + for pidfile in $@; do | ||
46 | + if [ -e "$pidfile" ]; then | ||
47 | + pid=$(cat $pidfile) | ||
48 | + echo "Sentign TERM signal to stop $pid ..." | ||
49 | + kill -TERM "$pid" | ||
50 | + rm -f $pidfile | ||
51 | + fi | ||
52 | + done | ||
53 | +} | ||
54 | + | ||
55 | +do_running() { | ||
56 | + pids=$(sed "s/.*/& /" tmp/pids/unicorn.pid 2>/dev/null | tr -d '\n') | ||
57 | + kill -0 $pids > /dev/null 2>&1 | ||
58 | +} | ||
59 | + | ||
60 | +case "$ACTION" in | ||
61 | + start|stop) | ||
62 | + do_$ACTION | ||
63 | + ;; | ||
64 | + | ||
65 | + run) | ||
66 | + do_start | ||
67 | + echo "=> Running in production mode. Hit ctrl-C to stop." | ||
68 | + trap do_stop INT TERM | ||
69 | + tail -n 0 -f log/production.log || true | ||
70 | + ;; | ||
71 | + | ||
72 | + restart) | ||
73 | + do_restart | ||
74 | + ;; | ||
75 | + | ||
76 | + running) | ||
77 | + do_running | ||
78 | + ;; | ||
79 | + | ||
80 | + *) | ||
81 | + echo "usage: $0 start|stop|restart" | ||
82 | + exit 1 | ||
83 | + ;; | ||
84 | +esac | ||
85 | + |
thin.yml
vendor/cache/airbrake-3.1.12.gem
No preview for this file type
vendor/cache/builder-3.0.0.gem
No preview for this file type
No preview for this file type
vendor/cache/daemons-1.1.9.gem
No preview for this file type
No preview for this file type
vendor/cache/diff-lcs-1.1.3.gem
No preview for this file type
No preview for this file type
vendor/cache/eventmachine-1.0.3.gem
No preview for this file type
vendor/cache/ey_config-0.0.6.gem
No preview for this file type
No preview for this file type
No preview for this file type
vendor/cache/hoe-3.6.0.gem
No preview for this file type
No preview for this file type
vendor/cache/json-1.7.7.gem
No preview for this file type
No preview for this file type
No preview for this file type
vendor/cache/libxml-ruby-2.2.2.gem
No preview for this file type
No preview for this file type
No preview for this file type
vendor/cache/mysql2-0.2.18.gem
No preview for this file type
No preview for this file type
vendor/cache/newrelic_rpm-3.5.5.38.gem
No preview for this file type
vendor/cache/nokogiri-1.5.5.gem
No preview for this file type
No preview for this file type
No preview for this file type
vendor/cache/rake-0.9.2.2.gem
No preview for this file type
No preview for this file type
No preview for this file type
vendor/cache/rdoc-3.12.gem
No preview for this file type
vendor/cache/redis-3.0.1.gem
No preview for this file type
No preview for this file type
vendor/cache/sqlite3-1.3.8.gem
No preview for this file type
vendor/cache/term-ansicolor-1.0.7.gem
No preview for this file type
No preview for this file type
vendor/cache/thin-1.6.1.gem
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type