diff --git a/.gitignore b/.gitignore index a3ee5aa..81639b1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,8 @@ /log/*.log /pkg/ /tmp/ -/test/dummy/db/*.sqlite3 -/test/dummy/db/*.sqlite3-* -/test/dummy/log/*.log -/test/dummy/storage/ -/test/dummy/tmp/ +/dummy/db/*.sqlite3 +/dummy/db/*.sqlite3-* +/dummy/log/*.log +/dummy/storage/ +/dummy/tmp/ diff --git a/README.md b/README.md index 9273353..f9fafd0 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,8 @@ VueR is a Vue.js inspired reactive frontend framework in ruby. It allows for the same kind of declaritive change management as vue, albeit in smaller scope. Many vue-like features -work, and work continues, but this will the current scope is personal. +work, and work continues, but the current scope is personal, so it's not meant as +a vue.js replacement. ## Usage diff --git a/bin/rails b/bin/rails deleted file mode 100755 index 11fb5b1..0000000 --- a/bin/rails +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails gems -# installed from the root of your application. - -ENGINE_ROOT = File.expand_path("..", __dir__) -ENGINE_PATH = File.expand_path("../lib/vue_r/engine", __dir__) -APP_PATH = File.expand_path("../test/dummy/config/application", __dir__) - -# Set up gems listed in the Gemfile. -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) -require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"]) - -require "rails/all" -require "rails/engine/commands" diff --git a/dummy/.ruby-version b/dummy/.ruby-version new file mode 100644 index 0000000..b0f2dcb --- /dev/null +++ b/dummy/.ruby-version @@ -0,0 +1 @@ +3.0.4 diff --git a/Gemfile b/dummy/Gemfile similarity index 62% rename from Gemfile rename to dummy/Gemfile index 25f22bf..6f99b80 100644 --- a/Gemfile +++ b/dummy/Gemfile @@ -2,15 +2,13 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } # Specify your gem's dependencies in vue_r.gemspec. -gemspec + +gem "vue_r" , path: "../" gem "rails" -gem "sprockets-rails" +gem "bootsnap" , "1.15.0" + gem "puma" , "5.6.5" gem "haml-rails" gem "sqlite3" gem "active_hash" -gem "opal-rails" - -# Start debugger with binding.b [https://github.com/ruby/debug] -# gem "debug", ">= 1.0.0" diff --git a/Gemfile.lock b/dummy/Gemfile.lock similarity index 97% rename from Gemfile.lock rename to dummy/Gemfile.lock index 4490736..3e98957 100644 --- a/Gemfile.lock +++ b/dummy/Gemfile.lock @@ -1,5 +1,5 @@ PATH - remote: . + remote: .. specs: vue_r (0.1.0) opal-browser (>= 0.3.0) @@ -76,6 +76,8 @@ GEM minitest (>= 5.1) tzinfo (~> 2.0) ast (2.4.2) + bootsnap (1.15.0) + msgpack (~> 1.2) builder (3.2.4) concurrent-ruby (1.2.0) crass (1.0.6) @@ -106,6 +108,7 @@ GEM method_source (1.0.0) mini_mime (1.1.2) minitest (5.17.0) + msgpack (1.6.0) net-imap (0.3.4) date net-protocol @@ -193,11 +196,10 @@ PLATFORMS DEPENDENCIES active_hash + bootsnap (= 1.15.0) haml-rails - opal-rails puma (= 5.6.5) rails - sprockets-rails sqlite3 vue_r! diff --git a/dummy/README.md b/dummy/README.md new file mode 100644 index 0000000..7db80e4 --- /dev/null +++ b/dummy/README.md @@ -0,0 +1,24 @@ +# README + +This README would normally document whatever steps are necessary to get the +application up and running. + +Things you may want to cover: + +* Ruby version + +* System dependencies + +* Configuration + +* Database creation + +* Database initialization + +* How to run the test suite + +* Services (job queues, cache servers, search engines, etc.) + +* Deployment instructions + +* ... diff --git a/test/dummy/Rakefile b/dummy/Rakefile similarity index 100% rename from test/dummy/Rakefile rename to dummy/Rakefile diff --git a/test/dummy/app/assets/config/manifest.js b/dummy/app/assets/config/manifest.js similarity index 100% rename from test/dummy/app/assets/config/manifest.js rename to dummy/app/assets/config/manifest.js diff --git a/test/dummy/app/assets/images/.keep b/dummy/app/assets/images/.keep similarity index 100% rename from test/dummy/app/assets/images/.keep rename to dummy/app/assets/images/.keep diff --git a/dummy/app/assets/javascript/application.js b/dummy/app/assets/javascript/application.js new file mode 100644 index 0000000..2af544b --- /dev/null +++ b/dummy/app/assets/javascript/application.js @@ -0,0 +1,3 @@ +//= require opal_main + +Opal.require('opal_main'); diff --git a/dummy/app/assets/javascript/opal_main.js.rb b/dummy/app/assets/javascript/opal_main.js.rb new file mode 100644 index 0000000..35fd141 --- /dev/null +++ b/dummy/app/assets/javascript/opal_main.js.rb @@ -0,0 +1 @@ +require "vue_r" diff --git a/test/dummy/app/assets/stylesheets/application.css b/dummy/app/assets/stylesheets/application.css similarity index 67% rename from test/dummy/app/assets/stylesheets/application.css rename to dummy/app/assets/stylesheets/application.css index 0ebd7fe..288b9ab 100644 --- a/test/dummy/app/assets/stylesheets/application.css +++ b/dummy/app/assets/stylesheets/application.css @@ -2,11 +2,11 @@ * This is a manifest file that'll be compiled into application.css, which will include all the files * listed below. * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. + * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's + * vendor/assets/stylesheets directory can be referenced here using a relative path. * * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS + * compiled file so the styles you add here take precedence over styles defined in any other CSS * files in this directory. Styles in this file should be added after the last require_* statement. * It is generally better to create a new file per style scope. * diff --git a/test/dummy/app/channels/application_cable/channel.rb b/dummy/app/channels/application_cable/channel.rb similarity index 100% rename from test/dummy/app/channels/application_cable/channel.rb rename to dummy/app/channels/application_cable/channel.rb diff --git a/test/dummy/app/channels/application_cable/connection.rb b/dummy/app/channels/application_cable/connection.rb similarity index 100% rename from test/dummy/app/channels/application_cable/connection.rb rename to dummy/app/channels/application_cable/connection.rb diff --git a/test/dummy/app/controllers/application_controller.rb b/dummy/app/controllers/application_controller.rb similarity index 74% rename from test/dummy/app/controllers/application_controller.rb rename to dummy/app/controllers/application_controller.rb index a68641e..09705d1 100644 --- a/test/dummy/app/controllers/application_controller.rb +++ b/dummy/app/controllers/application_controller.rb @@ -1,3 +1,2 @@ class ApplicationController < ActionController::Base - helper OpalHelper end diff --git a/test/dummy/app/controllers/concerns/.keep b/dummy/app/controllers/concerns/.keep similarity index 100% rename from test/dummy/app/controllers/concerns/.keep rename to dummy/app/controllers/concerns/.keep diff --git a/test/dummy/app/controllers/images_controller.rb b/dummy/app/controllers/images_controller.rb similarity index 100% rename from test/dummy/app/controllers/images_controller.rb rename to dummy/app/controllers/images_controller.rb diff --git a/test/dummy/app/helpers/application_helper.rb b/dummy/app/helpers/application_helper.rb similarity index 100% rename from test/dummy/app/helpers/application_helper.rb rename to dummy/app/helpers/application_helper.rb diff --git a/dummy/app/javascript/application.js b/dummy/app/javascript/application.js new file mode 100644 index 0000000..0d7b494 --- /dev/null +++ b/dummy/app/javascript/application.js @@ -0,0 +1,3 @@ +// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails +import "@hotwired/turbo-rails" +import "controllers" diff --git a/dummy/app/javascript/controllers/application.js b/dummy/app/javascript/controllers/application.js new file mode 100644 index 0000000..1213e85 --- /dev/null +++ b/dummy/app/javascript/controllers/application.js @@ -0,0 +1,9 @@ +import { Application } from "@hotwired/stimulus" + +const application = Application.start() + +// Configure Stimulus development experience +application.debug = false +window.Stimulus = application + +export { application } diff --git a/dummy/app/javascript/controllers/hello_controller.js b/dummy/app/javascript/controllers/hello_controller.js new file mode 100644 index 0000000..5975c07 --- /dev/null +++ b/dummy/app/javascript/controllers/hello_controller.js @@ -0,0 +1,7 @@ +import { Controller } from "@hotwired/stimulus" + +export default class extends Controller { + connect() { + this.element.textContent = "Hello World!" + } +} diff --git a/dummy/app/javascript/controllers/index.js b/dummy/app/javascript/controllers/index.js new file mode 100644 index 0000000..54ad4ca --- /dev/null +++ b/dummy/app/javascript/controllers/index.js @@ -0,0 +1,11 @@ +// Import and register all your controllers from the importmap under controllers/* + +import { application } from "controllers/application" + +// Eager load all controllers defined in the import map under controllers/**/*_controller +import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading" +eagerLoadControllersFrom("controllers", application) + +// Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!) +// import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading" +// lazyLoadControllersFrom("controllers", application) diff --git a/test/dummy/app/jobs/application_job.rb b/dummy/app/jobs/application_job.rb similarity index 100% rename from test/dummy/app/jobs/application_job.rb rename to dummy/app/jobs/application_job.rb diff --git a/test/dummy/app/mailers/application_mailer.rb b/dummy/app/mailers/application_mailer.rb similarity index 100% rename from test/dummy/app/mailers/application_mailer.rb rename to dummy/app/mailers/application_mailer.rb diff --git a/test/dummy/app/models/application_record.rb b/dummy/app/models/application_record.rb similarity index 100% rename from test/dummy/app/models/application_record.rb rename to dummy/app/models/application_record.rb diff --git a/test/dummy/app/models/concerns/.keep b/dummy/app/models/concerns/.keep similarity index 100% rename from test/dummy/app/models/concerns/.keep rename to dummy/app/models/concerns/.keep diff --git a/test/dummy/app/models/image.rb b/dummy/app/models/image.rb similarity index 100% rename from test/dummy/app/models/image.rb rename to dummy/app/models/image.rb diff --git a/test/dummy/app/views/images/index.html.haml b/dummy/app/views/images/index.html.haml similarity index 100% rename from test/dummy/app/views/images/index.html.haml rename to dummy/app/views/images/index.html.haml diff --git a/test/dummy/app/views/images/show.html.haml b/dummy/app/views/images/show.html.haml similarity index 72% rename from test/dummy/app/views/images/show.html.haml rename to dummy/app/views/images/show.html.haml index c127eb1..9f9adbf 100644 --- a/test/dummy/app/views/images/show.html.haml +++ b/dummy/app/views/images/show.html.haml @@ -6,6 +6,7 @@ %a.underline{ e_click: "bg_change" , r_class: 'back'} {{ back }} :opal + puts "here1" class Clicker < VueR::Application def bg_change self.state = !self.state @@ -15,5 +16,8 @@ end end - kanta = Clicker.new(bg: 'bg-cyan-200' , state: true) - kanta.mount("#app") + puts "here2" + click = Clicker.new(bg: 'bg-cyan-200' , state: true) + click.mount("#app") + + puts "here3" diff --git a/test/dummy/app/views/layouts/application.html.erb b/dummy/app/views/layouts/application.html.erb similarity index 85% rename from test/dummy/app/views/layouts/application.html.erb rename to dummy/app/views/layouts/application.html.erb index aefcefd..274a398 100644 --- a/test/dummy/app/views/layouts/application.html.erb +++ b/dummy/app/views/layouts/application.html.erb @@ -7,7 +7,7 @@ <%= csp_meta_tag %> <%= stylesheet_link_tag "application" %> - <%= javascript_include_tag "dummy" %> + <%= javascript_include_tag "application" %> diff --git a/test/dummy/app/views/layouts/mailer.html.erb b/dummy/app/views/layouts/mailer.html.erb similarity index 100% rename from test/dummy/app/views/layouts/mailer.html.erb rename to dummy/app/views/layouts/mailer.html.erb diff --git a/test/dummy/app/views/layouts/mailer.text.erb b/dummy/app/views/layouts/mailer.text.erb similarity index 100% rename from test/dummy/app/views/layouts/mailer.text.erb rename to dummy/app/views/layouts/mailer.text.erb diff --git a/dummy/bin/bundle b/dummy/bin/bundle new file mode 100755 index 0000000..981e650 --- /dev/null +++ b/dummy/bin/bundle @@ -0,0 +1,114 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'bundle' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "rubygems" + +m = Module.new do + module_function + + def invoked_as_script? + File.expand_path($0) == File.expand_path(__FILE__) + end + + def env_var_version + ENV["BUNDLER_VERSION"] + end + + def cli_arg_version + return unless invoked_as_script? # don't want to hijack other binstubs + return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` + bundler_version = nil + update_index = nil + ARGV.each_with_index do |a, i| + if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN + bundler_version = a + end + next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/ + bundler_version = $1 + update_index = i + end + bundler_version + end + + def gemfile + gemfile = ENV["BUNDLE_GEMFILE"] + return gemfile if gemfile && !gemfile.empty? + + File.expand_path("../Gemfile", __dir__) + end + + def lockfile + lockfile = + case File.basename(gemfile) + when "gems.rb" then gemfile.sub(/\.rb$/, gemfile) + else "#{gemfile}.lock" + end + File.expand_path(lockfile) + end + + def lockfile_version + return unless File.file?(lockfile) + lockfile_contents = File.read(lockfile) + return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/ + Regexp.last_match(1) + end + + def bundler_requirement + @bundler_requirement ||= + env_var_version || cli_arg_version || + bundler_requirement_for(lockfile_version) + end + + def bundler_requirement_for(version) + return "#{Gem::Requirement.default}.a" unless version + + bundler_gem_version = Gem::Version.new(version) + + requirement = bundler_gem_version.approximate_recommendation + + return requirement unless Gem.rubygems_version < Gem::Version.new("2.7.0") + + requirement += ".a" if bundler_gem_version.prerelease? + + requirement + end + + def load_bundler! + ENV["BUNDLE_GEMFILE"] ||= gemfile + + activate_bundler + end + + def activate_bundler + gem_error = activation_error_handling do + gem "bundler", bundler_requirement + end + return if gem_error.nil? + require_error = activation_error_handling do + require "bundler/version" + end + return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) + warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`" + exit 42 + end + + def activation_error_handling + yield + nil + rescue StandardError, LoadError => e + e + end +end + +m.load_bundler! + +if m.invoked_as_script? + load Gem.bin_path("bundler", "bundle") +end diff --git a/dummy/bin/importmap b/dummy/bin/importmap new file mode 100755 index 0000000..36502ab --- /dev/null +++ b/dummy/bin/importmap @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby + +require_relative "../config/application" +require "importmap/commands" diff --git a/test/dummy/bin/rails b/dummy/bin/rails similarity index 100% rename from test/dummy/bin/rails rename to dummy/bin/rails diff --git a/test/dummy/bin/rake b/dummy/bin/rake similarity index 100% rename from test/dummy/bin/rake rename to dummy/bin/rake diff --git a/test/dummy/bin/setup b/dummy/bin/setup similarity index 100% rename from test/dummy/bin/setup rename to dummy/bin/setup diff --git a/test/dummy/config.ru b/dummy/config.ru similarity index 100% rename from test/dummy/config.ru rename to dummy/config.ru diff --git a/test/dummy/config/application.rb b/dummy/config/application.rb similarity index 73% rename from test/dummy/config/application.rb rename to dummy/config/application.rb index 76e51b4..9b9479e 100644 --- a/test/dummy/config/application.rb +++ b/dummy/config/application.rb @@ -1,19 +1,15 @@ require_relative "boot" require "rails/all" -require "vue_r/engine" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) -require "vue_r" module Dummy class Application < Rails::Application - config.load_defaults Rails::VERSION::STRING.to_f - - # For compatibility with applications that use this config - config.action_controller.include_all_helpers = false + # Initialize configuration defaults for originally generated Rails version. + config.load_defaults 7.0 # Configuration for the application, engines, and railties goes here. # diff --git a/dummy/config/boot.rb b/dummy/config/boot.rb new file mode 100644 index 0000000..988a5dd --- /dev/null +++ b/dummy/config/boot.rb @@ -0,0 +1,4 @@ +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +require "bundler/setup" # Set up gems listed in the Gemfile. +require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/test/dummy/config/cable.yml b/dummy/config/cable.yml similarity index 100% rename from test/dummy/config/cable.yml rename to dummy/config/cable.yml diff --git a/dummy/config/credentials.yml.enc b/dummy/config/credentials.yml.enc new file mode 100644 index 0000000..bb07657 --- /dev/null +++ b/dummy/config/credentials.yml.enc @@ -0,0 +1 @@ +xJzmq1Pw1x72vwQAg22RHDysAIra3RSk3F094+9xgpG7ncrRdp4jFujPvmkopWmRRNd9KbGrVvQOKsTDk+oNXFOBvS5HGpS1vPAVZZD7CtHFnK5I7LrzTqp6zKgPUFTuoJ4LNCRhpH25EvTPRYSRuQvnDzd+kB5Qm3OfK3mrrtOkyB/LwIvdy8OSFOWGh02arvz3blGFu7rkJbCxL9agVPTzeB8z08dS3cqURn+XeyBpiwOm+YXsX44jn8vMjlzF0eNwfVcVkcWxODlLfZAa0uqoZblu24dGFSSBwiEMXZPFBxvK0/6uJZgI+WtxMXHdbTeZkKZlONvnpJ78c7oywVrrKGHBaN3lKiwwutLvbYzh4DbTEgQ7mNKPgpvhrkIC4lihDcIv4h7PtgzGYteu2Qt9ay6LzlqG2vmp--u+1vnLC+O6PtJ7gf--lY0+OprIHTdx59wgIuqNfQ== \ No newline at end of file diff --git a/test/dummy/config/database.yml b/dummy/config/database.yml similarity index 100% rename from test/dummy/config/database.yml rename to dummy/config/database.yml diff --git a/test/dummy/config/environment.rb b/dummy/config/environment.rb similarity index 100% rename from test/dummy/config/environment.rb rename to dummy/config/environment.rb diff --git a/test/dummy/config/environments/development.rb b/dummy/config/environments/development.rb similarity index 100% rename from test/dummy/config/environments/development.rb rename to dummy/config/environments/development.rb diff --git a/test/dummy/config/environments/production.rb b/dummy/config/environments/production.rb similarity index 100% rename from test/dummy/config/environments/production.rb rename to dummy/config/environments/production.rb diff --git a/test/dummy/config/environments/test.rb b/dummy/config/environments/test.rb similarity index 100% rename from test/dummy/config/environments/test.rb rename to dummy/config/environments/test.rb diff --git a/dummy/config/importmap.rb b/dummy/config/importmap.rb new file mode 100644 index 0000000..8dce42d --- /dev/null +++ b/dummy/config/importmap.rb @@ -0,0 +1,7 @@ +# Pin npm packages by running ./bin/importmap + +pin "application", preload: true +pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true +pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true +pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true +pin_all_from "app/javascript/controllers", under: "controllers" diff --git a/test/dummy/config/initializers/assets.rb b/dummy/config/initializers/assets.rb similarity index 100% rename from test/dummy/config/initializers/assets.rb rename to dummy/config/initializers/assets.rb diff --git a/test/dummy/config/initializers/content_security_policy.rb b/dummy/config/initializers/content_security_policy.rb similarity index 100% rename from test/dummy/config/initializers/content_security_policy.rb rename to dummy/config/initializers/content_security_policy.rb diff --git a/test/dummy/config/initializers/filter_parameter_logging.rb b/dummy/config/initializers/filter_parameter_logging.rb similarity index 100% rename from test/dummy/config/initializers/filter_parameter_logging.rb rename to dummy/config/initializers/filter_parameter_logging.rb diff --git a/test/dummy/config/initializers/inflections.rb b/dummy/config/initializers/inflections.rb similarity index 100% rename from test/dummy/config/initializers/inflections.rb rename to dummy/config/initializers/inflections.rb diff --git a/test/dummy/config/initializers/permissions_policy.rb b/dummy/config/initializers/permissions_policy.rb similarity index 100% rename from test/dummy/config/initializers/permissions_policy.rb rename to dummy/config/initializers/permissions_policy.rb diff --git a/test/dummy/config/locales/en.yml b/dummy/config/locales/en.yml similarity index 100% rename from test/dummy/config/locales/en.yml rename to dummy/config/locales/en.yml diff --git a/dummy/config/master.key b/dummy/config/master.key new file mode 100644 index 0000000..bfe64bb --- /dev/null +++ b/dummy/config/master.key @@ -0,0 +1 @@ +1de93911f6ced9a733304cb90579fc18 \ No newline at end of file diff --git a/test/dummy/config/puma.rb b/dummy/config/puma.rb similarity index 100% rename from test/dummy/config/puma.rb rename to dummy/config/puma.rb diff --git a/test/dummy/config/routes.rb b/dummy/config/routes.rb similarity index 100% rename from test/dummy/config/routes.rb rename to dummy/config/routes.rb diff --git a/test/dummy/config/storage.yml b/dummy/config/storage.yml similarity index 100% rename from test/dummy/config/storage.yml rename to dummy/config/storage.yml diff --git a/dummy/db/seeds.rb b/dummy/db/seeds.rb new file mode 100644 index 0000000..bc25fce --- /dev/null +++ b/dummy/db/seeds.rb @@ -0,0 +1,7 @@ +# This file should contain all the record creation needed to seed the database with its default values. +# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). +# +# Examples: +# +# movies = Movie.create([{ name: "Star Wars" }, { name: "Lord of the Rings" }]) +# Character.create(name: "Luke", movie: movies.first) diff --git a/test/dummy/images.yml b/dummy/images.yml similarity index 100% rename from test/dummy/images.yml rename to dummy/images.yml diff --git a/test/dummy/lib/assets/.keep b/dummy/lib/assets/.keep similarity index 100% rename from test/dummy/lib/assets/.keep rename to dummy/lib/assets/.keep diff --git a/test/dummy/log/.keep b/dummy/lib/tasks/.keep similarity index 100% rename from test/dummy/log/.keep rename to dummy/lib/tasks/.keep diff --git a/test/dummy/public/apple-touch-icon-precomposed.png b/dummy/log/.keep similarity index 100% rename from test/dummy/public/apple-touch-icon-precomposed.png rename to dummy/log/.keep diff --git a/test/dummy/public/404.html b/dummy/public/404.html similarity index 100% rename from test/dummy/public/404.html rename to dummy/public/404.html diff --git a/test/dummy/public/422.html b/dummy/public/422.html similarity index 100% rename from test/dummy/public/422.html rename to dummy/public/422.html diff --git a/test/dummy/public/500.html b/dummy/public/500.html similarity index 100% rename from test/dummy/public/500.html rename to dummy/public/500.html diff --git a/test/dummy/public/apple-touch-icon.png b/dummy/public/apple-touch-icon-precomposed.png similarity index 100% rename from test/dummy/public/apple-touch-icon.png rename to dummy/public/apple-touch-icon-precomposed.png diff --git a/test/dummy/public/favicon.ico b/dummy/public/apple-touch-icon.png similarity index 100% rename from test/dummy/public/favicon.ico rename to dummy/public/apple-touch-icon.png diff --git a/dummy/public/favicon.ico b/dummy/public/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/dummy/public/robots.txt b/dummy/public/robots.txt new file mode 100644 index 0000000..c19f78a --- /dev/null +++ b/dummy/public/robots.txt @@ -0,0 +1 @@ +# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file diff --git a/dummy/test/application_system_test_case.rb b/dummy/test/application_system_test_case.rb new file mode 100644 index 0000000..d19212a --- /dev/null +++ b/dummy/test/application_system_test_case.rb @@ -0,0 +1,5 @@ +require "test_helper" + +class ApplicationSystemTestCase < ActionDispatch::SystemTestCase + driven_by :selenium, using: :chrome, screen_size: [1400, 1400] +end diff --git a/dummy/test/channels/application_cable/connection_test.rb b/dummy/test/channels/application_cable/connection_test.rb new file mode 100644 index 0000000..800405f --- /dev/null +++ b/dummy/test/channels/application_cable/connection_test.rb @@ -0,0 +1,11 @@ +require "test_helper" + +class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase + # test "connects with cookies" do + # cookies.signed[:user_id] = 42 + # + # connect + # + # assert_equal connection.user_id, "42" + # end +end diff --git a/dummy/test/controllers/.keep b/dummy/test/controllers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dummy/test/fixtures/files/.keep b/dummy/test/fixtures/files/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dummy/test/helpers/.keep b/dummy/test/helpers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dummy/test/integration/.keep b/dummy/test/integration/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dummy/test/mailers/.keep b/dummy/test/mailers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dummy/test/models/.keep b/dummy/test/models/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dummy/test/system/.keep b/dummy/test/system/.keep new file mode 100644 index 0000000..e69de29 diff --git a/dummy/test/test_helper.rb b/dummy/test/test_helper.rb new file mode 100644 index 0000000..d713e37 --- /dev/null +++ b/dummy/test/test_helper.rb @@ -0,0 +1,13 @@ +ENV["RAILS_ENV"] ||= "test" +require_relative "../config/environment" +require "rails/test_help" + +class ActiveSupport::TestCase + # Run tests in parallel with specified workers + parallelize(workers: :number_of_processors) + + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. + fixtures :all + + # Add more helper methods to be used by all tests here... +end diff --git a/test/dummy/app/assets/javascript/dummy.js.rb b/test/dummy/app/assets/javascript/dummy.js.rb deleted file mode 100644 index 9c71183..0000000 --- a/test/dummy/app/assets/javascript/dummy.js.rb +++ /dev/null @@ -1,21 +0,0 @@ -require "opal" -require "native" -require 'promise' -require 'opal-parser' -require 'browser/setup/mini' - - -require "vue_r/application" -require "vue_r/mounter" - -puts "hello world!" - -# Uncomment the following to print out you're hello-world with Opal: -# -# -# The following will append a hello-world to your element: -# -# require "native" -# $$[:document].addEventListener :DOMContentLoaded do -# $$[:document][:body][:innerHTML] += '

Hello World!

' -# end diff --git a/test/dummy/config/boot.rb b/test/dummy/config/boot.rb deleted file mode 100644 index 116591a..0000000 --- a/test/dummy/config/boot.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Set up gems listed in the Gemfile. -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile", __dir__) - -require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"]) -$LOAD_PATH.unshift File.expand_path("../../../lib", __dir__) diff --git a/test/dummy/config/initializers/opal.rb b/test/dummy/config/initializers/opal.rb deleted file mode 100644 index aaba247..0000000 --- a/test/dummy/config/initializers/opal.rb +++ /dev/null @@ -1,22 +0,0 @@ -# Check out the full list of the available configuration options at -# https://github.com/opal/opal/blob/master/lib/opal/config.rb - -Rails.application.configure do - # We suggest keeping the configuration above as default for all environments, - # disabling some of them might slightly reduce the bundle size or reduce performance - # by degrading some ruby features. - config.opal.method_missing_enabled = true - config.opal.const_missing_enabled = true - config.opal.arity_check_enabled = true - config.opal.freezing_stubs_enabled = true - config.opal.dynamic_require_severity = :ignore - - # To enable passing assigns from the controller to the opal template handler - # change the following configuration to one of these values: - # - # - true # both locals and instance variables - # - :locals # only locals - # - :ivars # only instance variables - # - config.opal.assigns_in_templates = false -end