Browse Source

huge-ass update, tweaks

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

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

@ -1,5 +1,5 @@
#= require webshims/minified/extras/modernizr-custom
#= require webshims/minified/polyfiller
#= require webshims/extras/modernizr-custom
#= require webshims/polyfiller
$.webshims.setOptions('basePath', '/assets/webshims/minified/shims/')
$.webshims.polyfill()
$.webshims.setOptions('basePath', '/assets/webshims/shims/')
$.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
* 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
*/
@import "bootstrap-custom";
@import "bootstrap-responsive";
$label_color: #555; // hack for as labels ...
$carousel-indicator-border-color: #333;
$carousel-indicator-active-bg: #333;
@import "bootstrap";
@import "bootstrap/theme";
@import 'font-awesome';
@import "active_scaffold";
@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

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

@ -1,29 +1,24 @@
@import "compass/css3/images";
.call-to-action {
margin-top: 3em;
margin-bottom: 3em;
small {
font-style: italic;
font-size: 80%
@import "compass/css3/border-radius";
.contour {
border: 2px solid $text-color;
padding: 1em;
@include border-radius($border-radius-large);
br.hide {
display: block !important;
visibility: visible !important;
}
}
.twitter-share-button {
font-size: 14px;
font-weight: normal;
}
.page-home-header {
@include background(radial-gradient(color-stops(#fff, #c1f1ff), bottom));
border-bottom: 1px solid #B9DCFF;
.page-header {
small {
color: #3F3F39;
}
small { color: #3F3F39; }
border-bottom: none;
padding-bottom: 0;
margin-bottom: 20px;
margin: 20px 0 20px;
}
}
@ -34,10 +29,6 @@
padding-top: 17px;
padding-bottom: 17px;
border-bottom: 1px solid darken(#DAFFCD, 15%);
li, p {
font-size: 14px;
line-height: 20px;
}
}
.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 {
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 {
@extend .alert;
@extend .alert-error;
@extend .alert-danger;
h2 {
color: $errorText;
color: $state-danger-text;
margin-top: 0;
}
}
.field_with_errors {
display: table;
label {
color: $errorText;
color: $state-danger-text;
}
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 {
background: #f7fdff;
padding-top: 50px;
}
@media (max-width: 980px) {
.navbar-fixed-top {
margin-bottom: 0px;
}
html, body {
height: 100%;
}
@media (min-width: 980px) {
#main {
margin-top: 40px;
}
#wrap {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto (-$footer-size);
}
#push {
height: $footer-size;
}
.footer {
margin-top: 25px;
padding: 15px 0 15px;
border-top: 1px solid #E5E5E5;
#footer {
height: $footer-size;
}
.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/text-shadow";
.navbar .brand {
.navbar .navbar-brand {
color: #53d4ff;
@include text-shadow(
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;
}

20
app/controllers/application_controller.rb

@ -1,4 +1,4 @@
class ApplicationController < ActionController::Base
class ApplicationController < ActionController::Base
protect_from_forgery
before_filter :check_honeypot
around_filter :set_timezone
@ -39,7 +39,6 @@ class ApplicationController < ActionController::Base
render :nothing => true if params[Settings.honeypot].present?
end
# Overwriting the sign_out redirect path method
def after_sign_out_path_for(resource_or_scope)
page_path('signed_out')
end
@ -48,4 +47,21 @@ class ApplicationController < ActionController::Base
@current_ability ||= ::UserAbility.new(current_user)
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

3
app/controllers/concerns/records_controller_common.rb

@ -14,7 +14,8 @@ module RecordsControllerCommon
end
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
# 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]
end
def resource; User.new end
helper_method :resource
def resource_name; :user end
helper_method :resource_name
end

3
app/controllers/users/aaaas_controller.rb

@ -13,9 +13,8 @@ class Users::AaaasController < UsersController
protected
# override to use :mx_records instead of :records assoc
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
# override, we make our own sti logic

3
app/controllers/users/as_controller.rb

@ -26,9 +26,8 @@ class Users::AsController < UsersController
protected
# override to use :mx_records instead of :records assoc
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
# override, we make our own sti logic

3
app/controllers/users/cnames_controller.rb

@ -14,9 +14,8 @@ class Users::CnamesController < UsersController
protected
# override to use :mx_records instead of :records assoc
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
# override, we make our own sti logic

3
app/controllers/users/mxes_controller.rb

@ -21,9 +21,8 @@ class Users::MxesController < UsersController
end
end
# override to use :mx_records instead of :records assoc
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
# override, we make our own sti logic

3
app/controllers/users/ns_controller.rb

@ -13,9 +13,8 @@ class Users::NsController < UsersController
protected
# override to use :mx_records instead of :records assoc
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
# 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.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
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
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
# 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
end
# override to use :mx_records instead of :records assoc
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
# override, we make our own sti logic

3
app/controllers/users/txts_controller.rb

@ -13,9 +13,8 @@ class Users::TxtsController < UsersController
protected
# override to use :mx_records instead of :records assoc
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
# override, we make our own sti logic

14
app/helpers/application_helper.rb

@ -4,7 +4,7 @@ module ApplicationHelper
FLASH_ALIASES = HashWithIndifferentAccess.new(
error: :error, success: :success,
alert: :alert, warning: :alert, warn: :alert,
alert: :warning, warning: :warning, warn: :warning,
info: :info, notice: :info
)
@ -19,11 +19,6 @@ module ApplicationHelper
flashes.present? ? content_tag(:div, flashes.html_safe, :class => clazz) : nil
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)
return "" if resource.errors.empty?
@ -48,4 +43,11 @@ module ApplicationHelper
end
end
# ActiveScaffold
def active_scaffold_column_timestamp(record, column)
value = record.send(column.name)
value.nil? ? nil : Time.at(value)
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
# Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me
# attr_accessible :title, :body
# attr_accessible :email, :password, :password_confirmation, :remember_me
# Called by Devise to see if an user can currently be signed in
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
attr_accessible :name
# attr_accessible :name
def self.include?(name)
where("blacklisted_domains.name = ? OR ? LIKE CONCAT('%.', blacklisted_domains.name)",

18
app/models/domain.rb

@ -2,32 +2,29 @@ class Domain < ActiveRecord::Base
self.inheritance_column = :sti_disabled
nilify_blanks
stampable
audited
# optional IP for create form, results in a type A record
attr_accessor :ip
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
has_many :records, :inverse_of => :domain, :dependent => :destroy
has_many :permissions, :inverse_of => :domain, :dependent => :destroy
has_many :permitted_users, :through => :permissions, :source => :user
has_many :audits, :as => :auditable
cattr_reader :types
@@types = ['NATIVE', 'MASTER', 'SLAVE', 'SUPERSLAVE']
has_one :soa_record,
-> { where(type: 'SOA') },
:class_name => 'SOA',
:conditions => {:type => 'SOA'},
:inverse_of => :domain
for type in Record.types
has_many :"#{type.downcase}_records",
Record.types.each do |type|
has_many :"#{type.downcase}_records",
:class_name => type,
:conditions => {:type => type},
:inverse_of => :domain
validates_associated :"#{type.downcase}_records"
end
@ -49,7 +46,10 @@ class Domain < ActiveRecord::Base
delegate :domains_exceeding?, :to => :user
def max_domains_per_user
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
@ -59,7 +59,7 @@ class Domain < ActiveRecord::Base
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?
Settings.host_domains.include?(name)

2
app/models/domain/tree_structure.rb

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

2
app/models/permission.rb

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

4
app/models/record.rb

@ -1,14 +1,12 @@
class Record < ActiveRecord::Base
stampable
audited on: [:create]
belongs_to :domain, :inverse_of => :records
belongs_to :user, :inverse_of => :records
has_many :audits, :as => :auditable
cattr_reader :types
@@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 :type, :inclusion => {:in => @@types, :message => "Unknown record type"}

2
app/models/setting.rb

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

2
app/models/srv.rb

@ -6,7 +6,7 @@
# @see http://www.zytrax.com/books/dns/ch8/srv.html
class SRV < Record
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
validates :prio, :presence => true, :numericality => {
:greater_than_or_equal_to => 0,

12
app/models/user.rb

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -3,10 +3,11 @@
<small>How do I contribute?</small>
</div>
<div class="progress progress-striped">
<div class="progress">
<% size = Setting['public.donations.progress'] %>
<div class="bar" style="width: <%= progress_size(size) %>%;">
<%= size -%>% Progress
<div class="progress-bar" role="progressbar" aria-valuenow="<%= size -%>"
aria-valuemin="0" aria-valuemax="100" style="width: <%= progress_size(size) -%>%;">
<span><%= size -%>% Complete</span>
</div>
</div>
@ -22,7 +23,7 @@
</p>
<div class="row donate-actions">
<div class="span4">
<div class="col-lg-4">
<h3>&euro; EUR</h3>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<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">
</form>
</div>
<div class="span4">
<div class="col-lg-4">
<h3>$ USD</h3>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<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">
</form>
</div>
<div class="span4">
<div class="col-lg-4">
<h3>&pound; GBP</h3>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<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="page-header">
<h1>
Free DNS management service for everyone
<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>
Thousands of people manage their DNS using <strong>EntryDNS</strong>
</h1>
</div>
</div>
</div>
<div class="page-home-section page-home-incentives">
<div class="page-home-incentives">
<div class="container">
<div class="row">
<div class="span5">
<%= render 'public/pages/home/headlines' %>
<%= render 'public/pages/shared/action' %>
<div class="col-lg-4">
<div class="contour">
<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>
<br class="hidden-lg">
</div>
<div class="span7">
<div class="col-lg-8">
<%= render 'public/pages/home/slides' %>
</div>
@ -36,15 +45,15 @@
</div>
</div>
<div class="page-home-section page-home-quotes">
<div class="page-home-quotes hide">
<div class="container">
<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
and we hope to support it on either a freemium model or some sort of affiliate sales.</blockquote>
</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.
Nevertheless the service is at this point functional and there are people already using it.</blockquote>
</div>
@ -53,19 +62,15 @@
</div>
</div>
<div class="page-home-section page-home-extra">
<div>
<div class="container">
<div class="row">
<div class="span6">
<div class="col-lg-6">
<h3>Benefits</h3>
<%= 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 class="span6">
<div class="col-lg-6">
<h3>Features</h3>
<%= render 'public/pages/shared/features' %>
</div>
@ -73,5 +78,3 @@
</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>

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

@ -1,24 +1,39 @@
<div id="slidesWrapper">
<div id="slides">
<%= image_tag 'marketing/1.png' %>
<%= image_tag 'marketing/2.png' %>
<%= image_tag 'marketing/3.png' %>
<%= image_tag 'marketing/4.png' %>
<%= image_tag 'marketing/5.png' %>
<div id="carousel-jumbotron" class="carousel slide">
<!-- 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' %>
</div>
<div class="item">
<%= image_tag 'marketing/2.png' %>
</div>
<div class="item">
<%= image_tag 'marketing/3.png' %>
</div>
<div class="item">
<%= image_tag 'marketing/4.png' %>
</div>
<div class="item">
<%= image_tag 'marketing/5.png' %>
</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>
<script type="text/javascript">
$("#slides").slides({
navigation: false,
responsive: true,
slide: {
interval: 500
},
preload: {
active: true
},
playInterval: 8000,
pauseInterval: 16000
}).slides('play');
</script>
<%= javascript_tag "$('.carousel').carousel()" %>

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 class="row">
<div class="span6">
<div class="col-lg-6">
<%= render :partial => 'public/pages/team/zooz' %>
</div>
<div class="span6">
<div class="col-lg-6">
<%= render :partial => 'public/pages/team/clyfe' %>
</div>
</div>

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

@ -1,9 +1,13 @@
<h4>Claudius Nicolae <small>Programmer</small></h4>
<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>University of Bucharest</em> and also started a Masters in Software Development.
<em>University of Bucharest</em>.
</p>
<p>
He worked with many programming languages and technologies from web applications to

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

@ -1,5 +1,7 @@
<div class="footer">
<div class="block">
<div id="footer">
<div class="container">
<hr>
<p class="pull-right">
<%= switch_user_select %>
</p>
@ -11,7 +13,7 @@
<%= n.item "About", link: page_path('about') %>
<%= n.item "&copy; #{Time.now.year} EntryDNS Team", link: page_path('team') %>
<% end %>
</div>
</div>
</div>
<%= render 'shared/analytics' %>

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

@ -1,23 +1,22 @@
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<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>
</a>
<%= link_to('EntryDNS', root_path, class: 'brand') %>
<div class="nav-collapse">
<% if user_signed_in? %>
<%= render 'shared/navigation/users' %>
<% else %>
<%= render 'shared/navigation/public' %>
<% end %>
</div>
</button>
<%= link_to('EntryDNS', root_path, class: 'navbar-brand') %>
</div>
<div class="collapse navbar-collapse navbar-main-collapse">
<% if user_signed_in? %>
<%= render 'shared/navigation/users' %>
<% else %>
<%= render 'shared/navigation/public' %>
<% end %>
</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 %>
<i class="icon-white icon-info-sign"></i> About
<% end %>
@ -13,7 +13,7 @@
<% 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,
html: { rel: 'tooltip', data: { placement: 'bottom' }, title: Settings.news_link } do %>
<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 %>
<i class="icon-white icon-th-list"></i> My Domains
<% end %>
@ -10,7 +10,7 @@
<% 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,
html: { rel: 'tooltip', data: { placement: 'bottom' }, title: Settings.news_link } do %>
<i class="icon-white icon-share-alt"></i> News

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

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

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

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

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

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

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

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

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

@ -1,23 +1,4 @@
<%= render :partial => "users/shared/links" %>
<%= simple_form_for(resource,
as: resource_name,
url: registration_path(resource_name),
html: { class: 'form-horizontal' }
) do |f| %>
<%= devise_error_messages! %>
<%= render 'users/registrations/new' %>
<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,
as: resource_name,
url: session_path(resource_name),
html: { class: 'form-horizontal' }
url: session_path(resource_name)
) do |f| %>
<div class="actions">
<%= f.input :email %>
<%= f.input :password %>
<%= f.input :email, required: true %>
<%= f.input :password, required: true %>
<% if devise_mapping.rememberable? -%>
<%= f.input :remember_me, as: :boolean %>
<% end -%>
</div>
<div class="form-actions">
<%= 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 %>

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 unlock instructions?", link: new_unlock_path(resource_name) %>
<% end %>
</br>

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

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

10
config/application.rb

@ -2,12 +2,7 @@ require File.expand_path('../boot', __FILE__)
require 'rails/all'
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require *Rails.groups(:assets => %w(development test))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
Bundler.require(:default, Rails.env)
module Entrydns
class Application < Rails::Application
@ -43,9 +38,6 @@ module Entrydns
# Configure sensitive parameters which will be filtered from the log file.
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
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.
config.cache_classes = false
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
# Show full error reports and disable caching
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
@ -26,15 +23,10 @@ Entrydns::Application.configure do
# Expands the lines which load the assets
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.delivery_method = :smtp
config.action_mailer.smtp_settings = {:address => "localhost", :port => 1025}
config.eager_load = false
end

5
config/environments/production.rb

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

8
config/environments/test.rb

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

3
config/initializers/active_scaffold.rb

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

1
config/initializers/audited.rb

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

50
config/initializers/cancan.rb

@ -85,42 +85,36 @@ module CanCan
end
end
class Rule
# allow Squeel
class Rule # allow Squeel
def matches_conditions_hash?(subject, conditions = @conditions)
if conditions.empty?
true
else
if model_adapter(subject).override_conditions_hash_matching? subject, conditions
model_adapter(subject).matches_conditions_hash? subject, conditions
return true if conditions.empty?
conditions.all? do |name, value|
if model_adapter(subject).override_condition_matching? subject, name, value
model_adapter(subject).matches_condition? subject, name, value
else
conditions.all? do |name, value|
if model_adapter(subject).override_condition_matching? subject, name, value
model_adapter(subject).matches_condition? subject, name, value
method_name = case name
when Symbol then name
when Squeel::Nodes::Join then name._name
when Squeel::Nodes::Predicate then name.expr
else raise name
end
attribute = subject.send(method_name)
if value.kind_of?(Hash)
case attribute
when Array, ActiveRecord::Associations::CollectionProxy
attribute.any? { |element| matches_conditions_hash? element, value }
else
method_name = case name
when Symbol then name
when Squeel::Nodes::Join then name._name
when Squeel::Nodes::Predicate then name.expr
else raise name
end
attribute = subject.send(method_name)
if value.kind_of?(Hash)
if attribute.kind_of? Array
attribute.any? { |element| matches_conditions_hash? element, value }
else
!attribute.nil? && matches_conditions_hash?(attribute, value)
end
elsif value.kind_of?(Array) || value.kind_of?(Range)
value.include? attribute
else
attribute == value
end
!attribute.nil? && matches_conditions_hash?(attribute, value)
end
elsif value.kind_of?(Array) || value.kind_of?(Range)
value.include? attribute
else
attribute == value
end
end
end
end
end
end

2
config/initializers/devise.rb

@ -96,7 +96,7 @@ Devise.setup do |config|
# ==> Configuration for :validatable
# 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
# 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
# See github.com/sferik/rails_admin for more informations
__END__
RailsAdmin.config do |config|
# 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':
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
# config.label_methods << :description # Default is [:name, :title]
@ -84,19 +86,6 @@ RailsAdmin.config do |config|
configure :value, :text
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
# # Found associations:
# configure :domain, :belongs_to_association
@ -447,8 +436,7 @@ RailsAdmin.config do |config|
# configure :locked_at, :datetime
# configure :created_at, :datetime
# configure :updated_at, :datetime
# configure :first_name, :string
# configure :last_name, :string
# configure :full_name, :string
# configure :creator_id, :integer # Hidden
# configure :updator_id, :integer # # Sections:
# 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!
# Make sure the secret is at least 30 characters and all random,
# 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.'
unconfirmed: 'You have to confirm your account before continuing.'
locked: 'Your account is locked.'
not_found_in_database: 'Invalid email or password.'
invalid: 'Invalid email or password.'
invalid_token: 'Invalid authentication token.'
timeout: 'Your session expired, please sign in again to continue.'

9
config/routes.rb

@ -1,10 +1,12 @@
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 :users
devise_for :users, controllers: {
registrations: 'users/registrations'
}
scope module: 'users' do
@ -19,7 +21,8 @@ Entrydns::Application.routes.draw do
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
as_routes
end

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

Loading…
Cancel
Save