Sha256: 48e6fa8146f276c9590bebe2b431e18497924cc1cd947516e917b43588179308
Contents?: true
Size: 816 Bytes
Versions: 1
Compression:
Stored size: 816 Bytes
Contents
# frozen_string_literal: true require "stimulus_reflex/installer" reflexes_path = Rails.root.join("app/reflexes") step_path = "/app/reflexes/" application_reflex_path = reflexes_path / "application_reflex.rb" application_reflex_src = StimulusReflex::Installer.fetch(step_path, "application_reflex.rb.tt") # verify app/reflexes exists and create if necessary if reflexes_path.exist? say "⏩ app/reflexes directory already exists. Skipping." else empty_directory reflexes_path say "✅ Created app/reflexes directory" end if application_reflex_path.exist? say "⏩ app/reflexes/application_reflex.rb is alredy present. Skipping." else copy_file application_reflex_src, application_reflex_path say "✅ Created app/reflexes/application_reflex.rb" end StimulusReflex::Installer.complete_step :reflexes
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
stimulus_reflex-3.5.3 | lib/install/reflexes.rb |