factor-connector-pivotal 0.0.5 → 0.0.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dd7340efe95a085cd255debb3147ca46fd25167
|
4
|
+
data.tar.gz: d2a294b3ebc50856a5681a2e43b212a01dcb99d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a3d407a2beca8ec48c96e69cd682eb1a484620979be385462682693e3af396d6a4afc9ef9054e1b2a5dc9b6672742f9ac6cc859bffe1cea7ab1dfdc75f73a68
|
7
|
+
data.tar.gz: 82b82a7395c697ef52333bd870656653862ff52276de6319e12ff657f465f5a024c7d766aca5cab2925a85e38cefcc5dfdd014a585d69a9a09fd38f82716f78b
|
@@ -4,25 +4,21 @@ require 'pivotal-api'
|
|
4
4
|
Factor::Connector.service 'pivotal_comments' do
|
5
5
|
action 'get' do |params|
|
6
6
|
api_key = params['api_key']
|
7
|
-
project_id = params['project']
|
8
|
-
story_id = params['story']
|
9
|
-
|
7
|
+
project_id = params['project'].to_i
|
8
|
+
story_id = params['story'].to_i
|
9
|
+
comment_id = params['comment'].to_i
|
10
10
|
|
11
11
|
fail 'API Key (api_key) are required' unless api_key
|
12
12
|
fail 'Project ID (project) is required' unless project_id
|
13
|
-
fail 'Project ID (project) must be an integer' unless project_id.is_a?(Integer)
|
14
13
|
fail 'Story ID (story) is required' unless story_id
|
15
|
-
fail '
|
16
|
-
fail 'Comment ID (id) is required' unless id
|
17
|
-
fail 'Comment ID (id) must be an integer' unless id.is_a?(Integer)
|
18
|
-
|
14
|
+
fail 'Comment ID (comment) is required' unless comment_id
|
19
15
|
|
20
16
|
info 'Initializing Pivotal Tracker Client'
|
21
17
|
client = PivotalApi::Client.new(token: api_key)
|
22
18
|
|
23
19
|
info "Creating comment"
|
24
20
|
begin
|
25
|
-
comment = client.projects.stories.comments.get project_id, story_id,
|
21
|
+
comment = client.projects.stories.comments.get project_id, story_id, comment_id
|
26
22
|
rescue
|
27
23
|
fail "Failed to get comment, check your credentials"
|
28
24
|
end
|
@@ -32,15 +28,12 @@ Factor::Connector.service 'pivotal_comments' do
|
|
32
28
|
|
33
29
|
action 'all' do |params|
|
34
30
|
api_key = params['api_key']
|
35
|
-
project_id = params['project']
|
36
|
-
story_id = params['story']
|
31
|
+
project_id = params['project'].to_i
|
32
|
+
story_id = params['story'].to_i
|
37
33
|
|
38
34
|
fail 'API Key (api_key) are required' unless api_key
|
39
35
|
fail 'Project ID (project) is required' unless project_id
|
40
|
-
fail 'Project ID (project) must be an integer' unless project_id.is_a?(Integer)
|
41
36
|
fail 'Story ID (story) is required' unless story_id
|
42
|
-
fail 'Story ID (story) must be an Integer' unless story_id.is_a?(Integer)
|
43
|
-
|
44
37
|
|
45
38
|
info 'Initializing Pivotal Tracker Client'
|
46
39
|
client = PivotalApi::Client.new(token: api_key)
|
@@ -57,15 +50,12 @@ Factor::Connector.service 'pivotal_comments' do
|
|
57
50
|
|
58
51
|
action 'create' do |params|
|
59
52
|
api_key = params['api_key']
|
60
|
-
project_id = params['project']
|
61
|
-
story_id = params['story']
|
53
|
+
project_id = params['project'].to_i
|
54
|
+
story_id = params['story'].to_i
|
62
55
|
|
63
56
|
fail 'API Key (api_key) are required' unless api_key
|
64
57
|
fail 'Project ID (project) is required' unless project_id
|
65
|
-
fail 'Project ID (project) must be an integer' unless project_id.is_a?(Integer)
|
66
58
|
fail 'Story ID (story) is required' unless story_id
|
67
|
-
fail 'Story ID (story) must be an Integer' unless story_id.is_a?(Integer)
|
68
|
-
|
69
59
|
|
70
60
|
info 'Initializing Pivotal Tracker Client'
|
71
61
|
client = PivotalApi::Client.new(token: api_key)
|
@@ -86,25 +76,21 @@ Factor::Connector.service 'pivotal_comments' do
|
|
86
76
|
|
87
77
|
action 'delete' do |params|
|
88
78
|
api_key = params['api_key']
|
89
|
-
project_id = params['project']
|
90
|
-
story_id = params['story']
|
91
|
-
|
79
|
+
project_id = params['project'].to_i
|
80
|
+
story_id = params['story'].to_i
|
81
|
+
comment_id = params['comment'].to_i
|
92
82
|
|
93
83
|
fail 'API Key (api_key) are required' unless api_key
|
94
84
|
fail 'Project ID (project) is required' unless project_id
|
95
|
-
fail 'Project ID (project) must be an integer' unless project_id.is_a?(Integer)
|
96
85
|
fail 'Story ID (story) is required' unless story_id
|
97
|
-
fail '
|
98
|
-
fail 'Comment ID (id) is required' unless id
|
99
|
-
fail 'Comment ID (id) must be an integer' unless id.is_a?(Integer)
|
100
|
-
|
86
|
+
fail 'Comment ID (comment) is required' unless comment_id
|
101
87
|
|
102
88
|
info 'Initializing Pivotal Tracker Client'
|
103
89
|
client = PivotalApi::Client.new(token: api_key)
|
104
90
|
|
105
91
|
info "Creating comment"
|
106
92
|
begin
|
107
|
-
client.projects.stories.comments.delete project_id, story_id,
|
93
|
+
client.projects.stories.comments.delete project_id, story_id, comment_id
|
108
94
|
rescue
|
109
95
|
fail "Failed to delete comment, check your credentials"
|
110
96
|
end
|
@@ -4,15 +4,12 @@ require 'pivotal-api'
|
|
4
4
|
Factor::Connector.service 'pivotal_labels' do
|
5
5
|
action 'all' do |params|
|
6
6
|
api_key = params['api_key']
|
7
|
-
project_id = params['project']
|
8
|
-
story_id = params['story']
|
7
|
+
project_id = params['project'].to_i
|
8
|
+
story_id = params['story'].to_i
|
9
9
|
|
10
10
|
fail 'API Key (api_key) are required' unless api_key
|
11
11
|
fail 'Project ID (project) is required' unless project_id
|
12
|
-
fail 'Project ID (project) must be an integer' unless project_id.is_a?(Integer)
|
13
12
|
fail 'Story ID (story) is required' unless story_id
|
14
|
-
fail 'Story ID (story) must be an Integer' unless story_id.is_a?(Integer)
|
15
|
-
|
16
13
|
|
17
14
|
info 'Initializing Pivotal Tracker Client'
|
18
15
|
client = PivotalApi::Client.new(token: api_key)
|
@@ -29,18 +26,15 @@ Factor::Connector.service 'pivotal_labels' do
|
|
29
26
|
|
30
27
|
action 'create' do |params|
|
31
28
|
api_key = params['api_key']
|
32
|
-
project_id = params['project']
|
33
|
-
story_id = params['story']
|
29
|
+
project_id = params['project'].to_i
|
30
|
+
story_id = params['story'].to_i
|
34
31
|
name = params['name']
|
35
32
|
|
36
33
|
fail 'API Key (api_key) are required' unless api_key
|
37
34
|
fail 'Project ID (project) is required' unless project_id
|
38
|
-
fail 'Project ID (project) must be an integer' unless project_id.is_a?(Integer)
|
39
35
|
fail 'Story ID (story) is required' unless story_id
|
40
|
-
fail 'Story ID (story) must be an Integer' unless story_id.is_a?(Integer)
|
41
36
|
fail 'Name (name) of label is required' unless name
|
42
37
|
|
43
|
-
|
44
38
|
info 'Initializing Pivotal Tracker Client'
|
45
39
|
client = PivotalApi::Client.new(token: api_key)
|
46
40
|
|
@@ -55,25 +49,21 @@ Factor::Connector.service 'pivotal_labels' do
|
|
55
49
|
|
56
50
|
action 'delete' do |params|
|
57
51
|
api_key = params['api_key']
|
58
|
-
project_id = params['project']
|
59
|
-
story_id = params['story']
|
60
|
-
|
52
|
+
project_id = params['project'].to_i
|
53
|
+
story_id = params['story'].to_i
|
54
|
+
label_id = params['label'].to_i
|
61
55
|
|
62
56
|
fail 'API Key (api_key) are required' unless api_key
|
63
57
|
fail 'Project ID (project) is required' unless project_id
|
64
|
-
fail 'Project ID (project) must be an integer' unless project_id.is_a?(Integer)
|
65
58
|
fail 'Story ID (story) is required' unless story_id
|
66
|
-
fail '
|
67
|
-
fail 'Label ID (id) is required' unless id
|
68
|
-
fail 'Label ID (id) must be an integer' unless id.is_a?(Integer)
|
69
|
-
|
59
|
+
fail 'Label ID (label) is required' unless label_id
|
70
60
|
|
71
61
|
info 'Initializing Pivotal Tracker Client'
|
72
62
|
client = PivotalApi::Client.new(token: api_key)
|
73
63
|
|
74
64
|
info 'Deleting label'
|
75
65
|
begin
|
76
|
-
client.projects.stories.labels.delete project_id, story_id,
|
66
|
+
client.projects.stories.labels.delete project_id, story_id, label_id
|
77
67
|
rescue
|
78
68
|
fail "Failed to get label, check your credentials"
|
79
69
|
end
|
@@ -3,21 +3,20 @@ require 'pivotal-api'
|
|
3
3
|
|
4
4
|
Factor::Connector.service 'pivotal_projects' do
|
5
5
|
action 'get' do |params|
|
6
|
-
api_key
|
7
|
-
|
6
|
+
api_key = params['api_key']
|
7
|
+
project_id = params['project'].to_i
|
8
8
|
|
9
9
|
fail 'API Key (api_key) are required' unless api_key
|
10
|
-
fail 'Project ID (
|
11
|
-
fail 'Project ID (id) must be an integer' unless id.is_a?(Integer)
|
10
|
+
fail 'Project ID (project) is required' unless project_id
|
12
11
|
|
13
12
|
info 'Initializing Pivotal Tracker Client'
|
14
13
|
client = PivotalApi::Client.new(token: api_key)
|
15
14
|
|
16
|
-
info "Getting project with ID #{
|
15
|
+
info "Getting project with ID #{project_id.to_s}"
|
17
16
|
begin
|
18
|
-
project = client.projects.get
|
17
|
+
project = client.projects.get project_id
|
19
18
|
rescue
|
20
|
-
fail "Failed to get the project with id #{
|
19
|
+
fail "Failed to get the project with id #{project_id.to_s}, check your credentials"
|
21
20
|
end
|
22
21
|
|
23
22
|
action_callback project.to_hash
|
@@ -4,21 +4,19 @@ require 'pivotal-api'
|
|
4
4
|
Factor::Connector.service 'pivotal_stories' do
|
5
5
|
action 'get' do |params|
|
6
6
|
api_key = params['api_key']
|
7
|
-
project_id = params['project']
|
8
|
-
|
7
|
+
project_id = params['project'].to_i
|
8
|
+
story_id = params['story'].to_i
|
9
9
|
|
10
10
|
fail 'API Key (api_key) are required' unless api_key
|
11
|
-
fail 'Project ID (
|
12
|
-
fail '
|
13
|
-
fail 'Story ID (id) is required' unless id
|
14
|
-
fail 'Story ID (id) must be an Integer' unless id.is_a?(Integer)
|
11
|
+
fail 'Project ID (project) is required' unless project_id
|
12
|
+
fail 'Story ID (story) is required' unless story_id
|
15
13
|
|
16
14
|
info 'Initializing Pivotal Tracker Client'
|
17
15
|
client = PivotalApi::Client.new(token: api_key)
|
18
16
|
|
19
|
-
info "Getting story with id #{
|
17
|
+
info "Getting story with id #{story_id.to_s}"
|
20
18
|
begin
|
21
|
-
story = client.projects.stories.get(project_id,
|
19
|
+
story = client.projects.stories.get(project_id,story_id)
|
22
20
|
rescue
|
23
21
|
fail "Failed to get stories, check your credentials and filter"
|
24
22
|
end
|
@@ -28,11 +26,10 @@ Factor::Connector.service 'pivotal_stories' do
|
|
28
26
|
|
29
27
|
action 'all' do |params|
|
30
28
|
api_key = params['api_key']
|
31
|
-
project_id = params['project']
|
29
|
+
project_id = params['project'].to_i
|
32
30
|
|
33
31
|
fail 'API Key (api_key) are required' unless api_key
|
34
|
-
fail 'Project ID (
|
35
|
-
fail 'Project ID (project_id) must be an integer' unless project_id.is_a?(Integer)
|
32
|
+
fail 'Project ID (project) is required' unless project_id
|
36
33
|
|
37
34
|
info 'Initializing Pivotal Tracker Client'
|
38
35
|
client = PivotalApi::Client.new(token: api_key)
|
@@ -49,11 +46,10 @@ Factor::Connector.service 'pivotal_stories' do
|
|
49
46
|
|
50
47
|
action 'create' do |params|
|
51
48
|
api_key = params['api_key']
|
52
|
-
project_id = params['project']
|
49
|
+
project_id = params['project'].to_i
|
53
50
|
|
54
51
|
fail 'API Key (api_key) are required' unless api_key
|
55
|
-
fail 'Project ID (
|
56
|
-
fail 'Project ID (project_id) must be an integer' unless project_id.is_a?(Integer)
|
52
|
+
fail 'Project ID (project) is required' unless project_id
|
57
53
|
|
58
54
|
info 'Initializing Pivotal Tracker Client'
|
59
55
|
client = PivotalApi::Client.new(token: api_key)
|
@@ -73,15 +69,12 @@ Factor::Connector.service 'pivotal_stories' do
|
|
73
69
|
|
74
70
|
action 'update' do |params|
|
75
71
|
api_key = params['api_key']
|
76
|
-
project_id = params['project']
|
77
|
-
|
72
|
+
project_id = params['project'].to_i
|
73
|
+
story_id = params['story'].to_i
|
78
74
|
|
79
75
|
fail 'API Key (api_key) are required' unless api_key
|
80
|
-
fail 'Project ID (
|
81
|
-
fail '
|
82
|
-
fail 'Story ID (id) is required' unless id
|
83
|
-
fail 'Story ID (id) must be an Integer' unless id.is_a?(Integer)
|
84
|
-
|
76
|
+
fail 'Project ID (project) is required' unless project_id
|
77
|
+
fail 'Story ID (story) is required' unless story_id
|
85
78
|
|
86
79
|
info 'Initializing Pivotal Tracker Client'
|
87
80
|
client = PivotalApi::Client.new(token: api_key)
|
@@ -91,7 +84,7 @@ Factor::Connector.service 'pivotal_stories' do
|
|
91
84
|
story_fields = params.select { |key, value| fields.include?(key) }
|
92
85
|
|
93
86
|
begin
|
94
|
-
story = client.projects.stories.update project_id,
|
87
|
+
story = client.projects.stories.update project_id, story_id, story_fields
|
95
88
|
rescue
|
96
89
|
fail "Failed to update the story for unknown reason"
|
97
90
|
end
|
@@ -101,21 +94,19 @@ Factor::Connector.service 'pivotal_stories' do
|
|
101
94
|
|
102
95
|
action 'delete' do |params|
|
103
96
|
api_key = params['api_key']
|
104
|
-
project_id = params['project']
|
105
|
-
|
97
|
+
project_id = params['project'].to_i
|
98
|
+
story_id = params['story'].to_i
|
106
99
|
|
107
100
|
fail 'API Key (api_key) are required' unless api_key
|
108
|
-
fail 'Project ID (
|
109
|
-
fail '
|
110
|
-
fail 'Story ID (id) is required' unless id
|
111
|
-
fail 'Story ID (id) must be an Integer' unless id.is_a?(Integer)
|
101
|
+
fail 'Project ID (project) is required' unless project_id
|
102
|
+
fail 'Story ID (story) is required' unless story_id
|
112
103
|
|
113
104
|
info 'Initializing Pivotal Tracker Client'
|
114
105
|
client = PivotalApi::Client.new(token: api_key)
|
115
106
|
|
116
107
|
info "Deleting story with id #{id.to_s}"
|
117
108
|
begin
|
118
|
-
client.projects.stories.delete project_id,
|
109
|
+
client.projects.stories.delete project_id, story_id
|
119
110
|
rescue
|
120
111
|
fail "Failed to get stories, check your credentials and filter"
|
121
112
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factor-connector-pivotal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciej Skierkowski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: factor-connector-api
|