Skip to content

Instantly share code, notes, and snippets.

View kirkconnell's full-sized avatar

Carlos Kirkconnell kirkconnell

  • Google
  • Mountain View, CA
View GitHub Profile
var mousingOverEvent;
var mouseOutDelay = 500;
$('.hover_menu').hover(function(){
clearTimeout(mousingOverEvent);
$('#passport_login').hide();
$('#passport_dropdown').show();
$('#passport_dropdown').position({
my: "right top",
at: "right bottom",
of: "#switch_apps a",
@kirkconnell
kirkconnell / gist:957552
Created May 5, 2011 18:07
Query for SNPS comparisons
SELECT
e.id,
e.company_name,
l.url_for AS location,
sn_entities.location_id,
sn_entities.sn_price,
ps_entities.ps_price,
p.monthly_price AS snps_price
FROM
entities e INNER JOIN
#return an array of arrays for the act event logger track changes in content_ui fields
# [ profile content real name, "displayed field name: displayed field value"]
def content_x_log_array
content_ui_log_instructions = (1..20).map {|n| ["content_#{n}", lambda{|value| "#{get_display_name(n)} : #{value}" }}
end
def get_display_name(n)
if template_group.present? && ci = template_group.content_uis.find{|ci| c.generic_field_number == n}
ci.field_name.titleize.gsub(/\s+/, '').underscore.to_sym
end
@kirkconnell
kirkconnell / conten_ui_log.rb
Created April 29, 2011 23:55
Get content_ui for log
#return an array of arrays for the act event logger track changes in content_ui fields
# [ profile content real name, "displayed field name: displayed field value"]
def content_x_log_array
content_ui_log_instructions = (1..20).map {|n| ["content_#{n}", lambda{|value| "#{get_display_name(n)} : #{value}" }}
end
def get_display_name(n)
if template_group.present? && ci = template_group.content_uis.find_by_generic_field_number(n)
ci.field_name.titleize.gsub(/\s+/, '').underscore.to_sym
end
@current
Scenario: Forgot Password # features/plain/authentication.feature:41
Given I am a verified user "rick@example.net" / "password" on the process server "Big Process Server" # features/step_definitions/user_steps.rb:15
And I am on the home page # features/step_definitions/web_steps.rb:14
When I follow "Forgot Password?" # features/step_definitions/web_steps.rb:26
Then I should be on the forgot password page # features/step_definitions/web_steps.rb:255
When I fill in "password_email" with "rick@example.net" # features/step_definitions/web_steps.rb:35
And I press "Reset Password" #
Failing Scenarios:
cucumber features/plain/authentication.feature:41 # Scenario: Forgot Password
cucumber features/plain/authentication.feature:67 # Scenario: Terms of Service
cucumber features/plain/authentication.feature:75 # Scenario: Must Change Password
cucumber features/plain/authentication.feature:86 # Scenario: Asked to Update User Info
cucumber features/plain/authentication.feature:99 # Scenario: Order of Operations - Authorize, ToS, Change Password, Update User Info, Original Url Redirect
cucumber features/plain/entities.feature:7 # Scenario: Opt-in from Dashboard
cucumber features/plain/registration.feature:10 # Scenario: New registration
cucumber features/plain/registration.feature:43 # Scenario: Invited to ServeManager
cucumber features/plain/registration.feature:74 # Scenario: Invited to ServeManager with pending jobs
@kirkconnell
kirkconnell / gist:855870
Created March 4, 2011 23:02
Forgot Password Cassette
---
- !ruby/struct:VCR::HTTPInteraction
request: !ruby/struct:VCR::Request
method: :post
uri: !str
str: http://sgcore.local:80/database_states.xml
"@_rails_html_safe": false
body: |
<?xml version="1.0" encoding="UTF-8"?>
<database-state>
- !ruby/struct:VCR::HTTPInteraction
request: !ruby/struct:VCR::Request
method: :put
uri: !str
str: http://sgcore.local:80/v1/users/36793.xml
"@_rails_html_safe": false
body: |
<?xml version="1.0" encoding="UTF-8"?>
<user>
<salt>rdcoC6Vv</salt>
Factory.define :wisconsin_profile_with_products, :parent => :state_profile do |f|
f.primary_address { Factory.create(:primary_address) }
f.after_create do |profile|
product = Factory.create(:product_in_wisconsin, :site => profile.site)
profile.locations << product.locations
profile.entity.products << product
end
end
Factory.define :seattle_profile_with_products, :parent => :profile do |f|
f.primary_address { Factory.create(:primary_address) }
f.profile_type do
pt = ProfileType.find_by_name('County Profile')
pt ||= Factory.create(:profile_type, :name => "County Profile")
end
f.after_create do |profile|
Factory.create :seattle_loc
Factory.create :seattle_zip_loc
product = Factory.create(:product_in_king_county, :site => profile.site)