start vue conversion
This commit is contained in:
parent
dea393d514
commit
1c4fbe15de
18
.babelrc
Normal file
18
.babelrc
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"presets": [
|
||||||
|
["env", {
|
||||||
|
"modules": false,
|
||||||
|
"targets": {
|
||||||
|
"browsers": "> 1%",
|
||||||
|
"uglify": true
|
||||||
|
},
|
||||||
|
"useBuiltIns": true
|
||||||
|
}]
|
||||||
|
],
|
||||||
|
|
||||||
|
"plugins": [
|
||||||
|
"syntax-dynamic-import",
|
||||||
|
"transform-object-rest-spread",
|
||||||
|
["transform-class-properties", { "spec": true }]
|
||||||
|
]
|
||||||
|
}
|
||||||
5
.gitignore
vendored
5
.gitignore
vendored
@ -22,3 +22,8 @@
|
|||||||
/public/assets
|
/public/assets
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
/public/packs
|
||||||
|
/public/packs-test
|
||||||
|
/node_modules
|
||||||
|
yarn-debug.log*
|
||||||
|
.yarn-integrity
|
||||||
|
|||||||
3
.postcssrc.yml
Normal file
3
.postcssrc.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
plugins:
|
||||||
|
postcss-import: {}
|
||||||
|
postcss-cssnext: {}
|
||||||
@ -1 +1 @@
|
|||||||
2.4.3
|
2.5.1
|
||||||
@ -1,4 +1,4 @@
|
|||||||
FROM phusion/passenger-ruby24:latest
|
FROM phusion/passenger-ruby25:latest
|
||||||
|
|
||||||
# Use baseimage-docker's init process.
|
# Use baseimage-docker's init process.
|
||||||
CMD ["/sbin/my_init"]
|
CMD ["/sbin/my_init"]
|
||||||
|
|||||||
28
Gemfile
28
Gemfile
@ -1,23 +1,25 @@
|
|||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
gem 'rails', '5.0.6'
|
gem 'rails', '5.2.0.rc2'
|
||||||
gem 'sqlite3'
|
gem 'sqlite3'
|
||||||
gem 'pg', '~> 0.21.0'
|
gem 'pg', '~> 0.21.0'
|
||||||
gem 'sass-rails', '~> 5.0'
|
# gem 'sass-rails', '~> 5.0'
|
||||||
gem 'uglifier', '>= 1.3.0'
|
# gem 'uglifier', '>= 1.3.0'
|
||||||
|
|
||||||
gem 'puma'
|
gem 'puma', '~> 3.11'
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
gem 'webpacker', '3.4.1'
|
||||||
|
gem 'bootsnap', '>= 1.1.0', require: false
|
||||||
# Use jquery as the JavaScript library
|
# Use jquery as the JavaScript library
|
||||||
gem 'jquery-rails', '~> 4.3.1'
|
# gem 'jquery-rails', '~> 4.3.1'
|
||||||
gem 'bootstrap-sass', '~> 3.3.7'
|
# gem 'bootstrap-sass', '~> 3.3.7'
|
||||||
gem 'kaminari', '~> 1.1.1'
|
# gem 'kaminari', '~> 1.1.1'
|
||||||
gem 'turbolinks', '~> 5.1.0'
|
# gem 'turbolinks', '~> 5.1.0'
|
||||||
gem 'jbuilder', '~> 2.7'
|
gem 'jbuilder', '~> 2.7'
|
||||||
gem 'cocoon', '~> 1.2.9'
|
# gem 'cocoon', '~> 1.2.9'
|
||||||
gem 'unitwise', '~> 2.2.0'
|
gem 'unitwise', '~> 2.2.0'
|
||||||
gem 'redcarpet', '~> 3.4.0'
|
gem 'redcarpet', '~> 3.4.0'
|
||||||
|
|
||||||
@ -30,9 +32,9 @@ group :development, :test do
|
|||||||
|
|
||||||
gem 'guard', '~> 2.14.0'
|
gem 'guard', '~> 2.14.0'
|
||||||
gem 'guard-rspec', require: false
|
gem 'guard-rspec', require: false
|
||||||
gem 'rspec-rails', '~> 3.5.0'
|
gem 'rspec-rails', '~> 3.7.2'
|
||||||
gem 'rails-controller-testing'
|
gem 'rails-controller-testing'
|
||||||
gem 'factory_girl_rails', '~> 4.8.0'
|
gem 'factory_bot_rails', '~> 4.8.2'
|
||||||
gem 'database_cleaner', '~> 1.5.3'
|
gem 'database_cleaner', '~> 1.6.2'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
220
Gemfile.lock
220
Gemfile.lock
@ -1,63 +1,62 @@
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actioncable (5.0.6)
|
actioncable (5.2.0.rc2)
|
||||||
actionpack (= 5.0.6)
|
actionpack (= 5.2.0.rc2)
|
||||||
nio4r (>= 1.2, < 3.0)
|
nio4r (~> 2.0)
|
||||||
websocket-driver (~> 0.6.1)
|
websocket-driver (>= 0.6.1)
|
||||||
actionmailer (5.0.6)
|
actionmailer (5.2.0.rc2)
|
||||||
actionpack (= 5.0.6)
|
actionpack (= 5.2.0.rc2)
|
||||||
actionview (= 5.0.6)
|
actionview (= 5.2.0.rc2)
|
||||||
activejob (= 5.0.6)
|
activejob (= 5.2.0.rc2)
|
||||||
mail (~> 2.5, >= 2.5.4)
|
mail (~> 2.5, >= 2.5.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
actionpack (5.0.6)
|
actionpack (5.2.0.rc2)
|
||||||
actionview (= 5.0.6)
|
actionview (= 5.2.0.rc2)
|
||||||
activesupport (= 5.0.6)
|
activesupport (= 5.2.0.rc2)
|
||||||
rack (~> 2.0)
|
rack (~> 2.0)
|
||||||
rack-test (~> 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
||||||
actionview (5.0.6)
|
actionview (5.2.0.rc2)
|
||||||
activesupport (= 5.0.6)
|
activesupport (= 5.2.0.rc2)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubis (~> 2.7.0)
|
erubi (~> 1.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
||||||
activejob (5.0.6)
|
activejob (5.2.0.rc2)
|
||||||
activesupport (= 5.0.6)
|
activesupport (= 5.2.0.rc2)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (5.0.6)
|
activemodel (5.2.0.rc2)
|
||||||
activesupport (= 5.0.6)
|
activesupport (= 5.2.0.rc2)
|
||||||
activerecord (5.0.6)
|
activerecord (5.2.0.rc2)
|
||||||
activemodel (= 5.0.6)
|
activemodel (= 5.2.0.rc2)
|
||||||
activesupport (= 5.0.6)
|
activesupport (= 5.2.0.rc2)
|
||||||
arel (~> 7.0)
|
arel (>= 9.0)
|
||||||
activesupport (5.0.6)
|
activestorage (5.2.0.rc2)
|
||||||
|
actionpack (= 5.2.0.rc2)
|
||||||
|
activerecord (= 5.2.0.rc2)
|
||||||
|
marcel (~> 0.3.1)
|
||||||
|
activesupport (5.2.0.rc2)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (~> 0.7)
|
i18n (>= 0.7, < 2)
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
arel (7.1.4)
|
arel (9.0.0)
|
||||||
autoprefixer-rails (8.1.0.1)
|
|
||||||
execjs
|
|
||||||
bcrypt (3.1.11)
|
bcrypt (3.1.11)
|
||||||
bootstrap-sass (3.3.7)
|
bootsnap (1.2.1)
|
||||||
autoprefixer-rails (>= 5.2.1)
|
msgpack (~> 1.0)
|
||||||
sass (>= 3.3.4)
|
|
||||||
builder (3.2.3)
|
builder (3.2.3)
|
||||||
cocoon (1.2.11)
|
|
||||||
coderay (1.1.2)
|
coderay (1.1.2)
|
||||||
concurrent-ruby (1.0.5)
|
concurrent-ruby (1.0.5)
|
||||||
crass (1.0.3)
|
crass (1.0.3)
|
||||||
database_cleaner (1.5.3)
|
database_cleaner (1.6.2)
|
||||||
diff-lcs (1.3)
|
diff-lcs (1.3)
|
||||||
erubis (2.7.0)
|
erubi (1.7.1)
|
||||||
execjs (2.7.0)
|
factory_bot (4.8.2)
|
||||||
factory_girl (4.8.1)
|
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
factory_girl_rails (4.8.0)
|
factory_bot_rails (4.8.2)
|
||||||
factory_girl (~> 4.8.0)
|
factory_bot (~> 4.8.2)
|
||||||
railties (>= 3.0.0)
|
railties (>= 3.0.0)
|
||||||
ffi (1.9.23)
|
ffi (1.9.23)
|
||||||
formatador (0.2.5)
|
formatador (0.2.5)
|
||||||
@ -77,45 +76,32 @@ GEM
|
|||||||
guard (~> 2.1)
|
guard (~> 2.1)
|
||||||
guard-compat (~> 1.1)
|
guard-compat (~> 1.1)
|
||||||
rspec (>= 2.99.0, < 4.0)
|
rspec (>= 2.99.0, < 4.0)
|
||||||
i18n (0.9.5)
|
i18n (1.0.0)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
jbuilder (2.7.0)
|
jbuilder (2.7.0)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
multi_json (>= 1.2)
|
multi_json (>= 1.2)
|
||||||
jquery-rails (4.3.1)
|
|
||||||
rails-dom-testing (>= 1, < 3)
|
|
||||||
railties (>= 4.2.0)
|
|
||||||
thor (>= 0.14, < 2.0)
|
|
||||||
kaminari (1.1.1)
|
|
||||||
activesupport (>= 4.1.0)
|
|
||||||
kaminari-actionview (= 1.1.1)
|
|
||||||
kaminari-activerecord (= 1.1.1)
|
|
||||||
kaminari-core (= 1.1.1)
|
|
||||||
kaminari-actionview (1.1.1)
|
|
||||||
actionview
|
|
||||||
kaminari-core (= 1.1.1)
|
|
||||||
kaminari-activerecord (1.1.1)
|
|
||||||
activerecord
|
|
||||||
kaminari-core (= 1.1.1)
|
|
||||||
kaminari-core (1.1.1)
|
|
||||||
libv8 (3.16.14.19)
|
|
||||||
liner (0.2.4)
|
liner (0.2.4)
|
||||||
listen (3.1.5)
|
listen (3.1.5)
|
||||||
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)
|
||||||
ruby_dep (~> 1.2)
|
ruby_dep (~> 1.2)
|
||||||
loofah (2.2.1)
|
loofah (2.2.2)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
lumberjack (1.0.12)
|
lumberjack (1.0.12)
|
||||||
mail (2.7.0)
|
mail (2.7.0)
|
||||||
mini_mime (>= 0.1.1)
|
mini_mime (>= 0.1.1)
|
||||||
|
marcel (0.3.2)
|
||||||
|
mimemagic (~> 0.3.2)
|
||||||
memoizable (0.4.2)
|
memoizable (0.4.2)
|
||||||
thread_safe (~> 0.3, >= 0.3.1)
|
thread_safe (~> 0.3, >= 0.3.1)
|
||||||
method_source (0.9.0)
|
method_source (0.9.0)
|
||||||
|
mimemagic (0.3.2)
|
||||||
mini_mime (1.0.0)
|
mini_mime (1.0.0)
|
||||||
mini_portile2 (2.3.0)
|
mini_portile2 (2.3.0)
|
||||||
minitest (5.11.3)
|
minitest (5.11.3)
|
||||||
|
msgpack (1.2.4)
|
||||||
multi_json (1.13.1)
|
multi_json (1.13.1)
|
||||||
nenv (0.3.0)
|
nenv (0.3.0)
|
||||||
nio4r (2.3.0)
|
nio4r (2.3.0)
|
||||||
@ -131,19 +117,22 @@ GEM
|
|||||||
method_source (~> 0.9.0)
|
method_source (~> 0.9.0)
|
||||||
puma (3.11.3)
|
puma (3.11.3)
|
||||||
rack (2.0.4)
|
rack (2.0.4)
|
||||||
rack-test (0.6.3)
|
rack-proxy (0.6.4)
|
||||||
rack (>= 1.0)
|
rack
|
||||||
rails (5.0.6)
|
rack-test (1.0.0)
|
||||||
actioncable (= 5.0.6)
|
rack (>= 1.0, < 3)
|
||||||
actionmailer (= 5.0.6)
|
rails (5.2.0.rc2)
|
||||||
actionpack (= 5.0.6)
|
actioncable (= 5.2.0.rc2)
|
||||||
actionview (= 5.0.6)
|
actionmailer (= 5.2.0.rc2)
|
||||||
activejob (= 5.0.6)
|
actionpack (= 5.2.0.rc2)
|
||||||
activemodel (= 5.0.6)
|
actionview (= 5.2.0.rc2)
|
||||||
activerecord (= 5.0.6)
|
activejob (= 5.2.0.rc2)
|
||||||
activesupport (= 5.0.6)
|
activemodel (= 5.2.0.rc2)
|
||||||
|
activerecord (= 5.2.0.rc2)
|
||||||
|
activestorage (= 5.2.0.rc2)
|
||||||
|
activesupport (= 5.2.0.rc2)
|
||||||
bundler (>= 1.3.0)
|
bundler (>= 1.3.0)
|
||||||
railties (= 5.0.6)
|
railties (= 5.2.0.rc2)
|
||||||
sprockets-rails (>= 2.0.0)
|
sprockets-rails (>= 2.0.0)
|
||||||
rails-controller-testing (1.0.2)
|
rails-controller-testing (1.0.2)
|
||||||
actionpack (~> 5.x, >= 5.0.1)
|
actionpack (~> 5.x, >= 5.0.1)
|
||||||
@ -152,53 +141,41 @@ GEM
|
|||||||
rails-dom-testing (2.0.3)
|
rails-dom-testing (2.0.3)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
nokogiri (>= 1.6)
|
nokogiri (>= 1.6)
|
||||||
rails-html-sanitizer (1.0.3)
|
rails-html-sanitizer (1.0.4)
|
||||||
loofah (~> 2.0)
|
loofah (~> 2.2, >= 2.2.2)
|
||||||
railties (5.0.6)
|
railties (5.2.0.rc2)
|
||||||
actionpack (= 5.0.6)
|
actionpack (= 5.2.0.rc2)
|
||||||
activesupport (= 5.0.6)
|
activesupport (= 5.2.0.rc2)
|
||||||
method_source
|
method_source
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (>= 0.18.1, < 2.0)
|
thor (>= 0.18.1, < 2.0)
|
||||||
rake (12.3.0)
|
rake (12.3.1)
|
||||||
rb-fsevent (0.10.3)
|
rb-fsevent (0.10.3)
|
||||||
rb-inotify (0.9.10)
|
rb-inotify (0.9.10)
|
||||||
ffi (>= 0.5.0, < 2)
|
ffi (>= 0.5.0, < 2)
|
||||||
redcarpet (3.4.0)
|
redcarpet (3.4.0)
|
||||||
ref (2.0.0)
|
rspec (3.7.0)
|
||||||
rspec (3.5.0)
|
rspec-core (~> 3.7.0)
|
||||||
rspec-core (~> 3.5.0)
|
rspec-expectations (~> 3.7.0)
|
||||||
rspec-expectations (~> 3.5.0)
|
rspec-mocks (~> 3.7.0)
|
||||||
rspec-mocks (~> 3.5.0)
|
rspec-core (3.7.1)
|
||||||
rspec-core (3.5.4)
|
rspec-support (~> 3.7.0)
|
||||||
rspec-support (~> 3.5.0)
|
rspec-expectations (3.7.0)
|
||||||
rspec-expectations (3.5.0)
|
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.5.0)
|
rspec-support (~> 3.7.0)
|
||||||
rspec-mocks (3.5.0)
|
rspec-mocks (3.7.0)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.5.0)
|
rspec-support (~> 3.7.0)
|
||||||
rspec-rails (3.5.2)
|
rspec-rails (3.7.2)
|
||||||
actionpack (>= 3.0)
|
actionpack (>= 3.0)
|
||||||
activesupport (>= 3.0)
|
activesupport (>= 3.0)
|
||||||
railties (>= 3.0)
|
railties (>= 3.0)
|
||||||
rspec-core (~> 3.5.0)
|
rspec-core (~> 3.7.0)
|
||||||
rspec-expectations (~> 3.5.0)
|
rspec-expectations (~> 3.7.0)
|
||||||
rspec-mocks (~> 3.5.0)
|
rspec-mocks (~> 3.7.0)
|
||||||
rspec-support (~> 3.5.0)
|
rspec-support (~> 3.7.0)
|
||||||
rspec-support (3.5.0)
|
rspec-support (3.7.1)
|
||||||
ruby_dep (1.5.0)
|
ruby_dep (1.5.0)
|
||||||
sass (3.5.5)
|
|
||||||
sass-listen (~> 4.0.0)
|
|
||||||
sass-listen (4.0.0)
|
|
||||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
|
||||||
rb-inotify (~> 0.9, >= 0.9.7)
|
|
||||||
sass-rails (5.0.7)
|
|
||||||
railties (>= 4.0.0, < 6)
|
|
||||||
sass (~> 3.1)
|
|
||||||
sprockets (>= 2.8, < 4.0)
|
|
||||||
sprockets-rails (>= 2.0, < 4.0)
|
|
||||||
tilt (>= 1.1, < 3)
|
|
||||||
shellany (0.0.1)
|
shellany (0.0.1)
|
||||||
signed_multiset (0.2.1)
|
signed_multiset (0.2.1)
|
||||||
sprockets (3.7.1)
|
sprockets (3.7.1)
|
||||||
@ -209,27 +186,22 @@ GEM
|
|||||||
activesupport (>= 4.0)
|
activesupport (>= 4.0)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
sqlite3 (1.3.13)
|
sqlite3 (1.3.13)
|
||||||
therubyracer (0.12.3)
|
|
||||||
libv8 (~> 3.16.14.15)
|
|
||||||
ref
|
|
||||||
thor (0.20.0)
|
thor (0.20.0)
|
||||||
thread_safe (0.3.6)
|
thread_safe (0.3.6)
|
||||||
tilt (2.0.8)
|
|
||||||
turbolinks (5.1.0)
|
|
||||||
turbolinks-source (~> 5.1)
|
|
||||||
turbolinks-source (5.1.0)
|
|
||||||
tzinfo (1.2.5)
|
tzinfo (1.2.5)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
tzinfo-data (1.2018.3)
|
tzinfo-data (1.2018.4)
|
||||||
tzinfo (>= 1.0.0)
|
tzinfo (>= 1.0.0)
|
||||||
uglifier (4.1.8)
|
|
||||||
execjs (>= 0.3.0, < 3)
|
|
||||||
unitwise (2.2.0)
|
unitwise (2.2.0)
|
||||||
liner (~> 0.2)
|
liner (~> 0.2)
|
||||||
memoizable (~> 0.4)
|
memoizable (~> 0.4)
|
||||||
parslet (~> 1.5)
|
parslet (~> 1.5)
|
||||||
signed_multiset (~> 0.2)
|
signed_multiset (~> 0.2)
|
||||||
websocket-driver (0.6.5)
|
webpacker (3.4.1)
|
||||||
|
activesupport (>= 4.2)
|
||||||
|
rack-proxy (>= 0.6.1)
|
||||||
|
railties (>= 4.2)
|
||||||
|
websocket-driver (0.7.0)
|
||||||
websocket-extensions (>= 0.1.0)
|
websocket-extensions (>= 0.1.0)
|
||||||
websocket-extensions (0.1.3)
|
websocket-extensions (0.1.3)
|
||||||
|
|
||||||
@ -238,28 +210,22 @@ PLATFORMS
|
|||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
bcrypt (~> 3.1.11)
|
bcrypt (~> 3.1.11)
|
||||||
bootstrap-sass (~> 3.3.7)
|
bootsnap (>= 1.1.0)
|
||||||
cocoon (~> 1.2.9)
|
database_cleaner (~> 1.6.2)
|
||||||
database_cleaner (~> 1.5.3)
|
factory_bot_rails (~> 4.8.2)
|
||||||
factory_girl_rails (~> 4.8.0)
|
|
||||||
guard (~> 2.14.0)
|
guard (~> 2.14.0)
|
||||||
guard-rspec
|
guard-rspec
|
||||||
jbuilder (~> 2.7)
|
jbuilder (~> 2.7)
|
||||||
jquery-rails (~> 4.3.1)
|
|
||||||
kaminari (~> 1.1.1)
|
|
||||||
pg (~> 0.21.0)
|
pg (~> 0.21.0)
|
||||||
puma
|
puma (~> 3.11)
|
||||||
rails (= 5.0.6)
|
rails (= 5.2.0.rc2)
|
||||||
rails-controller-testing
|
rails-controller-testing
|
||||||
redcarpet (~> 3.4.0)
|
redcarpet (~> 3.4.0)
|
||||||
rspec-rails (~> 3.5.0)
|
rspec-rails (~> 3.7.2)
|
||||||
sass-rails (~> 5.0)
|
|
||||||
sqlite3
|
sqlite3
|
||||||
therubyracer
|
|
||||||
turbolinks (~> 5.1.0)
|
|
||||||
tzinfo-data
|
tzinfo-data
|
||||||
uglifier (>= 1.3.0)
|
|
||||||
unitwise (~> 2.2.0)
|
unitwise (~> 2.2.0)
|
||||||
|
webpacker (= 3.4.1)
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.16.1
|
1.16.1
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
class HomeController < ApplicationController
|
class HomeController < ApplicationController
|
||||||
|
|
||||||
|
def index
|
||||||
|
render layout: false
|
||||||
|
end
|
||||||
|
|
||||||
def about
|
def about
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
22
app/javascript/app.vue
Normal file
22
app/javascript/app.vue
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<template>
|
||||||
|
<div id="app">
|
||||||
|
<p>{{ message }}</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data: function () {
|
||||||
|
return {
|
||||||
|
message: "Hello Vue!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
p {
|
||||||
|
font-size: 2em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
13
app/javascript/components/App.vue
Normal file
13
app/javascript/components/App.vue
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<template>
|
||||||
|
<div id="app">
|
||||||
|
<router-view></router-view>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
14
app/javascript/components/The404Page.vue
Normal file
14
app/javascript/components/The404Page.vue
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<h1>404!</h1>
|
||||||
|
<p>WTF?</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
13
app/javascript/components/TheRecipeList.vue
Normal file
13
app/javascript/components/TheRecipeList.vue
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
list
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
4
app/javascript/config.js
Normal file
4
app/javascript/config.js
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
export default {
|
||||||
|
baseApiUrl: null
|
||||||
|
}
|
||||||
25
app/javascript/packs/application.js
Normal file
25
app/javascript/packs/application.js
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import '../styles';
|
||||||
|
|
||||||
|
import Vue from 'vue'
|
||||||
|
import config from '../config';
|
||||||
|
/// import 'App/lib/Fontawesome';
|
||||||
|
import store from '../store';
|
||||||
|
import router from '../router';
|
||||||
|
import App from '../components/App';
|
||||||
|
|
||||||
|
//Vue.use(VueClipboard);
|
||||||
|
//sync(store, router);
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
|
||||||
|
const app = document.getElementById('app');
|
||||||
|
config.baseApiUrl = app.dataset.url;
|
||||||
|
|
||||||
|
window.$vm = new Vue({
|
||||||
|
el: '#app',
|
||||||
|
store,
|
||||||
|
router,
|
||||||
|
render: createElement => createElement('App'),
|
||||||
|
components: { App }
|
||||||
|
});
|
||||||
|
});
|
||||||
21
app/javascript/router.js
Normal file
21
app/javascript/router.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import Vue from 'vue';
|
||||||
|
import Router from 'vue-router';
|
||||||
|
|
||||||
|
import The404Page from './components/The404Page';
|
||||||
|
import TheRecipeList from './components/TheRecipeList';
|
||||||
|
|
||||||
|
Vue.use(Router);
|
||||||
|
|
||||||
|
export default new Router({
|
||||||
|
routes: [
|
||||||
|
{
|
||||||
|
path: '/',
|
||||||
|
name: 'recipeList',
|
||||||
|
component: TheRecipeList
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '*',
|
||||||
|
component: The404Page
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
3
app/javascript/store/index.js
Normal file
3
app/javascript/store/index.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
export default {};
|
||||||
0
app/javascript/styles/index.scss
Normal file
0
app/javascript/styles/index.scss
Normal file
19
app/views/home/index.html.erb
Normal file
19
app/views/home/index.html.erb
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>Parsley</title>
|
||||||
|
|
||||||
|
<%= stylesheet_pack_tag 'application' %>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="app" data-url="<%= root_url %>">
|
||||||
|
Loading...
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%= javascript_pack_tag 'application' %>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
15
bin/webpack
Executable file
15
bin/webpack
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
|
||||||
|
ENV["NODE_ENV"] ||= ENV["RAILS_ENV"]
|
||||||
|
|
||||||
|
require "pathname"
|
||||||
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
||||||
|
Pathname.new(__FILE__).realpath)
|
||||||
|
|
||||||
|
require "rubygems"
|
||||||
|
require "bundler/setup"
|
||||||
|
|
||||||
|
require "webpacker"
|
||||||
|
require "webpacker/webpack_runner"
|
||||||
|
Webpacker::WebpackRunner.run(ARGV)
|
||||||
15
bin/webpack-dev-server
Executable file
15
bin/webpack-dev-server
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
|
||||||
|
ENV["NODE_ENV"] ||= ENV["RAILS_ENV"]
|
||||||
|
|
||||||
|
require "pathname"
|
||||||
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
||||||
|
Pathname.new(__FILE__).realpath)
|
||||||
|
|
||||||
|
require "rubygems"
|
||||||
|
require "bundler/setup"
|
||||||
|
|
||||||
|
require "webpacker"
|
||||||
|
require "webpacker/dev_server_runner"
|
||||||
|
Webpacker::DevServerRunner.run(ARGV)
|
||||||
@ -1,4 +1,6 @@
|
|||||||
Rails.application.configure do
|
Rails.application.configure do
|
||||||
|
# Verifies that versions and hashed value of the package contents in the project's package.json
|
||||||
|
config.webpacker.check_yarn_integrity = true
|
||||||
# Settings specified here will take precedence over those in config/application.rb.
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
# In the development environment your application's code is reloaded on
|
# In the development environment your application's code is reloaded on
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
Rails.application.configure do
|
Rails.application.configure do
|
||||||
|
# Verifies that versions and hashed value of the package contents in the project's package.json
|
||||||
|
config.webpacker.check_yarn_integrity = false
|
||||||
# Settings specified here will take precedence over those in config/application.rb.
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
# Code is not reloaded between requests.
|
# Code is not reloaded between requests.
|
||||||
|
|||||||
@ -1,23 +0,0 @@
|
|||||||
# Be sure to restart your server when you modify this file.
|
|
||||||
#
|
|
||||||
# This file contains migration options to ease your Rails 5.0 upgrade.
|
|
||||||
#
|
|
||||||
# Once upgraded flip defaults one by one to migrate to the new default.
|
|
||||||
#
|
|
||||||
# Read the Rails 5.0 release notes for more info on each option.
|
|
||||||
|
|
||||||
# Enable per-form CSRF tokens. Previous versions had false.
|
|
||||||
Rails.application.config.action_controller.per_form_csrf_tokens = false
|
|
||||||
|
|
||||||
# Enable origin-checking CSRF mitigation. Previous versions had false.
|
|
||||||
Rails.application.config.action_controller.forgery_protection_origin_check = false
|
|
||||||
|
|
||||||
# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
|
|
||||||
# Previous versions had false.
|
|
||||||
ActiveSupport.to_time_preserves_timezone = false
|
|
||||||
|
|
||||||
# Require `belongs_to` associations by default. Previous versions had false.
|
|
||||||
Rails.application.config.active_record.belongs_to_required_by_default = false
|
|
||||||
|
|
||||||
# Do not halt callback chains when a callback returns false. Previous versions had true.
|
|
||||||
ActiveSupport.halt_callback_chains_on_return_false = true
|
|
||||||
@ -48,7 +48,7 @@ Rails.application.routes.draw do
|
|||||||
resources :users, except: [:new, :create]
|
resources :users, except: [:new, :create]
|
||||||
end
|
end
|
||||||
|
|
||||||
root 'recipes#index'
|
root 'home#index'
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
3
config/webpack/development.js
Normal file
3
config/webpack/development.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
const environment = require('./environment')
|
||||||
|
|
||||||
|
module.exports = environment.toWebpackConfig()
|
||||||
5
config/webpack/environment.js
Normal file
5
config/webpack/environment.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
const { environment } = require('@rails/webpacker');
|
||||||
|
const vue = require('./loaders/vue');
|
||||||
|
|
||||||
|
environment.loaders.append('vue', vue)
|
||||||
|
module.exports = environment;
|
||||||
13
config/webpack/loaders/vue.js
Normal file
13
config/webpack/loaders/vue.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
const { dev_server: devServer } = require('@rails/webpacker').config
|
||||||
|
|
||||||
|
const isProduction = process.env.NODE_ENV === 'production'
|
||||||
|
const inDevServer = process.argv.find(v => v.includes('webpack-dev-server'))
|
||||||
|
const extractCSS = !(inDevServer && (devServer && devServer.hmr)) || isProduction
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
test: /\.vue(\.erb)?$/,
|
||||||
|
use: [{
|
||||||
|
loader: 'vue-loader',
|
||||||
|
options: { extractCSS }
|
||||||
|
}]
|
||||||
|
}
|
||||||
3
config/webpack/production.js
Normal file
3
config/webpack/production.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
const environment = require('./environment')
|
||||||
|
|
||||||
|
module.exports = environment.toWebpackConfig()
|
||||||
3
config/webpack/test.js
Normal file
3
config/webpack/test.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
const environment = require('./environment')
|
||||||
|
|
||||||
|
module.exports = environment.toWebpackConfig()
|
||||||
69
config/webpacker.yml
Normal file
69
config/webpacker.yml
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
# Note: You must restart bin/webpack-dev-server for changes to take effect
|
||||||
|
|
||||||
|
default: &default
|
||||||
|
source_path: app/javascript
|
||||||
|
source_entry_path: packs
|
||||||
|
public_output_path: packs
|
||||||
|
cache_path: tmp/cache/webpacker
|
||||||
|
|
||||||
|
# Additional paths webpack should lookup modules
|
||||||
|
# ['app/assets', 'engine/foo/app/assets']
|
||||||
|
resolved_paths: []
|
||||||
|
|
||||||
|
# Reload manifest.json on all requests so we reload latest compiled packs
|
||||||
|
cache_manifest: false
|
||||||
|
|
||||||
|
extensions:
|
||||||
|
- .vue
|
||||||
|
- .js
|
||||||
|
- .sass
|
||||||
|
- .scss
|
||||||
|
- .css
|
||||||
|
- .module.sass
|
||||||
|
- .module.scss
|
||||||
|
- .module.css
|
||||||
|
- .png
|
||||||
|
- .svg
|
||||||
|
- .gif
|
||||||
|
- .jpeg
|
||||||
|
- .jpg
|
||||||
|
|
||||||
|
development:
|
||||||
|
<<: *default
|
||||||
|
compile: true
|
||||||
|
|
||||||
|
# Reference: https://webpack.js.org/configuration/dev-server/
|
||||||
|
dev_server:
|
||||||
|
https: false
|
||||||
|
host: localhost
|
||||||
|
port: 3035
|
||||||
|
public: localhost:3035
|
||||||
|
hmr: false
|
||||||
|
# Inline should be set to true if using HMR
|
||||||
|
inline: true
|
||||||
|
overlay: true
|
||||||
|
compress: true
|
||||||
|
disable_host_check: true
|
||||||
|
use_local_ip: false
|
||||||
|
quiet: false
|
||||||
|
headers:
|
||||||
|
'Access-Control-Allow-Origin': '*'
|
||||||
|
watch_options:
|
||||||
|
ignored: /node_modules/
|
||||||
|
|
||||||
|
|
||||||
|
test:
|
||||||
|
<<: *default
|
||||||
|
compile: true
|
||||||
|
|
||||||
|
# Compile test packs to a separate directory
|
||||||
|
public_output_path: packs-test
|
||||||
|
|
||||||
|
production:
|
||||||
|
<<: *default
|
||||||
|
|
||||||
|
# Production depends on precompilation of packs prior to booting for performance.
|
||||||
|
compile: false
|
||||||
|
|
||||||
|
# Cache manifest.json for performance
|
||||||
|
cache_manifest: true
|
||||||
@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20170414233856) do
|
ActiveRecord::Schema.define(version: 2017_04_14_233856) do
|
||||||
|
|
||||||
create_table "ingredient_units", force: :cascade do |t|
|
create_table "ingredient_units", force: :cascade do |t|
|
||||||
t.integer "ingredient_id", null: false
|
t.integer "ingredient_id", null: false
|
||||||
|
|||||||
16
package.json
Normal file
16
package.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
"@rails/webpacker": "^3.4.1",
|
||||||
|
"caniuse-lite": "^1.0.30000815",
|
||||||
|
"css-loader": "^0.28.11",
|
||||||
|
"vue": "^2.5.16",
|
||||||
|
"vue-loader": "^14.2.2",
|
||||||
|
"vue-router": "^3.0.1",
|
||||||
|
"vue-template-compiler": "^2.5.16",
|
||||||
|
"vuex": "^3.0.1",
|
||||||
|
"webpack": "^3.11.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"webpack-dev-server": "^2.11.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
FactoryGirl.define do
|
FactoryBot.define do
|
||||||
factory :ingredient_unit do
|
factory :ingredient_unit do
|
||||||
ingredient
|
ingredient
|
||||||
name 'Each'
|
name 'Each'
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
FactoryGirl.define do
|
FactoryBot.define do
|
||||||
factory :ingredient do
|
factory :ingredient do
|
||||||
name 'Ingredient'
|
name 'Ingredient'
|
||||||
density nil
|
density nil
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
FactoryGirl.define do
|
FactoryBot.define do
|
||||||
factory :log do
|
factory :log do
|
||||||
date "2016-07-06 20:13:14"
|
date "2016-07-06 20:13:14"
|
||||||
rating 1
|
rating 1
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
FactoryGirl.define do
|
FactoryBot.define do
|
||||||
factory :note do
|
factory :note do
|
||||||
user
|
user
|
||||||
content "MyText"
|
content "MyText"
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
FactoryGirl.define do
|
FactoryBot.define do
|
||||||
factory :recipe_ingredient do
|
factory :recipe_ingredient do
|
||||||
sort_order 1
|
sort_order 1
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
FactoryGirl.define do
|
FactoryBot.define do
|
||||||
factory :recipe do
|
factory :recipe do
|
||||||
name "Recipe"
|
name "Recipe"
|
||||||
description "desc"
|
description "desc"
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
FactoryGirl.define do
|
FactoryBot.define do
|
||||||
factory :tag do
|
factory :tag do
|
||||||
sequence(:name) { |n| "tag#{n}" }
|
sequence(:name) { |n| "tag#{n}" }
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
FactoryGirl.define do
|
FactoryBot.define do
|
||||||
|
|
||||||
factory :usda_food_weight do
|
factory :usda_food_weight do
|
||||||
amount 1
|
amount 1
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
FactoryGirl.define do
|
FactoryBot.define do
|
||||||
|
|
||||||
sequence :unique_ndbn do |n|
|
sequence :unique_ndbn do |n|
|
||||||
n.to_s.rjust(5, '0')
|
n.to_s.rjust(5, '0')
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
FactoryGirl.define do
|
FactoryBot.define do
|
||||||
|
|
||||||
sequence :generic_email do |n|
|
sequence :generic_email do |n|
|
||||||
"generic_email_#{n.to_s.rjust(3, '0')}@example.com"
|
"generic_email_#{n.to_s.rjust(3, '0')}@example.com"
|
||||||
|
|||||||
@ -89,7 +89,7 @@ RSpec.describe UnitConversion do
|
|||||||
'1/3 c' => Unitwise("1/3".to_r, 'cup'),
|
'1/3 c' => Unitwise("1/3".to_r, 'cup'),
|
||||||
'-5/16 g' => Unitwise("-5/16".to_r, 'gram'),
|
'-5/16 g' => Unitwise("-5/16".to_r, 'gram'),
|
||||||
'2 1/2 c' => Unitwise("5/2".to_r, 'cup'),
|
'2 1/2 c' => Unitwise("5/2".to_r, 'cup'),
|
||||||
'1.03 gram/ml' => Unitwise(1.03, 'gram/milliliter')
|
'1.03 gram/ml' => Unitwise(1.03, 'g/ml')
|
||||||
}
|
}
|
||||||
|
|
||||||
data.each do |input, output|
|
data.each do |input, output|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ ActiveRecord::Migration.maintain_test_schema!
|
|||||||
RSpec.configure do |config|
|
RSpec.configure do |config|
|
||||||
|
|
||||||
|
|
||||||
config.include FactoryGirl::Syntax::Methods
|
config.include FactoryBot::Syntax::Methods
|
||||||
|
|
||||||
config.before(:suite) do
|
config.before(:suite) do
|
||||||
DatabaseCleaner.strategy = :transaction
|
DatabaseCleaner.strategy = :transaction
|
||||||
@ -38,7 +38,7 @@ RSpec.configure do |config|
|
|||||||
DatabaseCleaner.clean_with(:truncation)
|
DatabaseCleaner.clean_with(:truncation)
|
||||||
|
|
||||||
DatabaseCleaner.cleaning do
|
DatabaseCleaner.cleaning do
|
||||||
FactoryGirl.lint
|
FactoryBot.lint
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
6183
yarn-error.log
Normal file
6183
yarn-error.log
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user