mondo 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -4
- data/lib/mondo/client.rb +6 -1
- data/lib/mondo/feed_item.rb +12 -9
- data/lib/mondo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7874c919b8e0e24d37bbaf352f9c95ef5a88429
|
4
|
+
data.tar.gz: 94d23a1fbd5c3def65176130be33931c7c7c5df4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d6c9253787bb7ca2d7ef3fa8a17d60cd89e453ed15f8ea4d3adf9d81155c3c22aea36cd788e0a49bd281524bc6271be6578f897d964e7c37f2d9d459197bb8e
|
7
|
+
data.tar.gz: 72746375dd7a41a8eff35b0fa23c88d714d8b6bcd9f0a9b6ef824a6cfc1afffd952071f3dc876077bb8f7bd438782357d97f067b8f4876d02c7c2ef3275a7874
|
data/CHANGELOG.md
CHANGED
@@ -1,18 +1,23 @@
|
|
1
|
-
## 0.4.
|
1
|
+
## 0.4.4 - Novermber 14, 2015
|
2
|
+
|
3
|
+
- Deeply nested hash support - make Feed Item creation work again
|
4
|
+
|
5
|
+
|
6
|
+
## 0.4.3 - Novermber 14, 2015
|
2
7
|
|
3
8
|
- Added support for emoji
|
4
9
|
|
5
10
|
|
6
|
-
## 0.4.2 -
|
11
|
+
## 0.4.2 - Novermber 14, 2015
|
7
12
|
|
8
13
|
- Added support for registering, listing & deleting web-hooks
|
9
14
|
|
10
15
|
|
11
|
-
## 0.4.
|
16
|
+
## 0.4.2 - Novermber 13, 2015
|
12
17
|
|
13
18
|
- Added support to deregister attachments
|
14
19
|
|
15
|
-
## 0.4.
|
20
|
+
## 0.4.2 - Novermber 13, 2015
|
16
21
|
|
17
22
|
- Fix to fetch account_id on initialisation of client (API changed)
|
18
23
|
- Added support for attachments on transactions
|
data/lib/mondo/client.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'active_support/all' # really only need core_ext/hash
|
2
|
+
|
1
3
|
require 'multi_json'
|
2
4
|
require 'oauth2'
|
3
5
|
require 'openssl'
|
@@ -173,7 +175,10 @@ module Mondo
|
|
173
175
|
opts[:headers]['Authorization'] = "Bearer #{@access_token}"
|
174
176
|
|
175
177
|
if !opts[:data].nil?
|
176
|
-
opts[:body] =
|
178
|
+
opts[:body] = opts[:data].to_param
|
179
|
+
|
180
|
+
puts "SETTING BODY #{opts[:body]}"
|
181
|
+
|
177
182
|
opts[:headers]['Content-Type'] = 'application/x-www-form-urlencoded' # sob sob
|
178
183
|
end
|
179
184
|
|
data/lib/mondo/feed_item.rb
CHANGED
@@ -3,25 +3,28 @@ module Mondo
|
|
3
3
|
|
4
4
|
attr_accessor :title,
|
5
5
|
:image_url,
|
6
|
-
:
|
6
|
+
:url, # TODO - make me consistent when the Mondo API changes
|
7
7
|
:background_color,
|
8
|
-
:body
|
8
|
+
:body,
|
9
|
+
:type
|
9
10
|
|
10
11
|
|
11
12
|
# temporary fix until the API accepts JSON data in the request body
|
12
13
|
def save
|
13
|
-
self.client.
|
14
|
+
self.client.api_post("/feed", self.create_params)
|
14
15
|
end
|
15
16
|
|
16
17
|
def create_params
|
17
18
|
{
|
18
19
|
account_id: self.client.account_id,
|
19
|
-
type: "
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
20
|
+
type: "basic",
|
21
|
+
url: self.url,
|
22
|
+
params: {
|
23
|
+
title: self.title,
|
24
|
+
image_url: self.image_url,
|
25
|
+
background_color: self.background_color,
|
26
|
+
body: self.body
|
27
|
+
}
|
25
28
|
}
|
26
29
|
end
|
27
30
|
end
|
data/lib/mondo/version.rb
CHANGED