pocket-ruby 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 53335fc2e8cc2960c4ad80eee2311f1dd97d177d
4
+ data.tar.gz: a0fa4e91812d0422654fa325405228302fe8c362
5
+ SHA512:
6
+ metadata.gz: 5e27da6ac0fc40eecf1624157e6c994667699c8c5b1de0d8bafa31c4fa93a3af46eca355dc43596b61b932475614f53cbc5f9f6149f800e8c3d4fcd88887030d
7
+ data.tar.gz: b8b9631b728ffa086d0516a9435297772f57f26294e77ffb5308817da3c5a0021ea1d2345f196ade04fdf8667f270a26d4a44ffff7b1daa7bc4fddfb994dcaec
data/README.md CHANGED
@@ -18,4 +18,14 @@ Just clone the repo here and refer to the demo-server.rb file for examples on ho
18
18
 
19
19
  Pocket-Ruby can be installed via the gem, ```gem install pocket-ruby```
20
20
 
21
- Or via bundler, ```gem 'pocket-ruby', '~> 0.0.5'```
21
+ Or via bundler, ```gem 'pocket-ruby'```
22
+
23
+ # For v0.0.5 and earlier
24
+
25
+ Using v0.0.5 and earlier may result in a ```require``` error. To fix this you may either update to a newer version of the gem or uninstall with ```gem uninstall pocket-ruby``` and try again using the method below:
26
+
27
+ Install via the gem, ```gem install pocket-ruby -v 0.0.5```
28
+
29
+ Or via bundler, ```gem 'pocket-ruby', '0.0.5', :require => 'pocket'```
30
+
31
+ Be sure to require the gem in your code with ```require 'pocket'``` not ```require 'pocket-ruby'```
@@ -23,4 +23,4 @@ module Pocket
23
23
  def self.respond_to?(method)
24
24
  return client.respond_to?(method) || super
25
25
  end
26
- end
26
+ end
@@ -10,6 +10,7 @@ module Pocket
10
10
  :consumer_key,
11
11
  :access_token,
12
12
  :endpoint,
13
+ :redirect_uri,
13
14
  :format,
14
15
  :user_agent,
15
16
  :proxy
@@ -77,9 +78,10 @@ module Pocket
77
78
  self.consumer_key = DEFAULT_CONSUMER_KEY
78
79
  self.access_token = DEFAULT_ACCESS_TOKEN
79
80
  self.endpoint = DEFAULT_ENDPOINT
81
+ self.redirect_uri = DEFAULT_REDIRECT_URI
80
82
  self.format = DEFAULT_FORMAT
81
83
  self.user_agent = DEFAULT_USER_AGENT
82
84
  self.proxy = DEFAULT_PROXY
83
85
  end
84
86
  end
85
- end
87
+ end
@@ -4,8 +4,9 @@ module Pocket
4
4
  # Return URL for OAuth authorization
5
5
  def authorize_url(options={})
6
6
  params = access_token_params.merge(options)
7
+ params.delete(:consumer_key) # shouldn't be exposed publically
7
8
  # Pocket renames `code` to `request_token` for some reason in this call
8
- params[:request_token] = params[:code]
9
+ params[:request_token] ||= params.delete(:code)
9
10
  connection.build_url("/auth/authorize", params).to_s
10
11
  end
11
12
 
@@ -19,8 +20,6 @@ module Pocket
19
20
 
20
21
  # Return an access token from authorization
21
22
  def get_access_token(code, options={})
22
- params = access_token_params.merge(options)
23
-
24
23
  params = access_token_params.merge(:code => code).merge(options)
25
24
  response = connection.post 'oauth/authorize', params
26
25
  results = Hash[URI.decode_www_form(response.body)]
@@ -29,8 +28,6 @@ module Pocket
29
28
 
30
29
  # Return result from authorization
31
30
  def get_result(code, options={})
32
- params = access_token_params.merge(options)
33
-
34
31
  params = access_token_params.merge(:code => code).merge(options)
35
32
  response = connection.post 'oauth/authorize', params
36
33
  results = Hash[URI.decode_www_form(response.body)]
@@ -40,7 +37,8 @@ module Pocket
40
37
 
41
38
  def access_token_params
42
39
  {
43
- :consumer_key => consumer_key
40
+ :consumer_key => consumer_key,
41
+ :redirect_uri => redirect_uri
44
42
  }
45
43
  end
46
44
  end
@@ -1,3 +1,3 @@
1
1
  module Pocket
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
@@ -4,8 +4,8 @@ require File.expand_path('../lib/pocket/version', __FILE__)
4
4
  Gem::Specification.new do |s|
5
5
  s.add_development_dependency('sinatra', '~> 1.3.3')
6
6
  s.add_development_dependency('multi_xml')
7
- s.add_runtime_dependency('faraday', ['>= 0.7', '< 0.9'])
8
- s.add_runtime_dependency('faraday_middleware', '~> 0.8')
7
+ s.add_runtime_dependency('faraday', ['>= 0.7'])
8
+ s.add_runtime_dependency('faraday_middleware', '~> 0.9')
9
9
  s.add_runtime_dependency('multi_json', '>= 1.0.3', '~> 1.0')
10
10
  s.add_runtime_dependency('hashie', '>= 0.4.0')
11
11
  s.authors = ["Turadg Aleahmad","Jason Ng PT"]
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pocket-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
5
- prerelease:
4
+ version: 0.0.6
6
5
  platform: ruby
7
6
  authors:
8
7
  - Turadg Aleahmad
@@ -10,114 +9,96 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2014-04-01 00:00:00.000000000 Z
12
+ date: 2015-02-18 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: sinatra
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ~>
18
+ - - "~>"
21
19
  - !ruby/object:Gem::Version
22
20
  version: 1.3.3
23
21
  type: :development
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ~>
25
+ - - "~>"
29
26
  - !ruby/object:Gem::Version
30
27
  version: 1.3.3
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: multi_xml
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ! '>='
32
+ - - ">="
37
33
  - !ruby/object:Gem::Version
38
34
  version: '0'
39
35
  type: :development
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ! '>='
39
+ - - ">="
45
40
  - !ruby/object:Gem::Version
46
41
  version: '0'
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: faraday
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - ! '>='
46
+ - - ">="
53
47
  - !ruby/object:Gem::Version
54
48
  version: '0.7'
55
- - - <
56
- - !ruby/object:Gem::Version
57
- version: '0.9'
58
49
  type: :runtime
59
50
  prerelease: false
60
51
  version_requirements: !ruby/object:Gem::Requirement
61
- none: false
62
52
  requirements:
63
- - - ! '>='
53
+ - - ">="
64
54
  - !ruby/object:Gem::Version
65
55
  version: '0.7'
66
- - - <
67
- - !ruby/object:Gem::Version
68
- version: '0.9'
69
56
  - !ruby/object:Gem::Dependency
70
57
  name: faraday_middleware
71
58
  requirement: !ruby/object:Gem::Requirement
72
- none: false
73
59
  requirements:
74
- - - ~>
60
+ - - "~>"
75
61
  - !ruby/object:Gem::Version
76
- version: '0.8'
62
+ version: '0.9'
77
63
  type: :runtime
78
64
  prerelease: false
79
65
  version_requirements: !ruby/object:Gem::Requirement
80
- none: false
81
66
  requirements:
82
- - - ~>
67
+ - - "~>"
83
68
  - !ruby/object:Gem::Version
84
- version: '0.8'
69
+ version: '0.9'
85
70
  - !ruby/object:Gem::Dependency
86
71
  name: multi_json
87
72
  requirement: !ruby/object:Gem::Requirement
88
- none: false
89
73
  requirements:
90
- - - ! '>='
74
+ - - ">="
91
75
  - !ruby/object:Gem::Version
92
76
  version: 1.0.3
93
- - - ~>
77
+ - - "~>"
94
78
  - !ruby/object:Gem::Version
95
79
  version: '1.0'
96
80
  type: :runtime
97
81
  prerelease: false
98
82
  version_requirements: !ruby/object:Gem::Requirement
99
- none: false
100
83
  requirements:
101
- - - ! '>='
84
+ - - ">="
102
85
  - !ruby/object:Gem::Version
103
86
  version: 1.0.3
104
- - - ~>
87
+ - - "~>"
105
88
  - !ruby/object:Gem::Version
106
89
  version: '1.0'
107
90
  - !ruby/object:Gem::Dependency
108
91
  name: hashie
109
92
  requirement: !ruby/object:Gem::Requirement
110
- none: false
111
93
  requirements:
112
- - - ! '>='
94
+ - - ">="
113
95
  - !ruby/object:Gem::Version
114
96
  version: 0.4.0
115
97
  type: :runtime
116
98
  prerelease: false
117
99
  version_requirements: !ruby/object:Gem::Requirement
118
- none: false
119
100
  requirements:
120
- - - ! '>='
101
+ - - ">="
121
102
  - !ruby/object:Gem::Version
122
103
  version: 0.4.0
123
104
  description: A Ruby wrapper for the Pocket API v3 (Add, Modify and Retrieve)
@@ -128,8 +109,8 @@ executables: []
128
109
  extensions: []
129
110
  extra_rdoc_files: []
130
111
  files:
131
- - .gitignore
132
- - .yardopts
112
+ - ".gitignore"
113
+ - ".yardopts"
133
114
  - Gemfile
134
115
  - LICENSE.md
135
116
  - README.md
@@ -137,7 +118,7 @@ files:
137
118
  - demo-server.rb
138
119
  - lib/faraday/pocket_oauth.rb
139
120
  - lib/faraday/raise_pocket_error.rb
140
- - lib/pocket.rb
121
+ - lib/pocket-ruby.rb
141
122
  - lib/pocket/api.rb
142
123
  - lib/pocket/client.rb
143
124
  - lib/pocket/client/add.rb
@@ -151,26 +132,25 @@ files:
151
132
  - pocket-ruby.gemspec
152
133
  homepage: https://github.com/turadg/pocket-ruby
153
134
  licenses: []
135
+ metadata: {}
154
136
  post_install_message:
155
137
  rdoc_options: []
156
138
  require_paths:
157
139
  - lib
158
140
  required_ruby_version: !ruby/object:Gem::Requirement
159
- none: false
160
141
  requirements:
161
- - - ! '>='
142
+ - - ">="
162
143
  - !ruby/object:Gem::Version
163
144
  version: '0'
164
145
  required_rubygems_version: !ruby/object:Gem::Requirement
165
- none: false
166
146
  requirements:
167
- - - ! '>='
147
+ - - ">="
168
148
  - !ruby/object:Gem::Version
169
149
  version: 1.3.6
170
150
  requirements: []
171
151
  rubyforge_project: pocket-ruby
172
- rubygems_version: 1.8.23
152
+ rubygems_version: 2.2.2
173
153
  signing_key:
174
- specification_version: 3
154
+ specification_version: 4
175
155
  summary: Ruby wrapper for the Pocket API v3
176
156
  test_files: []