-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Scaria
committed
Oct 1, 2014
1 parent
f37dead
commit 2bbb6d0
Showing
22 changed files
with
397 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
jQuery -> | ||
$("a[rel~=popover], .has-popover").popover() | ||
$("a[rel~=tooltip], .has-tooltip").tooltip() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Place all the behaviors and hooks related to the matching controller here. | ||
# All this logic will automatically be available in application.js. | ||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
@import "twitter/bootstrap/bootstrap"; | ||
@import "twitter/bootstrap/responsive"; | ||
|
||
// Set the correct sprite paths | ||
@iconSpritePath: image-url("twitter/bootstrap/glyphicons-halflings.png"); | ||
@iconWhiteSpritePath: image-url("twitter/bootstrap/glyphicons-halflings-white.png"); | ||
|
||
// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines) | ||
@fontAwesomeEotPath: asset-url("fontawesome-webfont.eot"); | ||
@fontAwesomeEotPath_iefix: asset-url("fontawesome-webfont.eot?#iefix"); | ||
@fontAwesomeWoffPath: asset-url("fontawesome-webfont.woff"); | ||
@fontAwesomeTtfPath: asset-url("fontawesome-webfont.ttf"); | ||
@fontAwesomeSvgPath: asset-url("fontawesome-webfont.svg#fontawesomeregular"); | ||
|
||
// Font Awesome | ||
@import "fontawesome/font-awesome"; | ||
|
||
// Glyphicons | ||
//@import "twitter/bootstrap/sprites.less"; | ||
|
||
// Your custom LESS stylesheets goes here | ||
// | ||
// Since bootstrap was imported above you have access to its mixins which | ||
// you may use and inherit here | ||
// | ||
// If you'd like to override bootstrap's own variables, you can do so here as well | ||
// See http://twitter.github.com/bootstrap/customize.html#variables for their names and documentation | ||
// | ||
// Example: | ||
// @linkColor: #ff0000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
// Place all the styles related to the home controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ | ||
|
||
body { | ||
padding-top: 120px; | ||
padding-bottom: 40px; | ||
background-color: #eee; | ||
|
||
} | ||
.btn | ||
{ | ||
outline:0; | ||
border:none; | ||
border-top:none; | ||
border-bottom:none; | ||
border-left:none; | ||
border-right:none; | ||
box-shadow:inset 2px -3px rgba(0,0,0,0.15); | ||
} | ||
.btn:focus | ||
{ | ||
outline:0; | ||
-webkit-outline:0; | ||
-moz-outline:0; | ||
} | ||
.fullscreen_bg { | ||
position: fixed; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
background-size: cover; | ||
background-position: 50% 50%; | ||
background-image: url('../images/home.jpg'); | ||
background-repeat:repeat; | ||
} | ||
.form-signin { | ||
max-width: 280px; | ||
padding: 15px; | ||
margin: 0 auto; | ||
margin-top:50px; | ||
} | ||
.form-signin .form-signin-heading, .form-signin { | ||
margin-bottom: 10px; | ||
} | ||
.form-signin .form-control { | ||
position: relative; | ||
font-size: 16px; | ||
height: auto; | ||
padding: 10px; | ||
-webkit-box-sizing: border-box; | ||
-moz-box-sizing: border-box; | ||
box-sizing: border-box; | ||
} | ||
.form-signin .form-control:focus { | ||
z-index: 2; | ||
} | ||
.form-signin input[type="text"] { | ||
margin-bottom: -1px; | ||
border-bottom-left-radius: 0; | ||
border-bottom-right-radius: 0; | ||
border-top-style: solid; | ||
border-right-style: solid; | ||
border-bottom-style: none; | ||
border-left-style: solid; | ||
border-color: #000; | ||
width: 276px; | ||
} | ||
.form-signin input[type="password"] { | ||
margin-bottom: 10px; | ||
border-top-left-radius: 0; | ||
border-top-right-radius: 0; | ||
border-top-style: none; | ||
border-right-style: solid; | ||
border-bottom-style: solid; | ||
border-left-style: solid; | ||
border-color: rgb(0,0,0); | ||
border-top:1px solid rgba(0,0,0,0.08); | ||
width: 276px; | ||
} | ||
.form-signin-heading { | ||
color: #fff; | ||
text-align: center; | ||
text-shadow: 0 2px 2px rgba(0,0,0,0.5); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class HomeController < ApplicationController | ||
def index | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module HomeHelper | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
|
||
<div class="container"> | ||
<div class="row"> | ||
<div class="span9"> | ||
<%= bootstrap_flash %> | ||
|
||
</div> | ||
<div class="span12 home"> | ||
|
||
<div id="fullscreen_bg" class="fullscreen_bg"/> | ||
|
||
<div class="container"> | ||
|
||
<form class="form-signin"> | ||
<h1 class="form-signin-heading text-muted">Sign In</h1> | ||
<input type="text" class="form-control" id="email-input" placeholder="Email address" required="" autofocus=""> | ||
<input type="password" class="form-control" id="password-input" placeholder="Password" required=""> | ||
<button class="btn btn-lg btn-primary btn-block" id="sign_in" type="submit"> | ||
Sign In | ||
</button> | ||
</form> | ||
|
||
</div> | ||
|
||
|
||
</div><!--/row--> | ||
|
||
<footer> | ||
<p>© ImageSpace Inc 2014</p> | ||
</footer> | ||
|
||
</div> <!-- /container --> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<% | ||
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : "" | ||
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}" | ||
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip" | ||
%> | ||
default: <%= std_opts %> features | ||
wip: --tags @wip:3 --wip features | ||
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Sample localization file for English. Add more files in this directory for other locales. | ||
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. | ||
|
||
en: | ||
helpers: | ||
actions: "Actions" | ||
links: | ||
back: "Back" | ||
cancel: "Cancel" | ||
confirm: "Are you sure?" | ||
destroy: "Delete" | ||
new: "New" | ||
edit: "Edit" | ||
titles: | ||
edit: "Edit %{model}" | ||
save: "Save %{model}" | ||
new: "New %{model}" | ||
delete: "Delete %{model}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# encoding: UTF-8 | ||
# This file is auto-generated from the current state of the database. Instead | ||
# of editing this file, please use the migrations feature of Active Record to | ||
# incrementally modify your database, and then regenerate this schema definition. | ||
# | ||
# Note that this schema.rb definition is the authoritative source for your | ||
# database schema. If you need to create the application database on another | ||
# system, you should be using db:schema:load, not running all the migrations | ||
# from scratch. The latter is a flawed and unsustainable approach (the more migrations | ||
# you'll amass, the slower it'll run and the greater likelihood for issues). | ||
# | ||
# It's strongly recommended that you check this file into your version control system. | ||
|
||
ActiveRecord::Schema.define(version: 0) do | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Feature: A new user comes to home page and fills the email and password to login. | ||
But website returns the same home page as reply | ||
|
||
Scenario: New user tries login | ||
Given I am a new user | ||
And I load the home page | ||
And I fill in "email-input" with "[email protected]" | ||
And I fill in "password-input" with "password" | ||
When I press "sign_in" | ||
Then the same home page is loaded |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Given(/^I am a new user$/) do | ||
#logout user | ||
end | ||
|
||
Given(/^I load the home page$/) do | ||
visit "http://localhost:3000" | ||
end | ||
|
||
Given(/^I fill in "(.*?)" with "(.*?)"$/) do |field, value| | ||
fill_in(field, :with => value) | ||
end | ||
|
||
When(/^I press "(.*?)"$/) do |button| | ||
click_button(button) | ||
end | ||
|
||
Then(/^the same home page is loaded$/) do | ||
page.should have_content("ImageSpace") | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril. | ||
# It is recommended to regenerate this file in the future when you upgrade to a | ||
# newer version of cucumber-rails. Consider adding your own code to a new file | ||
# instead of editing this one. Cucumber will automatically load all features/**/*.rb | ||
# files. | ||
|
||
require 'cucumber/rails' | ||
|
||
# Capybara defaults to CSS3 selectors rather than XPath. | ||
# If you'd prefer to use XPath, just uncomment this line and adjust any | ||
# selectors in your step definitions to use the XPath syntax. | ||
# Capybara.default_selector = :xpath | ||
|
||
# By default, any exception happening in your Rails application will bubble up | ||
# to Cucumber so that your scenario will fail. This is a different from how | ||
# your application behaves in the production environment, where an error page will | ||
# be rendered instead. | ||
# | ||
# Sometimes we want to override this default behaviour and allow Rails to rescue | ||
# exceptions and display an error page (just like when the app is running in production). | ||
# Typical scenarios where you want to do this is when you test your error pages. | ||
# There are two ways to allow Rails to rescue exceptions: | ||
# | ||
# 1) Tag your scenario (or feature) with @allow-rescue | ||
# | ||
# 2) Set the value below to true. Beware that doing this globally is not | ||
# recommended as it will mask a lot of errors for you! | ||
# | ||
ActionController::Base.allow_rescue = false | ||
|
||
# Remove/comment out the lines below if your app doesn't have a database. | ||
# For some databases (like MongoDB and CouchDB) you may need to use :truncation instead. | ||
begin | ||
DatabaseCleaner.strategy = :transaction | ||
rescue NameError | ||
raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it." | ||
end | ||
|
||
# You may also want to configure DatabaseCleaner to use different strategies for certain features and scenarios. | ||
# See the DatabaseCleaner documentation for details. Example: | ||
# | ||
# Before('@no-txn,@selenium,@culerity,@celerity,@javascript') do | ||
# # { :except => [:widgets] } may not do what you expect here | ||
# # as Cucumber::Rails::Database.javascript_strategy overrides | ||
# # this setting. | ||
# DatabaseCleaner.strategy = :truncation | ||
# end | ||
# | ||
# Before('~@no-txn', '~@selenium', '~@culerity', '~@celerity', '~@javascript') do | ||
# DatabaseCleaner.strategy = :transaction | ||
# end | ||
# | ||
|
||
# Possible values are :truncation and :transaction | ||
# The :transaction strategy is faster, but might give you threading problems. | ||
# See https://github.com/cucumber/cucumber-rails/blob/master/features/choose_javascript_database_strategy.feature | ||
Cucumber::Rails::Database.javascript_strategy = :truncation | ||
Capybara.default_driver = :selenium | ||
|
Oops, something went wrong.