add new file
This commit is contained in:
14
Gemfile
14
Gemfile
@@ -4,7 +4,7 @@ source 'https://rubygems.org'
|
|||||||
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
||||||
gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
|
gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
|
||||||
# Use sqlite3 as the database for Active Record
|
# Use sqlite3 as the database for Active Record
|
||||||
gem 'sqlite3'
|
# gem 'sqlite3'
|
||||||
# Use Puma as the app server
|
# Use Puma as the app server
|
||||||
gem 'puma', '~> 3.0'
|
gem 'puma', '~> 3.0'
|
||||||
# Use SCSS for stylesheets
|
# Use SCSS for stylesheets
|
||||||
@@ -16,6 +16,10 @@ gem 'coffee-rails', '~> 4.2'
|
|||||||
# See https://github.com/rails/execjs#readme for more supported runtimes
|
# See https://github.com/rails/execjs#readme for more supported runtimes
|
||||||
# gem 'therubyracer', platforms: :ruby
|
# gem 'therubyracer', platforms: :ruby
|
||||||
|
|
||||||
|
platform :ruby do
|
||||||
|
gem 'pg'
|
||||||
|
end
|
||||||
|
|
||||||
# Use jquery as the JavaScript library
|
# Use jquery as the JavaScript library
|
||||||
gem 'jquery-rails'
|
gem 'jquery-rails'
|
||||||
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
|
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
|
||||||
@@ -30,6 +34,14 @@ gem 'jbuilder', '~> 2.5'
|
|||||||
# Use Capistrano for deployment
|
# Use Capistrano for deployment
|
||||||
# gem 'capistrano-rails', group: :development
|
# gem 'capistrano-rails', group: :development
|
||||||
|
|
||||||
|
gem 'devise'
|
||||||
|
gem 'devise_uid'
|
||||||
|
gem 'bcrypt', '~> 3.1.7'
|
||||||
|
gem 'simple_form'
|
||||||
|
gem 'kaminari'
|
||||||
|
gem 'to_csv-rails'
|
||||||
|
gem 'bootstrap-multiselect-rails'
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
||||||
gem 'byebug', platform: :mri
|
gem 'byebug', platform: :mri
|
||||||
|
|||||||
46
Gemfile.lock
46
Gemfile.lock
@@ -39,6 +39,9 @@ GEM
|
|||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
arel (7.1.4)
|
arel (7.1.4)
|
||||||
|
bcrypt (3.1.11)
|
||||||
|
bootstrap-multiselect-rails (0.9.9)
|
||||||
|
rails (>= 4.0.0)
|
||||||
builder (3.2.3)
|
builder (3.2.3)
|
||||||
byebug (9.0.6)
|
byebug (9.0.6)
|
||||||
coffee-rails (4.2.1)
|
coffee-rails (4.2.1)
|
||||||
@@ -50,6 +53,15 @@ GEM
|
|||||||
coffee-script-source (1.12.2)
|
coffee-script-source (1.12.2)
|
||||||
concurrent-ruby (1.0.4)
|
concurrent-ruby (1.0.4)
|
||||||
debug_inspector (0.0.2)
|
debug_inspector (0.0.2)
|
||||||
|
devise (4.2.0)
|
||||||
|
bcrypt (~> 3.0)
|
||||||
|
orm_adapter (~> 0.1)
|
||||||
|
railties (>= 4.1.0, < 5.1)
|
||||||
|
responders
|
||||||
|
warden (~> 1.2.3)
|
||||||
|
devise_uid (0.1.1)
|
||||||
|
devise (>= 3.0.0)
|
||||||
|
railties (>= 3.0)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
execjs (2.7.0)
|
execjs (2.7.0)
|
||||||
ffi (1.9.17)
|
ffi (1.9.17)
|
||||||
@@ -63,6 +75,18 @@ GEM
|
|||||||
rails-dom-testing (>= 1, < 3)
|
rails-dom-testing (>= 1, < 3)
|
||||||
railties (>= 4.2.0)
|
railties (>= 4.2.0)
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
|
kaminari (1.0.1)
|
||||||
|
activesupport (>= 4.1.0)
|
||||||
|
kaminari-actionview (= 1.0.1)
|
||||||
|
kaminari-activerecord (= 1.0.1)
|
||||||
|
kaminari-core (= 1.0.1)
|
||||||
|
kaminari-actionview (1.0.1)
|
||||||
|
actionview
|
||||||
|
kaminari-core (= 1.0.1)
|
||||||
|
kaminari-activerecord (1.0.1)
|
||||||
|
activerecord
|
||||||
|
kaminari-core (= 1.0.1)
|
||||||
|
kaminari-core (1.0.1)
|
||||||
listen (3.0.8)
|
listen (3.0.8)
|
||||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||||
rb-inotify (~> 0.9, >= 0.9.7)
|
rb-inotify (~> 0.9, >= 0.9.7)
|
||||||
@@ -80,6 +104,8 @@ GEM
|
|||||||
nio4r (1.2.1)
|
nio4r (1.2.1)
|
||||||
nokogiri (1.7.0.1)
|
nokogiri (1.7.0.1)
|
||||||
mini_portile2 (~> 2.1.0)
|
mini_portile2 (~> 2.1.0)
|
||||||
|
orm_adapter (0.5.0)
|
||||||
|
pg (0.19.0)
|
||||||
puma (3.6.2)
|
puma (3.6.2)
|
||||||
rack (2.0.1)
|
rack (2.0.1)
|
||||||
rack-test (0.6.3)
|
rack-test (0.6.3)
|
||||||
@@ -111,6 +137,8 @@ GEM
|
|||||||
rb-fsevent (0.9.8)
|
rb-fsevent (0.9.8)
|
||||||
rb-inotify (0.9.7)
|
rb-inotify (0.9.7)
|
||||||
ffi (>= 0.5.0)
|
ffi (>= 0.5.0)
|
||||||
|
responders (2.3.0)
|
||||||
|
railties (>= 4.2.0, < 5.1)
|
||||||
sass (3.4.23)
|
sass (3.4.23)
|
||||||
sass-rails (5.0.6)
|
sass-rails (5.0.6)
|
||||||
railties (>= 4.0.0, < 6)
|
railties (>= 4.0.0, < 6)
|
||||||
@@ -118,6 +146,9 @@ GEM
|
|||||||
sprockets (>= 2.8, < 4.0)
|
sprockets (>= 2.8, < 4.0)
|
||||||
sprockets-rails (>= 2.0, < 4.0)
|
sprockets-rails (>= 2.0, < 4.0)
|
||||||
tilt (>= 1.1, < 3)
|
tilt (>= 1.1, < 3)
|
||||||
|
simple_form (3.4.0)
|
||||||
|
actionpack (> 4, < 5.1)
|
||||||
|
activemodel (> 4, < 5.1)
|
||||||
spring (2.0.0)
|
spring (2.0.0)
|
||||||
activesupport (>= 4.2)
|
activesupport (>= 4.2)
|
||||||
spring-watcher-listen (2.0.1)
|
spring-watcher-listen (2.0.1)
|
||||||
@@ -130,10 +161,10 @@ GEM
|
|||||||
actionpack (>= 4.0)
|
actionpack (>= 4.0)
|
||||||
activesupport (>= 4.0)
|
activesupport (>= 4.0)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
sqlite3 (1.3.13)
|
|
||||||
thor (0.19.4)
|
thor (0.19.4)
|
||||||
thread_safe (0.3.5)
|
thread_safe (0.3.5)
|
||||||
tilt (2.0.5)
|
tilt (2.0.5)
|
||||||
|
to_csv-rails (0.1.5)
|
||||||
turbolinks (5.0.1)
|
turbolinks (5.0.1)
|
||||||
turbolinks-source (~> 5)
|
turbolinks-source (~> 5)
|
||||||
turbolinks-source (5.0.0)
|
turbolinks-source (5.0.0)
|
||||||
@@ -141,6 +172,8 @@ GEM
|
|||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
uglifier (3.0.4)
|
uglifier (3.0.4)
|
||||||
execjs (>= 0.3.0, < 3)
|
execjs (>= 0.3.0, < 3)
|
||||||
|
warden (1.2.6)
|
||||||
|
rack (>= 1.0)
|
||||||
web-console (3.4.0)
|
web-console (3.4.0)
|
||||||
actionview (>= 5.0)
|
actionview (>= 5.0)
|
||||||
activemodel (>= 5.0)
|
activemodel (>= 5.0)
|
||||||
@@ -154,21 +187,28 @@ PLATFORMS
|
|||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
|
bcrypt (~> 3.1.7)
|
||||||
|
bootstrap-multiselect-rails
|
||||||
byebug
|
byebug
|
||||||
coffee-rails (~> 4.2)
|
coffee-rails (~> 4.2)
|
||||||
|
devise
|
||||||
|
devise_uid
|
||||||
jbuilder (~> 2.5)
|
jbuilder (~> 2.5)
|
||||||
jquery-rails
|
jquery-rails
|
||||||
|
kaminari
|
||||||
listen (~> 3.0.5)
|
listen (~> 3.0.5)
|
||||||
|
pg
|
||||||
puma (~> 3.0)
|
puma (~> 3.0)
|
||||||
rails (~> 5.0.0, >= 5.0.0.1)
|
rails (~> 5.0.0, >= 5.0.0.1)
|
||||||
sass-rails (~> 5.0)
|
sass-rails (~> 5.0)
|
||||||
|
simple_form
|
||||||
spring
|
spring
|
||||||
spring-watcher-listen (~> 2.0.0)
|
spring-watcher-listen (~> 2.0.0)
|
||||||
sqlite3
|
to_csv-rails
|
||||||
turbolinks (~> 5)
|
turbolinks (~> 5)
|
||||||
tzinfo-data
|
tzinfo-data
|
||||||
uglifier (>= 1.3.0)
|
uglifier (>= 1.3.0)
|
||||||
web-console
|
web-console
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.13.6
|
1.13.7
|
||||||
|
|||||||
@@ -13,4 +13,6 @@
|
|||||||
//= require jquery
|
//= require jquery
|
||||||
//= require jquery_ujs
|
//= require jquery_ujs
|
||||||
//= require turbolinks
|
//= require turbolinks
|
||||||
|
//= require bootstrap.v4a2.min
|
||||||
|
//= require bootstrap-multiselect
|
||||||
//= require_tree .
|
//= require_tree .
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
/*
|
|
||||||
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
|
||||||
* listed below.
|
|
||||||
*
|
|
||||||
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
|
||||||
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
|
||||||
*
|
|
||||||
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
|
||||||
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
|
||||||
* files in this directory. Styles in this file should be added after the last require_* statement.
|
|
||||||
* It is generally better to create a new file per style scope.
|
|
||||||
*
|
|
||||||
*= require_tree .
|
|
||||||
*= require_self
|
|
||||||
*/
|
|
||||||
@@ -1,3 +1,21 @@
|
|||||||
class ApplicationController < ActionController::Base
|
class ApplicationController < ActionController::Base
|
||||||
protect_from_forgery with: :exception
|
protect_from_forgery with: :exception
|
||||||
|
helper_method :current_member, :logged_in?, :resource_name, :resource, :devise_mapping
|
||||||
|
|
||||||
|
def logged_in?
|
||||||
|
current_member
|
||||||
|
end
|
||||||
|
def after_sign_in_path_for(resource)
|
||||||
|
dashboard_path
|
||||||
|
end
|
||||||
|
def resource_name
|
||||||
|
:member
|
||||||
|
end
|
||||||
|
def resource
|
||||||
|
@resource ||= Member.new
|
||||||
|
end
|
||||||
|
|
||||||
|
def devise_mapping
|
||||||
|
@devise_mapping ||= Devise.mappings[:member]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html ang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>NemoEncoder</title>
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||||
|
<title><%= content_for?(:title) ? yield(:title) : "Nemo Encoder" %></title>
|
||||||
<%= csrf_meta_tags %>
|
<%= csrf_meta_tags %>
|
||||||
|
<%= stylesheet_link_tag 'application', media: 'all' %>
|
||||||
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
<%= javascript_include_tag 'application', 'data-turbolinks-eval' => true %>
|
||||||
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
<link href="/assets/style.css" rel="stylesheet" type="text/css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<%= yield %>
|
<%= render "layouts/navigation" %>
|
||||||
|
<div style="margin-top: 80px;"></div>
|
||||||
|
<div class="container">
|
||||||
|
<%= yield %>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -11,5 +11,8 @@ module NemoEncoder
|
|||||||
# Settings in config/environments/* take precedence over those specified here.
|
# Settings in config/environments/* take precedence over those specified here.
|
||||||
# Application configuration should go into files in config/initializers
|
# Application configuration should go into files in config/initializers
|
||||||
# -- all .rb files in that directory are automatically loaded.
|
# -- all .rb files in that directory are automatically loaded.
|
||||||
|
config.before_initialize do
|
||||||
|
Rails.configuration.nemoencoder_configuration = YAML.load_file("#{Rails.root}/config/config.yml")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -5,20 +5,21 @@
|
|||||||
# gem 'sqlite3'
|
# gem 'sqlite3'
|
||||||
#
|
#
|
||||||
default: &default
|
default: &default
|
||||||
adapter: sqlite3
|
adapter: postgresql
|
||||||
pool: 5
|
pool: 5
|
||||||
timeout: 5000
|
timeout: 5000
|
||||||
|
|
||||||
development:
|
development:
|
||||||
<<: *default
|
<<: *default
|
||||||
database: db/development.sqlite3
|
database: nemo_encoder
|
||||||
|
username: nda
|
||||||
|
|
||||||
# Warning: The database defined as "test" will be erased and
|
# Warning: The database defined as "test" will be erased and
|
||||||
# re-generated from your development database when you run "rake".
|
# re-generated from your development database when you run "rake".
|
||||||
# Do not set this db to the same as development or production.
|
# Do not set this db to the same as development or production.
|
||||||
test:
|
test:
|
||||||
<<: *default
|
<<: *default
|
||||||
database: db/test.sqlite3
|
database: nemo_encoder
|
||||||
|
|
||||||
production:
|
production:
|
||||||
<<: *default
|
<<: *default
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ Rails.application.configure do
|
|||||||
|
|
||||||
# Suppress logger output for asset requests.
|
# Suppress logger output for asset requests.
|
||||||
config.assets.quiet = true
|
config.assets.quiet = true
|
||||||
|
config.action_mailer.default_url_options = { host: 'localhost', port: 3001 }
|
||||||
# Raises error for missing translations
|
# Raises error for missing translations
|
||||||
# config.action_view.raise_on_missing_translations = true
|
# config.action_view.raise_on_missing_translations = true
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ Rails.application.configure do
|
|||||||
|
|
||||||
# Print deprecation notices to the stderr.
|
# Print deprecation notices to the stderr.
|
||||||
config.active_support.deprecation = :stderr
|
config.active_support.deprecation = :stderr
|
||||||
|
config.action_mailer.default_url_options = { host: 'localhost', port: 3001 }
|
||||||
|
|
||||||
# Raises error for missing translations
|
# Raises error for missing translations
|
||||||
# config.action_view.raise_on_missing_translations = true
|
# config.action_view.raise_on_missing_translations = true
|
||||||
|
|||||||
@@ -1,3 +1,32 @@
|
|||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
|
|
||||||
|
|
||||||
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
|
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
|
||||||
|
root :to => 'home#index'
|
||||||
|
get "dashboard", to: "home#dashboard", as: "dashboard"
|
||||||
|
|
||||||
|
resources :batches,:only =>[:index]
|
||||||
|
devise_for :members
|
||||||
|
resources :batch_line_items,:only =>[:index,:create]
|
||||||
|
resources :users
|
||||||
|
|
||||||
|
#users
|
||||||
|
get 'check_registered_email' => "users#check_registered_email"
|
||||||
|
#Encoder
|
||||||
|
match 'batch_line_items/export' => 'batch_line_items#create', :as => 'export', :via => :post
|
||||||
|
|
||||||
|
namespace :api, defaults: {format: :json} do
|
||||||
|
#login
|
||||||
|
post "auth/login" =>"auth#login"
|
||||||
|
post "auth/logout" =>"auth#logout"
|
||||||
|
|
||||||
|
#Encoder
|
||||||
|
post "batch_line_items/register" =>"batch_line_items#register"
|
||||||
|
|
||||||
|
#Batch
|
||||||
|
post "batches" => "batches#create"
|
||||||
|
post "batches/end" => "batches#batch_end"
|
||||||
|
get "batches/resume_batch" =>"batches#resume_batch"
|
||||||
|
get "batches/batch_progress_list" =>"batches#batch_progress_list"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user