springnote_resources 0.6.1 → 0.6.5
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/History.txt +3 -0
- data/lib/exts/request_with_oauth.rb +2 -1
- data/lib/springnote/base.rb +1 -1
- data/lib/springnote/page.rb +6 -2
- data/lib/springnote_resources.rb +3 -2
- metadata +8 -4
data/History.txt
CHANGED
|
@@ -22,8 +22,9 @@ module RequestWithOauth
|
|
|
22
22
|
logger.debug "(request with oauth)" if logger
|
|
23
23
|
@http = http
|
|
24
24
|
|
|
25
|
-
req = create_http_request(method, path, arguments)
|
|
25
|
+
req = create_http_request(method, path, *arguments)
|
|
26
26
|
req.oauth! @http, oauth_configuration.consumer, oauth_configuration.token, :signature_method => 'HMAC-SHA1', :clobber_request => true
|
|
27
|
+
# logger.debug req.to_hash
|
|
27
28
|
|
|
28
29
|
@http.request(req)
|
|
29
30
|
end
|
data/lib/springnote/base.rb
CHANGED
data/lib/springnote/page.rb
CHANGED
|
@@ -10,10 +10,14 @@ class Springnote::Page < Springnote::Base
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def lock
|
|
13
|
-
@lock ||= Lock.find(:relation_is_part_of => self.id)
|
|
13
|
+
@lock ||= Springnote::Lock.find(:relation_is_part_of => self.id)
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def attachments
|
|
17
|
-
@attachments ||= Attachment.find(:all, :params => {:relation_is_part_of => self.id})
|
|
17
|
+
@attachments ||= Springnote::Attachment.find(:all, :params => {:relation_is_part_of => self.id})
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def comments
|
|
21
|
+
@comments ||= Springnote::Comment.find(:all, :params => {:relation_is_part_of => self.id})
|
|
18
22
|
end
|
|
19
23
|
end
|
data/lib/springnote_resources.rb
CHANGED
|
@@ -15,8 +15,8 @@ unless defined?(ActiveResource)
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
# extend activeresource
|
|
18
|
-
require 'exts/request_with_oauth'
|
|
19
18
|
require 'exts/common_parameters'
|
|
19
|
+
require 'exts/request_with_oauth'
|
|
20
20
|
require 'exts/active_resource_extension'
|
|
21
21
|
|
|
22
22
|
# Springnote's resources
|
|
@@ -24,9 +24,10 @@ require 'springnote/configuration'
|
|
|
24
24
|
require 'springnote/base'
|
|
25
25
|
require 'springnote/import_file'
|
|
26
26
|
|
|
27
|
-
require 'springnote/page'
|
|
28
27
|
require 'springnote/attachment'
|
|
29
28
|
require 'springnote/lock'
|
|
30
29
|
require 'springnote/revision'
|
|
30
|
+
require 'springnote/comment'
|
|
31
|
+
require 'springnote/page'
|
|
31
32
|
|
|
32
33
|
ActiveResource::Connection.oauth_configuration = Springnote::Base.configuration
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: springnote_resources
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bryan Kang
|
|
@@ -9,11 +9,12 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2008-
|
|
12
|
+
date: 2008-10-06 00:00:00 +09:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: activeresource
|
|
17
|
+
type: :runtime
|
|
17
18
|
version_requirement:
|
|
18
19
|
version_requirements: !ruby/object:Gem::Requirement
|
|
19
20
|
requirements:
|
|
@@ -23,6 +24,7 @@ dependencies:
|
|
|
23
24
|
version:
|
|
24
25
|
- !ruby/object:Gem::Dependency
|
|
25
26
|
name: ruby-hmac
|
|
27
|
+
type: :runtime
|
|
26
28
|
version_requirement:
|
|
27
29
|
version_requirements: !ruby/object:Gem::Requirement
|
|
28
30
|
requirements:
|
|
@@ -32,6 +34,7 @@ dependencies:
|
|
|
32
34
|
version:
|
|
33
35
|
- !ruby/object:Gem::Dependency
|
|
34
36
|
name: oauth
|
|
37
|
+
type: :runtime
|
|
35
38
|
version_requirement:
|
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
40
|
requirements:
|
|
@@ -41,12 +44,13 @@ dependencies:
|
|
|
41
44
|
version:
|
|
42
45
|
- !ruby/object:Gem::Dependency
|
|
43
46
|
name: hoe
|
|
47
|
+
type: :development
|
|
44
48
|
version_requirement:
|
|
45
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
46
50
|
requirements:
|
|
47
51
|
- - ">="
|
|
48
52
|
- !ruby/object:Gem::Version
|
|
49
|
-
version: 1.
|
|
53
|
+
version: 1.7.0
|
|
50
54
|
version:
|
|
51
55
|
description: "== DESCRIPTIONS: ActiveResource wrapper library for Springnote.com's REST API == REQUIREMENTS: * activesupport * activeresource * oauth * ruby-hmac"
|
|
52
56
|
email: byblue@gmail.com
|
|
@@ -104,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
104
108
|
requirements: []
|
|
105
109
|
|
|
106
110
|
rubyforge_project: springnote
|
|
107
|
-
rubygems_version: 1.
|
|
111
|
+
rubygems_version: 1.2.0
|
|
108
112
|
signing_key:
|
|
109
113
|
specification_version: 2
|
|
110
114
|
summary: ActiveResource wrapper library for Springnote.com's REST API
|