pivotal_sync 0.0.6 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/lib/pivotal_sync/comment.rb +1 -0
- data/lib/pivotal_sync/membership.rb +1 -1
- data/lib/pivotal_sync/story.rb +3 -4
- data/lib/pivotal_sync/version.rb +1 -1
- data/spec/fixtures/stories.xml +7 -7
- data/spec/pivotal_sync/story_spec.rb +3 -3
- data/spec/spec_helper.rb +1 -0
- metadata +2 -2
data/Gemfile
CHANGED
data/lib/pivotal_sync/comment.rb
CHANGED
data/lib/pivotal_sync/story.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
module PivotalSync
|
2
|
+
|
2
3
|
class Story
|
3
4
|
include HappyMapper
|
4
5
|
|
@@ -14,6 +15,7 @@ module PivotalSync
|
|
14
15
|
|
15
16
|
end
|
16
17
|
|
18
|
+
tag "story"
|
17
19
|
element :id, Integer
|
18
20
|
element :project_id, Integer
|
19
21
|
element :story_type, String
|
@@ -29,15 +31,12 @@ module PivotalSync
|
|
29
31
|
has_one :owned_by, Person
|
30
32
|
has_one :requested_by, Person
|
31
33
|
has_many :attachments, Attachment
|
34
|
+
has_many :comments, Comment
|
32
35
|
|
33
36
|
def project
|
34
37
|
Project.find(project_id)
|
35
38
|
end
|
36
39
|
|
37
|
-
def comments
|
38
|
-
Comment.all(project_id, id)
|
39
|
-
end
|
40
|
-
|
41
40
|
def tasks
|
42
41
|
Task.all(project_id, id)
|
43
42
|
end
|
data/lib/pivotal_sync/version.rb
CHANGED
data/spec/fixtures/stories.xml
CHANGED
@@ -11,13 +11,6 @@
|
|
11
11
|
|
12
12
|
ƒ¬˙∂˚ß∆˙ƒ</description>
|
13
13
|
<name>Just a little test</name>
|
14
|
-
<requested_by>
|
15
|
-
<person>
|
16
|
-
<id type="integer">126384</id>
|
17
|
-
<name>Brandon Hansen</name>
|
18
|
-
<initials>BH</initials>
|
19
|
-
</person>
|
20
|
-
</requested_by>
|
21
14
|
<owned_by>
|
22
15
|
<person>
|
23
16
|
<id type="integer">126384</id>
|
@@ -25,6 +18,13 @@
|
|
25
18
|
<initials>BH</initials>
|
26
19
|
</person>
|
27
20
|
</owned_by>
|
21
|
+
<requested_by>
|
22
|
+
<person>
|
23
|
+
<id type="integer">1233535</id>
|
24
|
+
<name>Chris Gratigny</name>
|
25
|
+
<initials>CG</initials>
|
26
|
+
</person>
|
27
|
+
</requested_by>
|
28
28
|
<created_at type="datetime">2013/03/19 21:25:26 UTC</created_at>
|
29
29
|
<updated_at type="datetime">2013/03/19 21:33:26 UTC</updated_at>
|
30
30
|
<labels>123,testing,∆˚˚∂åƒ</labels>
|
@@ -65,15 +65,15 @@ describe PivotalSync::Story do
|
|
65
65
|
end
|
66
66
|
|
67
67
|
it "should have an id" do
|
68
|
-
requested_by.id.should ==
|
68
|
+
requested_by.id.should == 1233535
|
69
69
|
end
|
70
70
|
|
71
71
|
it "should be requested by brandon" do
|
72
|
-
requested_by.name.should == "
|
72
|
+
requested_by.name.should == "Chris Gratigny"
|
73
73
|
end
|
74
74
|
|
75
75
|
it "should have initials BH" do
|
76
|
-
requested_by.initials.should == "
|
76
|
+
requested_by.initials.should == "CG"
|
77
77
|
end
|
78
78
|
|
79
79
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -22,6 +22,7 @@ Dir[File.expand_path(File.join(File.dirname(__FILE__),"support","**","*.rb"))].e
|
|
22
22
|
RSpec.configure do |config|
|
23
23
|
config.add_setting :fixture_path
|
24
24
|
config.fixture_path = "#{File.expand_path(File.dirname(__FILE__))}/fixtures/"
|
25
|
+
# config.filter_run :focus => true
|
25
26
|
config.before :each do
|
26
27
|
PivotalSync::Client.clear_connections
|
27
28
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pivotal_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
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: 2013-
|
12
|
+
date: 2013-04-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|