ayadn 4.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/ayadn/action.rb +2 -1
- data/lib/ayadn/channel_object.rb +20 -17
- data/lib/ayadn/user_object.rb +29 -29
- data/lib/ayadn/version.rb +1 -1
- data/lib/ayadn/workers.rb +1 -0
- data/spec/mock/ayadn.sqlite +0 -0
- 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: 02a0cccf2fa086175db55a6fea0e5bdff7212108
|
4
|
+
data.tar.gz: 3ca2e5ca712ed2c72dc81983f785d7ff2debe8b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ecb46003bc51d754efbbe0b06f11952267c9c0f68837c24813382e1df6674eef56bddb605b4ad4d70a6271dfe0ded668e1a1d1052061a3e5a07ac4f6e902c42
|
7
|
+
data.tar.gz: eac8e64ac9316910d854e6dcacbc505b9a6caba55e32e8f7deda2d1a0926766d75f9c87f580f3d55e32a1b0322f6a2cfd341a12199d6657aec75d0d8900ba936
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
## 4.0- 2016-
|
1
|
+
## 4.0.1 - 2016-09-03 - 'Halt And Catch Fire'
|
2
|
+
|
3
|
+
- Fixed: crash when attempting to access a deleted channel
|
4
|
+
|
5
|
+
## 4.0 - 2016-05-01 - 'Mr. Robot'
|
2
6
|
|
3
7
|
- Fixed: when possible, unauthorizing a user keeps the current user logged
|
4
8
|
- Fixed: inconsistencies in the 'set' command
|
data/lib/ayadn/action.rb
CHANGED
@@ -399,7 +399,8 @@ module Ayadn
|
|
399
399
|
@view.downloading
|
400
400
|
resp = channels.call
|
401
401
|
@view.clear_screen
|
402
|
-
|
402
|
+
data = resp["data"]
|
403
|
+
channels = data.map { |ch| ChannelObject.new(ch) }
|
403
404
|
@view.show_channels(channels, options)
|
404
405
|
end
|
405
406
|
rescue => e
|
data/lib/ayadn/channel_object.rb
CHANGED
@@ -45,23 +45,26 @@ module Ayadn
|
|
45
45
|
attr_reader :input, :pagination_id, :is_inactive, :readers, :you_muted, :you_can_edit, :has_unread, :editors, :annotations, :recent_message_id, :writers, :you_subscribed, :owner, :type, :id, :counts, :recent_message
|
46
46
|
|
47
47
|
def initialize hash
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
48
|
+
@input = hash
|
49
|
+
@pagination_id = @input["pagination_id"]
|
50
|
+
@is_inactive = @input["is_inactive"]
|
51
|
+
@readers = ChannelReadersObject.new(@input["readers"])
|
52
|
+
@you_muted = @input["you_muted"]
|
53
|
+
@you_can_edit = @input["you_can_edit"]
|
54
|
+
@has_unread = @input["has_unread"]
|
55
|
+
@editors = ChannelEditorsObject.new(@input["editors"])
|
56
|
+
@annotations = @input["annotations"].map { |ann| PostAnnotationObject.new(ann) }
|
57
|
+
@recent_message_id = @input["recent_message_id"]
|
58
|
+
@writers = ChannelEditorsObject.new(@input["writers"])
|
59
|
+
@you_subscribed = @input["you_subscribed"]
|
60
|
+
if @input["owner"].nil?
|
61
|
+
return
|
62
|
+
end
|
63
|
+
@owner = UserObject.new(@input["owner"])
|
64
|
+
@type = @input["type"]
|
65
|
+
@id = @input["id"]
|
66
|
+
@counts = ChannelCountsObject.new(@input["counts"])
|
67
|
+
@recent_message = @input["recent_message"].nil? ? nil : PostObject.new(@input["recent_message"])
|
65
68
|
end
|
66
69
|
|
67
70
|
end
|
data/lib/ayadn/user_object.rb
CHANGED
@@ -82,35 +82,35 @@ module Ayadn
|
|
82
82
|
attr_accessor :input, :you_muted, :you_can_subscribe, :is_following, :is_follower, :timezone, :you_follow, :counts, :canonical_url, :id, :locale, :type, :annotations, :username, :avatar_image, :description, :is_muted, :follows_you, :you_can_follow, :name, :created_at, :you_blocked, :cover_image, :verified_domain, :meta
|
83
83
|
|
84
84
|
def initialize hash, username = nil
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
85
|
+
@input = hash['data'].nil? ? hash : hash['data']
|
86
|
+
@meta = UserMetaObject.new(hash, username)
|
87
|
+
@you_muted = @input["you_muted"]
|
88
|
+
@you_can_subscribe = @input["you_can_subscribe"]
|
89
|
+
@is_follower = @input["is_follower"]
|
90
|
+
@is_following = @input["is_following"]
|
91
|
+
@timezone = @input["timezone"]
|
92
|
+
@you_follow = @input["you_follow"]
|
93
|
+
@counts = UserCountsObject.new(@input) unless @input.empty?
|
94
|
+
@canonical_url = @input["canonical_url"]
|
95
|
+
@id = @input["id"]
|
96
|
+
@locale = @input["locale"]
|
97
|
+
@type = @input["type"]
|
98
|
+
if !@input["annotations"].nil?
|
99
|
+
@annotations = @input["annotations"].map { |hash| UserAnnotationObject.new(hash) }
|
100
|
+
else
|
101
|
+
@annotations = []
|
102
|
+
end
|
103
|
+
@username = @input["username"]
|
104
|
+
@avatar_image = AvatarImageObject.new(@input) unless @input.empty?
|
105
|
+
@description = UserDescriptionObject.new(@input) unless @input.empty?
|
106
|
+
@is_muted = @input["is_muted"]
|
107
|
+
@follows_you = @input["follows_you"]
|
108
|
+
@you_can_follow = @input["you_can_follow"]
|
109
|
+
@name = @input["name"].to_s.force_encoding("UTF-8")
|
110
|
+
@created_at = @input["created_at"]
|
111
|
+
@you_blocked = @input["you_blocked"]
|
112
|
+
@cover_image = CoverImageObject.new(@input) unless @input.empty?
|
113
|
+
@verified_domain = @input["verified_domain"]
|
114
114
|
end
|
115
115
|
end
|
116
116
|
end
|
data/lib/ayadn/version.rb
CHANGED
data/lib/ayadn/workers.rb
CHANGED
data/spec/mock/ayadn.sqlite
CHANGED
Binary file
|
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:
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Dejonckheere
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|