work off today
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'rails', '~> 4.2.6'
|
||||
gem 'rails', '~> 6.0.2'
|
||||
gem 'rack-cors', require: 'rack/cors'
|
||||
|
||||
# Bundle edge Rails instead:
|
||||
@@ -15,9 +15,9 @@ gem 'slim-rails'
|
||||
gem 'jsonapi-serializers', github: 'bterkuile/jsonapi-serializers'
|
||||
group :assets do
|
||||
gem 'jquery-rails'
|
||||
gem 'jquery-ui-rails', '~> 5.0.5' # https://github.com/joliss/jquery-ui-rails/issues/108
|
||||
gem 'jquery-ui-rails' #, '~> 5.0.5' # https://github.com/joliss/jquery-ui-rails/issues/108
|
||||
gem 'sass-rails' #, '~> 5.0.0'
|
||||
gem 'coffee-rails' #, '~> 3.2.1'
|
||||
gem 'coffee-rails', '>= 5.0.0'
|
||||
#gem 'twitter-bootstrap-rails'
|
||||
# Only for mobile assets precompile, not used in this project
|
||||
#gem 'bootstrap-sass', '~>2.3'
|
||||
@@ -32,15 +32,15 @@ group :assets do
|
||||
|
||||
gem 'uglifier', '>= 1.0.3'
|
||||
|
||||
gem 'ember-source', '~> 2.5.1'
|
||||
gem 'ember-data-source', '~> 2.5.3'
|
||||
gem "barber", "0.11.1"
|
||||
gem 'ember-rails'
|
||||
#gem 'ember-source', '~> 2.5.1'
|
||||
#gem 'ember-data-source', '~> 2.5.3'
|
||||
#gem "barber", "0.11.1"
|
||||
#gem 'ember-rails'
|
||||
|
||||
gem 'ember-validations-rails'
|
||||
gem 'ember-handlebars-template'
|
||||
gem 'ember-emblem-template' #, github: 'bterkuile/ember-emblem-template'
|
||||
#gem 'ember-emblem-template', path: '/home/benjamin/development/rails/components/ember-emblem-template'
|
||||
#gem 'ember-validations-rails'
|
||||
#gem 'ember-handlebars-template'
|
||||
#gem 'ember-emblem-template' #, github: 'bterkuile/ember-emblem-template'
|
||||
##gem 'ember-emblem-template', path: '/home/benjamin/development/rails/components/ember-emblem-template'
|
||||
|
||||
gem 'foundation-rails', '~> 5.5' #, github: 'bterkuile/foundation-rails'
|
||||
gem 'ace-rails-ap'
|
||||
@@ -55,9 +55,10 @@ end
|
||||
# gem 'couchbase-docstore'
|
||||
# gem 'couchbase-structures', github: 'bterkuile/couchbase-structures'
|
||||
|
||||
#gem 'couch_potato', '~> 1.4.0' #, github: 'bterkuile/couch_potato'
|
||||
#gem 'couch_potato', '>= 1.7.1' #, github: 'bterkuile/couch_potato'
|
||||
gem 'couch_potato', github: 'langalex/couch_potato'
|
||||
#gem 'simply_stored', path: '~/development/rails/components/simply_stored' #, github: 'bterkuile/simply_stored'
|
||||
gem 'simply_stored', github: 'bterkuile/simply_stored'
|
||||
gem 'simply_stored', github: 'bterkuile/simply_stored', branch: :master
|
||||
#gem 'orm_adapter', github: 'bterkuile/orm_adapter'
|
||||
gem 'devise' #, github: 'plataformatec/devise', branch: 'lm-rails-4-2' #, '3.1.0' #, '2.0.4'
|
||||
gem 'devise_simply_stored', github: 'bterkuile/devise_simply_stored'
|
||||
@@ -69,7 +70,7 @@ gem 'active_decorator' #, path: '/Users/bterkuile/companytools/development/rails
|
||||
#gem 'cmtool', github: 'bterkuile/cmtool'
|
||||
gem 'paperclip', ['>= 4.2.4', '!= 4.3.0'] #, '3.5.2' # cmtool
|
||||
#gem 'cmtool', path: './../cmtool'
|
||||
gem 'cmtool', github: 'bterkuile/cmtool'
|
||||
gem 'cmtool', github: 'bterkuile/cmtool', branch: :master
|
||||
gem 'kaminari'
|
||||
|
||||
gem 'rqrcode'
|
||||
@@ -89,19 +90,18 @@ gem 'iso_country_codes'
|
||||
# To use Jbuilder templates for JSON
|
||||
# gem 'jbuilder'
|
||||
#
|
||||
group :user_app do
|
||||
group :development, :test, :user_app do
|
||||
gem 'pry-rails'
|
||||
gem 'pry-doc'
|
||||
end
|
||||
|
||||
group :development, :test do
|
||||
gem 'rspec-rails'
|
||||
gem 'pry-rails'
|
||||
gem 'pry-doc'
|
||||
gem 'test_squad'
|
||||
gem 'factory_girl_rails'
|
||||
end
|
||||
group :development do
|
||||
gem 'quiet_assets'
|
||||
#gem 'quiet_assets'
|
||||
gem 'letter_opener'
|
||||
# gem 'thin'
|
||||
gem 'faye'
|
||||
@@ -134,12 +134,12 @@ group :test do
|
||||
gem 'simplecov', require: false
|
||||
end
|
||||
|
||||
source 'https://rails-assets.org' do
|
||||
group :development, :test do
|
||||
gem 'rails-assets-qunit'
|
||||
gem 'rails-assets-ember-qunit'
|
||||
end
|
||||
end
|
||||
#source 'https://rails-assets.org' do
|
||||
# group :development, :test do
|
||||
# gem 'rails-assets-qunit'
|
||||
# gem 'rails-assets-ember-qunit'
|
||||
# end
|
||||
#end
|
||||
|
||||
# Use unicorn as the app server
|
||||
# gem 'unicorn'
|
||||
|
||||
+308
-313
@@ -1,6 +1,7 @@
|
||||
GIT
|
||||
remote: git://github.com/bterkuile/cmtool.git
|
||||
revision: 3caf808e223233f19b29acde35429be75acd44e2
|
||||
revision: 02e60c174da507348c5c268ea7d2a18e5e61c080
|
||||
branch: master
|
||||
specs:
|
||||
cmtool (2.0.0)
|
||||
ace-rails-ap
|
||||
@@ -23,198 +24,186 @@ GIT
|
||||
|
||||
GIT
|
||||
remote: git://github.com/bterkuile/jsonapi-serializers.git
|
||||
revision: 3013ef89c7608f28f4ffc2581c4da69cffe4f84e
|
||||
revision: 625e44d65a798c554093f6651b3a15318bf88bee
|
||||
specs:
|
||||
jsonapi-serializers (0.2.6)
|
||||
activesupport
|
||||
|
||||
GIT
|
||||
remote: git://github.com/bterkuile/simply_stored.git
|
||||
revision: 7633d88a62972cee6aea49d7d2a175bf07906236
|
||||
revision: aa2b456b16a14483d857404b8afe6500f8e1afb6
|
||||
branch: master
|
||||
specs:
|
||||
simply_stored (1.0.0)
|
||||
activesupport
|
||||
couch_potato (>= 1.7.0)
|
||||
|
||||
GIT
|
||||
remote: git://github.com/langalex/couch_potato.git
|
||||
revision: 70f221f43975195958662cabea3cbc9e440a090e
|
||||
specs:
|
||||
couch_potato (1.7.1)
|
||||
activemodel (>= 4.0)
|
||||
couchrest (~> 2.0.1)
|
||||
json (~> 2.1)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
remote: https://rails-assets.org/
|
||||
specs:
|
||||
ace-rails-ap (4.1.2)
|
||||
actionmailer (4.2.8)
|
||||
actionpack (= 4.2.8)
|
||||
actionview (= 4.2.8)
|
||||
activejob (= 4.2.8)
|
||||
ace-rails-ap (4.3)
|
||||
actioncable (6.0.2.1)
|
||||
actionpack (= 6.0.2.1)
|
||||
nio4r (~> 2.0)
|
||||
websocket-driver (>= 0.6.1)
|
||||
actionmailbox (6.0.2.1)
|
||||
actionpack (= 6.0.2.1)
|
||||
activejob (= 6.0.2.1)
|
||||
activerecord (= 6.0.2.1)
|
||||
activestorage (= 6.0.2.1)
|
||||
activesupport (= 6.0.2.1)
|
||||
mail (>= 2.7.1)
|
||||
actionmailer (6.0.2.1)
|
||||
actionpack (= 6.0.2.1)
|
||||
actionview (= 6.0.2.1)
|
||||
activejob (= 6.0.2.1)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
rails-dom-testing (~> 1.0, >= 1.0.5)
|
||||
actionpack (4.2.8)
|
||||
actionview (= 4.2.8)
|
||||
activesupport (= 4.2.8)
|
||||
rack (~> 1.6)
|
||||
rack-test (~> 0.6.2)
|
||||
rails-dom-testing (~> 1.0, >= 1.0.5)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
||||
actionview (4.2.8)
|
||||
activesupport (= 4.2.8)
|
||||
rails-dom-testing (~> 2.0)
|
||||
actionpack (6.0.2.1)
|
||||
actionview (= 6.0.2.1)
|
||||
activesupport (= 6.0.2.1)
|
||||
rack (~> 2.0, >= 2.0.8)
|
||||
rack-test (>= 0.6.3)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||
actiontext (6.0.2.1)
|
||||
actionpack (= 6.0.2.1)
|
||||
activerecord (= 6.0.2.1)
|
||||
activestorage (= 6.0.2.1)
|
||||
activesupport (= 6.0.2.1)
|
||||
nokogiri (>= 1.8.5)
|
||||
actionview (6.0.2.1)
|
||||
activesupport (= 6.0.2.1)
|
||||
builder (~> 3.1)
|
||||
erubis (~> 2.7.0)
|
||||
rails-dom-testing (~> 1.0, >= 1.0.5)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
||||
active-model-adapter-source (2.1.1)
|
||||
ember-data-source (>= 1.13, < 3.0)
|
||||
active_attr (0.10.0)
|
||||
activemodel (>= 3.0.2, < 5.1)
|
||||
activesupport (>= 3.0.2, < 5.1)
|
||||
active_decorator (0.9.0)
|
||||
active_model_serializers (0.10.5)
|
||||
actionpack (>= 4.1, < 6)
|
||||
activemodel (>= 4.1, < 6)
|
||||
case_transform (>= 0.2)
|
||||
jsonapi-renderer (>= 0.1.1.beta1, < 0.2)
|
||||
activejob (4.2.8)
|
||||
activesupport (= 4.2.8)
|
||||
globalid (>= 0.3.0)
|
||||
activemodel (4.2.8)
|
||||
activesupport (= 4.2.8)
|
||||
builder (~> 3.1)
|
||||
activerecord (4.2.8)
|
||||
activemodel (= 4.2.8)
|
||||
activesupport (= 4.2.8)
|
||||
arel (~> 6.0)
|
||||
activesupport (4.2.8)
|
||||
i18n (~> 0.7)
|
||||
erubi (~> 1.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||
active_attr (0.15.0)
|
||||
actionpack (>= 3.0.2, < 6.1)
|
||||
activemodel (>= 3.0.2, < 6.1)
|
||||
activesupport (>= 3.0.2, < 6.1)
|
||||
active_decorator (1.3.2)
|
||||
activesupport
|
||||
activejob (6.0.2.1)
|
||||
activesupport (= 6.0.2.1)
|
||||
globalid (>= 0.3.6)
|
||||
activemodel (6.0.2.1)
|
||||
activesupport (= 6.0.2.1)
|
||||
activerecord (6.0.2.1)
|
||||
activemodel (= 6.0.2.1)
|
||||
activesupport (= 6.0.2.1)
|
||||
activestorage (6.0.2.1)
|
||||
actionpack (= 6.0.2.1)
|
||||
activejob (= 6.0.2.1)
|
||||
activerecord (= 6.0.2.1)
|
||||
marcel (~> 0.3.1)
|
||||
activesupport (6.0.2.1)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 0.7, < 2)
|
||||
minitest (~> 5.1)
|
||||
thread_safe (~> 0.3, >= 0.3.4)
|
||||
tzinfo (~> 1.1)
|
||||
addressable (2.5.1)
|
||||
public_suffix (~> 2.0, >= 2.0.2)
|
||||
airbrussh (1.2.0)
|
||||
zeitwerk (~> 2.2)
|
||||
addressable (2.7.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
airbrussh (1.4.0)
|
||||
sshkit (>= 1.6.1, != 1.7.0)
|
||||
arel (6.0.4)
|
||||
babel-source (5.8.35)
|
||||
babel-transpiler (0.7.0)
|
||||
babel-source (>= 4.0, < 6)
|
||||
execjs (~> 2.0)
|
||||
barber (0.11.1)
|
||||
ember-source (>= 1.0, < 3)
|
||||
execjs (>= 1.2, < 3)
|
||||
bcrypt (3.1.11)
|
||||
bourbon (4.3.4)
|
||||
sass (~> 3.4)
|
||||
bcrypt (3.1.13)
|
||||
bourbon (6.0.0)
|
||||
thor (~> 0.19)
|
||||
builder (3.2.3)
|
||||
cancancan (1.16.0)
|
||||
capistrano (3.8.0)
|
||||
builder (3.2.4)
|
||||
c21e (1.1.9)
|
||||
cancancan (3.0.2)
|
||||
capistrano (3.12.0)
|
||||
airbrussh (>= 1.0.0)
|
||||
i18n
|
||||
rake (>= 10.0.0)
|
||||
sshkit (>= 1.9.0)
|
||||
capistrano-bundler (1.2.0)
|
||||
capistrano-bundler (1.6.0)
|
||||
capistrano (~> 3.1)
|
||||
sshkit (~> 1.2)
|
||||
capistrano-rails (1.2.3)
|
||||
capistrano-rails (1.4.0)
|
||||
capistrano (~> 3.1)
|
||||
capistrano-bundler (~> 1.1)
|
||||
capistrano-rvm (0.1.2)
|
||||
capistrano (~> 3.0)
|
||||
sshkit (~> 1.2)
|
||||
capistrano3-puma (3.1.0)
|
||||
capistrano3-puma (4.0.0)
|
||||
capistrano (~> 3.7)
|
||||
capistrano-bundler
|
||||
puma (~> 3.4)
|
||||
capybara (2.13.0)
|
||||
puma (~> 4.0)
|
||||
capybara (3.31.0)
|
||||
addressable
|
||||
mime-types (>= 1.16)
|
||||
nokogiri (>= 1.3.3)
|
||||
rack (>= 1.0.0)
|
||||
rack-test (>= 0.5.4)
|
||||
xpath (~> 2.0)
|
||||
capybara-screenshot (1.0.14)
|
||||
capybara (>= 1.0, < 3)
|
||||
mini_mime (>= 0.1.3)
|
||||
nokogiri (~> 1.8)
|
||||
rack (>= 1.6.0)
|
||||
rack-test (>= 0.6.3)
|
||||
regexp_parser (~> 1.5)
|
||||
xpath (~> 3.2)
|
||||
capybara-screenshot (1.0.24)
|
||||
capybara (>= 1.0, < 4)
|
||||
launchy
|
||||
case_transform (0.2)
|
||||
activesupport
|
||||
chunky_png (1.3.8)
|
||||
climate_control (0.1.0)
|
||||
chunky_png (1.3.11)
|
||||
climate_control (0.2.0)
|
||||
cliver (0.3.2)
|
||||
cocaine (0.5.8)
|
||||
climate_control (>= 0.0.3, < 1.0)
|
||||
coderay (1.1.1)
|
||||
coffee-rails (4.2.1)
|
||||
coderay (1.1.2)
|
||||
coffee-rails (5.0.0)
|
||||
coffee-script (>= 2.2.0)
|
||||
railties (>= 4.0.0, < 5.2.x)
|
||||
railties (>= 5.2.0)
|
||||
coffee-script (2.4.1)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.12.2)
|
||||
concurrent-ruby (1.0.5)
|
||||
concurrent-ruby (1.1.6)
|
||||
cookiejar (0.3.3)
|
||||
couch_potato (1.7.0)
|
||||
activemodel (~> 4.0)
|
||||
couchrest (~> 2.0.0.rc3)
|
||||
json (~> 1.6)
|
||||
couchrest (2.0.1)
|
||||
httpclient (~> 2.8)
|
||||
mime-types (>= 1.15)
|
||||
multi_json (~> 1.7)
|
||||
crack (0.4.3)
|
||||
safe_yaml (~> 1.0.0)
|
||||
devise (4.2.1)
|
||||
crass (1.0.6)
|
||||
cucumber-messages (2.1.2)
|
||||
google-protobuf (>= 3.2, <= 3.7)
|
||||
devise (4.7.1)
|
||||
bcrypt (~> 3.0)
|
||||
orm_adapter (~> 0.1)
|
||||
railties (>= 4.1.0, < 5.1)
|
||||
railties (>= 4.1.0)
|
||||
responders
|
||||
warden (~> 1.2.3)
|
||||
devise-i18n (1.1.2)
|
||||
devise-i18n (1.9.0)
|
||||
devise (>= 4.7.1)
|
||||
diff-lcs (1.3)
|
||||
docile (1.1.5)
|
||||
docile (1.3.2)
|
||||
em-http-request (1.1.5)
|
||||
addressable (>= 2.3.4)
|
||||
cookiejar (!= 0.3.1)
|
||||
em-socksify (>= 0.3)
|
||||
eventmachine (>= 1.0.3)
|
||||
http_parser.rb (>= 0.6.0)
|
||||
em-socksify (0.3.1)
|
||||
em-socksify (0.3.2)
|
||||
eventmachine (>= 1.0.0.beta.4)
|
||||
email_validator (1.6.0)
|
||||
email_validator (2.0.1)
|
||||
activemodel
|
||||
ember-cli-assets (0.0.35)
|
||||
ember-data-source (2.5.5)
|
||||
ember-source (>= 2, < 3.0)
|
||||
ember-emblem-template (0.4.0)
|
||||
ember-handlebars-template (~> 0.7.0)
|
||||
sprockets-rails (~> 2.0)
|
||||
ember-es6_template (0.6.0)
|
||||
babel-transpiler (>= 0.6.0, < 0.8)
|
||||
sprockets (>= 2.2, < 4.1)
|
||||
ember-handlebars-template (0.7.5)
|
||||
barber (>= 0.11.0)
|
||||
sprockets (>= 3.3, < 4)
|
||||
ember-rails (0.21.0)
|
||||
active-model-adapter-source (>= 1.13.0)
|
||||
active_model_serializers
|
||||
ember-cli-assets (~> 0.0.1)
|
||||
ember-data-source (>= 1.13.0)
|
||||
ember-es6_template (>= 0.4.0, < 0.7)
|
||||
ember-handlebars-template (>= 0.1.1, < 1.0)
|
||||
ember-source (>= 1.8.0)
|
||||
jquery-rails (>= 1.0.17)
|
||||
railties (>= 4.2)
|
||||
ember-source (2.5.1)
|
||||
ember-validations-rails (1.0.0)
|
||||
railties
|
||||
erubis (2.7.0)
|
||||
eventmachine (1.2.3)
|
||||
exception_notification (4.2.1)
|
||||
actionmailer (>= 4.0, < 6)
|
||||
activesupport (>= 4.0, < 6)
|
||||
erubi (1.9.0)
|
||||
eventmachine (1.2.7)
|
||||
exception_notification (4.4.0)
|
||||
actionmailer (>= 4.0, < 7)
|
||||
activesupport (>= 4.0, < 7)
|
||||
execjs (2.7.0)
|
||||
factory_girl (4.8.0)
|
||||
factory_girl (4.9.0)
|
||||
activesupport (>= 3.0.0)
|
||||
factory_girl_rails (4.8.0)
|
||||
factory_girl (~> 4.8.0)
|
||||
factory_girl_rails (4.9.0)
|
||||
factory_girl (~> 4.9.0)
|
||||
railties (>= 3.0.0)
|
||||
faraday (0.11.0)
|
||||
faraday (1.0.0)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
faye (1.2.4)
|
||||
cookiejar (>= 0.3.0)
|
||||
@@ -224,250 +213,265 @@ GEM
|
||||
multi_json (>= 1.0.0)
|
||||
rack (>= 1.0.0)
|
||||
websocket-driver (>= 0.5.1)
|
||||
faye-websocket (0.10.7)
|
||||
faye-websocket (0.10.9)
|
||||
eventmachine (>= 0.12.0)
|
||||
websocket-driver (>= 0.5.1)
|
||||
font-awesome-rails (4.7.0.1)
|
||||
railties (>= 3.2, < 5.1)
|
||||
foreman (0.84.0)
|
||||
thor (~> 0.19.1)
|
||||
ffi (1.12.2)
|
||||
font-awesome-rails (4.7.0.5)
|
||||
railties (>= 3.2, < 6.1)
|
||||
foreman (0.87.0)
|
||||
foundation-rails (5.5.3.2)
|
||||
railties (>= 3.1.0)
|
||||
sass (>= 3.3.0, < 3.5)
|
||||
fuubar (2.2.0)
|
||||
fuubar (2.5.0)
|
||||
rspec-core (~> 3.0)
|
||||
ruby-progressbar (~> 1.4)
|
||||
gherkin (4.1.1)
|
||||
globalid (0.4.0)
|
||||
gherkin (6.0.17)
|
||||
c21e (~> 1.1.9)
|
||||
cucumber-messages (~> 2.1.2)
|
||||
globalid (0.4.2)
|
||||
activesupport (>= 4.2.0)
|
||||
hashdiff (0.3.2)
|
||||
hashie (3.5.5)
|
||||
google-protobuf (3.7.0)
|
||||
hashdiff (1.0.0)
|
||||
hashie (3.6.0)
|
||||
http_parser.rb (0.6.0)
|
||||
httpclient (2.8.3)
|
||||
i18n (0.8.1)
|
||||
iso_country_codes (0.7.7)
|
||||
jquery-rails (4.3.1)
|
||||
i18n (1.8.2)
|
||||
concurrent-ruby (~> 1.0)
|
||||
iso_country_codes (0.7.8)
|
||||
jquery-rails (4.3.5)
|
||||
rails-dom-testing (>= 1, < 3)
|
||||
railties (>= 4.2.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
jquery-ui-rails (5.0.5)
|
||||
jquery-ui-rails (6.0.1)
|
||||
railties (>= 3.2.16)
|
||||
js-routes (1.3.3)
|
||||
railties (>= 3.2)
|
||||
js-routes (1.4.9)
|
||||
railties (>= 4)
|
||||
sprockets-rails
|
||||
json (1.8.6)
|
||||
jsonapi-renderer (0.1.2)
|
||||
jwt (1.5.6)
|
||||
kaminari (1.0.1)
|
||||
json (2.3.0)
|
||||
jwt (2.2.1)
|
||||
kaminari (1.2.0)
|
||||
activesupport (>= 4.1.0)
|
||||
kaminari-actionview (= 1.0.1)
|
||||
kaminari-activerecord (= 1.0.1)
|
||||
kaminari-core (= 1.0.1)
|
||||
kaminari-actionview (1.0.1)
|
||||
kaminari-actionview (= 1.2.0)
|
||||
kaminari-activerecord (= 1.2.0)
|
||||
kaminari-core (= 1.2.0)
|
||||
kaminari-actionview (1.2.0)
|
||||
actionview
|
||||
kaminari-core (= 1.0.1)
|
||||
kaminari-activerecord (1.0.1)
|
||||
kaminari-core (= 1.2.0)
|
||||
kaminari-activerecord (1.2.0)
|
||||
activerecord
|
||||
kaminari-core (= 1.0.1)
|
||||
kaminari-core (1.0.1)
|
||||
kaminari-core (= 1.2.0)
|
||||
kaminari-core (1.2.0)
|
||||
launchy (2.4.3)
|
||||
addressable (~> 2.3)
|
||||
letter_opener (1.4.1)
|
||||
letter_opener (1.7.0)
|
||||
launchy (~> 2.2)
|
||||
libv8 (3.16.14.19)
|
||||
loofah (2.0.3)
|
||||
loofah (2.4.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
mail (2.6.4)
|
||||
mime-types (>= 1.16, < 4)
|
||||
method_source (0.8.2)
|
||||
mime-types (3.1)
|
||||
mail (2.7.1)
|
||||
mini_mime (>= 0.1.1)
|
||||
marcel (0.3.3)
|
||||
mimemagic (~> 0.3.2)
|
||||
method_source (0.9.2)
|
||||
mime-types (3.3.1)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2016.0521)
|
||||
mimemagic (0.3.2)
|
||||
mini_magick (4.7.0)
|
||||
mini_portile2 (2.1.0)
|
||||
minitest (5.10.1)
|
||||
multi_json (1.12.1)
|
||||
mime-types-data (3.2019.1009)
|
||||
mimemagic (0.3.4)
|
||||
mini_magick (4.10.1)
|
||||
mini_mime (1.0.2)
|
||||
mini_portile2 (2.4.0)
|
||||
minitest (5.14.0)
|
||||
multi_json (1.14.1)
|
||||
multi_xml (0.6.0)
|
||||
multipart-post (2.0.0)
|
||||
multipart-post (2.1.1)
|
||||
naught (1.1.0)
|
||||
net-scp (1.2.1)
|
||||
net-ssh (>= 2.6.5)
|
||||
net-ssh (4.1.0)
|
||||
nokogiri (1.7.1)
|
||||
mini_portile2 (~> 2.1.0)
|
||||
oauth2 (1.3.1)
|
||||
faraday (>= 0.8, < 0.12)
|
||||
jwt (~> 1.0)
|
||||
net-scp (2.0.0)
|
||||
net-ssh (>= 2.6.5, < 6.0.0)
|
||||
net-ssh (5.2.0)
|
||||
nio4r (2.5.2)
|
||||
nokogiri (1.10.8)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
oauth2 (1.4.4)
|
||||
faraday (>= 0.8, < 2.0)
|
||||
jwt (>= 1.0, < 3.0)
|
||||
multi_json (~> 1.3)
|
||||
multi_xml (~> 0.5)
|
||||
rack (>= 1.2, < 3)
|
||||
omniauth (1.6.1)
|
||||
hashie (>= 3.4.6, < 3.6.0)
|
||||
omniauth (1.9.0)
|
||||
hashie (>= 3.4.6, < 3.7.0)
|
||||
rack (>= 1.6.2, < 3)
|
||||
omniauth-facebook (4.0.0)
|
||||
omniauth-facebook (6.0.0)
|
||||
omniauth-oauth2 (~> 1.2)
|
||||
omniauth-instagram (1.0.2)
|
||||
omniauth-instagram (1.3.0)
|
||||
omniauth (~> 1)
|
||||
omniauth-oauth2 (~> 1)
|
||||
omniauth-oauth2 (1.4.0)
|
||||
oauth2 (~> 1.0)
|
||||
omniauth (~> 1.2)
|
||||
omniauth-oauth2 (1.6.0)
|
||||
oauth2 (~> 1.1)
|
||||
omniauth (~> 1.9)
|
||||
orm_adapter (0.5.0)
|
||||
paperclip (5.1.0)
|
||||
paperclip (6.1.0)
|
||||
activemodel (>= 4.2.0)
|
||||
activesupport (>= 4.2.0)
|
||||
cocaine (~> 0.5.5)
|
||||
mime-types
|
||||
mimemagic (~> 0.3.0)
|
||||
terrapin (~> 0.6.0)
|
||||
pickadate-rails (3.5.6.0)
|
||||
railties (>= 3.1.0)
|
||||
poltergeist (1.14.0)
|
||||
capybara (~> 2.1)
|
||||
poltergeist (1.18.1)
|
||||
capybara (>= 2.1, < 4)
|
||||
cliver (~> 0.3.1)
|
||||
websocket-driver (>= 0.2.0)
|
||||
pry (0.10.4)
|
||||
pry (0.12.2)
|
||||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.8.1)
|
||||
slop (~> 3.4)
|
||||
pry-doc (0.10.0)
|
||||
pry (~> 0.9)
|
||||
yard (~> 0.9)
|
||||
pry-rails (0.3.6)
|
||||
method_source (~> 0.9.0)
|
||||
pry-doc (1.0.0)
|
||||
pry (~> 0.11)
|
||||
yard (~> 0.9.11)
|
||||
pry-rails (0.3.9)
|
||||
pry (>= 0.10.4)
|
||||
public_suffix (2.0.5)
|
||||
puma (3.8.2)
|
||||
quiet_assets (1.1.0)
|
||||
railties (>= 3.1, < 5.0)
|
||||
rack (1.6.5)
|
||||
rack-cors (0.4.1)
|
||||
rack-test (0.6.3)
|
||||
rack (>= 1.0)
|
||||
rails (4.2.8)
|
||||
actionmailer (= 4.2.8)
|
||||
actionpack (= 4.2.8)
|
||||
actionview (= 4.2.8)
|
||||
activejob (= 4.2.8)
|
||||
activemodel (= 4.2.8)
|
||||
activerecord (= 4.2.8)
|
||||
activesupport (= 4.2.8)
|
||||
bundler (>= 1.3.0, < 2.0)
|
||||
railties (= 4.2.8)
|
||||
sprockets-rails
|
||||
rails-assets-ember-qunit (1.0.0)
|
||||
rails-assets-qunit (2.3.2)
|
||||
rails-deprecated_sanitizer (1.0.3)
|
||||
activesupport (>= 4.2.0.alpha)
|
||||
rails-dom-testing (1.0.8)
|
||||
activesupport (>= 4.2.0.beta, < 5.0)
|
||||
nokogiri (~> 1.6)
|
||||
rails-deprecated_sanitizer (>= 1.0.1)
|
||||
rails-html-sanitizer (1.0.3)
|
||||
loofah (~> 2.0)
|
||||
railties (4.2.8)
|
||||
actionpack (= 4.2.8)
|
||||
activesupport (= 4.2.8)
|
||||
public_suffix (4.0.3)
|
||||
puma (4.3.1)
|
||||
nio4r (~> 2.0)
|
||||
rack (2.2.2)
|
||||
rack-cors (1.1.1)
|
||||
rack (>= 2.0.0)
|
||||
rack-test (1.1.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rails (6.0.2.1)
|
||||
actioncable (= 6.0.2.1)
|
||||
actionmailbox (= 6.0.2.1)
|
||||
actionmailer (= 6.0.2.1)
|
||||
actionpack (= 6.0.2.1)
|
||||
actiontext (= 6.0.2.1)
|
||||
actionview (= 6.0.2.1)
|
||||
activejob (= 6.0.2.1)
|
||||
activemodel (= 6.0.2.1)
|
||||
activerecord (= 6.0.2.1)
|
||||
activestorage (= 6.0.2.1)
|
||||
activesupport (= 6.0.2.1)
|
||||
bundler (>= 1.3.0)
|
||||
railties (= 6.0.2.1)
|
||||
sprockets-rails (>= 2.0.0)
|
||||
rails-dom-testing (2.0.3)
|
||||
activesupport (>= 4.2.0)
|
||||
nokogiri (>= 1.6)
|
||||
rails-html-sanitizer (1.3.0)
|
||||
loofah (~> 2.3)
|
||||
railties (6.0.2.1)
|
||||
actionpack (= 6.0.2.1)
|
||||
activesupport (= 6.0.2.1)
|
||||
method_source
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.18.1, < 2.0)
|
||||
rake (12.0.0)
|
||||
thor (>= 0.20.3, < 2.0)
|
||||
rake (13.0.1)
|
||||
ref (2.0.0)
|
||||
responders (2.3.0)
|
||||
railties (>= 4.2.0, < 5.1)
|
||||
rqrcode (0.10.1)
|
||||
regexp_parser (1.7.0)
|
||||
responders (3.0.0)
|
||||
actionpack (>= 5.0)
|
||||
railties (>= 5.0)
|
||||
rqrcode (1.1.2)
|
||||
chunky_png (~> 1.0)
|
||||
rspec (3.5.0)
|
||||
rspec-core (~> 3.5.0)
|
||||
rspec-expectations (~> 3.5.0)
|
||||
rspec-mocks (~> 3.5.0)
|
||||
rspec-core (3.5.4)
|
||||
rspec-support (~> 3.5.0)
|
||||
rspec-expectations (3.5.0)
|
||||
rqrcode_core (~> 0.1)
|
||||
rqrcode_core (0.1.1)
|
||||
rspec (3.9.0)
|
||||
rspec-core (~> 3.9.0)
|
||||
rspec-expectations (~> 3.9.0)
|
||||
rspec-mocks (~> 3.9.0)
|
||||
rspec-core (3.9.1)
|
||||
rspec-support (~> 3.9.1)
|
||||
rspec-expectations (3.9.0)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.5.0)
|
||||
rspec-its (1.2.0)
|
||||
rspec-support (~> 3.9.0)
|
||||
rspec-its (1.3.0)
|
||||
rspec-core (>= 3.0.0)
|
||||
rspec-expectations (>= 3.0.0)
|
||||
rspec-mocks (3.5.0)
|
||||
rspec-mocks (3.9.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.5.0)
|
||||
rspec-rails (3.5.2)
|
||||
rspec-support (~> 3.9.0)
|
||||
rspec-rails (3.9.0)
|
||||
actionpack (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
railties (>= 3.0)
|
||||
rspec-core (~> 3.5.0)
|
||||
rspec-expectations (~> 3.5.0)
|
||||
rspec-mocks (~> 3.5.0)
|
||||
rspec-support (~> 3.5.0)
|
||||
rspec-support (3.5.0)
|
||||
ruby-progressbar (1.8.1)
|
||||
safe_yaml (1.0.4)
|
||||
sass (3.4.23)
|
||||
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)
|
||||
simplecov (0.14.1)
|
||||
docile (~> 1.1.0)
|
||||
json (>= 1.8, < 3)
|
||||
simplecov-html (~> 0.10.0)
|
||||
simplecov-html (0.10.0)
|
||||
slim (3.0.7)
|
||||
temple (~> 0.7.6)
|
||||
tilt (>= 1.3.3, < 2.1)
|
||||
slim-rails (3.1.2)
|
||||
rspec-core (~> 3.9.0)
|
||||
rspec-expectations (~> 3.9.0)
|
||||
rspec-mocks (~> 3.9.0)
|
||||
rspec-support (~> 3.9.0)
|
||||
rspec-support (3.9.2)
|
||||
ruby-progressbar (1.10.1)
|
||||
safe_yaml (1.0.5)
|
||||
sass (3.4.25)
|
||||
sass-rails (6.0.0)
|
||||
sassc-rails (~> 2.1, >= 2.1.1)
|
||||
sassc (2.2.1)
|
||||
ffi (~> 1.9)
|
||||
sassc-rails (2.1.2)
|
||||
railties (>= 4.0.0)
|
||||
sassc (>= 2.0)
|
||||
sprockets (> 3.0)
|
||||
sprockets-rails
|
||||
tilt
|
||||
simplecov (0.18.4)
|
||||
docile (~> 1.1)
|
||||
simplecov-html (~> 0.11)
|
||||
simplecov-html (0.12.1)
|
||||
slim (4.0.1)
|
||||
temple (>= 0.7.6, < 0.9)
|
||||
tilt (>= 2.0.6, < 2.1)
|
||||
slim-rails (3.2.0)
|
||||
actionpack (>= 3.1)
|
||||
railties (>= 3.1)
|
||||
slim (~> 3.0)
|
||||
slop (3.6.0)
|
||||
spring (2.0.1)
|
||||
activesupport (>= 4.2)
|
||||
slim (>= 3.0, < 5.0)
|
||||
spring (2.1.0)
|
||||
spring-commands-rspec (1.0.4)
|
||||
spring (>= 0.9.1)
|
||||
sprockets (3.7.1)
|
||||
sprockets (4.0.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
rack (> 1, < 3)
|
||||
sprockets-rails (2.3.3)
|
||||
actionpack (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
sprockets (>= 2.8, < 4.0)
|
||||
sshkit (1.13.1)
|
||||
sprockets-rails (3.2.1)
|
||||
actionpack (>= 4.0)
|
||||
activesupport (>= 4.0)
|
||||
sprockets (>= 3.0.0)
|
||||
sshkit (1.20.0)
|
||||
net-scp (>= 1.1.2)
|
||||
net-ssh (>= 2.8.0)
|
||||
sucker_punch (2.0.2)
|
||||
concurrent-ruby (~> 1.0.0)
|
||||
temple (0.7.7)
|
||||
sucker_punch (2.1.2)
|
||||
concurrent-ruby (~> 1.0)
|
||||
temple (0.8.2)
|
||||
terrapin (0.6.0)
|
||||
climate_control (>= 0.0.3, < 1.0)
|
||||
test_squad (0.1.3)
|
||||
rails
|
||||
therubyracer (0.12.3)
|
||||
libv8 (~> 3.16.14.15)
|
||||
ref
|
||||
thor (0.19.4)
|
||||
thor (0.20.3)
|
||||
thread_safe (0.3.6)
|
||||
tilt (2.0.7)
|
||||
timecop (0.8.1)
|
||||
tinymce-rails (4.5.6)
|
||||
tilt (2.0.10)
|
||||
timecop (0.9.1)
|
||||
tinymce-rails (5.2.0)
|
||||
railties (>= 3.1.1)
|
||||
turnip (3.0.0)
|
||||
gherkin (~> 4.0)
|
||||
turnip (4.0.1)
|
||||
gherkin (~> 6.0.17)
|
||||
rspec (>= 3.0, < 4.0)
|
||||
tzinfo (1.2.3)
|
||||
tzinfo (1.2.6)
|
||||
thread_safe (~> 0.1)
|
||||
uglifier (3.2.0)
|
||||
uglifier (4.2.0)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
warden (1.2.7)
|
||||
rack (>= 1.0)
|
||||
webmock (3.0.1)
|
||||
warden (1.2.8)
|
||||
rack (>= 2.0.6)
|
||||
webmock (3.8.2)
|
||||
addressable (>= 2.3.6)
|
||||
crack (>= 0.3.2)
|
||||
hashdiff
|
||||
websocket-driver (0.6.5)
|
||||
hashdiff (>= 0.4.0, < 2.0.0)
|
||||
websocket-driver (0.7.1)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.2)
|
||||
xpath (2.0.0)
|
||||
nokogiri (~> 1.3)
|
||||
yard (0.9.8)
|
||||
websocket-extensions (0.1.4)
|
||||
xpath (3.2.0)
|
||||
nokogiri (~> 1.8)
|
||||
yard (0.9.24)
|
||||
zeitwerk (2.2.2)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
@@ -477,7 +481,6 @@ DEPENDENCIES
|
||||
active_attr
|
||||
active_decorator
|
||||
airbrussh
|
||||
barber (= 0.11.1)
|
||||
bourbon
|
||||
cancancan
|
||||
capistrano
|
||||
@@ -487,16 +490,11 @@ DEPENDENCIES
|
||||
capistrano3-puma
|
||||
capybara-screenshot
|
||||
cmtool!
|
||||
coffee-rails
|
||||
coffee-rails (>= 5.0.0)
|
||||
couch_potato!
|
||||
devise
|
||||
devise-i18n
|
||||
devise_simply_stored!
|
||||
ember-data-source (~> 2.5.3)
|
||||
ember-emblem-template
|
||||
ember-handlebars-template
|
||||
ember-rails
|
||||
ember-source (~> 2.5.1)
|
||||
ember-validations-rails
|
||||
exception_notification
|
||||
factory_girl_rails
|
||||
faye
|
||||
@@ -506,7 +504,7 @@ DEPENDENCIES
|
||||
fuubar
|
||||
iso_country_codes
|
||||
jquery-rails
|
||||
jquery-ui-rails (~> 5.0.5)
|
||||
jquery-ui-rails
|
||||
js-routes
|
||||
jsonapi-serializers!
|
||||
kaminari
|
||||
@@ -522,11 +520,8 @@ DEPENDENCIES
|
||||
pry-doc
|
||||
pry-rails
|
||||
puma
|
||||
quiet_assets
|
||||
rack-cors
|
||||
rails (~> 4.2.6)
|
||||
rails-assets-ember-qunit!
|
||||
rails-assets-qunit!
|
||||
rails (~> 6.0.2)
|
||||
rqrcode
|
||||
rspec-its
|
||||
rspec-rails
|
||||
@@ -545,4 +540,4 @@ DEPENDENCIES
|
||||
webmock
|
||||
|
||||
BUNDLED WITH
|
||||
1.14.6
|
||||
1.17.3
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
Mozo server backend README
|
||||
=====================================
|
||||
|
||||
Application architecture
|
||||
-----------------------------------------------
|
||||
|
||||
|
||||
Server side monit config
|
||||
--------------------------------------------------
|
||||
Could be in `/etc/monit/monitrc`:
|
||||
```
|
||||
# Monit configuration for Puma
|
||||
# Service name: puma_mozo.bar_production
|
||||
#
|
||||
check process puma_mozo.bar_production
|
||||
with pidfile "/var/www/mozo.bar/shared/tmp/pids/puma.pid"
|
||||
group mozo
|
||||
start program = "/usr/bin/sudo -u root /bin/bash -c 'cd /var/www/mozo.bar/current && /usr/local/rvm/bin/rvm default do bundle exec puma -C /var/www/mozo.bar/shared/puma.rb --daemon'"
|
||||
stop program = "/usr/bin/sudo -u root /bin/bash -c 'cd /var/www/mozo.bar/current && /usr/local/rvm/bin/rvm default do bundle exec pumactl -S /var/www/mozo.bar/shared/tmp/pids/puma.state stop'"
|
||||
|
||||
check process DRBcounter with pidfile /var/www/mozo.bar/shared/tmp/pids/DRBcounter.pid
|
||||
group mozo
|
||||
start program = "/bin/bash --login -c '/var/www/mozo.bar/releases/20150123150713/bin/drb_counter.rb start -- production'"
|
||||
stop program = "/bin/bash --login -c '/var/www/mozo.bar/releases/20150123150713/bin/drb_counter.rb stop'"
|
||||
|
||||
check process faye with pidfile /var/www/mozo.bar/shared/tmp/pids/faye.pid
|
||||
group mozo
|
||||
start program = "/bin/bash --login -c 'thin start -d -R /var/www/mozo.bar/releases/20150123150713/faye/config.ru -p 9296 --pid /var/www/mozo.bar/shared/tmp/pids/faye.pid'"
|
||||
stop program = "/bin/bash -c 'kill -15 $(lsof -i:9296 -t); true'"
|
||||
```
|
||||
-261
@@ -1,261 +0,0 @@
|
||||
== Welcome to Rails
|
||||
|
||||
Rails is a web-application framework that includes everything needed to create
|
||||
database-backed web applications according to the Model-View-Control pattern.
|
||||
|
||||
This pattern splits the view (also called the presentation) into "dumb"
|
||||
templates that are primarily responsible for inserting pre-built data in between
|
||||
HTML tags. The model contains the "smart" domain objects (such as Account,
|
||||
Product, Person, Post) that holds all the business logic and knows how to
|
||||
persist themselves to a database. The controller handles the incoming requests
|
||||
(such as Save New Account, Update Product, Show Post) by manipulating the model
|
||||
and directing data to the view.
|
||||
|
||||
In Rails, the model is handled by what's called an object-relational mapping
|
||||
layer entitled Active Record. This layer allows you to present the data from
|
||||
database rows as objects and embellish these data objects with business logic
|
||||
methods. You can read more about Active Record in
|
||||
link:files/vendor/rails/activerecord/README.html.
|
||||
|
||||
The controller and view are handled by the Action Pack, which handles both
|
||||
layers by its two parts: Action View and Action Controller. These two layers
|
||||
are bundled in a single package due to their heavy interdependence. This is
|
||||
unlike the relationship between the Active Record and Action Pack that is much
|
||||
more separate. Each of these packages can be used independently outside of
|
||||
Rails. You can read more about Action Pack in
|
||||
link:files/vendor/rails/actionpack/README.html.
|
||||
|
||||
|
||||
== Getting Started
|
||||
|
||||
1. At the command prompt, create a new Rails application:
|
||||
<tt>rails new myapp</tt> (where <tt>myapp</tt> is the application name)
|
||||
|
||||
2. Change directory to <tt>myapp</tt> and start the web server:
|
||||
<tt>cd myapp; rails server</tt> (run with --help for options)
|
||||
|
||||
3. Go to http://localhost:3000/ and you'll see:
|
||||
"Welcome aboard: You're riding Ruby on Rails!"
|
||||
|
||||
4. Follow the guidelines to start developing your application. You can find
|
||||
the following resources handy:
|
||||
|
||||
* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
|
||||
* Ruby on Rails Tutorial Book: http://www.railstutorial.org/
|
||||
|
||||
|
||||
== Debugging Rails
|
||||
|
||||
Sometimes your application goes wrong. Fortunately there are a lot of tools that
|
||||
will help you debug it and get it back on the rails.
|
||||
|
||||
First area to check is the application log files. Have "tail -f" commands
|
||||
running on the server.log and development.log. Rails will automatically display
|
||||
debugging and runtime information to these files. Debugging info will also be
|
||||
shown in the browser on requests from 127.0.0.1.
|
||||
|
||||
You can also log your own messages directly into the log file from your code
|
||||
using the Ruby logger class from inside your controllers. Example:
|
||||
|
||||
class WeblogController < ActionController::Base
|
||||
def destroy
|
||||
@weblog = Weblog.find(params[:id])
|
||||
@weblog.destroy
|
||||
logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
|
||||
end
|
||||
end
|
||||
|
||||
The result will be a message in your log file along the lines of:
|
||||
|
||||
Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1!
|
||||
|
||||
More information on how to use the logger is at http://www.ruby-doc.org/core/
|
||||
|
||||
Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are
|
||||
several books available online as well:
|
||||
|
||||
* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe)
|
||||
* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
|
||||
|
||||
These two books will bring you up to speed on the Ruby language and also on
|
||||
programming in general.
|
||||
|
||||
|
||||
== Debugger
|
||||
|
||||
Debugger support is available through the debugger command when you start your
|
||||
Mongrel or WEBrick server with --debugger. This means that you can break out of
|
||||
execution at any point in the code, investigate and change the model, and then,
|
||||
resume execution! You need to install ruby-debug to run the server in debugging
|
||||
mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example:
|
||||
|
||||
class WeblogController < ActionController::Base
|
||||
def index
|
||||
@posts = Post.all
|
||||
debugger
|
||||
end
|
||||
end
|
||||
|
||||
So the controller will accept the action, run the first line, then present you
|
||||
with a IRB prompt in the server window. Here you can do things like:
|
||||
|
||||
>> @posts.inspect
|
||||
=> "[#<Post:0x14a6be8
|
||||
@attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>,
|
||||
#<Post:0x14a6620
|
||||
@attributes={"title"=>"Rails", "body"=>"Only ten..", "id"=>"2"}>]"
|
||||
>> @posts.first.title = "hello from a debugger"
|
||||
=> "hello from a debugger"
|
||||
|
||||
...and even better, you can examine how your runtime objects actually work:
|
||||
|
||||
>> f = @posts.first
|
||||
=> #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
|
||||
>> f.
|
||||
Display all 152 possibilities? (y or n)
|
||||
|
||||
Finally, when you're ready to resume execution, you can enter "cont".
|
||||
|
||||
|
||||
== Console
|
||||
|
||||
The console is a Ruby shell, which allows you to interact with your
|
||||
application's domain model. Here you'll have all parts of the application
|
||||
configured, just like it is when the application is running. You can inspect
|
||||
domain models, change values, and save to the database. Starting the script
|
||||
without arguments will launch it in the development environment.
|
||||
|
||||
To start the console, run <tt>rails console</tt> from the application
|
||||
directory.
|
||||
|
||||
Options:
|
||||
|
||||
* Passing the <tt>-s, --sandbox</tt> argument will rollback any modifications
|
||||
made to the database.
|
||||
* Passing an environment name as an argument will load the corresponding
|
||||
environment. Example: <tt>rails console production</tt>.
|
||||
|
||||
To reload your controllers and models after launching the console run
|
||||
<tt>reload!</tt>
|
||||
|
||||
More information about irb can be found at:
|
||||
link:http://www.rubycentral.org/pickaxe/irb.html
|
||||
|
||||
|
||||
== dbconsole
|
||||
|
||||
You can go to the command line of your database directly through <tt>rails
|
||||
dbconsole</tt>. You would be connected to the database with the credentials
|
||||
defined in database.yml. Starting the script without arguments will connect you
|
||||
to the development database. Passing an argument will connect you to a different
|
||||
database, like <tt>rails dbconsole production</tt>. Currently works for MySQL,
|
||||
PostgreSQL and SQLite 3.
|
||||
|
||||
== Description of Contents
|
||||
|
||||
The default directory structure of a generated Ruby on Rails application:
|
||||
|
||||
|-- app
|
||||
| |-- assets
|
||||
| |-- images
|
||||
| |-- javascripts
|
||||
| `-- stylesheets
|
||||
| |-- controllers
|
||||
| |-- helpers
|
||||
| |-- mailers
|
||||
| |-- models
|
||||
| `-- views
|
||||
| `-- layouts
|
||||
|-- config
|
||||
| |-- environments
|
||||
| |-- initializers
|
||||
| `-- locales
|
||||
|-- db
|
||||
|-- doc
|
||||
|-- lib
|
||||
| `-- tasks
|
||||
|-- log
|
||||
|-- public
|
||||
|-- script
|
||||
|-- test
|
||||
| |-- fixtures
|
||||
| |-- functional
|
||||
| |-- integration
|
||||
| |-- performance
|
||||
| `-- unit
|
||||
|-- tmp
|
||||
| |-- cache
|
||||
| |-- pids
|
||||
| |-- sessions
|
||||
| `-- sockets
|
||||
`-- vendor
|
||||
|-- assets
|
||||
`-- stylesheets
|
||||
`-- plugins
|
||||
|
||||
app
|
||||
Holds all the code that's specific to this particular application.
|
||||
|
||||
app/assets
|
||||
Contains subdirectories for images, stylesheets, and JavaScript files.
|
||||
|
||||
app/controllers
|
||||
Holds controllers that should be named like weblogs_controller.rb for
|
||||
automated URL mapping. All controllers should descend from
|
||||
ApplicationController which itself descends from ActionController::Base.
|
||||
|
||||
app/models
|
||||
Holds models that should be named like post.rb. Models descend from
|
||||
ActiveRecord::Base by default.
|
||||
|
||||
app/views
|
||||
Holds the template files for the view that should be named like
|
||||
weblogs/index.html.erb for the WeblogsController#index action. All views use
|
||||
eRuby syntax by default.
|
||||
|
||||
app/views/layouts
|
||||
Holds the template files for layouts to be used with views. This models the
|
||||
common header/footer method of wrapping views. In your views, define a layout
|
||||
using the <tt>layout :default</tt> and create a file named default.html.erb.
|
||||
Inside default.html.erb, call <% yield %> to render the view using this
|
||||
layout.
|
||||
|
||||
app/helpers
|
||||
Holds view helpers that should be named like weblogs_helper.rb. These are
|
||||
generated for you automatically when using generators for controllers.
|
||||
Helpers can be used to wrap functionality for your views into methods.
|
||||
|
||||
config
|
||||
Configuration files for the Rails environment, the routing map, the database,
|
||||
and other dependencies.
|
||||
|
||||
db
|
||||
Contains the database schema in schema.rb. db/migrate contains all the
|
||||
sequence of Migrations for your schema.
|
||||
|
||||
doc
|
||||
This directory is where your application documentation will be stored when
|
||||
generated using <tt>rake doc:app</tt>
|
||||
|
||||
lib
|
||||
Application specific libraries. Basically, any kind of custom code that
|
||||
doesn't belong under controllers, models, or helpers. This directory is in
|
||||
the load path.
|
||||
|
||||
public
|
||||
The directory available for the web server. Also contains the dispatchers and the
|
||||
default HTML files. This should be set as the DOCUMENT_ROOT of your web
|
||||
server.
|
||||
|
||||
script
|
||||
Helper scripts for automation and generation.
|
||||
|
||||
test
|
||||
Unit and functional tests along with fixtures. When using the rails generate
|
||||
command, template test files will be generated for you and placed in this
|
||||
directory.
|
||||
|
||||
vendor
|
||||
External libraries that the application depends on. Also includes the plugins
|
||||
subdirectory. If the app has frozen rails, those gems also go here, under
|
||||
vendor/rails/. This directory is in the load path.
|
||||
@@ -0,0 +1,10 @@
|
||||
//= link_tree ../images
|
||||
//
|
||||
//= link theme1/application.js
|
||||
//= link theme1/application.css
|
||||
//
|
||||
//= link cmtool/application.js
|
||||
//= link cmtool/application.css
|
||||
//
|
||||
//= link supplier/foundation1/application.js
|
||||
//= link supplier/foundation1/application.css
|
||||
@@ -1,7 +1,7 @@
|
||||
//= require modernizr
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require jquery-ui/sortable
|
||||
//= require jquery-ui/widgets/sortable
|
||||
// require ./im
|
||||
// require foundation FOUNDATION 5 JAVASCRIPT IMPLEMENTATIONS AND EMBER ARE NOT COMPATIBLE, FOUNDATION IS TOO SIMPLISTIC AT THE MOMENT AND DESTROYS DOM EVENTS
|
||||
//= require js-routes
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
// spin-rotate is currently used when clicked on a section-element in a section view
|
||||
.spin-rotate
|
||||
+animation(spinRotate 2s)
|
||||
+keyframes(spinRotate)
|
||||
//animation(spinRotate 2s)
|
||||
animation-name: spinRotate
|
||||
animation-duration: 2s
|
||||
@keyframes spinRotate
|
||||
from
|
||||
transform: rotate(0deg)
|
||||
to
|
||||
|
||||
@@ -9,17 +9,19 @@
|
||||
font-weight: bold
|
||||
font-size: 1.4
|
||||
z-index: 8976
|
||||
+animation(flashMessageInactive 0.5s)
|
||||
animation-name: flashMessageInactive
|
||||
animation-duration: 0.5s
|
||||
&.active
|
||||
+animation(flashMessageActive 0.5s)
|
||||
animation-name: flashMessageActive
|
||||
animation-duration: 0.5s
|
||||
right: 20px
|
||||
|
||||
+keyframes(flashMessageActive)
|
||||
@keyframes flashMessageActive
|
||||
from
|
||||
right: -440px
|
||||
to
|
||||
right: 20px
|
||||
+keyframes(flashMessageInactive)
|
||||
@keyframes flashMessageInactive
|
||||
from
|
||||
right: 20px
|
||||
to
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
module Admin
|
||||
class ApplicationController < ::ApplicationController
|
||||
before_action :setup_administrator!
|
||||
load_and_authorize_resource
|
||||
#load_and_authorize_resource
|
||||
layout 'cmtool/application'
|
||||
|
||||
private
|
||||
|
||||
def setup_administrator!
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
module Admin
|
||||
class EmployeesController < Admin::ApplicationController
|
||||
before_filter :set_relation_options, only: [:new, :edit, :create, :update]
|
||||
skip_before_filter :setup_administrator!, only: :test_login
|
||||
skip_authorize_resource only: :test_login
|
||||
skip_before_filter :set_locale, only: :test_login
|
||||
before_action :set_relation_options, only: [:new, :edit, :create, :update]
|
||||
skip_before_action :setup_administrator!, only: :test_login
|
||||
skip_before_action :set_locale, only: :test_login
|
||||
# GET /employees
|
||||
# GET /employees.json
|
||||
def index
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# encoding: UTF-8
|
||||
module Admin
|
||||
module Admin
|
||||
class ListsController < Admin::ApplicationController
|
||||
before_filter :set_relation_options, only: [:new, :edit, :create, :update]
|
||||
before_action :set_relation_options, only: [:new, :edit, :create, :update]
|
||||
# GET /lists
|
||||
# GET /lists.json
|
||||
def index
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# encoding: UTF-8
|
||||
module Admin
|
||||
module Admin
|
||||
class OrdersController < Admin::ApplicationController
|
||||
before_filter :set_relation_options, only: [:new, :edit, :create, :update]
|
||||
before_action :set_relation_options, only: [:new, :edit, :create, :update]
|
||||
# GET /orders
|
||||
# GET /orders.json
|
||||
def index
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# encoding: UTF-8
|
||||
module Admin
|
||||
class ProductCategoriesController < Admin::ApplicationController
|
||||
before_filter :set_relation_options, only: [:new, :edit, :create, :update]
|
||||
before_action :set_relation_options, only: [:new, :edit, :create, :update]
|
||||
# GET /product_categories
|
||||
# GET /product_categories.json
|
||||
def index
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# encoding: UTF-8
|
||||
module Admin
|
||||
class ProductsController < Admin::ApplicationController
|
||||
before_filter :set_relation_options, only: [:new, :edit, :create, :update]
|
||||
before_action :set_relation_options, only: [:new, :edit, :create, :update]
|
||||
# GET /products
|
||||
# GET /products.json
|
||||
def index
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# encoding: UTF-8
|
||||
module Admin
|
||||
class SectionsController < Admin::ApplicationController
|
||||
before_filter :set_relation_options, only: [:new, :edit, :create, :update]
|
||||
before_action :set_relation_options, only: [:new, :edit, :create, :update]
|
||||
# GET /sections
|
||||
# GET /sections.json
|
||||
def index
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module Admin
|
||||
class SuppliersController < Admin::ApplicationController
|
||||
before_filter :set_relation_options, only: [:new, :edit, :create, :update]
|
||||
skip_before_filter :authenticate_administrator!, only: :test_login
|
||||
before_action :set_relation_options, only: [:new, :edit, :create, :update]
|
||||
skip_before_action :setup_administrator!, only: :test_login
|
||||
# GET /suppliers
|
||||
# GET /suppliers.json
|
||||
def index
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# encoding: UTF-8
|
||||
module Admin
|
||||
module Admin
|
||||
class TablesController < Admin::ApplicationController
|
||||
before_filter :set_relation_options, only: [:new, :edit, :create, :update]
|
||||
before_action :set_relation_options, only: [:new, :edit, :create, :update]
|
||||
# GET /tables
|
||||
# GET /tables.json
|
||||
def index
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
module Admin
|
||||
class UsersController < Admin::ApplicationController
|
||||
skip_before_filter :setup_administrator!, only: :test_login
|
||||
skip_authorize_resource only: :test_login
|
||||
skip_before_filter :set_locale, only: :test_login
|
||||
skip_before_action :setup_administrator!, only: :test_login
|
||||
skip_before_action :set_locale, only: :test_login
|
||||
# GET /users
|
||||
# GET /users.json
|
||||
def index
|
||||
|
||||
@@ -16,10 +16,10 @@ class ApplicationController < ActionController::Base
|
||||
private
|
||||
|
||||
def allow_all_origins
|
||||
headers['Access-Control-Allow-Origin'] = '*'
|
||||
headers['Access-Control-Allow-Origin'] = '*'
|
||||
headers['Access-Control-Request-Method'] = '*'
|
||||
headers['Access-Control-Allow-Headers'] = '*'
|
||||
headers['Access-Control-Allow-Methods'] = '*'
|
||||
headers['Access-Control-Allow-Headers'] = '*'
|
||||
headers['Access-Control-Allow-Methods'] = '*'
|
||||
end
|
||||
|
||||
#START CMTOOL
|
||||
@@ -89,9 +89,9 @@ private
|
||||
|
||||
def after_sign_in_path_for(resource)
|
||||
case resource
|
||||
when Employee then supplier_root_path
|
||||
when Administrator then cmtool.root_path
|
||||
else root_path
|
||||
when Employee then supplier_root_path
|
||||
when Administrator then cmtool.root_path
|
||||
else root_path
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
module Suppliers
|
||||
class ApplicationController < ::ApplicationController
|
||||
before_action :setup_employee_and_supplier!
|
||||
load_and_authorize_resource
|
||||
#load_and_authorize_resource
|
||||
if Rails.env.development?
|
||||
skip_before_action :setup_employee_and_supplier!, only: :employee_and_supplier
|
||||
end
|
||||
attr_reader :current_supplier
|
||||
helper_method :current_supplier
|
||||
layout 'supplier/app'
|
||||
@@ -16,6 +19,16 @@ module Suppliers
|
||||
end
|
||||
end
|
||||
|
||||
# GET
|
||||
def employee_and_supplier
|
||||
employee = current_employee || Employee.find_by_email('bterkuile@gmail.com')
|
||||
supplier = current_supplier || employee.suppliers.first
|
||||
render json: {
|
||||
employee: JSONAPI::Serializer.serialize(employee, serializer: Suppliers::EmployeeSerializer),
|
||||
supplier: JSONAPI::Serializer.serialize(supplier, serializer: Suppliers::SupplierSerializer)
|
||||
}
|
||||
end
|
||||
|
||||
def setup_employee_and_supplier!
|
||||
authenticate_employee!
|
||||
find_current_supplier!
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
class Suppliers::SessionsController < Devise::SessionsController
|
||||
respond_to :json
|
||||
|
||||
def destroy
|
||||
session[:supplier_id] = nil
|
||||
|
||||
+35
-1
@@ -23,9 +23,11 @@ class Employee
|
||||
property :unconfirmed_email
|
||||
|
||||
property :name
|
||||
property :authentication_token
|
||||
#property :email
|
||||
|
||||
has_many :employee_shifts, dependent: :destroy
|
||||
view :by_authentication_token, key: :authentication_token
|
||||
view :by_email, key: :email
|
||||
|
||||
class << self
|
||||
@@ -57,9 +59,41 @@ class Employee
|
||||
#settings.persist!
|
||||
#orig_save(*args)
|
||||
#end
|
||||
before_save { settings.persist! }
|
||||
before_save do
|
||||
ensure_authentication_token
|
||||
settings.persist!
|
||||
end
|
||||
|
||||
def settings
|
||||
@settings || SupplierEmployeesSettings.new(Supplier.new).for_employee(self)
|
||||
end
|
||||
|
||||
#####################################
|
||||
# Taken from devise 2.2
|
||||
#####################################
|
||||
|
||||
# Generate new authentication token (a.k.a. "single access token").
|
||||
def reset_authentication_token
|
||||
self.authentication_token = self.class.authentication_token
|
||||
end
|
||||
|
||||
# Generate new authentication token and save the record.
|
||||
def reset_authentication_token!
|
||||
reset_authentication_token
|
||||
save(:validate => false)
|
||||
end
|
||||
|
||||
# Generate authentication token unless already exists.
|
||||
def ensure_authentication_token
|
||||
reset_authentication_token if authentication_token.blank?
|
||||
end
|
||||
|
||||
# Generate authentication token unless already exists and save the record.
|
||||
def ensure_authentication_token!
|
||||
reset_authentication_token! if authentication_token.blank?
|
||||
end
|
||||
|
||||
def self.authentication_token
|
||||
SecureRandom.hex(24)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -8,8 +8,8 @@ class NewSupplier
|
||||
attribute :password
|
||||
attribute :password_confirmation
|
||||
|
||||
without_current_employee = { unless: 'current_employee.present?' }
|
||||
without_employee = { unless: 'employee.present?' }
|
||||
without_current_employee = { unless: -> { current_employee.present? } }
|
||||
without_employee = { unless: -> { employee.present? } }
|
||||
validates :supplier_name, presence: true
|
||||
validates :email, email: without_current_employee
|
||||
validates :password, presence: without_current_employee, confirmation: without_employee
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
||||
load Gem.bin_path('bundler', 'bundle')
|
||||
+155
-1
@@ -16,6 +16,160 @@ require File.expand_path('./../../lib/couchbase-setting', __FILE__)
|
||||
Bundler.require(*Rails.groups(assets: %w(development test user_app)))
|
||||
Bundler.require(:assets) if ENV['DEPLOY']=='yes'
|
||||
|
||||
# Bug in actionview error handling, remove for versions > 6.0.2.1
|
||||
module ActionView
|
||||
# = Action View Errors
|
||||
class ActionViewError < StandardError #:nodoc:
|
||||
end
|
||||
|
||||
class EncodingError < StandardError #:nodoc:
|
||||
end
|
||||
|
||||
class WrongEncodingError < EncodingError #:nodoc:
|
||||
def initialize(string, encoding)
|
||||
@string, @encoding = string, encoding
|
||||
end
|
||||
|
||||
def message
|
||||
@string.force_encoding(Encoding::ASCII_8BIT)
|
||||
"Your template was not saved as valid #{@encoding}. Please " \
|
||||
"either specify #{@encoding} as the encoding for your template " \
|
||||
"in your text editor, or mark the template with its " \
|
||||
"encoding by inserting the following as the first line " \
|
||||
"of the template:\n\n# encoding: <name of correct encoding>.\n\n" \
|
||||
"The source of your template was:\n\n#{@string}"
|
||||
end
|
||||
end
|
||||
|
||||
class MissingTemplate < ActionViewError #:nodoc:
|
||||
attr_reader :path
|
||||
|
||||
def initialize(paths, path, prefixes, partial, details, *)
|
||||
@path = path
|
||||
prefixes = Array(prefixes)
|
||||
template_type = if partial
|
||||
"partial"
|
||||
elsif /layouts/i.match?(path)
|
||||
"layout"
|
||||
else
|
||||
"template"
|
||||
end
|
||||
|
||||
if partial && path.present?
|
||||
path = path.sub(%r{([^/]+)$}, "_\\1")
|
||||
end
|
||||
searched_paths = prefixes.map { |prefix| [prefix, path].join("/") }
|
||||
|
||||
out = "Missing #{template_type} #{searched_paths.join(", ")} with #{details.inspect}. Searched in:\n"
|
||||
out += paths.compact.map { |p| " * #{p.to_s.inspect}\n" }.join
|
||||
super out
|
||||
end
|
||||
end
|
||||
|
||||
class Template
|
||||
# The Template::Error exception is raised when the compilation or rendering of the template
|
||||
# fails. This exception then gathers a bunch of intimate details and uses it to report a
|
||||
# precise exception message.
|
||||
class Error < ActionViewError #:nodoc:
|
||||
SOURCE_CODE_RADIUS = 3
|
||||
|
||||
# Override to prevent #cause resetting during re-raise.
|
||||
attr_reader :cause
|
||||
|
||||
def initialize(template)
|
||||
super($!.message)
|
||||
set_backtrace($!.backtrace)
|
||||
@cause = $!
|
||||
@template, @sub_templates = template, nil
|
||||
end
|
||||
|
||||
def file_name
|
||||
@template.identifier
|
||||
end
|
||||
|
||||
def sub_template_message
|
||||
if @sub_templates
|
||||
"Trace of template inclusion: " +
|
||||
@sub_templates.collect(&:inspect).join(", ")
|
||||
else
|
||||
""
|
||||
end
|
||||
end
|
||||
|
||||
def source_extract(indentation = 0)
|
||||
return [] unless num = line_number
|
||||
num = num.to_i
|
||||
|
||||
source_code = @template.source.split("\n")
|
||||
|
||||
start_on_line = [ num - SOURCE_CODE_RADIUS - 1, 0 ].max
|
||||
end_on_line = [ num + SOURCE_CODE_RADIUS - 1, source_code.length].min
|
||||
|
||||
indent = end_on_line.to_s.size + indentation
|
||||
return [] unless source_code = source_code[start_on_line..end_on_line]
|
||||
|
||||
formatted_code_for(source_code, start_on_line, indent)
|
||||
end
|
||||
|
||||
def sub_template_of(template_path)
|
||||
@sub_templates ||= []
|
||||
@sub_templates << template_path
|
||||
end
|
||||
|
||||
def line_number
|
||||
@line_number ||=
|
||||
if file_name
|
||||
regexp = /#{Regexp.escape File.basename(file_name)}:(\d+)/
|
||||
$1 if message =~ regexp || backtrace.find { |line| line =~ regexp }
|
||||
end
|
||||
end
|
||||
|
||||
def annotated_source_code
|
||||
source_extract(4)
|
||||
end
|
||||
|
||||
private
|
||||
def source_location
|
||||
if line_number
|
||||
"on line ##{line_number} of "
|
||||
else
|
||||
"in "
|
||||
end + file_name
|
||||
end
|
||||
|
||||
def formatted_code_for(source_code, line_counter, indent)
|
||||
indent_template = "%#{indent}s: %s"
|
||||
source_code.map do |line|
|
||||
line_counter += 1
|
||||
indent_template % [line_counter, line]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
TemplateError = Template::Error
|
||||
|
||||
class SyntaxErrorInTemplate < TemplateError #:nodoc
|
||||
def initialize(template, offending_code_string)
|
||||
@offending_code_string = offending_code_string
|
||||
super(template)
|
||||
end
|
||||
|
||||
def message
|
||||
<<~MESSAGE
|
||||
Encountered a syntax error while rendering template: check #{@offending_code_string}
|
||||
MESSAGE
|
||||
end
|
||||
|
||||
def annotated_source_code
|
||||
@offending_code_string.split("\n").map.with_index(1) { |line, index|
|
||||
indentation = " " * 4
|
||||
"#{index}:#{indentation}#{line}"
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
require 'simply_stored'
|
||||
module SimplyStored
|
||||
module Couch
|
||||
@@ -133,7 +287,7 @@ module Qwaiter
|
||||
end
|
||||
end
|
||||
|
||||
config.middleware.insert_before 0, "Rack::Cors" do
|
||||
config.middleware.insert_before 0, Rack::Cors do
|
||||
allow do
|
||||
origins '*'
|
||||
#resource '/user/*', :headers => '*', :methods => '*' #[:get, :post, :options]
|
||||
|
||||
@@ -14,7 +14,7 @@ Qwaiter::Application.configure do
|
||||
config.action_controller.perform_caching = false
|
||||
config.action_controller.action_on_unpermitted_parameters = :log
|
||||
|
||||
config.ember.variant = :development
|
||||
#config.ember.variant = :development
|
||||
|
||||
config.action_controller.asset_host = "http://#{ENV['MOZO_LOCAL_IP'] || 'localhost'}:3000"
|
||||
# config.web_console.automount = true
|
||||
@@ -42,7 +42,9 @@ Qwaiter::Application.configure do
|
||||
|
||||
# Do not compress assets
|
||||
config.assets.compress = false
|
||||
config.assets.logger = Logger.new('/dev/null')
|
||||
#config.assets.logger = Logger.new('/dev/null')
|
||||
#config.logger = Logger.new(STDOUT)
|
||||
#config.assets.logger = Logger.new(STDOUT)
|
||||
|
||||
# Expands the lines which load the assets
|
||||
config.assets.debug = true
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# Use this hook to configure devise mailer, warden hooks and so forth.
|
||||
# Many of these configuration options can be set straight in your model.
|
||||
module Qwaiter
|
||||
class FailureApp < Devise::FailureApp
|
||||
def respond
|
||||
if request.format.json?
|
||||
json_api_error_response
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
def json_api_error_response
|
||||
self.status = 401
|
||||
self.content_type = 'application/json'
|
||||
self.response_body = { errors: [{ status: '401', title: i18n_message }]}.to_json
|
||||
end
|
||||
end
|
||||
end
|
||||
Devise.setup do |config|
|
||||
# The secret key used by Devise. Devise uses this key to generate
|
||||
# random tokens. Changing this key will render invalid all existing
|
||||
@@ -250,10 +264,11 @@ Devise.setup do |config|
|
||||
# If you want to use other strategies, that are not supported by Devise, or
|
||||
# change the failure app, you can configure them inside the config.warden block.
|
||||
#
|
||||
# config.warden do |manager|
|
||||
config.warden do |manager|
|
||||
manager.failure_app = Qwaiter::FailureApp
|
||||
# manager.intercept_401 = false
|
||||
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
|
||||
# end
|
||||
end
|
||||
|
||||
# ==> Mountable engine configurations
|
||||
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
module MustacheTemplateHandler
|
||||
def self.call(template)
|
||||
def self.call(template, source)
|
||||
binding.pry
|
||||
if template.locals.include? :locals
|
||||
"Mustache.render(#{template.source.inspect}, locals).html_safe"
|
||||
else
|
||||
|
||||
@@ -124,6 +124,7 @@ Qwaiter::Application.routes.draw do
|
||||
end
|
||||
|
||||
namespace :suppliers, path: '/supplier' do
|
||||
get 'employee_and_supplier', controller: 'application'
|
||||
resources :suppliers do
|
||||
member do
|
||||
get :switch_to
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env ruby
|
||||
# Make drb server
|
||||
require 'rubygems'
|
||||
require 'drb'
|
||||
require 'drb/drb'
|
||||
#require 'pry'
|
||||
#require File.expand_path('../lib/in_memory_q_counter', File.dirname(__FILE__))
|
||||
# This is a non thread safe replacement for the
|
||||
|
||||
@@ -6,14 +6,14 @@ require 'rqrcode-rails3/renderers/svg.rb'
|
||||
module RQRCode
|
||||
Mime::Type.register "image/svg+xml", :svg unless Mime::Type.lookup_by_extension(:svg)
|
||||
Mime::Type.register "image/png", :png unless Mime::Type.lookup_by_extension(:png)
|
||||
|
||||
|
||||
extend SizeCalculator
|
||||
|
||||
|
||||
ActionController::Renderers.add :qrcode do |string, options|
|
||||
format = self.request.format.symbol
|
||||
size = options[:size] || RQRCode.minimum_qr_size_from_string(string)
|
||||
level = options[:level] || :h
|
||||
|
||||
|
||||
qrcode = RQRCode::QRCode.new(string, :size => size, :level => level)
|
||||
svg = RQRCode::Renderers::SVG::render(qrcode, options)
|
||||
|
||||
@@ -25,7 +25,7 @@ module RQRCode
|
||||
else
|
||||
svg
|
||||
end
|
||||
|
||||
|
||||
self.response_body = render_to_string(:text => data, :template => nil)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#= require supplier/foundation1/application
|
||||
#= require supplier/app/application
|
||||
#= require require
|
||||
#= require qunit
|
||||
#= require qunit/qunit-close-enough
|
||||
#= require ember-qunit/ember-qunit
|
||||
#= require_self
|
||||
#= require_tree ./components
|
||||
#= require_tree ./models
|
||||
#= require_tree ./routes
|
||||
#= require_tree ./unit
|
||||
#= require_tree ./views
|
||||
# require supplier/foundation1/application
|
||||
# require supplier/app/application
|
||||
# require require
|
||||
# require qunit
|
||||
# require qunit/qunit-close-enough
|
||||
# require ember-qunit/ember-qunit
|
||||
# require_self
|
||||
# require_tree ./components
|
||||
# require_tree ./models
|
||||
# require_tree ./routes
|
||||
# require_tree ./unit
|
||||
# require_tree ./views
|
||||
|
||||
# Set the application.
|
||||
#App = App;
|
||||
|
||||
Reference in New Issue
Block a user