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 'socket' | |
| HTTP_HEADER = "HTTP/1.1 200/OK\r\nContent-type:text/html\r\n\r\n" | |
| CURRENT_DIR = "." | |
| SPACE_IN_PARAM = "%20" | |
| def file_explorer | |
| webserver = TCPServer.new("localhost", 2000) | |
| loop do | |
| Thread.start(webserver.accept) do |session| |
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
| #you can use this easily like the following in your spec files: | |
| reuqire_relative "../spec_helper_lite" | |
| reuqire_relative_to_root "lib/some_domain_logic" | |
| describe "some domain logic" do | |
| #specs will be here then | |
| 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
| module SessionsHelper | |
| include SignInOut | |
| def create_cookie(user_id, user_salt); end | |
| def remember_token; end | |
| def delete_cookie; 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
| source 'http://rubygems.org' | |
| gem 'rails', '3.0.0' | |
| gem 'sqlite3-ruby', :require => 'sqlite3' | |
| group :development do | |
| gem 'rspec-rails', '2.0.1' | |
| end | |
| group :test do |
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
| def require_folder(folder_name_in_app) | |
| Dir[File.expand_path(File.dirname(__FILE__) + "/../app/" + folder_name_in_app + "/*.rb"].each { |file| require file } | |
| end |
NewerOlder