debugging eval, weird pipeline cache problems
This commit is contained in:
parent
e6e6265e26
commit
9080e458c4
@ -6,9 +6,10 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
|||||||
gem "vue_r" , path: "../"
|
gem "vue_r" , path: "../"
|
||||||
|
|
||||||
gem "rails"
|
gem "rails"
|
||||||
gem "bootsnap" , "1.15.0"
|
|
||||||
|
|
||||||
gem "puma" , "5.6.5"
|
gem "puma" , "5.6.5"
|
||||||
gem "haml-rails"
|
gem "haml-rails"
|
||||||
gem "sqlite3"
|
gem "sqlite3"
|
||||||
gem "active_hash"
|
gem "active_hash"
|
||||||
|
|
||||||
|
gem "opal-rails"
|
||||||
|
@ -76,8 +76,6 @@ GEM
|
|||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
tzinfo (~> 2.0)
|
tzinfo (~> 2.0)
|
||||||
ast (2.4.2)
|
ast (2.4.2)
|
||||||
bootsnap (1.15.0)
|
|
||||||
msgpack (~> 1.2)
|
|
||||||
builder (3.2.4)
|
builder (3.2.4)
|
||||||
concurrent-ruby (1.2.0)
|
concurrent-ruby (1.2.0)
|
||||||
crass (1.0.6)
|
crass (1.0.6)
|
||||||
@ -108,7 +106,6 @@ GEM
|
|||||||
method_source (1.0.0)
|
method_source (1.0.0)
|
||||||
mini_mime (1.1.2)
|
mini_mime (1.1.2)
|
||||||
minitest (5.17.0)
|
minitest (5.17.0)
|
||||||
msgpack (1.6.0)
|
|
||||||
net-imap (0.3.4)
|
net-imap (0.3.4)
|
||||||
date
|
date
|
||||||
net-protocol
|
net-protocol
|
||||||
@ -196,8 +193,8 @@ PLATFORMS
|
|||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
active_hash
|
active_hash
|
||||||
bootsnap (= 1.15.0)
|
|
||||||
haml-rails
|
haml-rails
|
||||||
|
opal-rails
|
||||||
puma (= 5.6.5)
|
puma (= 5.6.5)
|
||||||
rails
|
rails
|
||||||
sqlite3
|
sqlite3
|
||||||
|
@ -1 +1,6 @@
|
|||||||
require "vue_r"
|
require 'opal'
|
||||||
|
require 'promise'
|
||||||
|
require 'native'
|
||||||
|
require 'browser/setup/mini'
|
||||||
|
require "vue_r/application"
|
||||||
|
require "vue_r/mounter"
|
||||||
|
@ -3,15 +3,17 @@
|
|||||||
= #@image.attributes
|
= #@image.attributes
|
||||||
|
|
||||||
.flex.justify-center
|
.flex.justify-center
|
||||||
%a.underline{ e_click: "bg_change" , r_class: 'back'}
|
%a.underline{ e_click: "bg_change" , r_class: 'back(50)'}
|
||||||
{{ back }}
|
{{ back }}
|
||||||
:opal
|
:opal
|
||||||
class Clicker < VueR::Application
|
class Clicker < VueR::Application
|
||||||
def bg_change
|
def bg_change
|
||||||
self.state = !self.state
|
self.state = !self.state
|
||||||
end
|
end
|
||||||
def back
|
def back(arg)
|
||||||
self.state ? "bg-cyan-50" : "bg-cyan-200"
|
puts "Arg:#{arg}:#{arg.class}"
|
||||||
|
str = self.state ? "bg-cyan-50" : "bg-cyan-200"
|
||||||
|
str + " " + arg.to_s
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
require_relative "boot"
|
require_relative "boot"
|
||||||
|
|
||||||
require "rails/all"
|
require "rails/all"
|
||||||
|
require 'sprockets/railtie'
|
||||||
|
|
||||||
# Require the gems listed in Gemfile, including any gems
|
# Require the gems listed in Gemfile, including any gems
|
||||||
# you've limited to :test, :development, or :production.
|
# you've limited to :test, :development, or :production.
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
||||||
|
|
||||||
require "bundler/setup" # Set up gems listed in the Gemfile.
|
require "bundler/setup" # Set up gems listed in the Gemfile.
|
||||||
require "bootsnap/setup" # Speed up boot time by caching expensive operations.
|
|
||||||
|
@ -57,8 +57,8 @@ Rails.application.configure do
|
|||||||
config.active_record.verbose_query_logs = true
|
config.active_record.verbose_query_logs = true
|
||||||
|
|
||||||
# Suppress logger output for asset requests.
|
# Suppress logger output for asset requests.
|
||||||
config.assets.quiet = true
|
config.assets.quiet = false
|
||||||
|
config.assets.debug = true
|
||||||
# Raises error for missing translations.
|
# Raises error for missing translations.
|
||||||
# config.i18n.raise_on_missing_translations = true
|
# config.i18n.raise_on_missing_translations = true
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
require 'opal'
|
require 'opal'
|
||||||
require 'native'
|
|
||||||
require 'promise'
|
require 'promise'
|
||||||
|
require 'native'
|
||||||
require 'browser/setup/mini'
|
require 'browser/setup/mini'
|
||||||
require "vue_r/application"
|
require "vue_r/application"
|
||||||
require "vue_r/mounter"
|
require "vue_r/mounter"
|
||||||
|
@ -65,27 +65,33 @@ module VueR
|
|||||||
|
|
||||||
def send_self(expression)
|
def send_self(expression)
|
||||||
method , args = decompose(expression)
|
method , args = decompose(expression)
|
||||||
puts "Sending #{method}(#{args.join(',')})"
|
method = method.strip
|
||||||
self.send method , *args
|
puts "Sending #{method}(#{args&.join(',')})"
|
||||||
|
if(args == nil or args.empty?)
|
||||||
|
self.send( method )
|
||||||
|
else
|
||||||
|
self.send( method , *args )
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def decompose(expression)
|
def decompose(expression)
|
||||||
matches = expression.match(/\b[^()]+\((.*)\)$/)
|
matches = expression.match(/\b[^()]+\((.*)\)$/)
|
||||||
return expression if matches.blank?
|
return expression if matches.nil?
|
||||||
method = expression.split("(").first
|
method = expression.split("(").first
|
||||||
return [method , [] ] if m[1].empty?
|
puts "METHOD:#{method}"
|
||||||
args = m[1].split(",").collect{| arg | transform_arg(arg) }
|
return [method , [] ] if matches[1].empty?
|
||||||
|
args = matches[1].split(",").collect{| arg | transform_arg(arg) }
|
||||||
return [method , args]
|
return [method , args]
|
||||||
end
|
end
|
||||||
|
|
||||||
def transform_arg(arg)
|
def transform_arg(argument)
|
||||||
arg = arg.strip
|
arg = argument.strip
|
||||||
puts "Arg:#{arg}:"
|
#puts "Arg:#{arg}:"
|
||||||
return true if arg == "true"
|
return true if arg == "true"
|
||||||
return false if arg == "false"
|
return false if arg == "false"
|
||||||
return nil if arg == "nil"
|
return nil if arg == "nil"
|
||||||
return arg.to_i if arg == arg.to_to_s
|
return arg.to_i if arg == arg.to_i.to_s
|
||||||
arg
|
return arg
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user