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
def self.update_map | |
map = 'function() {' + | |
'for (var i in this.interests) {' + | |
'if (this.interests[i]._id != null) {' + | |
'emit(this.interests[i]._id, {"users": this.facebook_id, "count": 1});' + | |
'}' + | |
'}' + | |
'}'; | |
reduce = 'function(key, emits) {' + | |
'var all_users = Array(); var count = 0;' + |
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
def self.get_potentials(interest_ids) | |
return {} if interest_ids.nil? ||interest_ids.empty? | |
map = <<-eos | |
function() { | |
for(var i in this.value.users) { | |
emit(this.value.users[i], 1); | |
} | |
}; | |
eos | |
reduce = <<-eos |
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
/Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:49:in `initialize': not in gzip format (Zlib::GzipFile::Error) | |
from /Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:49:in `new' | |
from /Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:49:in `initialize' | |
from /Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:64:in `each' | |
from /Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:55:in `loop' | |
from /Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:55:in `each' | |
from /Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:32:in `initialize' | |
from /Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/ |
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
<li> | |
<a class='prodImage' href='#' target='_blank'> | |
<img alt='' src='/images/wg_noProdImage.png'> | |
</a> | |
<a class='prodTitle' href='#'> | |
From here, i can just recommend whatever I want. | |
</a> | |
<a class='rate_button' href="javascript:">Select</a> | |
<input id='gi_4cd9dafc404aaa17ca000062_selected' name='gi[4cd9dafc404aaa17ca000062][selected]' type='hidden' value='false'> | |
<br class='clear'> |
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
before do | |
mock_load_request | |
mock_audit_gift_create | |
mock_save_request | |
end | |
it "should load the request" do | |
mock_load_request("expects") | |
act | |
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
context "user was someones friend before" do | |
before do | |
@user = User.new(:facebook_id => 502884401, :is_user => false) | |
mock_load_existing_user(@user, @access_token) | |
mock_delay_update_user | |
Action.stubs(:user_create).with(502884401) | |
end | |
it "should audit the user creation" do | |
Action.expects(:user_create).with(502884401) |
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
describe('user is not logged in', function(){ | |
it('should log in the user', function(){ | |
var response = { | |
session: null | |
}; | |
spyOn(FB, 'init'); | |
spyOn(FB, 'getLoginStatus'); | |
spyOn(FB, 'login'); |
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
Feature: Requestor views the interests that are most popular among their friends and selects the ones they also like | |
So that my interests can be compared to the most popular interests of my friends | |
As a requestor | |
I want to indicate which of the most popular interests I also like | |
Scenario: View the most popular interests in the requestor's network | |
Given I am logged in | |
When I go to "popular interests" | |
Then I should see the most popular interests of my friends |
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
------------------- | |
> rvm rubygems 1.3.7 | |
------------------- | |
Removing old Rubygems files... | |
Installing rubygems dedicated to system... | |
Installing rubygems for /bin/ruby | |
Error running 'GEM_PATH="/Volumes/files/jeffdeville/.rvm/gems/ree-1.8.7-2010.02....." GEM_HOME="/Volumes/files/jeffdeville/.rvm/gems/ree-1.8.7-2010.02" "/bin/ruby" "/Volumes/files/jeffdeville/.rvm/src/rubygems-1.3.7/setup.rb"' | |
ln: /lib/ruby/gems/: No such file or directory |
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
> rvm use ree; rvm --trace rubygems 1.3.7 | |
Using /Volumes/files/jeffdeville/.rvm/gems/ree-1.8.7-2010.02 | |
+__rvm_parse_args:440> [[ -z 4.3.9 ]] | |
+__rvm_parse_args:597> [[ -z '' && -n '' ]] | |
+__rvm_parse_args:599> [[ 0 -eq 1 || -n '' ]] | |
+__rvm_parse_args:15> [[ -n rubygems ]] | |
+__rvm_parse_args:17> rvm_token=rubygems | |
+__rvm_parse_args:19> [[ 1 -gt 0 ]] | |
+__rvm_parse_args:19> next_token=1.3.7 | |
+__rvm_parse_args:19> shift |