nykma / faxtu

ファッ?! Another RoR scaffold?!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ファッ?!

Built with GH60 Built with Spacemacs Build Status


class FaxtuReadMe
  AUTHOR = "Nyk Ma <moe@nayuki.info>"
  DOCKER_COMPOSE_AVAILABLE = (`which docker-compose` != '') &&
                             (`docker-compose -v` > 'docker-compose version 1.6.0')

  def self.description
    "My RoR scaffold with only JSON API stuff.\n使って、どうぞ。"
  end

  def self.based_on
    based_on_list = {
      ruby: File.read(Rails.root.join('.ruby-version'))
    }

    unless DOCKER_COMPOSE_AVAILABLE
      based_on_list.merge!(
        postgres: '>= 9.6',
        redis: '>= 3.2'
      )
    end

    based_on_list
  end

  def self.highlight
    [
      'Multi-login',
      'Authorization',
      'Version-friendly API',
      'Sentry intergrated',
      'API-blueprint based document',
      'Reasonable Rubocop config'
    ].join("\n")
  end

  def self.preparation
    `git clone https://github.com/nykma/faxtu.git && cd faxtu`
    `cp config/application.sample.yml config/application.yml`
    `ag --nocolor -l NEED_MODIFY | xargs emacsclient -t`
    `bundle i`
    `docker-compose up -d` if DOCKER_COMPOSE_AVAILABLE
    `bin/rails db:create db:schema:load`
    `bin/rails spec`

    true
  end


  def self.main_components
    {
      main: %w(
        rack-cors
        figaro
        devise
        grape
        grape-entity
      ),
      development: %w(
        rubocop
      ),
      test: %w(
        rspec-rails
        factory_girl
        faker
      )
    }
  end

  def self.license
    File.read(Rails.root.join('MIT-LICENSE').to_s)
  end
end

About

ファッ?! Another RoR scaffold?!

License:MIT License


Languages

Language:Ruby 99.6%Language:HTML 0.4%