- Start a Sinatra server on port 4000
- GET / to that server triggers a
git pulland mod_rails restart - Hit port 4000 locally after pushing
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 'sinatra' | |
| get '/' do | |
| "Hello" | |
| end | |
| post "/" do | |
| raise CustomError | |
| 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
| %a{:href => "http://google.com"} Google | |
| \. | |
| Produces: | |
| <a href="http://google.com">Google</a> . | |
| ^ I want that space gone!!! |
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
| script/generate plugin HelloWorld | |
| # vendor/plugins/hello_world/init.rb | |
| Rails.configuration.gem "sinatra" | |
| Rails.configuration.middleware.insert_before("ActionController::Failsafe", "HelloWorld") | |
| # vendor/plugins/hello_world/lib/hello_world.rb | |
| # your sinatra app goes here... | |
| require 'sinatra/base' | |
| class HelloWorld < Sinatra::Base |
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
| # For testing text content within a tag. First param is a CSS3 selector, | |
| # while second param is a regex | |
| Then /^the "([^\"]*)" should have "([^\"]*)"$/ do |element,content| | |
| response.body.should have_selector(element) do |node| | |
| node.text.should =~ /#{content}/ | |
| 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
| Jul 9, 2009 11:23:20 PM org.apache.catalina.core.ApplicationContext log | |
| SEVERE: unable to create shared application instance | |
| org.jruby.rack.RackInitializationException: Please install the oracle_enhanced adapter: `gem install activerecord-oracle_enhanced-adapter` (LoadError) | |
| from /home/oracle/tomcat_test/webapps/ROOT/WEB-INF/gems/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:60:in `establish_connection' | |
| from /home/oracle/tomcat_test/webapps/ROOT/WEB-INF/gems/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:in `establish_connection' | |
| from /home/oracle/tomcat_test/webapps/ROOT/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:417:in `initialize_database' | |
| from /home/oracle/tomcat_test/webapps/ROOT/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:141:in `process' | |
| from /home/oracle/tomcat_test/webapps/ROOT/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:113:in `run' | |
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
| Jul 9, 2009 11:23:20 PM org.apache.catalina.core.ApplicationContext log | |
| SEVERE: unable to create shared application instance | |
| org.jruby.rack.RackInitializationException: Please install the oracle_enhanced adapter: `gem install activerecord-oracle_enhanced-adapter` (LoadError) | |
| from /home/oracle/tomcat_test/webapps/ROOT/WEB-INF/gems/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:60:in `establish_connection' | |
| from /home/oracle/tomcat_test/webapps/ROOT/WEB-INF/gems/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:in `establish_connection' | |
| from /home/oracle/tomcat_test/webapps/ROOT/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:417:in `initialize_database' | |
| from /home/oracle/tomcat_test/webapps/ROOT/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:141:in `process' | |
| from /home/oracle/tomcat_test/webapps/ROOT/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:113:in `run' | |
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
| //Search Connect and Aria for a single keyword, sites open in separate tabs | |
| CmdUtils.CreateCommand({ | |
| name: "search-oracle", | |
| author: {name: "Jake Kuramoto", | |
| homepage: "http://theappslab.com/"}, | |
| takes: {keyword: noun_arb_text}, | |
| preview: function(pblock, directObject) { | |
| searchText = jQuery.trim(directObject.text); |
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
| // max of 140 chars is recommended, but it really allows 160 | |
| const STATUS_MAXLEN = 140; | |
| CmdUtils.CreateCommand({ | |
| name: "connect", | |
| takes: {status: noun_arb_text}, | |
| // borrowed the code written by: | |
| homepage: "http://theunfocused.net/moz/ubiquity/verbs/", |
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
| <HTML> | |
| <HEAD><TITLE>Redirection</TITLE></HEAD> | |
| <BODY><H1>Redirect</H1></BODY> | |
| </HTML> |