Sha256: bcd4f1da6f09e04770c47b25f2b667f94bff1c29384c0e9a1f14843cc1421cbf

Contents?: true

Size: 596 Bytes

Versions: 8

Compression:

Stored size: 596 Bytes

Contents

# frozen_string_literal: true

namespace :can_can_dry do
  desc 'Mostra o mapeamento de CanCanDry'
  task ability_mapping: :environment do
    AbilityMapping.new.mapping.each do |controller, actions|
      puts "#{controller} (#{actions.count})"
      actions.each do |action|
        puts "\t#{action}"
      end
    end
  end

  desc 'Inform the path and receive the controller/action.'
  task :path_recognize, [:path] => :environment do |_t, args|
    Aranha::AddressesController.new
    r = ::CanCanDry::PathRecognizer.recognize('', args.path)
    Rails.logger.info("Result: #{r}")
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
can_can_dry-0.5.5 lib/tasks/can_can_dry.rake
can_can_dry-0.5.4 lib/tasks/can_can_dry.rake
can_can_dry-0.5.3 lib/tasks/can_can_dry.rake
can_can_dry-0.5.2 lib/tasks/can_can_dry.rake
can_can_dry-0.5.1 lib/tasks/can_can_dry.rake
can_can_dry-0.5.0 lib/tasks/can_can_dry.rake
can_can_dry-0.4.1 lib/tasks/can_can_dry.rake
can_can_dry-0.4.0 lib/tasks/can_can_dry.rake