Browse Source

huge-ass update, tweaks

pull/1/head
Nicolae Claudius 11 years ago
parent
commit
d41639ec9d
  1. 105
      Gemfile
  2. 507
      Gemfile.lock
  3. BIN
      app/assets/images/marketing/1.png
  4. BIN
      app/assets/images/marketing/2.png
  5. BIN
      app/assets/images/marketing/3.png
  6. BIN
      app/assets/images/marketing/4.png
  7. BIN
      app/assets/images/marketing/5.png
  8. BIN
      app/assets/images/marketing/arrow_left.png
  9. 3
      app/assets/javascripts/application.js.coffee
  10. 11
      app/assets/javascripts/backbone/entrydns.js.coffee
  11. 0
      app/assets/javascripts/backbone/models/.gitkeep
  12. 0
      app/assets/javascripts/backbone/routers/.gitkeep
  13. 0
      app/assets/javascripts/backbone/templates/.gitkeep
  14. 0
      app/assets/javascripts/backbone/views/.gitkeep
  15. 4
      app/assets/javascripts/components/behaviors.js.coffee
  16. 6
      app/assets/javascripts/components/webshims.js.coffee
  17. 11
      app/assets/stylesheets/application.css.scss
  18. 66
      app/assets/stylesheets/bootstrap-custom.css.scss
  19. 50
      app/assets/stylesheets/pages/home.css.scss
  20. 7
      app/assets/stylesheets/theme/animate.css.scss
  21. 9
      app/assets/stylesheets/theme/errors.css.scss
  22. 34
      app/assets/stylesheets/theme/layout.css.scss
  23. 2
      app/assets/stylesheets/theme/logo.css.scss
  24. 3
      app/assets/stylesheets/theme/nprogress.css.scss
  25. 18
      app/controllers/application_controller.rb
  26. 3
      app/controllers/concerns/records_controller_common.rb
  27. 6
      app/controllers/public/pages_controller.rb
  28. 3
      app/controllers/users/aaaas_controller.rb
  29. 3
      app/controllers/users/as_controller.rb
  30. 3
      app/controllers/users/cnames_controller.rb
  31. 3
      app/controllers/users/mxes_controller.rb
  32. 3
      app/controllers/users/ns_controller.rb
  33. 2
      app/controllers/users/permissions_controller.rb
  34. 7
      app/controllers/users/registrations_controller.rb
  35. 2
      app/controllers/users/soas_controller.rb
  36. 3
      app/controllers/users/srvs_controller.rb
  37. 3
      app/controllers/users/txts_controller.rb
  38. 14
      app/helpers/application_helper.rb
  39. 2
      app/helpers/users/aaaas_helper.rb
  40. 2
      app/helpers/users/as_helper.rb
  41. 2
      app/helpers/users/cnames_helper.rb
  42. 2
      app/helpers/users/hosts_helper.rb
  43. 2
      app/helpers/users/mxes_helper.rb
  44. 2
      app/helpers/users/ns_helper.rb
  45. 2
      app/helpers/users/permissions_helper.rb
  46. 2
      app/helpers/users/soas_helper.rb
  47. 2
      app/helpers/users/srvs_helper.rb
  48. 2
      app/helpers/users/txts_helper.rb
  49. 3
      app/models/admin.rb
  50. 5
      app/models/audit.rb
  51. 2
      app/models/blacklisted_domain.rb
  52. 16
      app/models/domain.rb
  53. 2
      app/models/domain/tree_structure.rb
  54. 2
      app/models/permission.rb
  55. 4
      app/models/record.rb
  56. 2
      app/models/setting.rb
  57. 2
      app/models/srv.rb
  58. 12
      app/models/user.rb
  59. 2
      app/views/layouts/admin.html.erb
  60. 2
      app/views/layouts/errors.html.erb
  61. 2
      app/views/layouts/home.html.erb
  62. 12
      app/views/layouts/public.html.erb
  63. 11
      app/views/layouts/users.html.erb
  64. 8
      app/views/public/pages/contact.html.erb
  65. 15
      app/views/public/pages/contact/_form.html.erb
  66. 13
      app/views/public/pages/donate.html.erb
  67. 65
      app/views/public/pages/home.html.erb
  68. 28
      app/views/public/pages/home/_headlines.html.erb
  69. 47
      app/views/public/pages/home/_slides.html.erb
  70. 3
      app/views/public/pages/notice.html.erb
  71. 7
      app/views/public/pages/shared/_action.html.erb
  72. 4
      app/views/public/pages/team.html.erb
  73. 8
      app/views/public/pages/team/_clyfe.html.erb
  74. 6
      app/views/shared/_bottom.html.erb
  75. 17
      app/views/shared/_navigation.html.erb
  76. 4
      app/views/shared/navigation/_public.html.erb
  77. 4
      app/views/shared/navigation/_users.html.erb
  78. 8
      app/views/users/confirmations/new.html.erb
  79. 6
      app/views/users/passwords/edit.html.erb
  80. 8
      app/views/users/passwords/new.html.erb
  81. 17
      app/views/users/registrations/_new.html.erb
  82. 56
      app/views/users/registrations/edit.html.erb
  83. 21
      app/views/users/registrations/new.html.erb
  84. 15
      app/views/users/sessions/new.html.erb
  85. 2
      app/views/users/shared/_links.erb
  86. 8
      app/views/users/unlocks/new.html.erb
  87. 10
      config/application.rb
  88. 10
      config/environments/development.rb
  89. 5
      config/environments/production.rb
  90. 6
      config/environments/test.rb
  91. 3
      config/initializers/active_scaffold.rb
  92. 1
      config/initializers/audited.rb
  93. 16
      config/initializers/cancan.rb
  94. 2
      config/initializers/devise.rb
  95. 20
      config/initializers/rails_admin.rb
  96. 2
      config/initializers/secret_token.rb
  97. 179
      config/initializers/simple_form.rb
  98. 98
      config/initializers/simple_form.rb.rb
  99. 1
      config/locales/devise.en.yml
  100. 9
      config/routes.rb
  101. Some files were not shown because too many files have changed in this diff Show More

105
Gemfile

@ -1,90 +1,97 @@
source 'http://rubygems.org' source 'http://rubygems.org'
gem 'rails', '3.2.13' gem 'rails', '4.0.0'
# Bundle edge Rails instead: # Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git' # gem 'rails', :git => 'git://github.com/rails/rails.git'
# gem 'pg' # gem 'pg'
gem 'mysql2' gem 'mysql2'
gem 'devise', '~> 2.1.0' gem 'devise', '~> 3.0.3'
gem 'cancan', '= 1.6.7' gem 'cancan', '= 1.6.7'
gem 'squeel', '~> 1.0.0' gem 'squeel', '~> 1.1.0'
gem 'sentient_model', '~> 1.0.4' gem 'sentient_model', '~> 1.0.4'
gem 'userstamp', '~> 2.0.2', gem 'userstamp', '~> 2.0.2',
git: 'https://github.com/delynn/userstamp.git' git: 'https://github.com/delynn/userstamp.git'
gem 'validates_hostname', '~> 1.0.0', gem 'validates_hostname', '~> 1.0.0',
git: 'https://github.com/KimNorgaard/validates_hostname.git' git: 'https://github.com/KimNorgaard/validates_hostname.git'
gem 'nilify_blanks', '~> 1.0.0' gem 'nilify_blanks', '~> 1.0.0'
gem 'rails_config', '~> 0.2.4' gem 'rails_config', '~> 0.3.3'
gem 'rails-settings-cached', '~> 0.3.1'
gem 'active-model-email-validator', '~> 1.0.2' gem 'active-model-email-validator', '~> 1.0.2'
gem 'mail_form', '~> 1.3.0' gem 'mail_form', '~> 1.5.0.rc',
gem 'switch_user', '~> 0.6.0' git: 'https://github.com/plataformatec/mail_form.git'
gem 'simple_form', '~> 2.0.0' gem 'switch_user', '~> 0.9.3'
gem 'simple_form', '~> 3.0.0.rc',
git: 'https://github.com/plataformatec/simple_form.git'
gem 'concerned_with', '~> 0.1.0' gem 'concerned_with', '~> 0.1.0'
gem 'navigasmic', '~> 0.5.6', gem 'navigasmic', '~> 0.5.6',
git: 'https://github.com/jejacks0n/navigasmic.git', git: 'https://github.com/jejacks0n/navigasmic.git',
tag: 'v0.5.6', tag: 'v0.5.6',
ref: '1ffe437f279657c6fb87bb4b0215eb723df4ea7a' ref: '1ffe437f279657c6fb87bb4b0215eb723df4ea7a'
gem 'rails-backbone', '~> 0.7.0' gem 'acts_as_nested_interval', '~> 0.1.0'
gem 'acts_as_nested_interval', '~> 0.0.7' gem 'seedbank', github: 'james2m/seedbank'
# path: '/home/clyfe/dev/acts_as_nested_interval' # gem 'rails_admin', '~> 0.5.0'
# git: 'https://github.com/clyfe/acts_as_nested_interval.git' gem 'unicorn', '~> 4.6.3'
gem 'seedbank', '~> 0.1.3'
gem 'rails_admin', '~> 0.4.5'
gem 'rails-settings-cached', '~> 0.2.2'
gem 'unicorn', '~> 4.5.0'
gem 'audited-activerecord', '~> 3.0'
# Gems used only for assets and not required gem 'sass-rails', '~> 4.0.0'
# in production environments by default. gem 'compass-rails',
group :assets do github: 'milgner/compass-rails',
gem 'sass-rails', '~> 3.2.3' branch: 'rails4'
gem 'compass-rails', '~> 1.0.3' gem 'bootstrap-sass',
gem 'bootstrap-sass', '~> 2.3.0.1' git: 'git://github.com/thomas-mcdonald/bootstrap-sass.git',
gem 'font-awesome-sass-rails', '~> 3.0.0' branch: '3'
gem 'webshims-rails', '~> 0.4.7' gem 'font-awesome-sass-rails', '~> 3.0.0'
gem 'detect_timezone_rails', '~> 0.0.3' gem 'webshims-rails', '~> 1.10.10'
gem 'jquery-cookie-rails', '~> 1.3.1' gem 'detect_timezone_rails', '~> 0.0.3'
gem 'coffee-rails', "~> 3.2.1" # gem 'jquery-cookie-rails', '~> 1.3.1'
gem 'uglifier', '>= 1.0.3' gem 'nprogress-rails', '~> 0.1.2.2'
gem 'oily_png', '1.0.2' gem 'animate-rails', '~> 1.0.0'
gem 'turbo-sprockets-rails3', '0.3.6' gem 'coffee-rails', '~> 4.0.0'
gem 'therubyracer' gem 'uglifier', '>= 1.3.0'
end gem 'oily_png', '1.1.0'
gem 'therubyracer'
gem 'jquery-rails', '~> 2.1.3' gem 'jquery-rails', '~> 3.0.4'
gem 'jquery-ui-rails', '~> 4.0.4'
gem 'dalli', '~> 2.6.2' gem 'dalli', '~> 2.6.2'
gem 'active_scaffold', '~> 3.2.19' gem 'active_scaffold', '~> 3.3.4.rc',
# git: 'https://github.com/activescaffold/active_scaffold.git' git: 'https://github.com/activescaffold/active_scaffold.git'
# path: '/home/clyfe/dev/active_scaffold' # path: '/home/clyfe/dev/active_scaffold'
gem 'turbolinks', '~> 1.0.0' gem 'turbolinks', '~> 1.3.0'
# gem 'foreigner' ? # gem 'foreigner' ?
group :development do group :development do
gem 'capistrano', '~> 2.9.0' gem 'capistrano', '~> 2.15.5'
gem 'capistrano-ext', '~> 1.2.1' gem 'capistrano-ext', '~> 1.2.1'
gem 'mongrel', '>= 1.2.0.pre2' gem 'mongrel', '>= 1.2.0.pre2'
gem 'quiet_assets', '~> 1.0.1' gem 'quiet_assets', '~> 1.0.1'
gem 'meta_request', '0.2.1' gem 'parallel_tests', '0.15.3'
gem 'parallel_tests', '0.10.0'
gem 'progress_bar', require: false gem 'progress_bar', require: false
gem 'yaml_db', '0.2.3'
# gem 'mailcatcher', '0.5.11'
# gem 'spring', '0.0.10'
gem 'better_errors', '0.9.0'
gem 'binding_of_caller', '0.7.2'
# gem 'figaro', '0.7.0'
gem 'debase', '~> 0.0.4'
gem 'ruby-debug-ide', '~> 0.4.18'
end end
group :test, :development do group :test, :development do
gem 'sourcify', '~> 0.6.0.rc1' gem 'sourcify', '~> 0.6.0.rc1'
gem 'rspec-rails', '~> 2.10.1' gem 'rspec-rails', '~> 2.14.0'
gem 'faker','~> 1.0.1' gem 'faker','~> 1.2.0'
gem 'factory_girl_rails', '~> 1.6.0' gem 'factory_girl_rails', '~> 4.2.1'
end end
group :test do group :test do
gem 'capybara', '~> 1.1.1' gem 'capybara', '~> 2.1.0'
gem 'database_cleaner', '~> 0.7.1' gem 'database_cleaner', '~> 1.1.1'
gem 'simplecov', :require => false gem 'simplecov', :require => false
gem 'spork', '~> 1.0.0.rc0' gem 'rb-inotify', '~> 0.9.0'
gem 'rb-inotify', '~> 0.8.8' gem 'libnotify', '~> 0.8.1'
gem 'libnotify', '~> 0.7.2' gem 'guard', '1.8.2'
gem 'guard-rspec', '~> 0.6.0' gem 'guard-rspec', '3.0.2'
gem 'guard-spork', '~> 0.5.1'
end end

507
Gemfile.lock

@ -1,9 +1,38 @@
GIT
remote: git://github.com/james2m/seedbank.git
revision: c7a272751336f0d17103028f45b88eac62cbedd7
specs:
seedbank (0.3.0.pre2)
GIT
remote: git://github.com/milgner/compass-rails.git
revision: c86e7fd9c2605c80816a2f64a3fb8b7c3a09e494
branch: rails4
specs:
compass-rails (1.0.3)
compass (>= 0.12.2, < 0.14)
GIT
remote: git://github.com/thomas-mcdonald/bootstrap-sass.git
revision: 4a8d1a9add83896cbc5f5441e209b00626f74338
branch: 3
specs:
bootstrap-sass (3.0.0.0)
sass (~> 3.2)
GIT GIT
remote: https://github.com/KimNorgaard/validates_hostname.git remote: https://github.com/KimNorgaard/validates_hostname.git
revision: 6421e9bd8261a2fe010c627191a0dbe30352469f revision: 6421e9bd8261a2fe010c627191a0dbe30352469f
specs: specs:
validates_hostname (1.0.0) validates_hostname (1.0.0)
GIT
remote: https://github.com/activescaffold/active_scaffold.git
revision: 425c3702d102ee5c6387be35012175f8f170ca4d
specs:
active_scaffold (3.3.4.rc)
rails (>= 3.2.6, < 5)
GIT GIT
remote: https://github.com/delynn/userstamp.git remote: https://github.com/delynn/userstamp.git
revision: 777633aa564f8457c999ddb96afa4c5ae18d319f revision: 777633aa564f8457c999ddb96afa4c5ae18d319f
@ -18,54 +47,67 @@ GIT
specs: specs:
navigasmic (0.5.6) navigasmic (0.5.6)
GIT
remote: https://github.com/plataformatec/mail_form.git
revision: 9eb221a9c5e3f6dad631a547c7518fc0d1cde070
specs:
mail_form (1.5.0.rc)
actionmailer (>= 3.2, < 5)
activemodel (>= 3.2, < 5)
GIT
remote: https://github.com/plataformatec/simple_form.git
revision: 359606f222fa0972a4a14ec70140ac00f7c80839
specs:
simple_form (3.0.0.rc)
actionpack (>= 4.0.0, < 4.1)
activemodel (>= 4.0.0, < 4.1)
GEM GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
specs: specs:
actionmailer (3.2.13) actionmailer (4.0.0)
actionpack (= 3.2.13) actionpack (= 4.0.0)
mail (~> 2.5.3) mail (~> 2.5.3)
actionpack (3.2.13) actionpack (4.0.0)
activemodel (= 3.2.13) activesupport (= 4.0.0)
activesupport (= 3.2.13) builder (~> 3.1.0)
builder (~> 3.0.0)
erubis (~> 2.7.0) erubis (~> 2.7.0)
journey (~> 1.0.4) rack (~> 1.5.2)
rack (~> 1.4.5) rack-test (~> 0.6.2)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
active-model-email-validator (1.0.2) active-model-email-validator (1.0.2)
activemodel activemodel
mail mail
active_scaffold (3.2.20) activemodel (4.0.0)
rails (>= 3.1.3) activesupport (= 4.0.0)
activemodel (3.2.13) builder (~> 3.1.0)
activesupport (= 3.2.13) activerecord (4.0.0)
builder (~> 3.0.0) activemodel (= 4.0.0)
activerecord (3.2.13) activerecord-deprecated_finders (~> 1.0.2)
activemodel (= 3.2.13) activesupport (= 4.0.0)
activesupport (= 3.2.13) arel (~> 4.0.0)
arel (~> 3.0.2) activerecord-deprecated_finders (1.0.3)
tzinfo (~> 0.3.29) activesupport (4.0.0)
activeresource (3.2.13) i18n (~> 0.6, >= 0.6.4)
activemodel (= 3.2.13) minitest (~> 4.2)
activesupport (= 3.2.13) multi_json (~> 1.3)
activesupport (3.2.13) thread_safe (~> 0.1)
i18n (= 0.6.1) tzinfo (~> 0.3.37)
multi_json (~> 1.0) acts_as_nested_interval (0.1.0)
acts_as_nested_interval (0.0.10) rails (>= 3.2.1, < 5)
rails (~> 3.2.1) animate-rails (1.0.0)
arel (3.0.2) rails
audited (3.0.0) arel (4.0.0)
audited-activerecord (3.0.0) atomic (1.1.13)
activerecord (~> 3.0) bcrypt-ruby (3.1.1)
audited (= 3.0.0) better_errors (0.9.0)
bcrypt-ruby (3.0.1) coderay (>= 1.0.0)
bootstrap-sass (2.3.0.1) erubis (>= 2.6.6)
sass (~> 3.2) binding_of_caller (0.7.2)
builder (3.0.4) debug_inspector (>= 0.0.1)
builder (3.1.4)
cancan (1.6.7) cancan (1.6.7)
capistrano (2.9.0) capistrano (2.15.5)
highline highline
net-scp (>= 1.0.0) net-scp (>= 1.0.0)
net-sftp (>= 2.0.0) net-sftp (>= 2.0.0)
@ -73,55 +115,50 @@ GEM
net-ssh-gateway (>= 1.1.0) net-ssh-gateway (>= 1.1.0)
capistrano-ext (1.2.1) capistrano-ext (1.2.1)
capistrano (>= 1.0.0) capistrano (>= 1.0.0)
capybara (1.1.4) capybara (2.1.0)
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)
selenium-webdriver (~> 2.0) xpath (~> 2.0)
xpath (~> 0.1.4)
childprocess (0.3.9)
ffi (~> 1.0, >= 1.0.11)
chunky_png (1.2.8) chunky_png (1.2.8)
coderay (1.0.9) coderay (1.0.9)
coffee-rails (3.2.2) coffee-rails (4.0.0)
coffee-script (>= 2.2.0) coffee-script (>= 2.2.0)
railties (~> 3.2.0) railties (>= 4.0.0.beta, < 5.0)
coffee-script (2.2.0) coffee-script (2.2.0)
coffee-script-source coffee-script-source
execjs execjs
coffee-script-source (1.6.2) coffee-script-source (1.6.3)
compass (0.12.2) compass (0.12.2)
chunky_png (~> 1.2) chunky_png (~> 1.2)
fssm (>= 0.2.7) fssm (>= 0.2.7)
sass (~> 3.1) sass (~> 3.1)
compass-rails (1.0.3)
compass (>= 0.12.2, < 0.14)
concerned_with (0.1.0) concerned_with (0.1.0)
daemons (1.0.10) daemons (1.0.10)
dalli (2.6.2) dalli (2.6.4)
database_cleaner (0.7.2) database_cleaner (1.1.1)
detect_timezone_rails (0.0.3) debase (0.0.4)
railties (~> 3.1) debug_inspector (0.0.2)
devise (2.1.3) detect_timezone_rails (0.0.5)
railties (>= 3.1)
devise (3.0.3)
bcrypt-ruby (~> 3.0) bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1) orm_adapter (~> 0.1)
railties (~> 3.1) railties (>= 3.2.6, < 5)
warden (~> 1.2.1) warden (~> 1.2.3)
diff-lcs (1.1.3) diff-lcs (1.2.4)
ejs (1.0.0)
erubis (2.7.0) erubis (2.7.0)
execjs (1.4.0) execjs (2.0.0)
multi_json (~> 1.0) factory_girl (4.2.0)
factory_girl (2.5.2) activesupport (>= 3.0.0)
activesupport (>= 2.3.9) factory_girl_rails (4.2.1)
factory_girl_rails (1.6.0) factory_girl (~> 4.2.0)
factory_girl (~> 2.5.0)
railties (>= 3.0.0) railties (>= 3.0.0)
faker (1.0.1) faker (1.2.0)
i18n (~> 0.4) i18n (~> 0.5)
fattr (2.2.1) fattr (2.2.1)
ffi (1.0.11) ffi (1.9.0)
file-tail (1.0.12) file-tail (1.0.12)
tins (~> 0.5) tins (~> 0.5)
font-awesome-sass-rails (3.0.2.2) font-awesome-sass-rails (3.0.2.2)
@ -130,297 +167,249 @@ GEM
formatador (0.2.4) formatador (0.2.4)
fssm (0.2.10) fssm (0.2.10)
gem_plugin (0.2.3) gem_plugin (0.2.3)
guard (1.7.0) guard (1.8.2)
formatador (>= 0.2.4) formatador (>= 0.2.4)
listen (>= 0.6.0) listen (>= 1.0.0)
lumberjack (>= 1.0.2) lumberjack (>= 1.0.2)
pry (>= 0.9.10) pry (>= 0.9.10)
thor (>= 0.14.6) thor (>= 0.14.6)
guard-rspec (0.6.0) guard-rspec (3.0.2)
guard (>= 0.10.0) guard (>= 1.8)
guard-spork (0.5.2) rspec (~> 2.13)
guard (>= 0.10.0) highline (1.6.19)
spork (>= 0.8.4) hike (1.2.3)
haml (4.0.2) i18n (0.6.5)
tilt jquery-rails (3.0.4)
highline (1.6.18)
hike (1.2.2)
i18n (0.6.1)
journey (1.0.4)
jquery-cookie-rails (1.3.1)
jquery-rails (~> 2.0)
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
version (~> 1.0)
jquery-rails (2.1.4)
railties (>= 3.0, < 5.0) railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
jquery-ui-rails (3.0.1) jquery-ui-rails (4.0.4)
jquery-rails jquery-rails
railties (>= 3.1.0) railties (>= 3.1.0)
json (1.7.7)
kaminari (0.14.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kgio (2.8.0) kgio (2.8.0)
libnotify (0.7.4) libnotify (0.8.1)
ffi (~> 1.0.11) ffi (>= 1.0.11)
libv8 (3.11.8.17) libv8 (3.16.14.3)
listen (0.7.3) listen (1.3.0)
lumberjack (1.0.3) rb-fsevent (>= 0.9.3)
mail (2.5.3) rb-inotify (>= 0.9)
i18n (>= 0.4.0) rb-kqueue (>= 0.2)
lumberjack (1.0.4)
mail (2.5.4)
mime-types (~> 1.16) mime-types (~> 1.16)
treetop (~> 1.4.8) treetop (~> 1.4.8)
mail_form (1.3.0) method_source (0.8.2)
meta_request (0.2.1) mime-types (1.24)
rack-contrib mini_portile (0.5.1)
rails minitest (4.7.5)
method_source (0.8.1)
mime-types (1.23)
mongrel (1.2.0.pre2) mongrel (1.2.0.pre2)
daemons (~> 1.0.10) daemons (~> 1.0.10)
gem_plugin (~> 0.2.3) gem_plugin (~> 0.2.3)
multi_json (1.7.2) multi_json (1.7.9)
mysql2 (0.3.11) mysql2 (0.3.13)
nested_form (0.3.2) net-scp (1.1.2)
net-scp (1.1.0)
net-ssh (>= 2.6.5) net-ssh (>= 2.6.5)
net-sftp (2.1.1) net-sftp (2.1.2)
net-ssh (>= 2.6.5) net-ssh (>= 2.6.5)
net-ssh (2.6.7) net-ssh (2.6.8)
net-ssh-gateway (1.2.0) net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5) net-ssh (>= 2.6.5)
nilify_blanks (1.0.0) nilify_blanks (1.0.1)
activerecord (>= 3.0.0) activerecord (>= 3.0.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
nokogiri (1.5.9) nokogiri (1.6.0)
oily_png (1.0.2) mini_portile (~> 0.5.0)
chunky_png (~> 1.2.1) nprogress-rails (0.1.2.2)
oily_png (1.1.0)
chunky_png (~> 1.2.7)
options (2.3.0) options (2.3.0)
fattr fattr
orm_adapter (0.4.0) orm_adapter (0.4.0)
parallel (0.6.4) parallel (0.7.1)
parallel_tests (0.10.0) parallel_tests (0.15.3)
parallel parallel
polyamorous (0.5.0) polyamorous (0.6.3)
activerecord (~> 3.0) activerecord (>= 3.0)
polyglot (0.3.3) polyglot (0.3.3)
progress_bar (1.0.0) progress_bar (1.0.0)
highline (~> 1.6.1) highline (~> 1.6.1)
options (~> 2.3.0) options (~> 2.3.0)
pry (0.9.12.1) pry (0.9.12.2)
coderay (~> 1.0.5) coderay (~> 1.0.5)
method_source (~> 0.8) method_source (~> 0.8)
slop (~> 3.4) slop (~> 3.4)
quiet_assets (1.0.2) quiet_assets (1.0.2)
railties (>= 3.1, < 5.0) railties (>= 3.1, < 5.0)
rack (1.4.5) rack (1.5.2)
rack-cache (1.2)
rack (>= 0.4)
rack-contrib (1.1.0)
rack (>= 0.9.1)
rack-pjax (0.7.0)
nokogiri (~> 1.5)
rack (~> 1.3)
rack-ssl (1.3.3)
rack
rack-test (0.6.2) rack-test (0.6.2)
rack (>= 1.0) rack (>= 1.0)
rails (3.2.13) rails (4.0.0)
actionmailer (= 3.2.13) actionmailer (= 4.0.0)
actionpack (= 3.2.13) actionpack (= 4.0.0)
activerecord (= 3.2.13) activerecord (= 4.0.0)
activeresource (= 3.2.13) activesupport (= 4.0.0)
activesupport (= 3.2.13) bundler (>= 1.3.0, < 2.0)
bundler (~> 1.0) railties (= 4.0.0)
railties (= 3.2.13) sprockets-rails (~> 2.0.0)
rails-backbone (0.7.2) rails-settings-cached (0.3.1)
coffee-script (~> 2.2.0) rails (>= 4.0.0.beta1)
ejs (~> 1.0.0) rails_config (0.3.3)
railties (>= 3.1.0)
rails-settings-cached (0.2.4)
rails (>= 3.0.0)
rails_admin (0.4.7)
bootstrap-sass (~> 2.2)
builder (~> 3.0)
coffee-rails (~> 3.1)
font-awesome-sass-rails (~> 3.0, >= 3.0.0.1)
haml (~> 4.0)
jquery-rails (~> 2.1)
jquery-ui-rails (~> 3.0)
kaminari (~> 0.14)
nested_form (~> 0.3)
rack-pjax (~> 0.6)
rails (~> 3.1)
remotipart (~> 1.0)
safe_yaml (~> 0.6)
sass-rails (~> 3.1)
rails_config (0.2.7)
activesupport (>= 3.0) activesupport (>= 3.0)
railties (3.2.13) railties (4.0.0)
actionpack (= 3.2.13) actionpack (= 4.0.0)
activesupport (= 3.2.13) activesupport (= 4.0.0)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7) rake (>= 0.8.7)
rdoc (~> 3.4) thor (>= 0.18.1, < 2.0)
thor (>= 0.14.6, < 2.0)
raindrops (0.11.0) raindrops (0.11.0)
rake (10.0.4) rake (10.1.0)
rb-inotify (0.8.8) rb-fsevent (0.9.3)
rb-inotify (0.9.1)
ffi (>= 0.5.0)
rb-kqueue (0.2.0)
ffi (>= 0.5.0) ffi (>= 0.5.0)
rdoc (3.12.2) ref (1.0.5)
json (~> 1.4) rspec (2.14.1)
ref (1.0.4) rspec-core (~> 2.14.0)
remotipart (1.0.5) rspec-expectations (~> 2.14.0)
rspec (2.10.0) rspec-mocks (~> 2.14.0)
rspec-core (~> 2.10.0) rspec-core (2.14.5)
rspec-expectations (~> 2.10.0) rspec-expectations (2.14.2)
rspec-mocks (~> 2.10.0) diff-lcs (>= 1.1.3, < 2.0)
rspec-core (2.10.1) rspec-mocks (2.14.3)
rspec-expectations (2.10.0) rspec-rails (2.14.0)
diff-lcs (~> 1.1.3)
rspec-mocks (2.10.1)
rspec-rails (2.10.1)
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
railties (>= 3.0) railties (>= 3.0)
rspec (~> 2.10.0) rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
ruby-debug-ide (0.4.18)
rake (>= 0.8.1)
ruby2ruby (1.3.1) ruby2ruby (1.3.1)
ruby_parser (~> 2.0) ruby_parser (~> 2.0)
sexp_processor (~> 3.0) sexp_processor (~> 3.0)
ruby_parser (2.3.1) ruby_parser (2.3.1)
sexp_processor (~> 3.0) sexp_processor (~> 3.0)
rubyzip (0.9.9) sass (3.2.10)
safe_yaml (0.9.1) sass-rails (4.0.0)
sass (3.2.7) railties (>= 4.0.0.beta, < 5.0)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10) sass (>= 3.1.10)
tilt (~> 1.3) sprockets-rails (~> 2.0.0)
seedbank (0.1.3)
selenium-webdriver (2.32.1)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
rubyzip
websocket (~> 1.0.4)
sentient_model (1.0.4) sentient_model (1.0.4)
bundler (>= 1.0) bundler (>= 1.0)
sexp_processor (3.2.0) sexp_processor (3.2.0)
simple_form (2.0.4)
actionpack (~> 3.0)
activemodel (~> 3.0)
simplecov (0.7.1) simplecov (0.7.1)
multi_json (~> 1.0) multi_json (~> 1.0)
simplecov-html (~> 0.7.1) simplecov-html (~> 0.7.1)
simplecov-html (0.7.1) simplecov-html (0.7.1)
slop (3.4.4) slop (3.4.6)
sourcify (0.6.0.rc4) sourcify (0.6.0.rc4)
file-tail (~> 1.0.10) file-tail (~> 1.0.10)
ruby2ruby (~> 1.3.1) ruby2ruby (~> 1.3.1)
ruby_parser (~> 2.3.1) ruby_parser (~> 2.3.1)
sexp_processor (~> 3.2.0) sexp_processor (~> 3.2.0)
spork (1.0.0rc3) sprockets (2.10.0)
sprockets (2.2.2)
hike (~> 1.2) hike (~> 1.2)
multi_json (~> 1.0) multi_json (~> 1.0)
rack (~> 1.0) rack (~> 1.0)
tilt (~> 1.1, != 1.3.0) tilt (~> 1.1, != 1.3.0)
squeel (1.0.18) sprockets-rails (2.0.0)
activerecord (~> 3.0) actionpack (>= 3.0)
activesupport (~> 3.0) activesupport (>= 3.0)
polyamorous (~> 0.5.0) sprockets (~> 2.8)
switch_user (0.6.0) squeel (1.1.0)
therubyracer (0.11.4) activerecord (>= 3.0)
libv8 (~> 3.11.8.12) activesupport (>= 3.0)
polyamorous (~> 0.6.0)
switch_user (0.9.3)
therubyracer (0.12.0)
libv8 (~> 3.16.14.0)
ref ref
thor (0.18.1) thor (0.18.1)
tilt (1.3.7) thread_safe (0.1.2)
tins (0.7.2) atomic
treetop (1.4.12) tilt (1.4.1)
tins (0.9.0)
treetop (1.4.15)
polyglot polyglot
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
turbo-sprockets-rails3 (0.3.6) turbolinks (1.3.0)
railties (> 3.2.8, < 4.0.0)
sprockets (>= 2.0.0)
turbolinks (1.0.0)
coffee-rails coffee-rails
tzinfo (0.3.37) tzinfo (0.3.37)
uglifier (2.0.1) uglifier (2.1.2)
execjs (>= 0.3.0) execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2) multi_json (~> 1.0, >= 1.0.2)
unicorn (4.5.0) unicorn (4.6.3)
kgio (~> 2.6) kgio (~> 2.6)
rack rack
raindrops (~> 0.7) raindrops (~> 0.7)
version (1.0.0) warden (1.2.3)
warden (1.2.1)
rack (>= 1.0) rack (>= 1.0)
webshims-rails (0.4.7) webshims-rails (1.10.11)
rails (> 3.1.0) rails (> 3.1.0)
websocket (1.0.7) xpath (2.0.0)
xpath (0.1.4)
nokogiri (~> 1.3) nokogiri (~> 1.3)
yaml_db (0.2.3)
PLATFORMS PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
active-model-email-validator (~> 1.0.2) active-model-email-validator (~> 1.0.2)
active_scaffold (~> 3.2.19) active_scaffold (~> 3.3.4.rc)!
acts_as_nested_interval (~> 0.0.7) acts_as_nested_interval (~> 0.1.0)
audited-activerecord (~> 3.0) animate-rails (~> 1.0.0)
bootstrap-sass (~> 2.3.0.1) better_errors (= 0.9.0)
binding_of_caller (= 0.7.2)
bootstrap-sass!
cancan (= 1.6.7) cancan (= 1.6.7)
capistrano (~> 2.9.0) capistrano (~> 2.15.5)
capistrano-ext (~> 1.2.1) capistrano-ext (~> 1.2.1)
capybara (~> 1.1.1) capybara (~> 2.1.0)
coffee-rails (~> 3.2.1) coffee-rails (~> 4.0.0)
compass-rails (~> 1.0.3) compass-rails!
concerned_with (~> 0.1.0) concerned_with (~> 0.1.0)
dalli (~> 2.6.2) dalli (~> 2.6.2)
database_cleaner (~> 0.7.1) database_cleaner (~> 1.1.1)
debase (~> 0.0.4)
detect_timezone_rails (~> 0.0.3) detect_timezone_rails (~> 0.0.3)
devise (~> 2.1.0) devise (~> 3.0.3)
factory_girl_rails (~> 1.6.0) factory_girl_rails (~> 4.2.1)
faker (~> 1.0.1) faker (~> 1.2.0)
font-awesome-sass-rails (~> 3.0.0) font-awesome-sass-rails (~> 3.0.0)
guard-rspec (~> 0.6.0) guard (= 1.8.2)
guard-spork (~> 0.5.1) guard-rspec (= 3.0.2)
jquery-cookie-rails (~> 1.3.1) jquery-rails (~> 3.0.4)
jquery-rails (~> 2.1.3) jquery-ui-rails (~> 4.0.4)
libnotify (~> 0.7.2) libnotify (~> 0.8.1)
mail_form (~> 1.3.0) mail_form (~> 1.5.0.rc)!
meta_request (= 0.2.1)
mongrel (>= 1.2.0.pre2) mongrel (>= 1.2.0.pre2)
mysql2 mysql2
navigasmic (~> 0.5.6)! navigasmic (~> 0.5.6)!
nilify_blanks (~> 1.0.0) nilify_blanks (~> 1.0.0)
oily_png (= 1.0.2) nprogress-rails (~> 0.1.2.2)
parallel_tests (= 0.10.0) oily_png (= 1.1.0)
parallel_tests (= 0.15.3)
progress_bar progress_bar
quiet_assets (~> 1.0.1) quiet_assets (~> 1.0.1)
rails (= 3.2.13) rails (= 4.0.0)
rails-backbone (~> 0.7.0) rails-settings-cached (~> 0.3.1)
rails-settings-cached (~> 0.2.2) rails_config (~> 0.3.3)
rails_admin (~> 0.4.5) rb-inotify (~> 0.9.0)
rails_config (~> 0.2.4) rspec-rails (~> 2.14.0)
rb-inotify (~> 0.8.8) ruby-debug-ide (~> 0.4.18)
rspec-rails (~> 2.10.1) sass-rails (~> 4.0.0)
sass-rails (~> 3.2.3) seedbank!
seedbank (~> 0.1.3)
sentient_model (~> 1.0.4) sentient_model (~> 1.0.4)
simple_form (~> 2.0.0) simple_form (~> 3.0.0.rc)!
simplecov simplecov
sourcify (~> 0.6.0.rc1) sourcify (~> 0.6.0.rc1)
spork (~> 1.0.0.rc0) squeel (~> 1.1.0)
squeel (~> 1.0.0) switch_user (~> 0.9.3)
switch_user (~> 0.6.0)
therubyracer therubyracer
turbo-sprockets-rails3 (= 0.3.6) turbolinks (~> 1.3.0)
turbolinks (~> 1.0.0) uglifier (>= 1.3.0)
uglifier (>= 1.0.3) unicorn (~> 4.6.3)
unicorn (~> 4.5.0)
userstamp (~> 2.0.2)! userstamp (~> 2.0.2)!
validates_hostname (~> 1.0.0)! validates_hostname (~> 1.0.0)!
webshims-rails (~> 0.4.7) webshims-rails (~> 1.10.10)
yaml_db (= 0.2.3)

BIN
app/assets/images/marketing/1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 88 KiB

BIN
app/assets/images/marketing/2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 57 KiB

BIN
app/assets/images/marketing/3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 93 KiB

BIN
app/assets/images/marketing/4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 69 KiB

BIN
app/assets/images/marketing/5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 90 KiB

BIN
app/assets/images/marketing/arrow_left.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

3
app/assets/javascripts/application.js.coffee

@ -5,14 +5,13 @@
# the compiled file. # the compiled file.
# #
#= require jquery #= require jquery
#= require jquery-ui
#= require jquery_ujs #= require jquery_ujs
#= require turbolinks #= require turbolinks
#= require slides
#= require bootstrap #= require bootstrap
#= require active_scaffold #= require active_scaffold
#= require jquery.cookie #= require jquery.cookie
#= require detect_timezone #= require detect_timezone
#= require jquery.detect_timezone #= require jquery.detect_timezone
#= require nprogress
#= require_tree ./components #= require_tree ./components
#= require_self #= require_self

11
app/assets/javascripts/backbone/entrydns.js.coffee

@ -1,11 +0,0 @@
#= require_self
#= require_tree ./templates
#= require_tree ./models
#= require_tree ./views
#= require_tree ./routers
window.App =
Models: {}
Collections: {}
Routers: {}
Views: {}

0
app/assets/javascripts/backbone/models/.gitkeep

0
app/assets/javascripts/backbone/routers/.gitkeep

0
app/assets/javascripts/backbone/templates/.gitkeep

0
app/assets/javascripts/backbone/views/.gitkeep

4
app/assets/javascripts/components/behaviors.js.coffee

@ -4,3 +4,7 @@ $document.on 'mouseenter', '[rel=tooltip]', -> $(@).tooltip('show')
$document.on 'mouseleave', '[rel=tooltip]', -> $(@).tooltip('hide') $document.on 'mouseleave', '[rel=tooltip]', -> $(@).tooltip('hide')
$document.popover(selector: '[rel=popover]', trigger: 'hover', html: true) $document.popover(selector: '[rel=popover]', trigger: 'hover', html: true)
$document.on 'page:fetch', -> NProgress.start()
$document.on 'page:change', -> NProgress.done()
$document.on 'page:restore', -> NProgress.remove()

6
app/assets/javascripts/components/webshims.js.coffee

@ -1,5 +1,5 @@
#= require webshims/minified/extras/modernizr-custom #= require webshims/extras/modernizr-custom
#= require webshims/minified/polyfiller #= require webshims/polyfiller
$.webshims.setOptions('basePath', '/assets/webshims/minified/shims/') $.webshims.setOptions('basePath', '/assets/webshims/shims/')
$.webshims.polyfill() $.webshims.polyfill()

11
app/assets/stylesheets/application.css.scss

@ -3,12 +3,17 @@
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope. * the top of the compiled file, but it's generally better to create a new file per style scope.
*= require slides *= require nprogress
*= require animate
*= require_self *= require_self
*/ */
@import "bootstrap-custom"; $label_color: #555; // hack for as labels ...
@import "bootstrap-responsive"; $carousel-indicator-border-color: #333;
$carousel-indicator-active-bg: #333;
@import "bootstrap";
@import "bootstrap/theme";
@import 'font-awesome'; @import 'font-awesome';
@import "active_scaffold"; @import "active_scaffold";
@import "theme/*"; @import "theme/*";

66
app/assets/stylesheets/bootstrap-custom.css.scss

@ -1,66 +0,0 @@
//
// Remove icons since we use font-awesome
//
/*!
* Bootstrap v2.3.0
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
*/
// Core variables and mixins
@import "bootstrap/variables"; // Modify this for custom colors, font-sizes, etc
@import "bootstrap/mixins";
// CSS Reset
@import "bootstrap/reset";
// Grid system and page structure
@import "bootstrap/scaffolding";
@import "bootstrap/grid";
@import "bootstrap/layouts";
// Base CSS
@import "bootstrap/type";
@import "bootstrap/code";
@import "bootstrap/forms";
@import "bootstrap/tables";
// Components: common
//@import "bootstrap/sprites";
@import "bootstrap/dropdowns";
@import "bootstrap/wells";
@import "bootstrap/component-animations";
@import "bootstrap/close";
// Components: Buttons & Alerts
@import "bootstrap/buttons";
@import "bootstrap/button-groups";
@import "bootstrap/alerts"; // Note: alerts share common CSS with buttons and thus have styles in buttons
// Components: Nav
@import "bootstrap/navs";
@import "bootstrap/navbar";
@import "bootstrap/breadcrumbs";
@import "bootstrap/pagination";
@import "bootstrap/pager";
// Components: Popovers
@import "bootstrap/modals";
@import "bootstrap/tooltip";
@import "bootstrap/popovers";
// Components: Misc
@import "bootstrap/thumbnails";
@import "bootstrap/media";
@import "bootstrap/labels-badges";
@import "bootstrap/progress-bars";
@import "bootstrap/accordion";
@import "bootstrap/carousel";
@import "bootstrap/hero-unit";
// Utility classes
@import "bootstrap/utilities"; // Has to be last to override when necessary

50
app/assets/stylesheets/pages/home.css.scss

@ -1,29 +1,24 @@
@import "compass/css3/images"; @import "compass/css3/images";
@import "compass/css3/border-radius";
.call-to-action { .contour {
margin-top: 3em; border: 2px solid $text-color;
margin-bottom: 3em; padding: 1em;
small { @include border-radius($border-radius-large);
font-style: italic; br.hide {
font-size: 80% display: block !important;
visibility: visible !important;
} }
} }
.twitter-share-button {
font-size: 14px;
font-weight: normal;
}
.page-home-header { .page-home-header {
@include background(radial-gradient(color-stops(#fff, #c1f1ff), bottom)); @include background(radial-gradient(color-stops(#fff, #c1f1ff), bottom));
border-bottom: 1px solid #B9DCFF; border-bottom: 1px solid #B9DCFF;
.page-header { .page-header {
small { small { color: #3F3F39; }
color: #3F3F39;
}
border-bottom: none; border-bottom: none;
padding-bottom: 0; padding-bottom: 0;
margin-bottom: 20px; margin: 20px 0 20px;
} }
} }
@ -34,10 +29,6 @@
padding-top: 17px; padding-top: 17px;
padding-bottom: 17px; padding-bottom: 17px;
border-bottom: 1px solid darken(#DAFFCD, 15%); border-bottom: 1px solid darken(#DAFFCD, 15%);
li, p {
font-size: 14px;
line-height: 20px;
}
} }
.page-home-quotes { .page-home-quotes {
@ -49,27 +40,6 @@
} }
} }
.page-home-extra {
padding-top: 17px;
}
@media (max-width: 767px) {
body.with-home-section {
padding-left: 0px;
padding-right: 0px;
.navbar-fixed-top,
.navbar-fixed-bottom {
margin-left: 0px;
margin-right: 0px;
}
.page-home-section {
padding-left: 20px;
padding-right: 20px;
}
}
}
.public .alert { .public .alert {
margin-bottom: 0; margin-bottom: 0;
} }

7
app/assets/stylesheets/theme/animate.css.scss

@ -0,0 +1,7 @@
.animated.fast {
-webkit-animation-duration:0.5s;
-moz-animation-duration:0.5s;
-ms-animation-duration:0.5s;
-o-animation-duration:0.5s;
animation-duration:0.5s;
}

9
app/assets/stylesheets/theme/errors.css.scss

@ -2,18 +2,19 @@
#error_explanation { #error_explanation {
@extend .alert; @extend .alert;
@extend .alert-error; @extend .alert-danger;
h2 { h2 {
color: $errorText; color: $state-danger-text;
margin-top: 0;
} }
} }
.field_with_errors { .field_with_errors {
display: table; display: table;
label { label {
color: $errorText; color: $state-danger-text;
} }
input, textarea, select { input, textarea, select {
border: 1px solid $errorBorder;; border: 1px solid $state-danger-border;
} }
} }

34
app/assets/stylesheets/theme/layout.css.scss

@ -1,23 +1,33 @@
$footer-size: 120px;
body { body {
background: #f7fdff; background: #f7fdff;
padding-top: 50px;
} }
@media (max-width: 980px) { html, body {
.navbar-fixed-top { height: 100%;
margin-bottom: 0px;
}
} }
@media (min-width: 980px) { #wrap {
#main { min-height: 100%;
margin-top: 40px; height: auto !important;
} height: 100%;
margin: 0 auto (-$footer-size);
} }
#push {
height: $footer-size;
}
.footer { #footer {
margin-top: 25px; height: $footer-size;
padding: 15px 0 15px;
border-top: 1px solid #E5E5E5;
} }
.page-header {
text-align: center;
margin-top: 20px;
h1 {
margin-top: 0;
}
}

2
app/assets/stylesheets/theme/logo.css.scss

@ -2,7 +2,7 @@
@import "compass/css3/box-shadow"; @import "compass/css3/box-shadow";
@import "compass/css3/text-shadow"; @import "compass/css3/text-shadow";
.navbar .brand { .navbar .navbar-brand {
color: #53d4ff; color: #53d4ff;
@include text-shadow( @include text-shadow(
0 1px 0 rgba(0, 0, 0, 0.6), 0 1px 0 rgba(0, 0, 0, 0.6),

3
app/assets/stylesheets/theme/nprogress.css.scss

@ -0,0 +1,3 @@
#nprogress .bar, #nprogress .spinner {
z-index: 2000;
}

18
app/controllers/application_controller.rb

@ -39,7 +39,6 @@ class ApplicationController < ActionController::Base
render :nothing => true if params[Settings.honeypot].present? render :nothing => true if params[Settings.honeypot].present?
end end
# Overwriting the sign_out redirect path method
def after_sign_out_path_for(resource_or_scope) def after_sign_out_path_for(resource_or_scope)
page_path('signed_out') page_path('signed_out')
end end
@ -48,4 +47,21 @@ class ApplicationController < ActionController::Base
@current_ability ||= ::UserAbility.new(current_user) @current_ability ||= ::UserAbility.new(current_user)
end end
class UserParameterSanitizer < Devise::ParameterSanitizer
def sign_up
default_params.permit(:full_name, :email, :password)
end
def account_update
default_params.permit(:full_name, :email, :password, :current_password)
end
end
def devise_parameter_sanitizer
super unless resource_class == User
UserParameterSanitizer.new(User, :user, params)
end
end end

3
app/controllers/concerns/records_controller_common.rb

@ -14,7 +14,8 @@ module RecordsControllerCommon
end end
def nested_via_records? def nested_via_records?
nested? && nested.association && nested.association.collection? && nested.association.name == :records nested? && nested.association && nested.association.collection? &&
nested.association.name == :records
end end
# override to close create form after success # override to close create form after success

6
app/controllers/public/pages_controller.rb

@ -47,4 +47,10 @@ class Public::PagesController < PublicController
Pathname.new("/#{params[:id]}").cleanpath.to_s[1..-1] Pathname.new("/#{params[:id]}").cleanpath.to_s[1..-1]
end end
def resource; User.new end
helper_method :resource
def resource_name; :user end
helper_method :resource_name
end end

3
app/controllers/users/aaaas_controller.rb

@ -13,9 +13,8 @@ class Users::AaaasController < UsersController
protected protected
# override to use :mx_records instead of :records assoc
def beginning_of_chain def beginning_of_chain
(nested_via_records? ? nested.parent_scope.aaaa_records : super).readonly(false) (nested_via_records? ? nested_parent_record.aaaa_records : super).readonly(false)
end end
# override, we make our own sti logic # override, we make our own sti logic

3
app/controllers/users/as_controller.rb

@ -26,9 +26,8 @@ class Users::AsController < UsersController
protected protected
# override to use :mx_records instead of :records assoc
def beginning_of_chain def beginning_of_chain
(nested_via_records? ? nested.parent_scope.a_records : super).readonly(false) (nested_via_records? ? nested_parent_record.a_records : super).readonly(false)
end end
# override, we make our own sti logic # override, we make our own sti logic

3
app/controllers/users/cnames_controller.rb

@ -14,9 +14,8 @@ class Users::CnamesController < UsersController
protected protected
# override to use :mx_records instead of :records assoc
def beginning_of_chain def beginning_of_chain
(nested_via_records? ? nested.parent_scope.cname_records : super).readonly(false) (nested_via_records? ? nested_parent_record.cname_records : super).readonly(false)
end end
# override, we make our own sti logic # override, we make our own sti logic

3
app/controllers/users/mxes_controller.rb

@ -21,9 +21,8 @@ class Users::MxesController < UsersController
end end
end end
# override to use :mx_records instead of :records assoc
def beginning_of_chain def beginning_of_chain
(nested_via_records? ? nested.parent_scope.mx_records : super).readonly(false) (nested_via_records? ? nested_parent_record.mx_records : super).readonly(false)
end end
# override, we make our own sti logic # override, we make our own sti logic

3
app/controllers/users/ns_controller.rb

@ -13,9 +13,8 @@ class Users::NsController < UsersController
protected protected
# override to use :mx_records instead of :records assoc
def beginning_of_chain def beginning_of_chain
(nested_via_records? ? nested.parent_scope.ns_records : super).readonly(false) (nested_via_records? ? nested_parent_record.ns_records : super).readonly(false)
end end
# override, we make our own sti logic # override, we make our own sti logic

2
app/controllers/users/permissions_controller.rb

@ -14,7 +14,7 @@ class Users::PermissionsController < UsersController
conf.create.link.label = 'Share Domain' conf.create.link.label = 'Share Domain'
# conf.columns[:user_email].search_sql = 'user.email' # conf.columns[:user_email].search_sql = 'user.email'
# conf.columns[:user].search_sql = 'CONCAT(first_name, ' ', last_name)' # conf.columns[:user].search_sql = 'full_name'
end end
before_filter :ensure_nested_under_domain before_filter :ensure_nested_under_domain

7
app/controllers/users/registrations_controller.rb

@ -0,0 +1,7 @@
class Users::RegistrationsController < Devise::RegistrationsController
protected
def after_inactive_sign_up_path_for(resource_or_scope)
page_path('notice')
end
end

2
app/controllers/users/soas_controller.rb

@ -12,7 +12,7 @@ class Users::SoasController < UsersController
protected protected
def beginning_of_chain def beginning_of_chain
(nested_via_records? ? nested.parent_scope.soa_records : super).readonly(false) (nested_via_records? ? nested_parent_record.soa_records : super).readonly(false)
end end
# override, we make our own sti logic # override, we make our own sti logic

3
app/controllers/users/srvs_controller.rb

@ -18,9 +18,8 @@ class Users::SrvsController < UsersController
@record.prio ||= 0 @record.prio ||= 0
end end
# override to use :mx_records instead of :records assoc
def beginning_of_chain def beginning_of_chain
(nested_via_records? ? nested.parent_scope.srv_records : super).readonly(false) (nested_via_records? ? nested_parent_record.srv_records : super).readonly(false)
end end
# override, we make our own sti logic # override, we make our own sti logic

3
app/controllers/users/txts_controller.rb

@ -13,9 +13,8 @@ class Users::TxtsController < UsersController
protected protected
# override to use :mx_records instead of :records assoc
def beginning_of_chain def beginning_of_chain
(nested_via_records? ? nested.parent_scope.txt_records : super).readonly(false) (nested_via_records? ? nested_parent_record.txt_records : super).readonly(false)
end end
# override, we make our own sti logic # override, we make our own sti logic

14
app/helpers/application_helper.rb

@ -4,7 +4,7 @@ module ApplicationHelper
FLASH_ALIASES = HashWithIndifferentAccess.new( FLASH_ALIASES = HashWithIndifferentAccess.new(
error: :error, success: :success, error: :error, success: :success,
alert: :alert, warning: :alert, warn: :alert, alert: :warning, warning: :warning, warn: :warning,
info: :info, notice: :info info: :info, notice: :info
) )
@ -19,11 +19,6 @@ module ApplicationHelper
flashes.present? ? content_tag(:div, flashes.html_safe, :class => clazz) : nil flashes.present? ? content_tag(:div, flashes.html_safe, :class => clazz) : nil
end end
def active_scaffold_column_timestamp(column, record)
value = record.send(column.name)
value.nil? ? nil : Time.at(value)
end
def error_messages_for(resource) def error_messages_for(resource)
return "" if resource.errors.empty? return "" if resource.errors.empty?
@ -48,4 +43,11 @@ module ApplicationHelper
end end
end end
# ActiveScaffold
def active_scaffold_column_timestamp(record, column)
value = record.send(column.name)
value.nil? ? nil : Time.at(value)
end
end end

2
app/helpers/users/aaaas_helper.rb

@ -1,2 +0,0 @@
module Users::AaaasHelper
end

2
app/helpers/users/as_helper.rb

@ -1,2 +0,0 @@
module Users::AsHelper
end

2
app/helpers/users/cnames_helper.rb

@ -1,2 +0,0 @@
module Users::CnamesHelper
end

2
app/helpers/users/hosts_helper.rb

@ -1,2 +0,0 @@
module Users::HostsHelper
end

2
app/helpers/users/mxes_helper.rb

@ -1,2 +0,0 @@
module Users::MxesHelper
end

2
app/helpers/users/ns_helper.rb

@ -1,2 +0,0 @@
module Users::NsHelper
end

2
app/helpers/users/permissions_helper.rb

@ -1,2 +0,0 @@
module Users::PermissionsHelper
end

2
app/helpers/users/soas_helper.rb

@ -1,2 +0,0 @@
module Users::SoasHelper
end

2
app/helpers/users/srvs_helper.rb

@ -1,2 +0,0 @@
module Users::SrvsHelper
end

2
app/helpers/users/txts_helper.rb

@ -1,2 +0,0 @@
module Users::TxtsHelper
end

3
app/models/admin.rb

@ -6,8 +6,7 @@ class Admin < ActiveRecord::Base
:recoverable, :rememberable, :trackable, :validatable :recoverable, :rememberable, :trackable, :validatable
# Setup accessible (or protected) attributes for your model # Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me # attr_accessible :email, :password, :password_confirmation, :remember_me
# attr_accessible :title, :body
# Called by Devise to see if an user can currently be signed in # Called by Devise to see if an user can currently be signed in
def active_for_authentication? def active_for_authentication?

5
app/models/audit.rb

@ -1,5 +0,0 @@
class Audit < Audited::Adapters::ActiveRecord::Audit
before_save do
self.username = user.full_name if !username && user
end
end

2
app/models/blacklisted_domain.rb

@ -1,5 +1,5 @@
class BlacklistedDomain < ActiveRecord::Base class BlacklistedDomain < ActiveRecord::Base
attr_accessible :name # attr_accessible :name
def self.include?(name) def self.include?(name)
where("blacklisted_domains.name = ? OR ? LIKE CONCAT('%.', blacklisted_domains.name)", where("blacklisted_domains.name = ? OR ? LIKE CONCAT('%.', blacklisted_domains.name)",

16
app/models/domain.rb

@ -2,32 +2,29 @@ class Domain < ActiveRecord::Base
self.inheritance_column = :sti_disabled self.inheritance_column = :sti_disabled
nilify_blanks nilify_blanks
stampable stampable
audited
# optional IP for create form, results in a type A record # optional IP for create form, results in a type A record
attr_accessor :ip attr_accessor :ip
attr_accessor :domain_ownership_failed attr_accessor :domain_ownership_failed
attr_accessible :name, :ip, :soa_record, :ns_records, :apply_subdomains # attr_accessible :name, :ip, :soa_record, :ns_records, :apply_subdomains
belongs_to :user, :inverse_of => :domain belongs_to :user, :inverse_of => :domain
has_many :records, :inverse_of => :domain, :dependent => :destroy has_many :records, :inverse_of => :domain, :dependent => :destroy
has_many :permissions, :inverse_of => :domain, :dependent => :destroy has_many :permissions, :inverse_of => :domain, :dependent => :destroy
has_many :permitted_users, :through => :permissions, :source => :user has_many :permitted_users, :through => :permissions, :source => :user
has_many :audits, :as => :auditable
cattr_reader :types cattr_reader :types
@@types = ['NATIVE', 'MASTER', 'SLAVE', 'SUPERSLAVE'] @@types = ['NATIVE', 'MASTER', 'SLAVE', 'SUPERSLAVE']
has_one :soa_record, has_one :soa_record,
-> { where(type: 'SOA') },
:class_name => 'SOA', :class_name => 'SOA',
:conditions => {:type => 'SOA'},
:inverse_of => :domain :inverse_of => :domain
for type in Record.types Record.types.each do |type|
has_many :"#{type.downcase}_records", has_many :"#{type.downcase}_records",
:class_name => type, :class_name => type,
:conditions => {:type => type},
:inverse_of => :domain :inverse_of => :domain
validates_associated :"#{type.downcase}_records" validates_associated :"#{type.downcase}_records"
end end
@ -49,7 +46,10 @@ class Domain < ActiveRecord::Base
delegate :domains_exceeding?, :to => :user delegate :domains_exceeding?, :to => :user
def max_domains_per_user def max_domains_per_user
if domains_exceeding? if domains_exceeding?
errors.add :base, "as a security measure, you cannot have more than #{Settings.max_domains_per_user} domains on one account" errors.add :base, <<-DOC
as a security measure, you cannot have more than
#{Settings.max_domains_per_user} domains on one account
DOC
end end
end end
@ -59,7 +59,7 @@ class Domain < ActiveRecord::Base
concerned_with :tree_structure, :name_change_subdomains, :name_change_records concerned_with :tree_structure, :name_change_subdomains, :name_change_records
scope :host_domains, where(:name => Settings.host_domains) scope :host_domains, -> { where(:name => Settings.host_domains) }
def host_domain? def host_domain?
Settings.host_domains.include?(name) Settings.host_domains.include?(name)

2
app/models/domain/tree_structure.rb

@ -80,7 +80,7 @@ class Domain < ActiveRecord::Base
# only immediate children # only immediate children
def children_subdomains def children_subdomains
descendants = subdomains.preorder.all descendants = subdomains.preorder.to_a
first = descendants.first first = descendants.first
return [] unless first.present? return [] unless first.present?

2
app/models/permission.rb

@ -1,10 +1,8 @@
class Permission < ActiveRecord::Base class Permission < ActiveRecord::Base
stampable stampable
audited
belongs_to :domain, :inverse_of => :permissions belongs_to :domain, :inverse_of => :permissions
belongs_to :user, :inverse_of => :permissions belongs_to :user, :inverse_of => :permissions
has_many :audits, :as => :auditable
validates :domain_id, :presence => true validates :domain_id, :presence => true
validates :user_id, :presence => true, :uniqueness => { validates :user_id, :presence => true, :uniqueness => {

4
app/models/record.rb

@ -1,14 +1,12 @@
class Record < ActiveRecord::Base class Record < ActiveRecord::Base
stampable stampable
audited on: [:create]
belongs_to :domain, :inverse_of => :records belongs_to :domain, :inverse_of => :records
belongs_to :user, :inverse_of => :records belongs_to :user, :inverse_of => :records
has_many :audits, :as => :auditable
cattr_reader :types cattr_reader :types
@@types = %w(SOA NS A MX TXT CNAME AAAA SRV) @@types = %w(SOA NS A MX TXT CNAME AAAA SRV)
attr_accessible :name, :content, :ttl, :prio # attr_accessible :name, :content, :ttl, :prio
validates :domain, :name, :presence => true validates :domain, :name, :presence => true
validates :type, :inclusion => {:in => @@types, :message => "Unknown record type"} validates :type, :inclusion => {:in => @@types, :message => "Unknown record type"}

2
app/models/setting.rb

@ -1,3 +1,3 @@
class Setting < RailsSettings::CachedSettings class Setting < RailsSettings::CachedSettings
attr_accessible :var, :value # attr_accessible :var, :value
end end

2
app/models/srv.rb

@ -6,7 +6,7 @@
# @see http://www.zytrax.com/books/dns/ch8/srv.html # @see http://www.zytrax.com/books/dns/ch8/srv.html
class SRV < Record class SRV < Record
validates :name, :hostname => {:allow_underscore => true, :allow_wildcard_hostname => true} validates :name, :hostname => {:allow_underscore => true, :allow_wildcard_hostname => true}
validates :content, :format => /^\d+ \d+ [A-Za-z0-9\-_.]+$/ validates :content, :format => /\A\d+ \d+ [A-Za-z0-9\-_.]+\z/
# RFC 2872 # RFC 2872
validates :prio, :presence => true, :numericality => { validates :prio, :presence => true, :numericality => {
:greater_than_or_equal_to => 0, :greater_than_or_equal_to => 0,

12
app/models/user.rb

@ -2,7 +2,6 @@ class User < ActiveRecord::Base
include SentientModel include SentientModel
model_stamper model_stamper
stampable stampable
audited
# Include default devise modules. Others available are: # Include default devise modules. Others available are:
# :token_authenticatable, :encryptable, :timeoutable and :omniauthable # :token_authenticatable, :encryptable, :timeoutable and :omniauthable
@ -15,26 +14,21 @@ class User < ActiveRecord::Base
:confirmable, :confirmable,
:lockable :lockable
validates :first_name, :last_name, :presence => true validates :full_name, :presence => true
# Setup accessible (or protected) attributes for your model # Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me, # attr_accessible :email, :password, :password_confirmation, :remember_me,
:first_name, :last_name # :full_name
has_many :domains, :inverse_of => :user, :dependent => :destroy has_many :domains, :inverse_of => :user, :dependent => :destroy
has_many :records, :inverse_of => :user, :dependent => :destroy has_many :records, :inverse_of => :user, :dependent => :destroy
has_many :permissions, :inverse_of => :user, :dependent => :destroy has_many :permissions, :inverse_of => :user, :dependent => :destroy
has_many :permitted_domains, :through => :permissions, :source => :domain has_many :permitted_domains, :through => :permissions, :source => :domain
has_many :audits, :as => :auditable
def name def name
full_name.blank? ? email : full_name full_name.blank? ? email : full_name
end end
def full_name
"#{first_name} #{last_name}"
end
# domains per user limit for DOS protection # domains per user limit for DOS protection
def domains_exceeding? def domains_exceeding?
domains.count >= Settings.max_domains_per_user.to_i domains.count >= Settings.max_domains_per_user.to_i

2
app/views/layouts/admin.html.erb

@ -17,7 +17,7 @@
</head> </head>
<body class="users"> <body class="users">
<div class="container" id="main"> <div class="container animated fast fadeInDown" id="main">
<%= flash_display 'flash' %> <%= flash_display 'flash' %>
<%= yield %> <%= yield %>
</div> </div>

2
app/views/layouts/errors.html.erb

@ -14,7 +14,7 @@
<body class="errors"> <body class="errors">
<%= render 'shared/public_top' %> <%= render 'shared/public_top' %>
<div class="container" id="main"> <div class="container animated fast fadeInDown" id="main">
<%= flash_display 'flash' %> <%= flash_display 'flash' %>
<%= yield %> <%= yield %>
</div> </div>

2
app/views/layouts/home.html.erb

@ -3,7 +3,7 @@
<body class="public with-home-section"> <body class="public with-home-section">
<%= render 'shared/navigation' %> <%= render 'shared/navigation' %>
<div id="main"> <div class="animated fast fadeInDown" id="main">
<%= flash_display 'flash' %> <%= flash_display 'flash' %>
<%= yield %> <%= yield %>
</div> </div>

12
app/views/layouts/public.html.erb

@ -1,15 +1,19 @@
<%= render 'shared/public_top' %> <%= render 'shared/public_top' %>
<body class="public"> <body class="public">
<%= render 'shared/navigation' %>
<div class="container" id="main"> <div id="wrap">
<%= render 'shared/navigation' %>
<div class="container animated fast fadeInDown" id="main">
<%= flash_display 'flash' %> <%= flash_display 'flash' %>
<%= yield %> <%= yield %>
</div> </div>
<div class="container"> <div id="push"></div>
<%= render 'shared/bottom' %>
</div> </div>
<%= render 'shared/bottom' %>
</body> </body>
</html> </html>

11
app/views/layouts/users.html.erb

@ -16,15 +16,18 @@
<%= csrf_meta_tag %> <%= csrf_meta_tag %>
</head> </head>
<body class="users"> <body class="users">
<%= render 'shared/navigation' %> <div id="wrap">
<div class="container" id="main"> <%= render 'shared/navigation' %>
<div class="container animated fast fadeInDown" id="main">
<%= flash_display 'flash' %> <%= flash_display 'flash' %>
<%= yield %> <%= yield %>
</div> </div>
<div class="container"> <div id="push"></div>
<%= render 'shared/bottom' %>
</div> </div>
<%= render 'shared/bottom' %>
</body> </body>
</html> </html>

8
app/views/public/pages/contact.html.erb

@ -1,11 +1,11 @@
<div class="page-header"> <div class="page-header">
<h1>Contact us</h1> <h1>Contact us</h1>
</div> <small>
<p>
Our email address is <%= mail_to Settings.support_mail %> , Our email address is <%= mail_to Settings.support_mail %> ,
or you can contact us using the form below: or you can contact us using the form below:
</p> </small>
</div>
<%= render :partial => 'public/pages/contact/form' %> <%= render :partial => 'public/pages/contact/form' %>

15
app/views/public/pages/contact/_form.html.erb

@ -1,6 +1,6 @@
<%= simple_form_for(@contact_form, <%= simple_form_for(@contact_form,
url: { action: 'contact' }, url: { action: 'contact' },
html: { method: :post, class: 'form-horizontal' } method: :post
) do |f| %> ) do |f| %>
<%= error_messages_for(@contact_form) %> <%= error_messages_for(@contact_form) %>
@ -9,15 +9,20 @@
<%= f.text_field :nickname %> <%= f.text_field :nickname %>
</div> </div>
<div class="inputs"> <div class="row">
<div class="col-lg-8">
<%= f.input :name, label: 'Your name' %> <%= f.input :name, label: 'Your name' %>
<%= f.input :email, label: 'Your email' %> <%= f.input :email, label: 'Your email' %>
</div>
<div class="col-lg-4">
<%= f.input :file, as: :file, hint: 'can be attached optionally' %> <%= f.input :file, as: :file, hint: 'can be attached optionally' %>
<%= f.input :message, as: :text, input_html: { rows: 10 } %>
</div> </div>
</div>
<div class="form-actions"> <div class="row">
<div class="col-lg-12">
<%= f.input :message, as: :text, input_html: { rows: 5 } %>
<%= f.submit 'Send', :class => 'btn btn-primary' %> <%= f.submit 'Send', :class => 'btn btn-primary' %>
</div> </div>
</div>
<% end %> <% end %>

13
app/views/public/pages/donate.html.erb

@ -3,10 +3,11 @@
<small>How do I contribute?</small> <small>How do I contribute?</small>
</div> </div>
<div class="progress progress-striped"> <div class="progress">
<% size = Setting['public.donations.progress'] %> <% size = Setting['public.donations.progress'] %>
<div class="bar" style="width: <%= progress_size(size) %>%;"> <div class="progress-bar" role="progressbar" aria-valuenow="<%= size -%>"
<%= size -%>% Progress aria-valuemin="0" aria-valuemax="100" style="width: <%= progress_size(size) -%>%;">
<span><%= size -%>% Complete</span>
</div> </div>
</div> </div>
@ -22,7 +23,7 @@
</p> </p>
<div class="row donate-actions"> <div class="row donate-actions">
<div class="span4"> <div class="col-lg-4">
<h3>&euro; EUR</h3> <h3>&euro; EUR</h3>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="cmd" value="_s-xclick">
@ -31,7 +32,7 @@
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1"> <img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form> </form>
</div> </div>
<div class="span4"> <div class="col-lg-4">
<h3>$ USD</h3> <h3>$ USD</h3>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="cmd" value="_s-xclick">
@ -40,7 +41,7 @@
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1"> <img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form> </form>
</div> </div>
<div class="span4"> <div class="col-lg-4">
<h3>&pound; GBP</h3> <h3>&pound; GBP</h3>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="cmd" value="_s-xclick">

65
app/views/public/pages/home.html.erb

@ -1,34 +1,43 @@
<div class="page-home-section page-home-header"> <div class="page-home-header">
<div class="container"> <div class="container">
<div class="page-header"> <div class="page-header">
<h1> <h1>
Free DNS management service for everyone Thousands of people manage their DNS using <strong>EntryDNS</strong>
<small>created by Geeks</small>
<span class="pull-right">
<%= link_to 'Tweet', "https://twitter.com/share", :class => "twitter-share-button", :data => {
:url => root_url,
:text => "EntryDNS a nice free DNS service",
:count => "horizontal",
:via => "entrydns",
:related => "_clyfe:vaijab"
} %>
</span>
</h1> </h1>
</div> </div>
</div> </div>
</div> </div>
<div class="page-home-section page-home-incentives"> <div class="page-home-incentives">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="span5"> <div class="col-lg-4">
<%= render 'public/pages/home/headlines' %> <div class="contour">
<%= render 'public/pages/shared/action' %> <h3 class="text-center animated tada">Use it yourself, it's free!</h3>
<p class="text-center">In a few seconds you're done!</p>
<br>
<%= simple_form_for(resource,
as: resource_name,
url: registration_path(resource_name),
wrapper: :inlabel
) do |f| %>
<%= devise_error_messages! %>
<%= honeypot %>
<%= f.input :full_name, required: true %>
<%= f.input :email, required: true %>
<%= f.input :password, required: true %>
<br>
<%= f.submit "Sign up", class: 'btn btn-primary' %>
<small>
or <%= link_to 'Sign in', new_user_session_path %>
/ <%= link_to 'Forgot your password?', new_password_path(resource_name) %>
</small>
<% end %>
</div> </div>
<div class="span7"> <br class="hidden-lg">
</div>
<div class="col-lg-8">
<%= render 'public/pages/home/slides' %> <%= render 'public/pages/home/slides' %>
</div> </div>
@ -36,15 +45,15 @@
</div> </div>
</div> </div>
<div class="page-home-section page-home-quotes"> <div class="page-home-quotes hide">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="span6"> <div class="col-lg-6">
<blockquote>We are two geeks who built a free DNS service to fill a void in this space.The service is free <blockquote>We are two geeks who built a free DNS service to fill a void in this space.The service is free
and we hope to support it on either a freemium model or some sort of affiliate sales.</blockquote> and we hope to support it on either a freemium model or some sort of affiliate sales.</blockquote>
</div> </div>
<div class="span6"> <div class="col-lg-6">
<blockquote>Note that we just started it, and there are still things to be done, it's still a work in progress. <blockquote>Note that we just started it, and there are still things to be done, it's still a work in progress.
Nevertheless the service is at this point functional and there are people already using it.</blockquote> Nevertheless the service is at this point functional and there are people already using it.</blockquote>
</div> </div>
@ -53,19 +62,15 @@
</div> </div>
</div> </div>
<div class="page-home-section page-home-extra"> <div>
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="span6"> <div class="col-lg-6">
<h3>Benefits</h3> <h3>Benefits</h3>
<%= render 'public/pages/shared/benefits' %> <%= render 'public/pages/shared/benefits' %>
<%= link_to new_user_registration_path do %>
<i class="icon-arrow-right"></i>
<strong>Create an Account Now</strong>
<% end %>
</div> </div>
<div class="span6"> <div class="col-lg-6">
<h3>Features</h3> <h3>Features</h3>
<%= render 'public/pages/shared/features' %> <%= render 'public/pages/shared/features' %>
</div> </div>
@ -73,5 +78,3 @@
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>

28
app/views/public/pages/home/_headlines.html.erb

@ -1,28 +0,0 @@
<h3>
Our kick-ass interface makes managing DNS a breeze.
</h3>
<br />
<p>
Easily manage multiple domains and hosts,
collaborate and manage work-sharing with other sysadmins,
automate and simplify infrastructure.
</p>
<br />
<ul>
<li>
Friendly support from the founders
</li>
<li>
Offsite backup, every 3 hours
</li>
<li>
We are monitoring everything to work smoothly
</li>
<li>
Complete developers API's
</li>
<li>
Accessible from mobile devices
</li>
</ul>

47
app/views/public/pages/home/_slides.html.erb

@ -1,24 +1,39 @@
<div id="slidesWrapper"> <div id="carousel-jumbotron" class="carousel slide">
<div id="slides"> <!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-jumbotron" data-slide-to="0" class="active"></li>
<li data-target="#carousel-jumbotron" data-slide-to="1"></li>
<li data-target="#carousel-jumbotron" data-slide-to="2"></li>
<li data-target="#carousel-jumbotron" data-slide-to="3"></li>
<li data-target="#carousel-jumbotron" data-slide-to="4"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<%= image_tag 'marketing/1.png' %> <%= image_tag 'marketing/1.png' %>
</div>
<div class="item">
<%= image_tag 'marketing/2.png' %> <%= image_tag 'marketing/2.png' %>
</div>
<div class="item">
<%= image_tag 'marketing/3.png' %> <%= image_tag 'marketing/3.png' %>
</div>
<div class="item">
<%= image_tag 'marketing/4.png' %> <%= image_tag 'marketing/4.png' %>
</div>
<div class="item">
<%= image_tag 'marketing/5.png' %> <%= image_tag 'marketing/5.png' %>
</div> </div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-jumbotron" data-slide="prev">
<span class="icon-prev"></span>
</a>
<a class="right carousel-control" href="#carousel-jumbotron" data-slide="next">
<span class="icon-next"></span>
</a>
</div> </div>
<script type="text/javascript"> <%= javascript_tag "$('.carousel').carousel()" %>
$("#slides").slides({
navigation: false,
responsive: true,
slide: {
interval: 500
},
preload: {
active: true
},
playInterval: 8000,
pauseInterval: 16000
}).slides('play');
</script>

3
app/views/public/pages/notice.html.erb

@ -0,0 +1,3 @@
<!--
Blank page for flash notices
-->

7
app/views/public/pages/shared/_action.html.erb

@ -1,7 +0,0 @@
<div class="call-to-action">
<%= image_tag 'marketing/arrow_left.png' %>
<%= link_to new_user_registration_path, class: 'btn btn-primary btn-large' do %>
<strong>Create an Account Now</strong><br>
<small>It's free, sign up in 60 seconds.</small>
<% end %>
</div>

4
app/views/public/pages/team.html.erb

@ -3,10 +3,10 @@
</div> </div>
<div class="row"> <div class="row">
<div class="span6"> <div class="col-lg-6">
<%= render :partial => 'public/pages/team/zooz' %> <%= render :partial => 'public/pages/team/zooz' %>
</div> </div>
<div class="span6"> <div class="col-lg-6">
<%= render :partial => 'public/pages/team/clyfe' %> <%= render :partial => 'public/pages/team/clyfe' %>
</div> </div>
</div> </div>

8
app/views/public/pages/team/_clyfe.html.erb

@ -1,9 +1,13 @@
<h4>Claudius Nicolae <small>Programmer</small></h4> <h4>Claudius Nicolae <small>Programmer</small></h4>
<p> <p>
He is a software developer from Romania. He has a He is a software developer from Romania.
</p>
<p>
He has a
<em>Masters in Software Engineering</em> and a
<em>Bachelors in Mathematics and Computer Science</em> from the <em>Bachelors in Mathematics and Computer Science</em> from the
<em>University of Bucharest</em> and also started a Masters in Software Development. <em>University of Bucharest</em>.
</p> </p>
<p> <p>
He worked with many programming languages and technologies from web applications to He worked with many programming languages and technologies from web applications to

6
app/views/shared/_bottom.html.erb

@ -1,5 +1,7 @@
<div class="footer"> <div id="footer">
<div class="block"> <div class="container">
<hr>
<p class="pull-right"> <p class="pull-right">
<%= switch_user_select %> <%= switch_user_select %>
</p> </p>

17
app/views/shared/_navigation.html.erb

@ -1,16 +1,16 @@
<div class="navbar navbar-inverse navbar-fixed-top"> <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="navbar-inner">
<div class="container"> <div class="container">
<div class="navbar-header">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</a> </button>
<%= link_to('EntryDNS', root_path, class: 'navbar-brand') %>
<%= link_to('EntryDNS', root_path, class: 'brand') %> </div>
<div class="nav-collapse"> <div class="collapse navbar-collapse navbar-main-collapse">
<% if user_signed_in? %> <% if user_signed_in? %>
<%= render 'shared/navigation/users' %> <%= render 'shared/navigation/users' %>
<% else %> <% else %>
@ -19,5 +19,4 @@
</div> </div>
</div> </div>
</div>
</div> </div>

4
app/views/shared/navigation/_public.html.erb

@ -1,4 +1,4 @@
<% semantic_navigation :public_nav, html: { class: 'nav' } do |n| %> <% semantic_navigation :public_nav, html: { class: 'nav navbar-nav' } do |n| %>
<%= n.item '', link: page_path('about') do %> <%= n.item '', link: page_path('about') do %>
<i class="icon-white icon-info-sign"></i> About <i class="icon-white icon-info-sign"></i> About
<% end %> <% end %>
@ -13,7 +13,7 @@
<% end %> <% end %>
<% end %> <% end %>
<% semantic_navigation :session_nav, html: { class: 'nav pull-right' } do |n| %> <% semantic_navigation :session_nav, html: { class: 'nav navbar-nav pull-right' } do |n| %>
<%= n.item '', link: Settings.news_link, <%= n.item '', link: Settings.news_link,
html: { rel: 'tooltip', data: { placement: 'bottom' }, title: Settings.news_link } do %> html: { rel: 'tooltip', data: { placement: 'bottom' }, title: Settings.news_link } do %>
<i class="icon-white icon-share-alt"></i> News <i class="icon-white icon-share-alt"></i> News

4
app/views/shared/navigation/_users.html.erb

@ -1,4 +1,4 @@
<% semantic_navigation :application_nav, html: { class: 'nav' } do |n| %> <% semantic_navigation :application_nav, html: { class: 'nav navbar-nav' } do |n| %>
<%= n.item '', link: domains_path do %> <%= n.item '', link: domains_path do %>
<i class="icon-white icon-th-list"></i> My Domains <i class="icon-white icon-th-list"></i> My Domains
<% end %> <% end %>
@ -10,7 +10,7 @@
<% end %> <% end %>
<% end %> <% end %>
<% semantic_navigation :user_nav, html: { class: 'nav pull-right' } do |n| %> <% semantic_navigation :user_nav, html: { class: 'nav navbar-nav navbar-right' } do |n| %>
<%= n.item '', link: Settings.news_link, <%= n.item '', link: Settings.news_link,
html: { rel: 'tooltip', data: { placement: 'bottom' }, title: Settings.news_link } do %> html: { rel: 'tooltip', data: { placement: 'bottom' }, title: Settings.news_link } do %>
<i class="icon-white icon-share-alt"></i> News <i class="icon-white icon-share-alt"></i> News

8
app/views/users/confirmations/new.html.erb

@ -3,16 +3,12 @@
<%= simple_form_for(resource, <%= simple_form_for(resource,
as: resource_name, as: resource_name,
url: confirmation_path(resource_name), url: confirmation_path(resource_name),
html: { method: :post, class: 'form-horizontal' } method: :post
) do |f| %> ) do |f| %>
<%= devise_error_messages! %> <%= devise_error_messages! %>
<div class="inputs"> <%= f.input :email, required: true %>
<%= f.input :email %>
</div>
<div class="form-actions">
<%= f.submit "Resend confirmation instructions", class: 'btn btn-primary' %> <%= f.submit "Resend confirmation instructions", class: 'btn btn-primary' %>
</div>
<% end %> <% end %>

6
app/views/users/passwords/edit.html.erb

@ -5,20 +5,16 @@
<%= simple_form_for(resource, <%= simple_form_for(resource,
as: resource_name, as: resource_name,
url: password_path(resource_name), url: password_path(resource_name),
html: { method: :put, class: 'form-horizontal' } method: :put
) do |f| %> ) do |f| %>
<%= f.hidden_field :reset_password_token %> <%= f.hidden_field :reset_password_token %>
<%= devise_error_messages! %> <%= devise_error_messages! %>
<div class="inputs">
<%= f.input :password, label: "New password" %> <%= f.input :password, label: "New password" %>
<%= f.input :password_confirmation, label: "Confirm new password" %> <%= f.input :password_confirmation, label: "Confirm new password" %>
</div>
<div class="form-actions">
<%= f.submit "Change my password", class: 'btn btn-primary' %> <%= f.submit "Change my password", class: 'btn btn-primary' %>
</div>
<% end %> <% end %>
<%= render :partial => "users/shared/links" %> <%= render :partial => "users/shared/links" %>

8
app/views/users/passwords/new.html.erb

@ -3,16 +3,12 @@
<%= simple_form_for(resource, <%= simple_form_for(resource,
as: resource_name, as: resource_name,
url: password_path(resource_name), url: password_path(resource_name),
html: { method: :post, class: 'form-horizontal' } method: :post
) do |f| %> ) do |f| %>
<%= devise_error_messages! %> <%= devise_error_messages! %>
<div class="inputs"> <%= f.input :email, required: true %>
<%= f.input :email %>
</div>
<div class="form-actions">
<%= f.submit "Send me reset password instructions", class: 'btn btn-primary' %> <%= f.submit "Send me reset password instructions", class: 'btn btn-primary' %>
</div>
<% end %> <% end %>

17
app/views/users/registrations/_new.html.erb

@ -0,0 +1,17 @@
<%= simple_form_for(resource,
as: resource_name,
url: registration_path(resource_name)
) do |f| %>
<%= devise_error_messages! %>
<%= honeypot %>
<%= f.input :full_name, required: true %>
<%= f.input :email, required: true %>
<%= f.input :password, required: true %>
<%= f.submit "Sign up", class: 'btn btn-primary' %>
<small>
or <%= link_to 'Sign in', new_user_session_path %>
/ <%= link_to 'Forgot your password?', new_password_path(resource_name) %>
</small>
<% end %>

56
app/views/users/registrations/edit.html.erb

@ -1,36 +1,46 @@
<div class="page-header"> <div class="page-header">
<h1>Edit <%= resource_name.to_s.humanize %></h1> <h1>Settings</h1>
</div> </div>
<%= simple_form_for(resource, <div class="row">
<div class="col-lg-8">
<%= simple_form_for(resource,
as: resource_name, as: resource_name,
url: registration_path(resource_name), url: registration_path(resource_name),
html: { method: :put, class: 'form-horizontal' } method: :put,
html: { autocomplete: 'off' }
) do |f| %> ) do |f| %>
<%= devise_error_messages! %> <%= devise_error_messages! %>
<div class="actions"> <%= f.input :full_name, required: true %>
<%= f.input :first_name %> <%= f.input :email, required: true %>
<%= f.input :last_name %> <label class="password optional">Password</label>
<%= f.input :email %> <small>leave blank if you don't want to change it</small>
<%= f.input :password, hint: "leave blank if you don't want to change it" %> <%= f.input :password, label: false %>
<%= f.input :password_confirmation %> <label class="password optional">
<%= f.input :current_password, hint: 'we need your current password to confirm your changes' %> <abbr title="required">*</abbr> Current password
</div> </label>
<small>we need your current password to confirm your changes</small>
<%= f.input :current_password, label: false, required: true %>
<div class="form-actions">
<%= f.submit "Update", class: 'btn btn-primary' %> <%= f.submit "Update", class: 'btn btn-primary' %>
<% end %>
</div> </div>
<% end %> <div class="col-lg-4">
<br class="hidden-lg">
<hr /> <div class="alert alert-warning text-center">
<h4>Delete account</h4>
<div class="alert alert-error"> <p>
<h3>Danger zone</h3> <strong>Danger zone!</strong>
<%= link_to "Cancel account", registration_path(resource_name), If you delete your account all your data will be deleted!
class: 'btn btn-danger pull-right', </p>
<p>
<%= link_to "Delete my account!", registration_path(resource_name),
class: 'btn btn-danger',
confirm: "All your data will be deleted! Are you sure?", confirm: "All your data will be deleted! Are you sure?",
method: :delete %> method: :delete
<p>If you cancel your account all your data will be deleted!</p> %>
</p>
</div>
</div>
</div> </div>

21
app/views/users/registrations/new.html.erb

@ -1,23 +1,4 @@
<%= render :partial => "users/shared/links" %> <%= render :partial => "users/shared/links" %>
<%= simple_form_for(resource, <%= render 'users/registrations/new' %>
as: resource_name,
url: registration_path(resource_name),
html: { class: 'form-horizontal' }
) do |f| %>
<%= devise_error_messages! %>
<div class="inputs">
<%= honeypot %>
<%= f.input :first_name %>
<%= f.input :last_name %>
<%= f.input :email, as: :email %>
<%= f.input :password %>
<%= f.input :password_confirmation %>
</div>
<div class="form-actions">
<%= f.submit "Sign up", class: 'btn btn-primary' %>
</div>
<% end %>

15
app/views/users/sessions/new.html.erb

@ -2,19 +2,18 @@
<%= simple_form_for(resource, <%= simple_form_for(resource,
as: resource_name, as: resource_name,
url: session_path(resource_name), url: session_path(resource_name)
html: { class: 'form-horizontal' }
) do |f| %> ) do |f| %>
<div class="actions"> <%= f.input :email, required: true %>
<%= f.input :email %> <%= f.input :password, required: true %>
<%= f.input :password %>
<% if devise_mapping.rememberable? -%> <% if devise_mapping.rememberable? -%>
<%= f.input :remember_me, as: :boolean %> <%= f.input :remember_me, as: :boolean %>
<% end -%> <% end -%>
</div>
<div class="form-actions">
<%= f.submit "Sign in", class: 'btn btn-primary' %> <%= f.submit "Sign in", class: 'btn btn-primary' %>
</div> <small>
or <%= link_to "Sign up", new_registration_path(resource_name) %>
/ <%= link_to 'Forgot your password?', new_password_path(resource_name) %>
</small>
<% end %> <% end %>

2
app/views/users/shared/_links.erb

@ -6,4 +6,4 @@
<%= n.item "Didn't receive confirmation instructions?", link: new_confirmation_path(resource_name) %> <%= n.item "Didn't receive confirmation instructions?", link: new_confirmation_path(resource_name) %>
<%= n.item "Didn't receive unlock instructions?", link: new_unlock_path(resource_name) %> <%= n.item "Didn't receive unlock instructions?", link: new_unlock_path(resource_name) %>
<% end %> <% end %>
</br>

8
app/views/users/unlocks/new.html.erb

@ -3,16 +3,12 @@
<%= simple_form_for(resource, <%= simple_form_for(resource,
as: resource_name, as: resource_name,
url: unlock_path(resource_name), url: unlock_path(resource_name),
html: { :method => :post, class: 'form-horizontal' } method: :post
) do |f| %> ) do |f| %>
<%= devise_error_messages! %> <%= devise_error_messages! %>
<div class="actions"> <%= f.input :email, required: true %>
<%= f.input :email %>
</div>
<div class="form-actions">
<%= f.submit "Resend unlock instructions", class: 'btn btn-primary' %> <%= f.submit "Resend unlock instructions", class: 'btn btn-primary' %>
</div>
<% end %> <% end %>

10
config/application.rb

@ -2,12 +2,7 @@ require File.expand_path('../boot', __FILE__)
require 'rails/all' require 'rails/all'
if defined?(Bundler) Bundler.require(:default, Rails.env)
# If you precompile assets before deploying to production, use this line
Bundler.require *Rails.groups(:assets => %w(development test))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
module Entrydns module Entrydns
class Application < Rails::Application class Application < Rails::Application
@ -43,9 +38,6 @@ module Entrydns
# Configure sensitive parameters which will be filtered from the log file. # Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password] config.filter_parameters += [:password]
# 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'

10
config/environments/development.rb

@ -6,9 +6,6 @@ Entrydns::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
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
# Show full error reports and disable caching # 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
@ -27,14 +24,9 @@ Entrydns::Application.configure do
# Expands the lines which load the assets # Expands the lines which load the assets
config.assets.debug = true config.assets.debug = true
# Raise exception on mass assignment protection for Active Record models
config.active_record.mass_assignment_sanitizer = :strict
# Log the query plan for queries taking more than this (works with SQLite, MySQL, and PostgreSQL)
config.active_record.auto_explain_threshold_in_seconds = 0.5
config.action_mailer.default_url_options = { :host => 'localhost:3000' } config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.delivery_method = :smtp config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {:address => "localhost", :port => 1025} config.action_mailer.smtp_settings = {:address => "localhost", :port => 1025}
config.eager_load = false
end end

5
config/environments/production.rb

@ -73,4 +73,9 @@ Entrydns::Application.configure do
:port => 25, :port => 25,
:domain => 'entrydns.net' :domain => 'entrydns.net'
} }
config.eager_load = true
# Compress JavaScripts and CSS
config.assets.js_compressor = :uglifier
end end

6
config/environments/test.rb

@ -11,9 +11,6 @@ Entrydns::Application.configure do
config.serve_static_assets = true config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600" config.static_cache_control = "public, max-age=3600"
# Log error messages when you accidentally call methods on nil
config.whiny_nils = true
# Show full error reports and disable caching # 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
@ -42,6 +39,5 @@ Entrydns::Application.configure do
config.action_mailer.default_url_options = {:host => 'entrydns.net'} config.action_mailer.default_url_options = {:host => 'entrydns.net'}
# Raise exception on mass assignment protection for Active Record models config.eager_load = false
config.active_record.mass_assignment_sanitizer = :strict
end end

3
config/initializers/active_scaffold.rb

@ -1,6 +1,9 @@
require 'active_scaffold/bridges/cancan/cancan_bridge.rb'
ActiveScaffold.js_framework = :jquery ActiveScaffold.js_framework = :jquery
ActiveScaffold.set_defaults do |conf| ActiveScaffold.set_defaults do |conf|
conf.security.default_permission = false conf.security.default_permission = false
# conf.cache_action_link_urls = false
ActiveScaffold::Config::Mark.mark_all_mode = :page ActiveScaffold::Config::Mark.mark_all_mode = :page
end end

1
config/initializers/audited.rb

@ -1 +0,0 @@
Audited.audit_class = Audit

16
config/initializers/cancan.rb

@ -85,15 +85,9 @@ module CanCan
end end
end end
class Rule class Rule # allow Squeel
# allow Squeel
def matches_conditions_hash?(subject, conditions = @conditions) def matches_conditions_hash?(subject, conditions = @conditions)
if conditions.empty? return true if conditions.empty?
true
else
if model_adapter(subject).override_conditions_hash_matching? subject, conditions
model_adapter(subject).matches_conditions_hash? subject, conditions
else
conditions.all? do |name, value| conditions.all? do |name, value|
if model_adapter(subject).override_condition_matching? subject, name, value if model_adapter(subject).override_condition_matching? subject, name, value
model_adapter(subject).matches_condition? subject, name, value model_adapter(subject).matches_condition? subject, name, value
@ -106,7 +100,8 @@ module CanCan
end end
attribute = subject.send(method_name) attribute = subject.send(method_name)
if value.kind_of?(Hash) if value.kind_of?(Hash)
if attribute.kind_of? Array case attribute
when Array, ActiveRecord::Associations::CollectionProxy
attribute.any? { |element| matches_conditions_hash? element, value } attribute.any? { |element| matches_conditions_hash? element, value }
else else
!attribute.nil? && matches_conditions_hash?(attribute, value) !attribute.nil? && matches_conditions_hash?(attribute, value)
@ -119,8 +114,7 @@ module CanCan
end end
end end
end end
end
end
end end
end end

2
config/initializers/devise.rb

@ -96,7 +96,7 @@ Devise.setup do |config|
# ==> Configuration for :validatable # ==> Configuration for :validatable
# Range for password length. Default is 6..128. # Range for password length. Default is 6..128.
# config.password_length = 6..128 config.password_length = 6..128
# Email regex used to validate email formats. It simply asserts that # Email regex used to validate email formats. It simply asserts that
# an one (and only one) @ exists in the given string. This is mainly # an one (and only one) @ exists in the given string. This is mainly

20
config/initializers/rails_admin.rb

@ -1,6 +1,8 @@
# RailsAdmin config file. Generated on September 10, 2012 23:57 # RailsAdmin config file. Generated on September 10, 2012 23:57
# See github.com/sferik/rails_admin for more informations # See github.com/sferik/rails_admin for more informations
__END__
RailsAdmin.config do |config| RailsAdmin.config do |config|
# If your default_local is different from :en, uncomment the following 2 lines and set your default locale here: # If your default_local is different from :en, uncomment the following 2 lines and set your default locale here:
@ -35,7 +37,7 @@ RailsAdmin.config do |config|
# Add models here if you want to go 'whitelist mode': # Add models here if you want to go 'whitelist mode':
config.included_models = [A, AAAA, Admin, CNAME, Domain, MX, NS, Permission, config.included_models = [A, AAAA, Admin, CNAME, Domain, MX, NS, Permission,
Record, SOA, SRV, TXT, User, Audit, BlacklistedDomain] Record, SOA, SRV, TXT, User, BlacklistedDomain]
# Application wide tried label methods for models' instances # Application wide tried label methods for models' instances
# config.label_methods << :description # Default is [:name, :title] # config.label_methods << :description # Default is [:name, :title]
@ -84,19 +86,6 @@ RailsAdmin.config do |config|
configure :value, :text configure :value, :text
end end
config.model Audit do
field :id
field :user
field :username
field :auditable
field :action
field :audited_changes
field :version
field :comment
field :remote_address
field :created_at
end
# config.model A do # config.model A do
# # Found associations: # # Found associations:
# configure :domain, :belongs_to_association # configure :domain, :belongs_to_association
@ -447,8 +436,7 @@ RailsAdmin.config do |config|
# configure :locked_at, :datetime # configure :locked_at, :datetime
# configure :created_at, :datetime # configure :created_at, :datetime
# configure :updated_at, :datetime # configure :updated_at, :datetime
# configure :first_name, :string # configure :full_name, :string
# configure :last_name, :string
# configure :creator_id, :integer # Hidden # configure :creator_id, :integer # Hidden
# configure :updator_id, :integer # # Sections: # configure :updator_id, :integer # # Sections:
# list do; end # list do; end

2
config/initializers/secret_token.rb

@ -4,4 +4,4 @@
# If you change this key, all old signed cookies will become invalid! # If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random, # Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks. # no regular words or you'll be exposed to dictionary attacks.
Entrydns::Application.config.secret_token = '0ce1f02a4b3fc4d1a1c8d22973b21e8589e9314dc338294953f0b985e3f44f12c8af74f2d9ba6f7c7bdb736c4efc5ea3f8135e23b1a036d033cd23331383ac75' Entrydns::Application.config.secret_key_base = '0ce1f02a4b3fc4d1a1c8d22973b21e8589e9314dc338294953f0b985e3f44f12c8af74f2d9ba6f7c7bdb736c4efc5ea3f8135e23b1a036d033cd23331383ac75'

179
config/initializers/simple_form.rb

@ -1,179 +0,0 @@
# Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
# Wrappers are used by the form builder to generate a
# complete input. You can remove any component from the
# wrapper, change the order or even add your own to the
# stack. The options given below are used to wrap the
# whole input.
config.wrappers :default, :class => :input,
:hint_class => :field_with_hint, :error_class => :field_with_errors do |b|
## Extensions enabled by default
# Any of these extensions can be disabled for a
# given input by passing: `f.input EXTENSION_NAME => false`.
# You can make any of these extensions optional by
# renaming `b.use` to `b.optional`.
# Determines whether to use HTML5 (:email, :url, ...)
# and required attributes
b.use :html5
# Calculates placeholders automatically from I18n
# You can also pass a string as f.input :placeholder => "Placeholder"
b.use :placeholder
## Optional extensions
# They are disabled unless you pass `f.input EXTENSION_NAME => :lookup`
# to the input. If so, they will retrieve the values from the model
# if any exists. If you want to enable the lookup for any of those
# extensions by default, you can change `b.optional` to `b.use`.
# Calculates maxlength from length validations for string inputs
b.optional :maxlength
# Calculates pattern from format validations for string inputs
b.optional :pattern
# Calculates min and max from length validations for numeric inputs
b.optional :min_max
# Calculates readonly automatically from readonly attributes
b.optional :readonly
## Inputs
b.use :label_input
b.use :hint, :wrap_with => { :tag => :span, :class => :hint }
b.use :error, :wrap_with => { :tag => :span, :class => :error }
end
config.wrappers :bootstrap, :tag => 'div', :class => 'control-group', :error_class => 'error' do |b|
b.use :html5
b.use :placeholder
b.use :label
b.wrapper :tag => 'div', :class => 'controls' do |ba|
ba.use :input
ba.use :error, :wrap_with => { :tag => 'span', :class => 'help-inline' }
ba.use :hint, :wrap_with => { :tag => 'p', :class => 'help-block' }
end
end
config.wrappers :prepend, :tag => 'div', :class => "control-group", :error_class => 'error' do |b|
b.use :html5
b.use :placeholder
b.use :label
b.wrapper :tag => 'div', :class => 'controls' do |input|
input.wrapper :tag => 'div', :class => 'input-prepend' do |prepend|
prepend.use :input
end
input.use :hint, :wrap_with => { :tag => 'span', :class => 'help-block' }
input.use :error, :wrap_with => { :tag => 'span', :class => 'help-inline' }
end
end
config.wrappers :append, :tag => 'div', :class => "control-group", :error_class => 'error' do |b|
b.use :html5
b.use :placeholder
b.use :label
b.wrapper :tag => 'div', :class => 'controls' do |input|
input.wrapper :tag => 'div', :class => 'input-append' do |append|
append.use :input
end
input.use :hint, :wrap_with => { :tag => 'span', :class => 'help-block' }
input.use :error, :wrap_with => { :tag => 'span', :class => 'help-inline' }
end
end
# Wrappers for forms and inputs using the Twitter Bootstrap toolkit.
# Check the Bootstrap docs (http://twitter.github.com/bootstrap)
# to learn about the different styles for forms and inputs,
# buttons and other elements.
config.default_wrapper = :bootstrap
# Define the way to render check boxes / radio buttons with labels.
# Defaults to :nested for bootstrap config.
# :inline => input + label
# :nested => label > input
config.boolean_style = :nested
# Default class for buttons
# config.button_class = 'btn'
config.button_class = 'btn'
# Method used to tidy up errors. Specify any Rails Array method.
# :first lists the first message for each field.
# Use :to_sentence to list all errors for each field.
# config.error_method = :first
# Default tag used for error notification helper.
config.error_notification_tag = :div
# CSS class to add for error notification helper.
config.error_notification_class = 'alert alert-error'
# ID to add for error notification helper.
# config.error_notification_id = nil
# Series of attempts to detect a default label method for collection.
# config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
# Series of attempts to detect a default value method for collection.
# config.collection_value_methods = [ :id, :to_s ]
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
# config.collection_wrapper_tag = nil
# You can define the class to use on all collection wrappers. Defaulting to none.
# config.collection_wrapper_class = nil
# You can wrap each item in a collection of radio/check boxes with a tag,
# defaulting to :span. Please note that when using :boolean_style = :nested,
# SimpleForm will force this option to be a label.
# config.item_wrapper_tag = :span
# You can define a class to use in all item wrappers. Defaulting to none.
# config.item_wrapper_class = nil
# How the label text should be generated altogether with the required text.
# config.label_text = lambda { |label, required| "#{required} #{label}" }
# You can define the class to use on all labels. Default is nil.
config.label_class = 'control-label'
# You can define the class to use on all forms. Default is simple_form.
# config.form_class = :simple_form
# You can define which elements should obtain additional classes
# config.generate_additional_classes_for = [:wrapper, :label, :input]
# Whether attributes are required by default (or not). Default is true.
# config.required_by_default = true
# Tell browsers whether to use default HTML5 validations (novalidate option).
# Default is enabled.
config.browser_validations = true
# Collection of methods to detect if a file type was given.
# config.file_methods = [ :mounted_as, :file?, :public_filename ]
# Custom mappings for input types. This should be a hash containing a regexp
# to match as key, and the input type that will be used when the field name
# matches the regexp as value.
# config.input_mappings = { /count/ => :integer }
# Default priority for time_zone inputs.
# config.time_zone_priority = nil
# Default priority for country inputs.
# config.country_priority = nil
# Default size for text inputs.
# config.default_input_size = 50
# When false, do not use translations for labels.
# config.translate_labels = true
# Automatically discover new inputs in Rails' autoload path.
# config.inputs_discovery = true
# Cache SimpleForm inputs discovery
# config.cache_discovery = !Rails.env.development?
end

98
config/initializers/simple_form.rb.rb

@ -0,0 +1,98 @@
require 'simple_form/components/labeled_input'
# http://stackoverflow.com/questions/14972253/simpleform-default-input-class
# https://github.com/plataformatec/simple_form/issues/316
inputs = %w[
CollectionSelectInput
DateTimeInput
FileInput
GroupedCollectionSelectInput
NumericInput
PasswordInput
RangeInput
StringInput
TextInput
]
inputs.each do |input_type|
superclass = "SimpleForm::Inputs::#{input_type}".constantize
new_class = Class.new(superclass) do
def input_html_classes
super.push('form-control')
end
end
Object.const_set(input_type, new_class)
end
# Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
config.boolean_style = :nested
config.wrappers :bootstrap3, tag: 'div', class: 'form-group', error_class: 'has-error',
defaults: { input_html: { class: 'default_class' } } do |b|
b.use :html5
b.use :min_max
b.use :maxlength
b.use :placeholder
b.optional :pattern
b.optional :readonly
b.use :label_input
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
b.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
end
config.wrappers :inlabel, tag: 'div', class: 'form-group', error_class: 'has-error',
defaults: { input_html: { class: 'default_class' } } do |b|
b.use :html5
b.use :min_max
b.use :maxlength
b.use :placeholder
b.optional :pattern
b.optional :readonly
b.use :labeled_input
b.use :input
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
b.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
end
config.wrappers :prepend, tag: 'div', class: "form-group", error_class: 'error' do |b|
b.use :html5
b.use :placeholder
b.use :label
b.wrapper tag: 'div', class: 'controls' do |input|
input.wrapper tag: 'div', class: 'input-prepend' do |prepend|
prepend.use :input
end
input.use :hint, wrap_with: { tag: 'span', class: 'help-block' }
input.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
end
end
config.wrappers :append, tag: 'div', class: "control-group", error_class: 'error' do |b|
b.use :html5
b.use :placeholder
b.use :label
b.wrapper tag: 'div', class: 'controls' do |input|
input.wrapper tag: 'div', class: 'input-append' do |append|
append.use :input
end
input.use :hint, wrap_with: { tag: 'span', class: 'help-block' }
input.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
end
end
# Wrappers for forms and inputs using the Twitter Bootstrap toolkit.
# Check the Bootstrap docs (http://getbootstrap.com/)
# to learn about the different styles for forms and inputs,
# buttons and other elements.
config.default_wrapper = :bootstrap3
end

1
config/locales/devise.en.yml

@ -17,6 +17,7 @@ en:
unauthenticated: 'You need to sign in or sign up before continuing.' unauthenticated: 'You need to sign in or sign up before continuing.'
unconfirmed: 'You have to confirm your account before continuing.' unconfirmed: 'You have to confirm your account before continuing.'
locked: 'Your account is locked.' locked: 'Your account is locked.'
not_found_in_database: 'Invalid email or password.'
invalid: 'Invalid email or password.' invalid: 'Invalid email or password.'
invalid_token: 'Invalid authentication token.' invalid_token: 'Invalid authentication token.'
timeout: 'Your session expired, please sign in again to continue.' timeout: 'Your session expired, please sign in again to continue.'

9
config/routes.rb

@ -1,10 +1,12 @@
Entrydns::Application.routes.draw do Entrydns::Application.routes.draw do
mount RailsAdmin::Engine => '/rails_admin', :as => 'rails_admin' # mount RailsAdmin::Engine => '/rails_admin', :as => 'rails_admin'
devise_for :admins devise_for :admins
devise_for :users devise_for :users, controllers: {
registrations: 'users/registrations'
}
scope module: 'users' do scope module: 'users' do
@ -19,7 +21,8 @@ Entrydns::Application.routes.draw do
end end
end end
match '/records/modify/:authentication_token', to: 'records#modify', as: :modify_record match '/records/modify/:authentication_token', to: 'records#modify',
as: :modify_record, via: [:get, :post, :put]
resources :records do resources :records do
as_routes as_routes
end end

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save