Remove all non-API parts of the app

pull/290/head
Rick Carlino 2016-11-09 16:41:10 -06:00
parent e0b6cc1094
commit 0d5774b57d
16 changed files with 2 additions and 289 deletions

12
Gemfile
View File

@ -2,19 +2,10 @@ source 'https://rubygems.org'
ruby '2.3.1'
gem 'rails', '4.2.7'
#Dokku demands this one.
gem 'rails_12factor'
gem 'ng-rails-csrf'
#Asset stuff
gem 'sprockets'
gem 'sass-rails'
gem 'coffee-rails'
gem 'font-awesome-rails'
gem 'uglifier'
gem 'high_voltage', '~> 2.1.0'
gem 'haml'
gem 'devise', github: 'plataformatec/devise'
gem 'jwt'
gem 'mutations'
@ -47,8 +38,5 @@ group :test do
gem 'rspec'
gem 'rspec-rails'
gem 'simplecov'
gem 'capybara'
gem 'launchy'
gem 'selenium-webdriver'
gem 'codeclimate-test-reporter', require: nil
end

View File

@ -71,15 +71,6 @@ GEM
uniform_notifier (~> 1.10.0)
cane (2.6.2)
parallel
capybara (2.9.1)
addressable
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
childprocess (0.5.9)
ffi (~> 1.0, >= 1.0.11)
choice (0.2.0)
chronic (0.10.2)
churn (0.0.35)
@ -96,13 +87,6 @@ GEM
codeclimate-test-reporter (0.6.0)
simplecov (>= 0.7.1, < 1.0.0)
coderay (1.1.1)
coffee-rails (4.2.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.2.x)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
concord (0.1.5)
adamantium (~> 0.2.0)
equalizer (~> 0.0.9)
@ -114,7 +98,6 @@ GEM
unf (>= 0.0.5, < 1.0.0)
equalizer (0.0.11)
erubis (2.7.0)
execjs (2.7.0)
factory_girl (4.7.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.7.0)
@ -123,7 +106,6 @@ GEM
faker (1.6.6)
i18n (~> 0.5)
fattr (2.3.0)
ffi (1.9.14)
flay (2.8.1)
erubis (~> 2.7.0)
path_expander (~> 1.0)
@ -133,13 +115,8 @@ GEM
path_expander (~> 1.0)
ruby_parser (~> 3.1, > 3.1.0)
sexp_processor (~> 4.4)
font-awesome-rails (4.6.3.1)
railties (>= 3.2, < 5.1)
globalid (0.3.7)
activesupport (>= 4.1.0)
haml (4.0.7)
tilt
high_voltage (2.1.0)
hirb (0.7.3)
http-cookie (1.0.2)
domain_name (~> 0.5)
@ -189,7 +166,6 @@ GEM
activesupport
mysql (2.9.1)
netrc (0.11.0)
ng-rails-csrf (0.1.0)
nokogiri (1.6.8)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
@ -294,18 +270,6 @@ GEM
ruby-progressbar (1.8.1)
ruby_parser (3.8.2)
sexp_processor (~> 4.1)
rubyzip (1.2.0)
sass (3.4.22)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
selenium-webdriver (2.53.4)
childprocess (~> 0.5)
rubyzip (~> 1.0)
websocket (~> 1.0)
sexp_processor (4.7.0)
simplecov (0.12.0)
docile (~> 1.1.0)
@ -322,11 +286,8 @@ GEM
sprockets (>= 3.0.0)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.5)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (3.0.2)
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.2)
@ -341,9 +302,6 @@ GEM
procto (~> 0.0.2)
warden (1.2.6)
rack (>= 1.0)
websocket (1.2.3)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
@ -351,23 +309,16 @@ PLATFORMS
DEPENDENCIES
active_model_serializers (~> 0.8.3)
bullet
capybara
codeclimate-test-reporter
coffee-rails
database_cleaner
devise!
factory_girl_rails
faker
font-awesome-rails
haml
high_voltage (~> 2.1.0)
ice_cube
jwt
launchy
metric_fu
mutations
mysql
ng-rails-csrf
pg
pry
rack-cors
@ -378,12 +329,8 @@ DEPENDENCIES
rails_12factor
rspec
rspec-rails
sass-rails
selenium-webdriver
simplecov
smarf_doc!
sprockets
uglifier
RUBY VERSION
ruby 2.3.1p112

View File

@ -1,12 +0,0 @@
<h2>Resend confirmation instructions</h2>
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
<%= devise_error_messages! %>
<div><%= f.label :email %><br />
<%= f.email_field :email, autofocus: true %></div>
<div><%= f.submit "Resend confirmation instructions", class: "green" %></div>
<% end %>
<%= render "devise/shared/links" %>

View File

@ -1,5 +0,0 @@
<p>Welcome <%= @email %>!</p>
<p>You can confirm your account email through the link below:</p>
<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>

View File

@ -1,8 +0,0 @@
<p>Hello <%= @resource.email %>!</p>
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
<p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p>

View File

@ -1,7 +0,0 @@
<p>Hello <%= @resource.email %>!</p>
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
<p>Click the link below to unlock your account:</p>
<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>

View File

@ -1,16 +0,0 @@
<h2>Change your password</h2>
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
<%= devise_error_messages! %>
<%= f.hidden_field :reset_password_token %>
<div><%= f.label :password, "New password" %><br />
<%= f.password_field :password, autofocus: true, autocomplete: "off" %></div>
<div><%= f.label :password_confirmation, "Confirm new password" %><br />
<%= f.password_field :password_confirmation, autocomplete: "off" %></div>
<div><%= f.submit "Change my password", class: "green button-like" %></div>
<% end %>
<%= render "devise/shared/links" %>

View File

@ -1,12 +0,0 @@
<h2>Forgot your password?</h2>
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
<%= devise_error_messages! %>
<div><%= f.label :email %><br />
<%= f.email_field :email, autofocus: true %></div>
<div><%= f.submit "Send me reset password instructions", class: "green button-like" %></div>
<% end %>
<%= render "devise/shared/links" %>

View File

@ -1,57 +0,0 @@
<div class="row">
<div class="large-5 medium-8 small-12 small-centered columns">
<div class="widget-wrapper">
<div class="row">
<div class="small-12 columns">
<div class="header-wrapper">Edit account
</div>
</div>
</div>
<div class="row">
<div class="small-12 columns">
<div class="content-wrapper padding-bottom-large">
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
<%= devise_error_messages! %>
<div><%= f.label :email %>
<%= f.email_field :email, autofocus: true %></div>
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
<% end %>
<div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
<%= f.password_field :password, autocomplete: "off" %></div>
<div><%= f.label :password_confirmation %>
<%= f.password_field :password_confirmation, autocomplete: "off" %></div>
<div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
<%= f.password_field :current_password, autocomplete: "off" %></div>
<div><%= f.submit "Update Account", class: "green button-like" %></div>
<% end %>
</div>
</div>
</div>
</div>
<div class="widget-wrapper">
<div class="row">
<div class="small-12 columns">
<div class="header-wrapper">Delete account
</div>
</div>
</div>
<div class="row">
<div class="small-12 columns">
<div class="content-wrapper padding-bottom-large">
<p>Are you sure you want to delete your account? This cannot be undone and all of your data will be lost permanently!</p>
<%= button_to "Delete account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete, class: "red button-like" %>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,26 +0,0 @@
<div class="row">
<div class="small-12 small-centered columns">
<h2 class="page-title">Create your FarmBot account</h2>
</div>
<div class="large-4 medium-6 small-10 small-centered columns">
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
<%= devise_error_messages! %>
<div><%= f.label 'Username' %>
<%= f.text_field :name, autofocus: true %></div>
<div><%= f.label :email %>
<%= f.email_field :email %></div>
<div><%= f.label :password %>
<%= f.password_field :password, autocomplete: "off" %></div>
<div><%= f.label :password_confirmation %>
<%= f.password_field :password_confirmation, autocomplete: "off" %></div>
<div><%= f.submit "Register", class: "green button-like" %></div>
<% end %>
<%= render "devise/shared/links" %>
</div>
</div>

View File

@ -1,23 +0,0 @@
<div class="row">
<div class="large-8 medium-10 small-12 small-centered columns">
<h2 class="page-title">Sign in</h2>
</div>
<div class="large-6 medium-8 small-12 small-centered columns">
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div><%= f.label :email %>
<%= f.email_field :email, autofocus: true %></div>
<div><%= f.label :password %>
<%= f.password_field :password, autocomplete: "off" %></div>
<% if devise_mapping.rememberable? -%>
<div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
<% end -%>
<div><%= f.submit "Sign in", class: "green button-like" %></div>
<% end %>
<%= render "devise/shared/links" %>
</div>
</div>

View File

@ -1,25 +0,0 @@
<%- if controller_name != 'sessions' %>
<%= link_to "Sign in", new_session_path(resource_name) %><br />
<% end -%>
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
<%= link_to "Sign Up", new_registration_path(resource_name) %><br />
<% end -%>
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
<% end -%>
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
<% end -%>
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
<% end -%>
<%- if devise_mapping.omniauthable? %>
<%- resource_class.omniauth_providers.each do |provider| %>
<%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
<% end -%>
<% end -%>

View File

@ -1,12 +0,0 @@
<h2>Resend unlock instructions</h2>
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
<%= devise_error_messages! %>
<div><%= f.label :email %><br />
<%= f.email_field :email, autofocus: true %></div>
<div><%= f.submit "Resend unlock instructions", class: "green button-like" %></div>
<% end %>
<%= render "devise/shared/links" %>

View File

@ -1,4 +0,0 @@
# config/initializers/high_voltage.rb
HighVoltage.configure do |config|
config.home_page = 'welcome'
end

View File

@ -15,7 +15,7 @@ FarmBot::Application.routes.draw do
resources :corpuses, only: [:index, :show]
end
devise_for :users, :controllers => {:registrations => "registrations"}
devise_for :users#, :controllers => {:registrations => "registrations"}
# Routes for the single page Javascript app.

View File

@ -14,23 +14,8 @@ require 'pry'
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
require 'rspec/rails'
require 'capybara/rails'
require 'capybara/rspec'
require 'features/helpers'
# require 'capybara/poltergeist'
# Capybara.javascript_driver = :poltergeist
Capybara.register_driver :poltergeist do |app|
# Capybara::Poltergeist::Driver.new(app, phantomjs: Phantomjs.path)
Capybara::Poltergeist::Driver.new(app, timeout: 300)
Capybara::Poltergeist::Driver.new(app, js_errors: true)
end
# Requires supporting ruby files with custom matchers and macros, etc, in
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
# run as spec files by default. This means that files in spec/support that end
# in _spec.rb will both be required and run as specs, causing the specs to be
# run twice. It is recommended that you do not name files matching this glob to
# end with _spec.rb. You can configure this pattern with with the --pattern
# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
SmarfDoc.config do |c|