Skip to content

Instantly share code, notes, and snippets.

def update_auth_record
return true if ["test","development"].include?(Rails.env) or @no_update
begin
keymanager_call "update", { 'clientapp[icon_medium]' => (ENV['ENABLERS_HOST'] + self.icon.url(:medium)),
'clientapp[icon_thumb]' => (ENV['ENABLERS_HOST'] + self.icon.url(:thumb))}
true
rescue RestClient::InternalServerError => e
result = Nokogiri::XML(e.http_body)
if result.xpath('//consumer/clientapp/error/message').text =~ /Name has already been taken/
errors.add(:name, :not_unique)
-------------------------------
Request:
-------------------------------
* URL : http://apimatrix.tfoundry.com/services/80/resource_proxy/316
* IP address: 50.137.137.251
* Parameters: {"placeId"=>"work", "triggerId"=>"2Eh2", "original_invocation_url"=>"https://api.tfoundry.com/a1/geo/places/:placeId/triggers/:triggerId?access_token=f906c8ee0e8df6723713b59983e326aa", "authenticity_token"=>"W7+hYcWnqy/xyysxqumsCbhJXMnUDuArQdGTjhlXWcI=", "controller"=>"resource_proxy", "action"=>"proxy", "service_id"=>"80", "rmethod_id"=>"316", "payload_params"=>"{\"access_token\":\"f906c8ee0e8df6723713b59983e326aa\"}", "header_params"=>{"Content-Type"=>"application/json"}}
* Rails root: /var/www/apps/apimatrix/releases/20120604060418
A NoMethodError occurred in resource_proxy#proxy:
undefined method `bytesize' for {}:ActiveSupport::HashWithIndifferentAccess
/home/deploy/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:1735:in `send_request_with_body'
-------------------------------
Request:
-------------------------------
* URL : http://apimatrix.tfoundry.com/services/94/resource_proxy/302
#How hostname is configured
if Rails.env == "production"
ENV["HOSTNAME"] = "auth.tfoundry.com"
elsif Rails.env == "staging"
ENV["HOSTNAME"] = "alpha-auth.stage.tfoundry.com"
else
ENV["HOSTNAME"] = "localhost"
end
Failures:
1) MembershipsController POST create with invalid params re-renders the 'new' template
Failure/Error: response.should render_template("new")
expecting <"new"> but rendering with <"">
# ./spec/controllers/memberships_controller_spec.rb:104:in `block (4 levels) in <top (required)>'
2) MembershipsController PUT update with invalid params assigns the membership as @membership
Failure/Error: put :update, {:id => @membership.to_param, :membership => {}}
ActiveRecord::RecordNotFound:
def self.user_agent(mybrowser)
case mybrowser
when /MSIE/ then "Internet Explorer"
when /Firefox/ then "Mozilla Firefox"
when /Opera/ then "Opera"
when /Safari/ then "Safari"
when /Chrome/ then "Google Chrome"
when /Camino/ then "Camino"
when /Dillo/ then "Dillo"
when /Epiphany/ then "Epiphany"
/Users/cristianvasquez/Developer/.rvm/gems/ruby-1.8.7-p330@clutch/gems/taskmapper-trac-0.6.0/lib/taskmapper-trac.rb:8: warning: already initialized constant VERIFY_PEER
[21, 30] in /Users/cristianvasquez/rails/clutch/lib/models/change.rb
21 key :system, String
22 belongs_to :user
23 timestamps!
24
25 debugger
=> 26 validates_presence_of :code, :project, :user
27
28 before_validation :ensure_has_user
*********************** Models *******************************
xxxxxxxxxxxxxxxxxxxxxxxxxxxx change.rb
/Users/cristianvasquez/Developer/.rvm/gems/ruby-1.8.7-p330@clutch/gems/mongo_mapper-0.8.6/lib/mongo_mapper/plugins/dynamic_querying.rb:37:in `method_missing'
/Users/cristianvasquez/Developer/.rvm/gems/ruby-1.8.7-p330@clutch/gems/mongo_mapper-0.8.6/lib/mongo_mapper/plugins/scopes.rb:16:in `scopes'
/Users/cristianvasquez/Developer/.rvm/gems/ruby-1.8.7-p330@clutch/gems/mongo_mapper-0.8.6/lib/mongo_mapper/plugins/scopes.rb:7:in `scope'
/Users/cristianvasquez/rails/clutch/lib/models/change.rb:30
/Users/cristianvasquez/Developer/.rvm/gems/ruby-1.8.7-p330@clutch/gems/require_all-1.2.0/lib/require_all.rb:109:in `require'
/Users/cristianvasquez/Developer/.rvm/gems/ruby-1.8.7-p330@clutch/gems/require_all-1.2.0/lib/require_all.rb:109:in `send'
/Users/cristianvasquez/Developer/.rvm/gems/ruby-1.8.7-p330@clutch/gems/require_all-1.2.0/lib/require_all.rb:109:in `require_all'
/Users/cristianvasquez/Developer/.rvm/gems/ruby-1.
use Rack::GoogleAnalytics, :web_property_id => "UA-20760952-1",
:async => true
=> #<TaskMapper::Provider::Kanbanpad::Ticket assignee=["cristianv"] backlog=false created_at=Wed Aug 08 16:16:31 UTC 2012 finished=false id="502290df2f1166000a1216df" project_slug="2042add40accd56ab6c5" step_id="50058dc4ae3681000f0ea4ca" title="Remplazar el sistema de archivos para variables en memoria" updated_at=Wed Aug 08 16:16:39 UTC 2012 wip=true>
ruby-1.8.7-p330 :048 > xticket.assignee
=> "Nobody"
ruby-1.8.7-p330 :049 >