Redis.current will be removed without replacement in redis-rb 5.0. Version 4.6.0 adds deprecation warnings for Redis.current and Redis.current=: `Redis.current...

...the Webpacker world: Automatic removal of expired assets Manifest backups # config/deploy.rb # No need to include public/packs here, but add the Webpacker cache dir (see link below) set :linked_dirs, %w...

stackoverflow.com

...your Ruby's source is located: gem install debugger-linecache -v '1.1.2' -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p448 Resume what you were doing before (probably a bundle install).

...need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib...

...a better understanding, where the textContent and the innerHTML properties are defined. It also includes (just for completeness) the innerText property, which is similar to textContent, but has subtile differences...

...of waiting for a long timeout. The code expands on work by Tobias Kraze. Include the module Include the following StabilizeHeadlessChrome module in your tests: class StabilizeHeadlessChrome class Reaper

github.com

...like our "dev" cards deck, but groomed from a single person (Josh Branchaud). It includes an extensive list of over 900 TILs on many topics that might be interesting for...

...I should see the items "{array}"' ParameterType( name: 'array', # Note: the RegEx no longer includes the ^ and $ delimiter: regexp: /\[([^"\[\]]*)\]/, type: Array, transformer: lambda do |array_string| # Code to transform the...

Your commit messages should include the ID of the issue your code belongs to. Our preferred syntax prefixes the issue title with its ID in brackets, e.g. [FOO-123] Avatars...

github.com

...browser time to the time currently mocked with Timecop. To integrate those two, we include and activate timemachine.js in our Rails layout whenever we see that Timecop is mocking the...

- if defined?(Timecop) && Timecop.top_stack_item = javascript_include_tag "timemachine.js" :javascript timemachine.config({ dateString: #{Time.now.to_json}, tick: true }) Warning timemachine.js will mock the time as soon as it is loaded...

ruby-doc.org

...file by calling File.open(@file_path) {...

...} on the file directly instead. I will also include an example on how to use this for directories instead for files at the end...

github.com

...When coming from jQuery, also see the card on JavaScript without jQuery. This card includes a link to You Don't Need jQuery, which summarizes most of the alternatives in...

Since Roadie is now in passive maintenance mode, we go with premailer: Include premailer in your Gemfile: gem 'premailer-rails' In your ApplicationMailer define the mailer layout:

...and only the mailer stylesheet) we have a separated mailer.js in webpack/packs where we include the css file für our mail styles: import '../application/stylesheets/mailer.sass' In your mailer.html.erb you can now...

...with ActiveJob, the job arguments are logged. In case of a password reset, this includes the password reset token, which should not be logged. ActiveJob's logs can be disabled...

makandra dev

Option 1: JSON dump In config/webpack/environment.js you can get inspect environment which includes all webpack config options set for the current environment: const { environment } = require('@rails/webpacker') const webpack = require('webpack...

In contrast to RSpec's included allow_value matcher, the attached matcher will also work on associations, which makes it ideal for testing assignable_values. Usage example describe Unit do...

...expect(unit.assignable_buildings).to contain_exactly(building, other_building) expect(unit.assignable_buildings).not_to include(unauthorized_building, nil) end ... See RSpec: Where to put custom matchers and other support code

...committing, you should always check the diff of your changes so you don't include any leftovers or irrelevant/bad changes. Any time spent on that is well invested as it...

...diff or git diff --cached (to diff staged changes), you can also have Git include the changes as a comment below the commit message: git commit -v That will open...

...this should not be an issue but it turns crazy if you try to include associated models deeper than 1 level: options = params.merge(:include => { :user => :avatar }) Post.paginate options When inspecting...

...the merged params you will get something like this: { :include=> { "user" => :avatar }, :page => 23 } Here the :user symbol in the hash of inclusions turned into a "user" string.\

web.archive.org

...that follows after colon and ends at the line end (and this string may include quotes): When /^I fill in "([^"]*)" with: (.*)$/ do |field, value| pending # express the regexp above with...

rewrite_options is used by the ..._path methods in the views ^ module HostEnforcementTrait Include this method in a module because we cannot yield out of define_method module InstanceMethods...

yield ensure self.asset_host = old_asset_host end end as_trait do |*args| include HostEnforcementTrait::InstanceMethods options = args.first || {} methods = options[:for] around_filter :assets_have_urls, :only => methods

Ruby's standard library includes a class for creating temporary directories. Similar to Tempfile it creates a unique directory name. Note: You need to use a block or take care...

...We want to use `GlobalID.create` to avoid constructing a GID # ourselves, and because it includes some sanity checks as well. pluck(*columns).map do |(id, type)| klass = anonymous_classes_by...

These are the results of the "personal tech stack survey". I've included only the most popular mentions, maybe it can help you find one or two useful tools for...

VIM plugins Vim plugins are all over the place. Some multiple mentions include fzf.vim Fuzzyfinder integration with vim, allows for quick project wide file search. ALE (Asynchronous Linting...

...observers to add icons) small file size due to in-built ability to only include the icons you use (if you use webpack 2, or another packager with tree-shaking...

const FontminPlugin = require('fontmin-webpack') environment.plugins.append( 'Fontmin', new FontminPlugin({ autodetect: true, }) ) Only include the icons you need Fontmin-webpacker works by only keeping glyphs it sees in your...

github.com

...methods. These will behave just like those you know from controller specs: module DeviseRequestSpecHelpers include Warden::Test::Helpers def sign_in(resource_or_scope, resource = nil) resource ||= resource_or_scope...

sign_in create(:user, name: 'John Doe') visit root_path expect(page).to include('John Doe...