FrameworkIdentificator Build Status Dependency Status Code Climate endorse

Identify the used application or testing frameworks in a given project.

Installation

Add this line to your application's Gemfile:

gem 'framework_identificator'

And then execute:

$ bundle

Or install it yourself as:

$ gem install framework_identificator

Usage

With a String object (project doesn't have tests (Berk))

FrameworkIdentificator.from(File.join("projects", "my_project"))
=> {:application=>#<FrameworkIdentificator::Frameworks::Rails:0x007fddec3c1028 @source="/Users/zedtux/projects/my_project", @project_name="MyProject">, :testing=>[]}

With a Pathname object (project use Rspec for unit test)

require "pathname"
FrameworkIdentificator.from(Pathname.new(File.join("projects", "my_project")))
=> {:application=>#<FrameworkIdentificator::Frameworks::Rails:0x007fddec3c1028 @source="/Users/zedtux/projects/my_project", @project_name="MyProject">, :testing=>[#<FrameworkIdentificator::TestingFrameworks::Rspec:0x007fd7ec3be3b0>]}

With a Git object (project use Rspec and Cucumber frameworks)

require "git"
FrameworkIdentificator.from(Git.clone("[email protected]:my_project", "my_project"))
=> {:application=>#<FrameworkIdentificator::Frameworks::Rails:0x007fddec3aff30 @source="/Users/zedtux/projects/my_project", @project_name="MyProject">, :testing=>[#<FrameworkIdentificator::TestingFrameworks::Cucumber:0x007fd7ec3be680>, #<FrameworkIdentificator::TestingFrameworks::Rspec:0x007fd7ec3be3b0>]}

Implemented

VCS

Frameworks

RSpec Cucumber
Rails

Contributing

You can contribute to this gem by adding support for new VCS or new frameworks.

Fork

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

New framework

This gem is built in order to allow easy contributions. To add a new framework, just add the new class in the lib/framework_identificator/application_frameworks/ that implement the method self.recognized?(source).

Have a look at the Rails framework class.