tracker_api 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c36830bc748e4e3d5a45d61f64ba9df00e4f6d2
4
- data.tar.gz: 15b700b9490e7b950862bc23ef55d7965e7de984
3
+ metadata.gz: 86a0fc8286762942b07822c2dc7efa7478eff2a9
4
+ data.tar.gz: 117233a3c81bbcd6177a006f1098bdcef00af6c4
5
5
  SHA512:
6
- metadata.gz: 0411d1435854aa5c42dd379340caed6fb4e515e6279d873af31398088d871314d05f06a1bc153a56936c467a5ee208fc921fcabd652a2df8d84dfcfe581e8da0
7
- data.tar.gz: 526003eba259c2f63e49aa0ffdb428ef723bfe438b2a88440b351d2aa01cad084a096591b3c858441d0dce88922b8dd816b2f5a9f2df64ddf8cb1d9cad2f99d7
6
+ metadata.gz: 1c275fb7385aa58a03575e5278450f6c7606bb1080b4d782da6d827049a5026c57b7612422a3aef32cf73a36bd32f3b6aa150299502ee1adce02d95388f5c9fd
7
+ data.tar.gz: 2f3b1b746c5afaa4d28af7d2e1bd3b784354a3d6de23f286f25dd55a6d36f706293c3817a4f041915ee031bd891354258fc05f429bb903b415016dc54be4c22b
data/README.md CHANGED
@@ -84,6 +84,20 @@ client.project.stories(fields: ':default,comments(:default,person)') # Eage
84
84
  story.comments(fields: ':default,person') # Eagerly get comments and the person that made the comment for a story
85
85
  ```
86
86
 
87
+ ## Warning
88
+
89
+ Direct mutation of an attribute value skips coercion and dirty tracking. Please use direct assignment or the specialized add_* methods to get expected behavior.
90
+ https://github.com/solnic/virtus#important-note-about-member-coercions
91
+
92
+ This will cause coercion and dirty tracking to be bypassed and the new label will not be saved.
93
+ ```ruby
94
+ story = project.story(847762630)
95
+
96
+ label = TrackerApi::Resources::Label.new(name: 'Special Snowflake')
97
+ story.labels << label
98
+ story.save
99
+ ```
100
+
87
101
  ## TODO
88
102
 
89
103
  - Add missing resources and endpoints
@@ -11,8 +11,8 @@ module TrackerApi
11
11
  attribute :project_version, Integer
12
12
  attribute :message, String
13
13
  attribute :highlight, String
14
- attribute :changes, Shared::Collection[Change]
15
- attribute :primary_resources, Shared::Collection[PrimaryResource]
14
+ attribute :changes, [Change]
15
+ attribute :primary_resources, [PrimaryResource]
16
16
  attribute :project, Project
17
17
  attribute :performed_by, Person
18
18
  attribute :occurred_at, DateTime
@@ -9,8 +9,8 @@ module TrackerApi
9
9
  attribute :person_id, Integer
10
10
  attribute :created_at, DateTime
11
11
  attribute :updated_at, DateTime
12
- attribute :file_attachment_ids, Shared::Collection[Integer]
13
- attribute :google_attachment_ids, Shared::Collection[Integer]
12
+ attribute :file_attachment_ids, [Integer]
13
+ attribute :google_attachment_ids, [Integer]
14
14
  attribute :commit_identifier, String
15
15
  attribute :commit_type, String
16
16
  attribute :kind, String
@@ -5,12 +5,12 @@ module TrackerApi
5
5
 
6
6
  attribute :client
7
7
 
8
- attribute :comment_ids, Shared::Collection[Integer]
9
- attribute :comments, Shared::Collection[Comment]
8
+ attribute :comment_ids, [Integer]
9
+ attribute :comments, [Comment]
10
10
  attribute :created_at, DateTime
11
11
  attribute :description, String
12
- attribute :follower_ids, Shared::Collection[Integer]
13
- attribute :followers, Shared::Collection[Person]
12
+ attribute :follower_ids, [Integer]
13
+ attribute :followers, [Person]
14
14
  attribute :kind, String
15
15
  attribute :label, Label
16
16
  attribute :label_id, Integer
@@ -13,8 +13,8 @@ module TrackerApi
13
13
  attribute :planned, Boolean
14
14
  attribute :project_id, Integer
15
15
  attribute :start, DateTime
16
- attribute :stories, Shared::Collection[Story]
17
- attribute :story_ids, Shared::Collection[Integer]
16
+ attribute :stories, [Story]
17
+ attribute :story_ids, [Integer]
18
18
  attribute :team_strength, Float
19
19
 
20
20
  def stories=(data)
@@ -9,9 +9,9 @@ module TrackerApi
9
9
  attribute :time_zone, TimeZone
10
10
  attribute :api_token, String
11
11
  attribute :has_google_identity, Boolean
12
- attribute :project_ids, Shared::Collection[Integer]
13
- attribute :projects, Shared::Collection[MembershipSummary]
14
- attribute :workspace_ids, Shared::Collection[Integer]
12
+ attribute :project_ids, [Integer]
13
+ attribute :projects, [MembershipSummary]
14
+ attribute :workspace_ids, [Integer]
15
15
  attribute :email, String
16
16
  attribute :receives_in_app_notifications, Boolean
17
17
  attribute :kind, String
@@ -17,14 +17,14 @@ module TrackerApi
17
17
  attribute :enable_incoming_emails, Boolean
18
18
  attribute :enable_planned_mode, Boolean
19
19
  attribute :enable_tasks, Boolean
20
- attribute :epic_ids, Shared::Collection[Integer]
21
- attribute :epics, Shared::Collection[Epic]
20
+ attribute :epic_ids, [Integer]
21
+ attribute :epics, [Epic]
22
22
  attribute :has_google_domain, Boolean
23
23
  attribute :initial_velocity, Integer
24
24
  attribute :iteration_length, Integer
25
25
  attribute :kind, String
26
- attribute :label_ids, Shared::Collection[Integer]
27
- attribute :labels, Shared::Collection[Label]
26
+ attribute :label_ids, [Integer]
27
+ attribute :labels, [Label]
28
28
  attribute :name, String
29
29
  attribute :number_of_done_iterations_to_show, Integer
30
30
  attribute :point_scale, String
@@ -6,32 +6,32 @@ module TrackerApi
6
6
  attribute :client
7
7
 
8
8
  attribute :accepted_at, DateTime
9
- attribute :comment_ids, Shared::Collection[Integer]
10
- attribute :comments, Shared::Collection[Comment]
9
+ attribute :comment_ids, [Integer]
10
+ attribute :comments, [Comment]
11
11
  attribute :created_at, DateTime
12
12
  attribute :current_state, String # (accepted, delivered, finished, started, rejected, planned, unstarted, unscheduled)
13
13
  attribute :deadline, DateTime
14
14
  attribute :description, String
15
15
  attribute :estimate, Float
16
16
  attribute :external_id, String
17
- attribute :follower_ids, Shared::Collection[Integer]
18
- attribute :followers, Shared::Collection[Person]
17
+ attribute :follower_ids, [Integer]
18
+ attribute :followers, [Person]
19
19
  attribute :integration_id, Integer
20
20
  attribute :kind, String
21
- attribute :label_ids, Shared::Collection[Integer]
22
- attribute :labels, Shared::Collection[Label]
21
+ attribute :label_ids, [Integer]
22
+ attribute :labels, [Label]
23
23
  attribute :name, String
24
24
  attribute :owned_by_id, Integer # deprecated!
25
25
  attribute :owned_by, Person
26
- attribute :owner_ids, Shared::Collection[Integer]
27
- attribute :owners, Shared::Collection[Person]
26
+ attribute :owner_ids, [Integer]
27
+ attribute :owners, [Person]
28
28
  attribute :planned_iteration_number, Integer
29
29
  attribute :project_id, Integer
30
30
  attribute :requested_by, Person
31
31
  attribute :requested_by_id, Integer
32
32
  attribute :story_type, String # (feature, bug, chore, release)
33
- attribute :task_ids, Shared::Collection[Integer]
34
- attribute :tasks, Shared::Collection[Task]
33
+ attribute :task_ids, [Integer]
34
+ attribute :tasks, [Task]
35
35
  attribute :updated_at, DateTime
36
36
  attribute :url, String
37
37
 
@@ -1,3 +1,3 @@
1
1
  module TrackerApi
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tracker_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Forest Carlisle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-21 00:00:00.000000000 Z
11
+ date: 2016-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -256,7 +256,6 @@ files:
256
256
  - lib/tracker_api/resources/project.rb
257
257
  - lib/tracker_api/resources/project_membership.rb
258
258
  - lib/tracker_api/resources/shared/base.rb
259
- - lib/tracker_api/resources/shared/collection.rb
260
259
  - lib/tracker_api/resources/story.rb
261
260
  - lib/tracker_api/resources/task.rb
262
261
  - lib/tracker_api/resources/time_zone.rb
@@ -1,17 +0,0 @@
1
- module TrackerApi
2
- module Resources
3
- module Shared
4
- class Collection < Array
5
- def <<(item)
6
- warn """
7
- WARNING: Direct mutation of an attribute value skips coercion
8
- and dirty tracking. Please use direct assignment or the
9
- specialized add_* methods to get expected behavior.
10
- https://github.com/solnic/virtus#important-note-about-member-coercions
11
- """
12
- super
13
- end
14
- end
15
- end
16
- end
17
- end