Browse Source

slides, samples, seeds, styles

pull/1/head
Nicolae Claudius 13 years ago
parent
commit
887b48e0fb
  1. 7
      Gemfile
  2. BIN
      app/assets/images/marketing/domains.jpg
  3. BIN
      app/assets/images/marketing/hosts.jpg
  4. 1
      app/assets/stylesheets/pages/home.css.scss
  5. 1
      app/assets/stylesheets/theme/public.css.scss
  6. 1
      app/assets/stylesheets/theme/theme.css.scss
  7. 2
      app/controllers/domains_controller.rb
  8. 2
      app/controllers/hosts_controller.rb
  9. 29
      app/views/pages/home/_slides.html.erb
  10. 14
      db/samples.rb
  11. 2
      db/seeds.rb
  12. 3
      doc/README_FOR_APP
  13. 9
      lib/tasks/samples.rake
  14. 1
      spec/factories.rb

7
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'

BIN
app/assets/images/marketing/domains.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
app/assets/images/marketing/hosts.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

1
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;

1
app/assets/stylesheets/theme/public.css.scss

@ -1,5 +1,6 @@
.public .header-inner {
width: 77%;
min-width: 950px;
margin: auto;
position: relative;
}

1
app/assets/stylesheets/theme/theme.css.scss

@ -53,6 +53,7 @@ hr {
#main {
width: 77%;
min-width: 950px;
float: left;
}
#main .block {

2
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'

2
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

29
app/views/pages/home/_slides.html.erb

@ -1,21 +1,24 @@
<div id="slidesWrapper">
<div id="slides">
<img src="http://slidesjs.com/examples/standard/img/slide-1.jpg">
<img src="http://slidesjs.com/examples/standard/img/slide-2.jpg">
<img src="http://slidesjs.com/examples/standard/img/slide-3.jpg">
<img src="http://slidesjs.com/examples/standard/img/slide-4.jpg">
<%= image_tag 'marketing/domains.jpg' %>
<%= image_tag 'marketing/hosts.jpg' %>
</div>
</div>
<script type="text/javascript">
$("#slides")
.slides({
width: 470,
navigation: false,
//responsive: true,
slide: {
interval: 500
}
})
.slides('play');
.slides({
width: 470,
navigation: false,
//responsive: true,
slide: {
interval: 500
},
preload: {
active: true
},
playInterval: 8000,
pauseInterval: 16000
})
.slides('play');
</script>

14
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

2
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!

3
doc/README_FOR_APP

@ -1,3 +0,0 @@
# Simple API
curl -H "Accept: application/json" -X PUT -d "" http://entrydns/records/modify/TOKEN

9
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

1
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

Loading…
Cancel
Save