inbox 0.12.0 → 0.13.0

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/draft.rb +2 -1
  4. data/lib/inbox.rb +1 -2
  5. metadata +16 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 33c781ec5190137a710c05903a8a02ff1b8bf2d9
4
- data.tar.gz: ba17c59fd7de102ef30a5b750fad2ab56a9e0a35
3
+ metadata.gz: 62b688d40a00847715b2f3b2ee9d34cdd0e527fc
4
+ data.tar.gz: 1b7524aed2682373ffb6e5895932a3aa91d56e27
5
5
  SHA512:
6
- metadata.gz: d5ecb6ca86626243aa0d11f21ca595659ec99d9815c417a12f3a1dace2d322c691fc33965f976801e2c86d878e9122c195813b8eb73061e7d46018afe3c10c1c
7
- data.tar.gz: affca04e7ac1813489fe1684b0d3c6739d99bc9742879eb5138d29ea4a7d882e75be41ac6ecd5c251338fb202c30fb77d71d73b5bac3b6dd627f8c6f2f089b76
6
+ metadata.gz: 64aa478e4dae71a8eaf84ca91b9e976936acf370469f8cab5c31b941782b23ae93b82b3c3349441585723fdfa353a07034ff44401ca8a6d93e2505cf0d2003ca
7
+ data.tar.gz: 948f917c9bbcf97c9ebd74437263a3d0c94bf34bdb735880b567f87dc0e9f5b8395325fc40cc37811bb17e1f08c25dd56385895e4fce7e47abece2dcfc41253e
data/README.md CHANGED
@@ -110,7 +110,7 @@ pass the additional `trial: true` option to start their account in trial mode.
110
110
  # Query the status of every account linked to the app
111
111
  inbox = Inbox::API.new(config.inbox_app_id, config.inbox_app_secret, inbox_token)
112
112
  accounts = inbox.accounts
113
- accounts.map { |a| a.account_id, a.sync_state } # Available fields are: account_id, sync_state, trial and trial_expires. See lib/account.rb for more details.
113
+ accounts.map { |a| [a.account_id, a.sync_state] } # Available fields are: account_id, sync_state, trial and trial_expires. See lib/account.rb for more details.
114
114
  ```
115
115
 
116
116
  ### Fetching Namespaces
data/lib/draft.rb CHANGED
@@ -21,7 +21,8 @@ module Inbox
21
21
  end
22
22
 
23
23
  ::RestClient.post(url, data.to_json, :content_type => :json) do |response, request, result|
24
- Inbox.interpret_response(result, response, :expected_class => Object)
24
+ json = Inbox.interpret_response(result, response, :expected_class => Object)
25
+ self.inflate(json)
25
26
  end
26
27
 
27
28
  self
data/lib/inbox.rb CHANGED
@@ -127,8 +127,7 @@ module Inbox
127
127
 
128
128
  RestClient.get(accounts_path) do |response, request, result|
129
129
  json = Inbox.interpret_response(result, response, :expected_class => Object)
130
- puts json
131
- json.map do |account_json|
130
+ return json.map do |account_json|
132
131
  Account.new({ :account_id => account_json.fetch('account_id', ''),
133
132
  :trial => account_json.fetch('trial', ''),
134
133
  :trial_expires => account_json.fetch('trial_expires', nil),
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Gotow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-15 00:00:00.000000000 Z
11
+ date: 2015-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -136,6 +136,20 @@ dependencies:
136
136
  - - '>='
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: webmock
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '>='
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
139
153
  description: 'Gem for interacting with the Inbox API that allows you to create and
140
154
  publish one-page websites, subscribe to web hooks and receive events when those
141
155
  pages are interacted with. Visit http://www.populr.me/ for more information. '