Giter Club home page Giter Club logo

toolbox's Introduction

##db_assets_manager

Easily work with views and functions.

Put plain SQL queries for views into RAILS_ROOT/db/views/<view_name>.sql
Put function declarations into RAILS_ROOT/db/functions/<function_name>.sql

You can create/destroy assets using db:assets:create and db:assets:destroy rake tasks. Also, db:assets:create runs automatically after db:migrate.

##jss_template

Provides plain templates to clientside JS.

Put HTMLs you want in JS somewhere in assets subdirectory, give them jss extension.
They will be bundled into JSS top-level JavaScript object respecting paths to them.

For example, app/assets/javascripts/templates/posts/index.jss will be available as String by JSS.templates.posts.index.

##js_routes

Provides access from js code to all your application named routes. In Rails version > 3.1 just require 'routes.js' in your js files or directly include it into view.

You can hide some important routes from js, for example: get '/some_secret_route', :to => 'secret_controller#secret_action', :hidden => true

##monkey_patcher

Requirer and autoreloader (in development) for monkey patches. Just put your monkey patch files into <rails_root>/lib/monkey_patches directory and relax.

##email_validator

Email validation support (see http://my.rails-royce.org/2010/07/21/email-validation-in-ruby-on-rails-without-regexp/ for details). Usage: validates :user_email, email: true

##retryable

Options:

  • :tries - Number of retries to perform. Defaults to 1.
  • :on - The Exception on which a retry will be performed. Defaults to Exception, which retries on any Exception.
  • :sleep - Interval between tries in sec. Defaults to 1.

Usage:

retryable(:tries => 1, :on => OpenURI::HTTPError) do
    # your code here
end

##request_variables

Add remember declaration to application_controller (or somewhere)

class ApplicationController
  include RequestVariables::Support
  remember_request_variables :current_user
end

Use variables anywhere RequestVariables.current_user

##Installation:

git "git://github.com/cloudcastle/toolbox.git" do
  gem "db_assets_manager"
  gem "jss_template"
end

toolbox's People

Contributors

st8998 avatar flamefork avatar sergey-koumirov avatar strikeroff avatar holywarez avatar art-orlov avatar

Watchers

 avatar Anton Gunkin avatar  avatar Denis Kokin avatar  avatar Sergey Budaev avatar Alex Gorkunov avatar Vadim avatar Alexandr Subbotin avatar Nikolai Gorodnov avatar  avatar James Cloos avatar  avatar Nick Chubarov avatar Max Drozdoff avatar Dmitri Grishin avatar Vladimir Nudelman avatar Pavel Semushin avatar Vladimir Vasilev avatar Roman Lugovtsev avatar Egor Gorobetz avatar Anton Shabanov avatar Pavel Petrov avatar Aleksandr Shugurov avatar Evgeniy Trofimov avatar Vlad Kurochkin avatar Nickolay Loshkarev avatar Eugene Chernov avatar  avatar Yuriy Pavlov avatar Alexey Nikitin avatar Ivan Gordeev 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.