contextio-lite 0.0.3 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 02509ec6a85f3cae0d1628b455559e43d7a069d1
4
- data.tar.gz: c10419b478b93fbdd800dd1429c190180b8c031b
3
+ metadata.gz: 65fc161dabf7f846be51203770e71a4bfb30f561
4
+ data.tar.gz: bdc30bdd8aec378161d33ade96f96fabe2c1d163
5
5
  SHA512:
6
- metadata.gz: 33f8a43a554942501da00896ce3780d94649e5e38b4e3e76ec32402c55a2e337c3ec3f768c3cd1353be17f7242c81bf63f066129bb8492cdaee5cf86d6457b4c
7
- data.tar.gz: 94554fb04f8aea5a68fd6fbc7b37f8558b365fef88048201822fec0973108234cffad21964706ebb7600c31c36df9a72e22e93b0d7d595a59cd8688c08ed0ba6
6
+ metadata.gz: 6a6f5554a8d8531919538d574030507b555a3933559a793d8febbec4fadf2df9b0b9c904054aceaf3d0874ea8cd402a5091fe6ce3c705ca1bd6b862392239ff5
7
+ data.tar.gz: 27bca14f539fddc329a2de3e45868f3d6161fe0a17ed0d3f0b20a5a0ab2b9a4d00c67b1b70f6da24402f14aad2768c64a0e66e3fdb6e11987754e39592b3f4c7
data/README.md CHANGED
@@ -8,7 +8,7 @@ It works in the same way as the official, calling first a user object and then w
8
8
  Add this line to your application's Gemfile:
9
9
 
10
10
  ```ruby
11
- gem 'contextio-lite'
11
+ gem 'contextio-lite', :require => 'contextio'
12
12
  ```
13
13
 
14
14
  And then execute:
@@ -26,7 +26,7 @@ Or install it yourself as:
26
26
  ```ruby
27
27
  require 'contextio'
28
28
 
29
- client = ContextIO::Lite.new(API_KEY, API_SECRET)
29
+ client = ContextIO.lite(API_KEY, API_SECRET)
30
30
  ```
31
31
 
32
32
  ### Dealing with users
@@ -40,7 +40,7 @@ p client.users.map(&:id)
40
40
  CRUD
41
41
 
42
42
  ```ruby
43
- user = client.users.create email: 'bob@gmail.com', first_name: 'Bob', server: 'imap.gmail.com' username: 'bob', 'use_sll':true, 'port': 993, 'type': 'IMAP
43
+ user = client.users.create email: 'bob@gmail.com', first_name: 'Bob', server: 'imap.gmail.com' username: 'bob', use_sll:true, port: 993, type: 'IMAP'
44
44
 
45
45
  user_id = user.id
46
46
 
@@ -1,5 +1,5 @@
1
1
  module ContextIO
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
 
4
4
  # @private
5
5
  # Handle for the `API` instance. For internal use only.
@@ -102,6 +102,7 @@ module ContextIO
102
102
  # @return [Faraday::Response] The response object from the request.
103
103
  def oauth_request(method, resource_path, params, headers=nil)
104
104
  normalized_params = params.inject({}) do |normalized_params, (key, value)|
105
+ value = (value ? 1 : 0) if value == !!value
105
106
  normalized_params[key.to_sym] = value
106
107
  normalized_params
107
108
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contextio-lite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Juan