1
0
Fork 0
forked from OpenNeo/impress
Commit graph

583 commits

Author SHA1 Message Date
9ca68b02b2 parse "fits:8-bit-chomby" as "fits 8-bit chomby" rather than "fits 8 bit"
The "fits:8-bit-chomby" search filter was being read as color=8, species=bit.
Now, we split from the right-hand side of the filter instead.

Still a problem for anyone who explicitly types the Spanish/Portuguese
ordering of "fits:chomby-8-bits", but I'm okay with this cheap fix, since
I bet literally nobody has done that in the past month, if ever :P
2015-04-07 23:13:22 -05:00
a11140f9e1 stop breaking on donations that delete their outfit 2015-02-25 13:42:35 -06:00
a3c31f7042 yum, we accept bitcoin! 2014-12-23 23:22:15 -05:00
9c6399a23d Baby Raindorf Hoodie Robe is annoying. special case it as baby-fitting in the worst hack possible ;P 2014-12-17 00:54:55 -06:00
4d0c72f3b1 Stop freaking out if we try to remove a closet hanger but it's already dropped from search 2014-11-10 13:22:00 -06:00
51700a7386 better donation feature outfit validation
In particular, outfit_id == 0 would cause outfit_id? to
return false, so it wouldn't run the outfit presence
validation, so /donations/features would try to load
outfit #0 and fail.

Also, flash[:alert] instead of flash[:error] when outfit_id
is bad.
2014-09-13 14:16:50 -05:00
d179ffd9b6 whoops; get the To address right for donation notifications 2014-09-12 14:29:20 -05:00
2e08a1261b don't overflow the progress bar 2014-09-11 17:47:42 -05:00
8e22c271a4 track campaign progress 2014-09-11 17:40:37 -05:00
04a328e6ee homepage outfit features 2014-09-10 15:38:26 -05:00
f11f6374da donation mailer 2014-09-10 14:32:54 -05:00
90b45dcecd edit featured outfits on donation page 2014-09-09 23:16:02 -05:00
59d5e99312 donation show form and basic name updating 2014-09-09 22:04:17 -05:00
595b1c2fc5 charge and record donations 2014-09-09 21:11:55 -05:00
ebb0a75b72 whoops; if no contact neopets username, return nil 2014-04-25 23:04:59 -05:00
eda80a8dc7 double whoops; the actual problem was that i hadnt restarted the background workers :P 2014-04-05 23:52:24 -05:00
9fe19e00c7 whoops; now that we index by item fit, update item after asset save 2014-04-05 23:48:36 -05:00
44ff466a64 advanced search by pet type fit :) 2014-04-05 18:48:20 -05:00
0fe31ee79a basic fits functionality in search 2014-04-05 17:43:54 -05:00
8fc156833f basic tip functionality 2014-04-02 23:00:50 -05:00
3c36cd6aef assign biology assets to restricts and item assets to occupies 2014-04-02 20:56:42 -05:00
d47ec7a0cd when advanced query is empty, go blank instead of saying no results 2014-04-02 20:42:49 -05:00
d7af6cfd4a populate occupies/restricts selects 2014-04-02 20:26:53 -05:00
f4c435c3cd handle user filters 2014-04-02 10:32:13 -05:00
1d11cf6edc better handling of i18n and labels and resource filters and junk 2014-04-02 10:32:13 -05:00
170b7fa6f5 can search items with a form-based query instead of text-based 2014-04-02 10:32:13 -05:00
a326f09eda lolwhoops, measure prank-funniness in PST 2014-04-01 19:10:44 -05:00
f9fa3eb596 prank color artist credit 2014-03-31 21:05:28 -05:00
6e80c228c1 include prank message on wardrobe page 2014-03-30 22:37:33 -05:00
32bab89ed4 add prank messages to outfits#show 2014-03-28 15:15:04 -05:00
8e93d603fa list prank colors as fake on the homepage, unless pranks are funny today 2014-03-27 22:44:18 -05:00
b583254397 create colors from rake 2014-03-27 22:28:48 -05:00
03c76fe882 Update missing body ID prediction to handle, say, the Maraquan Mynci.
It turns out that some pets for seemingly nonstandard colors have the
standard body type anyway, and vice-versa. This implies that we should
stop relying on a color's standardness, but, for the time being, we've
just revised the prediction model:

Old model:
    * If I see a body_id, I find the corresponding color_ids, and it's wearable
      by all pet types with those color_ids.

New model:
    * If I see a body_id,
        * If it also belongs to a basic pet type, it's a standard body ID.
            * It therefore fits all pet types of standard color (if there's
              more than one body ID modeled already). (Not really,
              because of weird exceptions like Orange Chia. Should that be
              standard or not?)
        * If it doesn't also belong to a basic pet type, it's a nonstandard
          body ID.
            * It therefore only belongs to one color, and therefore the item
              fits all pet types of the same color.
2014-01-20 15:29:01 -06:00
b2fca6b6c1 closet hangers index uses neopets connections dropdown 2014-01-18 22:50:14 -06:00
72b174c9b3 store all neopets usernames for logged-in users, but breaks closet_hangers#index 2014-01-18 21:55:01 -06:00
8288b8a10d username form, backed by localstorage for guests; not yet backed by db for logged-in users 2014-01-17 11:12:56 -06:00
99b2acd419 attach body id to newest unmodeled item species names 2014-01-10 16:25:03 -05:00
9a4e114964 oh yum, this is really starting to come together :) 2014-01-10 16:25:02 -05:00
7c6e607612 basic neopia api integration 2014-01-10 16:25:02 -05:00
4a49ad2fe8 oh poo, didn't commit these properly with the closet hanger caching :( 2013-12-27 21:48:38 -05:00
b6247fa22f prepare partials for closet_hangers#index, too 2013-12-27 21:48:28 -05:00
1ce32e5867 Use item proxies better for items#index?format=html :D
We used get_multi when preparing the proxies to decide which to
load from the database, but then sent multiple get requests to
Memcache to re-fetch the same data from that get_multi. Silly!
Use the data that's already stored on the proxy anyway.
2013-12-27 21:11:03 -05:00
6b340f906e Cache trade info on items#show, finally! I think it's the performance culprit. 2013-12-27 14:49:46 -05:00
cdffcfbcfd TIL item proxies can read from the cache in bulk 2013-12-09 01:15:57 -06:00
728ff60c5f move item cache sweeping and flex syncing to background tasks 2013-12-09 00:12:05 -06:00
4144b4dc74 only send cache deletions for usable locales
Right now we're spending too much time expiring cache keys when
getting contributions. The longer-term fix is to move it to a
background task, but it's good to restrict deletions only to usable
locales rather than all the ones that Rails theoretically supports.
2013-12-08 23:44:25 -06:00
f07996d762 cache pet images on items#show, in case that's what's being a super-slow jerkface 2013-12-05 15:22:43 -06:00
cc7ac363dd WIP commit for speeding up item show pages 2013-12-05 13:27:56 -06:00
2b870cf91b add pet state replacement task 2013-11-30 20:33:48 -05:00
0cb7fc87df include zones_restrict in item selector when mall spidering, to avoid flex_source errors 2013-10-08 14:42:46 -05:00
019303031b choose list when importing from pets 2013-08-17 12:07:04 -04:00
e48d00294d fix silly closet hanger merge bug involving flex 2013-07-28 23:30:29 -07:00
082119afe1 fix some mall spider bugs, including not having all the attributes it needed for search indexing 2013-07-09 21:00:36 -07:00
9bd49aa85d first step in repairing mall spider 2013-07-09 20:01:55 -07:00
72c59f0b68 if there's only one item search result, redirect to it 2013-07-09 19:54:22 -07:00
4c208c9ac3 instead of returning an empty item list on contradiction, return an empty proxy collection 2013-07-03 18:17:16 -07:00
5e60795f31 Oops, delegate Item::Proxy#to_param to the item, or we get bad links. 2013-06-27 10:47:02 -07:00
5b9394ce82 oops - don't cache as_json's owned/wanted, but instead have the proxy override 2013-06-27 00:10:55 -07:00
bf697cef7b expire item#as_json when updated 2013-06-27 00:00:37 -07:00
9e3cac82ec use proxies for item html, too
Some lame benchmarking on my box, dev, cache classes, many items:

No proxies:
    Fresh JSON:  175,  90,  90,  93,  82, 88, 158, 150, 85, 167 = 117.8
    Cached JSON: (none)
    Fresh HTML:  371, 327, 355, 328, 322, 346 = 341.5
    Cached HTML: 173, 123, 175, 187, 171, 179 = 168

Proxies:
    Fresh JSON:  175, 183, 269, 219, 195, 178 = 203.17
    Cached JSON:  88,  70,  89, 162,  80,  77 = 94.3
    Fresh HTML:  494, 381, 350, 334, 451, 372 = 397
    Cached HTML: 176, 170, 104, 101, 111, 116 = 129.7

So, overhead is significant, but the gains when cached (and that should be
all the time, since we currently have 0 evictions) are definitely worth
it. Worth pushing, and probably putting some future effort into reducing
overhead.

On production (again, lame), items#index was consistently averaging
73-74ms when super healthy, and 82ms when pets#index was being louder
than usual. For reference is all. This will probably perform
significantly worse at first (in JSON, anyway, since HTML is already
mostly cached), so it might be worth briefly warming the cache after
pushing.
2013-06-26 23:50:19 -07:00
e42de795dd Use item proxies for JSON caching
That is, once we get our list of IDs from the search engine, only
fetch records whose JSON we don't already have cached.

It's simpler here to use as_json, but it'd probably be even faster
if I figure out how to serve a plain JSON string from a Rails
controller. In the meantime, requests of entirely cached items
are coming in at about 85ms on average on my box (dev, cache
classes, many items), about 10ms better than the last
iteration.
2013-06-26 23:01:12 -07:00
6984201990 dev util method to manually change SWF asset body ID 2013-06-26 20:08:19 -07:00
b93dbb8e49 Remove redundant queries when importing closet pages
Specifically, we were running a find_or_initialize_by for all 50
hangers, which isn't great. Collation logic is more complicated this
way, but query count is way lower.

Additionally, compare against hanger.list_id instead of hanger.list,
because hanger.list will fire a query if list_id is non-nil, but that
nil ID tells us everything we needed to know, anyway.
2013-06-26 00:10:52 -07:00
a7574f0864 Don't add duplicate hangers now that closet import can specify a list
Bug report that this resolves:

...However, when I was using the "Import from SDB" tool just a few
minutes ago, it ended up adding EVERY neocash item into the "Not
In A List" section, regardless if I already that item imported
into my "Your Items". So, basically.. I had duplicates of
everything and it would not allow me to move them around into
separate catergories or anything. I know that every other time i've
used the import tool, it would only add NEW items that are not
currently already in my lists yet.
2013-06-25 23:40:02 -07:00
fb219f82e8 sigh, add another special color description format 2013-06-23 22:58:17 -07:00
3c127569fe stop caching item preview species images, and fix the bad query instead
Most of the reasoning is documented in the big comment. In short, we tried
to solve the problem with caching, but the caching should hardly be necessary
now that the bottleneck should be fixed. We'll see on production if it
actually solves the whole problem, but I've confirmed in the console that
redefining this function makes random_basic_per_species (as called during
rendering) a ton faster. And this way we keep our randomness, woo!
2013-06-23 22:35:27 -07:00
d132567931 move closet-hanger-destroy form to JS 2013-06-22 15:45:59 -07:00
0d348d6971 oops: sweep localized item link caches 2013-06-07 13:26:51 -07:00
2501cb5667 fix null zone ID bug
TNT has started serving half-removed Corridor of Chance effects:
it has the asset ID and URL and all, but the zone ID is blank.
RocketAMF has patched the empty key bug, and now we ignore assets
associated with empty keys.
2013-05-23 18:48:19 -07:00
bf528b06d2 label pet states as glitched, send to bottom of emotion order 2013-04-27 10:21:51 -05:00
3c91f0cde0 import items to a specific list 2013-04-09 15:50:33 -05:00
9d3acf660c in item queries, ignore name filters that are too small or too large 2013-03-29 17:05:14 -05:00
ae9b690536 assets that fit a special color can also have body_id == 0
The Baby Floor Gym, in particular, seems to have body_id == 0, but
is only for Baby pets. This commit unbreaks that item
2013-03-07 19:31:49 -06:00
5e55423dca now that we're on rails 3.2, mount resque at /resque - just for
meeeeee :)

`User#admin?` is now defined as `name == 'matchu'`. I feel kinda
bad about hardcoding that, but I also don't care enough right
now :P
2013-03-05 21:09:08 -06:00
a80f70bb88 phew, fixed some issues with contribution saving in rails 3.2 2013-03-05 20:51:24 -06:00
6cad85cec1 iron out some rails 3.1 compatibility issues 2013-03-05 15:41:55 -06:00
250f425509 rails 3.1 upgrade - still buggy 2013-03-05 15:10:25 -06:00
f547a75c40 ruby 2.0.0 compatibility... hopefully. 2013-02-25 01:14:45 -05:00
0074e54417 tweak to avoid certain single-species items: count distinct body IDs in other assets 2013-02-20 00:58:41 -06:00
0e2e83ef56 bring needed items queries up-to-date with new species support ID syntax 2013-02-20 00:52:37 -06:00
1c0b5c743e better handle new colors and species 2013-02-15 23:57:06 -06:00
989363f743 better i18n for contributed description 2013-02-12 11:45:54 -06:00
e71530a958 only show item zones on outfits#edit occupies filter helper 2013-02-05 11:52:52 -06:00
5d618237a9 fix bug in determining special color
Specifically, the Tyrannian Meerca Spear is a pb item that contains
"pea", so its item page is only willing to show a Pea Chia. Now,
a color must be a whole word in the item name for special color
determination to work.
2013-02-03 13:31:22 -06:00
7f2ce2839b appearance dropdown - wow, that was easy 2013-01-31 19:46:34 -06:00
5985e234da pet states know their localized description 2013-01-31 19:11:15 -06:00
9c6797699e enable hangers in development, disable in production 2013-01-29 23:06:37 -06:00
934923b0f6 sigh. disable user filters again :( 2013-01-28 18:30:04 -06:00
629ff2c45d index items by *actual* species support ids 2013-01-28 17:54:50 -06:00
2cc688f7ff bump up pet load timeout 2013-01-28 17:52:10 -06:00
f59fa92aa1 oops, dont include duplicate items in wardrobe after translating 2013-01-28 17:02:33 -06:00
f484fc5c21 update supported species list on items#show 2013-01-28 16:54:25 -06:00
2486e46a25 re-enable user filters, woo 2013-01-28 16:25:00 -06:00
eab14e31fd waaay speed up Pet#translate_items
A few key changes:
  * Don't reload the whole pet 8 times!! Sooo many bad things
    happen, including redundant lookups of everything else and
    too many item saves and reindexes. Instead, fetch the item
    data, apply it to the items, and then save the items (once
    each!)
  * Updated my branch of globalize3 to be even better at avoiding
    redundant queries when saving. Woo.
  * Last realization: wrapping all the item saves in a single
    transaction works wonders. COMMIT seems to have high overhead,
    so doing only one took it from 50ms * 10 or whatever to 60ms.
    Good stuff.
2013-01-28 15:18:11 -06:00
482b1a155d ugh, fine, save the pets sequentially 2013-01-28 03:02:20 -06:00
206811a2fb oops, deal with missing item fields better 2013-01-28 03:01:25 -06:00
0b32e8ba59 cut down on pets#load zone queries 2013-01-28 02:19:37 -06:00
a39110884d cut down on pets#load queries 2013-01-28 02:10:25 -06:00
6c3ff09f5d make en-MEEP translatable - because sorting by translations doesnt work well with fallbacks 2013-01-27 20:43:08 -06:00
8d72bf6353 temporarily disable user-filters in item search 2013-01-27 01:45:18 -06:00
eaf875c6c7 zone, species, color alphabetical by the current locale
We were joining to the translations table to sort records
alphabetically, but then it sorted by *all* of the translations in
some strange way. Now use with_translations to restrict the join
to the current locale.
2013-01-27 00:25:52 -06:00
361b5df256 translate zones 2013-01-26 09:54:29 -06:00
e86bcfaf54 improve globalized search queries: normalize input, fallbacks, etc 2013-01-26 09:52:58 -06:00
2798ebbd5c fix pb filter for other locales 2013-01-26 09:52:21 -06:00
8bb553701a remove N+1 queries in contributions#index 2013-01-25 15:23:48 -06:00
573e8a6459 use I18n.with_locale wherever possible, since it catches errors properly
In particular, pet#load was handling locale-switching itself, but wasn't
switching back to original locale on error. We could've used a rescue
block, but, when I18n.with_locale is so cool, may as well use it fully.
2013-01-25 15:09:56 -06:00
4e0ce6c20b bugfix: zone-not-found raises error again 2013-01-25 11:15:54 -06:00
e6d9e5ee75 stop removing "item" from zone plain labels: background vs. backgrounditem 2013-01-25 10:47:47 -06:00
d0dffd6cff fix ClosetHanger.set_quantity to not call destroy on a new hanger; it confuses flex 2013-01-25 10:44:15 -06:00
7f18fe12c1 user:owns, user:wants queries 2013-01-25 10:35:35 -06:00
dd30fbe0d7 move from with_translations to includes(:translations), since we dont usually care about requiring 2013-01-24 18:26:00 -06:00
b2822d901b fix n+1 query for translations on items#index 2013-01-24 18:26:00 -06:00
26ac3782ec move zones to database 2013-01-24 18:26:00 -06:00
ce4e2fd53c move species to database 2013-01-24 18:25:59 -06:00
965465ca51 move species to database 2013-01-24 18:25:59 -06:00
94ecc6f02d remove old item search interface 2013-01-24 18:24:35 -06:00
cded361f73 update item search to original name-matching behavior
We originally had a regression on name-matching, where, among
other issues, `straw hat` returned items containing both "straw"
and "hat", which isn't really helpful behavior since we're sorting
alphabetically. Now, `straw hat` behaves as expected.

Additionally, "phrases like these" behave as expected, too.
2013-01-24 18:24:35 -06:00
04f29c8611 allow non-item zones in queries (mainly for restricts filters) 2013-01-24 18:24:35 -06:00
66e0ba28d7 species/zone conditions now render properly, instead of raising parse error from elastic 2013-01-24 18:24:35 -06:00
6e09b8bc10 globalized search first draft
Confirmed features:
    * Output (retrieval, sorting, etc.)
    * Name (positive and negative, but new behavior)
    * Flags (positive and negative)

Planned features:
    * users:owns, user:wants

Known issues:
    * Sets are broken
        * Don't render properly
        * Shouldn't actually be done as joined sets, anyway, since
          we actually want (set1_zone1 OR set1_zone2) AND
          (set2_zone1 OR set2_zone2), which will require breaking
          it into multiple terms queries.
    * Name has regressed: ignores phrases, doesn't require *all*
      words. While we're breaking sets into multiple queries,
      maybe we'll do something similar for name. In fact, we
      really kinda have to if we're gonna keep sorting by name,
      since "straw hat" returns all hats. Eww.
2013-01-24 18:24:35 -06:00
c9ae7155b1 locale metadata, including hidden locales for item loading and selection 2013-01-24 18:24:34 -06:00
ef2423e87f globalize3 for items 2013-01-24 18:24:34 -06:00
29ed401238 load pet by locale, prepare needed translations 2013-01-24 18:24:34 -06:00
9c8f7f498f basic translation infrastructure for items - search is still english-only, and probably will have to be replaced with a legit search engine 2013-01-24 18:24:34 -06:00
d79c225c1e apply globalize3 to items 2013-01-24 18:24:34 -06:00
b213f6d0ba i18n for closet_hangers#index, closet_lists#edit, closet_lists#new, and maybe some more closet-related things - this was a biggie 2013-01-24 18:23:19 -06:00
c32425bc14 i18n for neopets_pages#new 2013-01-24 18:23:19 -06:00
ac0490dc1d i18n for items#show (including javascripts/items/show.js) 2013-01-24 18:23:19 -06:00
5e89e2b947 i18n for items#index (and layouts#items) 2013-01-24 18:23:18 -06:00
132a49d30b i18n for outfits#new (and layouts#application), including caching 2013-01-24 18:23:18 -06:00
bfd825d98e attempt to fix new species_support_ids format. sigh. 2013-01-23 00:25:09 -06:00
9701221035 wardrobe now considers item.species_support_ids when deciding compatibility
For example, the Meerca Maid Tray is a foreground item, so the SWF is marked
as compatible with all body types, but the item itself is clearly marked as
Meercas-only. items#show reflected this properly, but the swf_assets#index
call that the wardrobe uses ignored item.species_support_ids.

So, /bodies/:body_id/swf_assets.json?item_ids[]=... was deprecated in favor
of /pet_types/:pet_type_id/items/swf_assets.json?item_ids=[]..., which is
much like the former route but, before loading assets, also loads the pet
type and items, then filters the items by compatibility, then only loads
assets for the compatible items.
2013-01-02 23:15:32 -05:00
339a730779 timeout on background jobs 2012-11-04 12:01:03 -06:00
f56b544963 brought-to-you-by on items#show lists contributors 2012-10-24 22:09:05 -05:00
671641cc16 a more forgiving "type" search filter 2012-10-08 21:20:18 -05:00
775ef7fa51 finally fix encased in ice - woo! 2012-10-05 20:56:52 -05:00
9fcc1b244a bug fix: pet importer no longer chokes when two pets wear the same item 2012-10-01 13:22:17 -05:00
ddec043209 support pea chia cape in infinite closet 2012-09-29 12:40:55 -05:00
7dfc6d81a2 add timeout to pet load 2012-08-11 18:47:25 -04:00
412c401c5f better cache items#show 2012-08-10 00:02:11 -04:00
99669b8e4e cache homepage latest contribution 2012-08-09 22:59:35 -04:00
f6d34841ec cache newest items on homepage and items#index 2012-08-09 22:35:30 -04:00
1e3938eea9 improve closet performance by caching item link 2012-08-09 19:34:56 -04:00
4a69772cd2 remove N+1 queries on current user outfits page 2012-08-09 18:32:33 -04:00
72237f225c modeling hub 2012-08-06 21:15:31 -04:00
2435c7f7e9 oh shoot, properly unlink outfit tempfiles now... 2012-08-01 21:30:22 -04:00
82c4a8d4b4 on creating outfit image, skip broken images instead of throwing exception 2012-07-31 12:05:49 -04:00
2b88ce9b4b use openneo-uploads bucket 2012-07-31 11:42:27 -04:00
ec40e6ae67 new outfit image filename: preview instead of thumb, one more partition level 2012-07-31 10:41:13 -04:00
05acae3cb8 retroactively enqueue outfit images 2012-07-31 10:20:37 -04:00
42827362b6 optimize outfit image generation - 4x speed boost on my box
Use the ImageMagick flatten command to generate the output all at
once instead of compositing each layer individually, and download
the layers in parallel. On my box, saving roopal27 five times took
a total of 30 seconds before, whereas now it takes 7 seconds. I
expect it to be even better on the production box, where latency
is even lower.
2012-07-27 23:07:20 -04:00
374c7e6147 Sharing now fully supports saved outfits, not just shared ones 2012-07-26 23:47:22 -04:00
7b5856ebf9 basic sharing
Sharing pane works, everything is great for guests. Logged in
users are on the way, since right now Share Outfit re-saves
anonymously rather than showing sharing data for the existing
outfit.
2012-07-17 12:15:04 -04:00
cf2546d832 basic image thumbnails 2012-07-16 16:47:28 -04:00
7c015e2d88 carrierwave for asset swfs 2012-07-16 16:45:26 -04:00
5a5b5fffc7 outfit default url 2012-07-16 16:45:26 -04:00
220aca9311 outfit thumbnails initial commit 2012-07-16 16:45:26 -04:00
22cfff66e9 outfits now know their own visible assets 2012-07-16 16:40:07 -04:00
644fac99da improve gender/mood sorting using new labels 2012-06-20 16:10:53 -04:00
6cdf1567f8 fix error loading lookups when given pet name has trailing spaces 2012-06-05 13:28:59 -04:00
b25b6e55b3 ignore errors loading gender/mood data
For example, the site was throwing a 500 error when loading pets
belonging to frozen users. Instead, we'll now rescue that
Neopets::User::AccountDisabledError and ignore it, since it's not
*vital* that we load gender/mood data from this pet; we can still
proceed to load its customization data without it.
2012-06-05 13:02:49 -04:00
c2c6a800f2 track pet state gender/mood 2012-05-23 20:00:38 -04:00
4e7e98beca use Neopets::User for username-based closet imports 2012-05-21 12:48:19 -04:00
f3d64840d6 filter lists on petpage export 2012-04-08 15:59:51 -05:00
44156c5b21 can now have the same item in more than one list 2012-03-23 16:25:10 -05:00
7795119a8c fix gender/emotion states with corridor of chance effects sorting to the front
So it turns out this was just one of those things I forgot to fix
the big database restructure came along: we were comparing
swf_asset.remote_id against parents_swf_assets.swf_asset_id, which
are two different identifiers entirely. Now using swf_asset.id,
so fixed :)
2012-03-15 17:01:21 -05:00
baae0c9954 fix bug where some pet states would also show many items on top of them
At first I thought this was an error in the data migration process when moving SWF assets
to having their own unique IDs, but then realized that the query for a pet state's SWFs
didn't include the (parent_type = 'Item') condition. Oops. Turns out, I only connected the
items to parent_swf_asset_relationships polymorphically. Pet states were still doing it the
hackish way. Set the pet states to use the lovely polymorphic relationship and we're good
to go.
2012-02-21 13:25:11 -06:00
4d314417e2 fix parent-swf-asset-relationship destruction bug
After changing the database structure, we lost the feature where, once we discover
new assets for an item for a given body ID, we disconnect previously connected
assets. This commit reinstates that feature.
2012-01-26 13:51:30 -06:00
4566bca906 another attempt to fix pet state rel autosave 2012-01-13 16:11:44 -06:00
bcb5644b12 stop autosaving biology swf rels 2012-01-13 16:02:14 -06:00
ec3088fdec ensure that pet state is saved before trying to save its assets 2012-01-13 15:56:31 -06:00
171d691a98 fix nc mall spider for remote ID 2012-01-13 15:27:30 -06:00
ec9e997ac5 fix user:owns id ambiguity 2012-01-13 15:20:47 -06:00
9c0c7b78cf another oops, better fix 2012-01-12 22:02:12 -06:00
c2c0fe92e8 oops, be consistent in using remote ID when loading pets 2012-01-12 21:47:17 -06:00
696b2aedaf give SWFs real, unique ID numbers
Lots of scary bugs were being caused by the fact that the possibly-duplicate Neopets ID
was being treated as an SWF's real primary key, meaning that a save meant for object swf
number 123 could be saved to biology swf number 123. Which is awful.

This update gives SWFs their own unique internal ID numbers. All external lookups still use
the remote ID and the type, meaning that the client side remains totally unchanged (phew).
However, all database relationships with SWFs use the new ID numbers, making everything
cleaner. Yay.

There are probably a few places where it would be appropriate to optimize certain lookups
that still depend on remote ID and type. Whatever. Today's goal was to remove crazy
glitches that have been floating around like mad. And I think that goal has been met.
2012-01-12 17:17:59 -06:00
cc23f7435b automatically rezone bio 2011-10-31 16:22:24 -05:00
f7723ac1c8 automatically rezone items 2011-10-23 14:09:53 -05:00
285c7858c0 app can now load environment even if schema not yet loaded 2011-09-06 11:15:09 -05:00
b50b9d237d allow broken image resubmits after 1hr 2011-08-07 20:43:42 -04:00
7358aae680 report broken images 2011-08-07 18:23:44 -04:00
4e74589118 privacy bug: would show hangers even in private lists as Trading if unlisted hangers were marked Trading 2011-08-06 23:15:32 -04:00
a4feee89b5 allow the new items migration to run. sigh 2011-08-04 10:04:15 -04:00
d99a1ad792 newest items 2011-08-04 10:01:44 -04:00
b939c7fce6 Merge branch 'closet' 2011-08-03 11:35:07 -04:00
2398f34071 import items from pets 2011-08-03 11:35:06 -04:00
c2648c5343 Merge branch 'closet' 2011-08-03 10:33:21 -04:00
63bc0067c0 user#assign_closeted_to_items! now assigns when there are duplicates 2011-08-03 10:18:03 -04:00
2dd6586ea6 Merge branch 'closet' 2011-08-02 22:42:59 -04:00
513711bf60 import sdb as well as closet 2011-08-02 22:42:56 -04:00
fed5ccb7fb Merge branch 'closet' 2011-08-01 00:00:40 -04:00
2f0b0743e8 throw a search error on user:owns when user owns no items 2011-07-31 23:50:33 -04:00
f6ed50a62f Merge branch 'closet' 2011-07-31 23:05:26 -04:00
30096f6b0a items petpage export 2011-07-31 02:52:19 -04:00
137aeac8d4 show traders on items#show 2011-07-31 00:19:28 -04:00
0c92bf5987 set list visibility in closet_lists#edit 2011-07-30 22:34:27 -04:00
34a4ef201a privacy dropdowns moved to be more out of the way 2011-07-30 22:08:38 -04:00
75961abc17 privacy for unlisted hangers 2011-07-30 19:45:28 -04:00
c76c261444 validate that closet hanger list belongs to the same user 2011-07-29 13:47:01 -04:00
358840076c closet lists, round one 2011-07-29 10:52:04 -04:00
b86ce67c02 first pass at closet lists, including form 2011-07-26 20:27:23 -04:00
033e71e9bf parameterize user params like items, plus a cleaner parameterization scheme 2011-07-26 18:49:52 -04:00
c592459d02 improve Your Items copy given the different groups 2011-07-26 18:41:15 -04:00
d9f94ae3fa Your Items page aware of wanting items 2011-07-22 17:55:05 -04:00
12f5b28c94 wardrobe now works with owned/wanted 2011-07-22 17:06:21 -04:00
6d155ecaf1 show owned/wanted icons and search filters 2011-07-22 16:52:40 -04:00
85af53417b distinguish between owning and wanting an item 2011-07-22 15:35:38 -04:00
946001243a attempt to fix production bug with relationships not always saving 2011-07-22 15:08:17 -04:00
c5103b6557 neomail link on closets 2011-07-20 15:16:22 -04:00
884ad2d5b8 user:owns in item search 2011-07-17 17:24:29 -04:00
fab612950a basic hanger interface from item 2011-07-14 13:56:44 -04:00
3a193d534d closeted icon, all over the place 2011-07-14 13:56:44 -04:00
a33898a393 import closet page 2011-07-14 13:56:20 -04:00
6ebacc99dd closet page saving backend 2011-07-14 13:56:20 -04:00
1c84a4bef9 closet page, closet hanger 2011-07-14 13:56:20 -04:00
1caa296359 capitalize each word of a species/color name (for Swamp Gas) 2011-07-12 18:22:16 -04:00
714f2fddf5 sort unconverted to the end, too 2011-06-21 22:56:42 -04:00
99a23fc2cb sort effects to the end of the gender/emotion list 2011-06-21 20:42:41 -04:00
43f373fc36 use resque-retry to reschedule failed jobs 2011-06-21 11:22:45 -04:00
9eaeadaa8c delete tmp dir after converting swfs 2011-06-10 14:45:33 -04:00
cf94c7ef59 utf-8 support in both ruby 1.9 and 1.8 2011-06-04 18:40:15 -04:00
4e919aca04 ree compatibility 2011-05-31 10:36:32 -04:00
b57043e0d2 Merge branch 'images' 2011-05-22 16:34:31 -04:00
6c9ddac8dd totally pro wardrobe image adapter, via konami 2011-05-22 16:30:02 -04:00
926f2a5350 improve swf image request enqueue on creation 2011-05-22 13:10:29 -04:00
3d05bbeeed instead of crashing in mall spider when pet not found, delete pet and find a new one 2011-05-21 22:32:01 -04:00
740693018b sitemap.xml 2011-05-20 20:49:48 -04:00
183430adb6 remove non-alphanumeric chars from item pretty urls
mainly because they were causing the router to freak out when they
contained periods, because that looks like a format, e.g. show.html
2011-05-20 19:50:06 -04:00
c18a333bd2 pretty item urls 2011-05-20 19:29:04 -04:00
b13fd7ae99 moving toward s3 image storage 2011-05-20 19:19:14 -04:00
883ecde836 convert_swf! method runs 2011-05-14 10:25:11 -04:00
27f3111b65 remove warnings on each environment boot about modifying StandardBodyIds 2011-05-13 08:26:06 -04:00
648649f5cc support special colors in the infinite closet 2011-05-02 18:07:56 -04:00
d7d2d5f0e5 include share button for logged in users, too 2011-03-28 17:29:03 -04:00
1207e84804 nice page to view current user's outfits 2011-03-23 18:23:01 -04:00
838f89c8fb save user even if points do not change. oops 2011-03-01 15:32:26 -05:00
dfea1a1097 add extra error tracking to saving user, too 2011-02-23 16:01:43 -05:00
abb29aae4b hopefully raise more descriptive error message when contribution fails to save 2011-02-22 18:45:53 -05:00
8ff6c5ad9c pet state order fix, and maybe some contribution fixes 2011-02-22 17:54:20 -05:00
3aeeac3bfc maybe the redundant += contributions for user is triggering the RecordNotSaved exception. remove that line and see what happens 2011-02-21 12:02:45 -05:00
a8ab993a31 support pet names with illegal characters by not including them in pet type image hash updates 2011-02-19 23:09:59 -05:00
2a7fea11e6 handle timeout errors for pet data, swfs, pet images 2011-02-19 22:49:13 -05:00
ea4ec0f99d gracefully handle connection errors with neopets servers 2011-02-19 22:09:12 -05:00
fa14232473 allow guests to share outfits 2011-02-10 17:50:47 -05:00
bcffdc0630 stop using radio and label for pet states, to fix ie bug 2011-02-07 08:46:15 -05:00
bb1f10c60b Merge branch 'fixleak' 2011-02-05 10:33:39 -05:00
b1015c9a5c species check was in the wrong place. fixed 2011-01-27 17:50:08 -05:00
8a36155994 hopeful roulette species support ids fix 2011-01-27 17:46:20 -05:00
7152cd0c50 check species compatibility before adding to roulette list 2011-01-27 17:36:19 -05:00
d2e8e9e009 fix bug causing roulette to sometimes choose items in same zone 2011-01-27 16:52:43 -05:00
4b66a560e7 roulette system :) 2011-01-27 16:35:46 -05:00
8c8776ff63 devise implemented, but not remembering 2011-01-26 13:40:15 -05:00
1e8ec13bfe move to unstable rocketamf so that it builds hashes from registries, not arrays 2011-01-13 17:22:07 -05:00
ca155314fa home page caching, reset top contributors only when necessary 2010-12-11 09:37:39 -05:00
ca9e1fb0ca cache item show pages as a first try :) 2010-12-08 20:15:46 -05:00
8847a87fd9 clear sold_in_mall flag for items not currently sold in mall, add sold_in_mall flag to items we found that are already in our database 2010-12-05 16:06:48 -05:00
b45faa6753 Merge branch 'mall_spider' 2010-11-27 18:51:08 -05:00
3d29f7784f asset spider, yaaay 2010-11-27 18:41:06 -05:00
8447667f62 Merge branch 'bugmash' 2010-11-25 21:33:37 -05:00
99fb6b984f ensure that we're only returning item assets for items and biology assets for pet states 2010-11-25 21:33:34 -05:00
d63da31ac2 add rake items:mall_spider
includes allowing null on some item fields, and putting the swf_assets
type and id index in an actual migration, or this commit would have removed
it upon migrating
2010-11-25 11:10:21 -05:00
e2d48a67df sort colors by name on frontpage, in wardrobe 2010-11-24 21:17:24 -05:00
63ae4558b1 ensure that we're looking only at biology assets when saving new pet states 2010-11-20 10:35:59 -05:00
a196c43253 stop -type:x queries from lagging out due to group by optimization blah 2010-11-19 16:31:58 -05:00
8b159c02bd catch species not found errors in search 2010-11-18 23:25:34 -05:00
badc2e6b3c good negative type search filter; limit type filters to one per query to prevent conflicts 2010-11-18 23:21:03 -05:00
d33723aa84 implement condition negation manually, since removed from arel 2 2010-11-17 00:30:17 -05:00
6903752933 dodge weird arel bug by preloading basic pet types 2010-11-17 00:12:14 -05:00
1f1c219005 fix species:x bug on new arel, start tracking unintended search exceptions 2010-11-16 23:32:53 -05:00
60ab4db8c1 rails 3.0.3, negating arel condition is not(c) instead of c.not now 2010-11-16 17:26:06 -05:00
e92e9947b8 rake task to, hopefully, repair duplicate pet state ids cleanly 2010-11-15 21:15:33 -05:00
8e6a34b69c fix contributions for pet states and items
dependent contributables would only count as contributed if their parent
was being contributed for the first time, too. the trick was to delay
actually *assigning* them to their parents until the very, very end
2010-11-15 17:56:16 -05:00
2501e6e21f use basic image hash on items stuff 2010-11-14 23:14:04 -05:00
f99c7527d0 prevent bad behavior when no unworn items 2010-11-14 22:31:41 -05:00
9b0cf8b597 show outfit page 2010-11-13 17:26:27 -05:00
51f3650ce2 save current outfit, save copy 2010-11-13 08:50:37 -05:00
e3ca78203b require unique outfit names for each user 2010-11-12 21:10:01 -05:00
01ccf1aaca fix some bugs with item loading
whole outfit saved on toggleStar, which was not intended
saving and then loading an outfit on same session glitched on clone
2010-11-12 16:31:01 -05:00
6b92c2aa33 loading current user outfit list, deleting outfits, toggling star 2010-11-11 13:43:22 -05:00
1dd2ccb00b lovely interface for saving outfits. still no reading them yet 2010-11-10 16:59:54 -05:00
7db0beec75 points for bulk pet adding 2010-11-06 19:07:15 -04:00
d10ab2615f actually contributing things, yay 2010-11-06 18:08:45 -04:00
ef004cc6cb needed objects 2010-11-06 13:07:12 -04:00
446a117ec8 top contributors 2010-11-06 12:15:10 -04:00
a5b119a9bc contributions viewing 2010-11-06 11:52:58 -04:00
db56b0d218 start from scratch home js 2010-11-05 20:17:42 -04:00
c8acdc4e8d working home page 2010-11-05 18:45:05 -04:00
895c6e721e auth works - yaaay 2010-10-18 17:58:45 -04:00
e40d4601d8 a functioning wardrobe 2010-10-10 22:18:42 -04:00
5c34b79186 move from deprecated def before_save to before_save do 2010-10-10 14:43:01 -04:00
33711f6fc6 quick pets controller to redirect to wardrobe 2010-10-10 14:33:54 -04:00
16629926fb ignore effects in pet biology 2010-10-09 12:40:55 -04:00
3b92bea537 remove swf asset conflicts (same parent id, body id), fix glitch in items with existing swf assets 2010-10-09 12:22:40 -04:00
3eee2633bd set body id to 0 when appropriate 2010-10-09 11:35:36 -04:00
3ab730135f check if items are compatible before saving 2010-10-09 11:06:59 -04:00
04138ac4a7 full saving pets, serving assets directly from this domain 2010-10-09 10:53:58 -04:00
ff629b9419 pet type now loads image hash on save 2010-10-08 10:53:28 -04:00
bb233359d8 core of pet loading, still needs get image hash, download assets 2010-10-07 10:46:23 -04:00
c93066e679 is:pb filter for deluxe paint brush items 2010-10-03 20:14:48 -04:00
3c473bee2c nice pretty upgrade to item show page 2010-09-08 22:49:39 -04:00