Commit graph

1194 commits

Author SHA1 Message Date
Matt Rogers
bcbfe42899 Merge pull request #195 from doncruse/master
Removing some intermediate values and shifting HTML formatting to a helper
2013-07-22 19:44:18 -07:00
Reinier Balt
28e3f377a8 fix failing validation on creating recurring todos 2013-07-20 14:40:50 +02:00
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
Matt Rogers
c28ffd6763 Merge pull request #193 from mattdbridges/extract-rich-message
Extract behavior from Todo.from_rich_message
2013-07-18 20:12:03 -07:00
Matt Rogers
bc61f15c6c Merge pull request #194 from stacyvlasits/master
fixed next month label for calendar view
2013-07-18 20:09:18 -07:00
Matt Rogers
efc09f9d3e Merge pull request #192 from crymer11/master
use a null object like a boss
2013-07-18 19:54:06 -07:00
Matt Rogers
08d872e3c1 Merge pull request #191 from doncruse/master
Refactor last year chart
2013-07-18 19:52:12 -07: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
Matt Bridges
ecdade33c3 Pull out RichMessageExtractor
No need to have it embedded
  when it should be unit tested!
2013-07-18 18:34:09 -05:00
Stacy Vlasits
9896705bf2 fixed next month label for calendar view 2013-07-18 16:43:05 -05:00
Matt Bridges
519e3df4d4 TodoFromRichMessage is really a service object 2013-07-18 16:41:28 -05:00
Colin Rymer
0a5936fecf use a null object like a boss 2013-07-18 16:37:34 -05:00
Matt Bridges
c2111b2f8e Extract behavior from Todo.from_rich_message
`Todo.from_rich_message` was partially tested from the MessageGateway,
but it is mostly untested and does not belong in Todo due to it's unique
nature. Extract it entirely from `Todo` into it's own dedicated object
for unit testing.
2013-07-18 16:35:51 -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
Colin Rymer
55e2f5b6a1 remove returns and clean up some conditionals 2013-07-18 16:03:18 -05:00
Colin Rymer
c71dc9afc9 remove boolean returning ternary expression 2013-07-18 15:22:46 -05:00
Colin Rymer
c5968b798c better leverage Hash#each for metaprogramming 2013-07-18 15:13:30 -05:00
Colin Rymer
332589163c metaprogramming and stylistic changes
- Use `define_method` to clean up definition of methods that only
   vary by the name of the day they reference and the corresponding
   numerical value.

 - Remove calls to self, explicit return statements, etc.
2013-07-18 15:01:02 -05:00
Colin Rymer
45df84b739 consolidate validates_presence_of validations 2013-07-18 14:10:14 -05:00
Reinier Balt
d64f6e003e Merge branch 'master' into rails4
Conflicts:
	Gemfile.lock
2013-06-21 10:20:36 +02:00
Reinier Balt
f4908f2b7b fix cache invariant for grouped todos in context and project view 2013-06-19 17:47:51 +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
56b884055f fix #1270. if start-from fits the recurrence pattern, the first todo should use the start-from date
this is use-case 2 mentioned in the ticket.
2013-06-11 23:38:30 +02:00
Reinier Balt
be1a9528d5 move the two toggle links in top-right to view menu 2013-06-11 16:13:46 +02:00
Reinier Balt
7084c11263 fix failing tests 2013-06-11 15:36:27 +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
0e8552ac4e fix #1273. Used the wording suggested in this ticket. 2013-06-05 16:58:52 +02:00
Reinier Balt
651e45d389 merge i18n keys to better support fr locale and update en, fr and nl locale for the change
es was updated by tolk, but no changes in content
2013-06-04 11:47:47 +02:00
Reinier Balt
b6e110c917 fix #1422. Changing default tags of a project is now remembered
when not updating the whole page
2013-06-04 10:50:42 +02:00
Reinier Balt
ee9951403e fix #1419 for master too: do not show new todo that was added with show_from set 2013-06-04 10:31:29 +02:00
Reinier Balt
a8af880647 fix #1417. We now handle unblocking a todo that is part of a hidden project or context 2013-06-04 10:07:02 +02: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
54b106d96b remove use of .all on model 2013-05-13 12:33:01 +02:00
Reinier Balt
1234abb266 taggable_type should be accessible for test 2013-05-13 12:32:41 +02:00
Reinier Balt
ebff4cfc0c start fixing deprecation warnings 2013-05-11 23:13:32 +02:00