From 7a2efad585beffb31a097236a147c2f58e8b51dc Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Fri, 15 Apr 2016 17:52:14 +0300 Subject: [PATCH] start on testing --- Gemfile | 2 +- README | 62 -------------------- README.md | 48 +++------------ app/models/user.rb | 2 +- app/views/devise/registrations/new.html.haml | 4 +- app/views/layouts/_footer.html.haml | 9 ++- config/secrets.yml.dev | 11 ++-- spec/features/visitors/course_page_spec.rb | 12 +--- spec/features/visitors/navigation_spec.rb | 4 +- spec/support/helpers/session_helpers.rb | 2 +- 10 files changed, 28 insertions(+), 128 deletions(-) delete mode 100644 README diff --git a/Gemfile b/Gemfile index 9d2d3b1..aa6943e 100644 --- a/Gemfile +++ b/Gemfile @@ -42,6 +42,7 @@ end group :development, :test do gem 'factory_girl_rails' gem 'faker' + gem 'database_cleaner' gem 'puma' gem 'rspec-rails' gem 'byebug' @@ -50,7 +51,6 @@ end group :test do gem 'capybara' - gem 'database_cleaner' gem 'launchy' gem 'selenium-webdriver' end diff --git a/README b/README deleted file mode 100644 index 5ab8470..0000000 --- a/README +++ /dev/null @@ -1,62 +0,0 @@ -Web Dev Site -================ - -Rails Composer is supported by developers who purchase our RailsApps tutorials. -Need help? Ask on Stack Overflow with the tag 'railsapps.' -Problems? Submit an issue: https://github.com/RailsApps/rails_apps_composer/issues -Your application contains diagnostics in this README file. -Please provide a copy of this README file when reporting any issues. - - -option Build a starter application? -choose Enter your selection: [rails-devise-pundit] -option Get on the mailing list for Rails Composer news? -choose Enter your selection: [none] -option Web server for development? -choose Enter your selection: [puma] -option Web server for production? -choose Enter your selection: [passenger] -option Database used in development? -choose Enter your selection: [sqlite] -option Template engine? -choose Enter your selection: [haml] -option Test framework? -choose Enter your selection: [rspec] -option Continuous testing? -choose Enter your selection: [guard] -option Front-end framework? -choose Enter your selection: [bootstrap3] -option Add support for sending email? -choose Enter your selection: [smtp] -option Authentication? -choose Enter your selection: [devise] -option Devise modules? -choose Enter your selection: [invitable] -option OmniAuth provider? -choose Enter your selection: [] -option Authorization? -choose Enter your selection: [pundit] -option Use a form builder gem? -choose Enter your selection: [simple_form] -option Add pages? -choose Enter your selection: [about+users] -option Set a locale? -choose Enter your selection: [none] -option Install page-view analytics? -choose Enter your selection: [ga] -option Add a deployment mechanism? -choose Enter your selection: [capistrano3] -option Set a robots.txt file to ban spiders? -choose Enter your selection: [true] -option Create a GitHub repository? (y/n) -choose Enter your selection: [true] -option Add gem and file for environment variables? -choose Enter your selection: [] -option Reduce assets logger noise during development? -choose Enter your selection: [true] -option Improve error reporting with 'better_errors' during development? -choose Enter your selection: [true] -option Use 'pry' as console replacement during development and test? -choose Enter your selection: [false] -option Use or create a project-specific rvm gemset? -choose Enter your selection: [false] diff --git a/README.md b/README.md index 7f08a3d..1834f78 100644 --- a/README.md +++ b/README.md @@ -1,48 +1,16 @@ -Web Dev Site -================ +#Web Dev Site + +Web site for webdev.camp + + +## Credits This application was generated with the [rails_apps_composer](https://github.com/RailsApps/rails_apps_composer) gem provided by the [RailsApps Project](http://railsapps.github.io/). Rails Composer is supported by developers who purchase our RailsApps tutorials. -Problems? Issues? ------------ -Need help? Ask on Stack Overflow with the tag 'railsapps.' +## Copyright -Your application contains diagnostics in the README file. Please provide a copy of the README file when reporting any issues. - -If the application doesn't work as expected, please [report an issue](https://github.com/RailsApps/rails_apps_composer/issues) -and include the diagnostics. - -Ruby on Rails -------------- - -This application requires: - -- Ruby 2.2.3 -- Rails 4.2.6 - -Learn more about [Installing Rails](http://railsapps.github.io/installing-rails.html). - -Getting Started ---------------- - -Documentation and Support -------------------------- - -Issues -------------- - -Similar Projects ----------------- - -Contributing ------------- - -Credits -------- - -License -------- +WebDev.camp 2016 diff --git a/app/models/user.rb b/app/models/user.rb index 32ab5ed..9977b48 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -8,6 +8,6 @@ class User < ActiveRecord::Base # Include default devise modules. Others available are: # :confirmable, :lockable, :timeoutable and :omniauthable - devise :invitable, :database_authenticatable, :registerable, :confirmable, + devise :database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable, :trackable, :validatable end diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml index a85bc9b..164ca6c 100644 --- a/app/views/devise/registrations/new.html.haml +++ b/app/views/devise/registrations/new.html.haml @@ -1,6 +1,6 @@ .authform = form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :role => 'form'}) do |f| - %h3 Sign up + %h3 Start by signing up = devise_error_messages! .form-group = f.label :name @@ -14,4 +14,4 @@ .form-group = f.label :password_confirmation = f.password_field :password_confirmation, class: 'form-control' - = f.submit 'Sign up', :class => 'button right' + = f.submit 'Start', :class => 'button right' diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml index 8f7e5b0..81968f6 100644 --- a/app/views/layouts/_footer.html.haml +++ b/app/views/layouts/_footer.html.haml @@ -33,19 +33,19 @@ .col-md-3 %h4.letter-spacing-1 LATEST UPDATES %ul.footer-posts.list-unstyled + %li + %a{:href => "/"} Finished slider, beta release + %small 15 April 2016 %li %a{:href => "/answers"} More answers to questions %small 25 March 2016 %li %a{:href => "/apply"} Updated apply page %small 24 March 2016 - %li - %a{:href => "/dev"} Updated dev and camp - %small 24 March 2016 .col-md-2 %h4.letter-spacing-1 EXPLORE Web Dev Camp %ul.footer-links.list-unstyled - %li= link_to "Course overview" , page_path(:web) + %li= link_to "Sign in" , user_session_path %li= link_to "Camp" , page_path(:camp) %li= link_to "Teachers" , page_path(:teachers) %li= link_to "Payment Policy" , page_path(:payment) @@ -73,4 +73,3 @@ ga('create', 'UA-76401513-1', 'auto'); ga('send', 'pageview'); - diff --git a/config/secrets.yml.dev b/config/secrets.yml.dev index 26d5e53..ea150a3 100644 --- a/config/secrets.yml.dev +++ b/config/secrets.yml.dev @@ -12,11 +12,14 @@ development: admin_name: First User - admin_email: user@example.com - admin_password: changeme - domain_name: example.com + admin_email: admin@webdev.camp + admin_password: password + domain_name: webdev.camp secret_key_base: 6fbc7972b587359c086a6c6738dca91a5cd53f635bdfba31c7b23721a27e1d89bf8c490dfc3ebe773bcdb98d2add0946ea924321bad66499b893d88fc827b883 test: - domain_name: example.com + admin_name: First User + admin_email: admin@webdev.camp + admin_password: password + domain_name: webdev.camp secret_key_base: a0a18747d0172bfadf4187e6c01be490f452539aeaa4d74bada88ef851d7a2dfabcde91552d3689e9eb71caf9062e5d8b28fbeb55c6f429d92d462655c25d60c diff --git a/spec/features/visitors/course_page_spec.rb b/spec/features/visitors/course_page_spec.rb index d94b56d..67049c4 100644 --- a/spec/features/visitors/course_page_spec.rb +++ b/spec/features/visitors/course_page_spec.rb @@ -1,16 +1,8 @@ -# Feature: 'About' page -# As a visitor -# I want to visit an 'about' page -# So I can learn more about the website feature 'About page' do - # Scenario: Visit the 'about' page - # Given I am a visitor - # When I visit the 'about' page - # Then I see "About the Website" scenario 'Visit the about page' do - visit 'pages/about' - expect(page).to have_content 'About the Website' + visit 'method' + expect(page).to have_content 'your talent' end end diff --git a/spec/features/visitors/navigation_spec.rb b/spec/features/visitors/navigation_spec.rb index ecd8fc0..596d191 100644 --- a/spec/features/visitors/navigation_spec.rb +++ b/spec/features/visitors/navigation_spec.rb @@ -10,9 +10,9 @@ feature 'Navigation links', :devise do # Then I see "home," "sign in," and "sign up" scenario 'view navigation links' do visit root_path - expect(page).to have_content 'Home' + expect(page).to have_content 'Course' expect(page).to have_content 'Sign in' - expect(page).to have_content 'Sign up' + expect(page).to have_content 'Apply' end end diff --git a/spec/support/helpers/session_helpers.rb b/spec/support/helpers/session_helpers.rb index cb6b66f..6f5f299 100644 --- a/spec/support/helpers/session_helpers.rb +++ b/spec/support/helpers/session_helpers.rb @@ -5,7 +5,7 @@ module Features fill_in 'Email', with: email fill_in 'Password', with: password fill_in 'Password confirmation', :with => confirmation - click_button 'Sign up' + click_button 'Start' end def signin(email, password)