Commit graph

526 commits

Author SHA1 Message Date
Don Cruse
845ac14176 Moving label creation to helpers 2013-07-19 00:14:52 -05:00
Don Cruse
5b045d2c1a Moving time labels to separate methods 2013-07-18 23:56:57 -05:00
Don Cruse
25bf820edc Simplufying interpolation method 2013-07-18 23:48:33 -05:00
Don Cruse
3d2c048c44 Tweak to running averages 2013-07-18 23:43:44 -05:00
Don Cruse
ff54506e7f Removing a single-line method 2013-07-18 23:37:34 -05:00
Don Cruse
5e6b82c3e5 Combining the running average methods 2013-07-18 23:22:44 -05:00
Don Cruse
91e4717168 Removing some more intermediate values
Also removing the python-esque combination methods to set multiple
disparate variables from a single method by refactoring that to a
simpler method.

Reducing the complexity of computing running averages.

Note: It is not clear to me why the actions_done_lastyears_data
action is entirely unscoped on date. That seems to be the expected
behavior, so I left it alone.
2013-07-18 23:05:38 -05:00
Don Cruse
9073fa1237 Removing some intermediate values
This removes some intermediate steps that were ultimately not necessary
to the math.  It also consolidates some of the methods for counting events
so that fewer intermediate values are necessary.

To that end, a new scope is added to the ToDo model for events that are
*either* created_at or completed_at after a certain date. This scope
allows the StatsController to pull out the largest possible responsive
set of values, and then filter just the particular slices that it needs
for various steps in the calculation.
2013-07-18 22:32:44 -05:00
Don Cruse
70f633c150 Shifting more instance variables to the controller
Also removing some instance variables that were never invoked in the
views. This sets up a future refactoring of the method of comptuting
rolling averages, which differs between the two types of "last year"
views being refactored.
2013-07-18 21:01:39 -05:00
Don Cruse
1493304fc1 Refactor last year chart
Pulled some instance variable assignment into the controller.

Also extracted a method regarding interpolated values for the present
month.
2013-07-18 16:17:30 -05:00
Reinier Balt
d64f6e003e Merge branch 'master' into rails4
Conflicts:
	Gemfile.lock
2013-06-21 10:20:36 +02:00
Reinier Balt
64d3e802f2 fix #1406. fix #1431. set recurring_period first before setting other attributes 2013-06-19 16:42:35 +02:00
Reinier Balt
2daffef683 fix failing tests 2013-06-17 10:06:38 +02:00
Reinier Balt
4a485558e2 Merge branch 'master' into rails4
Conflicts:
	Gemfile.lock
	config/routes.rb
2013-06-17 09:25:02 +02:00
Reinier Balt
0a57a68a87 Project and context view can now be grouped by context and project (using view menu) 2013-06-11 11:12:21 +02:00
Reinier Balt
9c56416dcb Merge pull request #184 from mattr-/cucumber-login-backdoor
Move the expire_session route
2013-06-10 21:52:25 -07:00
Matt Rogers
931791edfd Move the expire_session route
It's now in the cucumber login helper.
2013-06-10 14:30:12 -05:00
Reinier Balt
02d4afb724 fix #1429 by correctly handling tags with dots
This was a very old regression. This used to work before the rails 3.2 upgrade... Added tests
to prevent future unnoticed breakage
2013-06-03 15:20:13 +02:00
Reinier Balt
671f64b419 move to strong_parameters of rails4. 2013-05-27 12:44:31 +02:00
Reinier Balt
8ffacca393 fix cucumber scenario's.
One still fails on Cookie overflow, but works testing by hand...
2013-05-13 17:13:26 +02:00
Reinier Balt
08498fee4f fix failing tests
Includes a monkey patch for Arel that may need to be removed when 4.0.0 final ships
2013-05-13 15:35:21 +02:00
Reinier Balt
80974fb0d5 empty non-saved project caused rss builder to fail 2013-05-13 12:50:10 +02:00
Reinier Balt
ebff4cfc0c start fixing deprecation warnings 2013-05-11 23:13:32 +02:00
Reinier Balt
0d0b36de29 remove duplication in feedlist controller 2013-05-11 10:49:38 +02:00
Reinier Balt
cdfb65d529 remove duplication of all_done_todos and done_todos in project and context container 2013-05-11 10:38:34 +02:00
Reinier Balt
101268f504 Introduce #onsite_redirect_to helper for onsite redirects
Prefer #onsite_redirect_to to #redirect_to when using untrusted input (e.g. cookies) in the redirect destination

Thanks @brynary
2013-05-07 09:41:48 +02:00
Reinier Balt
78f81ed29f Do not symbolize arbitray locale params
* Validate locale is valid before assigning it
* Don't convert invalid locales to symbols (creates DoS risk)

thanks @brynary
2013-05-07 09:29:47 +02:00
Reinier Balt
0cc41bda87 Disable #yaml_import action for now
This was dead code anyway

thanks @brynary
2013-05-07 09:07:57 +02:00
Reinier Balt
ccdaae038b small refactorings 2013-05-05 20:32:32 +02:00
Reinier Balt
f891ee86fe fix clearing show_from fails
caused by slightly different (better) workings of aasm
2013-05-03 19:28:26 +02:00
Matt Rogers
883ea2b968 Move Project#create_from_todo to its own class
The point of this is to keep as many things out of the ActiveRecord
objects as possible and use them as just a thin database abstraction
layer.
2013-05-02 22:30:24 -05:00
Matt Rogers
55eb7b818c Revert "Use an attr_reader for attributes"
This reverts commit 6376bd7ef6.
2013-04-30 23:02:54 -05:00
Matt Rogers
49886b1bd3 Revert "Cache the project and context names"
This reverts commit 610152b8dd.
2013-04-30 23:01:46 -05:00
Matt Rogers
c1597a7751 Rename to_xml_params to todo_xml_params 2013-04-30 22:52:22 -05:00
Matt Rogers
8fe343cccc Push to_xml_params down to ApplicationController 2013-04-30 22:50:32 -05:00
Matt Rogers
98b188d1df Add tests for the ICS and XML views and fix them up 2013-04-30 20:38:10 -05:00
Matt Rogers
ebd182695d remove the calendar from TodosController 2013-04-30 20:35:13 -05:00
Matt Rogers
83273ac342 add the before filter configuration back 2013-04-30 20:19:27 -05:00
Matt Rogers
d1ff0daf6f Move the calendar to its own controller 2013-04-30 20:09:46 -05:00
Matt Rogers
610152b8dd Cache the project and context names 2013-04-29 21:01:30 -05:00
Matt Rogers
6376bd7ef6 Use an attr_reader for attributes 2013-04-29 21:01:30 -05:00
Matt Rogers
1c2de3fd5a Remove codejunk
Extra whitespace, explicit returns, and an extra begin/end pair are all
gone.
2013-04-29 21:01:21 -05:00
Reinier Balt
010d0e9ba0 refactor creating todos in todos_controller 2013-04-29 15:15:48 +02:00
Matt Rogers
8db5793bf6 Merge pull request #178 from TracksApp/rename-has-next-todo
Rename RecurringTodo#has_next_todo
2013-04-27 09:52:58 -07:00
Matt Rogers
6b8e745234 Use Todos::Calendar in the view 2013-04-26 23:23:56 -05:00
Matt Rogers
fb71441436 Start using Todos::Calendar in the calendar action
Replaces the existing query logic in a lot of places
2013-04-26 23:09:47 -05:00
Matt Rogers
88e7798db6 Rename RecurringTodo#has_next_todo to continues_recurring?
This clarifies the intent of the method.
2013-04-26 16:30:12 -05:00
Matt Rogers
1431bef1a9 Use first_or_create to creating missing Tags 2013-04-26 08:46:06 -05:00
Matt Rogers
3425b3fa10 Remove duplication when setting up done by tag views 2013-04-26 08:40:24 -05:00
Matt Rogers
6af7fe0ab6 Remove unused method 2013-04-26 08:31:00 -05:00