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
#!/usr/bin/env ruby | |
require 'net/http' | |
require 'uri' | |
require 'rubygems' | |
require 'json' | |
require 'pp' | |
url = 'http://www.apple.com/retail/iphone/feeds/3g_us_inv.json' | |
json = Net::HTTP.get_response(URI.parse(url)).body |
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
diff --git a/tools/merb-dev.rake b/tools/merb-dev.rake | |
index 0bfca75..988bec4 100644 | |
--- a/tools/merb-dev.rake | |
+++ b/tools/merb-dev.rake | |
@@ -83,14 +83,13 @@ namespace :merb do | |
# Usage: sake merb:install:all | |
desc 'Install merb-core, merb-more, and merb-plugins' | |
- task :all => ['merb:check_outside_merb_dir', 'merb:install:core', 'merb:install:more', 'merb:install:plugins', 'merb:install:extlib'] | |
+ task :all => ['merb:check_outside_merb_dir', 'merb:install:extlib', 'merb:install:core', 'merb:install:more', 'merb:install:plugins'] |
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
<% | |
#locals | |
blog ||= @blog | |
post_type = blog.post_type || params[:post_type] || 'text' | |
channels = blog.department ? blog.department.channels.map {|channel| [channel.name, channel.id]} : {} | |
%> | |
<div id="blog"> | |
<% less_form_for [@profile, blog], :html => {:multipart=>true} do |f| %> | |
<input type="hidden" name="blog[post_type]" value="<%= post_type %>" /> |
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
<select id='list_a' name='top_level'> | |
<option value='1'>one</option> | |
<option value='2'>two</option> | |
</select> | |
<selectid='list_b' name='second_level'> | |
</select> |
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
<label>Department:</label> | |
<select id="blog_department_id" name="blog[department_id]"> | |
<option value="1" selected="selected">My World</option> | |
<option value="2">Around Town</option> | |
<option value="3">Lifestyles & Living</option> | |
<option value="4">Arts & Entertainment</option> | |
<option value="5">Style & Fashion</option> | |
<option value="6">Sports & Fitness</option> | |
<option value="7">Business & Careers</option> | |
<option value="8">Science & Technology</option> |
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
~/git/merb_has_flash master$ rake --trace | |
(in /Users/jack/git/merb_has_flash) | |
rake aborted! | |
undefined local variable or method `spec' for main:Object | |
/Users/jack/git/merb_has_flash/rakefile:5 | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:2149:in `load' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:2149:in `raw_load_rakefile' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1897:in `load_rakefile' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling' | |
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1896:in `load_rakefile' |
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
+spec = eval(File.read('merb_has_flash.gemspec')) | |
+ | |
+Rake::GemPackageTask.new(spec) do |pkg| | |
+ pkg.gem_spec = spec | |
+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
LONG_RE = /^(--\w+[-\w+]*)$/ | |
SHORT_RE = /^(-\w)$/ | |
LONG_EQ_RE = /^(--\w+[-\w+]*)=(.*?)$|(-\w?)=(.*?)$/ | |
SHORT_SQ_RE = /^-(\w\S+?)$/ # Allow either -x -v or -xv style for single char args |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'thor' | |
class Foo < Thor | |
... | |
end | |
Foo.start |
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
CmdUtils.CreateCommand( | |
{ | |
name: "ruby", | |
takes: {"function": noun_arb_text}, | |
icon: "http://ruby-doc.org/favicon.ico", | |
homepage: "http://jackndempsey.blogspot.com", | |
author: {name: "Jack Dempsey", email: "[email protected]"}, | |
license: "MPL,GPL", | |
description: "Search ruby functions documentation", | |
help: "Select a ruby function", |
OlderNewer