milk_cap 0.5.0 → 0.5.1
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 +8 -8
- data/CHANGELOG.txt +5 -0
- data/README.rdoc +3 -8
- data/Rakefile +0 -1
- data/lib/milk_cap/rtm/base.rb +11 -6
- data/milk_cap.gemspec +3 -6
- metadata +1 -15
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
YTA1NGE1OTViOTc2NDBkMDdlNjY0ZDkxNjJlYjIxYzM4YzU3NGJiNQ==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
OTA0NmMxYjUxZjViY2FhZTUxMTViMDg0NDQ5YTlkZWVhNDQ2MjEwNQ==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
NmYwMWQ4MGQ5Y2QwMjE1NmE0MTFiOTM2OTY5OGQzMmYyMzE0OThjNzcxZjBl
|
|
10
|
+
Njg4ODgxZTE0NGMxZWUzYWNiZGQ2YzZjMTk3NDhlZjVjYjEwNGU3YTczOWEz
|
|
11
|
+
ZDIxZTk4MGQ1YTRlNzM2YzIyZGE5ZDQzODZhYTA3ZWFhNmQ0NjU=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
OGQzYzQ0ODMzMGIwODhhNjkwYWJmYmQ1ZTM4MGZmN2E0YzcyMDAyYThkZDM2
|
|
14
|
+
NjY5OWQxYzg4MDFkNzE2MzFkMDBjNDdlN2M2ZmI5YjY1ZDUyMGNiMDRhNDll
|
|
15
|
+
YTIwNGFhM2M3NGYzNjkyMWE2OTk5MjhlNWMyN2NmMmQ5ODYwNzU=
|
data/CHANGELOG.txt
CHANGED
data/README.rdoc
CHANGED
|
@@ -27,7 +27,7 @@ You have to apply for the first two ones at http://www.rememberthemilk.com/servi
|
|
|
27
27
|
Once you have the API key and the shared secret, you have to get the frob and the auth token. Fire your 'irb' and
|
|
28
28
|
|
|
29
29
|
>> require 'rubygems'
|
|
30
|
-
>> require 'milk_cap
|
|
30
|
+
>> require 'milk_cap'
|
|
31
31
|
|
|
32
32
|
please visit this URL with your browser and then hit 'enter' :
|
|
33
33
|
|
|
@@ -49,7 +49,7 @@ make then sure that all the 4 variables are set in the environment you use for r
|
|
|
49
49
|
== usage
|
|
50
50
|
|
|
51
51
|
require 'rubygems'
|
|
52
|
-
require 'milk_cap
|
|
52
|
+
require 'milk_cap'
|
|
53
53
|
|
|
54
54
|
include MilkCap::RTM
|
|
55
55
|
|
|
@@ -107,18 +107,13 @@ Note that the methods that change the state of the Remember The Milk dataset hav
|
|
|
107
107
|
Note as well that, there is a 1 second delay before any request to the RTM server, in order to respect their conditions. This may change in future releases.
|
|
108
108
|
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
== features yet to implement
|
|
111
111
|
|
|
112
112
|
* tags modifications
|
|
113
113
|
* smart lists
|
|
114
114
|
* ...
|
|
115
115
|
|
|
116
116
|
|
|
117
|
-
= dependencies
|
|
118
|
-
|
|
119
|
-
The gem 'rufus-verbs' (http://rufus.rubyforge.org/rufus-verbs)
|
|
120
|
-
|
|
121
|
-
|
|
122
117
|
== issue tracker
|
|
123
118
|
|
|
124
119
|
https://github.com/jleverenz/milk_cap/issues
|
data/Rakefile
CHANGED
data/lib/milk_cap/rtm/base.rb
CHANGED
|
@@ -20,9 +20,8 @@
|
|
|
20
20
|
# Made in Japan.
|
|
21
21
|
#++
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
require '
|
|
25
|
-
|
|
23
|
+
require 'cgi'
|
|
24
|
+
require 'net/http'
|
|
26
25
|
require 'json' # gem install 'json' or 'json_pure'
|
|
27
26
|
|
|
28
27
|
begin
|
|
@@ -46,7 +45,7 @@ end
|
|
|
46
45
|
module MilkCap
|
|
47
46
|
module RTM
|
|
48
47
|
|
|
49
|
-
VERSION = '0.5.
|
|
48
|
+
VERSION = '0.5.1'
|
|
50
49
|
|
|
51
50
|
AUTH_ENDPOINT = "http://www.rememberthemilk.com/services/auth/"
|
|
52
51
|
REST_ENDPOINT = "http://api.rememberthemilk.com/services/rest/"
|
|
@@ -89,9 +88,9 @@ module RTM
|
|
|
89
88
|
|
|
90
89
|
sign(ps, secret)
|
|
91
90
|
|
|
92
|
-
res =
|
|
91
|
+
res = get(endpoint, ps)
|
|
93
92
|
|
|
94
|
-
JSON.parse(res
|
|
93
|
+
JSON.parse(res)['rsp']
|
|
95
94
|
end
|
|
96
95
|
|
|
97
96
|
# Requests a timeline from RTM.
|
|
@@ -101,5 +100,11 @@ module RTM
|
|
|
101
100
|
milk(:method => 'rtm.timelines.create')['timeline']
|
|
102
101
|
end
|
|
103
102
|
|
|
103
|
+
def self.get(endpoint, hash)
|
|
104
|
+
query = hash.collect { |item| "#{item[0].to_s}=#{CGI.escape(item[1].to_s)}" }.join("&")
|
|
105
|
+
url = endpoint + '?' + query
|
|
106
|
+
Net::HTTP.get(URI.parse(url))
|
|
107
|
+
end
|
|
108
|
+
|
|
104
109
|
end
|
|
105
110
|
end
|
data/milk_cap.gemspec
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
|
-
# stub: milk_cap 0.5.
|
|
5
|
+
# stub: milk_cap 0.5.1 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "milk_cap"
|
|
9
|
-
s.version = "0.5.
|
|
9
|
+
s.version = "0.5.1"
|
|
10
10
|
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
12
12
|
s.authors = ["John Mettraux", "Jeff Leverenz"]
|
|
13
|
-
s.date = "2014-01-
|
|
13
|
+
s.date = "2014-01-03"
|
|
14
14
|
s.description = "\n Yet another RememberTheMilk wrapper, successor to rufus-rtm.\n "
|
|
15
15
|
s.email = "jeff.leverenz@gmail.com"
|
|
16
16
|
s.extra_rdoc_files = [
|
|
@@ -42,14 +42,11 @@ Gem::Specification.new do |s|
|
|
|
42
42
|
s.specification_version = 4
|
|
43
43
|
|
|
44
44
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
45
|
-
s.add_runtime_dependency(%q<rufus-verbs>, [">= 1.0.0"])
|
|
46
45
|
s.add_development_dependency(%q<yard>, [">= 0"])
|
|
47
46
|
else
|
|
48
|
-
s.add_dependency(%q<rufus-verbs>, [">= 1.0.0"])
|
|
49
47
|
s.add_dependency(%q<yard>, [">= 0"])
|
|
50
48
|
end
|
|
51
49
|
else
|
|
52
|
-
s.add_dependency(%q<rufus-verbs>, [">= 1.0.0"])
|
|
53
50
|
s.add_dependency(%q<yard>, [">= 0"])
|
|
54
51
|
end
|
|
55
52
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: milk_cap
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John Mettraux
|
|
@@ -11,20 +11,6 @@ bindir: bin
|
|
|
11
11
|
cert_chain: []
|
|
12
12
|
date: 2014-01-03 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
|
-
- !ruby/object:Gem::Dependency
|
|
15
|
-
name: rufus-verbs
|
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
requirements:
|
|
18
|
-
- - ! '>='
|
|
19
|
-
- !ruby/object:Gem::Version
|
|
20
|
-
version: 1.0.0
|
|
21
|
-
type: :runtime
|
|
22
|
-
prerelease: false
|
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
24
|
-
requirements:
|
|
25
|
-
- - ! '>='
|
|
26
|
-
- !ruby/object:Gem::Version
|
|
27
|
-
version: 1.0.0
|
|
28
14
|
- !ruby/object:Gem::Dependency
|
|
29
15
|
name: yard
|
|
30
16
|
requirement: !ruby/object:Gem::Requirement
|