forked from danielvlopes/railsmg
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
229 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
module ApplicationHelper | ||
def gravatar_image_tag email, options = {} | ||
def gravatar_image_tag email | ||
email = Digest::MD5.hexdigest(email) | ||
default = CGI.escape(request.protocol + request.host_with_port + image_path('gravatar.jpg')) | ||
|
||
image_tag "http://www.gravatar.com/avatar/#{email}?size=48&default=#{default}", options | ||
end | ||
|
||
def link_to_with_active name, options | ||
link_to name, options, :class => ('active' if current_page? options) | ||
image_tag "http://www.gravatar.com/avatar/#{email}?size=48&default=#{default}", :alt => 'Gravatar' | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,21 +3,11 @@ | |
User.blueprint do | ||
name 'Gabriel Sobrinho' | ||
email '[email protected]' | ||
github 'sobrinho' | ||
city 'Belo Horizonte' | ||
password { '123456' } | ||
password_salt { Authlogic::Random.hex_token } | ||
crypted_password { Authlogic::CryptoProviders::Sha512.encrypt(password + password_salt) } | ||
persistence_token { Authlogic::Random.hex_token } | ||
perishable_token { Authlogic::Random.friendly_token } | ||
end | ||
|
||
Project.blueprint do | ||
user { User.make } | ||
name 'Example project' | ||
description 'An example project' | ||
end | ||
|
||
Meeting.blueprint do | ||
name 'Meeting example' | ||
description 'An example of meeting' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
require 'spec_helper' | ||
|
||
describe ApplicationHelper do | ||
it 'gravatar_image_tag should return a gravatar image' do | ||
helper.gravatar_image_tag('[email protected]').should have_tag 'img[src^=http://www.gravatar.com/avatar/][alt=Gravatar]' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
require 'spec_helper' | ||
|
||
describe HomeHelper do | ||
it 'link_to_take should return a Google Maps link' do | ||
helper.link_to_take.should have_tag 'a[href^=http://maps.google.com/maps]', 'veja o mapa' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
--- | ||
repositories: | ||
- :description: ActiveRecord e-mail validation for Rails 2.3 | ||
:forks: 0 | ||
:url: http://github.com/sobrinho/validates_as_email | ||
:homepage: "" | ||
:watchers: 1 | ||
:fork: true | ||
:private: false | ||
:open_issues: 0 | ||
:name: validates_as_email | ||
:owner: sobrinho | ||
- :description: Validation of URI (URL) for ActiveRecord | ||
:forks: 0 | ||
:url: http://github.com/sobrinho/validates_as_uri | ||
:homepage: "" | ||
:watchers: 1 | ||
:fork: false | ||
:private: false | ||
:open_issues: 0 | ||
:name: validates_as_uri | ||
:owner: sobrinho | ||
- :description: Validation of CPF for ActiveRecord (Rails >= 2.3) | ||
:forks: 1 | ||
:url: http://github.com/sobrinho/validates_as_cpf | ||
:homepage: "" | ||
:watchers: 3 | ||
:fork: false | ||
:private: false | ||
:open_issues: 0 | ||
:name: validates_as_cpf | ||
:owner: sobrinho | ||
- :description: Validation of CNPJ for ActiveRecord (Rails >= 2.3) | ||
:forks: 1 | ||
:url: http://github.com/sobrinho/validates_as_cnpj | ||
:homepage: "" | ||
:watchers: 2 | ||
:fork: false | ||
:private: false | ||
:open_issues: 0 | ||
:name: validates_as_cnpj | ||
:owner: sobrinho | ||
- :description: Replaces <select> tags with a full-HTML, RESTful JavaScript record browser (Rails plugin) | ||
:forks: 0 | ||
:url: http://github.com/sobrinho/recordselect | ||
:homepage: http://code.google.com/p/recordselect | ||
:watchers: 1 | ||
:fork: true | ||
:private: false | ||
:open_issues: 0 | ||
:name: recordselect | ||
:owner: sobrinho | ||
- :description: A PHP MVC RESTful framework | ||
:forks: 0 | ||
:url: http://github.com/sobrinho/corephp | ||
:homepage: http://www.corephp.org/ | ||
:watchers: 1 | ||
:fork: false | ||
:private: false | ||
:open_issues: 0 | ||
:name: corephp | ||
:owner: sobrinho | ||
- :description: A simple Rails wrapper for the PrinceXML PDF generation library. | ||
:forks: 0 | ||
:url: http://github.com/sobrinho/princely | ||
:homepage: http://www.mbleigh.com/plugins/princely-rails-prince-xml-wrapper | ||
:watchers: 1 | ||
:fork: true | ||
:private: false | ||
:open_issues: 0 | ||
:name: princely | ||
:owner: sobrinho | ||
- :description: This plugins create a form_ui and list_ui helpers for ActiveScaffold to use columns like enum | ||
:forks: 0 | ||
:url: http://github.com/sobrinho/as_enum_column | ||
:homepage: "" | ||
:watchers: 4 | ||
:fork: false | ||
:private: false | ||
:open_issues: 0 | ||
:name: as_enum_column | ||
:owner: sobrinho | ||
- :description: Fancy pants drag-drop sortable lists for ActiveScaffold | ||
:forks: 0 | ||
:url: http://github.com/sobrinho/active_scaffold_sortable | ||
:homepage: http://tim.theenchanter.com/2008/05/activescaffoldsortable-updated-with.html | ||
:watchers: 2 | ||
:fork: true | ||
:private: false | ||
:open_issues: 0 | ||
:name: active_scaffold_sortable | ||
:owner: sobrinho | ||
- :description: ActsAsTree plugin | ||
:forks: 0 | ||
:url: http://github.com/sobrinho/acts_as_tree | ||
:homepage: http://rubyonrails.org | ||
:watchers: 2 | ||
:fork: true | ||
:private: false | ||
:open_issues: 0 | ||
:name: acts_as_tree | ||
:owner: sobrinho | ||
- :description: RSpec Mate is a plugin to show results of specs like Textmate in Gedit | ||
:forks: 0 | ||
:url: http://github.com/sobrinho/rspec_mate | ||
:homepage: "" | ||
:watchers: 1 | ||
:fork: true | ||
:private: false | ||
:open_issues: 0 | ||
:name: rspec_mate | ||
:owner: sobrinho | ||
- :description: A tagging plugin for Rails applications that allows for custom tagging along dynamic contexts. | ||
:forks: 0 | ||
:url: http://github.com/sobrinho/acts-as-taggable-on | ||
:homepage: http://mbleigh.lighthouseapp.com/projects/10116-acts-as-taggable-on | ||
:watchers: 1 | ||
:fork: true | ||
:private: false | ||
:open_issues: 0 | ||
:name: acts-as-taggable-on | ||
:owner: sobrinho | ||
- :description: Demo app using InheritedResources + HAML + Formtastic | ||
:forks: 0 | ||
:url: http://github.com/sobrinho/2railsmg | ||
:homepage: "" | ||
:watchers: 1 | ||
:fork: false | ||
:private: false | ||
:open_issues: 0 | ||
:name: 2railsmg | ||
:owner: sobrinho | ||
- :description: Repository for collecting Locale data for Ruby on Rails I18n as well as other interesting, Rails related I18n stuff | ||
:forks: 0 | ||
:url: http://github.com/sobrinho/rails-i18n | ||
:homepage: http://rails-i18n.org | ||
:watchers: 1 | ||
:fork: true | ||
:private: false | ||
:open_issues: 0 | ||
:name: rails-i18n | ||
:owner: sobrinho | ||
- :description: Blog used in spartaonrails.com | ||
:forks: 0 | ||
:url: http://github.com/sobrinho/spartaonrails | ||
:homepage: http://spartaonrails.com/ | ||
:watchers: 1 | ||
:fork: false | ||
:private: false | ||
:open_issues: 0 | ||
:name: spartaonrails | ||
:owner: sobrinho | ||
- :description: has_breadcrumbs is a simple plugin that adds a `breadcrumb` object into controllers and views. | ||
:forks: 0 | ||
:url: http://github.com/sobrinho/has_breadcrumbs | ||
:homepage: http://github.com/fnando/has_breadcrumbs | ||
:watchers: 1 | ||
:fork: true | ||
:private: false | ||
:open_issues: 0 | ||
:name: has_breadcrumbs | ||
:owner: sobrinho | ||
- :description: "railsmg website " | ||
:forks: 0 | ||
:url: http://github.com/sobrinho/railsmg | ||
:homepage: "" | ||
:watchers: 1 | ||
:fork: true | ||
:private: false | ||
:open_issues: 0 | ||
:name: railsmg | ||
:owner: sobrinho | ||
- :description: This plugin makes ActiveRecord models rateable through a polymorphic association | ||
:forks: 0 | ||
:url: http://github.com/sobrinho/acts_as_rateable | ||
:homepage: "" | ||
:watchers: 1 | ||
:fork: false | ||
:private: false | ||
:open_issues: 0 | ||
:name: acts_as_rateable | ||
:owner: sobrinho |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
User.class_eval do | ||
# User#fetch_projects! is called on save and we cant stub Kernel#open method | ||
def open *args | ||
File.open("#{Rails.root}/spec/support/sobrinho.github.yaml") | ||
end | ||
end |