diff --git a/Gemfile b/Gemfile index 19d94bd..a31670e 100644 --- a/Gemfile +++ b/Gemfile @@ -34,10 +34,13 @@ end gem 'jquery-rails' # gem 'foreigner' ? -gem 'rspec-rails', '~> 2.6.1', :group => [:test, :development] -group :test do +group :test, :development do + gem 'rspec-rails', '~> 2.6.1' gem 'faker','~> 1.0.1' gem 'factory_girl_rails', '~> 1.2' +end + +group :test do gem 'capybara', '~> 1.1.1' gem 'database_cleaner', '~> 0.6.7' gem 'spork', '~> 0.9.0.rc' diff --git a/app/assets/images/marketing/domains.jpg b/app/assets/images/marketing/domains.jpg new file mode 100644 index 0000000..38ebdf0 Binary files /dev/null and b/app/assets/images/marketing/domains.jpg differ diff --git a/app/assets/images/marketing/hosts.jpg b/app/assets/images/marketing/hosts.jpg new file mode 100644 index 0000000..a4a2573 Binary files /dev/null and b/app/assets/images/marketing/hosts.jpg differ diff --git a/app/assets/stylesheets/pages/home.css.scss b/app/assets/stylesheets/pages/home.css.scss index 2087e8e..4a0ef07 100644 --- a/app/assets/stylesheets/pages/home.css.scss +++ b/app/assets/stylesheets/pages/home.css.scss @@ -85,7 +85,6 @@ a { @include button(#7a43b6, #fff, 0 -1px 1px rgba(0,0,0,.4)); - //@include cupid-green; width: 250px; height: 40px; diff --git a/app/assets/stylesheets/theme/public.css.scss b/app/assets/stylesheets/theme/public.css.scss index 3c5de92..8dab658 100644 --- a/app/assets/stylesheets/theme/public.css.scss +++ b/app/assets/stylesheets/theme/public.css.scss @@ -1,5 +1,6 @@ .public .header-inner { width: 77%; + min-width: 950px; margin: auto; position: relative; } diff --git a/app/assets/stylesheets/theme/theme.css.scss b/app/assets/stylesheets/theme/theme.css.scss index 65572d8..99bb460 100644 --- a/app/assets/stylesheets/theme/theme.css.scss +++ b/app/assets/stylesheets/theme/theme.css.scss @@ -53,6 +53,7 @@ hr { #main { width: 77%; + min-width: 950px; float: left; } #main .block { diff --git a/app/controllers/domains_controller.rb b/app/controllers/domains_controller.rb index cca6085..d705d09 100644 --- a/app/controllers/domains_controller.rb +++ b/app/controllers/domains_controller.rb @@ -9,7 +9,7 @@ class DomainsController < ApplicationController conf.columns[:ip].description = 'Ex. "10.10.5.12", optional IP to associate your domain with' conf.columns[:ns_records].show_blank_record = false conf.actions.exclude :show - conf.list.sorting = { :name => :asc } + conf.list.sorting = {:name => :asc} conf.create.link.label = "Add Domain" # conf.columns[:records].label = 'All Records' diff --git a/app/controllers/hosts_controller.rb b/app/controllers/hosts_controller.rb index ff48fae..024081d 100644 --- a/app/controllers/hosts_controller.rb +++ b/app/controllers/hosts_controller.rb @@ -5,10 +5,12 @@ class HostsController < ApplicationController conf.create.columns = [:name, :host_domain, :content, :ttl,] conf.update.columns = [:name, :host_domain, :content, :ttl] conf.list.label = 'Hosts' + conf.list.sorting = {:name => :asc} conf.create.link.label = "Add Host" conf.columns[:host_domain].form_ui = :select conf.columns[:host_domain].options = {:options => Settings.host_domains} conf.columns[:name].label = 'Host' + conf.columns[:name].description = 'Ex. "your-name"' conf.columns[:content].label = 'IP' conf.columns[:content].description = 'Ex. "10.10.5.12"' conf.columns[:change_date].list_ui = :timestamp diff --git a/app/views/pages/home/_slides.html.erb b/app/views/pages/home/_slides.html.erb index f6769a2..642f256 100644 --- a/app/views/pages/home/_slides.html.erb +++ b/app/views/pages/home/_slides.html.erb @@ -1,21 +1,24 @@
- - - - + <%= image_tag 'marketing/domains.jpg' %> + <%= image_tag 'marketing/hosts.jpg' %>
\ No newline at end of file diff --git a/db/samples.rb b/db/samples.rb new file mode 100644 index 0000000..377cefe --- /dev/null +++ b/db/samples.rb @@ -0,0 +1,14 @@ + +user = User.find_by_email('user@entrydns.net') +entrydns_org = Domain.find_by_name('entrydns.org') + +100.times do + domain = Factory.build(:domain, :user => user) + domain.setup(FactoryGirl.generate(:email)) + domain.save! + domain.soa_record.update_serial! +end + +100.times do + Factory.create(:a, :user => user, :domain => entrydns_org) +end diff --git a/db/seeds.rb b/db/seeds.rb index 1a48cd2..ea34e0f 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -8,6 +8,7 @@ admin = User.create!( :password_confirmation => 'garlik1', :confirmed_at => Time.now ) +admin.confirm! for name in Settings.host_domains entrudns_org = Domain.new(:name => name, :type => 'NATIVE', :user_id => admin.id) @@ -24,3 +25,4 @@ user = User.create!( :password_confirmation => 'useruser', :confirmed_at => Time.now ) +user.confirm! diff --git a/doc/README_FOR_APP b/doc/README_FOR_APP index cc3409a..e69de29 100644 --- a/doc/README_FOR_APP +++ b/doc/README_FOR_APP @@ -1,3 +0,0 @@ -# Simple API - -curl -H "Accept: application/json" -X PUT -d "" http://entrydns/records/modify/TOKEN diff --git a/lib/tasks/samples.rake b/lib/tasks/samples.rake new file mode 100644 index 0000000..676c5bc --- /dev/null +++ b/lib/tasks/samples.rake @@ -0,0 +1,9 @@ +namespace :db do + + desc 'Create sample data from db/samples.rb' + task :samples => :environment do + samples_file = File.join(Rails.root, "db", "samples.rb") + load(samples_file) if File.exist?(samples_file) + end + +end diff --git a/spec/factories.rb b/spec/factories.rb index ffd9064..4be1bdf 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -27,6 +27,7 @@ FactoryGirl.define do end factory :a do + name {Faker::Internet.domain_word} content {Faker::Internet.ip_v4_address} end