rallytastic 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/story.rb +19 -0
- data/lib/tasks/scraper.thor +1 -18
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.2
|
data/lib/story.rb
CHANGED
@@ -57,6 +57,25 @@ class Story
|
|
57
57
|
eval("Parser::#{self.iteration.project.revision_parser}").new(self)
|
58
58
|
end
|
59
59
|
end
|
60
|
+
|
61
|
+
|
62
|
+
def pull_revisions
|
63
|
+
revision_list = RevisionHistory.new(:rally_uri => self.revision_history_uri)
|
64
|
+
revision_list.refresh
|
65
|
+
revision_uris = story.revisions.collect{|r| r.rally_uri}
|
66
|
+
if revision_list.revisions
|
67
|
+
revision_list.revisions.each do |uri|
|
68
|
+
unless revision_uris.include?(uri)
|
69
|
+
r = Revision.new(:rally_uri => uri)
|
70
|
+
r.refresh
|
71
|
+
self.revisions << r
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
self.set_revision_history
|
76
|
+
self.save
|
77
|
+
end
|
78
|
+
|
60
79
|
|
61
80
|
def refresh hash_values=nil
|
62
81
|
@rally_hash = hash_values
|
data/lib/tasks/scraper.thor
CHANGED
@@ -28,7 +28,7 @@ class Scraper < Thor
|
|
28
28
|
desc "revisions iteration_name", "Get the revisions for stories hanging off an iteration"
|
29
29
|
def revisions iteration_name
|
30
30
|
iteration = Iteration.find(:conditions => {:name => iteration_name}).first
|
31
|
-
iteration.stories.each{|story|
|
31
|
+
iteration.stories.each{|story| story.pull_revisions}
|
32
32
|
end
|
33
33
|
|
34
34
|
desc "projects", "Bootstrapping method that is primarily useful when you are setting up Rallytastic for the first time. It will walk Rally and pull down all projects. Technically, you don't need to run this because using the scrape:stories; scrape:update_non_stories; will fill this information in for you. It may be a bit quicker though to run this first if you have a lot of projects because it does batch queries"
|
@@ -42,23 +42,6 @@ class Scraper < Thor
|
|
42
42
|
end
|
43
43
|
|
44
44
|
private
|
45
|
-
def revisions_for_story(story)
|
46
|
-
story_in_rally = RallyAPI.get(story)
|
47
|
-
revision_list = RevisionHistory.new(:rally_uri => story_in_rally["RevisionHistory"]["_ref"])
|
48
|
-
revision_list.refresh
|
49
|
-
revision_uris = story.revisions.collect{|r| r.rally_uri}
|
50
|
-
if revision_list.revisions
|
51
|
-
revision_list.revisions.each do |uri|
|
52
|
-
unless revision_uris.include?(uri)
|
53
|
-
r = Revision.new(:rally_uri => uri)
|
54
|
-
r.refresh
|
55
|
-
story.revisions << r
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
story.set_revision_history
|
60
|
-
story.save
|
61
|
-
end
|
62
45
|
|
63
46
|
def pull_all_from_rally_of_object klass, options={}
|
64
47
|
total, page_size, start_index = nil, 100, 1
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 1.1.
|
8
|
+
- 2
|
9
|
+
version: 1.1.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Matt Clark
|
@@ -152,7 +152,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
152
152
|
requirements:
|
153
153
|
- - ">="
|
154
154
|
- !ruby/object:Gem::Version
|
155
|
-
hash: -
|
155
|
+
hash: -1539841577661887094
|
156
156
|
segments:
|
157
157
|
- 0
|
158
158
|
version: "0"
|