ayadn 1.6.0 → 1.7.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/doc/05-streams.md +17 -0
- data/doc/06-post.md +41 -6
- data/lib/ayadn/action.rb +68 -123
- data/lib/ayadn/annotations.rb +191 -0
- data/lib/ayadn/app.rb +29 -5
- data/lib/ayadn/databases.rb +8 -2
- data/lib/ayadn/debug.rb +6 -6
- data/lib/ayadn/descriptions.rb +55 -2
- data/lib/ayadn/endpoints.rb +11 -3
- data/lib/ayadn/logs.rb +0 -17
- data/lib/ayadn/mark.rb +5 -2
- data/lib/ayadn/nowplaying.rb +17 -16
- data/lib/ayadn/nowwatching.rb +34 -9
- data/lib/ayadn/post.rb +46 -256
- data/lib/ayadn/scroll.rb +10 -8
- data/lib/ayadn/search.rb +2 -0
- data/lib/ayadn/set.rb +83 -198
- data/lib/ayadn/status.rb +3 -0
- data/lib/ayadn/stream.rb +27 -40
- data/lib/ayadn/tvshow.rb +8 -6
- data/lib/ayadn/version.rb +1 -1
- data/lib/ayadn/view.rb +8 -0
- data/lib/ayadn/workers.rb +41 -36
- data/spec/unit/post_spec.rb +19 -19
- metadata +3 -3
- data/doc/shortcuts.md +0 -8
data/spec/unit/post_spec.rb
CHANGED
@@ -51,33 +51,33 @@ describe Ayadn::Post do
|
|
51
51
|
before do
|
52
52
|
rest.stub(:post).and_return(File.read("spec/mock/posted.json"))
|
53
53
|
end
|
54
|
-
it "should raise an error if args are empty" do
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
end
|
54
|
+
# it "should raise an error if args are empty" do
|
55
|
+
# printed = capture_stdout do
|
56
|
+
# post.post([])
|
57
|
+
# end
|
58
|
+
# expect(printed).to include "You should provide some text."
|
59
|
+
# end
|
60
60
|
it "posts a post" do
|
61
61
|
expect(rest).to receive(:post).with("https://api.app.net/posts/?include_annotations=1&access_token=XYZ", {"text"=>"YOLO", "entities"=>{"parse_markdown_links"=>true, "parse_links"=>true}, "annotations"=>[{"type"=>"com.ayadn.user", "value"=>{"+net.app.core.user"=>{"user_id"=>"@test", "format"=>"basic"}}}, {"type"=>"com.ayadn.client", "value"=>{"url"=>"http://ayadn-app.net", "author"=>{"name"=>"Eric Dejonckheere", "username"=>"ericd", "id"=>"69904", "email"=>"eric@aya.io"}, "version"=>"wee"}}]})
|
62
|
-
x = post.post(
|
62
|
+
x = post.post({text: 'YOLO'})
|
63
63
|
end
|
64
64
|
it "returns the posted post" do
|
65
|
-
x = post.post(
|
65
|
+
x = post.post({text: 'whatever'})
|
66
66
|
expect(x['data']['text']).to eq 'TEST'
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
-
describe "#reply" do
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
end
|
70
|
+
# describe "#reply" do
|
71
|
+
# it "formats a reply" do
|
72
|
+
# new_post = "Hey guys!"
|
73
|
+
# replied_to = {1=>{:handle => "@test",:username => "test", :mentions => ["user1", "user2"]}}
|
74
|
+
# expect(post.reply(new_post, replied_to)).to eq "@test Hey guys! @user1 @user2"
|
75
|
+
# replied_to = {1=>{:handle => "@test",:username => "test", :mentions => ["user1", "test"]}}
|
76
|
+
# expect(post.reply(new_post, replied_to)).to eq "@test Hey guys! @user1"
|
77
|
+
# replied_to = {1=>{:handle => "@yo",:username => "test", :mentions => ["test", "lol"]}}
|
78
|
+
# expect(post.reply(new_post, replied_to)).to eq "@yo Hey guys! @lol"
|
79
|
+
# end
|
80
|
+
# end
|
81
81
|
|
82
82
|
describe "#text_is_empty?" do
|
83
83
|
it "checks if empty" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ayadn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Dejonckheere
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -261,10 +261,10 @@ files:
|
|
261
261
|
- doc/17-tvshow.md
|
262
262
|
- doc/18-contact.md
|
263
263
|
- doc/19-examples.md
|
264
|
-
- doc/shortcuts.md
|
265
264
|
- lib/ayadn.rb
|
266
265
|
- lib/ayadn/action.rb
|
267
266
|
- lib/ayadn/alias.rb
|
267
|
+
- lib/ayadn/annotations.rb
|
268
268
|
- lib/ayadn/api.rb
|
269
269
|
- lib/ayadn/app.rb
|
270
270
|
- lib/ayadn/authorize.rb
|
data/doc/shortcuts.md
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
# SHORTCUTS
|
2
|
-
|
3
|
-
Most examples will include the 'complete' command followed by the 'shortcut' command.
|
4
|
-
|
5
|
-
Of course, using Ayadn is much faster with the shortcut commands.
|
6
|
-
|
7
|
-
If you're like me, you'll even want to create aliases in bash/zsh or TextExpander snippets for the combinations of Ayadn commands and options you use the most...
|
8
|
-
|