moocow 1.0.1 → 1.1.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.
- data/README.rdoc +2 -0
- data/bin/rtm +12 -6
- metadata +37 -13
data/README.rdoc
CHANGED
@@ -119,3 +119,5 @@ Will print out a hashdump of what RTM returns for this method.
|
|
119
119
|
* http://github.com/davetron5000/rtm - Source code
|
120
120
|
* http://davetron5000.github.com/rtm - Rubydoc
|
121
121
|
* http://www.rememberthemilk.com/services/api/methods/ - RTM API documentation
|
122
|
+
|
123
|
+
:include:rtm.rdoc
|
data/bin/rtm
CHANGED
@@ -9,6 +9,10 @@ require 'hash_array'
|
|
9
9
|
|
10
10
|
include GLI
|
11
11
|
|
12
|
+
desc 'Location of your API keys file'
|
13
|
+
default_value '~/.rtmapi.yaml'
|
14
|
+
flag 'keys-file'
|
15
|
+
|
12
16
|
arg_name 'method.call'
|
13
17
|
desc 'executes any RTM method. Do not include the "rtm." in the method name'
|
14
18
|
command :any do |c|
|
@@ -53,7 +57,7 @@ command :auth do |c|
|
|
53
57
|
end
|
54
58
|
end
|
55
59
|
|
56
|
-
desc 'Gets your token; do this only once and put it in your
|
60
|
+
desc 'Gets your token; do this only once and put it in your API keys file'
|
57
61
|
arg_name "frob"
|
58
62
|
command :token do |c|
|
59
63
|
c.action do |global_options,options,args|
|
@@ -87,11 +91,13 @@ end
|
|
87
91
|
|
88
92
|
pre do |global_options,command,options,args|
|
89
93
|
if !command.nil? && command.name != :help
|
94
|
+
keys_file = global_options[:'keys-file']
|
90
95
|
return_val = true
|
91
|
-
|
92
|
-
|
96
|
+
home_api = File.expand_path(keys_file)
|
97
|
+
if File.exists? home_api
|
98
|
+
api_info = File.open(home_api) { |file| YAML::load(file) }
|
93
99
|
if !(api_info[:api_key] && api_info[:secret])
|
94
|
-
puts "
|
100
|
+
$stderr.puts "#{keys-file} isn't complete"
|
95
101
|
return_val = false;
|
96
102
|
else
|
97
103
|
ep = RTM::Endpoint.new(api_info[:api_key],api_info[:secret])
|
@@ -99,8 +105,8 @@ pre do |global_options,command,options,args|
|
|
99
105
|
$rtm = RTM::RTM.new(ep)
|
100
106
|
end
|
101
107
|
else
|
102
|
-
puts "
|
103
|
-
File.open(
|
108
|
+
puts "#{keys_file} not found; this is a YAML hash of your API key, secret key, and token"
|
109
|
+
File.open(home_api,'w') { |file| YAML::dump({:api_key => 'your api key', :secret => 'your secret'},file); }
|
104
110
|
puts "it has been created for you with dummy values"
|
105
111
|
return_val = false
|
106
112
|
end
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moocow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 19
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 1
|
9
|
+
- 0
|
10
|
+
version: 1.1.0
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- David Copeland
|
@@ -9,29 +15,41 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date: 2011-
|
18
|
+
date: 2011-03-06 00:00:00 -05:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: httparty
|
17
|
-
|
18
|
-
|
19
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
20
26
|
requirements:
|
21
27
|
- - ">="
|
22
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 17
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 3
|
33
|
+
- 1
|
23
34
|
version: 0.3.1
|
24
|
-
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
25
37
|
- !ruby/object:Gem::Dependency
|
26
38
|
name: gli
|
27
|
-
|
28
|
-
|
29
|
-
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
30
42
|
requirements:
|
31
43
|
- - ">="
|
32
44
|
- !ruby/object:Gem::Version
|
45
|
+
hash: 17
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
- 1
|
49
|
+
- 5
|
33
50
|
version: 0.1.5
|
34
|
-
|
51
|
+
type: :runtime
|
52
|
+
version_requirements: *id002
|
35
53
|
description: Basic ruby client library for accessing Remember The Milk via their API
|
36
54
|
email: davidcopeland@naildrivin5.com
|
37
55
|
executables:
|
@@ -65,21 +83,27 @@ require_paths:
|
|
65
83
|
- ext
|
66
84
|
- lib
|
67
85
|
required_ruby_version: !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
68
87
|
requirements:
|
69
88
|
- - ">="
|
70
89
|
- !ruby/object:Gem::Version
|
90
|
+
hash: 3
|
91
|
+
segments:
|
92
|
+
- 0
|
71
93
|
version: "0"
|
72
|
-
version:
|
73
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
+
none: false
|
74
96
|
requirements:
|
75
97
|
- - ">="
|
76
98
|
- !ruby/object:Gem::Version
|
99
|
+
hash: 3
|
100
|
+
segments:
|
101
|
+
- 0
|
77
102
|
version: "0"
|
78
|
-
version:
|
79
103
|
requirements: []
|
80
104
|
|
81
105
|
rubyforge_project: moocow
|
82
|
-
rubygems_version: 1.
|
106
|
+
rubygems_version: 1.4.2
|
83
107
|
signing_key:
|
84
108
|
specification_version: 3
|
85
109
|
summary: Ruby Client Library for Remember The Milk
|