Commit graph

277 commits

Author SHA1 Message Date
theworldbright
2a3dde1ae5 Refactor PostService and extract its tests
Squashed commits:

[ada0f09] Remove favorites from Posts table

closes #6208
2015-07-26 13:10:24 +02:00
theworldbright
d724397168 Refactor posts controller 2015-07-26 12:58:42 +02:00
Jonne Haß
ac52cef546 Only return the current_users participation for post interactions
closes #6007
2015-05-30 03:08:25 +02:00
Benjamin Neff
986ad0df14 fix validation for status-message when the author is missing
closes #5986
2015-05-24 11:16:05 +02:00
Benjamin Neff
9a4a7255e7 remove unused older and newer methods for posts
last renamed in 8386179f16

closes #5970
2015-05-19 10:42:39 +02:00
Jonne Haß
13f50eeee6 do not touch the own model in an after commit hook
That just recurses endlessly, fixes #5146
2014-08-24 16:03:17 +02:00
Jonne Haß
a9e107364a make status message controller spec pass and deprecation free 2014-08-23 16:34:00 +02:00
Jonne Haß
2cca5745c9 remove deprecated scoped 2014-08-23 16:34:00 +02:00
Jonne Haß
89afb616cf replace deprecated scope syntax and unify it 2014-08-23 16:34:00 +02:00
Jannik Streek
d0a77ce6b3 design for poll participation implemented, saving works as well 2014-03-31 18:14:07 +02:00
Ivan Zotov
a4ce6e267a Fix after_create to after_commit 2014-01-14 22:35:29 +04:00
Fábián Tamás László
176c6826e0 opengraph POC
Fixed small-frame opengraph view

Fixed incompletely saved OpenGraphCache bug
2013-08-04 15:42:29 +02:00
James Fleming
66a07bd938 Remove attributes protection.
Use a blacklist approach instead of a blacklist approach in Profile#receive.

Remove attr_accessible from models and make specs pass.
2013-08-02 11:39:06 +02:00
Jonne Haß
11eecc3d3a 404, not 500, if signed out user wants to see a non public/existing post
Also add some specs for Post#find_by_guid_or_id_with_user
2013-05-18 20:55:22 +02:00
Marco Gallardo
4aab8762fa Locator feature
added marker image for publisher, showing div for address, and added
functionality to close it when clicking 'X' image

showing marker image in publisher

renamed map-marker to locator

fixed style for map marker image in publisher

added locator.js to get user's location

loading google maps api

removed unecessary append and showing location next to publisher

moved location address inside div and  added image to close location

styled div location address an image to close location

removing location when clicking close image

cleaned code

cleaned code

showing loader while location is being obtained, translated normal js to
backbone structure, created locations db stuff, and removing location
div when clicking 'share'

refactored code; started to move code to backbone

refactored js code; moving functionality to backbone structure

created address function to make accessible address variable value

refactored locator.js

showing and removing location div from dom

created location; it belongs_to status_message

added location model and created association with status_message

added hidden field for location address and added respective code on js files to retrieve it on ajax call

saving location for status_message (post)

removing location when sharing

renamed locator backbone view to location, added template, showing
location, and saving lat and lng

prepared and added template to show location

added location to post model in order to have it accessible in backbone

retrieving location to show it in template

removed console.log XD

fixes when removing location

cleanind location_address hidden field when location is removed

more fixes; showing location when sharing

saving location just when it exists

created method to retrieve location address just when location was created

fixed issue about showing 'Near from' message when there was not any location

added style for location

cleaned code

renamed locator view

retrieving lat and lng from locator.js

saving lat and lng in location_coords

saving lat and lng

added style for input location_address

removed location_address  hidden field; the value will be taken directly from input with the location

replaced div with location for input; the user will be able to edit the place

avoiding submitting the form when pressing Enter key on new input for location

added missed spec file for location model

refactored location_view code

refactored location_view code

cleaned code

added sinon library for testing

added describes for new publisher's view functions

created test for destroyLocation function

added test for showLocation publisher view function

created test for avoidEnter publisher view function

removed unnecessary div

Created first test for locations view, added more specs, added Sinon.js,
and fixed issue with assets

loading locator.js for tests

moved location stuff to app/assets

moved locator.js and sinon.js to app/assets

fixed route for images

included locator.js to assets

fixed issue when post object is different than StatusMessage; also fixed issue with lat and lng

loading Sinon for specs

refactoring locator errorGettingposition and start replacing google maps stuff with OSM

added OpenLayers JS, osmlocator, and added them into the main js

changing the locator from Google to OSM instance

changing lat and lng value in the backbone view

removing google javascript tag in application layout

adding jasmine to locator test and removed locator.js

adding jasmine to locator test using OSM

adding Jasmine test to OSM locator

removed locator.js

removed require locator and updated schema

fixed js response; added location

since we are using OSM Locator we don't need locator-spec test

fixed spec for location view; we are not using google maps anymore

changed description of osmlocator-spec

fixed issue with status-message-location template

fixed style for location_address textbox

fixed tests for locator

moved split function to model

created test for location model

removed puts

added effect for location marker

added translations for locator

removed conflicting-unnecessary lines that were loading files for specs

removed sinon library; using sinon-rails gem

removed useless code

removed puts; added Rails.logger.error

added sinon.js file

added specific version of sinon-rails gem

improving validations sintax

using openlayers-rails gem

removed 'google API' text

using sinon gem

isolating LocationStream view

refactored validation

getting location when post is a Reshare

refactored code

fixed aligment for elements under location message

improved styling for location message

refactored begin-rescue block

getting absolute root instead of just the root

added address method to retrive address of location

removed code from Post model; also added descriptinon why it was removed

removed validation when retrieving address; with latest refactorizations we dont need them any more

interpolated location; using file in locales

fixed width for div of location

moved Sinon gem into development and test group

fixed method's description

added missed indexes

updated schema with locations table

removed openlayers-rails gem

preventing location to be saved if there are not coordinates

fixed spec; wrong closing tag
2013-05-02 17:31:53 -05:00
L3MNcakes
1120cba5f0 Issue #3939: Posts to Facebook do not delete 2013-02-18 18:21:59 +00:00
Fabián Rodríguez
99abc22403 remove unused methods 2012-11-21 18:26:17 -02:00
Florian Staudacher
8ca39f5936 show a "post is not public" message when visitor is not logged in
and tries to access a show page of a non-public post
2012-06-07 22:16:37 +02:00
Alex Connor
fe984eb426 #3287 using reorder instead of order for newer, older 2012-05-20 18:21:34 -05:00
Maxwell Salzberg
ab2e740ca2 upgrade to Rails 3.2.3 2012-05-14 21:53:16 -07:00
Dennis Collinson
f6e3c1b88b seperate interactions from posts
Lazily load post interactions on show page
hella refactorz
2012-05-12 17:41:58 -07:00
Dennis Collinson
51b1ade3bc DC DG; added LastThreeComments decorator so we don't have to load those comments when not needed (i.e. new profile pages) 2012-05-10 13:53:00 -07:00
Dennis Collinson
efa79a4ad7 Refactor Post Presenter
and comment presenter
2012-05-10 12:24:21 -07:00
Dennis Collinson
d64eb529d2 MS DC; text now overlays for wallpaper; ALSO. really sorry @danielgrippis stuff does not work in firefox. or safari.
or konqueror. we will talk to him about it later
2012-04-23 17:30:23 -07:00
danielgrippi
75d25e9475 users can now favorite posts 2012-04-22 12:06:15 -07:00
Dennis Collinson
8386179f16 max, you're a princess, WIP 2012-04-19 11:15:59 -07:00
Maxwell Salzberg
d80afc64ec fix ordering for logged out users 2012-02-27 19:16:05 -08:00
danielgrippi
0112285985 Merge branch 'master' into profiles
Conflicts:
	lib/diaspora/shareable.rb
2012-02-27 14:27:05 -08:00
Maxwell Salzberg
27a4c1bf2d introduce the idea of Federated::Base. this is mostly just renaming and collasping of different federation modules, but also starting a direct hiearchy of these federation classes to make everything easier to refactor 2012-02-25 16:57:14 -08:00
Dennis Collinson
b28508ecbc MS DC show last post and show page works unauthenticated
phasing out app.user() for app.currentUser
2012-02-24 19:09:00 -08:00
danielgrippi
ca8f136cec fixed back/forward 2012-02-21 15:23:29 -08:00
danielgrippi
30de08b340 fix post presenter / arrow ordering 2012-02-21 15:23:28 -08:00
Maxwell Salzberg
25cf776059 the previous and next posts are now supplied in json of the presenter; give the template creator a default value 2012-02-21 15:23:28 -08:00
danielgrippi
32f93a0391 you can now follow / unfollow a post from the stream; fixed cukes. 2012-02-13 19:13:43 -08:00
Maxwell Salzberg
232e620637 make posts have empty photos so reshared stop messing up 2012-02-10 13:45:41 -08:00
Dennis Collinson
14b9f5dc5b move user modules into user namespace. 2012-02-09 19:01:01 -08:00
danielgrippi
a819f38b99 touch interacted_at on Post#after_create 2012-02-07 21:32:10 -08:00
Dennis Collinson
8ae18bb393 nsfw's users posts are now nsfw 2012-02-07 19:14:44 -08:00
danielgrippi
fa5424653a fix markup display on reshares. DERP. [ci skip] 2012-02-06 08:02:27 -08:00
Dennis Collinson
354ed7ef05 paginating participate stream 2012-02-03 17:55:06 -08:00
Dennis Collinson
3991903b56 MS DG DC Participate stream that has things bubble to the top 2012-02-03 17:23:57 -08:00
danielgrippi
4f7dda6012 bang! kill redis cache. 2012-02-02 12:45:43 -08:00
Jonne Haß
9c67cd7eb9 collapse Post#last_three_comments and Commentable#last_three_comments, do not double query comments in CommentsController#index for a JSON response, remove spec that tests ordering as it's not deterministic on psql without specified order 2012-01-25 12:44:50 +01:00
danielgrippi
72aee6b2c1 don't use .last(3), use .limit(3) instead. also, don't put an order on an association as it isn't overridable. (this commit minimizes AR object instantiation in the stream) 2012-01-24 23:47:45 -08:00
Maxwell Salzberg
254860bddc SM MS; Read email sent to diaspora-dev for more information about this
commit. Add migration and rake task to copy hidden information from
share_visibilities to users. see: http://devblog.joindiaspora.com/?p=44
2012-01-17 19:29:01 -08:00
danielgrippi
91e3f5f6ff remove cache counter for photos, as it was causing too many edge-case errors & added complexity across models 2012-01-14 15:40:43 -08:00
Jonne Haß
0cc0b152d7 do not call .photo_count on a reshare etc. 2012-01-13 22:09:22 +01:00
danielgrippi
e928cc805a fixed markdown issues with reshares; removed puts from specs 2012-01-07 17:33:16 -08:00
Dennis Collinson
daba42c857 mentions now render client side, wow 2012-01-07 14:24:28 -08:00
Dennis Collinson
b13e72bc00 spec fix for markdown 2012-01-07 14:24:28 -08:00