This commit is contained in:
Shlok Srivastava 2016-08-10 13:43:33 +00:00 committed by GitHub
commit ebce23686c
29 changed files with 676 additions and 474 deletions

View file

@ -3,7 +3,7 @@ dist: trusty
language: ruby language: ruby
cache: bundler cache: bundler
rvm: rvm:
- 2.2.3 - 2.3.1
before_install: before_install:
- "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" - "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
- "echo `phantomjs -v`" - "echo `phantomjs -v`"

View file

@ -6,7 +6,7 @@ if Gem::Version.new(Bundler::VERSION) < Gem::Version.new('1.8.4')
end end
# as web framework # as web framework
gem 'rails', '~> 4.2' gem 'rails', '~> 5.0'
# enables serving assets in production and setting your logger to standard out # enables serving assets in production and setting your logger to standard out
# both of which are required to run an application on a twelve-factor provider # both of which are required to run an application on a twelve-factor provider
@ -21,7 +21,7 @@ gem 'responders', '~> 2.0'
gem 'mysql2' gem 'mysql2'
# for observing records # for observing records
gem 'rails-observers' gem 'rails-observers', :git => 'https://github.com/shlok007/rails-observers.git'
# for tracking data changes # for tracking data changes
gem 'paper_trail' gem 'paper_trail'
@ -58,7 +58,7 @@ gem 'unobtrusive_flash', '>=3'
gem 'transitions', :require => %w( transitions active_record/transitions ) gem 'transitions', :require => %w( transitions active_record/transitions )
# for comments # for comments
gem 'awesome_nested_set', '~> 3.0.0.rc.5' gem 'awesome_nested_set', '~> 3.1'
gem 'acts_as_commentable_with_threading' gem 'acts_as_commentable_with_threading'
# as templating language # as templating language
@ -149,7 +149,6 @@ gem 'rdoc-generator-fivefish'
# for visitor tracking # for visitor tracking
gem 'ahoy_matey' gem 'ahoy_matey'
gem 'activeuuid'
gem 'piwik_analytics', '~> 1.0.1' gem 'piwik_analytics', '~> 1.0.1'
# for recurring jobs # for recurring jobs
@ -191,7 +190,6 @@ group :development do
# for static code analisys # for static code analisys
gem 'rubocop', require: false gem 'rubocop', require: false
# to silence rack assests messages # to silence rack assests messages
gem 'quiet_assets'
# as database # as database
gem 'sqlite3' gem 'sqlite3'
# to open mails # to open mails

View file

@ -1,78 +1,89 @@
GIT
remote: https://github.com/shlok007/rails-observers.git
revision: 3fe157d6cbb5b5e767ded248009fc59443d63fa1
specs:
rails-observers (0.1.3.alpha)
activemodel (>= 4.0, < 5.1)
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
remote: https://rails-assets.org/ remote: https://rails-assets.org/
specs: specs:
actionmailer (4.2.5.2) actioncable (5.0.0)
actionpack (= 4.2.5.2) actionpack (= 5.0.0)
actionview (= 4.2.5.2) nio4r (~> 1.2)
activejob (= 4.2.5.2) websocket-driver (~> 0.6.1)
actionmailer (5.0.0)
actionpack (= 5.0.0)
actionview (= 5.0.0)
activejob (= 5.0.0)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5) rails-dom-testing (~> 2.0)
actionpack (4.2.5.2) actionpack (5.0.0)
actionview (= 4.2.5.2) actionview (= 5.0.0)
activesupport (= 4.2.5.2) activesupport (= 5.0.0)
rack (~> 1.6) rack (~> 2.0)
rack-test (~> 0.6.2) rack-test (~> 0.6.3)
rails-dom-testing (~> 1.0, >= 1.0.5) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2) rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.5.2) actionview (5.0.0)
activesupport (= 4.2.5.2) activesupport (= 5.0.0)
builder (~> 3.1) builder (~> 3.1)
erubis (~> 2.7.0) erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2) rails-html-sanitizer (~> 1.0, >= 1.0.2)
active_model_serializers (0.9.4) active_model_serializers (0.10.2)
activemodel (>= 3.2) actionpack (>= 4.1, < 6)
activejob (4.2.5.2) activemodel (>= 4.1, < 6)
activesupport (= 4.2.5.2) jsonapi (~> 0.1.1.beta2)
globalid (>= 0.3.0) railties (>= 4.1, < 6)
activemodel (4.2.5.2) activejob (5.0.0)
activesupport (= 4.2.5.2) activesupport (= 5.0.0)
builder (~> 3.1) globalid (>= 0.3.6)
activerecord (4.2.5.2) activemodel (5.0.0)
activemodel (= 4.2.5.2) activesupport (= 5.0.0)
activesupport (= 4.2.5.2) activerecord (5.0.0)
arel (~> 6.0) activemodel (= 5.0.0)
activesupport (4.2.5.2) activesupport (= 5.0.0)
arel (~> 7.0)
activesupport (5.0.0)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7) i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1) minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1) tzinfo (~> 1.1)
activeuuid (0.6.1) acts_as_commentable_with_threading (2.0.1)
activerecord (>= 3.1) activerecord (>= 4.0)
uuidtools activesupport (>= 4.0)
acts_as_commentable_with_threading (1.2.0) awesome_nested_set (>= 3.0)
acts_as_list (0.7.6)
activerecord (>= 3.0) activerecord (>= 3.0)
activesupport (>= 3.0) addressable (2.4.0)
awesome_nested_set (>= 2.0) ahoy_matey (1.4.2)
acts_as_list (0.4.0)
activerecord (>= 3.0)
addressable (2.3.6)
ahoy_matey (1.0.0)
addressable addressable
browser (>= 0.4.0) browser (~> 2.0)
geocoder geocoder
referer-parser rack-attack
railties
referer-parser (>= 0.3.0)
request_store request_store
safely_block (>= 0.1.1)
user_agent_parser user_agent_parser
uuidtools uuidtools
arel (6.0.3) arel (7.1.1)
ast (2.2.0) ast (2.3.0)
autoprefixer-rails (5.1.9) autoprefixer-rails (6.4.0.1)
execjs execjs
json awesome_nested_set (3.1.1)
awesome_nested_set (3.0.0.rc.5) activerecord (>= 4.0.0, < 5.1)
activerecord (>= 4.0.0, < 5)
aws_cf_signer (0.1.3) aws_cf_signer (0.1.3)
axlsx (2.0.1) axlsx (2.0.1)
htmlentities (~> 4.3.1) htmlentities (~> 4.3.1)
nokogiri (>= 1.4.1) nokogiri (>= 1.4.1)
rubyzip (~> 1.0.0) rubyzip (~> 1.0.0)
axlsx_rails (0.2.0) axlsx_rails (0.5.0)
actionpack (>= 3.1)
axlsx (>= 2.0.1) axlsx (>= 2.0.1)
rails (>= 3.1) bcrypt (3.1.11)
bcrypt (3.1.10)
binding_of_caller (0.7.2) binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1) debug_inspector (>= 0.0.1)
bootstrap-sass (3.3.4.1) bootstrap-sass (3.3.4.1)
@ -81,460 +92,466 @@ GEM
bootstrap-switch-rails (3.0.2) bootstrap-switch-rails (3.0.2)
bootstrap3-datetimepicker-rails (3.0.3) bootstrap3-datetimepicker-rails (3.0.3)
momentjs-rails (>= 2.8.1) momentjs-rails (>= 2.8.1)
browser (0.6.0) browser (2.2.0)
builder (3.2.2) builder (3.2.2)
byebug (3.1.2) byebug (9.0.5)
columnize (~> 0.8) cancancan (1.15.0)
debugger-linecache (~> 1.2) capybara (2.7.1)
cancancan (1.13.1)
capybara (2.6.2)
addressable addressable
mime-types (>= 1.16) mime-types (>= 1.16)
nokogiri (>= 1.3.3) nokogiri (>= 1.3.3)
rack (>= 1.0.0) rack (>= 1.0.0)
rack-test (>= 0.5.4) rack-test (>= 0.5.4)
xpath (~> 2.0) xpath (~> 2.0)
carrierwave (0.11.0) carrierwave (0.11.2)
activemodel (>= 3.2.0) activemodel (>= 3.2.0)
activesupport (>= 3.2.0) activesupport (>= 3.2.0)
json (>= 1.7) json (>= 1.7)
mime-types (>= 1.16) mime-types (>= 1.16)
carrierwave-bombshelter (0.1.1.6) mimemagic (>= 0.3.0)
carrierwave-bombshelter (0.2.2)
activesupport (>= 3.2.0) activesupport (>= 3.2.0)
carrierwave carrierwave
fastimage fastimage
celluloid (0.15.2) chart-js-rails (0.1.0)
timers (~> 1.1.0)
celluloid-io (0.15.0)
celluloid (>= 0.15.0)
nio4r (>= 0.5.0)
chart-js-rails (0.0.6)
railties (> 3.1) railties (> 3.1)
chronic (0.10.2) chronic (0.10.2)
cliver (0.3.2) cliver (0.3.2)
cloudinary (1.1.6) cloudinary (1.2.2)
aws_cf_signer aws_cf_signer
rest-client rest-client
cocoon (1.2.6) cocoon (1.2.9)
coderay (1.1.0) coderay (1.1.1)
coffee-rails (4.1.1) concurrent-ruby (1.0.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.1.x)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
columnize (0.8.9)
countries (1.2.5) countries (1.2.5)
currencies (~> 0.4.2) currencies (~> 0.4.2)
i18n_data (~> 0.7.0) i18n_data (~> 0.7.0)
country_select (2.5.2) country_select (2.5.2)
countries (~> 1.2.0) countries (~> 1.2.0)
sort_alphabetical (~> 1.0) sort_alphabetical (~> 1.0)
coveralls (0.8.13) coveralls (0.8.15)
json (~> 1.8) json (>= 1.8, < 3)
simplecov (~> 0.11.0) simplecov (~> 0.12.0)
term-ansicolor (~> 1.3) term-ansicolor (~> 1.3)
thor (~> 0.19.1) thor (~> 0.19.1)
tins (~> 1.6.0) tins (>= 1.6.0, < 2)
crack (0.4.2) crack (0.4.3)
safe_yaml (~> 1.0.0) safe_yaml (~> 1.0.0)
currencies (0.4.2) currencies (0.4.2)
daemons (1.1.9) daemons (1.2.4)
database_cleaner (1.3.0) database_cleaner (1.5.3)
debug_inspector (0.0.2) debug_inspector (0.0.2)
debugger-linecache (1.2.0) delayed_job (4.1.2)
delayed_job (4.1.1) activesupport (>= 3.0, < 5.1)
activesupport (>= 3.0, < 5.0) delayed_job_active_record (4.1.1)
delayed_job_active_record (4.1.0) activerecord (>= 3.0, < 5.1)
activerecord (>= 3.0, < 5)
delayed_job (>= 3.0, < 5) delayed_job (>= 3.0, < 5)
devise (3.5.5) devise (4.2.0)
bcrypt (~> 3.0) bcrypt (~> 3.0)
orm_adapter (~> 0.1) orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5) railties (>= 4.1.0, < 5.1)
responders responders
thread_safe (~> 0.1)
warden (~> 1.2.3) warden (~> 1.2.3)
devise_ichain_authenticatable (0.3.1) devise_ichain_authenticatable (0.3.1)
devise (>= 2.2) devise (>= 2.2)
diff-lcs (1.2.5) diff-lcs (1.2.5)
docile (1.1.5) docile (1.1.5)
domain_name (0.5.20160310) domain_name (0.5.20160615)
unf (>= 0.0.5, < 1.0.0) unf (>= 0.0.5, < 1.0.0)
dotenv (2.1.1) dotenv (2.1.1)
dotenv-rails (2.1.1) dotenv-rails (2.1.1)
dotenv (= 2.1.1) dotenv (= 2.1.1)
railties (>= 4.0, < 5.1) railties (>= 4.0, < 5.1)
errbase (0.0.3)
erubis (2.7.0) erubis (2.7.0)
execjs (2.6.0) execjs (2.7.0)
factory_girl (4.5.0) factory_girl (4.7.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
factory_girl_rails (4.6.0) factory_girl_rails (4.7.0)
factory_girl (~> 4.5.0) factory_girl (~> 4.7.0)
railties (>= 3.0.0) railties (>= 3.0.0)
faker (1.6.1) faker (1.6.6)
i18n (~> 0.5) i18n (~> 0.5)
faraday (0.9.0) faraday (0.9.2)
multipart-post (>= 1.2, < 3) multipart-post (>= 1.2, < 3)
fastimage (2.0.0) fastimage (2.0.0)
addressable (~> 2) addressable (~> 2)
ffi (1.9.3) ffi (1.9.14)
font-awesome-rails (4.1.0.0) font-awesome-rails (4.6.3.1)
railties (>= 3.2, < 5.0) railties (>= 3.2, < 5.1)
formatador (0.2.4) formatador (0.2.5)
formtastic (3.1.3) formtastic (3.1.4)
actionpack (>= 3.2.13) actionpack (>= 3.2.13)
formtastic-bootstrap (3.1.1) formtastic-bootstrap (3.1.1)
formtastic (>= 3.0) formtastic (>= 3.0)
geocoder (1.2.2) geocoder (1.3.7)
globalid (0.3.6) globalid (0.3.7)
activesupport (>= 4.1.0) activesupport (>= 4.1.0)
gravtastic (3.2.6) gravtastic (3.2.6)
guard (2.6.0) guard (2.14.0)
formatador (>= 0.2.4) formatador (>= 0.2.4)
listen (~> 2.7) listen (>= 2.7, < 4.0)
lumberjack (~> 1.0) lumberjack (~> 1.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12) pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1) thor (>= 0.18.1)
guard-rspec (4.2.8) guard-rspec (4.2.10)
guard (~> 2.1) guard (~> 2.1)
rspec (>= 2.14, < 4.0) rspec (>= 2.14, < 4.0)
haml (4.0.5) haml (4.0.7)
tilt tilt
haml-rails (0.5.3) haml-rails (0.9.0)
actionpack (>= 4.0.1) actionpack (>= 4.0.1)
activesupport (>= 4.0.1) activesupport (>= 4.0.1)
haml (>= 3.1, < 5.0) haml (>= 4.0.6, < 5.0)
html2haml (>= 1.0.1)
railties (>= 4.0.1) railties (>= 4.0.1)
hashie (2.1.1) hashdiff (0.3.0)
hike (1.2.3) hashie (3.4.4)
hoptoad_notifier (2.4.11) hoptoad_notifier (2.4.11)
activesupport activesupport
builder builder
html2haml (2.0.0)
erubis (~> 2.7.0)
haml (~> 4.0.0)
nokogiri (~> 1.6.0)
ruby_parser (~> 3.5)
htmlentities (4.3.4) htmlentities (4.3.4)
http-cookie (1.0.2) http-cookie (1.0.2)
domain_name (~> 0.5) domain_name (~> 0.5)
i18n (0.7.0) i18n (0.7.0)
i18n_data (0.7.0) i18n_data (0.7.0)
inversion (0.12.3) inversion (0.18.0)
loggability (~> 0.4) loggability (~> 0.11)
iso-639 (0.2.5) iso-639 (0.2.8)
jquery-datatables-rails (2.2.3) jquery-datatables-rails (2.2.3)
jquery-rails jquery-rails
sass-rails sass-rails
jquery-rails (3.1.4) jquery-rails (4.1.1)
railties (>= 3.0, < 5.0) rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
json (1.8.3) json (1.8.3)
jwt (1.0.0) jsonapi (0.1.1.beta2)
launchy (2.4.2) json (~> 1.8)
jwt (1.5.4)
launchy (2.4.3)
addressable (~> 2.3) addressable (~> 2.3)
leaflet-rails (0.7.4) leaflet-rails (0.7.7)
letter_opener (1.2.0) letter_opener (1.4.1)
launchy (~> 2.2) launchy (~> 2.2)
letter_opener_web (1.3.0) letter_opener_web (1.3.0)
actionmailer (>= 3.2) actionmailer (>= 3.2)
letter_opener (~> 1.0) letter_opener (~> 1.0)
railties (>= 3.2) railties (>= 3.2)
listen (2.7.2) listen (3.1.5)
celluloid (>= 0.15.2) rb-fsevent (~> 0.9, >= 0.9.4)
celluloid-io (>= 0.15.0) rb-inotify (~> 0.9, >= 0.9.7)
rb-fsevent (>= 0.9.3) ruby_dep (~> 1.2)
rb-inotify (>= 0.9)
loggability (0.11.0) loggability (0.11.0)
loofah (2.0.3) loofah (2.0.3)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
lumberjack (1.0.5) lumberjack (1.0.10)
mail (2.6.3) mail (2.6.4)
mime-types (>= 1.16, < 3) mime-types (>= 1.16, < 4)
method_source (0.8.2) method_source (0.8.2)
mime-types (2.99.1) mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mimemagic (0.3.2)
mina (0.3.8) mina (0.3.8)
open4 (~> 1.3.4) open4 (~> 1.3.4)
rake rake
mini_magick (4.5.1) mini_magick (4.5.1)
mini_portile2 (2.1.0) mini_portile2 (2.1.0)
minitest (5.9.0) minitest (5.9.0)
momentjs-rails (2.8.1) momentjs-rails (2.11.1)
railties (>= 3.1) railties (>= 3.1)
monetize (1.4.0) monetize (1.4.0)
money (~> 6.7) money (~> 6.7)
money (6.7.0) money (6.7.1)
i18n (>= 0.6.4, <= 0.7.0) i18n (>= 0.6.4, <= 0.7.0)
sixarm_ruby_unaccent (>= 1.1.1, < 2) sixarm_ruby_unaccent (>= 1.1.1, < 2)
money-rails (1.6.0) money-rails (1.6.2)
activesupport (>= 3.0) activesupport (>= 3.0)
monetize (~> 1.4.0) monetize (~> 1.4.0)
money (~> 6.7) money (~> 6.7)
railties (>= 3.0) railties (>= 3.0)
multi_json (1.11.2) multi_json (1.12.1)
multi_xml (0.5.5) multi_xml (0.5.5)
multipart-post (2.0.0) multipart-post (2.0.0)
mysql2 (0.4.2) mysql2 (0.4.4)
nenv (0.3.0)
netrc (0.11.0) netrc (0.11.0)
nio4r (1.2.1) nio4r (1.2.1)
nokogiri (1.6.8) nokogiri (1.6.8)
mini_portile2 (~> 2.1.0) mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7) pkg-config (~> 1.1.7)
oauth2 (0.9.4) notiffany (0.1.1)
nenv (~> 0.1)
shellany (~> 0.0)
oauth2 (1.2.0)
faraday (>= 0.8, < 0.10) faraday (>= 0.8, < 0.10)
jwt (~> 1.0) jwt (~> 1.0)
multi_json (~> 1.3) multi_json (~> 1.3)
multi_xml (~> 0.5) multi_xml (~> 0.5)
rack (~> 1.2) rack (>= 1.2, < 3)
omniauth (1.2.1) omniauth (1.3.1)
hashie (>= 1.2, < 3) hashie (>= 1.2, < 4)
rack (~> 1.0) rack (>= 1.0, < 3)
omniauth-facebook (1.6.0) omniauth-facebook (4.0.0)
omniauth-oauth2 (~> 1.1) omniauth-oauth2 (~> 1.2)
omniauth-github (1.1.2) omniauth-github (1.1.2)
omniauth (~> 1.0) omniauth (~> 1.0)
omniauth-oauth2 (~> 1.1) omniauth-oauth2 (~> 1.1)
omniauth-google-oauth2 (0.2.4) omniauth-google-oauth2 (0.4.1)
omniauth (~> 1.0) jwt (~> 1.5.2)
omniauth-oauth2 (~> 1.1)
omniauth-oauth2 (1.1.2)
faraday (>= 0.8, < 0.10)
multi_json (~> 1.3) multi_json (~> 1.3)
oauth2 (~> 0.9.3) omniauth (>= 1.1.1)
omniauth-oauth2 (>= 1.3.1)
omniauth-oauth2 (1.4.0)
oauth2 (~> 1.0)
omniauth (~> 1.2) omniauth (~> 1.2)
omniauth-openid (1.0.1) omniauth-openid (1.0.1)
omniauth (~> 1.0) omniauth (~> 1.0)
rack-openid (~> 1.3.1) rack-openid (~> 1.3.1)
open4 (1.3.4) open4 (1.3.4)
orm_adapter (0.5.0) orm_adapter (0.5.0)
paper_trail (5.0.1) paper_trail (5.2.0)
activerecord (>= 3.0, < 6.0) activerecord (>= 3.0, < 6.0)
activesupport (>= 3.0, < 6.0) activesupport (>= 3.0, < 6.0)
request_store (~> 1.1) request_store (~> 1.1)
parser (2.3.0.3) parser (2.3.1.2)
ast (~> 2.2) ast (~> 2.2)
pdf-core (0.2.5) pdf-core (0.6.1)
phantomjs (2.1.1.0) phantomjs (2.1.1.0)
piwik_analytics (1.0.2) piwik_analytics (1.0.2)
actionpack actionpack
activesupport activesupport
rails (>= 3.0.0) rails (>= 3.0.0)
pkg-config (1.1.7) pkg-config (1.1.7)
poltergeist (1.9.0) poltergeist (1.10.0)
capybara (~> 2.1) capybara (~> 2.1)
cliver (~> 0.3.1) cliver (~> 0.3.1)
multi_json (~> 1.0)
websocket-driver (>= 0.2.0) websocket-driver (>= 0.2.0)
powerpack (0.1.1) powerpack (0.1.1)
prawn (1.0.0) prawn (2.1.0)
pdf-core (~> 0.2.2) pdf-core (~> 0.6.1)
ttfunk (~> 1.1.1) ttfunk (~> 1.4.0)
prawn_rails (0.0.11) prawn_rails (0.0.11)
prawn (>= 0.11.1) prawn (>= 0.11.1)
railties (>= 3.0.0) railties (>= 3.0.0)
pry (0.9.12.6) pry (0.10.4)
coderay (~> 1.0) coderay (~> 1.1.0)
method_source (~> 0.8) method_source (~> 0.8.1)
slop (~> 3.4) slop (~> 3.4)
quiet_assets (1.0.2) rack (2.0.1)
railties (>= 3.1, < 5.0) rack-attack (5.0.0)
rack (1.6.4) rack
rack-openid (1.3.1) rack-openid (1.3.1)
rack (>= 1.1.0) rack (>= 1.1.0)
ruby-openid (>= 2.1.8) ruby-openid (>= 2.1.8)
rack-test (0.6.3) rack-test (0.6.3)
rack (>= 1.0) rack (>= 1.0)
rails (4.2.5.2) rails (5.0.0)
actionmailer (= 4.2.5.2) actioncable (= 5.0.0)
actionpack (= 4.2.5.2) actionmailer (= 5.0.0)
actionview (= 4.2.5.2) actionpack (= 5.0.0)
activejob (= 4.2.5.2) actionview (= 5.0.0)
activemodel (= 4.2.5.2) activejob (= 5.0.0)
activerecord (= 4.2.5.2) activemodel (= 5.0.0)
activesupport (= 4.2.5.2) activerecord (= 5.0.0)
activesupport (= 5.0.0)
bundler (>= 1.3.0, < 2.0) bundler (>= 1.3.0, < 2.0)
railties (= 4.2.5.2) railties (= 5.0.0)
sprockets-rails sprockets-rails (>= 2.0.0)
rails-assets-bootstrap (3.3.6) rails-assets-bootstrap (3.3.7)
rails-assets-jquery (>= 1.9.1, < 3) rails-assets-jquery (>= 1.9.1, < 4)
rails-assets-bootstrap-markdown (2.10.0) rails-assets-bootstrap-markdown (2.10.0)
rails-assets-bootstrap (~> 3) rails-assets-bootstrap (~> 3)
rails-assets-date.format (1.2.3) rails-assets-date.format (1.2.3)
rails-assets-holderjs (2.9.3) rails-assets-holderjs (2.9.3)
rails-assets-jquery (2.2.1) rails-assets-jquery (3.1.0)
rails-assets-jquery-smooth-scroll (1.7.2) rails-assets-jquery-smooth-scroll (1.7.2)
rails-assets-jquery (>= 1.4.2) rails-assets-jquery (>= 1.4.2)
rails-assets-markdown (0.5.0) rails-assets-markdown (0.5.0)
rails-assets-momentjs (2.11.2) rails-assets-momentjs (2.14.1)
rails-assets-spectrum (1.8.0) rails-assets-spectrum (1.8.0)
rails-assets-jquery (>= 1.7.2) rails-assets-jquery (>= 1.7.2)
rails-assets-tinycolor (1.3.0) rails-assets-tinycolor (1.4.1)
rails-assets-to-markdown (1.3.0) rails-assets-to-markdown (3.0.1)
rails-assets-trianglify (0.4.0) rails-assets-trianglify (1.0.0)
rails-assets-waypoints (4.0.0) rails-assets-waypoints (4.0.0)
rails-deprecated_sanitizer (1.0.3) rails-dom-testing (2.0.1)
activesupport (>= 4.2.0.alpha) activesupport (>= 4.2.0, < 6.0)
rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0) nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.3) rails-html-sanitizer (1.0.3)
loofah (~> 2.0) loofah (~> 2.0)
rails-i18n (4.0.8) rails-i18n (4.0.2)
i18n (~> 0.7) i18n (~> 0.6)
railties (~> 4.0) rails (>= 4.0)
rails-observers (0.1.2)
activemodel (~> 4.0)
rails_12factor (0.0.3) rails_12factor (0.0.3)
rails_serve_static_assets rails_serve_static_assets
rails_stdout_logging rails_stdout_logging
rails_serve_static_assets (0.0.4) rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.3) rails_stdout_logging (0.0.5)
railties (4.2.5.2) railties (5.0.0)
actionpack (= 4.2.5.2) actionpack (= 5.0.0)
activesupport (= 4.2.5.2) activesupport (= 5.0.0)
method_source
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
rainbow (2.1.0) rainbow (2.1.0)
rake (10.5.0) rake (11.2.2)
rb-fsevent (0.9.4) rb-fsevent (0.9.7)
rb-inotify (0.9.4) rb-inotify (0.9.7)
ffi (>= 0.5.0) ffi (>= 0.5.0)
rdoc (4.1.1) rdoc (4.2.2)
json (~> 1.4) json (~> 1.4)
rdoc-generator-fivefish (0.1.0) rdoc-generator-fivefish (0.1.0)
inversion (~> 0.12) inversion (~> 0.12)
loggability (~> 0.6) loggability (~> 0.6)
rdoc (~> 4.0) rdoc (~> 4.0)
yajl-ruby (~> 1.1) yajl-ruby (~> 1.1)
redcarpet (3.2.3) redcarpet (3.3.4)
referer-parser (0.2.1) referer-parser (0.3.0)
request_store (1.1.0) request_store (1.3.1)
responders (2.1.1) responders (2.2.0)
railties (>= 4.2.0, < 5.1) railties (>= 4.2.0, < 5.1)
rest-client (1.8.0) rest-client (2.0.0)
http-cookie (>= 1.0.2, < 2.0) http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 3.0) mime-types (>= 1.16, < 4.0)
netrc (~> 0.7) netrc (~> 0.8)
rolify (5.0.0) rolify (5.1.0)
rspec (3.0.0) rspec (3.5.0)
rspec-core (~> 3.0.0) rspec-core (~> 3.5.0)
rspec-expectations (~> 3.0.0) rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.0.0) rspec-mocks (~> 3.5.0)
rspec-activemodel-mocks (1.0.1) rspec-activemodel-mocks (1.0.3)
activemodel (>= 3.0) activemodel (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
rspec-mocks (>= 2.99, < 4.0) rspec-mocks (>= 2.99, < 4.0)
rspec-core (3.0.2) rspec-core (3.5.2)
rspec-support (~> 3.0.0) rspec-support (~> 3.5.0)
rspec-expectations (3.0.2) rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.0.0) rspec-support (~> 3.5.0)
rspec-mocks (3.0.2) rspec-mocks (3.5.0)
rspec-support (~> 3.0.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-rails (3.0.0) rspec-support (~> 3.5.0)
rspec-rails (3.5.1)
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
railties (>= 3.0) railties (>= 3.0)
rspec-core (~> 3.0.0) rspec-core (~> 3.5.0)
rspec-expectations (~> 3.0.0) rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.0.0) rspec-mocks (~> 3.5.0)
rspec-support (~> 3.0.0) rspec-support (~> 3.5.0)
rspec-support (3.0.2) rspec-support (3.5.0)
rubocop (0.37.0) rubocop (0.42.0)
parser (>= 2.3.0.2, < 3.0) parser (>= 2.3.1.1, < 3.0)
powerpack (~> 0.1) powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0) rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (~> 0.3) unicode-display_width (~> 1.0, >= 1.0.1)
ruby-oembed (0.8.14) ruby-oembed (0.10.1)
ruby-openid (2.5.0) ruby-openid (2.7.0)
ruby-progressbar (1.7.5) ruby-progressbar (1.8.1)
ruby_dep (1.4.0)
ruby_parser (3.8.2)
sexp_processor (~> 4.1)
rubyzip (1.0.0) rubyzip (1.0.0)
safe_yaml (1.0.4) safe_yaml (1.0.4)
sass (3.2.19) safely_block (0.1.1)
sass-rails (4.0.4) errbase
railties (>= 4.0.0, < 5.0) sass (3.4.22)
sass (~> 3.2.2) sass-rails (5.0.6)
sprockets (~> 2.8, < 2.12) railties (>= 4.0.0, < 6)
sprockets-rails (~> 2.0) sass (~> 3.1)
shoulda-matchers (2.6.1) sprockets (>= 2.8, < 4.0)
activesupport (>= 3.0.0) sprockets-rails (>= 2.0, < 4.0)
simplecov (0.11.2) tilt (>= 1.1, < 3)
sexp_processor (4.7.0)
shellany (0.0.1)
shoulda-matchers (3.1.1)
activesupport (>= 4.0.0)
simplecov (0.12.0)
docile (~> 1.1.0) docile (~> 1.1.0)
json (~> 1.8) json (>= 1.8, < 3)
simplecov-html (~> 0.10.0) simplecov-html (~> 0.10.0)
simplecov-html (0.10.0) simplecov-html (0.10.0)
sixarm_ruby_unaccent (1.1.1) sixarm_ruby_unaccent (1.1.1)
slop (3.6.0) slop (3.6.0)
sort_alphabetical (1.0.2) sort_alphabetical (1.0.2)
unicode_utils (>= 1.2.2) unicode_utils (>= 1.2.2)
spring (1.6.3) spring (1.7.2)
spring-commands-rspec (1.0.4) spring-commands-rspec (1.0.4)
spring (>= 0.9.1) spring (>= 0.9.1)
sprockets (2.11.3) sprockets (3.7.0)
hike (~> 1.2) concurrent-ruby (~> 1.0)
multi_json (~> 1.0) rack (> 1, < 3)
rack (~> 1.0) sprockets-rails (3.1.1)
tilt (~> 1.1, != 1.3.0) actionpack (>= 4.0)
sprockets-rails (2.3.3) activesupport (>= 4.0)
actionpack (>= 3.0) sprockets (>= 3.0.0)
activesupport (>= 3.0) sqlite3 (1.3.11)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.9)
term-ansicolor (1.3.2) term-ansicolor (1.3.2)
tins (~> 1.0) tins (~> 1.0)
thor (0.19.1) thor (0.19.1)
thread_safe (0.3.5) thread_safe (0.3.5)
tilt (1.4.1) tilt (2.0.5)
timecop (0.7.1) timecop (0.8.1)
timers (1.1.0) tins (1.12.0)
tins (1.6.0) transitions (1.1.1)
transitions (0.1.12) ttfunk (1.4.0)
ttfunk (1.1.1) turbolinks (5.0.1)
turbolinks (2.5.3) turbolinks-source (~> 5)
coffee-rails turbolinks-source (5.0.0)
tzinfo (1.2.2) tzinfo (1.2.2)
thread_safe (~> 0.1) thread_safe (~> 0.1)
uglifier (3.0.0) uglifier (3.0.1)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
unf (0.1.4) unf (0.1.4)
unf_ext unf_ext
unf_ext (0.0.7.2) unf_ext (0.0.7.2)
unicode-display_width (0.3.1) unicode-display_width (1.1.0)
unicode_utils (1.4.0) unicode_utils (1.4.0)
unobtrusive_flash (3.1.0) unobtrusive_flash (3.2.0)
railties railties
user_agent_parser (2.1.5) user_agent_parser (2.3.0)
uuidtools (2.1.5) uuidtools (2.1.5)
warden (1.2.4) warden (1.2.6)
rack (>= 1.0) rack (>= 1.0)
web-console (2.2.1) web-console (2.3.0)
activemodel (>= 4.0) activemodel (>= 4.0)
binding_of_caller (>= 0.7.2) binding_of_caller (>= 0.7.2)
railties (>= 4.0) railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0) sprockets-rails (>= 2.0, < 4.0)
webmock (1.20.4) webmock (2.1.0)
addressable (>= 2.3.6) addressable (>= 2.3.6)
crack (>= 0.3.2) crack (>= 0.3.2)
websocket-driver (0.6.3) hashdiff
websocket-driver (0.6.4)
websocket-extensions (>= 0.1.0) websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2) websocket-extensions (0.1.2)
whenever (0.9.2) whenever (0.9.7)
activesupport (>= 2.3.4)
chronic (>= 0.6.3) chronic (>= 0.6.3)
xpath (2.0.0) xpath (2.0.0)
nokogiri (~> 1.3) nokogiri (~> 1.3)
yajl-ruby (1.2.0) yajl-ruby (1.2.1)
PLATFORMS PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
active_model_serializers active_model_serializers
activeuuid
acts_as_commentable_with_threading acts_as_commentable_with_threading
acts_as_list acts_as_list
ahoy_matey ahoy_matey
autoprefixer-rails autoprefixer-rails
awesome_nested_set (~> 3.0.0.rc.5) awesome_nested_set (~> 3.1)
axlsx_rails axlsx_rails
bootstrap-sass (~> 3.3.4.1) bootstrap-sass (~> 3.3.4.1)
bootstrap-switch-rails (~> 3.0.0) bootstrap-switch-rails (~> 3.0.0)
@ -584,8 +601,7 @@ DEPENDENCIES
piwik_analytics (~> 1.0.1) piwik_analytics (~> 1.0.1)
poltergeist poltergeist
prawn_rails prawn_rails
quiet_assets rails (~> 5.0)
rails (~> 4.2)
rails-assets-bootstrap-markdown! rails-assets-bootstrap-markdown!
rails-assets-date.format! rails-assets-date.format!
rails-assets-holderjs! rails-assets-holderjs!
@ -598,7 +614,7 @@ DEPENDENCIES
rails-assets-trianglify! rails-assets-trianglify!
rails-assets-waypoints! rails-assets-waypoints!
rails-i18n (~> 4.0.0) rails-i18n (~> 4.0.0)
rails-observers rails-observers!
rails_12factor rails_12factor
rdoc-generator-fivefish rdoc-generator-fivefish
redcarpet redcarpet

3
bin/bundle Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env ruby
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
load Gem.bin_path('bundler', 'bundle')

View file

@ -1,6 +1,4 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
APP_PATH = File.expand_path('../../config/application', __FILE__)
require File.expand_path('../../config/boot', __FILE__)
require 'rails/commands' require 'rails/commands'

4
bin/rake Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env ruby
require_relative '../config/boot'
require 'rake'
Rake.application.run

34
bin/setup Executable file
View file

@ -0,0 +1,34 @@
#!/usr/bin/env ruby
require 'pathname'
require 'fileutils'
include FileUtils
# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
end
chdir APP_ROOT do
# This script is a starting point to setup your application.
# Add necessary setup steps to this file.
puts '== Installing dependencies =='
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')
# puts "\n== Copying sample files =="
# unless File.exist?('config/database.yml')
# cp 'config/database.yml.sample', 'config/database.yml'
# end
puts "\n== Preparing database =="
system! 'bin/rails db:setup'
puts "\n== Removing old logs and tempfiles =="
system! 'bin/rails log:clear tmp:clear'
puts "\n== Restarting application server =="
system! 'bin/rails restart'
end

29
bin/update Executable file
View file

@ -0,0 +1,29 @@
#!/usr/bin/env ruby
require 'pathname'
require 'fileutils'
include FileUtils
# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
end
chdir APP_ROOT do
# This script is a way to update your development environment automatically.
# Add necessary update steps to this file.
puts '== Installing dependencies =='
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')
puts "\n== Updating database =="
system! 'bin/rails db:migrate'
puts "\n== Removing old logs and tempfiles =="
system! 'bin/rails log:clear tmp:clear'
puts "\n== Restarting application server =="
system! 'bin/rails restart'
end

View file

@ -1,14 +1,10 @@
require File.expand_path('../boot', __FILE__) require_relative 'boot'
require 'rails/all' require 'rails/all'
include ActionView::Helpers::NumberHelper
if defined?(Bundler) # Require the gems listed in Gemfile, including any gems
# If you precompile assets before deploying to production, use this line # you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups(assets: %w(development test))) Bundler.require(*Rails.groups)
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
module Osem module Osem
class Application < Rails::Application class Application < Rails::Application
@ -16,26 +12,11 @@ module Osem
# Application configuration should go into files in config/initializers # Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded. # -- 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. # Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
config.active_record.observers = :revision_observer config.active_record.observers = :revision_observer
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. # Configure the default encoding used in templates for Ruby 2.3.1.
# 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' config.encoding = 'utf-8'
# Configure sensitive parameters which will be filtered from the log file. # Configure sensitive parameters which will be filtered from the log file.
@ -44,20 +25,6 @@ module Osem
# Enable escaping HTML in JSON. # Enable escaping HTML in JSON.
config.active_support.escape_html_entities_in_json = true 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 # Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0' config.assets.version = '1.0'

View file

@ -1,4 +1,3 @@
# Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) # Set up gems listed in the Gemfile.

9
config/cable.yml Normal file
View file

@ -0,0 +1,9 @@
development:
adapter: async
test:
adapter: async
production:
adapter: redis
url: redis://localhost:6379/1

View file

@ -1,5 +1,5 @@
# Load the rails application # Load the Rails application.
require File.expand_path('../application', __FILE__) require_relative 'application'
# Load the configuration file # Load the configuration file
path = Rails.root.join('config', 'config.yml') path = Rails.root.join('config', 'config.yml')
@ -21,5 +21,5 @@ bundle exec rake data:migrate:config2dotenv RAILS_ENV=production
" "
end end
# Initialize the rails application # Initialize the Rails application.
Osem::Application.initialize! Rails.application.initialize!

View file

@ -1,5 +1,5 @@
Osem::Application.configure do Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb # Settings specified here will take precedence over those in config/application.rb.
# Use letter_opener_web for Vagrant (launchy won't work) # Use letter_opener_web for Vagrant (launchy won't work)
config.action_mailer.delivery_method = ENV['USER'] == 'vagrant' ? :letter_opener_web : :letter_opener config.action_mailer.delivery_method = ENV['USER'] == 'vagrant' ? :letter_opener_web : :letter_opener
@ -9,33 +9,54 @@ Osem::Application.configure do
# since you don't have to restart the web server when you make code changes. # since you don't have to restart the web server when you make code changes.
config.cache_classes = false config.cache_classes = false
# 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
# Raise exception on mass assignment protection for Active Record models
# config.active_record.mass_assignment_sanitizer = :strict
# Do not compress assets
config.assets.compress = false
# Expands the lines which load the assets
config.assets.debug = true
# Do not eager load code on boot. # Do not eager load code on boot.
config.eager_load = false config.eager_load = false
# Set the detault url for action mailer # Show full error reports.
config.action_mailer.default_url_options = { host: (ENV['OSEM_HOSTNAME'] || 'localhost:3000') } config.consider_all_requests_local = true
# Enable/disable caching. By default caching is disabled.
if Rails.root.join('tmp/caching-dev.txt').exist?
config.action_controller.perform_caching = true
config.cache_store = :memory_store
config.public_file_server.headers = {
'Cache-Control' => 'public, max-age=172800'
}
else
config.action_controller.perform_caching = false
config.cache_store = :null_store
end
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
config.action_mailer.perform_caching = false
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
*# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load
# Do not compress assets
config.assets.compress = false
# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true
# Suppress logger output for asset requests.
config.assets.quiet = true
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
# Set the secret key base if it's not set via other means # Set the secret key base if it's not set via other means
config.secret_key_base ||= 'f4be765bc98e516de82ac01daa8f8aa11c5ca13cb6c911887851ac89457b6c0b056b2361a21b5c08926c9386e0f91eef84fc0b103d522bf00bc0c78ea8ce7c58' config.secret_key_base ||= 'f4be765bc98e516de82ac01daa8f8aa11c5ca13cb6c911887851ac89457b6c0b056b2361a21b5c08926c9386e0f91eef84fc0b103d522bf00bc0c78ea8ce7c58'

View file

@ -1,86 +1,96 @@
Osem::Application.configure do Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb # Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests # Code is not reloaded between requests.
config.cache_classes = true 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
# Eager load code on boot. This eager loads most of Rails and # Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both thread web servers # your application in memory, allowing both threaded web servers
# and those relying on copy on write to perform better. # and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance. # Rake tasks automatically ignore this option for performance.
config.eager_load = true config.eager_load = true
# Disable Rails's static asset server (Apache or nginx will already do this) # Full error reports are disabled and caching is turned on.
config.serve_static_files = false config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.public_file_server.enabled = false
# Compress JavaScripts and CSS # Compress JavaScripts and CSS
config.assets.compress = true config.assets.compress = true
# Don't fallback to assets pipeline if a precompiled asset is missed # Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false config.assets.compile = false
# Generate digests for assets URLs # Generate digests for assets URLs
config.assets.digest = true config.assets.digest = true
# Defaults to nil and saved in location specified by config.assets.prefix # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
# config.assets.manifest = YOUR_PATH
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = 'http://assets.example.com'
# 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
# Mount Action Cable outside main process or domain
# config.action_cable.mount_path = nil
# config.action_cable.url = 'wss://example.com/cable'
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
# Specifies the header that your server uses for sending files # 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-Sendfile' # for apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx # 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. # Use the lowest log level to ensure availability of diagnostic information
# config.force_ssl = true # when problems arise.
config.log_level = :debug
# See everything in the log (default is :info) # Prepend all log lines with the following tags.
# config.log_level = :debug config.log_tags = [ :request_id ]
# Prepend all log lines with the following tags # Use a different cache store in production.
# 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 # config.cache_store = :mem_cache_store
# Enable serving of images, stylesheets, and JavaScripts from an asset server # Use a real queuing backend for Active Job (and separate queues per environment)
# config.action_controller.asset_host = "http://assets.example.com" # config.active_job.queue_adapter = :resque
# config.active_job.queue_name_prefix = "osem_#{Rails.env}"
config.action_mailer.perform_caching = false
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) # Ignore bad email addresses and do not raise email delivery errors.
# config.assets.precompile += %w( search.js ) # Set this to true and configure the email server for immediate delivery to raise delivery errors.
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false # 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 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found) # the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true config.i18n.fallbacks = true
# Send deprecation notices to registered listeners # Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify config.active_support.deprecation = :notify
# Set the detault url for action mailer # Use default logging formatter so that PID and timestamp are not suppressed.
config.action_mailer.default_url_options = { host: (ENV['OSEM_HOSTNAME'] || 'localhost:3000') } config.log_formatter = ::Logger::Formatter.new
# Set the smtp configuration of your service provider # Use a different logger for distributed setups.
# For further details of each configuration checkout: http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration # require 'syslog/logger'
config.action_mailer.smtp_settings = { # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
address: ENV['OSEM_SMTP_ADDRESS'],
port: ENV['OSEM_SMTP_PORT'],
user_name: ENV['OSEM_SMTP_USERNAME'],
password: ENV['OSEM_SMTP_PASSWORD'],
authentication: ENV['OSEM_SMTP_AUTHENTICATION'].try(:to_sym),
domain: ENV['OSEM_SMTP_DOMAIN'],
enable_starttls_auto: true
}
# Set the secret_key_base from the env, if not set by any other means if ENV["RAILS_LOG_TO_STDOUT"].present?
config.secret_key_base ||= ENV["SECRET_KEY_BASE"] logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
end
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
end end

View file

@ -1,5 +1,5 @@
Osem::Application.configure do Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb # Settings specified here will take precedence over those in config/application.rb.
# The test environment is used exclusively to run your application's # The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that # test suite. You never need to work with it otherwise. Remember that
@ -7,43 +7,48 @@ Osem::Application.configure do
# and recreated between test runs. Don't rely on the data there! # and recreated between test runs. Don't rely on the data there!
config.cache_classes = true config.cache_classes = true
# Configure static asset server for tests with Cache-Control for performance config.active_support.test_order = :sorted
config.serve_static_files = true
config.static_cache_control = 'public, max-age=3600'
# Do not eager load code on boot. # Do not eager load code on boot. This avoids loading your whole application
# just for the purpose of running a single test. If you are using a tool that
# preloads Rails for running tests, you may have to set it to true.
config.eager_load = false config.eager_load = false
# Show full error reports and disable caching # Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
config.public_file_server.headers = {
'Cache-Control' => 'public, max-age=3600'
}
# Show full error reports and disable caching.
config.consider_all_requests_local = true config.consider_all_requests_local = true
config.action_controller.perform_caching = false config.action_controller.perform_caching = false
# Raise exceptions instead of rendering exception templates # Raise exceptions instead of rendering exception templates.
config.action_dispatch.show_exceptions = false config.action_dispatch.show_exceptions = false
# Disable request forgery protection in test environment # Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false config.action_controller.allow_forgery_protection = false
config.action_mailer.perform_caching = false
# Tell Action Mailer not to deliver emails to the real world. # Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the # The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array. # ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test config.action_mailer.delivery_method = :test
# Raise exception on mass assignment protection for Active Record models
# config.active_record.mass_assignment_sanitizer = :strict
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
# Set the detault url for action mailer
config.action_mailer.default_url_options = { host: 'localhost:3000' }
# Do not perform deliveries on test # Do not perform deliveries on test
config.action_mailer.perform_deliveries = false config.action_mailer.perform_deliveries = false
# Set the detault url for action mailer
config.action_mailer.default_url_options = { host: 'localhost:3000' }
# Set the secret key base if it's not set via other means # Set the secret key base if it's not set via other means
config.secret_key_base ||= 'f4be765bc98e516de82ac01daa8f8aa11c5ca13cb6c911887851ac89457b6c0b056b2361a21b5c08926c9386e0f91eef84fc0b103d522bf00bc0c78ea8ce7c58' config.secret_key_base ||= 'f4be765bc98e516de82ac01daa8f8aa11c5ca13cb6c911887851ac89457b6c0b056b2361a21b5c08926c9386e0f91eef84fc0b103d522bf00bc0c78ea8ce7c58'
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
config.after_initialize do config.after_initialize do
ActiveRecord::Base.logger = nil ActiveRecord::Base.logger = nil
# Set Time.now to May 1, 2014 00:01:00 AM (at this instant), but allow it to move forward # Set Time.now to May 1, 2014 00:01:00 AM (at this instant), but allow it to move forward
@ -52,4 +57,7 @@ Osem::Application.configure do
ActiveSupport::Deprecation.silenced = true ActiveSupport::Deprecation.silenced = true
end end
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
end end

View file

@ -0,0 +1,6 @@
# Be sure to restart your server when you modify this file.
# ApplicationController.renderer.defaults.merge!(
# http_host: 'example.org',
# https: false
# )

View file

@ -0,0 +1,11 @@
# Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = '1.0'
# Add additional assets to the asset load path
# Rails.application.config.assets.paths << Emoji.images_path
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# Rails.application.config.assets.precompile += %w( search.js )

View file

@ -0,0 +1,5 @@
# Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars.
# Valid options are :json, :marshal, and :hybrid.
Rails.application.config.action_dispatch.cookies_serializer = :json

View file

@ -0,0 +1,4 @@
# Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.
Rails.application.config.filter_parameters += [:password]

View file

@ -1,15 +1,16 @@
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format # Add new inflection rules using the following format. Inflections
# (all these examples are active by default): # are locale specific, and you may define rules for as many different
# ActiveSupport::Inflector.inflections do |inflect| # locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.plural /^(ox)$/i, '\1en' # inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1' # inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people' # inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep ) # inflect.uncountable %w( fish sheep )
# end # end
#
# These inflection rules are supported but not enabled by default: # These inflection rules are supported but not enabled by default:
# ActiveSupport::Inflector.inflections do |inflect| # ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.acronym 'RESTful' # inflect.acronym 'RESTful'
# end # end

View file

@ -2,4 +2,3 @@
# Add new mime types for use in respond_to blocks: # Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf # Mime::Type.register "text/richtext", :rtf
# Mime::Type.register_alias "text/html", :iphone

View file

@ -0,0 +1,23 @@
# Be sure to restart your server when you modify this file.
#
# This file contains migration options to ease your Rails 5.0 upgrade.
#
# Once upgraded flip defaults one by one to migrate to the new default.
#
# Read the Rails 5.0 release notes for more info on each option.
# Enable per-form CSRF tokens. Previous versions had false.
Rails.application.config.action_controller.per_form_csrf_tokens = false
# Enable origin-checking CSRF mitigation. Previous versions had false.
Rails.application.config.action_controller.forgery_protection_origin_check = false
# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
# Previous versions had false.
ActiveSupport.to_time_preserves_timezone = false
# Require `belongs_to` associations by default. Previous versions had false.
Rails.application.config.active_record.belongs_to_required_by_default = false
# Do not halt callback chains when a callback returns false. Previous versions had true.
ActiveSupport.halt_callback_chains_on_return_false = true

View file

@ -1,8 +1,3 @@
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
Osem::Application.config.session_store :cookie_store, key: '_osem_session' Rails.application.config.session_store :cookie_store, key: '_osem_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")
# Osem::Application.config.session_store :active_record_store

View file

@ -1,5 +1,5 @@
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
#
# This file contains settings for ActionController::ParamsWrapper which # This file contains settings for ActionController::ParamsWrapper which
# is enabled by default. # is enabled by default.
@ -8,7 +8,7 @@ ActiveSupport.on_load(:action_controller) do
wrap_parameters format: [:json] wrap_parameters format: [:json]
end end
# Disable root element in JSON by default. # To enable root element in JSON for ActiveRecord objects.
ActiveSupport.on_load(:active_record) do # ActiveSupport.on_load(:active_record) do
self.include_root_in_json = false # self.include_root_in_json = true
end # end

View file

@ -1,8 +1,26 @@
# Sample localization file for English. Add more files in this directory for other locales. # Files in the config/locales directory are used for internationalization
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. # and are automatically loaded by Rails. If you want to use locales other
# than English, add the necessary files in this directory.
#
# To use the locales, use `I18n.t`:
#
# I18n.t 'hello'
#
# In views, this is aliased to just `t`:
#
# <%= t('hello') %>
#
# To use a different locale, set it with `I18n.locale`:
#
# I18n.locale = :es
#
# This would use the information in config/locales/es.yml.
#
# To learn more, please read the Rails Internationalization guide
# available at http://guides.rubyonrails.org/i18n.html.
en: en:
hello: "Hello world" hello: "Hello world"
time: time:
formats: formats:
short: "%Y-%m-%dT%H:%M:%S" short: "%Y-%m-%dT%H:%M:%S"

47
config/puma.rb Normal file
View file

@ -0,0 +1,47 @@
# Puma can serve each request in a thread from an internal thread pool.
# The `threads` method setting takes two numbers a minimum and maximum.
# Any libraries that use thread pools should be configured to match
# the maximum value specified for Puma. Default is set to 5 threads for minimum
# and maximum, this matches the default thread size of Active Record.
#
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
threads threads_count, threads_count
# Specifies the `port` that Puma will listen on to receive requests, default is 3000.
#
port ENV.fetch("PORT") { 3000 }
# Specifies the `environment` that Puma will run in.
#
environment ENV.fetch("RAILS_ENV") { "development" }
# Specifies the number of `workers` to boot in clustered mode.
# Workers are forked webserver processes. If using threads and workers together
# the concurrency of the application would be max `threads` * `workers`.
# Workers do not work on JRuby or Windows (both of which do not support
# processes).
#
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
# Use the `preload_app!` method when specifying a `workers` number.
# This directive tells Puma to first boot the application and load code
# before forking the application. This takes advantage of Copy On Write
# process behavior so workers use less memory. If you use this option
# you need to make sure to reconnect any threads in the `on_worker_boot`
# block.
#
# preload_app!
# The code in the `on_worker_boot` will be called if you are using
# clustered mode by specifying a number of `workers`. After each worker
# process is booted this block will be run, if you are using `preload_app!`
# option you will want to use this block to reconnect to any threads
# or connections that may have been created at application boot, Ruby
# cannot share connections between processes.
#
# on_worker_boot do
# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
# end
# Allow puma to be restarted by `rails restart` command.
plugin :tmp_restart

View file

@ -1,5 +1,5 @@
Osem::Application.routes.draw do Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
if ENV['OSEM_ICHAIN_ENABLED'] == 'true' if ENV['OSEM_ICHAIN_ENABLED'] == 'true'
devise_for :users, controllers: { registrations: :registrations } devise_for :users, controllers: { registrations: :registrations }
else else

6
config/spring.rb Normal file
View file

@ -0,0 +1,6 @@
%w(
.ruby-version
.rbenv-vars
tmp/restart.txt
tmp/caching-dev.txt
).each { |path| Spring.watch(path) }

View file

@ -1,4 +1,3 @@
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead # This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to # of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition. # incrementally modify your database, and then regenerate this schema definition.
@ -14,17 +13,16 @@
ActiveRecord::Schema.define(version: 20160624151257) do ActiveRecord::Schema.define(version: 20160624151257) do
create_table "ahoy_events", force: :cascade do |t| create_table "ahoy_events", force: :cascade do |t|
t.uuid "visit_id", limit: 16 t.binary "visit_id", limit: 16
t.integer "user_id" t.integer "user_id"
t.string "name" t.string "name"
t.text "properties" t.text "properties"
t.datetime "time" t.datetime "time"
t.index ["time"], name: "index_ahoy_events_on_time"
t.index ["user_id"], name: "index_ahoy_events_on_user_id"
t.index ["visit_id"], name: "index_ahoy_events_on_visit_id"
end end
add_index "ahoy_events", ["time"], name: "index_ahoy_events_on_time"
add_index "ahoy_events", ["user_id"], name: "index_ahoy_events_on_user_id"
add_index "ahoy_events", ["visit_id"], name: "index_ahoy_events_on_visit_id"
create_table "answers", force: :cascade do |t| create_table "answers", force: :cascade do |t|
t.string "title" t.string "title"
t.datetime "created_at" t.datetime "created_at"
@ -63,12 +61,11 @@ ActiveRecord::Schema.define(version: 20160624151257) do
t.integer "parent_id" t.integer "parent_id"
t.integer "lft" t.integer "lft"
t.integer "rgt" t.integer "rgt"
t.index ["commentable_id"], name: "index_comments_on_commentable_id"
t.index ["commentable_type"], name: "index_comments_on_commentable_type"
t.index ["user_id"], name: "index_comments_on_user_id"
end end
add_index "comments", ["commentable_id"], name: "index_comments_on_commentable_id"
add_index "comments", ["commentable_type"], name: "index_comments_on_commentable_type"
add_index "comments", ["user_id"], name: "index_comments_on_user_id"
create_table "commercials", force: :cascade do |t| create_table "commercials", force: :cascade do |t|
t.string "commercial_id" t.string "commercial_id"
t.string "commercial_type" t.string "commercial_type"
@ -130,10 +127,9 @@ ActiveRecord::Schema.define(version: 20160624151257) do
t.string "queue" t.string "queue"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.index ["priority", "run_at"], name: "delayed_jobs_priority"
end end
add_index "delayed_jobs", ["priority", "run_at"], name: "delayed_jobs_priority"
create_table "difficulty_levels", force: :cascade do |t| create_table "difficulty_levels", force: :cascade do |t|
t.string "title" t.string "title"
t.text "description" t.text "description"
@ -323,11 +319,10 @@ ActiveRecord::Schema.define(version: 20160624151257) do
t.string "description" t.string "description"
t.integer "resource_id" t.integer "resource_id"
t.string "resource_type" t.string "resource_type"
t.index ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id"
t.index ["name"], name: "index_roles_on_name"
end end
add_index "roles", ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id"
add_index "roles", ["name"], name: "index_roles_on_name"
create_table "rooms", force: :cascade do |t| create_table "rooms", force: :cascade do |t|
t.string "guid", null: false t.string "guid", null: false
t.string "name", null: false t.string "name", null: false
@ -452,20 +447,18 @@ ActiveRecord::Schema.define(version: 20160624151257) do
t.boolean "is_admin", default: false t.boolean "is_admin", default: false
t.string "username" t.string "username"
t.boolean "is_disabled", default: false t.boolean "is_disabled", default: false
t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
t.index ["email"], name: "index_users_on_email", unique: true
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
t.index ["username"], name: "index_users_on_username", unique: true
end end
add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
add_index "users", ["email"], name: "index_users_on_email", unique: true
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
add_index "users", ["username"], name: "index_users_on_username", unique: true
create_table "users_roles", id: false, force: :cascade do |t| create_table "users_roles", id: false, force: :cascade do |t|
t.integer "role_id" t.integer "role_id"
t.integer "user_id" t.integer "user_id"
t.index ["user_id", "role_id"], name: "index_users_roles_on_user_id_and_role_id"
end end
add_index "users_roles", ["user_id", "role_id"], name: "index_users_roles_on_user_id_and_role_id"
create_table "vchoices", force: :cascade do |t| create_table "vchoices", force: :cascade do |t|
t.integer "vday_id" t.integer "vday_id"
t.integer "vposition_id" t.integer "vposition_id"
@ -505,12 +498,11 @@ ActiveRecord::Schema.define(version: 20160624151257) do
t.text "object" t.text "object"
t.text "object_changes" t.text "object_changes"
t.datetime "created_at" t.datetime "created_at"
t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
end end
add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
create_table "visits", force: :cascade do |t| create_table "visits", force: :cascade do |t|
t.uuid "visitor_id", limit: 16 t.binary "visitor_id", limit: 16
t.string "ip" t.string "ip"
t.text "user_agent" t.text "user_agent"
t.text "referrer" t.text "referrer"
@ -530,10 +522,9 @@ ActiveRecord::Schema.define(version: 20160624151257) do
t.string "utm_content" t.string "utm_content"
t.string "utm_campaign" t.string "utm_campaign"
t.datetime "started_at" t.datetime "started_at"
t.index ["user_id"], name: "index_visits_on_user_id"
end end
add_index "visits", ["user_id"], name: "index_visits_on_user_id"
create_table "votes", force: :cascade do |t| create_table "votes", force: :cascade do |t|
t.integer "event_id" t.integer "event_id"
t.integer "rating" t.integer "rating"