Git Product home page Git Product logo

khusnetdinov / kazan Goto Github PK

View Code? Open in Web Editor NEW
26.0 2.0 4.0 145 KB

:bomb: Kazan creates rails project and setups predefined gems and tools. Env settings, Spec tools, Database settings, development tools. Bonuses for production.

Home Page: https://github.com/khusnetdinov/kazan

License: MIT License

Ruby 90.87% Shell 0.24% HTML 8.80% SCSS 0.09%
ruby rails kazan-creates-rails rspec kazan rails-application boilerplate-application

kazan's Introduction

Kazan Build Status Dependency Status Code Climate Gem Version Open Source Helpers

Kazan creates rails project and setups predefined gems and tools.

img

Installation

Install gem:

$ gem install kazan

Usage

By default this rails application generator uses PostgreSQL as db and RSpec as test framework. Also it installs and setups a lot usefull gems, and you don't need waste time then you stat new project.

Just run:

$ kazan projectname

This generator maps all flags to rails native generator, for example you can create api application:

$ kazan projectname --api

See all gems that will be installed to project in Gemfile for web application or for api Gemfile.api.

Gems

It includes applications gems:

  • Dotenv Shim to load environment variables from .env into ENV in development.
  • I18n is central point to collect locale data for use in Ruby on Rails.
  • MetaTags a gem to make your Rails application SEO-friendly. Gem is not generated if --api is selected.
  • PostgreSQL database with PG adapter is used by defaul.
  • Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications.
  • Rack Timeout aborts requests that are taking too long; an exception is raised.
  • Rails 5.2.0
  • Rails Config helps you easily manage environment specific settings in an easy and usable manner.
  • Rollbar error monitoring fits right into your continuous delivery and deployment workflows to provide confidence in every code release.
  • Simple From [API EXCLUDED] aims to be as flexible as possible while helping you with powerful components to create your forms.

It includes assets gems [API EXCLUDED]:

  • Normalize Css makes browsers render all elements more consistently and in line with modern standards. It precisely targets only the styles that need normalizing.
  • Sass is the most mature, stable, and powerful professional grade CSS extension language in the world.

It includes development gems:

  • Annotate adds a comment summarizing the current schema.
  • Awesome Print prints pretty Ruby objects in full color exposing their internal structure with proper indentation.
  • Better Errors [API EXCLUDED] replaces the standard Rails error page with a much better and more useful error page.
  • Brakeman is an open source static analysis tool which checks Ruby on Rails applications for security vulnerabilities.
  • ByeBug is a simple to use, feature rich debugger for Ruby 2.
  • Bundler Audit is patch-level verification for bundler.
  • Bullet is designed to help you increase your application's performance by reducing the number of queries it makes.
  • Foreman procfile-based applications.
  • Letter Opener previews email in the default browser instead of sending it.
  • Listen listens to file modifications and notifies you about the changes.
  • Pry for interactively exploring objects.
  • Rack Mini Profiler [API EXCLUDED] displays speed badge for every html page.
  • Reek - code smell detector for Ruby.
  • RuboCop is a Ruby static code analyzer. Out of the box it will enforce many of the guidelines outlined in the community Ruby Style Guide.
  • scss-lint is a tool to help keep your SCSS files clean and readable by running it against a collection of configurable linter rules.
  • Spring speeds up development by keeping your application running in the background.
  • Web Console [API EXCLUDED] is a debugging tool for your Ruby on Rails applications.

It includes tests gems:

  • Capybara [API EXCLUDED] helps you test web applications by simulating how a real user would interact with your app.
  • Database Cleaner is a set of strategies for cleaning your database in Ruby.
  • Factory Bot is a fixtures replacement with a straightforward definition syntax.
  • Faker a port of Perl's Data::Faker library that generates fake data.
  • Formulaic [API EXCLUDED] the tedium of formulaic form filling with Capybara.
  • I18n-Tasks [API EXCLUDED] Gem that helps manage locales and test if are there problems.
  • I18n-Yaml-Sorter [API EXCLUDED] Sort all locales by keys.
  • Launchy [API EXCLUDED] helper class for launching cross-platform applications in a fire and forget manner.
  • Rspec is a testing framework for Rails.
  • Simplecov is a code coverage analysis tool for Ruby.
  • Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that test common Rails functionality.
  • Timecop providing "time travel" and "time freezing" capabilities, making it dead simple to test time-dependent code.
  • Web Mock for stubbing and setting expectations on HTTP requests in Ruby.

Bonuses

  • t() and l() in specs without prefixing with I18n.
  • Low database connection pool limit.
  • Rails' flashes set up and in application layout.
  • Rack::Deflater to compress responses with Gzip.
  • Safe binstubs.
  • Ready Seo controller with methods for generating files - robots.txt, sitemap.xml.

License

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

kazan's People

Contributors

alkp avatar khusnetdinov avatar reabiliti avatar

Stargazers

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

Watchers

 avatar  avatar

kazan's Issues

Fix bitters error

/Users/khusnetdinov/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:2158:in method_missing': undefined method this' for #<Gem::Specification:0x3ffce14abd34 bitters-1.4.0> (NoMethodError)
from /Users/khusnetdinov/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1057:in find_active_stub_by_path' from /Users/khusnetdinov/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:64:in require'
from /Users/khusnetdinov/.rvm/gems/ruby-2.3.1/gems/bitters-1.4.0/lib/bitters.rb:1:in <top (required)>' from /Users/khusnetdinov/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in require'
from /Users/khusnetdinov/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in require' from /Users/khusnetdinov/.rvm/gems/ruby-2.3.1/gems/bitters-1.4.0/bin/bitters:3:in <top (required)>'
from /Users/khusnetdinov/.rvm/gems/ruby-2.3.1/bin/bitters:23:in load' from /Users/khusnetdinov/.rvm/gems/ruby-2.3.1/bin/bitters:23:in

'
from /Users/khusnetdinov/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in eval' from /Users/khusnetdinov/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in '

Kazanfile

Configuration for kazan based on file

Folder structures

Generated app
-- integrations
-- mailers

gem
-- files templates
-- specs templates
-- quality templates

Features

--features
--separate features

SeoController

robots.txt
sitemap

Copy implementation from JuniorJobs

Add bin/qa for checking quality [rubocop, reek, breakman, rspec]

#!/usr/bin/env sh

set -e

bin/quality
bin/bundler_audit
bin/rspec spec

#!/usr/bin/env ruby

require 'json'

def handle_cops(warnings_actual, warnings_max, linter)
if warnings_actual > warnings_max
puts "количество предупреждений для '#{linter}' не должно превышать #{warnings_max} (сейчас #{warnings_actual})"
exit(1)
else
puts "#{linter}: количество предупреждений - #{warnings_actual}/#{warnings_max}"
end
end

rubocop warnings

output = bin/rubocop --format json
warnings_actual = JSON.parse(output)['summary']['offense_count']
warnings_max = 262
handle_cops(warnings_actual, warnings_max, 'rubocop')

reek warnings

output = bin/reek --format json
warnings_actual = JSON.parse(output).size
warnings_max = 1
handle_cops(warnings_actual, warnings_max, 'reek')

brakeman warnings

output = bin/brakeman --quiet --skip-libs -f json
warnings_actual = JSON.parse(output)['scan_info']['security_warnings']
warnings_max = 0
handle_cops(warnings_actual, warnings_max, 'brakeman')

slim-lint warnings

output = bin/slim-lint app/views --reporter json
warnings_actual = JSON.parse(output)['summary']['offense_count']
warnings_max = 1960
handle_cops(warnings_actual, warnings_max, 'slim-lint')

#!/usr/bin/env ruby

frozen_string_literal: true

This file was generated by Bundler.

The application 'bundle-audit' is installed as part of a gem, and

this file is here to facilitate running it.

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', Pathname.new(FILE).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('bundler-audit', 'bundle-audit')

#!/usr/bin/env ruby

frozen_string_literal: true

This file was generated by Bundler.

The application 'brakeman' is installed as part of a gem, and

this file is here to facilitate running it.

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', Pathname.new(FILE).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('brakeman', 'brakeman')

#!/usr/bin/env ruby

frozen_string_literal: true

This file was generated by Bundler.

The application 'reek' is installed as part of a gem, and

this file is here to facilitate running it.

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', Pathname.new(FILE).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('reek', 'reek')

#!/usr/bin/env ruby

frozen_string_literal: true

This file was generated by Bundler.

The application 'rubocop' is installed as part of a gem, and

this file is here to facilitate running it.

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', Pathname.new(FILE).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('rubocop', 'rubocop')

MetaTags

Add meta tags helpers line JuniorJobs implementation

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.