todoist-ruby 0.2.1 → 0.2.2

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: 8b6ced7c5a25859fde744ff6603d95f9a0f02459
4
- data.tar.gz: 13701d11be2371933b127389374aa7cbd4c416ad
3
+ metadata.gz: 796e2301a2df25de9fada156f51f294208deeed3
4
+ data.tar.gz: b75e82c1ac38744e758f0652fd25f6f2d54727be
5
5
  SHA512:
6
- metadata.gz: a405c89d19faae1b894944d98f16af25d8f913f982723001d3bffcae53492683569231a35a6d5c3fe7f42ff8e9c0e0e76c2161117d8a994ef8300db5a22c18b1
7
- data.tar.gz: a7bdfbc8f96f72636ff0796e81ac94cbee93a606e27d2fed8c4654875644c6c6e63b276c02aaab8b5efed5d38dc95674579ff724398198394aebec20c968d471
6
+ metadata.gz: f05ee2aa96874c1e688ec4cd117c897a09cc718fb6b2f149bf3bc6ff9dfb3c949f64987368749e3636d04cfdaf1229a51a9ba6b2cf2adcbf0162afe71ad26f96
7
+ data.tar.gz: ffb03b24d52a46eae782fc205f4ba7c728d798ff01ea980244380e172c038b78a791df7cb0b3a415c1fdc7b520da429562040e5fbfee3ca6a87d54fcb1fcf677
data/README.md CHANGED
@@ -182,8 +182,57 @@ rake spec:clean["misc_items"]
182
182
 
183
183
  Once tests pass cleanly, subsquent runs that do not change the network requests run quickly since no network calls are made and in fact ```rake``` can be run with no issues.
184
184
 
185
- ## Version History
186
185
 
186
+ ## Migration
187
+
188
+ ### Migrating from 1.x to 2.x
189
+
190
+ 2.x was a major rewrite of the library that avoids using classes as Singletons. In addition, in 2.x the client facing interfaces have been greatly simplified.
191
+
192
+ ### Authentication
193
+
194
+ Instead of:
195
+ ```
196
+ Todoist::Util::Config.token = "my token"
197
+ ```
198
+
199
+ Use:
200
+
201
+ ```
202
+ @client = Todoist::Client.create_client_by_token("my token")
203
+ ```
204
+
205
+ ### Calling Services
206
+
207
+ Instead of:
208
+
209
+ ```
210
+ @manager = Todoist::Sync::Items.new
211
+ @manager.collection
212
+ ```
213
+
214
+ Use:
215
+ ```
216
+ @client.sync_items.collection
217
+ ```
218
+
219
+ ### Synchronization
220
+
221
+ Instead of:
222
+
223
+ ```
224
+ Todoist::Util::CommandSynchronizer.sync
225
+ ```
226
+
227
+ Use:
228
+
229
+ ```
230
+ @client.sync
231
+ ```
232
+
233
+
234
+ ## Version History
235
+ * 0.2.2: For some code paths, it seems OpenSSL does not get loaded. Added require 'openssl' to network helper
187
236
  * 0.2.1: Major refactoring of library to support implementations that require multi-user support in a concurrent environment (e.g. Rails app). The previous implementation relied heavily on class singletons. Internally, the code has been cleaned up significantly. Due to the scale of changes, 0.2.1 is not compatible 0.1.x versions of the library.
188
237
  * 0.1.3: Changed ```Todoist::Sync``` managers so that the update method uses a hash instead of an OpenStruct. The OpenStruct creates errors when an OpenStruct passed from a previous call is used. The hash helps the caller make fewer mistakes.
189
238
  * 0.1.2: Renamed method ```Todoist::Util::ParseHelper.make_objects_as_array``` to ```Todoist::Util::ParseHelper.make_objects_as_hash``` to reflect the fact that it was actually returning hashes. Added the aforementioned deleted method to return arrays and finally altered ```Todoist::Misc::Completed``` to return objects as arrays instead of hashes due to the fact that recurring completed items were being de-duped unintentionally and data was being lost as a result.
@@ -3,6 +3,7 @@ require "json"
3
3
  require "todoist/config"
4
4
  require 'net/http/post/multipart'
5
5
  require 'mimemagic'
6
+ require 'openssl'
6
7
 
7
8
  module Todoist
8
9
  module Util
@@ -1,3 +1,3 @@
1
1
  module Todoist
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: todoist-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Han Yuan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-04 00:00:00.000000000 Z
11
+ date: 2018-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -219,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  version: '0'
220
220
  requirements: []
221
221
  rubyforge_project:
222
- rubygems_version: 2.5.1
222
+ rubygems_version: 2.5.2.1
223
223
  signing_key:
224
224
  specification_version: 4
225
225
  summary: This gem provides access to the latest Todoist API.