This file contains hidden or 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
require File.dirname(__FILE__) + '/../../spec_helper' | |
describe Admin::SuscriptoresHelper do | |
#Delete this example and add some real ones or delete this file | |
it "should include the Admin::SuscriptoresHelper" do | |
included_modules = self.metaclass.send :included_modules | |
included_modules.should include(Admin::SuscriptoresHelper) | |
end | |
This file contains hidden or 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
puts "hola mundo".class | |
puts "hola mundo".upcase | |
puts "curso: ruby on rails. nivel básico".size | |
puts 2 + 3 | |
puts 2.+(3) |
This file contains hidden or 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
require 'rubygems' | |
require 'open-uri' | |
require 'feed-normalizer' | |
require 'mirrored' | |
require 'json' | |
class YahooTermExtractor | |
def self.api_id=(value) | |
@@api_id = value | |
end |
This file contains hidden or 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
@call ruby r:\tar.rb %* |
This file contains hidden or 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
require 'rubygems' | |
require 'r_weather' | |
RWeather.partner_id = "xxxxxxxxxx" | |
RWeather.key = "yyyyyyyyyyyyyyyy" | |
locations = RWeather.search('tucuman') # that's where I'm from :) | |
unless locations.empty? | |
locations.each_with_index do |location, i| | |
puts "#{i}) #{location.id} - #{location.name}" |
This file contains hidden or 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
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') | |
require 'test/unit' | |
class ProyectosControllerTest < ActionController::TestCase | |
tests Admin::ProyectosController | |
fixtures :proyectos | |
test_administrate_me do |test| | |
test.set_params :create, :proyecto => {:nombre => 'Zoom', :estado => Proyecto::ESTADOS.first, :inicio => Date.today} | |
end | |
end |
This file contains hidden or 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
package 'openssl' do | |
type 'make' | |
default 'source' | |
version 'source' do | |
download 'http://...' | |
# hooks | |
before :download { } | |
after :download { } |
This file contains hidden or 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
<% content_for :titlebar do %> | |
<%= render :partial => 'commons/titlebar' %> | |
<ul> | |
<% Video::NAVIGATION_LABELS.each do |label| %> | |
<li><%= link_to_unless_current label.titleize, videos_path(:label => label) %></li> | |
<% end %> | |
</ul> | |
<% end %> | |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'jammit' | |
print "Jammit check... " | |
status_before = %x[git status --porcelain --untracked-files=no] | |
Jammit.package! | |
status_after = %x[git status --porcelain --untracked-files=no] | |
jammit_files = (status_after.split("\n") - status_before.split("\n")).map { |f| f.split[1] } |
This file contains hidden or 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
package com.insignia4u.ParsingError | |
import android.app.Activity | |
class ParsingError < Activity | |
def onCreate(state) | |
super state | |
# Unmatched parenthesis on the following line. | |
setContentView (R.layout.main | |
end |
OlderNewer