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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 41c0d82ef948fbe698699898a2d32bf26842fe00
4
- data.tar.gz: eb8c9549c8c6ee1d08aefd473d40bfa43a66fa2d
3
+ metadata.gz: d7874c919b8e0e24d37bbaf352f9c95ef5a88429
4
+ data.tar.gz: 94d23a1fbd5c3def65176130be33931c7c7c5df4
5
5
  SHA512:
6
- metadata.gz: ccedf8bdff9fa9442977ed2ed07645958c62557f21eb92c5e058447601cb047f3e5bcdc55b7fb77725b3717406161c81591430f4bbc4c155bea9eb6b2584b296
7
- data.tar.gz: 038e47fd7df0ec69921986126f270fb1a6cc14e3dc035bf876844a08fc4d56fadb8e455d87740cdd9fbff54eb06c9a6553562e096e3a53446ac022baa28984f8
6
+ metadata.gz: 2d6c9253787bb7ca2d7ef3fa8a17d60cd89e453ed15f8ea4d3adf9d81155c3c22aea36cd788e0a49bd281524bc6271be6578f897d964e7c37f2d9d459197bb8e
7
+ data.tar.gz: 72746375dd7a41a8eff35b0fa23c88d714d8b6bcd9f0a9b6ef824a6cfc1afffd952071f3dc876077bb8f7bd438782357d97f067b8f4876d02c7c2ef3275a7874
data/CHANGELOG.md CHANGED
@@ -1,18 +1,23 @@
1
- ## 0.4.3 - September 19, 2015
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 - September 19, 2015
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.1 - September 19, 2015
16
+ ## 0.4.2 - Novermber 13, 2015
12
17
 
13
18
  - Added support to deregister attachments
14
19
 
15
- ## 0.4.0 - September 19, 2015
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] = URI.encode_www_form(opts[:data])
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
 
@@ -3,25 +3,28 @@ module Mondo
3
3
 
4
4
  attr_accessor :title,
5
5
  :image_url,
6
- :app_uri, # TODO - make me consistent when the Mondo API changes
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.request(:post, "/feed", params: self.create_params)
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: "image",
20
- title: self.title,
21
- image_url: self.image_url,
22
- app_uri: self.app_uri,
23
- background_color: self.background_color,
24
- body: self.body,
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
@@ -1,3 +1,3 @@
1
1
  module Mondo
2
- VERSION = '0.4.3'.freeze
2
+ VERSION = '0.4.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mondo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Blomfield