Sha256: 42208eb770fcc7972c9f8f398711b09e2675413e1ed9cff6e8dc4689a8a5e0a7

Contents?: true

Size: 653 Bytes

Versions: 12

Compression:

Stored size: 653 Bytes

Contents

require "English"

module ReactOnRails
  module Utils
    def self.object_to_boolean(value)
      [true, "true", "yes", 1, "1", "t"].include?(value.class == String ? value.downcase : value)
    end

    def self.server_rendering_is_enabled?
      ReactOnRails.configuration.server_bundle_js_file.present?
    end

    def self.last_process_completed_successfully?
      # rubocop:disable Style/NumericPredicate
      $CHILD_STATUS.exitstatus == 0
    end

    def self.default_server_bundle_js_file_path
      File.join(ReactOnRails.configuration.generated_assets_dir,
                ReactOnRails.configuration.server_bundle_js_file)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
react_on_rails-6.3.2 lib/react_on_rails/utils.rb
react_on_rails-6.3.1 lib/react_on_rails/utils.rb
react_on_rails-6.3.0 lib/react_on_rails/utils.rb
react_on_rails-6.2.1 lib/react_on_rails/utils.rb
react_on_rails-6.2.1.rc.3 lib/react_on_rails/utils.rb
react_on_rails-6.2.1.rc.2 lib/react_on_rails/utils.rb
react_on_rails-6.2.1.rc.1 lib/react_on_rails/utils.rb
react_on_rails-6.2.0 lib/react_on_rails/utils.rb
react_on_rails-6.1.2 lib/react_on_rails/utils.rb
react_on_rails-6.1.1 lib/react_on_rails/utils.rb
react_on_rails-6.1.1.rc.1 lib/react_on_rails/utils.rb
react_on_rails-6.1.0 lib/react_on_rails/utils.rb