artisan-ar-repository 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
@@ -7,27 +7,27 @@ require 'artisan-ar-repository/models/project_change'
|
|
7
7
|
module ArtisanArRepository
|
8
8
|
class ChangeRepository
|
9
9
|
include BaseRepository
|
10
|
-
|
10
|
+
|
11
11
|
def model_class
|
12
12
|
::Change
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
def project_change_class
|
16
16
|
::ProjectChange
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
def iteration_change_class
|
20
20
|
::IterationChange
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
def story_change_class
|
24
24
|
::StoryChange
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
def create_project_change(attributes = {})
|
28
28
|
project_change_class.create!(attributes)
|
29
29
|
end
|
30
|
-
|
30
|
+
|
31
31
|
def create_iteration_change(attributes = {})
|
32
32
|
iteration_change_class.create!(attributes)
|
33
33
|
end
|
@@ -35,11 +35,15 @@ module ArtisanArRepository
|
|
35
35
|
def create_story_change(attributes = {})
|
36
36
|
story_change_class.create!(attributes)
|
37
37
|
end
|
38
|
-
|
39
|
-
def find_all_by_project_id(
|
40
|
-
Change.find_all_by_project_id(
|
38
|
+
|
39
|
+
def find_all_by_project_id(project_id)
|
40
|
+
Change.find_all_by_project_id(project_id)
|
41
|
+
end
|
42
|
+
|
43
|
+
def find_range_by_project_id(project_id, starts_at, ends_at)
|
44
|
+
segment_length = ends_at - starts_at + 1
|
45
|
+
Change.where(:project_id => project_id).offset(starts_at).limit(segment_length)
|
41
46
|
end
|
42
|
-
|
43
47
|
end
|
44
48
|
end
|
45
49
|
|
@@ -17,4 +17,8 @@ class Iteration < ActiveRecord::Base
|
|
17
17
|
def total_billed_points
|
18
18
|
Artisan::Stories::StoryCollection.new(stories).billed_points
|
19
19
|
end
|
20
|
+
|
21
|
+
def total_billed_points_by_craftsman
|
22
|
+
Artisan::Stories::StoryCollection.new(stories).billed_points_by_craftsman
|
23
|
+
end
|
20
24
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: artisan-ar-repository
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-30 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: An interface to the artisan active record persistance layer
|
15
15
|
email: paul@8thlight.com
|