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
| Errno::ECONNREFUSED (Connection refused - connect(2)): | |
| /home/tad/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/http.rb:560:in `initialize' | |
| /home/tad/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/http.rb:560:in `open' | |
| /home/tad/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/http.rb:560:in `connect' | |
| /home/tad/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/http.rb:553:in `do_start' | |
| /home/tad/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/http.rb:542:in `start' | |
| /home/tad/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/http.rb:1035:in `request_without_newrelic_trace' | |
| rsolr (1.0.6) lib/rsolr/connection.rb:15:in `execute' | |
| rsolr (1.0.6) lib/rsolr/client.rb:163:in `execute' | |
| rsolr (1.0.6) lib/rsolr/client.rb:158:in `send_and_receive' |
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://gems.github.com" | |
| source "http://rubygems.org" | |
| gem 'sitemap_generator' | |
| gem 'rails', '2.3.12' | |
| gem 'binarylogic-authlogic', '2.1.1', :require => "authlogic" | |
| gem 'binarylogic-searchlogic', :require => "searchlogic" | |
| gem 'andand', '1.3.1' | |
| gem 'alchemist', '0.1.2.1' | |
| gem 'calendar_date_select', '1.16.2' |
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
| ll of this relates to the all_parts_auto repo | |
| In general, there should be Site model in the app to handle most of the needs: | |
| Site | |
| + title:string | |
| + domain:string (add an index to this) | |
| + stylesheet_path (logos will all be put into public, stylesheets will reference them) | |
| + authnet_user:string | |
| + authnet_pass:string |
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
| boost(10) { with(:quantity).greater_than 0 } | |
| with :quantity, 0 |
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
| #if params["number"].present? && params["number"].split(" ").count >= 2 | |
| # @part_number = exact_match_by_number_and_line_code(params["number"]) if params["number"] && params[:interchange] != "false" | |
| #end | |
| filter | |
| @part_number = @part_numbers.first if params[:number].split(" ").map{|x| PartNumber.find_by_number(x)}.any? |
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
| production: | |
| solr: | |
| hostname: localhost | |
| port: 8983 | |
| log_level: WARNING | |
| development: | |
| solr: | |
| hostname: localhost | |
| port: 8982 |
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
| class Question | |
| attr_accessible :qstring, :active | |
| has_many :answer_choices | |
| end | |
| class AnswerChoice | |
| attr_accessible :astring, :img_url, :question_id | |
| belongs_to :question | |
| has_many :impacts | |
| has_many :answer_selections |
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
| consumer = OAuth::Consumer.new(ckey, csecret, :realm => "http://www.opentable.com", :oauth_signature_method => "HMAC-SHA1", :site=> "https://secure.opentable.com", :request_token_path => "", :authorize_path => "", :access_token_path=> "", :http_method => :get) | |
| consumer.http.set_debug_output($stderr) | |
| access_token = OAuth::AccessToken.new consumer | |
| res = access_token.get('/api/otapi_v2.ashx/restaurant?pid=1049&rid=82591') |
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
| class CreateEanImages < ActiveRecord::Migration | |
| def change | |
| create_table(:ean_images, :id => false) do |t| | |
| t.integer :hotel_id | |
| t.text :name | |
| t.string :caption | |
| t.string :url | |
| t.string :supplier | |
| t.integer :width | |
| t.integer :height |
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
| FILENAME = ENV["HOTEL_IMAGES"] || "HotelImageList.txt" | |
| def images_for(hotel) | |
| IO.foreach(FILENAME).map do |line| | |
| split = line.split("|") | |
| if hotel.id.to_i == split[0].to_i | |
| Suitcase::Image.new({ | |
| "caption" => split[1], | |
| "url" => split[2], | |
| "thumbnailUrl" => split[6], |