Sha256: 163b47657bf6d9f698d78bf91a65048a28be43dd2686dc6b9261ad28393ee207

Contents?: true

Size: 769 Bytes

Versions: 17

Compression:

Stored size: 769 Bytes

Contents

module DevisePasswordSharingExtension
  module Generators # :nodoc:
    # Install Generator
    class InstallGenerator < Rails::Generators::Base
      source_root File.expand_path("../templates", __FILE__)

      desc "Install the devise security extension"

      def add_configs
        inject_into_file "config/initializers/devise.rb", "\n  # ==> Password Sharing Extension\n" +
        "  # config.enable_banning = true\n" +
        "  # config.geoip_database = '/var/tmp/geoip.dat'\n" +
        "  # config.time_frame = 2.hour\n" +
        "  # config.number_of_cities = 10\n" +
        "\n", :before => /end[ |\n|]+\Z/
      end

      def copy_white_listed_ips
        copy_file("white_listed_ips.yml", "config/white_listed_ips.yml")
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
devise_password_sharing_extension-0.1.4 lib/generators/devise_password_sharing_extension/install_generator.rb
devise_password_sharing_extension-0.1.3 lib/generators/devise_password_sharing_extension/install_generator.rb
devise_password_sharing_extension-0.1.1 lib/generators/devise_password_sharing_extension/install_generator.rb
devise_password_sharing_extension-0.0.15 lib/generators/devise_password_sharing_extension/install_generator.rb
devise_password_sharing_extension-0.0.14 lib/generators/devise_password_sharing_extension/install_generator.rb
devise_password_sharing_extension-0.0.13 lib/generators/devise_password_sharing_extension/install_generator.rb
devise_password_sharing_extension-0.0.12 lib/generators/devise_password_sharing_extension/install_generator.rb
devise_password_sharing_extension-0.0.11 lib/generators/devise_password_sharing_extension/install_generator.rb
devise_password_sharing_extension-0.0.10 lib/generators/devise_password_sharing_extension/install_generator.rb
devise_password_sharing_extension-0.0.9 lib/generators/devise_password_sharing_extension/install_generator.rb
devise_password_sharing_extension-0.0.8 lib/generators/devise_password_sharing_extension/install_generator.rb
devise_password_sharing_extension-0.0.7 lib/generators/devise_password_sharing_extension/install_generator.rb
devise_password_sharing_extension-0.0.6 lib/generators/devise_password_sharing_extension/install_generator.rb
devise_password_sharing_extension-0.0.5 lib/generators/devise_password_sharing_extension/install_generator.rb
devise_password_sharing_extension-0.0.4 lib/generators/devise_password_sharing_extension/install_generator.rb
devise_password_sharing_extension-0.0.2 lib/generators/devise_password_sharing_extension/install_generator.rb
devise_password_sharing_extension-0.0.1 lib/generators/devise_password_sharing_extension/install_generator.rb