<commit_before>require 'shipyard-framework/version'
require 'action_view'
require 'sass'

module Shipyard
  class << self
    def load!
      if rails?
        register_rails_engine
      elsif sprockets?
        register_sprockets
      elsif jekyll?
        register_jekyll_tags
      end

      register_helpers
      configure_sass
    end

    # Paths
    def gem_path
      @gem_path ||= File.expand_path '..', File.dirname(__FILE__)
    end

    def stylesheets_path
      File.join assets_path, 'stylesheets'
    end

    def javascripts_path
      File.join assets_path, 'javascripts'
    end

    def icons_path
      File.join assets_path, 'icons'
    end

    def assets_path
      @assets_path ||= File.join gem_path, 'assets'
    end

    private

    def sass?
      defined?(::Sass)
    end

    def sprockets?
      defined?(::Sprockets)
    end

    def rails?
      defined?(::Rails)
    end

    def jekyll?
      defined?(::Jekyll) && defined?(::Liquid)
    end

    def configure_sass
      ::Sass.load_paths << stylesheets_path
    end

    def register_rails_engine
      require 'shipyard-framework/icons'
      require 'shipyard-framework/rails/engine'
      require 'shipyard-framework/rails/railtie'
    end

    def register_sprockets
      Sprockets.append_path(stylesheets_path)
      Sprockets.append_path(javascripts_path)
    end

    def register_jekyll_tags
      require 'shipyard-framework/jekyll/button_tag'
      require 'shipyard-framework/jekyll/box_tag'
      require 'shipyard-framework/jekyll/note_tag'
      require 'shipyard-framework/jekyll/alert_tag'
      require 'shipyard-framework/jekyll/shipyard_version_tag'
      Liquid::Template.register_tag('btn', Shipyard::Jekyll::Button)
      Liquid::Template.register_tag('box', Shipyard::Jekyll::Box)
      Liquid::Template.register_tag('note', Shipyard::Jekyll::Note)
      Liquid::Template.register_tag('alert', Shipyard::Jekyll::Alert)
      Liquid::Template.register_tag('shipyard_version', Shipyard::Jekyll::ShipyardVersion)
    end

    def register_helpers
      Dir['app/helpers/shipyard/*.rb'].each do |file|
        require_relative "../#{file}"
      end
    end
  end
end

Shipyard.load!
<commit_msg>Updated some of the sass changes.<commit_after>require 'shipyard-framework/version'
require 'action_view'

module Shipyard
  class << self
    def load!
      if rails?
        register_rails_engine
      elsif sprockets?
        register_sprockets
      elsif jekyll?
        register_jekyll_tags
      end

      register_helpers
      configure_sass
    end

    # Paths
    def gem_path
      @gem_path ||= File.expand_path '..', File.dirname(__FILE__)
    end

    def stylesheets_path
      File.join assets_path, 'stylesheets'
    end

    def javascripts_path
      File.join assets_path, 'javascripts'
    end

    def icons_path
      File.join assets_path, 'icons'
    end

    def assets_path
      @assets_path ||= File.join gem_path, 'assets'
    end

    private

    def sprockets?
      defined?(::Sprockets)
    end

    def rails?
      defined?(::Rails)
    end

    def jekyll?
      defined?(::Jekyll) && defined?(::Liquid)
    end

    def configure_sass
      require 'sass'
      ::Sass.load_paths << stylesheets_path
    end

    def register_rails_engine
      require 'shipyard-framework/icons'
      require 'shipyard-framework/rails/engine'
      require 'shipyard-framework/rails/railtie'
    end

    def register_sprockets
      Sprockets.append_path(stylesheets_path)
      Sprockets.append_path(javascripts_path)
    end

    def register_jekyll_tags
      require 'shipyard-framework/jekyll/button_tag'
      require 'shipyard-framework/jekyll/box_tag'
      require 'shipyard-framework/jekyll/note_tag'
      require 'shipyard-framework/jekyll/alert_tag'
      require 'shipyard-framework/jekyll/shipyard_version_tag'
      Liquid::Template.register_tag('btn', Shipyard::Jekyll::Button)
      Liquid::Template.register_tag('box', Shipyard::Jekyll::Box)
      Liquid::Template.register_tag('note', Shipyard::Jekyll::Note)
      Liquid::Template.register_tag('alert', Shipyard::Jekyll::Alert)
      Liquid::Template.register_tag('shipyard_version', Shipyard::Jekyll::ShipyardVersion)
    end

    def register_helpers
      Dir['app/helpers/shipyard/*.rb'].each do |file|
        require_relative "../#{file}"
      end
    end
  end
end

Shipyard.load!

{'fraction_non_alphanumeric': 0.09618008185538882, 'fraction_numerical': 0.0, 'mean_word_length': 2.9067495559502663, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1429270', 'n_tokens_mistral': 1458, 'n_tokens_neox': 1421, 'n_words': 259}