ayadn 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile +3 -3
- data/MANUAL.md +1 -8
- data/README.md +5 -4
- data/lib/ayadn/action.rb +17 -10
- data/lib/ayadn/endpoints.rb +1 -1
- data/lib/ayadn/post.rb +27 -26
- data/lib/ayadn/status.rb +3 -3
- data/lib/ayadn/version.rb +1 -1
- data/lib/ayadn.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e18bb04ce138e330fd86117c3421493d601f071
|
4
|
+
data.tar.gz: 791e8592572655c87fe2dc325485258941a685c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b26d049c720a75eda60b63476043158f881d80228d761a6795865ee21d8da93e15fcd20498da728712b624a54a42fb3ca3cedd0fc5ca0c1d9e3a3fe5409f4d1
|
7
|
+
data.tar.gz: 48838c2c978e31f86db3124e4f533a8255cafd731945a932f845b542a0c184b9157c4b10b4172d113ec6ab9dfdf758e7bc50efaaf2594156d12bd10b0077a19d
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# 1.0.7
|
2
|
+
|
3
|
+
- Machine-only messages in channels are now viewable
|
4
|
+
- Don't output "Downloading" if options = raw in messages view
|
5
|
+
- Alert message instead of crash when an alias is undefined
|
6
|
+
- Removed username in front of ">>" in Auto (in case the authd user changed)
|
7
|
+
- Compatibility with Windows is broken
|
8
|
+
|
1
9
|
# 1.0.6
|
2
10
|
|
3
11
|
- Fixed a bug where post_max_chars was displayed instead of message_max_chars
|
data/Gemfile
CHANGED
@@ -8,9 +8,9 @@ group :test do
|
|
8
8
|
gem 'coveralls', require: false
|
9
9
|
end
|
10
10
|
|
11
|
-
platforms :mswin, :mingw do
|
12
|
-
|
13
|
-
end
|
11
|
+
# platforms :mswin, :mingw do
|
12
|
+
# gem "win32console", ">= 1.3.2"
|
13
|
+
# end
|
14
14
|
|
15
15
|
# Specify your gem's dependencies in ayadn.gemspec
|
16
16
|
gemspec
|
data/MANUAL.md
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
- [RUBY](#ruby)
|
3
3
|
- [AYADN](#ayadn)
|
4
4
|
- [OS X, LINUX, BSD](#os-x-linux-bsd)
|
5
|
-
- [WINDOWS](#windows)
|
6
5
|
- [FIRST STEPS](#first-steps)
|
7
6
|
- [AUTHORIZE](#authorize)
|
8
7
|
- [HELP](#help)
|
@@ -100,13 +99,7 @@ Update:
|
|
100
99
|
|
101
100
|
Please use something like RVM or RBENV to install Ruby if necessary.
|
102
101
|
|
103
|
-
You can also use the Ruby shipped with your system but it's not ideal, as it will probably require root privileges or using the 'sudo' command.
|
104
|
-
|
105
|
-
### WINDOWS
|
106
|
-
|
107
|
-
You have to run one more command:
|
108
|
-
|
109
|
-
`gem install win32console -v 1.3.2`
|
102
|
+
You can also use the Ruby shipped with your system but it's not ideal, as it will probably require root privileges or using the 'sudo' command.
|
110
103
|
|
111
104
|
# FIRST STEPS
|
112
105
|
|
data/README.md
CHANGED
@@ -41,16 +41,17 @@ Please use something like RVM or RBENV to install Ruby if necessary.
|
|
41
41
|
|
42
42
|
You can also use the Ruby shipped with your system but you shouldn't, as it would require root privileges.
|
43
43
|
|
44
|
-
###
|
44
|
+
### OTHER PLATFORMS
|
45
45
|
|
46
|
-
|
46
|
+
Ayadn 1.0.x isn't compatible with Windows: there's too many issues due to external Gems and POSIX-dependant tools.
|
47
47
|
|
48
|
-
|
48
|
+
That may change in the future...
|
49
49
|
|
50
50
|
### ALPHA-BETA-PRE
|
51
51
|
|
52
|
+
This is only necessary if you installed a pre-1.0 testing version:
|
53
|
+
|
52
54
|
Users of alpha, beta or pre-release versions should first uninstall the old versions with `gem uninstall ayadn` then run `ayadn set defaults` after installing version 1.0 (note that this will replace the config file contents).
|
53
|
-
This is only necessary if you installed a pre-1.0 testing version.
|
54
55
|
|
55
56
|
# DOCUMENTATION
|
56
57
|
|
data/lib/ayadn/action.rb
CHANGED
@@ -607,7 +607,7 @@ module Ayadn
|
|
607
607
|
def messages(channel_id, options)
|
608
608
|
begin
|
609
609
|
channel_id = get_channel_id_from_alias(channel_id)
|
610
|
-
doing
|
610
|
+
doing(options)
|
611
611
|
resp = @api.get_messages(channel_id, options)
|
612
612
|
(no_new_posts unless Databases.has_new?(resp, "channel:#{channel_id}")) if options[:new]
|
613
613
|
Databases.save_max_id(resp)
|
@@ -679,16 +679,17 @@ module Ayadn
|
|
679
679
|
@view.clear_screen
|
680
680
|
puts Status.auto
|
681
681
|
poster = Post.new
|
682
|
-
platform = Settings.config[:platform]
|
683
|
-
case platform
|
684
|
-
when /mswin|mingw|cygwin/
|
685
|
-
poster.auto_classic
|
686
|
-
else
|
682
|
+
# platform = Settings.config[:platform]
|
683
|
+
# case platform
|
684
|
+
# when /mswin|mingw|cygwin/
|
685
|
+
# poster.auto_classic
|
686
|
+
# else
|
687
687
|
require "readline"
|
688
688
|
poster.auto_readline
|
689
|
-
end
|
689
|
+
# end
|
690
690
|
rescue => e
|
691
|
-
Errors.global_error("action/auto post", [options, platform], e)
|
691
|
+
#Errors.global_error("action/auto post", [options, platform], e)
|
692
|
+
Errors.global_error("action/auto post", [options], e)
|
692
693
|
ensure
|
693
694
|
Databases.close_all
|
694
695
|
end
|
@@ -790,7 +791,7 @@ module Ayadn
|
|
790
791
|
|
791
792
|
def nowplaying
|
792
793
|
begin
|
793
|
-
abort(Status.error_only_osx) unless Settings.config[:platform] =~ /darwin/
|
794
|
+
#abort(Status.error_only_osx) unless Settings.config[:platform] =~ /darwin/
|
794
795
|
itunes = get_track_infos
|
795
796
|
itunes.each do |el|
|
796
797
|
abort(Status.empty_fields) if el.length == 0
|
@@ -1068,7 +1069,13 @@ module Ayadn
|
|
1068
1069
|
|
1069
1070
|
def get_channel_id_from_alias(channel_id)
|
1070
1071
|
unless channel_id.is_integer?
|
1071
|
-
|
1072
|
+
orig = channel_id
|
1073
|
+
channel_id = Databases.get_channel_id(orig)
|
1074
|
+
if channel_id.nil?
|
1075
|
+
Errors.warn("Alias '#{orig}' doesn't exist.")
|
1076
|
+
puts "\nThis alias doesn't exist.\n\n".color(:red)
|
1077
|
+
exit
|
1078
|
+
end
|
1072
1079
|
end
|
1073
1080
|
channel_id
|
1074
1081
|
end
|
data/lib/ayadn/endpoints.rb
CHANGED
@@ -210,7 +210,7 @@ module Ayadn
|
|
210
210
|
end
|
211
211
|
|
212
212
|
def messages(channel_id, options)
|
213
|
-
"#{@channels_url}#{channel_id}/messages?access_token=#{Settings.user_token}#{API.build_query(options)}"
|
213
|
+
"#{@channels_url}#{channel_id}/messages?access_token=#{Settings.user_token}#{API.build_query(options)}&include_machine=1"
|
214
214
|
end
|
215
215
|
|
216
216
|
def ayadnlog
|
data/lib/ayadn/post.rb
CHANGED
@@ -10,33 +10,34 @@ module Ayadn
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def compose
|
13
|
-
case Settings.config[:platform]
|
14
|
-
when /mswin|mingw|cygwin/
|
15
|
-
post = classic
|
16
|
-
else
|
13
|
+
# case Settings.config[:platform]
|
14
|
+
# when /mswin|mingw|cygwin/
|
15
|
+
# post = classic
|
16
|
+
# else
|
17
17
|
require "readline"
|
18
18
|
post = readline
|
19
|
-
end
|
20
|
-
post
|
21
|
-
end
|
22
|
-
|
23
|
-
def auto_classic
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
end
|
19
|
+
# end
|
20
|
+
# post
|
21
|
+
end
|
22
|
+
|
23
|
+
# def auto_classic
|
24
|
+
# loop do
|
25
|
+
# begin
|
26
|
+
# print "#{Settings.config[:identity][:handle]} >> ".color(:red)
|
27
|
+
# t = STDIN.gets.chomp
|
28
|
+
# send_post(t)
|
29
|
+
# puts Status.done
|
30
|
+
# rescue Interrupt
|
31
|
+
# abort(Status.canceled)
|
32
|
+
# end
|
33
|
+
# end
|
34
|
+
# end
|
35
35
|
|
36
36
|
def auto_readline
|
37
37
|
loop do
|
38
38
|
begin
|
39
|
-
while buffer = Readline.readline("#{Settings.config[:identity][:handle]} >> ".color(:red))
|
39
|
+
#while buffer = Readline.readline("#{Settings.config[:identity][:handle]} >> ".color(:red))
|
40
|
+
while buffer = Readline.readline(">> ".color(:red))
|
40
41
|
send_post(buffer)
|
41
42
|
puts Status.done
|
42
43
|
end
|
@@ -61,11 +62,11 @@ module Ayadn
|
|
61
62
|
post
|
62
63
|
end
|
63
64
|
|
64
|
-
def classic
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
end
|
65
|
+
# def classic
|
66
|
+
# puts Status.classic
|
67
|
+
# input_text = STDIN.gets.chomp
|
68
|
+
# [input_text]
|
69
|
+
# end
|
69
70
|
|
70
71
|
def reply(new_post, replied_to)
|
71
72
|
replied_to = replied_to.values[0]
|
data/lib/ayadn/status.rb
CHANGED
@@ -148,9 +148,9 @@ module Ayadn
|
|
148
148
|
def self.readline
|
149
149
|
"\nType your text. ".color(:cyan) + "[CTRL+D] ".color(:green) + "to validate, ".color(:cyan) + "[CTRL+C] ".color(:red) + "to cancel.\n\n".color(:cyan)
|
150
150
|
end
|
151
|
-
def self.classic
|
152
|
-
|
153
|
-
end
|
151
|
+
# def self.classic
|
152
|
+
# "\nType your text. ".color(:cyan) + "[ENTER] ".color(:green) + "to validate, ".color(:cyan) + "[CTRL+C] ".color(:red) + "to cancel.\n\n".color(:cyan)
|
153
|
+
# end
|
154
154
|
def self.reply
|
155
155
|
"\n#{Settings.config[:post_max_length]} ".color(:yellow) + "characters maximum. If the original post has mentions, you text will be inserted after the first one. Markdown links are supported.\n\n"
|
156
156
|
end
|
data/lib/ayadn/version.rb
CHANGED
data/lib/ayadn.rb
CHANGED
@@ -3,10 +3,10 @@ require_relative 'ayadn/version'
|
|
3
3
|
|
4
4
|
%w{rest_client json thor rainbow/ext/string terminal-table yaml logger daybreak fileutils io/console}.each { |r| require "#{r}" }
|
5
5
|
|
6
|
-
winPlatforms = ['mswin', 'mingw', 'mingw_18', 'mingw_19', 'mingw_20', 'mingw32']
|
7
|
-
case Gem::Platform.local.os
|
8
|
-
when *winPlatforms
|
9
|
-
|
10
|
-
end
|
6
|
+
# winPlatforms = ['mswin', 'mingw', 'mingw_18', 'mingw_19', 'mingw_20', 'mingw32']
|
7
|
+
# case Gem::Platform.local.os
|
8
|
+
# when *winPlatforms
|
9
|
+
# require 'win32console'
|
10
|
+
# end
|
11
11
|
|
12
12
|
require_relative 'ayadn/app'
|
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.0.
|
4
|
+
version: 1.0.7
|
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-04-
|
11
|
+
date: 2014-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|