Merge pull request #1740 from dnrce/ruby-2.2

Support Ruby 2.2
This commit is contained in:
Dan Rice 2015-01-03 18:32:03 -05:00
commit f81efebd8c
6 changed files with 5 additions and 7 deletions

View file

@ -4,6 +4,7 @@ rvm:
- 1.9.3
- 2.0.0
- 2.1
- 2.2
bundler_args: --without development --jobs=3 --retry=3

View file

@ -65,7 +65,7 @@ GEM
execjs
coffee-script-source (1.8.0)
crass (0.2.1)
cucumber (1.3.17)
cucumber (1.3.18)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.12)
@ -91,7 +91,7 @@ GEM
gherkin (2.12.2)
multi_json (~> 1.3)
hike (1.2.3)
htmlentities (4.3.2)
htmlentities (4.3.3)
i18n (0.6.11)
jquery-rails (3.1.2)
railties (>= 3.0, < 5.0)

View file

@ -77,7 +77,6 @@ module RecurringTodos
end_date: attributes[:end_date],
ends_on: attributes[:ends_on],
number_of_occurences: attributes[:number_of_occurences],
target: attributes[:target],
project: attributes[:project],
context: attributes[:context],
project_id: attributes[:project_id],

View file

@ -62,7 +62,7 @@ class User < ActiveRecord::Base
end
def actionize(scope_conditions = {})
todos_in_project = where(scope_conditions).includes(:todos)
todos_in_project.to_a.sort!{ |x, y| -(x.todos.active.count <=> y.todos.active.count) }
todos_in_project.to_a.sort_by!{ |x| [-x.todos.active.count, -x.id] }
todos_in_project.reject{ |p| p.todos.active.count > 0 }
sorted_project_ids = todos_in_project.map {|p| p.id}

View file

@ -2,6 +2,7 @@
* Removed support for deprecated password-hashing algorithm. This
eliminates config.salt. Note the addition of a pre-upgrade step to
check for obsolete passwords.
* Tracks is tested on Ruby 1.9.3, 2.0.0, 2.1, and 2.2.
## Version 2.3

View file

@ -14,7 +14,6 @@ module RecurringTodos
builder = RecurringTodosBuilder.new(@admin, {
'recurring_period' => 'monthly',
'description' => 'a repeating todo', # generic
'recurring_period' => 'monthly',
'recurring_target' => 'show_from_date',
'ends_on' => 'ends_on_end_date',
'end_date' => Time.zone.now + 1.week,
@ -44,7 +43,6 @@ module RecurringTodos
builder = RecurringTodosBuilder.new(@admin, {
'recurring_period' => 'monthly',
'description' => 'a repeating todo', # generic
'recurring_period' => 'monthly',
'recurring_target' => 'show_from_date',
'ends_on' => 'ends_on_end_date',
'end_date' => Time.zone.now + 1.week,
@ -64,7 +62,6 @@ module RecurringTodos
builder = RecurringTodosBuilder.new(@admin, {
'recurring_period' => 'monthly',
'description' => 'a repeating todo', # generic
'recurring_period' => 'monthly',
'recurring_target' => 'show_from_date',
'ends_on' => 'ends_on_end_date',
'end_date' => Time.zone.now + 1.week,