pocket-ruby 0.0.7 → 0.0.8
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 +4 -4
- data/.github/workflows/changelog-checker.yml +19 -0
- data/.github/workflows/tests.yml +16 -0
- data/CHANGELOG.md +5 -0
- data/README.md +0 -10
- data/Rakefile +7 -3
- data/lib/pocket/api.rb +1 -1
- data/lib/pocket/configuration.rb +1 -1
- data/lib/pocket/oauth.rb +3 -3
- data/lib/pocket/version.rb +1 -1
- data/pocket-ruby.gemspec +3 -1
- data/test/pocket/version_test.rb +9 -0
- data/test/test_helper.rb +6 -0
- metadata +38 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 557b74f314ae6f79c561a58668abda58bd81a29a2f761179665937add4c44981
|
4
|
+
data.tar.gz: a9d7663dfefca438432ca578fac028a88e5e2e718dd1ce76f5b4a15c75a748b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9f4da13bca1a90085ce1292e44663a277fe78d1892053fea3c596694150d67aedf1d437d9305a8e435c3cd6a43a0f65beb771f4880f574352f3eb82ff5381bf
|
7
|
+
data.tar.gz: '0866d752ee21a843f6c91c0f46241baaf68ebcb4be49cf02b2591eb245a2342395a4520486fd2275efe3213c292c230599d96eed1e78271b3a6992079d522ba4'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
name: changelog-checker
|
2
|
+
on:
|
3
|
+
pull_request:
|
4
|
+
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
jobs:
|
8
|
+
build:
|
9
|
+
name: Check Actions
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v1
|
13
|
+
- name: Changelog check
|
14
|
+
uses: Zomzog/changelog-checker@v1.2.0
|
15
|
+
with:
|
16
|
+
fileName: CHANGELOG.md
|
17
|
+
checksNotification: Simple
|
18
|
+
env:
|
19
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on: [push,pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
steps:
|
9
|
+
- uses: actions/checkout@v2
|
10
|
+
- name: Set up Ruby
|
11
|
+
uses: ruby/setup-ruby@v1
|
12
|
+
with:
|
13
|
+
ruby-version: 2.6.6
|
14
|
+
bundler-cache: true
|
15
|
+
- name: Run the default task
|
16
|
+
run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.0.8] - 2021-03-31
|
4
|
+
|
5
|
+
- Fix Ruby warnings ([#32](https://github.com/turadg/pocket-ruby/pull/32))
|
6
|
+
- Remove unused Hashie dependency ([#31](https://github.com/turadg/pocket-ruby/pull/31))
|
7
|
+
|
3
8
|
## [0.0.7] - 2021-03-29
|
4
9
|
|
5
10
|
- Relax `faraday_middleware` version constraint ([#25](https://github.com/turadg/pocket-ruby/pull/25))
|
data/README.md
CHANGED
@@ -19,13 +19,3 @@ Just clone the repo here and refer to the demo-server.rb file for examples on ho
|
|
19
19
|
Pocket-Ruby can be installed via the gem, ```gem install pocket-ruby```
|
20
20
|
|
21
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'```
|
data/Rakefile
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
require 'bundler'
|
2
2
|
Bundler::GemHelper.install_tasks
|
3
3
|
|
4
|
-
require
|
5
|
-
|
4
|
+
require "rake/testtask"
|
5
|
+
Rake::TestTask.new(:test) do |t|
|
6
|
+
t.libs << "test"
|
7
|
+
t.libs << "lib"
|
8
|
+
t.test_files = FileList["test/**/*_test.rb"]
|
9
|
+
end
|
6
10
|
|
7
|
-
task :default => :
|
11
|
+
task :default => :test
|
8
12
|
|
9
13
|
namespace :doc do
|
10
14
|
begin
|
data/lib/pocket/api.rb
CHANGED
data/lib/pocket/configuration.rb
CHANGED
@@ -53,7 +53,7 @@ module Pocket
|
|
53
53
|
DEFAULT_USER_AGENT = "Pocket Ruby Gem #{Pocket::VERSION}".freeze
|
54
54
|
|
55
55
|
# @private
|
56
|
-
attr_accessor
|
56
|
+
attr_accessor(*VALID_OPTIONS_KEYS)
|
57
57
|
|
58
58
|
# When this module is extended, set all configuration options to their default values
|
59
59
|
def self.extended(base)
|
data/lib/pocket/oauth.rb
CHANGED
@@ -15,7 +15,7 @@ module Pocket
|
|
15
15
|
params = access_token_params.merge(options)
|
16
16
|
response = connection.post 'oauth/request', params
|
17
17
|
results = Hash[URI.decode_www_form(response.body)]
|
18
|
-
|
18
|
+
results['code']
|
19
19
|
end
|
20
20
|
|
21
21
|
# Return an access token from authorization
|
@@ -23,14 +23,14 @@ module Pocket
|
|
23
23
|
params = access_token_params.merge(:code => code).merge(options)
|
24
24
|
response = connection.post 'oauth/authorize', params
|
25
25
|
results = Hash[URI.decode_www_form(response.body)]
|
26
|
-
|
26
|
+
results['access_token']
|
27
27
|
end
|
28
28
|
|
29
29
|
# Return result from authorization
|
30
30
|
def get_result(code, options={})
|
31
31
|
params = access_token_params.merge(:code => code).merge(options)
|
32
32
|
response = connection.post 'oauth/authorize', params
|
33
|
-
|
33
|
+
Hash[URI.decode_www_form(response.body)]
|
34
34
|
end
|
35
35
|
|
36
36
|
private
|
data/lib/pocket/version.rb
CHANGED
data/pocket-ruby.gemspec
CHANGED
@@ -4,11 +4,13 @@ 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_development_dependency('rake')
|
8
|
+
s.add_development_dependency("test-unit")
|
7
9
|
s.add_runtime_dependency('faraday', ['>= 0.7'])
|
8
10
|
s.add_runtime_dependency('faraday_middleware')
|
9
11
|
s.add_runtime_dependency('multi_json', '>= 1.0.3', '~> 1.0')
|
10
12
|
s.add_runtime_dependency('hashie', '>= 0.4.0')
|
11
|
-
s.authors = ["Turadg Aleahmad","Jason Ng PT"]
|
13
|
+
s.authors = ["Turadg Aleahmad","Jason Ng PT", "Andy Waite"]
|
12
14
|
s.description = %q{A Ruby wrapper for the Pocket API v3 (Add, Modify and Retrieve)}
|
13
15
|
s.email = ['turadg@aleahmad.net',"me@jasonngpt.com"]
|
14
16
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
data/test/test_helper.rb
ADDED
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pocket-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Turadg Aleahmad
|
8
8
|
- Jason Ng PT
|
9
|
+
- Andy Waite
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2021-
|
13
|
+
date: 2021-04-01 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: sinatra
|
@@ -39,6 +40,34 @@ dependencies:
|
|
39
40
|
- - ">="
|
40
41
|
- !ruby/object:Gem::Version
|
41
42
|
version: '0'
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: rake
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0'
|
50
|
+
type: :development
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: test-unit
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
type: :development
|
65
|
+
prerelease: false
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
42
71
|
- !ruby/object:Gem::Dependency
|
43
72
|
name: faraday
|
44
73
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,6 +138,8 @@ executables: []
|
|
109
138
|
extensions: []
|
110
139
|
extra_rdoc_files: []
|
111
140
|
files:
|
141
|
+
- ".github/workflows/changelog-checker.yml"
|
142
|
+
- ".github/workflows/tests.yml"
|
112
143
|
- ".gitignore"
|
113
144
|
- ".yardopts"
|
114
145
|
- CHANGELOG.md
|
@@ -131,6 +162,8 @@ files:
|
|
131
162
|
- lib/pocket/oauth.rb
|
132
163
|
- lib/pocket/version.rb
|
133
164
|
- pocket-ruby.gemspec
|
165
|
+
- test/pocket/version_test.rb
|
166
|
+
- test/test_helper.rb
|
134
167
|
homepage: https://github.com/turadg/pocket-ruby
|
135
168
|
licenses: []
|
136
169
|
metadata: {}
|
@@ -153,4 +186,6 @@ rubygems_version: 3.0.3
|
|
153
186
|
signing_key:
|
154
187
|
specification_version: 4
|
155
188
|
summary: Ruby wrapper for the Pocket API v3
|
156
|
-
test_files:
|
189
|
+
test_files:
|
190
|
+
- test/pocket/version_test.rb
|
191
|
+
- test/test_helper.rb
|