Sha256: 2fba5c1f365b4222ca2e069e3aace710692c77a573b53412a228137dbb212680

Contents?: true

Size: 595 Bytes

Versions: 7

Compression:

Stored size: 595 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

7 entries across 7 versions & 1 rubygems

Version Path
can_can_dry-0.3.1 lib/tasks/can_can_dry.rake
can_can_dry-0.3.0 lib/tasks/can_can_dry.rake
can_can_dry-0.2.0 lib/tasks/can_can_dry.rake
can_can_dry-0.1.0 lib/tasks/can_can_dry.rake
can_can_dry-0.0.8 lib/tasks/can_can_dry.rake
can_can_dry-0.0.7 lib/tasks/can_can_dry.rake
can_can_dry-0.0.6 lib/tasks/can_can_dry.rake