hackpad-cli 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +1 -1
- data/CHANGELOG.md +6 -11
- data/README.md +7 -6
- data/hackpad-cli.gemspec +3 -3
- data/spec/lib/hackpad/cli/api_spec.rb +3 -13
- data/spec/spec_helper.rb +3 -1
- metadata +11 -12
- data/.ruby-gemset +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4a83d94260eb05732f7d05f63aabc77504339d7
|
4
|
+
data.tar.gz: 676ad7cd1fa246587e1d26d337de12b2c705c8b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 693058430d5da5425c1a987705a2b9988b789aeab066734570bcaca50df67b983c54aa46de7d9cdd0987ba9a8e0e3f74a89c9dce5349612447368dac691159d5
|
7
|
+
data.tar.gz: 6c1f624bc580e1254bd212e76943a0f004bf2ae4cf544a8ca2ae89d442b2e03da39143a6a9e2ae0995ec8638344b543dbf318db40f570a245121540a64884314
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.3
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,15 +1,19 @@
|
|
1
1
|
Hackpad-cli changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
-
v0.1.
|
4
|
+
v0.1.4 - 2015-11-20
|
5
5
|
-------------------
|
6
|
+
- update dependencies with new version of reverse_markdown
|
7
|
+
and few other deps update
|
6
8
|
|
9
|
+
v0.1.3 - 2015-07-24
|
10
|
+
-------------------
|
11
|
+
- fix a 500 case in get api calls
|
7
12
|
- add command `add` for adding a new workspace
|
8
13
|
- refactor config management and move code to the configstruct gem
|
9
14
|
|
10
15
|
v0.1.2 - 2014-05-27
|
11
16
|
-------------------
|
12
|
-
|
13
17
|
- improve markdown cleanup:
|
14
18
|
- transform isolated bold in h3
|
15
19
|
- remove parasite lines in list that are left by non-displayed comments
|
@@ -17,7 +21,6 @@ v0.1.2 - 2014-05-27
|
|
17
21
|
|
18
22
|
v0.1.1 - 2014-05-25
|
19
23
|
-------------------
|
20
|
-
|
21
24
|
- add a `default` command to switch workspaces
|
22
25
|
- renamed `check` into `getnew` to make it clearer what it does
|
23
26
|
- switch from colorize to paint gems (monkey patch of colorize was itchy)
|
@@ -27,7 +30,6 @@ v0.1.1 - 2014-05-25
|
|
27
30
|
|
28
31
|
v0.1.0 - 2014-05-17
|
29
32
|
-------------------
|
30
|
-
|
31
33
|
- add a `stats` command to show how much pads are cached, and when it was last refreshed
|
32
34
|
- move `-r` (refresh) and `-u` (urls) options to specific method options
|
33
35
|
- add a User-Agent so that hackpad knows what is poking them
|
@@ -37,7 +39,6 @@ v0.1.0 - 2014-05-17
|
|
37
39
|
|
38
40
|
v0.0.7 - 2014-05-15
|
39
41
|
-------------------
|
40
|
-
|
41
42
|
- add a `cached_at` value in metadata, visible in the `show` command
|
42
43
|
- fix `info` to display guest policy properly
|
43
44
|
- add a `check` command to check if there are new pads and decide to refresh or not
|
@@ -45,12 +46,10 @@ v0.0.7 - 2014-05-15
|
|
45
46
|
|
46
47
|
v0.0.6 - 2014-05-04
|
47
48
|
-------------------
|
48
|
-
|
49
49
|
- fix compat with 1.9.3 (require ostruct)
|
50
50
|
|
51
51
|
v0.0.5 - 2014-05-04
|
52
52
|
-------------------
|
53
|
-
|
54
53
|
- add a dot-timer for when padlist refreshes so one knows that something is happening
|
55
54
|
- add an option `-u` to display urls rather than pad id
|
56
55
|
- add an option `-r` to force the refresh of the cache
|
@@ -60,13 +59,11 @@ v0.0.5 - 2014-05-04
|
|
60
59
|
|
61
60
|
v0.0.4 - 2014-05-01
|
62
61
|
-------------------
|
63
|
-
|
64
62
|
- add options in pad info for `hpcli info [pad_id]`
|
65
63
|
- implement a search command `hpcli search [term]`
|
66
64
|
|
67
65
|
v0.0.3 - 2014-05-01
|
68
66
|
-------------------
|
69
|
-
|
70
67
|
- add a better way to manage alternative configuration file
|
71
68
|
- fix alternate config dir setup
|
72
69
|
- verify compat with ruby 1.9.3
|
@@ -74,10 +71,8 @@ v0.0.3 - 2014-05-01
|
|
74
71
|
|
75
72
|
v0.0.2 - 2014-05-01
|
76
73
|
-------------------
|
77
|
-
|
78
74
|
- damn, forgot to remove awesome_print. huhu
|
79
75
|
|
80
76
|
v0.0.1 - 2014-05-01
|
81
77
|
-------------------
|
82
|
-
|
83
78
|
- initial release of a draft
|
data/README.md
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
Hackpad-Cli
|
2
2
|
===================
|
3
3
|
|
4
|
-
[![Gem Version](https://
|
5
|
-
[![
|
6
|
-
[![
|
7
|
-
[![
|
8
|
-
[![
|
4
|
+
[![Gem Version](https://img.shields.io/gem/v/hackpad-cli.svg)](http://rubygems.org/gems/hackpad-cli)
|
5
|
+
[![Downloads](http://img.shields.io/gem/dt/hackpad-cli.svg)](https://rubygems.org/gems/hackpad-cli)
|
6
|
+
[![Build Status](https://img.shields.io/travis/mose/hackpad-cli.svg)](https://travis-ci.org/mose/hackpad-cli)
|
7
|
+
[![Coverage Status](https://img.shields.io/coveralls/mose/hackpad-cli.svg)](https://coveralls.io/r/mose/hackpad-cli)
|
8
|
+
[![Dependency Status](https://img.shields.io/gemnasium/mose/hackpad-cli.svg)](https://gemnasium.com/mose/hackpad-cli)
|
9
|
+
[![Code Climate](https://img.shields.io/codeclimate/github/mose/hackpad-cli.svg)](https://codeclimate.com/github/mose/hackpad-cli)
|
9
10
|
|
10
11
|
----
|
11
12
|
|
12
13
|
This is a command-line utility to check and manipulate hackpad documents.
|
13
|
-
It uses Hackpad REST API 1.0 https://hackpad.com/fQD2DRz22Wf and was tested with ruby 1.9.3 and 2.
|
14
|
+
It uses Hackpad REST API 1.0 https://hackpad.com/fQD2DRz22Wf and was tested with ruby 1.9.3 and 2.2.3.
|
14
15
|
|
15
16
|
Initially this tool was created to overcome the frustration of the md export of pads,
|
16
17
|
because we need to copy them to other places sometimes. Proper markdown would be appreciated. It does that by transforming the html in markdown with the https://github.com/xijo/reverse_markdown gem, and applying some extra cleaning over it.
|
data/hackpad-cli.gemspec
CHANGED
@@ -18,11 +18,11 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ['lib']
|
19
19
|
|
20
20
|
spec.add_dependency 'thor'
|
21
|
-
spec.add_dependency 'configstruct', '~> 0.0
|
22
|
-
spec.add_dependency 'cliprompt', '~> 0.1.
|
21
|
+
spec.add_dependency 'configstruct', '~> 0.1.0'
|
22
|
+
spec.add_dependency 'cliprompt', '~> 0.1.2'
|
23
23
|
spec.add_dependency 'paint'
|
24
24
|
spec.add_dependency 'oauth'
|
25
|
-
spec.add_dependency 'reverse_markdown'
|
25
|
+
spec.add_dependency 'reverse_markdown', '~> 1.0.0'
|
26
26
|
|
27
27
|
spec.add_development_dependency 'bundler', '~> 1.5'
|
28
28
|
spec.add_development_dependency 'rake'
|
@@ -45,17 +45,17 @@ describe Hackpad::Cli::Api do
|
|
45
45
|
describe '.read' do
|
46
46
|
before { Hackpad::Cli::Api.prepare config }
|
47
47
|
context 'when we want html,' do
|
48
|
-
before { stub_request(:get, 'http://x.hackpad.com/api/1.0/pad/aaa/content.html')
|
48
|
+
before { stub_request(:get, 'http://x.hackpad.com/api/1.0/pad/aaa/content/latest.html')
|
49
49
|
.to_return(body: '<b>blah</b>', status: 200) }
|
50
50
|
it { expect(subject.read('aaa', 'html')).to eq('<b>blah</b>') }
|
51
51
|
end
|
52
52
|
context 'when we want txt,' do
|
53
|
-
before { stub_request(:get, 'http://x.hackpad.com/api/1.0/pad/aaa/content.txt')
|
53
|
+
before { stub_request(:get, 'http://x.hackpad.com/api/1.0/pad/aaa/content/latest.txt')
|
54
54
|
.to_return(body: 'blah', status: 200) }
|
55
55
|
it { expect(subject.read('aaa', 'txt')).to eq('blah') }
|
56
56
|
end
|
57
57
|
context 'when we want md,' do
|
58
|
-
before { stub_request(:get, 'http://x.hackpad.com/api/1.0/pad/aaa/content.html')
|
58
|
+
before { stub_request(:get, 'http://x.hackpad.com/api/1.0/pad/aaa/content/latest.html')
|
59
59
|
.to_return(body: '<b>blah</b>', status: 200) }
|
60
60
|
it { expect(subject.read('aaa', 'md')).to eq('**blah**') }
|
61
61
|
end
|
@@ -67,11 +67,6 @@ describe Hackpad::Cli::Api do
|
|
67
67
|
context 'when proper crendential are provided,' do
|
68
68
|
it 'all goes well' do
|
69
69
|
stub_request(:get, 'http://x.hackpad.com/api/1.0/xxx')
|
70
|
-
.with(headers: {
|
71
|
-
'Accept' => '*/*',
|
72
|
-
'Authorization' => /OAuth oauth_consumer_key="123"/,
|
73
|
-
'User-Agent' => /hackpad-cli v/
|
74
|
-
})
|
75
70
|
.to_return(status: 200, body: '{"some": "result"}')
|
76
71
|
expect(Hackpad::Cli::Api.get('/api/1.0/xxx')).to eq('some' => 'result')
|
77
72
|
end
|
@@ -79,11 +74,6 @@ describe Hackpad::Cli::Api do
|
|
79
74
|
context 'when api endpoint is not found' do
|
80
75
|
it 'throws an exception' do
|
81
76
|
stub_request(:get, 'http://x.hackpad.com/api/1.0/xxx')
|
82
|
-
.with(headers: {
|
83
|
-
'Accept' => '*/*',
|
84
|
-
'Authorization' => /OAuth oauth_consumer_key="123"/,
|
85
|
-
'User-Agent' => /hackpad-cli v/
|
86
|
-
})
|
87
77
|
.to_return(status: 404, body: '{"some": "result"}')
|
88
78
|
expect { Hackpad::Cli::Api.get('/api/1.0/xxx') }
|
89
79
|
.to raise_error(Hackpad::Cli::ApiException, 'HTTP error, code 404')
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hackpad-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mose
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.0
|
33
|
+
version: 0.1.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.0
|
40
|
+
version: 0.1.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: cliprompt
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.1.
|
47
|
+
version: 0.1.2
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.1.
|
54
|
+
version: 0.1.2
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: paint
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,16 +84,16 @@ dependencies:
|
|
84
84
|
name: reverse_markdown
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 1.0.0
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 1.0.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: bundler
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -189,7 +189,6 @@ files:
|
|
189
189
|
- ".coveralls.yml"
|
190
190
|
- ".gitignore"
|
191
191
|
- ".rubocop.yml"
|
192
|
-
- ".ruby-gemset"
|
193
192
|
- ".ruby-version"
|
194
193
|
- ".travis.yml"
|
195
194
|
- CHANGELOG.md
|
@@ -240,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
240
239
|
version: '0'
|
241
240
|
requirements: []
|
242
241
|
rubyforge_project:
|
243
|
-
rubygems_version: 2.4.
|
242
|
+
rubygems_version: 2.4.8
|
244
243
|
signing_key:
|
245
244
|
specification_version: 4
|
246
245
|
summary: CLI for hackpad browsing and editing.
|
data/.ruby-gemset
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
hpcli
|