sidebar https://codepen.io/tio-jevero-the-styleful/pen/MdZQBo
Collapse https://codepen.io/kunukn/pen/ebMryW
| # Employee class | |
| class Employee | |
| # checkin method | |
| def check_in | |
| end | |
| end |
| require 'spec_helper' | |
| RSpec.describe Employee do | |
| # check Employee class creates an instance | |
| it 'should creates an employee object' do | |
| employee = Employee.new | |
| expect(employee).to be_kind_of(Employee) | |
| end | |
| # check Employee class invoke check_in() method |
| # Employee class | |
| class Employee | |
| end |
| require 'spec_helper' | |
| # Employee class | |
| class Employee | |
| end | |
| # test | |
| RSpec.describe Employee do | |
| it 'should creates an employee object' do | |
| employee = Employee.new |
| require 'spec_helper' | |
| RSpec.describe Employee do | |
| it 'should creates an employee object' do | |
| employee = Employee.new | |
| expect(employee).to be_kind_of(Employee) | |
| end | |
| end |
1] cd /opt wget http://www.us.apache.org/dist/lucene/solr/5.3.1/solr-5.3.1.tgz
2] tar xzf solr-5.3.1.tgz solr-5.3.1/bin/install_solr_service.sh --strip-components=2
3] sudo ./install_solr_service.sh solr-5.3.1.tgz
4] vim /opt/solr/bin/solr and add following line SOLR_JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"
| source 'https://rubygems.org' | |
| git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
| ruby '2.3.1' | |
| # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
| gem 'rails', '~> 5.2.4', '>= 5.2.4.2' | |
| # Use postgresql as the database for Active Record | |
| gem 'pg', '>= 0.18', '< 2.0' | |
| # Use Puma as the app server |
| class ApplicationController < ActionController::Base | |
| protect_from_forgery with: :exception | |
| def user_is_logged_in? | |
| if !session[:oktastate] | |
| redirect_to user_oktaoauth_omniauth_authorize_path | |
| end | |
| end | |
| end |
| class HomeController < ApplicationController | |
| before_action :user_is_logged_in? | |
| def index | |
| end | |
| end |