adding debugger and opal rails
This commit is contained in:
parent
9c241218b7
commit
8d6e78c53f
9
Gemfile
9
Gemfile
@ -11,8 +11,13 @@ gem "haml-rails"
|
||||
gem "susy" , "2.2.12"
|
||||
|
||||
gem 'high_voltage'
|
||||
gem "kramdown"
|
||||
gem "maruku"
|
||||
|
||||
gem 'opal-rails'
|
||||
gem 'opal-browser'
|
||||
gem "rubyx-debugger" , "0.3" , path: "../rubyx-debugger" , require: false
|
||||
gem "rubyx" , "0.6" , :path => "../rubyx" , require: false
|
||||
gem "rx-file" , :git => "https://github.com/ruby-x/rx-file"
|
||||
|
||||
group :development, :test do
|
||||
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
||||
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
|
||||
|
61
Gemfile.lock
61
Gemfile.lock
@ -1,3 +1,21 @@
|
||||
GIT
|
||||
remote: https://github.com/ruby-x/rx-file
|
||||
revision: c1de10352d8af105fe532008ceafcdd30b5fbdab
|
||||
specs:
|
||||
rx-file (0.3.0)
|
||||
|
||||
PATH
|
||||
remote: ../rubyx-debugger
|
||||
specs:
|
||||
rubyx-debugger (0.3)
|
||||
|
||||
PATH
|
||||
remote: ../rubyx
|
||||
specs:
|
||||
rubyx (0.6.0)
|
||||
parser (~> 2.3.0)
|
||||
rx-file (~> 0.3)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
@ -45,6 +63,7 @@ GEM
|
||||
addressable (2.5.2)
|
||||
public_suffix (>= 2.0.2, < 4.0)
|
||||
arel (9.0.0)
|
||||
ast (2.4.0)
|
||||
bindex (0.5.0)
|
||||
builder (3.2.3)
|
||||
byebug (10.0.2)
|
||||
@ -77,6 +96,7 @@ GEM
|
||||
html2haml (>= 1.0.1)
|
||||
railties (>= 4.0.1)
|
||||
high_voltage (3.0.0)
|
||||
hike (1.2.3)
|
||||
html2haml (2.2.0)
|
||||
erubis (~> 2.7.0)
|
||||
haml (>= 4.0, < 6)
|
||||
@ -84,7 +104,10 @@ GEM
|
||||
ruby_parser (~> 3.5)
|
||||
i18n (1.0.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
kramdown (1.16.2)
|
||||
jquery-rails (4.3.1)
|
||||
rails-dom-testing (>= 1, < 3)
|
||||
railties (>= 4.2.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
launchy (2.4.3)
|
||||
addressable (~> 2.3)
|
||||
listen (3.1.5)
|
||||
@ -98,7 +121,6 @@ GEM
|
||||
mini_mime (>= 0.1.1)
|
||||
marcel (0.3.2)
|
||||
mimemagic (~> 0.3.2)
|
||||
maruku (0.7.3)
|
||||
method_source (0.9.0)
|
||||
mimemagic (0.3.2)
|
||||
mini_mime (1.0.0)
|
||||
@ -107,6 +129,33 @@ GEM
|
||||
nio4r (2.3.0)
|
||||
nokogiri (1.8.2)
|
||||
mini_portile2 (~> 2.3.0)
|
||||
opal (0.10.5)
|
||||
hike (~> 1.2)
|
||||
sourcemap (~> 0.1.0)
|
||||
sprockets (~> 3.1)
|
||||
tilt (>= 1.4)
|
||||
opal-activesupport (0.3.1)
|
||||
opal (>= 0.5.0, < 1.0.0)
|
||||
opal-browser (0.2.0)
|
||||
opal
|
||||
paggio
|
||||
opal-jquery (0.4.2)
|
||||
opal (>= 0.7.0, < 0.11.0)
|
||||
opal-rails (0.9.4)
|
||||
jquery-rails
|
||||
opal (>= 0.10.0, < 0.12)
|
||||
opal-activesupport (>= 0.0.5)
|
||||
opal-jquery (~> 0.4.0)
|
||||
opal-sprockets (~> 0.4.1)
|
||||
rails (>= 4.1, < 6.0)
|
||||
sprockets-rails (>= 2.3.3, < 4.0)
|
||||
opal-sprockets (0.4.1.0.10.4.3.1.0)
|
||||
opal (~> 0.10.4)
|
||||
sprockets (~> 3.1)
|
||||
tilt (>= 1.4)
|
||||
paggio (0.2.6)
|
||||
parser (2.3.3.1)
|
||||
ast (~> 2.2)
|
||||
public_suffix (3.0.2)
|
||||
puma (3.11.3)
|
||||
rack (2.0.4)
|
||||
@ -168,6 +217,7 @@ GEM
|
||||
sprockets-rails (>= 2.0, < 4.0)
|
||||
tilt (>= 1.1, < 3)
|
||||
sexp_processor (4.11.0)
|
||||
sourcemap (0.1.1)
|
||||
spring (2.0.2)
|
||||
activesupport (>= 4.2)
|
||||
spring-watcher-listen (2.0.1)
|
||||
@ -211,12 +261,15 @@ DEPENDENCIES
|
||||
capybara-screenshot
|
||||
haml-rails
|
||||
high_voltage
|
||||
kramdown
|
||||
listen (>= 3.0.5, < 3.2)
|
||||
maruku
|
||||
opal-browser
|
||||
opal-rails
|
||||
puma (~> 3.11)
|
||||
rails
|
||||
rspec-rails
|
||||
rubyx (= 0.6)!
|
||||
rubyx-debugger (= 0.3)!
|
||||
rx-file!
|
||||
sass-rails
|
||||
spring
|
||||
spring-watcher-listen (~> 2.0.0)
|
||||
|
3
app/assets/javascripts/debug.js.rb
Normal file
3
app/assets/javascripts/debug.js.rb
Normal file
@ -0,0 +1,3 @@
|
||||
require "opal"
|
||||
|
||||
require "debugger"
|
4
app/assets/stylesheets/debug.css
Normal file
4
app/assets/stylesheets/debug.css
Normal file
@ -0,0 +1,4 @@
|
||||
/*
|
||||
*= require css/menu
|
||||
*= require css/app
|
||||
*/
|
6
app/controllers/debugger_controller.rb
Normal file
6
app/controllers/debugger_controller.rb
Normal file
@ -0,0 +1,6 @@
|
||||
class DebuggerController < ApplicationController
|
||||
|
||||
def index
|
||||
render layout: false
|
||||
end
|
||||
end
|
7
app/views/debugger/index.html.haml
Normal file
7
app/views/debugger/index.html.haml
Normal file
@ -0,0 +1,7 @@
|
||||
!!!
|
||||
%html
|
||||
%head
|
||||
%title Debugger
|
||||
= stylesheet_link_tag 'debug', media: 'all'
|
||||
%body
|
||||
= javascript_include_tag "debug"
|
@ -18,5 +18,11 @@ module RubyxWebpage
|
||||
config.assets.paths << Gem.loaded_specs['susy'].full_gem_path+'/sass'
|
||||
|
||||
config.blog_path = Rails.root.to_s + "/app/views/posts"
|
||||
|
||||
config.assets.configure do |env|
|
||||
env.cache = ActiveSupport::Cache.lookup_store(:memory_store,
|
||||
{ size: 64.megabytes })
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -3,12 +3,16 @@
|
||||
# Version of your assets, change this if you want to expire all your assets.
|
||||
Rails.application.config.assets.version = '1.0'
|
||||
|
||||
# Add additional assets to the asset load path.
|
||||
# Rails.application.config.assets.paths << Emoji.images_path
|
||||
# Add Yarn node_modules folder to the asset load path.
|
||||
Rails.application.config.assets.paths << Rails.root.join('node_modules')
|
||||
Rails.application.config.opal.method_missing = true
|
||||
Rails.application.config.opal.optimized_operators = true
|
||||
Rails.application.config.opal.arity_check = !Rails.env.production?
|
||||
Rails.application.config.opal.const_missing = true
|
||||
Rails.application.config.opal.dynamic_require_severity = :ignore
|
||||
|
||||
# Precompile additional assets.
|
||||
# application.js, application.css, and all non-JS/CSS in the app/assets
|
||||
# folder are already added.
|
||||
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
|
||||
Rails.application.config.assets.precompile += %w( debug.js debug.css)
|
||||
|
||||
Rails.application.config.assets.paths << "#{Gem.loaded_specs["rubyx-debugger"].gem_dir}/assets/"
|
||||
Rails.application.config.assets.paths << "#{Gem.loaded_specs["rubyx-debugger"].gem_dir}/lib/"
|
||||
|
2
config/initializers/debugger.rb
Normal file
2
config/initializers/debugger.rb
Normal file
@ -0,0 +1,2 @@
|
||||
Opal.use_gem("rubyx")
|
||||
Opal.use_gem("ast")
|
@ -2,6 +2,8 @@ Rails.application.routes.draw do
|
||||
|
||||
root to: 'high_voltage/pages#show' , id: 'index'
|
||||
|
||||
get "/debugger" , to: "debugger#index" , as: :debugger_index
|
||||
|
||||
get "/blog" , to: "blog#index" , as: :blog_index
|
||||
get "/blog/*title" , to: "blog#post" , as: :blog_post
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user