Skip to content

Instantly share code, notes, and snippets.

ValueType vt = pf.getValueType();
TicketProp prop = vt.newTicketProp();
prop.setValue(value);
queryString = "FROM " + prop.getClass().getName() + " ticketProp WHERE ticketProp.propField.name=:fieldName AND ticketProp.value" + condition + ":value";
query = em.createQuery(queryString);
query.setParameter("value", prop.getValue());
gary-moores-macbook:ATHENA-Components gary$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 3 commits.
#
nothing to commit (working directory clean)
gary-moores-macbook:ATHENA-Components gary$ git push origin master
Everything up-to-date
gary-moores-macbook:ATHENA-Components gary$
Oct 29, 2010 5:33:00 PM com.sun.jersey.api.container.filter.LoggingFilter filter
INFO: 31 * Server in-bound request
31 > POST http://localhost:8080/tickets/transactions
31 > content-length: 18
31 > content-type: application/json; charset=UTF-8
31 > host: localhost:8080
31 > connection: Keep-Alive
31 > user-agent: Apache-HttpClient/4.0-beta2 (java 1.5)
31 > expect: 100-Continue
31 >
Nov 12, 2010 4:34:30 PM com.sun.jersey.api.container.filter.LoggingFilter filter
INFO: 59 * Server in-bound request
59 > POST http://localhost:8080/tix/tickets/.json
59 > accept: */*
59 > connection: close
59 > user-agent: artful.ly
59 > content-type: application/json
59 > content-length: 831
59 > host: localhost:8080
59 >
Role(#2172144680) expected, got NilClass(#2148295560)
Rails.root: /Users/gary/dev/artful.ly
Application Trace | Framework Trace | Full Trace
app/models/user.rb:24:in `to_producer'
app/controllers/user_roles_controller.rb:24:in `create'
Request
Parameters:
@gmoore
gmoore / rspec
Created December 3, 2010 17:02
This works on my work computer, fails on laptop
gary-moores-macbook:artful.ly gary$ sudo bundle install
Password:
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.0)
Using builder (2.1.2)
Using i18n (0.4.1)
Using activemodel (3.0.0)
Using erubis (2.6.6)
Using rack (1.2.1)
I manually edited /public/javascripts/artfully.js to point to the current hostnames
Artfully event:
http://athena.fracturedatlas.org:8001/events/53
user:justin.karr@fracturedatlas.org
pass: (ask me for it)
Radiant setup:
Started POST "/store/checkout" for 24.103.41.198 at Fri Mar 18 14:46:59 +0000 2011
Processing by Store::CheckoutsController#create as HTML
Parameters: {"commit"=>"Purchase", "confirmation"=>"1", "athena_payment"=>{"athena_customer"=>{"last_name"=>"Musical", "phone"=>"5712417836", "first_name"=>"Billy", "email"=>"sally@fracturedatlas.org"}, "athena_credit_card"=>{"cvv"=>"984", "card_number"=>"4111111111111111", "cardholder_name"=>"Foo Mc Foo", "expiration_date(1i)"=>"2017", "expiration_date(2i)"=>"3", "expiration_date(3i)"=>"1"}, "billing_address"=>{"company"=>"Fractured Atlas", "city"=>"NEW YORK", "country"=>"United States", "postal_code"=>"21201", "street_address1"=>"248 W 35th ST", "street_address2"=>"FLOOR 10", "last_name"=>"Musical", "first_name"=>"Billy", "state"=>"New York"}}, "authenticity_token"=>"zdvqbBXLPcnnwilvqzoPtrhhTKvWikdNE2/qDEDYEDw=", "utf8"=>"✓"}
Order Load (0.3ms) SELECT "orders".* FROM "orders" WHERE "orders"."id" = 2 LIMIT 1
PurchasableTicket Load (0.2ms) SELECT "purchasable_tic
ruby-1.9.2-p180 :031 > ticket
=> #<AthenaTicket:0x00000102c4b8c0 @attributes={"price"=>"5000", "event_id"=>"229376", "performance"=>2011-08-19 15:13:00 -0400, "event"=>"A Little Testing", "state"=>"sold", "performance_id"=>"229383", "venue"=>"Broadhurst Theatre", "section"=>"Balcony", "id"=>"458771", "buyer_id"=>"32779"}, @prefix_options={}, @buyer=#<AthenaPerson:0x00000102d778e8 @attributes={"last_name"=>"Erdman", "email"=>"mallie.blanda@pouros.com", "organization_id"=>"7", "first_name"=>"Taylor", "id"=>"32779"}, @prefix_options={}>, @default_current_state=:sold, @errors={}, @remote_errors=nil, @validation_context=nil>
ruby-1.9.2-p180 :032 > ticket.id
=> "458771"
ruby-1.9.2-p180 :033 > ticket.expired?
=> false
Started POST "/exchanges" for 127.0.0.1 at Thu Apr 28 20:25:52 -0400 2011
Processing by ExchangesController#create as HTML
Parameters: {"items"=>["32772"], "commit"=>"Exchange these tickets", "order_id"=>"32771", "authenticity_token"=>"msenMBOEhOgjPSTvxDDaoClOtM/1Uvzk6ceck5E3cxM=", "utf8"=>"✓", "tickets"=>["32780"]}
User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
GET http://localhost:8080/orders/orders/32771.json
--> 200 OK 105 (25.9ms)
GET http://localhost:8080/orders/items/32772.json
--> 200 OK 107 (25.6ms)
GET http://localhost:8080/tix/tickets/32780.json
--> 200 OK 213 (22.5ms)