You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by al...@apache.org on 2015/06/19 16:08:19 UTC

[7/8] incubator-taverna-databundle-viewer git commit: Pull from github

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/config/locales/devise.en.yml
----------------------------------------------------------------------
diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml
new file mode 100644
index 0000000..26a10f2
--- /dev/null
+++ b/config/locales/devise.en.yml
@@ -0,0 +1,60 @@
+# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
+
+en:
+  devise:
+    confirmations:
+      confirmed: "Your email address has been successfully confirmed."
+      send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
+      send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
+    failure:
+      already_authenticated: "You are already signed in."
+      inactive: "Your account is not activated yet."
+      invalid: "Invalid %{authentication_keys} or password."
+      locked: "Your account is locked."
+      last_attempt: "You have one more attempt before your account is locked."
+      not_found_in_database: "Invalid %{authentication_keys} or password."
+      timeout: "Your session expired. Please sign in again to continue."
+      unauthenticated: "You need to sign in or sign up before continuing."
+      unconfirmed: "You have to confirm your email address before continuing."
+    mailer:
+      confirmation_instructions:
+        subject: "Confirmation instructions"
+      reset_password_instructions:
+        subject: "Reset password instructions"
+      unlock_instructions:
+        subject: "Unlock instructions"
+    omniauth_callbacks:
+      failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
+      success: "Successfully authenticated from %{kind} account."
+    passwords:
+      no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
+      send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
+      send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
+      updated: "Your password has been changed successfully. You are now signed in."
+      updated_not_active: "Your password has been changed successfully."
+    registrations:
+      destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
+      signed_up: "Welcome! You have signed up successfully."
+      signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
+      signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
+      signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
+      update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address."
+      updated: "Your account has been updated successfully."
+    sessions:
+      signed_in: "Signed in successfully."
+      signed_out: "Signed out successfully."
+      already_signed_out: "Signed out successfully."
+    unlocks:
+      send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
+      send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
+      unlocked: "Your account has been unlocked successfully. Please sign in to continue."
+  errors:
+    messages:
+      already_confirmed: "was already confirmed, please try signing in"
+      confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
+      expired: "has expired, please request a new one"
+      not_found: "not found"
+      not_locked: "was not locked"
+      not_saved:
+        one: "1 error prohibited this %{resource} from being saved:"
+        other: "%{count} errors prohibited this %{resource} from being saved:"

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/config/locales/en.yml
----------------------------------------------------------------------
diff --git a/config/locales/en.yml b/config/locales/en.yml
new file mode 100644
index 0000000..0653957
--- /dev/null
+++ b/config/locales/en.yml
@@ -0,0 +1,23 @@
+# Files in the config/locales directory are used for internationalization
+# and are automatically loaded by Rails. If you want to use locales other
+# than English, add the necessary files in this directory.
+#
+# To use the locales, use `I18n.t`:
+#
+#     I18n.t 'hello'
+#
+# In views, this is aliased to just `t`:
+#
+#     <%= t('hello') %>
+#
+# To use a different locale, set it with `I18n.locale`:
+#
+#     I18n.locale = :es
+#
+# This would use the information in config/locales/es.yml.
+#
+# To learn more, please read the Rails Internationalization guide
+# available at http://guides.rubyonrails.org/i18n.html.
+
+en:
+  hello: "Hello world"

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/config/puma.rb
----------------------------------------------------------------------
diff --git a/config/puma.rb b/config/puma.rb
new file mode 100644
index 0000000..55adf10
--- /dev/null
+++ b/config/puma.rb
@@ -0,0 +1,15 @@
+workers Integer(ENV['WEB_CONCURRENCY'] || 1)
+threads_count = Integer(ENV['MAX_THREADS'] || 5)
+threads threads_count, threads_count
+
+preload_app!
+
+rackup DefaultRackup
+port ENV['PORT'] || 3000
+environment ENV['RACK_ENV'] || 'development'
+
+on_worker_boot do
+  # Worker specific setup for Rails 4.1+
+  # See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
+  ActiveRecord::Base.establish_connection
+end

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/config/routes.rb
----------------------------------------------------------------------
diff --git a/config/routes.rb b/config/routes.rb
new file mode 100644
index 0000000..c0a81b0
--- /dev/null
+++ b/config/routes.rb
@@ -0,0 +1,60 @@
+Rails.application.routes.draw do
+  get 'welcome/index'
+
+  root 'welcome#index'
+  devise_for :users, controllers: {omniauth_callbacks: 'callbacks'}
+  # The priority is based upon order of creation: first created -> highest priority.
+  # See how all your routes lay out with "rake routes".
+
+  # You can have the root of your site routed with "root"
+  # root 'welcome#index'
+
+  # Example of regular route:
+  #   get 'products/:id' => 'catalog#view'
+
+  # Example of named route that can be invoked with purchase_url(id: product.id)
+  #   get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
+
+  # Example resource route (maps HTTP verbs to controller actions automatically):
+  #   resources :products
+
+  # Example resource route with options:
+  #   resources :products do
+  #     member do
+  #       get 'short'
+  #       post 'toggle'
+  #     end
+  #
+  #     collection do
+  #       get 'sold'
+  #     end
+  #   end
+
+  # Example resource route with sub-resources:
+  #   resources :products do
+  #     resources :comments, :sales
+  #     resource :seller
+  #   end
+
+  # Example resource route with more complex sub-resources:
+  #   resources :products do
+  #     resources :comments
+  #     resources :sales do
+  #       get 'recent', on: :collection
+  #     end
+  #   end
+
+  # Example resource route with concerns:
+  #   concern :toggleable do
+  #     post 'toggle'
+  #   end
+  #   resources :posts, concerns: :toggleable
+  #   resources :photos, concerns: :toggleable
+
+  # Example resource route within a namespace:
+  #   namespace :admin do
+  #     # Directs /admin/products/* to Admin::ProductsController
+  #     # (app/controllers/admin/products_controller.rb)
+  #     resources :products
+  #   end
+end

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/config/secrets.yml
----------------------------------------------------------------------
diff --git a/config/secrets.yml b/config/secrets.yml
new file mode 100644
index 0000000..7283b5d
--- /dev/null
+++ b/config/secrets.yml
@@ -0,0 +1,22 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key is used for verifying the integrity of signed cookies.
+# 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.
+# You can use `rake secret` to generate a secure secret key.
+
+# Make sure the secrets in this file are kept private
+# if you're sharing your code publicly.
+
+development:
+  secret_key_base: b5a8c8ff611ed4444f0b98a95a2652fd6a3d050d73aba5c9bd7438605f1b21545d519e1fb998c1e5b0161afb71db43668c7c9619601986ebc45e453e80d74508
+
+test:
+  secret_key_base: 672365d6f02f3fa83e052d2da55915a851972f9b3981ccbf7d51a27f44613cc867eaf8a3ca6cf701c73fb20d93ac3440fb8a34e21367bd2696cd8a38da22d2a8
+
+# Do not keep production secrets in the repository,
+# instead read values from the environment.
+production:
+  secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/db/migrate/20150603155333_devise_create_users.rb
----------------------------------------------------------------------
diff --git a/db/migrate/20150603155333_devise_create_users.rb b/db/migrate/20150603155333_devise_create_users.rb
new file mode 100644
index 0000000..08b650d
--- /dev/null
+++ b/db/migrate/20150603155333_devise_create_users.rb
@@ -0,0 +1,45 @@
+class DeviseCreateUsers < ActiveRecord::Migration
+  def change
+    create_table(:users) do |t|
+      t.string :firstname
+      t.string :lastname
+
+      ## Database authenticatable
+      t.string :email, null: false, default: ""
+      t.string :encrypted_password, null: false, default: ""
+
+      ## Recoverable
+      t.string :reset_password_token
+      t.datetime :reset_password_sent_at
+
+      ## Rememberable
+      t.datetime :remember_created_at
+
+      ## Trackable
+      t.integer :sign_in_count, default: 0, null: false
+      t.datetime :current_sign_in_at
+      t.datetime :last_sign_in_at
+      t.inet :current_sign_in_ip
+      t.inet :last_sign_in_ip
+
+      ## Confirmable
+      # t.string   :confirmation_token
+      # t.datetime :confirmed_at
+      # t.datetime :confirmation_sent_at
+      # t.string   :unconfirmed_email # Only if using reconfirmable
+
+      ## Lockable
+      # t.integer  :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
+      # t.string   :unlock_token # Only if unlock strategy is :email or :both
+      # t.datetime :locked_at
+
+
+      t.timestamps null: false
+    end
+
+    add_index :users, :email, unique: true
+    add_index :users, :reset_password_token, unique: true
+    # add_index :users, :confirmation_token,   unique: true
+    # add_index :users, :unlock_token,         unique: true
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/db/migrate/20150610102232_add_columns_to_users.rb
----------------------------------------------------------------------
diff --git a/db/migrate/20150610102232_add_columns_to_users.rb b/db/migrate/20150610102232_add_columns_to_users.rb
new file mode 100644
index 0000000..dec83f6
--- /dev/null
+++ b/db/migrate/20150610102232_add_columns_to_users.rb
@@ -0,0 +1,6 @@
+class AddColumnsToUsers < ActiveRecord::Migration
+  def change
+    add_column :users, :provider, :string
+    add_column :users, :uid, :string
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/db/schema.rb
----------------------------------------------------------------------
diff --git a/db/schema.rb b/db/schema.rb
new file mode 100644
index 0000000..78219e9
--- /dev/null
+++ b/db/schema.rb
@@ -0,0 +1,41 @@
+# 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: 20150610102232) do
+
+  # These are extensions that must be enabled in order to support this database
+  enable_extension "plpgsql"
+
+  create_table "users", force: :cascade do |t|
+    t.string   "firstname"
+    t.string   "lastname"
+    t.string   "email",                  default: "", null: false
+    t.string   "encrypted_password",     default: "", null: false
+    t.string   "reset_password_token"
+    t.datetime "reset_password_sent_at"
+    t.datetime "remember_created_at"
+    t.integer  "sign_in_count",          default: 0,  null: false
+    t.datetime "current_sign_in_at"
+    t.datetime "last_sign_in_at"
+    t.inet     "current_sign_in_ip"
+    t.inet     "last_sign_in_ip"
+    t.datetime "created_at",                          null: false
+    t.datetime "updated_at",                          null: false
+    t.string   "provider"
+    t.string   "uid"
+  end
+
+  add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
+  add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
+
+end

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/db/seeds.rb
----------------------------------------------------------------------
diff --git a/db/seeds.rb b/db/seeds.rb
new file mode 100644
index 0000000..4edb1e8
--- /dev/null
+++ b/db/seeds.rb
@@ -0,0 +1,7 @@
+# This file should contain all the record creation needed to seed the database with its default values.
+# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
+#
+# Examples:
+#
+#   cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
+#   Mayor.create(name: 'Emanuel', city: cities.first)

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/lib/assets/.keep
----------------------------------------------------------------------
diff --git a/lib/assets/.keep b/lib/assets/.keep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/lib/tasks/.keep
----------------------------------------------------------------------
diff --git a/lib/tasks/.keep b/lib/tasks/.keep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/log/.keep
----------------------------------------------------------------------
diff --git a/log/.keep b/log/.keep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/public/404.html
----------------------------------------------------------------------
diff --git a/public/404.html b/public/404.html
new file mode 100644
index 0000000..b612547
--- /dev/null
+++ b/public/404.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>The page you were looking for doesn't exist (404)</title>
+  <meta name="viewport" content="width=device-width,initial-scale=1">
+  <style>
+  body {
+    background-color: #EFEFEF;
+    color: #2E2F30;
+    text-align: center;
+    font-family: arial, sans-serif;
+    margin: 0;
+  }
+
+  div.dialog {
+    width: 95%;
+    max-width: 33em;
+    margin: 4em auto 0;
+  }
+
+  div.dialog > div {
+    border: 1px solid #CCC;
+    border-right-color: #999;
+    border-left-color: #999;
+    border-bottom-color: #BBB;
+    border-top: #B00100 solid 4px;
+    border-top-left-radius: 9px;
+    border-top-right-radius: 9px;
+    background-color: white;
+    padding: 7px 12% 0;
+    box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
+  }
+
+  h1 {
+    font-size: 100%;
+    color: #730E15;
+    line-height: 1.5em;
+  }
+
+  div.dialog > p {
+    margin: 0 0 1em;
+    padding: 1em;
+    background-color: #F7F7F7;
+    border: 1px solid #CCC;
+    border-right-color: #999;
+    border-left-color: #999;
+    border-bottom-color: #999;
+    border-bottom-left-radius: 4px;
+    border-bottom-right-radius: 4px;
+    border-top-color: #DADADA;
+    color: #666;
+    box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
+  }
+  </style>
+</head>
+
+<body>
+  <!-- This file lives in public/404.html -->
+  <div class="dialog">
+    <div>
+      <h1>The page you were looking for doesn't exist.</h1>
+      <p>You may have mistyped the address or the page may have moved.</p>
+    </div>
+    <p>If you are the application owner check the logs for more information.</p>
+  </div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/public/422.html
----------------------------------------------------------------------
diff --git a/public/422.html b/public/422.html
new file mode 100644
index 0000000..a21f82b
--- /dev/null
+++ b/public/422.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>The change you wanted was rejected (422)</title>
+  <meta name="viewport" content="width=device-width,initial-scale=1">
+  <style>
+  body {
+    background-color: #EFEFEF;
+    color: #2E2F30;
+    text-align: center;
+    font-family: arial, sans-serif;
+    margin: 0;
+  }
+
+  div.dialog {
+    width: 95%;
+    max-width: 33em;
+    margin: 4em auto 0;
+  }
+
+  div.dialog > div {
+    border: 1px solid #CCC;
+    border-right-color: #999;
+    border-left-color: #999;
+    border-bottom-color: #BBB;
+    border-top: #B00100 solid 4px;
+    border-top-left-radius: 9px;
+    border-top-right-radius: 9px;
+    background-color: white;
+    padding: 7px 12% 0;
+    box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
+  }
+
+  h1 {
+    font-size: 100%;
+    color: #730E15;
+    line-height: 1.5em;
+  }
+
+  div.dialog > p {
+    margin: 0 0 1em;
+    padding: 1em;
+    background-color: #F7F7F7;
+    border: 1px solid #CCC;
+    border-right-color: #999;
+    border-left-color: #999;
+    border-bottom-color: #999;
+    border-bottom-left-radius: 4px;
+    border-bottom-right-radius: 4px;
+    border-top-color: #DADADA;
+    color: #666;
+    box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
+  }
+  </style>
+</head>
+
+<body>
+  <!-- This file lives in public/422.html -->
+  <div class="dialog">
+    <div>
+      <h1>The change you wanted was rejected.</h1>
+      <p>Maybe you tried to change something you didn't have access to.</p>
+    </div>
+    <p>If you are the application owner check the logs for more information.</p>
+  </div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/public/500.html
----------------------------------------------------------------------
diff --git a/public/500.html b/public/500.html
new file mode 100644
index 0000000..061abc5
--- /dev/null
+++ b/public/500.html
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>We're sorry, but something went wrong (500)</title>
+  <meta name="viewport" content="width=device-width,initial-scale=1">
+  <style>
+  body {
+    background-color: #EFEFEF;
+    color: #2E2F30;
+    text-align: center;
+    font-family: arial, sans-serif;
+    margin: 0;
+  }
+
+  div.dialog {
+    width: 95%;
+    max-width: 33em;
+    margin: 4em auto 0;
+  }
+
+  div.dialog > div {
+    border: 1px solid #CCC;
+    border-right-color: #999;
+    border-left-color: #999;
+    border-bottom-color: #BBB;
+    border-top: #B00100 solid 4px;
+    border-top-left-radius: 9px;
+    border-top-right-radius: 9px;
+    background-color: white;
+    padding: 7px 12% 0;
+    box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
+  }
+
+  h1 {
+    font-size: 100%;
+    color: #730E15;
+    line-height: 1.5em;
+  }
+
+  div.dialog > p {
+    margin: 0 0 1em;
+    padding: 1em;
+    background-color: #F7F7F7;
+    border: 1px solid #CCC;
+    border-right-color: #999;
+    border-left-color: #999;
+    border-bottom-color: #999;
+    border-bottom-left-radius: 4px;
+    border-bottom-right-radius: 4px;
+    border-top-color: #DADADA;
+    color: #666;
+    box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
+  }
+  </style>
+</head>
+
+<body>
+  <!-- This file lives in public/500.html -->
+  <div class="dialog">
+    <div>
+      <h1>We're sorry, but something went wrong.</h1>
+    </div>
+    <p>If you are the application owner check the logs for more information.</p>
+  </div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/public/favicon.ico
----------------------------------------------------------------------
diff --git a/public/favicon.ico b/public/favicon.ico
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/public/robots.txt
----------------------------------------------------------------------
diff --git a/public/robots.txt b/public/robots.txt
new file mode 100644
index 0000000..3c9c7c0
--- /dev/null
+++ b/public/robots.txt
@@ -0,0 +1,5 @@
+# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
+#
+# To ban all spiders from the entire site uncomment the next two lines:
+# User-agent: *
+# Disallow: /

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/spec/factories/users.rb
----------------------------------------------------------------------
diff --git a/spec/factories/users.rb b/spec/factories/users.rb
new file mode 100644
index 0000000..3804565
--- /dev/null
+++ b/spec/factories/users.rb
@@ -0,0 +1,27 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+FactoryGirl.define do
+  factory :user do
+    email Faker::Internet.email
+    firstname Faker::Name.first_name
+    lastname Faker::Name.last_name
+    password Faker::Internet.password
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/spec/feature/devise/registration_spec.rb
----------------------------------------------------------------------
diff --git a/spec/feature/devise/registration_spec.rb b/spec/feature/devise/registration_spec.rb
new file mode 100644
index 0000000..c54c34a
--- /dev/null
+++ b/spec/feature/devise/registration_spec.rb
@@ -0,0 +1,75 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+require 'spec_helper'
+
+RSpec.describe 'Registration' do
+  subject { page }
+
+  before do
+    visit new_user_registration_path
+  end
+
+  it 'correct' do
+    password = Faker::Internet.password
+    firstname = Faker::Name.first_name
+    fill_in 'user_email', with: Faker::Internet.email
+    fill_in 'user_password', with: password
+    fill_in 'user_password_confirmation', with: password
+    fill_in 'user_firstname', with: firstname
+    expect {
+      click_button 'sign_up'
+      expect(current_path).to eq root_path
+      expect(page).to have_content firstname
+    }.to change(User, :count).by(1)
+  end
+
+  it 'empty password confirmation' do
+    fill_in 'user_email', with: Faker::Internet.email
+    fill_in 'user_password', with: Faker::Internet.password
+    expect {
+      click_button 'sign_up'
+    }.not_to change(User, :count)
+  end
+
+  it 'incorrect password confirmation' do
+    fill_in 'user_email', with: Faker::Internet.email
+    fill_in 'user_password', with: Faker::Internet.password
+    fill_in 'user_password_confirmation', with: Faker::Internet.password
+    expect {
+      click_button 'sign_up'
+    }.not_to change(User, :count)
+  end
+
+  it 'empty password' do
+    fill_in 'user_email', with: Faker::Internet.email
+    fill_in 'user_password_confirmation', with: Faker::Internet.password
+    expect {
+      click_button 'sign_up'
+    }.not_to change(User, :count)
+  end
+
+  it 'empty email' do
+    fill_in 'user_password', with: Faker::Internet.password
+    fill_in 'user_password_confirmation', with: Faker::Internet.password
+    expect {
+      click_button 'sign_up'
+    }.not_to change(User, :count)
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/spec/feature/devise/session_spec.rb
----------------------------------------------------------------------
diff --git a/spec/feature/devise/session_spec.rb b/spec/feature/devise/session_spec.rb
new file mode 100644
index 0000000..9b9d528
--- /dev/null
+++ b/spec/feature/devise/session_spec.rb
@@ -0,0 +1,83 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+require 'spec_helper'
+
+RSpec.describe 'Session' do
+  subject { page }
+
+  let(:user) { create :user }
+
+  context 'sign_in', type: :feature do
+    before do
+      visit new_user_session_path
+    end
+
+    it 'correct email and password' do
+      fill_in 'user_email', with: user.email
+      fill_in 'user_password', with: user.password
+      click_button 'sign_in'
+      expect(current_path).to eq(root_path)
+      expect(page).to have_content user.firstname
+    end
+
+    it 'incorrect email' do
+      fill_in 'user_password', with: user.password
+      click_button 'sign_in'
+      expect(current_path).to eq(new_user_session_path)
+    end
+
+    it 'incorrect password' do
+      fill_in 'user_email', with: user.email
+      fill_in 'user_password', with: '111'
+      click_button 'sign_in'
+      expect(current_path).to eq(new_user_session_path)
+    end
+  end
+
+  it 'sign out', type: :feature, js: true do
+    sign_in user
+    click_link 'open_user_dropdown'
+    click_link 'sign_out'
+    expect(current_path).to eq(root_path)
+    expect(page).not_to have_content user.firstname
+  end
+
+  context 'omniauth' do
+    it 'facebook' do
+      OmniAuth.config.test_mode = true
+      OmniAuth.config.mock_auth[:facebook] = OmniAuth::AuthHash.new({provider: 'facebook', uid: '123545', info: {email: Faker::Internet.email}})
+      Rails.application.env_config['omniauth.auth'] = OmniAuth.config.mock_auth[:facebook]
+      visit new_user_session_path
+      expect {
+        click_link 'omniauth_facebook'
+      }.to change(User, :count).by(1)
+    end
+
+    it 'google' do
+      OmniAuth.config.test_mode = true
+      OmniAuth.config.mock_auth[:google_oauth2] = OmniAuth::AuthHash.new({provider: 'google_oauth2', uid: '123545', info: {email: Faker::Internet.email}})
+      Rails.application.env_config['omniauth.auth'] = OmniAuth.config.mock_auth[:google_oauth2]
+      visit new_user_session_path
+      expect {
+        click_link 'omniauth_google_oauth2'
+      }.to change(User, :count).by(1)
+    end
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/spec/models/user_spec.rb
----------------------------------------------------------------------
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
new file mode 100644
index 0000000..e6344fb
--- /dev/null
+++ b/spec/models/user_spec.rb
@@ -0,0 +1,41 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+require 'spec_helper'
+
+RSpec.describe User, type: :model do
+  it 'default factory - valid' do
+    expect(build(:user)).to be_valid
+  end
+
+  context 'invalid' do
+    it 'without email' do
+      expect(build(:user, email: nil)).not_to be_valid
+    end
+
+    it 'duplicate email' do
+      user = create :user
+      expect(build(:user, email: user.email)).not_to be_valid
+    end
+
+    it 'email' do
+      expect(build(:user, email: '1111')).not_to be_valid
+    end
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/spec/spec_helper.rb
----------------------------------------------------------------------
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
new file mode 100644
index 0000000..9bc2b76
--- /dev/null
+++ b/spec/spec_helper.rb
@@ -0,0 +1,60 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+require 'rubygems'
+
+ENV['RAILS_ENV'] ||= 'test'
+require File.expand_path('../../config/environment', __FILE__)
+require 'rspec/rails'
+require 'capybara/rails'
+require 'capybara/rspec'
+require 'capybara-screenshot/rspec'
+require 'capybara/webkit/matchers'
+require 'codeclimate-test-reporter'
+
+CodeClimate::TestReporter.start
+
+Capybara.javascript_driver = :webkit
+
+Capybara.save_and_open_page_path = '/tmp/capybara-screenshot'
+Capybara::Screenshot.register_filename_prefix_formatter(:rspec) do |example|
+  "screen_#{example.full_description.gsub(' ', '-').gsub(/^.*\/spec\//, '')}"
+end
+
+Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
+
+ActiveRecord::Migration.maintain_test_schema!
+
+RSpec.configure do |config|
+  config.include Rails.application.routes.url_helpers
+  config.fail_fast = false
+  config.include FactoryGirl::Syntax::Methods
+  config.include Capybara::DSL
+  config.use_transactional_fixtures = false
+  config.infer_base_class_for_anonymous_controllers = false
+  config.order = 'random'
+  config.include AbstractController::Translation
+  config.before :suite do
+    DatabaseRewinder.clean_all
+  end
+
+  config.after :each do
+    DatabaseRewinder.clean
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/spec/support/login_helpers.rb
----------------------------------------------------------------------
diff --git a/spec/support/login_helpers.rb b/spec/support/login_helpers.rb
new file mode 100644
index 0000000..30d0779
--- /dev/null
+++ b/spec/support/login_helpers.rb
@@ -0,0 +1,25 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+def sign_in(user)
+  visit new_user_session_path
+  fill_in 'user_email', with: user.email
+  fill_in 'user_password', with: user.password
+  click_button 'sign_in'
+end

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/ae912ef2/vendor/assets/fonts/glyphicons-halflings-regular.eot
----------------------------------------------------------------------
diff --git a/vendor/assets/fonts/glyphicons-halflings-regular.eot b/vendor/assets/fonts/glyphicons-halflings-regular.eot
new file mode 100644
index 0000000..b93a495
Binary files /dev/null and b/vendor/assets/fonts/glyphicons-halflings-regular.eot differ