GithubHelp home page GithubHelp logo

emileswarts / abcing Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 51 KB

Idiot metrics. Checks your application for class names and tries to match them by first letter in your tests.

License: MIT License

Ruby 100.00%

abcing's Introduction

ABCing

ABCing Gem Version ABCing Travis build Gem downloads Code Climate Test Coverage abcing gem

Green letter

It matches 'class Foo' in your application.

It matches 'Foo' in your test suite.

Yellow letter

There is no class name starting with that letter.

Red letter

It matches 'class Foo' in your application.

It does not match 'Foo' in your test suite.

This is also lenient in the way that it scores green letters. If you have defined two classes Foo, and Foosball, and you only have a test for Foo, you will still get a green letter.

To get a red letter means that any class name starting with that letter is not present in your test suite.

Usage

$ abcing /path/to/project/root

Right now this will check /path/to/project/root/spec and /path/to/project/root/features to find test files. It will use app/ and lib/ to find classes that should be tested.

Installation

Add this line to your application's Gemfile:

gem 'abcing'

And then execute:

$ bundle

Or install it yourself as:

$ gem install abcing

Run the tests

$ bundle exec rspec

Contributing

  1. Fork it ( https://github.com/emileswarts/abcing/fork )
  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 a new Pull Request

TODO

  1. Check for presence of config file for scan params
  2. Add verbose mode that mentions the class names scanned for results
  3. Add score results
  4. Improve performance
  5. Create badge for results to be used on github
  6. Add strict mode

Overview

[ Class names ] -> AlphabetMatch.letters -> [ Class letters ]

[ Directories ] -> ClassFileFinder.find -> [ Files ]

[ Contents ] -> ClassNameFinder.find -> [ Class names ]

[ Test letters, App letters ] -> ColourAlphabetResult.calculate -> { colour => letter }

Root working directory -> Runner.run -> Renderer.render

{ Scan Results } -> Renderer.render -> IO

abcing's People

Contributors

emileswarts avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.