Sha256: 4ac39db206502e9725fb23e0dbc2b80251911467cf4515f741a1567e87278a0c

Contents?: true

Size: 606 Bytes

Versions: 28

Compression:

Stored size: 606 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?
      $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

28 entries across 28 versions & 1 rubygems

Version Path
react_on_rails-6.0.5 lib/react_on_rails/utils.rb
react_on_rails-6.0.4 lib/react_on_rails/utils.rb
react_on_rails-6.0.3 lib/react_on_rails/utils.rb
react_on_rails-6.0.2 lib/react_on_rails/utils.rb
react_on_rails-6.0.1 lib/react_on_rails/utils.rb
react_on_rails-6.0.0 lib/react_on_rails/utils.rb
react_on_rails-6.0.0.rc.6 lib/react_on_rails/utils.rb
react_on_rails-6.0.0.rc.5 lib/react_on_rails/utils.rb
react_on_rails-6.0.0.rc.4 lib/react_on_rails/utils.rb
react_on_rails-6.0.0.rc3 lib/react_on_rails/utils.rb
react_on_rails-6.0.0.rc.2 lib/react_on_rails/utils.rb
react_on_rails-6.0.0.rc.1 lib/react_on_rails/utils.rb
react_on_rails-6.0.0.beta.5 lib/react_on_rails/utils.rb
react_on_rails-6.0.0.beta.4 lib/react_on_rails/utils.rb
react_on_rails-6.0.0.beta.3 lib/react_on_rails/utils.rb
react_on_rails-6.0.0.beta.2 lib/react_on_rails/utils.rb
react_on_rails-6.0.0.beta.1 lib/react_on_rails/utils.rb
react_on_rails-5.2.0 lib/react_on_rails/utils.rb
react_on_rails-5.1.1 lib/react_on_rails/utils.rb
react_on_rails-5.1.0 lib/react_on_rails/utils.rb