I hereby claim:
- I am cpetschnig on github.
- I am cpetschnig (https://keybase.io/cpetschnig) on keybase.
- I have a public key whose fingerprint is 9C87 90ED 6ACD 9EF8 DE5C 06D8 B28E 2784 2E6B F4AD
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# encoding: UTF-8 | |
require 'active_support/all' | |
MONTHS = %w(Januar Februar März April Mai Juni Juli August September Oktober November Dezember) | |
DAYS = %w(So Mo Di Mi Do Fr Sa) | |
year = 2016 | |
months = (1..12).map do |month| |
# Put the following line into the config section in config/application.rb: | |
# | |
# config.middleware.use RackAPILogger | |
class RackAPILogger | |
def initialize(app) | |
@app = app | |
end | |
def call(env) |
module MyEngine | |
class Engine < ::Rails::Engine | |
# Autoload from the lib directory | |
config.autoload_paths << File.expand_path('../../', __FILE__) | |
config.my_engine = MyEngine::Configuration.new | |
# default configuration | |
config.my_engine.foo.class_for_bar = MyEngine::Bar |
# fetch remote tags: | |
$ git fetch --tags origin | |
# list all remote tags: | |
$ git ls-remote --tags | |
# list all major version tags: | |
$ git ls-remote --tags | grep -oe "refs/tags[^\^]*" | uniq | grep -E "v2[0-9][0-9][0-9]-[0-9][0-9]$" | |
# delete all non-version tags: |
Engine | |
====== | |
File structure: | |
EngineFoo | |
- app | |
- db | |
- seeds.rb |
sudo apt-get install git curl build-essential bison openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev libffi-dev tk-dev |
require 'looksee' | |
Looksee.styles.each_key { |key| Looksee.styles[key] = "%s" } |
require 'active_support/buffered_logger' | |
class ActiveSupport::BufferedLogger | |
def add(severity, message = nil, progname = nil, &block) | |
add_debugging_details(severity) | |
@log.add(severity, message, progname, &block) | |
end | |
private |
class I18n::Backend::Simple | |
module Implementation | |
protected | |
def lookup(locale, key, scope = [], options = {}) | |
init_translations unless initialized? | |
keys = I18n.normalize_keys(locale, key, scope, options[:separator]) | |
keys.inject(translations) do |result, _key| |