<commit_before># ActsAsPluggable

Make a rails app pluggable

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'acts_as_pluggable'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install acts_as_pluggable

## Usage

Add following line in Gemfile
```ruby
  gem 'acts_as_pluggable',github: 'tachyons/acts_as_pluggable'
  Dir[File.join(File.dirname(__FILE__), '/plugins/*')].each do |plugin_dir|
    gem(File.basename(plugin_dir), path: plugin_dir)
  end
```

```
rails plugin new 'plugins/sample_plugin --full'
```

Now register plugin from engine.rb
Eg,
```ruby
module SamplePlugin
  class Engine < ::Rails::Engine
    if defined?(ActsAsPluggable)
      ::ActsAsPluggable::Plugin.register(:sample_plugin,:sample_tag,{
        :engine=>self,
        :description=>"sample description",
        :website=> "https://github.com/tachyons/acts_as_pluggable",
        :author=> "<NAME>",
        :version=>SamplePlugin::VERSION,
        :settings=>{
          :display_in_topbar=>true
        }
        })
    end
  end
end
```
## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/acts_as_pluggable. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.


## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).<commit_msg>added feature list<commit_after># ActsAsPluggable

Make a rails app pluggable

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'acts_as_pluggable'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install acts_as_pluggable

## Usage

Add following line in Gemfile
```ruby
  gem 'acts_as_pluggable',github: 'tachyons/acts_as_pluggable'
  Dir[File.join(File.dirname(__FILE__), '/plugins/*')].each do |plugin_dir|
    gem(File.basename(plugin_dir), path: plugin_dir)
  end
```

```
rails plugin new 'plugins/sample_plugin --full'
```

Now register plugin from engine.rb
Eg,
```ruby
module SamplePlugin
  class Engine < ::Rails::Engine
    if defined?(ActsAsPluggable)
      ::ActsAsPluggable::Plugin.register(:sample_plugin,:sample_tag,{
        :engine=>self,
        :description=>"sample description",
        :website=> "https://github.com/tachyons/acts_as_pluggable",
        :author=> "<NAME>",
        :version=>SamplePlugin::VERSION,
        :settings=>{
          :display_in_topbar=>true
        }
        })
    end
  end
end
```
## Features

- [x] Loading plugins from plugin folder
- [x] Registering plugins using hash
- [x] Iterate through plugins
- [ ] Activate/Inactivate plugins
- [ ] Configuration to select list of plugins to be loaded
- [ ] Testing the plugin on the context of main app
- [ ] DSL for registering the plugin
- [ ] Generic way for making and registering application hooks


## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/tachyons/acts_as_pluggable. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.


## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
{'fraction_non_alphanumeric': 0.10357063650476823, 'fraction_numerical': 0.0, 'mean_word_length': 4.005549389567148, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6376156', 'n_tokens_mistral': 1369, 'n_tokens_neox': 1304, 'n_words': 488}