Commit Graph

184 Commits

Author SHA1 Message Date
Marcin Kulik
83df37f48b Refactor Asciicast#user 2014-02-12 21:33:42 +01:00
Marcin Kulik
94817be1b3 Rename nickname to username 2014-02-12 20:51:01 +01:00
Marcin Kulik
81c8340bc1 Drop unused columns from asciicasts table 2014-02-12 20:36:51 +01:00
Marcin Kulik
24bad5e628 Use strong_parameters instead of protected_attributes 2014-02-12 20:22:20 +01:00
Marcin Kulik
9b32e2dc37 Prevent shadowing real user profiles by dummy ones 2014-02-12 19:51:25 +01:00
Marcin Kulik
5db7506823 Make "default legacy" asciicast user a dummy one 2014-02-12 17:46:09 +01:00
Marcin Kulik
1be5538e5c Merge dummy users into real ones when assigning api tokens 2014-02-12 17:41:06 +01:00
Marcin Kulik
2ceea32cc4 Create dummy users for new api tokens 2014-02-11 17:49:22 +01:00
Marcin Kulik
74d7bb0156 Make AsciicastCreator unaware of API subtleties 2014-02-10 17:39:37 +01:00
Marcin Kulik
0a47fd441f Remove unused recorded_at column 2014-02-10 16:42:50 +01:00
Marcin Kulik
9530c9d870 Ignore "recorded_at" from client 2014-02-09 19:35:30 +01:00
Marcin Kulik
633f514de8 Use Virtus for AsciicastParams 2014-02-09 19:12:15 +01:00
Marcin Kulik
cc28d6efad Use ruby 1.9 hash syntax 2014-02-09 14:58:17 +01:00
Marcin Kulik
13544d9d04 Rename user_token to api_token 2014-02-09 14:44:09 +01:00
Marcin Kulik
463f18c207 Refactor user page to use a presenter object 2014-02-01 01:16:28 +01:00
Marcin Kulik
a9913a966d Rename "font_size" playback option to "size" 2014-01-18 14:19:23 +01:00
Marcin Kulik
57bcab04c9 Use proper PlaybackOptions object for passing options to JS player 2014-01-18 14:12:10 +01:00
Marcin Kulik
86f6af3d78 Introduce AsciicastPresenter 2014-01-18 11:44:13 +01:00
Marcin Kulik
d571be2bbd Introduce AsciicastListPresenter 2014-01-17 17:21:22 +01:00
Marcin Kulik
e2e117ce84 Refactor profile link helpers and decorators 2013-12-01 00:55:31 +01:00
Marcin Kulik
9b80151511 Randomize "featured" and "other by user" lists 2013-11-28 23:17:02 +01:00
Marcin Kulik
2dbc811caf Fix the condition for displaying edit/delete links 2013-11-22 22:33:14 +01:00
Marcin Kulik
38cde2d172 Avoid AR chains outside of AR models 2013-11-20 21:33:30 +01:00
Marcin Kulik
100273f5bf Update browse page to new layout and add sorting 2013-11-20 21:33:26 +01:00
Marcin Kulik
c0473dc217 Redesign homepage (and layout in general) 2013-11-20 21:33:22 +01:00
Marcin Kulik
431fd87002 Use auth token for permanent sessions 2013-10-22 19:16:18 +02:00
Marcin Kulik
3e1feff84e Auto-strip whitespace from email and nickname 2013-10-22 17:58:15 +02:00
Marcin Kulik
5bd8b05a93 Validate presence and uniqueness of both nickname and email 2013-10-22 17:52:04 +02:00
Marcin Kulik
4b5c02477b Don't override error message for user's nickname uniqueness 2013-10-20 19:08:41 +02:00
Marcin Kulik
a2b0a637fa Refactor User.for_credentials/for_email into class methods 2013-10-20 18:58:31 +02:00
Marcin Kulik
d4cbc3e504 Make Persona the only login option (with the ability to access old accounts) 2013-10-20 18:58:11 +02:00
Marcin Kulik
7e5af6ed56 Favor uname over user_agent when accepting upload 2013-10-13 12:29:30 +02:00
Marcin Kulik
d74ead2263 Store client's user agent on Asciicast record 2013-10-11 20:44:49 +02:00
Marcin Kulik
d71da5b369 Move asciicast attributes preparation to AsciicastAttributes 2013-09-25 21:42:59 +02:00
Marcin Kulik
32a2f44eb6 Move user token creation/assignment to a service object 2013-09-25 21:42:59 +02:00
Marcin Kulik
9dad3840fa Use yajl for parsing terminal snapshots 2013-09-22 12:25:34 +02:00
Marcin Kulik
e3678da97a Remove Oj - it leaks like a little puppy 2013-09-22 11:18:49 +02:00
Marcin Kulik
ee636bf958 Update the player to use backend-generated JSON frames 2013-09-21 13:05:13 +02:00
Marcin Kulik
a1cd6ca2ae Bring on the terminal.c! 2013-09-21 13:05:13 +02:00
Marcin Kulik
f15f2e11a5 Avoid making a copy of feed data string 2013-09-21 13:05:12 +02:00
Marcin Kulik
b3da1c0656 Don't crash when stdout data is shorter than expected 2013-09-21 13:05:12 +02:00
Marcin Kulik
79f8eaf2ed Fix display of reversed characters in the thumbnails and the preview 2013-09-21 13:05:12 +02:00
Marcin Kulik
82fa03863d Adjust Snapshot#crop to work on already optimized lines 2013-09-21 13:05:12 +02:00
Marcin Kulik
ff153fff1a Make Terminal return already optimized snapshot 2013-09-20 23:05:34 +02:00
Marcin Kulik
0e2c1784c6 Use terminal binary as a base for Terminal 2013-09-20 23:05:33 +02:00
Marcin Kulik
e537c1b78a Only release terminal if it is not nil 2013-09-14 13:13:58 +02:00
Marcin Kulik
e862acedb7 Animation frames generation on the backend 2013-09-10 21:29:17 +02:00
Marcin Kulik
bc6e1ddc3d Make implementation of Stdout more readable 2013-09-02 21:54:19 +02:00
Marcin Kulik
9e152c3172 Sanitize all characters coming from TSM::Screen#draw
It happens that libtsm's screen_draw returns a character that can't be
properly encoded as utf-8. As what we get is only meant to be displayed
and not interpreted we can replace these invalid characters with a
questio mark, which is a common practice for printing invalid chars.
2013-08-29 15:10:46 +02:00
Marcin Kulik
26801d207f Make Asciicast use BufferedStdout instead of Stdout 2013-08-28 16:56:40 +02:00
Marcin Kulik
c3fc452b91 Make Grid#crop easier to read 2013-08-28 16:22:59 +02:00
Marcin Kulik
731fb11e8b Simplify Grid#trailing_empty_lines implementation 2013-08-28 16:21:31 +02:00
Marcin Kulik
b47fa27968 Refactor Snapshot to use Grid under the hood 2013-08-27 20:31:31 +02:00
Marcin Kulik
d324200b01 Add BufferedStdout class whose #each yields at 60 hz tops 2013-08-27 20:31:27 +02:00
Marcin Kulik
31a880b7aa Simplify Snapshot and its presenter 2013-08-25 20:49:23 +02:00
Marcin Kulik
34b39d0db3 Simplify the structure returned by Terminal#snapshot
Each screen character is in its own, separate cell now. In addition the char
attributes don't include attributes that are "falsy".
2013-08-25 17:41:04 +02:00
Marcin Kulik
731751650c Keep the lines shorther than 80 chars 2013-08-25 16:34:02 +02:00
Marcin Kulik
cdc2f01753 Find or build user from omniauth hash in the middleware 2013-08-19 17:08:13 +02:00
Marcin Kulik
40856933aa Support "blink" attribute in the thumbnails 2013-08-15 23:05:09 +02:00
Marcin Kulik
a53c8de5b9 Pass paths to decompressed stdout files to Stdout 2013-08-15 20:58:41 +02:00
Marcin Kulik
2e9b0a4718 Remove boring empty trailing lines from thumbnails 2013-08-14 17:24:36 +02:00
Marcin Kulik
0c3494d174 Require explicit call to Terminal#snapshot for getting the snapshot 2013-08-13 19:52:53 +02:00
Marcin Kulik
6c8dbf4173 Make Stdout provide data in chunks 2013-08-13 19:52:53 +02:00
Marcin Kulik
20645271a1 Update models and helpers to use new Rails 4 syntax 2013-08-08 15:08:11 +02:00
Marcin Kulik
0a8cc6ff8a One more attempt to fix the memory leak 2013-08-06 12:50:38 +02:00
Marcin Kulik
4767442875 Make Snapshot#crop return the snapshot of exact requested height 2013-08-06 00:37:37 +02:00
Marcin Kulik
5ecf209a53 Add some TODO comments 2013-08-06 00:37:36 +02:00
Marcin Kulik
7d5a544650 Generate thumbnails from JSON snapshot via Snapshot/SnaphotPresenter 2013-08-06 00:37:36 +02:00
Marcin Kulik
ddf0e57b39 Update SnapshotWorker to generate colorful snapshots 2013-08-06 00:37:35 +02:00
Marcin Kulik
c8d574b243 Serialize asciicast snapshot just as JSON 2013-08-06 00:37:35 +02:00
Marcin Kulik
59e31baa1b Process incoming asciicast with AsciicastCreator 2013-08-06 00:37:35 +02:00
Marcin Kulik
86a4662fe5 Abstract stdout_data and stdout_timing as a single value object 2013-08-06 00:37:34 +02:00
Marcin Kulik
caa6c52759 Rename stdout to stdout_data, stdin to stdin_data 2013-08-06 00:37:34 +02:00
Marcin Kulik
56a2bb2378 Fix Snapshot#crop to not burn when height > line count 2013-08-06 00:37:33 +02:00
Marcin Kulik
d93ac84c21 Refactor AsciicastDecorator#thumbnail to render colorful thumbnail 2013-08-06 00:37:33 +02:00
Marcin Kulik
86f728364c Add Brush model 2013-08-06 00:37:32 +02:00
Marcin Kulik
e947524533 Add a simple model representing a terminal snapshot 2013-08-06 00:37:32 +02:00
Marcin Kulik
8daf2d0f7f Serialize Snapshot with Snapshot::Serializer 2013-08-06 00:37:32 +02:00
Marcin Kulik
a10a447c53 Make the snapshots the hashes 2013-08-06 00:37:32 +02:00
Marcin Kulik
2e8fc48473 Set MAX_DELAY constant on model, not decorator 2012-12-18 21:38:49 +01:00
Marcin Kulik
9ac2c49180 Custom scopes for paginated lists 2012-12-09 21:22:12 +01:00
Marcin Kulik
49644ffc68 Validate presence of a model, not id 2012-11-19 22:35:52 +01:00
Marcin Kulik
75961f3f22 Scopes 2012-08-22 20:13:31 +02:00
Marcin Kulik
44edbe08d1 Cache whole previews list fragments 2012-08-22 20:00:31 +02:00
Marcin Kulik
6c007cdd9c Not ready yet for cache_key on ActiveRecord::Relation 2012-08-22 19:39:14 +02:00
Marcin Kulik
0de8aa76ea Use fragment caching for thumbnails 2012-08-21 20:20:14 +02:00
Marcin Kulik
668f382a69 Fix specs 2012-07-29 19:43:03 +02:00
Marcin Kulik
87ee87f4b7 Improve error message display 2012-07-28 21:26:58 +02:00
Marcin Kulik
ba97246db8 Time compression 2012-05-04 21:49:08 +02:00
Marcin Kulik
e5ea6488fd Move asciicast presentation to its decorator 2012-04-09 19:47:19 +02:00
Marcin Kulik
32b2cbed35 Move "created" and "as_json" from Comment to CommentDecorator 2012-04-09 17:16:41 +02:00
Marcin Kulik
149e687f38 Bring back missing user->comments assoc 2012-04-09 17:04:58 +02:00
Marcin Kulik
c4b5b16e6f Merge branch 'likes'
* likes:
  Data model for "Like"

Conflicts:
	app/models/user.rb
	db/schema.rb
2012-04-09 17:03:50 +02:00
Marcin Kulik
45dd308186 Display comments count 2012-04-09 16:46:08 +02:00
Marcin Kulik
4a6186f523 Account settings 2012-04-09 15:47:33 +02:00
Marcin Kulik
b6473b8554 user->comments association 2012-04-06 22:58:44 +02:00
Marcin Kulik
49c0d9f324 Move presentation to decorator 2012-04-06 21:51:05 +02:00
Marcin Kulik
0cbd732980 Data model for "Like" 2012-04-06 14:06:40 +02:00
Marcin Kulik
8b504d8fea Use asciicast title in page title 2012-04-05 21:35:21 +02:00
Marcin Kulik
1e2e8bfcc3 Display some environment info 2012-04-04 18:41:17 +02:00