This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { environment } = require('@rails/webpacker') | |
const { CleanWebpackPlugin } = require("clean-webpack-plugin"); | |
environment.plugins.prepend("CleanWebpackPlugin", new CleanWebpackPlugin()); | |
// default config from https://webpack.js.org/plugins/split-chunks-plugin/#optimizationsplitchunks | |
environment.splitChunks((config) => | |
Object.assign({}, config, { | |
optimization: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { environment } = require('@rails/webpacker') | |
const { CleanWebpackPlugin } = require("clean-webpack-plugin"); | |
environment.plugins.prepend("CleanWebpackPlugin", new CleanWebpackPlugin()); | |
// default config from https://webpack.js.org/plugins/split-chunks-plugin/#optimizationsplitchunks | |
environment.splitChunks((config) => | |
Object.assign({}, config, { | |
optimization: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main; | |
import com.fazecast.jSerialComm.SerialPort; | |
public class Starter { | |
public static void main(String[] args) { | |
System.out.println("Hello world"); | |
SerialPort[] ports = SerialPort.getCommPorts(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
class AuthController < ActionController::API | |
before_action :allow_cors | |
protected | |
def allow_cors | |
response.headers['Access-Control-Allow-Origin'] = request.headers['Origin'] || '*' | |
response.headers['Access-Control-Allow-Credentials'] = 'true' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app | price | bandwidth | |
---|---|---|---|
one | two | 33 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rails new app_name --webpack=react |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENV['RAILS_ENV'] ||= 'test' | |
require_relative '../config/environment' | |
require 'rails/test_help' | |
# DO NOT FORGET THIS. | |
OmniAuth.config.test_mode = true | |
class ActiveSupport::TestCase | |
# ...some code here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test_helper' | |
class ProductsControllerTest < ActionDispatch::IntegrationTest | |
# This methods gets called before each test. | |
def setup | |
@shop = shops(:regular_shop) | |
login_shop(@shop) | |
end | |
test "post should work" do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENV['RAILS_ENV'] ||= 'test' | |
require_relative '../config/environment' | |
require 'rails/test_help' | |
OmniAuth.config.test_mode = true | |
class ActiveSupport::TestCase | |
# ...some code here | |
def login_shop(shop) |