Sha256: cdd4d56db1a5fcde5c3e83e654e8f35c19c48c0d3afa01cfb27f46ac9c54cf8c

Contents?: true

Size: 949 Bytes

Versions: 2

Compression:

Stored size: 949 Bytes

Contents

require 'rails'

module Historyjs
  module Generators
    class InstallGenerator < ::Rails::Generators::Base
      desc "This generator installs HistoryJS #{Historyjs::Rails::HISTORYJS_VERSION} and JSON2"
      source_root File.expand_path('../../../../../vendor/assets/javascripts', __FILE__)

      def copy_historyjs
        say_status("copying", "History.js (#{Historyjs::Rails::HISTORYJS_VERSION})", :green)

        copy_file "history_core.js",           "public/javascripts/history.js"
        copy_file "history_html4.js",          "public/javascripts/history.html4.js"
        copy_file "history_adapter_jquery.js", "public/javascripts/history.adapter.jquery.js"
      end

      def copy_json2
        say_status("copying", "JSON2 (#{Historyjs::Rails::JSON2_VERSION})", :green)
        copy_file "json2.js", "public/javascripts/json2.js"
      end
    end
  end
end if ::Rails.version < "3.1" || !::Rails.application.config.assets.enabled

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jquery-historyjs-0.3.0 lib/generators/historyjs/install/install_generator.rb
jquery-historyjs-0.2.3 lib/generators/historyjs/install/install_generator.rb