Giter VIP home page Giter VIP logo

arcanist-extensions's Introduction

Arcanist Extensions

This project provides some useful extensions for Arcanist.

Extensions

Installation

The easiest way to use any of these extensions on your own project, is by adding this repository as a git submodule, given you are using git (which you obviously should):

$ git submodule add https://github.com/tagview/arcanist-extensions.git .arcanist-extensions
$ git submodule update --init

Then, just list the desired extensions on the load key of your project's .arcconfig file.

{
  "project_id": "my-awesome-project",
  "conduit_uri": "https://example.org",

  "load": [
    ".arcanist-extensions/[extension_name]"
  ]
}

Available extensions

multi_test_engine

This extension allows you to run tests with multiple test engines. It is usefull when your project has code writen in more than one programming language, or when your project uses two different testing frameworks.

Below is an example of an .arcconfig that runs both Ruby tests - with the RSpecTestEngine - and Python tests - with Arcanist's native PytestTestEngine:

{
  "project_id": "my-awesome-project",
  "conduit_uri": "https://example.org",

  "load": [
    ".arcanist-extensions/rspec_test_engine",
    ".arcanist-extensions/multi_test_engine"
  ],

  "unit.engine": "MultiTestEngine",
  "unit.engine.multi-test.engines": ["RSpecTestEngine", "PytestTestEngine"]
}

You can also define some specific configuration for each engine. Below is an example that uses two TAPTestEngines with different commands:

{
  "project_id": "my-awesome-project",
  "conduit_uri": "https://example.org",

  "load": [
    ".arcanist-extensions/rspec_test_engine",
    ".arcanist-extensions/tap_test_engine",
    ".arcanist-extensions/multi_test_engine"
  ],

  "unit.engine": "MultiTestEngine",
  "unit.engine.multi-test.engines": [
    "RSpecTestEngine",
    {
      "engine": "TAPTestEngine",
      "unit.engine.tap.command": "bundle exec teaspoon -f tap"
    },
    {
      "engine": "TAPTestEngine",
      "unit.engine.tap.command": "karma run spec/js/karma.conf"
    }
  ]
}

rspec_test_engine

This extension allows you to run tests with RSpec (version 2 or later). To use it, just set your test engine as RSpecTestEngine:

{
  "project_id": "my-awesome-project",
  "conduit_uri": "https://example.org",

  "load": [
    ".arcanist-extensions/rspec_test_engine"
  ],

  "unit.engine": "RSpecTestEngine"
}

You can change the rspec executable path if it for some reason is not found in your $PATH variable (maybe you are using Bundler without binstubs):

{
  "project_id": "my-awesome-project",
  "conduit_uri": "https://example.org",

  "load": [
    ".arcanist-extensions/rspec_test_engine"
  ],

  "unit.engine": "RSpecTestEngine",
  "unit.engine.rspec.command": "bundle exec rspec"
}

rubocop_linter

This extension will lint your project using the awesome Rubocop library. It is important to mention that the extension won't install Rubocop, so you must do it manually. Just make sure you have the rubocop executable listed on your $PATH.

Below is an example of an .arclint file that includes the Rubocop Linter:

{
  "linters": {
    "ruby": {
      "type": "rubocop",
      "include": "/\\.(rb|rake)$/",
      "exclude": "(^db/schema\\.rb)"
    }
  }
}

If you need to customize the default style rules, just create a .rubocop.yml file on the root of your project as usual.

For more information regarding Arcanist linters configuration, access the Arcanist Lint User Guide.

tap_test_engine

This extension implements a generic TAP test engine, so Arcanist may run tests from any tool that has a TAP compatible output.

To use this extension, you must inform the command that will run your tests (just make sure that this command returns a TAP formatted output on STDOUT):

{
  "project_id": "my-awesome-project",
  "conduit_uri": "https://example.org",

  "load": [
    ".arcanist-extensions/tap_test_engine"
  ],

  "unit.engine": "TAPTestEngine",
  "unit.engine.tap.command": "bundle exec rake spec"
}

eslint_linter

This extension will lint your project using ESlint. It is important to mention that the extension won't install ESlint, so you must do it manually. Just make sure you have the eslint executable listed on your $PATH.

Below is an example of an .arclint file that includes the ESlint Linter:

{
  "linters": {
    "javascript": {
      "type": "eslint",
      "include": "/\\.js$/"
    }
  }
}

License

(The MIT License)

Copyright (c) 2015 Tagview Tecnologia [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

arcanist-extensions's People

Contributors

reu avatar mpelos avatar alexandremello avatar jgable avatar jaredly avatar viniciusvgv avatar

Watchers

Julia Otranto Aulicino 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.