Skip to content

Instantly share code, notes, and snippets.

View webpacker_guide.md

Webpacker

What Is Webpacker?

How is Webpacker Different from Sprockets?

Installing Webpacker

Integrating Frameworks with Webpacker

View system_with_circle.rb
RSpec.configure do |config|
config.before(:each, type: :system) do
driven_by :rack_test
end
config.before(:each, type: :system, js: true) do
if ENV["SELENIUM_DRIVER_URL"].present?
driven_by :selenium, using: :chrome,
options: {
browser: :remote,
View circle_selenium_rspec.yml
- run:
command: |
bundle exec rspec --profile 10 \
--format RspecJunitFormatter \
--out /tmp/test-results/rspec.xml \
--format progress \
$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
View circle_selenium_docker.yml
version: 2
jobs:
build:
parallelism: 3
docker:
- image: circleci/ruby:2.4.2-node
environment:
PGHOST: 127.0.0.1
PGUSER: user
RAILS_ENV: test
View basic_configure.rb
RSpec.configure do |config|
config.before(:each, type: :system) do
driven_by :rack_test
end
config.before(:each, type: :system, js: true) do
driven_by :selenium_chrome_headless
end
end
View using_editable.elm
displayEditable : Editable -> HTML
displayEditable editable =
case editable of
BeingEdited old new ->
textarea [] [ text new ]
NotBeingEdited value ->
div [] [ text value ]
View unedit_editable.elm
save : Editable -> Editable
save x =
case x of
BeingEdited _ new ->
NotBeingEdited new
NotBeingEdited _ ->
x
View edit_editable.elm
edit : Editable -> Editable
edit x =
case x of
BeingEdited old new ->
x
NotBeingEdited value ->
BeingEdited value value
View editable.elm
type Editable
= BeingEdited String String
| NotBeingEdited String
You can’t perform that action at this time.