itfollowsclient 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/itfollowsclient.rb +13 -3
- data/lib/itfollowsclient/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3015c1772804d2f52c6ab6746d74617907f0636
|
4
|
+
data.tar.gz: 1614d7973818352867d74b7ffe92521bc17de408
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4878aae26a29e6ffb225f738195c6bba574a848a872737e1ff4784be1353cc545c7592059fb8dbf0c6e0df1f73d896b48501aeddc4948eb9c8c28e5ffc143668
|
7
|
+
data.tar.gz: bec0a041cfeb70734aa9fa86113c18b450bd7e793aec211bd4fa6192db77fcfcc4fcca312dc47ce74deb077fd71010b7ecc633bf962e77bf4e9a58e64bfccc81
|
data/lib/itfollowsclient.rb
CHANGED
@@ -15,9 +15,11 @@ module Itfollows
|
|
15
15
|
JSON.parse(response.body)
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
|
19
|
+
def new_followup(name, description, percentage, tasks, id)
|
20
|
+
uri = uri_for_update(name, id)
|
21
|
+
payload = {"line_entry"=>{"followups_attributes"=>{"0"=>{"description"=> description, "percentage"=> percentage, "tasks"=>tasks}}}, "id"=> id}
|
22
|
+
response = patch(name, payload, uri, email, token)
|
21
23
|
JSON.parse(response.body)
|
22
24
|
end
|
23
25
|
|
@@ -52,6 +54,10 @@ module Itfollows
|
|
52
54
|
URI.parse("#{it_follows_host}/#{name}.json")
|
53
55
|
end
|
54
56
|
|
57
|
+
def uri_for_update(name, id)
|
58
|
+
URI.parse("#{host}/#{name}/#{id}.json")
|
59
|
+
end
|
60
|
+
|
55
61
|
def build_http(name, uri)
|
56
62
|
Net::HTTP.new(uri.host, uri.port)
|
57
63
|
end
|
@@ -64,6 +70,10 @@ module Itfollows
|
|
64
70
|
build_http(name, uri).post(uri.path, payload.to_json, headers(email, token))
|
65
71
|
end
|
66
72
|
|
73
|
+
def patch(name, payload, uri, email, token)
|
74
|
+
build_http(name, uri).patch(uri.path, payload.to_json, headers(email, token))
|
75
|
+
end
|
76
|
+
|
67
77
|
def uri_for_show(name, id)
|
68
78
|
URI.parse("#{it_follows_host}/#{name}/#{id}/edit.json")
|
69
79
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itfollowsclient
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maria Velandia
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-01-
|
12
|
+
date: 2016-01-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.5.1
|
83
|
+
rubygems_version: 2.4.5.1
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: y, because Rubygems requires one.
|