Here are some good practices about communication within an Agile project.
There are some general rules about stories. A story:
- can't be started if it's not estimated
- can't be estimated if it's not clear enough
Jenkins is the name of server we use right. SemaphoreApp is the service which we'd like to use instead.
Newer project:
Test | Semaphore | Jenkins | TravisCI | CircleCI |
---|---|---|---|---|
Master | 2:08 | 5:28 | 3:42 | 1:59 |
Integration | 2:23 | 7:45 | 5:05 | 2:30 |
class ApplicationController < ActionController::Base | |
# Prevent CSRF attacks by raising an exception. | |
# For APIs, you may want to use :null_session instead. | |
#protect_from_forgery with: :exception | |
before_action :set_headers | |
def set_headers | |
headers["Endpoint-Purpose"] = "point_of_sale" | |
if Rails.env.development? |
Dynamically typed vs statically typed
# Example 1
def order(user, shipping_method, cart)
# ...
end
Tell Don't Ask
The code at https://github.com/kurko/ember-sync/blob/master/dist/ember-sync.js#L640-L666 would become something like this:
setRelationships: function(pendingRecord) {
var _this = this,
offlineRecord = this.get('offlineRecord'),
type = this.get('jobRecord.jobRecordType');
// ====== new code =======
return new Ember.RSVP.Promise(function(resolveRelationships, reject) {
/**
diff --cc lib/active_model/serializer/adapter/json_api.rb | |
index f604b67,cd8de8e..0000000 | |
--- a/lib/active_model/serializer/adapter/json_api.rb | |
+++ b/lib/active_model/serializer/adapter/json_api.rb | |
@@@ -16,18 -17,19 +17,33 @@@ module ActiveMode | |
end | |
def serializable_hash(options = {}) | |
+ @root = (@options[:root] || serializer.json_key.to_s.pluralize).to_sym | |
+ |
# Given | |
# /auth/:section_token/?redirect_url=:redirection_with_token/?option=:option | |
entity = Instructor.find(5) | |
# this is a token that expires | |
confirmation_token = TokenModel.new_for_entity( | |
entity_id: entity.token, | |
type: :confirmation | |
) |
<?php | |
/* | |
* NÃO USE ESTE SCRIPT SOBRE ARQUIVOS UTF-8! VOCẼ PERDERÁ TUDO. | |
* | |
* Não use este arquivo sem fazer Backup dos arquivos antes. | |
* | |
* Alterações necessárias: | |
* - verificar se o arquivo atual é ISO-8859-1 realmente. | |
* - verificar se é um arquivo de texto (transformar imagens vai inutilizá-las | |
*/ |
(2.2.0p0, Rails 4.2.0) ~/src/app (production↓) | |
→ git status | |
On branch production | |
Your branch is behind 'origin/production' by 26 commits, and can be fast-forwarded. | |
(use "git pull" to update your local branch) | |
Changes not staged for commit: | |
(use "git add <file>..." to update what will be committed) | |
(use "git checkout -- <file>..." to discard changes in working directory) | |
modified: Gemfile.lock |
/* | |
event_handler.js adds a layer for setting variables in Javascript | |
and calling a callback whenever it is changed. | |
You won't need to call a function manually to update your view. | |
This method makes it easy to separated view-logic from business-logic | |
at Javascript level, and let things run automatically. | |
*/ |