SlideShare a Scribd company logo
GEMS / PLUGINS
  Интересно, полезно, весело
Что такое джемс?

RubyGems (rubygems.org) — пакетный
менеджер для руби

Единый формат распространения отдельных
программ и библиотек

Программа для установки библиотек (джемс)

Сервер для распространения джемс
Преимущества джемс

require ‘rubygems’
require ‘gemname’

sudo gem update

Отсутствие централизации

Стандартный формат: 8300 джемс на
Rubyforge, 7400 джемс на Github
Github


125000 пользователей

100000 проектов

gists

GitHub Pages
restful-authentication
                   (technoweenie)




./script/generate authenticated user sessions

map.signup ‘/signup’,
  :controller => ‘users’, :action => ‘new’
map.login ‘/login’,
  :controller => ‘session’, :action => ‘new’
map.logout ‘/logout’,
  :controller => ‘session’, :action => ‘destroy’
authlogic            (binarylogic)




class UserSession < Authlogic::Session::Base
  # specify configuration here, such as:
  # logout_on_timeout true
  # ...many more options in the documentation
end

UserSession.create(:login => "john",
                   :password => "my password",
                   :remember_me => true)

session.destroy
will_paginate                (mislav)




Post.paginate :page => 1,
              :order => 'created_at DESC'

@posts = Post.paginate_by_board_id
                     @board.id,
                     :page => params[:page],
                     :order => 'updated_at DESC'

<%= will_paginate @posts %>
paperclip            (thoughtbot)




class User < ActiveRecord::Base
  has_attached_file :avatar,
                    :styles => {
                          :medium => "300x300>",
                          :thumb => "100x100>" }
end

<%= image_tag @user.avatar.url %>
<%= image_tag @user.avatar.url(:medium) %>
<%= image_tag @user.avatar.url(:thumb) %>
cucumber            (aslakhellesoy)




Feature: Addition
  In order to avoid silly mistakes
  As a math idiot
  I want to be told the sum of two numbers

  Scenario: Add two numbers
    Given I visit the calculator page
    And I fill in '50' for 'first'
    And I fill in '70' for 'second'
    When I press 'Add'
    Then I should see 'Answer: 120'
cucumber                   (cont’d)




Given /^I visit the calculator page$/ do
  visit '/add'
end

Given /^I fill in '(.*)' for '(.*)'$/ do |value, field|
  fill_in(field, :with => value)
end

When /^I press '(.*)'$/ do |name|
  click_button(name)
end

Then /^I should see '(.*)'$/ do |text|
  response_body.should contain(/#{text}/m)
end 
attachment_fu                (technoweenie)




has_attachment
  :size => 1.megabyte..2.megabytes
has_attachment
  :content_type => 'application/pdf'
has_attachment
  :store => :s3, :cloudfront => true

attachment_obj.public_filename
  #=> /attachments/2/file.jpg
attachment_obj.public_filename(:thumb)
  #=> /attachments/2/file_thumb.jpg
webrat         (brynary)




visit home_path
click_link "Sign up"
fill_in "Email", :with => "good@example.com"
select "Free account"
click_button "Register"
bort          (fudgestudios)




default css

rm rails.png/index.html

page title helper

application layout

filtering password /password_confirmation

database for sessions

capistrano for git/passenger

plugins (RESTful authentication, role requirement, Open ID authentication,
will_paginate, rspec/rspec-rails, exception notifier, asset packager)
whenever            (javan)




wheneverize .

every 3.hours do
  runner "MyModel.some_process"
  rake "my:rake:task"
end

every 1.day, :at => '4:30 am' do
  command "/usr/bin/my_great_command"
end

whenever --update-crontab
formtastic                               (justinfrench)



<% semantic_form_for @article do |form| %>
 <% form.inputs :name => "Basic" do %>
  <%= form.input :title %>
  <%= form.input :publication_state, :as => :radio %>
  <%= form.input :allow_comments, :label => "Allow commenting on this article" %>
 <% end %>`

 <% form.inputs :name => "Advanced" do %>
  <%= form.input :keywords, :required => false, :hint => "Example: ruby, rails, forms"
%>
 <% end %>

 <% form.inputs :name => "Author", :for => :author do |author_form| %>
  <%= author_form.input :first_name %>
  <%= author_form.input :last_name %>
 <% end %>

 <% form.buttons do %>
  <%= form.commit_button %>
 <% end %>
<% end %>
delayed_job                                                    (tobi)




create_table :delayed_jobs, :force => true do |table|
   table.integer :priority, :default => 0 #Allows some jobs to jump to the front of the queue
   table.integer :attempts, :default => 0 #Provides for retries, but still fail eventually.
   table.text :handler #YAML-encoded string of the object that will do work
   table.string :last_error #reason for last failure (See Note below)
   table.datetime :run_at #When to run. Could be Time.now for immediately, or sometime in the future.
   table.datetime :locked_at #Set when a client is working on this object
   table.datetime :failed_at #Set when all retries have failed (actually, by default, the record is
deleted instead)

   table.string :locked_by           #Who is working on this object (if locked)

   table.timestamps
end

MyJob#perform
haml               (Hampton Caitlin)



%ul
  %li Salt
  %li Pepper


%p
  Date/Time:
  - now = DateTime.now
  %strong= now
  - if now > DateTime.parse("December 31, 2006")
    = "Happy new " + "year!"


!main_bg= #46ar12
!main_width= 40em

#main
  background-color = !main_bg
  width = !main_width
  .sidebar
    background-color = !main_bg + #333333
    width = !main_width - 25em
searchlogic           (binarylogic)




User.username_equals("bjohnson")
User.username_does_not_equal("bjohnson")
User.username_begins_with("bjohnson")
User.username_not_begin_with("bjohnson")
User.username_like("bjohnson")
User.username_ends_with("bjohnson")
User.age_greater_than(20)
User.age_greater_than_or_equal_to(20)
User.username_null
User.username_not_null
User.username_blank
searchlogic                                                 (cont’d)




User.username_eq(10) # equals
User.id_lt(10)        # less than
User.id_lte(10)       # less than or equal to
User.id_gt(10)        # greater than
User.id_gte(10)       # greater than or equal to
User.orders_total_greater_than(20)
User.orders_line_items_price_greater_than(20)
User.ascend_by_order_total
User.descend_by_orders_line_items_price
User.username_like_all("bjohnson", "thunt") #will return any users that have all of the strings in their username
User.username_like_any(["bjohnson", "thunt"]) #also accepts an array
User.username_or_first_name_like("ben")
User.id_or_age_lt_or_username_or_first_name_begins_with(10)
search = User.search(:username_like => "bjohnson", :age_less_than => 20)
User.named_scope :four_year_olds, :conditions => {:age => 4}
User.search(:four_year_olds => true, :username_like => "bjohnson")
User.username_like("bjohnson").age_less_than(20).paginate(:page => params[:page])
User.search(:username_like => "bjohnson", :age_less_than => 20).paginate(:page =>
params[:page])
User.searchlogic
Автора ÿбер-джемсов
Technoweenie — Рик          Fudgestudios — Фил
Олсон, ENTP                 Джеффс, fudgestudios

Binarylogic — Бен           Javan — Джаван Махмали,
Джонсон, Binary Logic       Inkling Markets

Mislav — Мислав             Justinfrench — Джастин
Марохнич, Uniqpath          Френч, Indent

Aslakhellesoy — Аслак       Tobi — Тобиас Лютке,
Хеллесёй, BEKK Consulting   JadedPixel

Brynary — Брайан            hampton — Хэмптон
Хелмкамп, weplay            Кейтлин
Спасибо!


apostlion@gmail.com

@apostlion

More Related Content

What's hot

Kick start with j query
Kick start with j queryKick start with j query
Kick start with j queryMd. Ziaul Haq
 
Jquery examples
Jquery examplesJquery examples
Jquery examples
programmingslides
 
Add edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHPAdd edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHP
Vineet Kumar Saini
 
Country State City Dropdown in PHP
Country State City Dropdown in PHPCountry State City Dropdown in PHP
Country State City Dropdown in PHP
Vineet Kumar Saini
 
How Kris Writes Symfony Apps
How Kris Writes Symfony AppsHow Kris Writes Symfony Apps
How Kris Writes Symfony Apps
Kris Wallsmith
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Remy Sharp
 
Jquery In Rails
Jquery In RailsJquery In Rails
Jquery In Rails
shen liu
 
Advanced jQuery
Advanced jQueryAdvanced jQuery
Advanced jQuery
sergioafp
 
Beyond Posts & Pages - Structured Content in WordPress
Beyond Posts & Pages - Structured Content in WordPressBeyond Posts & Pages - Structured Content in WordPress
Beyond Posts & Pages - Structured Content in WordPress
John Eckman
 
PhoneGap: Local Storage
PhoneGap: Local StoragePhoneGap: Local Storage
PhoneGap: Local Storage
Ivano Malavolta
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a TreejQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Treeadamlogic
 
Python Menu
Python MenuPython Menu
Python Menu
cfministries
 
Mulberry: A Mobile App Development Toolkit
Mulberry: A Mobile App Development ToolkitMulberry: A Mobile App Development Toolkit
Mulberry: A Mobile App Development ToolkitRebecca Murphey
 
Emmet cheat-sheet
Emmet cheat-sheetEmmet cheat-sheet
Emmet cheat-sheet
Jean Pierre Portocarrero
 
ApacheCon NA11 - Apache Celix, Universal OSGi?
ApacheCon NA11 - Apache Celix, Universal OSGi?ApacheCon NA11 - Apache Celix, Universal OSGi?
ApacheCon NA11 - Apache Celix, Universal OSGi?abroekhuis
 
Phoenix for laravel developers
Phoenix for laravel developersPhoenix for laravel developers
Phoenix for laravel developers
Luiz Messias
 
Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...
Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...
Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...
Axway Appcelerator
 
Make your own wp cli command in 10min
Make your own wp cli command in 10minMake your own wp cli command in 10min
Make your own wp cli command in 10min
Ivelina Dimova
 
Laravel 로 배우는 서버사이드 #5
Laravel 로 배우는 서버사이드 #5Laravel 로 배우는 서버사이드 #5
Laravel 로 배우는 서버사이드 #5
성일 한
 

What's hot (20)

Kick start with j query
Kick start with j queryKick start with j query
Kick start with j query
 
Jquery examples
Jquery examplesJquery examples
Jquery examples
 
Add edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHPAdd edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHP
 
$.Template
$.Template$.Template
$.Template
 
Country State City Dropdown in PHP
Country State City Dropdown in PHPCountry State City Dropdown in PHP
Country State City Dropdown in PHP
 
How Kris Writes Symfony Apps
How Kris Writes Symfony AppsHow Kris Writes Symfony Apps
How Kris Writes Symfony Apps
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)
 
Jquery In Rails
Jquery In RailsJquery In Rails
Jquery In Rails
 
Advanced jQuery
Advanced jQueryAdvanced jQuery
Advanced jQuery
 
Beyond Posts & Pages - Structured Content in WordPress
Beyond Posts & Pages - Structured Content in WordPressBeyond Posts & Pages - Structured Content in WordPress
Beyond Posts & Pages - Structured Content in WordPress
 
PhoneGap: Local Storage
PhoneGap: Local StoragePhoneGap: Local Storage
PhoneGap: Local Storage
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a TreejQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Tree
 
Python Menu
Python MenuPython Menu
Python Menu
 
Mulberry: A Mobile App Development Toolkit
Mulberry: A Mobile App Development ToolkitMulberry: A Mobile App Development Toolkit
Mulberry: A Mobile App Development Toolkit
 
Emmet cheat-sheet
Emmet cheat-sheetEmmet cheat-sheet
Emmet cheat-sheet
 
ApacheCon NA11 - Apache Celix, Universal OSGi?
ApacheCon NA11 - Apache Celix, Universal OSGi?ApacheCon NA11 - Apache Celix, Universal OSGi?
ApacheCon NA11 - Apache Celix, Universal OSGi?
 
Phoenix for laravel developers
Phoenix for laravel developersPhoenix for laravel developers
Phoenix for laravel developers
 
Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...
Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...
Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...
 
Make your own wp cli command in 10min
Make your own wp cli command in 10minMake your own wp cli command in 10min
Make your own wp cli command in 10min
 
Laravel 로 배우는 서버사이드 #5
Laravel 로 배우는 서버사이드 #5Laravel 로 배우는 서버사이드 #5
Laravel 로 배우는 서버사이드 #5
 

Viewers also liked

Sherrys French
Sherrys FrenchSherrys French
Sherrys Frenchsdompierre
 
Text Message Marketing
Text Message MarketingText Message Marketing
Text Message Marketingjfohet
 
Future developments in the children's secure estate
Future developments in the children's secure estateFuture developments in the children's secure estate
Future developments in the children's secure estate
Andrew Neilson
 
Mla For Sf
Mla For SfMla For Sf
Mla For Sfalbaqr
 
Absolutely Fantastic Slideshow
Absolutely Fantastic SlideshowAbsolutely Fantastic Slideshow
Absolutely Fantastic Slideshowashutoshatlive
 

Viewers also liked (7)

My Life
My LifeMy Life
My Life
 
Sherrys French
Sherrys FrenchSherrys French
Sherrys French
 
Text Message Marketing
Text Message MarketingText Message Marketing
Text Message Marketing
 
M Y L I F E
M Y  L I F EM Y  L I F E
M Y L I F E
 
Future developments in the children's secure estate
Future developments in the children's secure estateFuture developments in the children's secure estate
Future developments in the children's secure estate
 
Mla For Sf
Mla For SfMla For Sf
Mla For Sf
 
Absolutely Fantastic Slideshow
Absolutely Fantastic SlideshowAbsolutely Fantastic Slideshow
Absolutely Fantastic Slideshow
 

Similar to RubyBarCamp “Полезные gems и plugins”

Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the FinishYehuda Katz
 
Desarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutosDesarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutosEdgar Suarez
 
Django - sql alchemy - jquery
Django - sql alchemy - jqueryDjango - sql alchemy - jquery
Django - sql alchemy - jquery
Mohammed El Rafie Tarabay
 
Acceptance Testing with Webrat
Acceptance Testing with WebratAcceptance Testing with Webrat
Acceptance Testing with Webrat
Luismi Cavallé
 
Python Code Camp for Professionals 4/4
Python Code Camp for Professionals 4/4Python Code Camp for Professionals 4/4
Python Code Camp for Professionals 4/4
DEVCON
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overviewYehuda Katz
 
The Browser Environment - A Systems Programmer's Perspective [sinatra edition]
The Browser Environment - A Systems Programmer's Perspective [sinatra edition]The Browser Environment - A Systems Programmer's Perspective [sinatra edition]
The Browser Environment - A Systems Programmer's Perspective [sinatra edition]
Eleanor McHugh
 
Engines: Team Development on Rails (2005)
Engines: Team Development on Rails (2005)Engines: Team Development on Rails (2005)
Engines: Team Development on Rails (2005)
lazyatom
 
Python Code Camp for Professionals 3/4
Python Code Camp for Professionals 3/4Python Code Camp for Professionals 3/4
Python Code Camp for Professionals 3/4
DEVCON
 
Where's My SQL? Designing Databases with ActiveRecord Migrations
Where's My SQL? Designing Databases with ActiveRecord MigrationsWhere's My SQL? Designing Databases with ActiveRecord Migrations
Where's My SQL? Designing Databases with ActiveRecord Migrations
Eleanor McHugh
 
HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and Improved
Timothy Fisher
 
Python Code Camp for Professionals 1/4
Python Code Camp for Professionals 1/4Python Code Camp for Professionals 1/4
Python Code Camp for Professionals 1/4
DEVCON
 
Ruby gems
Ruby gemsRuby gems
Ruby gems
Papp Laszlo
 
More to RoC weibo
More to RoC weiboMore to RoC weibo
More to RoC weibo
shaokun
 
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby DeveloperVenturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Jon Kruger
 
Action View Form Helpers - 2, Season 2
Action View Form Helpers - 2, Season 2Action View Form Helpers - 2, Season 2
Action View Form Helpers - 2, Season 2RORLAB
 
«Работа с базами данных с использованием Sequel»
«Работа с базами данных с использованием Sequel»«Работа с базами данных с использованием Sequel»
«Работа с базами данных с использованием Sequel»
Olga Lavrentieva
 
J Query Public
J Query PublicJ Query Public
J Query Public
pradeepsilamkoti
 
GHC Participant Training
GHC Participant TrainingGHC Participant Training
GHC Participant TrainingAidIQ
 

Similar to RubyBarCamp “Полезные gems и plugins” (20)

Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the Finish
 
Desarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutosDesarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutos
 
Django - sql alchemy - jquery
Django - sql alchemy - jqueryDjango - sql alchemy - jquery
Django - sql alchemy - jquery
 
Acceptance Testing with Webrat
Acceptance Testing with WebratAcceptance Testing with Webrat
Acceptance Testing with Webrat
 
Python Code Camp for Professionals 4/4
Python Code Camp for Professionals 4/4Python Code Camp for Professionals 4/4
Python Code Camp for Professionals 4/4
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overview
 
The Browser Environment - A Systems Programmer's Perspective [sinatra edition]
The Browser Environment - A Systems Programmer's Perspective [sinatra edition]The Browser Environment - A Systems Programmer's Perspective [sinatra edition]
The Browser Environment - A Systems Programmer's Perspective [sinatra edition]
 
Engines: Team Development on Rails (2005)
Engines: Team Development on Rails (2005)Engines: Team Development on Rails (2005)
Engines: Team Development on Rails (2005)
 
JQuery Flot
JQuery FlotJQuery Flot
JQuery Flot
 
Python Code Camp for Professionals 3/4
Python Code Camp for Professionals 3/4Python Code Camp for Professionals 3/4
Python Code Camp for Professionals 3/4
 
Where's My SQL? Designing Databases with ActiveRecord Migrations
Where's My SQL? Designing Databases with ActiveRecord MigrationsWhere's My SQL? Designing Databases with ActiveRecord Migrations
Where's My SQL? Designing Databases with ActiveRecord Migrations
 
HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and Improved
 
Python Code Camp for Professionals 1/4
Python Code Camp for Professionals 1/4Python Code Camp for Professionals 1/4
Python Code Camp for Professionals 1/4
 
Ruby gems
Ruby gemsRuby gems
Ruby gems
 
More to RoC weibo
More to RoC weiboMore to RoC weibo
More to RoC weibo
 
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby DeveloperVenturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
 
Action View Form Helpers - 2, Season 2
Action View Form Helpers - 2, Season 2Action View Form Helpers - 2, Season 2
Action View Form Helpers - 2, Season 2
 
«Работа с базами данных с использованием Sequel»
«Работа с базами данных с использованием Sequel»«Работа с базами данных с использованием Sequel»
«Работа с базами данных с использованием Sequel»
 
J Query Public
J Query PublicJ Query Public
J Query Public
 
GHC Participant Training
GHC Participant TrainingGHC Participant Training
GHC Participant Training
 

Recently uploaded

Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 

Recently uploaded (20)

Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 

RubyBarCamp “Полезные gems и plugins”

  • 1. GEMS / PLUGINS Интересно, полезно, весело
  • 2. Что такое джемс? RubyGems (rubygems.org) — пакетный менеджер для руби Единый формат распространения отдельных программ и библиотек Программа для установки библиотек (джемс) Сервер для распространения джемс
  • 3. Преимущества джемс require ‘rubygems’ require ‘gemname’ sudo gem update Отсутствие централизации Стандартный формат: 8300 джемс на Rubyforge, 7400 джемс на Github
  • 5. restful-authentication (technoweenie) ./script/generate authenticated user sessions map.signup ‘/signup’, :controller => ‘users’, :action => ‘new’ map.login ‘/login’, :controller => ‘session’, :action => ‘new’ map.logout ‘/logout’, :controller => ‘session’, :action => ‘destroy’
  • 6. authlogic (binarylogic) class UserSession < Authlogic::Session::Base # specify configuration here, such as: # logout_on_timeout true # ...many more options in the documentation end UserSession.create(:login => "john", :password => "my password", :remember_me => true) session.destroy
  • 7. will_paginate (mislav) Post.paginate :page => 1, :order => 'created_at DESC' @posts = Post.paginate_by_board_id @board.id, :page => params[:page], :order => 'updated_at DESC' <%= will_paginate @posts %>
  • 8. paperclip (thoughtbot) class User < ActiveRecord::Base has_attached_file :avatar, :styles => { :medium => "300x300>", :thumb => "100x100>" } end <%= image_tag @user.avatar.url %> <%= image_tag @user.avatar.url(:medium) %> <%= image_tag @user.avatar.url(:thumb) %>
  • 9. cucumber (aslakhellesoy) Feature: Addition In order to avoid silly mistakes As a math idiot I want to be told the sum of two numbers Scenario: Add two numbers Given I visit the calculator page And I fill in '50' for 'first' And I fill in '70' for 'second' When I press 'Add' Then I should see 'Answer: 120'
  • 10. cucumber (cont’d) Given /^I visit the calculator page$/ do   visit '/add' end Given /^I fill in '(.*)' for '(.*)'$/ do |value, field|   fill_in(field, :with => value) end When /^I press '(.*)'$/ do |name|   click_button(name) end Then /^I should see '(.*)'$/ do |text|   response_body.should contain(/#{text}/m) end 
  • 11. attachment_fu (technoweenie) has_attachment :size => 1.megabyte..2.megabytes has_attachment :content_type => 'application/pdf' has_attachment :store => :s3, :cloudfront => true attachment_obj.public_filename #=> /attachments/2/file.jpg attachment_obj.public_filename(:thumb) #=> /attachments/2/file_thumb.jpg
  • 12. webrat (brynary) visit home_path click_link "Sign up" fill_in "Email", :with => "good@example.com" select "Free account" click_button "Register"
  • 13. bort (fudgestudios) default css rm rails.png/index.html page title helper application layout filtering password /password_confirmation database for sessions capistrano for git/passenger plugins (RESTful authentication, role requirement, Open ID authentication, will_paginate, rspec/rspec-rails, exception notifier, asset packager)
  • 14. whenever (javan) wheneverize . every 3.hours do runner "MyModel.some_process" rake "my:rake:task" end every 1.day, :at => '4:30 am' do command "/usr/bin/my_great_command" end whenever --update-crontab
  • 15. formtastic (justinfrench) <% semantic_form_for @article do |form| %> <% form.inputs :name => "Basic" do %> <%= form.input :title %> <%= form.input :publication_state, :as => :radio %> <%= form.input :allow_comments, :label => "Allow commenting on this article" %> <% end %>` <% form.inputs :name => "Advanced" do %> <%= form.input :keywords, :required => false, :hint => "Example: ruby, rails, forms" %> <% end %> <% form.inputs :name => "Author", :for => :author do |author_form| %> <%= author_form.input :first_name %> <%= author_form.input :last_name %> <% end %> <% form.buttons do %> <%= form.commit_button %> <% end %> <% end %>
  • 16. delayed_job (tobi) create_table :delayed_jobs, :force => true do |table| table.integer :priority, :default => 0 #Allows some jobs to jump to the front of the queue table.integer :attempts, :default => 0 #Provides for retries, but still fail eventually. table.text :handler #YAML-encoded string of the object that will do work table.string :last_error #reason for last failure (See Note below) table.datetime :run_at #When to run. Could be Time.now for immediately, or sometime in the future. table.datetime :locked_at #Set when a client is working on this object table.datetime :failed_at #Set when all retries have failed (actually, by default, the record is deleted instead) table.string :locked_by #Who is working on this object (if locked) table.timestamps end MyJob#perform
  • 17. haml (Hampton Caitlin) %ul %li Salt %li Pepper %p Date/Time: - now = DateTime.now %strong= now - if now > DateTime.parse("December 31, 2006") = "Happy new " + "year!" !main_bg= #46ar12 !main_width= 40em #main background-color = !main_bg width = !main_width .sidebar background-color = !main_bg + #333333 width = !main_width - 25em
  • 18. searchlogic (binarylogic) User.username_equals("bjohnson") User.username_does_not_equal("bjohnson") User.username_begins_with("bjohnson") User.username_not_begin_with("bjohnson") User.username_like("bjohnson") User.username_ends_with("bjohnson") User.age_greater_than(20) User.age_greater_than_or_equal_to(20) User.username_null User.username_not_null User.username_blank
  • 19. searchlogic (cont’d) User.username_eq(10) # equals User.id_lt(10) # less than User.id_lte(10) # less than or equal to User.id_gt(10) # greater than User.id_gte(10) # greater than or equal to User.orders_total_greater_than(20) User.orders_line_items_price_greater_than(20) User.ascend_by_order_total User.descend_by_orders_line_items_price User.username_like_all("bjohnson", "thunt") #will return any users that have all of the strings in their username User.username_like_any(["bjohnson", "thunt"]) #also accepts an array User.username_or_first_name_like("ben") User.id_or_age_lt_or_username_or_first_name_begins_with(10) search = User.search(:username_like => "bjohnson", :age_less_than => 20) User.named_scope :four_year_olds, :conditions => {:age => 4} User.search(:four_year_olds => true, :username_like => "bjohnson") User.username_like("bjohnson").age_less_than(20).paginate(:page => params[:page]) User.search(:username_like => "bjohnson", :age_less_than => 20).paginate(:page => params[:page]) User.searchlogic
  • 20. Автора ÿбер-джемсов Technoweenie — Рик Fudgestudios — Фил Олсон, ENTP Джеффс, fudgestudios Binarylogic — Бен Javan — Джаван Махмали, Джонсон, Binary Logic Inkling Markets Mislav — Мислав Justinfrench — Джастин Марохнич, Uniqpath Френч, Indent Aslakhellesoy — Аслак Tobi — Тобиас Лютке, Хеллесёй, BEKK Consulting JadedPixel Brynary — Брайан hampton — Хэмптон Хелмкамп, weplay Кейтлин