ayadn 1.6.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- printed = capture_stdout do
56
- post.post([])
57
- end
58
- expect(printed).to include "You should provide some text."
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(['YOLO'])
62
+ x = post.post({text: 'YOLO'})
63
63
  end
64
64
  it "returns the posted post" do
65
- x = post.post(['whatever'])
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
- 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
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.6.0
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-04 00:00:00.000000000 Z
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
-