Sha256: 0090d84b53811f0795e96bd34a836c7da73a4495b931e3d6348d402152db3c8f

Contents?: true

Size: 1.05 KB

Versions: 3

Compression:

Stored size: 1.05 KB

Contents

require "rubyXL"
require "rubyXL/convenience_methods/cell"
require "rubyXL/convenience_methods/color"
require "rubyXL/convenience_methods/font"
require "rubyXL/convenience_methods/workbook"
require "rubyXL/convenience_methods/worksheet"
require_relative "tools/crud_operations"
require_relative "tools/crud_config"
require_relative "tools/crud_notifications"
require_relative "tools/railtie"
require_relative "tools/crud_data"

module Rails
  module Crud
    module Tools
      def self.setup()
        unless File.exist?(".crudconfig")
          puts "The .crudconfig file is required. Please run `bundle exec crud init`."
          return
        end

        unless File.exist?(CrudConfig.instance.crud_file_path)
          puts "The CRUD file is required. Please run `bundle exec crud gen_crud`."
          return
        end

        CrudData.instance.process_id = "rails-crud-tools-#{Time.now.strftime("%Y%m%d%H%M%S")}"
        CrudData.instance.load_crud_data
        setup_notifications
      end

      setup unless ENV["SKIP_CRUD_SETUP"] == "true"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails-crud-tools-0.6.0 lib/rails/crud/tools.rb
rails-crud-tools-0.5.0 lib/rails/crud/tools.rb
rails-crud-tools-0.4.3 lib/rails/crud/tools.rb