Commitar uma feature
git add . => Adiciona todas as mudanças
git commit -a -m "<mensagem do commit>"
git push origin staging
Sincronizar
namespace :deploy do | |
task :setup_solr_data_dir do | |
run "mkdir -p #{shared_path}/solr/data" | |
end | |
end | |
namespace :solr do | |
desc "start solr" | |
task :start, :roles => :app, :except => { :no_release => true } do | |
run "cd #{current_path} && RAILS_ENV=#{rails_env} bundle exec sunspot-solr start --port=8983 --data-directory=#{shared_path}/solr/data --pid-dir=#{shared_path}/pids" |
module ClassProperty | |
macro class_property(*names) | |
class_getter {{*names}} | |
class_setter {{*names}} | |
end | |
macro class_property?(*names) | |
class_getter? {{*names}} | |
class_setter {{*names}} | |
end |
require "crystal_executer/version" | |
require "active_support/core_ext/hash" | |
require "benchmark" | |
module ModuleBench | |
class Runner | |
def self.exec path, params = {} | |
m1 = Benchmark.bm do |x| | |
x.report("Ruby") do | |
a = [] |
development: | |
encoding: utf8 | |
port: 5432 | |
database: development | |
username: username | |
password: | |
host: localhost | |
--- | |
test: | |
encoding: utf8 |
development: | |
encoding: utf8 | |
port: 5432 | |
database: development | |
username: username | |
password: | |
host: localhost | |
--- | |
test: | |
encoding: utf8 |
Error in ./boot.cr:12: instantiating 'Importation::Base#import()' | |
Importation::Base.new(App.new).import | |
^~~~~~ | |
in ./app/importation/base.cr:31: instantiating 'Importation::Runner#run()' | |
Importation::Runner.new(self, path).run | |
^~~ |
def search_city(city = "") | |
until hashcity.include?(city) do | |
city = gets.chomp | |
end | |
end |
var IApp = (function() { | |
var InterfaceApp = function() { | |
this.run = function(obj, vars) { | |
if(obj == null) { obj = this.modules; } | |
if(vars !== undefined) { this.addGlobals(vars); } | |
this.callEvents(obj); | |
}; |
# Depende da gem exceptions-resource, só procurar no meu git que você encontra | |
module Statusable | |
extend ActiveSupport::Concern | |
included do | |
available_statuses.each do |status| | |
scope status, -> { where(status: status) } | |
end | |
end |