View output
blog_root /blog(.:format) refinery/blog/posts#index
blog_post GET /blog/posts/:id(.:format) refinery/blog/posts#show
blog_rss_feed /blog/feed.rss(.:format) refinery/blog/posts#index {:format=>"rss"}
blog_category /blog/categories/:id(.:format) refinery/blog/categories#show
blog_comments /blog/:id/comments(.:format) refinery/blog/posts#comment
blog_archive_posts GET /blog/archive/:year(/:month)(.:format) refinery/blog/posts#archive
blog_tagged_posts GET /blog/tagged/:tag_id(/:tag_name)(.:format) refinery/blog/posts#tagge
View config
upstream www.XXXXXXX.es {
server XXX.XXX.XXX.XXX:3000;
}
server {
listen 80;
server_name www.XXXX.es XXXXX.es;
location / {
proxy_pass http://www.XXXXXXX.es; #this is the upstream option
View steps
rvm install ruby-1.8.7-p358
rvm use --create 1.8.7@xiki
gem install bundler
bundle
gem build xiki.gemspec
gem install xiki-0.5.0a.gem
Output
View base_controller_decorator.rb
Spree::BaseController.class_eval do
before_filter :set_user_language
def set_user_language
I18n.locale = params[:locale]
end
end
View Test.js
require('should');
function a() {
throw new Error("Oops");
return 1;
}
describe('MyLibrary', function(){
it('handles errors', function(){
a().should.equal(1);
View FirstError
~/Documents/trabajo/projects/urbanfun/urbanfun
☺ rails g refinery:form contact name:string lastname:string store:string city:string province:string cp:string country:string email:string phone:string --namespace Distributors --extension distributors
create vendor/extensions/distributors/app/controllers/refinery/distributors/admin/contacts_controller.rb
create vendor/extensions/distributors/app/controllers/refinery/distributors/admin/settings_controller.rb
create vendor/extensions/distributors/app/controllers/refinery/distributors/contacts_controller.rb
create vendor/extensions/distributors/app/mailers/refinery/distributors/mailer.rb
create vendor/extensions/distributors/app/models/refinery/distributors/setting.rb
create vendor/extensions/distributors/app/models/refinery/distributors/contact.rb
create vendor/extensions/distributors/app/views/refinery/distributors/admin/contacts/_records.html.erb
create vendor/extensions/distributors/app/views/refinery/di
View README
Installation instruction
curl https://raw.github.com/gist/1272098/e0199b49a72121c5e24b19275e7d544529c9e688/openerp-install.sh -o | sh
View text_width_canvas.coffee
measure_text: (text, font_size, font_family) ->
canvas = document.createElement('canvas')
ctx = window.canvas.getContext '2d'
ctx.font = "#{font_size} #{font_family}"
ctx.measureText(text).width