Coder Social home page Coder Social logo

grape-cli's Introduction

grape-cli Build Status Code Climate Gem Version

Grape-CLI is a gem for bootstraping standalone Grape application. It is heavily inspired by Rails/Ember generators.

Installation

Add this line to your application's Gemfile:

gem 'grape-cli'

And then execute:

$ bundle

Or install it yourself as:

$ gem install grape-cli

Usage

###New application Create new Grape app in current directory with provided application name

$ grape new application_name

For new command you can provide multiple options:

###Test framework

$ grape new application_name --test=minitest

will create new application with minitest as test framework, running new command without specifying --test option will setup application with RSpec as it's default one.

###Database

$ grape new application_name --database=postgres

will create new application with postgres as database, running new command without specifying --database option will setup application with sqlite as it's default one.

###Start application server

$ cd application_name
$ grape server

or

$ grape s

This command support all rackup parameters.

Go to http://localhost:9292/

###Start application console

$ grape console

or

$ grape c

###Run your application tets

$ grape test

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/elpassion/grape-cli. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

grape-cli's People

Contributors

ghostbuster91 avatar michalwarda avatar wswidzinski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

retgoat ifree321

grape-cli's Issues

Fix default test runner

When you set new application without specifying test option it sets minitest as test runner instead of rspec.

See PR - #26

Rake task error on Ubuntu.

Using grape-cli 0.2.5, ruby 2.2.4
After fresh install on Ubuntu I get a error when trying to run any rake task:

rake aborted!
LoadError: cannot load such file -- grape/activerecord/rake
.../testapp/Rakefile:3:in `<top (required)>'

It might be caused by grape-activerecord being deprecated.

I'm attaching my Lockfile also

GEM
  remote: http://rubygems.org/
  specs:
    activemodel (4.2.7.1)
      activesupport (= 4.2.7.1)
      builder (~> 3.1)
    activerecord (4.2.7.1)
      activemodel (= 4.2.7.1)
      activesupport (= 4.2.7.1)
      arel (~> 6.0)
    activesupport (4.2.7.1)
      i18n (~> 0.7)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.3, >= 0.3.4)
      tzinfo (~> 1.1)
    arel (6.0.3)
    axiom-types (0.1.1)
      descendants_tracker (~> 0.0.4)
      ice_nine (~> 0.11.0)
      thread_safe (~> 0.3, >= 0.3.1)
    builder (3.2.2)
    coderay (1.1.1)
    coercible (1.0.0)
      descendants_tracker (~> 0.0.1)
    descendants_tracker (0.0.4)
      thread_safe (~> 0.3, >= 0.3.1)
    diff-lcs (1.2.5)
    equalizer (0.0.11)
    grape (0.13.0)
      activesupport
      builder
      hashie (>= 2.1.0)
      multi_json (>= 1.3.2)
      multi_xml (>= 0.5.2)
      rack (>= 1.3.0)
      rack-accept
      rack-mount
      virtus (>= 1.0.0)
    grape-activerecord (2.2.0)
      otr-activerecord (~> 1.0)
    grape-entity (0.4.8)
      activesupport
      multi_json (>= 1.3.2)
    grape-swagger (0.10.5)
      grape (>= 0.10.0)
      grape-entity (< 0.5.0)
    hashie (3.4.6)
    hashie-forbidden_attributes (0.1.1)
      hashie (>= 3.0)
    i18n (0.7.0)
    ice_nine (0.11.2)
    json (1.8.3)
    method_source (0.8.2)
    minitest (5.9.1)
    multi_json (1.12.1)
    multi_xml (0.5.5)
    otr-activerecord (1.2.0)
      activerecord (>= 4.0, < 5.1)
      hashie-forbidden_attributes (~> 0.1)
    pry (0.10.4)
      coderay (~> 1.1.0)
      method_source (~> 0.8.1)
      slop (~> 3.4)
    rack (1.6.5)
    rack-accept (0.4.5)
      rack (>= 0.4)
    rack-mount (0.8.3)
      rack (>= 1.0.0)
    rack-test (0.6.3)
      rack (>= 1.0)
    rake (10.4.2)
    rspec (3.5.0)
      rspec-core (~> 3.5.0)
      rspec-expectations (~> 3.5.0)
      rspec-mocks (~> 3.5.0)
    rspec-core (3.5.4)
      rspec-support (~> 3.5.0)
    rspec-expectations (3.5.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.5.0)
    rspec-mocks (3.5.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.5.0)
    rspec-support (3.5.0)
    slop (3.6.0)
    sqlite3 (1.3.12)
    thread_safe (0.3.5)
    tzinfo (1.2.2)
      thread_safe (~> 0.1)
    virtus (1.0.5)
      axiom-types (~> 0.1)
      coercible (~> 1.0)
      descendants_tracker (~> 0.0, >= 0.0.3)
      equalizer (~> 0.0, >= 0.0.9)

PLATFORMS
  ruby

DEPENDENCIES
  activerecord (~> 4.2.1)
  grape (~> 0.13.0)
  grape-activerecord
  grape-swagger (~> 0.10.2)
  pry
  rack (~> 1.6.0)
  rack-test (~> 0.6.3)
  rake (~> 10.4.2)
  rspec (~> 3.3)
  sqlite3

BUNDLED WITH
   1.12.5

Add a testing framework to the generated folder

When I create a new project I should have a testing framework setup for the newly created application.
There might also be a possibility to pick one of test frameworks: rspec or minitest.

Add Readme

  • Travis CI badge
  • Code Climate badge
  • Describe method new
  • Describe method server
  • Describe method console

Add integration tests for full flow

For some odd reason sometimes we aren't able to catch a bug in the main scenario before release. We can try to fix some of the bugs with a full flow test. Hopefully it won't be too slow.

Add version number information to grape command.

It would be nice to see the current gem version when invoking the grape command.
Preferably on the very top of the cli.
If not than maybe add a command that would print the gem version - grape -v / --version.

Link to Contributor Covenant on README is broken

The link on the readme points to an unexisting file https://github.com/elpassion/grape-cli/blob/master/contributor-covenant.org

## Contributing

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

I think I know which contributor covenant you are talking about, but it's better if you specify it ๐Ÿ˜„

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.