0
Ecossistema
Ruby
Fabio Akita
@akitaonrails
codeminer42.com
9 ANOS!
Rails 3.2.14-rc1
Rails 4.0.0
Ruby 1.9.3 p429
Ruby 2.0.0 p195
JRuby 1.7.4 (Java 7)
Repositórios
http://u.akita.ws/git
https://help.github.com/articles/using-pull-requests
git checkout master
git checkout -b new_branch
git commit -a -m“new change”
git push origin new_branch
git checkout master
git checkout -b new_branch
git commit -a -m“new change”
git push origin new_branch
git checkout master
git checkout -b new_branch
git commit -a -m“new change”
git push origin new_branch
git checkout master
git checkout -b new_branch
git commit -a -m“new change”
git push origin new_branch
Desenvolvimento
vagrant init precise32 http://
files.vagrantup.com/precise32.box
vagrant up
vagrant ssh
vagrant halt
vagrant init precise32 http://
files.vagrantup.com/precise32.box
vagrant up
vagrant ssh
vagrant halt
vagrant init precise32 http://
files.vagrantup.com/precise32.box
vagrant up
vagrant ssh
vagrant halt
vagrant init precise32 http://
files.vagrantup.com/precise32.box
vagrant up
vagrant ssh
vagrant halt
brew install ack ctags git macvim
wget zsh
sh -c "`curl -fsSL https://
raw.github.com/skwp/dotfiles/
master/install.sh`"
cd ~/.yadr; rake update
sh -c "`curl -fsSL https://
raw.github.com/skwp/dotfiles/
master/install.sh`"
cd ~/.yadr; rake update
http://u.akita.ws/vim
Continuous
Integration (CI)
Exceptions
Tracking
# Gemfile
group :production do
gem 'airbrake'
end
# config/initializers/errbit.rb
if defined?(Airbrake)
Airbrake.configure...
MyApp::Application.config.middleware.use ExceptionNotification::Rack,
:email => {
:email_prefix => "[MyApp] ",
:sender_add...
Code Quality
gem install brakeman
brakeman -o report.html
gem install rails_best_practices
rails_best_practices -f html .
gem install excellent
excellent -o excellent.html .
# spec/spec_helper.rb
require 'simplecov'
SimpleCov.start 'rails'
CDN
http://u.akita.ws/assets
Full Text Search
# Gemfile
gem 'sunspot_rails'
gem "sunspot_with_kaminari"
group :development do
gem 'sunspot_solr'
gem 'progress_bar'
end
# config/sunspot.yml
production:
solr:
hostname: index.websolr.com
port: 80
log_level: WARNING
path: /solr/69xxxxxxx39
# r...
# app/models/document.rb
class Document < ActiveRecord::Base
searchable do
text :title, :more_like_this => true
text :exce...
<form id="formsearch" method="get" action="<%= searches_url %>">
<input type="text" name="q" />
</form>
class SearchesController < ApplicationController
def index
page = params[:page] || 1
query = (params[:q] || "").strip
@pos...
Mensagens
Assíncronas
<script src="http://js.pusher.com/2.1/pusher.min.js"></script>
<script>
var pusher = new Pusher('SUA_CHAVE');
var channel ...
require 'pusher'
Pusher.app_id = 'APP_ID'
Pusher.key = 'APP_KEY'
Pusher.secret = 'APP_SECRET'
class HelloWorldController <...
Web Servers
gem install passenger
sudo passenger-install-nginx-
module
http://u.akita.ws/ubuntu1204
heroku create
git push heroku master
gem install af
af push --runtime ruby193
af update sua_aplicacao
af restart sua_aplicacao
gem install af
af push --runtime ruby193
af update sua_aplicacao
af restart sua_aplicacao
gem install af
af push --runtime ruby193
af update sua_aplicacao
af restart sua_aplicacao
gem install af
af push --runtime ruby193
af update sua_aplicacao
af restart sua_aplicacao
iOS Backend
gem install helios
helios new myapp
createdb -h localhost myapp
cd myapp && helios start
# Gemfile
gem 'helios'
gem 'pg'
# config/application.rb
config.middleware.use Helios::Application do
service :data, model:...
Educação
Thanks!
@akitaonrails
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Upcoming SlideShare
Loading in...5
×

Tdc 2013 - Ecossistema Ruby

1,446

Published on

As diversas ferramentas e serviços disponíveis no mundo Ruby para facilitar seu desenvolvimento e que tornam produtos feitos em Ruby cada vez melhores

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,446
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
27
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Transcript of "Tdc 2013 - Ecossistema Ruby"

  1. 1. Ecossistema Ruby Fabio Akita @akitaonrails codeminer42.com
  2. 2. 9 ANOS!
  3. 3. Rails 3.2.14-rc1 Rails 4.0.0
  4. 4. Ruby 1.9.3 p429 Ruby 2.0.0 p195 JRuby 1.7.4 (Java 7)
  5. 5. Repositórios
  6. 6. http://u.akita.ws/git
  7. 7. https://help.github.com/articles/using-pull-requests
  8. 8. git checkout master git checkout -b new_branch git commit -a -m“new change” git push origin new_branch
  9. 9. git checkout master git checkout -b new_branch git commit -a -m“new change” git push origin new_branch
  10. 10. git checkout master git checkout -b new_branch git commit -a -m“new change” git push origin new_branch
  11. 11. git checkout master git checkout -b new_branch git commit -a -m“new change” git push origin new_branch
  12. 12. Desenvolvimento
  13. 13. vagrant init precise32 http:// files.vagrantup.com/precise32.box vagrant up vagrant ssh vagrant halt
  14. 14. vagrant init precise32 http:// files.vagrantup.com/precise32.box vagrant up vagrant ssh vagrant halt
  15. 15. vagrant init precise32 http:// files.vagrantup.com/precise32.box vagrant up vagrant ssh vagrant halt
  16. 16. vagrant init precise32 http:// files.vagrantup.com/precise32.box vagrant up vagrant ssh vagrant halt
  17. 17. brew install ack ctags git macvim wget zsh
  18. 18. sh -c "`curl -fsSL https:// raw.github.com/skwp/dotfiles/ master/install.sh`" cd ~/.yadr; rake update
  19. 19. sh -c "`curl -fsSL https:// raw.github.com/skwp/dotfiles/ master/install.sh`" cd ~/.yadr; rake update
  20. 20. http://u.akita.ws/vim
  21. 21. Continuous Integration (CI)
  22. 22. Exceptions Tracking
  23. 23. # Gemfile group :production do gem 'airbrake' end # config/initializers/errbit.rb if defined?(Airbrake) Airbrake.configure do |config| config.api_key = 'SUA_CHAVE' config.host = 'errbit.cm42.io' config.port = 80 config.secure = config.port == 443 end end
  24. 24. MyApp::Application.config.middleware.use ExceptionNotification::Rack, :email => { :email_prefix => "[MyApp] ", :sender_address => %{"notifier" <notifier@mycompany.com>}, :exception_recipients => %w{developers@mycompany.com} }
  25. 25. Code Quality
  26. 26. gem install brakeman brakeman -o report.html
  27. 27. gem install rails_best_practices rails_best_practices -f html .
  28. 28. gem install excellent excellent -o excellent.html .
  29. 29. # spec/spec_helper.rb require 'simplecov' SimpleCov.start 'rails'
  30. 30. CDN
  31. 31. http://u.akita.ws/assets
  32. 32. Full Text Search
  33. 33. # Gemfile gem 'sunspot_rails' gem "sunspot_with_kaminari" group :development do gem 'sunspot_solr' gem 'progress_bar' end
  34. 34. # config/sunspot.yml production: solr: hostname: index.websolr.com port: 80 log_level: WARNING path: /solr/69xxxxxxx39 # read_timeout: 2 # open_timeout: 0.5 development: solr: hostname: localhost port: 8982 log_level: INFO test: solr: hostname: localhost port: 8981 log_level: WARNING
  35. 35. # app/models/document.rb class Document < ActiveRecord::Base searchable do text :title, :more_like_this => true text :excerpt_html, :more_like_this => true text :body_html, :more_like_this => true string :cached_tag_list time :published_at end end
  36. 36. <form id="formsearch" method="get" action="<%= searches_url %>"> <input type="text" name="q" /> </form>
  37. 37. class SearchesController < ApplicationController def index page = params[:page] || 1 query = (params[:q] || "").strip @posts = Sunspot.search(Post) do fulltext query do query_phrase_slop 1 phrase_fields :title => 2.0 phrase_slop 1 end paginate :page => page, :per_page => Post::DEFAULT_LIMIT order_by :score, :desc end end end
  38. 38. Mensagens Assíncronas
  39. 39. <script src="http://js.pusher.com/2.1/pusher.min.js"></script> <script> var pusher = new Pusher('SUA_CHAVE'); var channel = pusher.subscribe('meu-canal'); channel.bind('meu-evento', function(data) { alert('Chegou um evento com a mensagem: ' + data.message); }); </script>
  40. 40. require 'pusher' Pusher.app_id = 'APP_ID' Pusher.key = 'APP_KEY' Pusher.secret = 'APP_SECRET' class HelloWorldController < ApplicationController def hello_world Pusher['meu-canal'].trigger('meu-evento', {:message => 'hello world'}) end end
  41. 41. Web Servers
  42. 42. gem install passenger sudo passenger-install-nginx- module
  43. 43. http://u.akita.ws/ubuntu1204
  44. 44. heroku create git push heroku master
  45. 45. gem install af af push --runtime ruby193 af update sua_aplicacao af restart sua_aplicacao
  46. 46. gem install af af push --runtime ruby193 af update sua_aplicacao af restart sua_aplicacao
  47. 47. gem install af af push --runtime ruby193 af update sua_aplicacao af restart sua_aplicacao
  48. 48. gem install af af push --runtime ruby193 af update sua_aplicacao af restart sua_aplicacao
  49. 49. iOS Backend
  50. 50. gem install helios helios new myapp createdb -h localhost myapp cd myapp && helios start
  51. 51. # Gemfile gem 'helios' gem 'pg' # config/application.rb config.middleware.use Helios::Application do service :data, model: 'path/to/DataModel.xcdatamodel' service :push_notification, apn_certificate: 'path/to/apple_push_notification.pem', apn_environment: 'development' service :in_app_purchase service :passbook end
  52. 52. Educação
  53. 53. Thanks! @akitaonrails
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×