ayadn 4.0.1 → 4.0.2
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 +5 -0
- data/lib/ayadn/channel_object.rb +4 -1
- data/lib/ayadn/diagnostics.rb +0 -28
- data/lib/ayadn/post_object.rb +1 -2
- data/lib/ayadn/version.rb +1 -1
- data/spec/mock/ayadn.sqlite +0 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 908fa1580b37baa5095a2f47c999d5b8f8d863fd
|
4
|
+
data.tar.gz: e1670cf15bc7cc7967b1f6f56ec39dd41781da4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8120a8376d3e633531e7ec71863d787a6fbf5617672eaeda4230012f494e57d50860f50deafd91dbbb8a85a1d507321e4fc91d78e1f190bd15741ac6471e7525
|
7
|
+
data.tar.gz: 193b2cda0bd8844c9bc17bdf7c12cbde474e7c05d90b8778d52268c0984ed087b943b91d5c0e4093d07ecc986135dc6fb671d3537054c4201128ccf599ec8a5e
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## 4.0.2 - 2016-09-03 - 'Defeated Sanity'
|
2
|
+
|
3
|
+
- Fixed: crash in configuration diagnostics when checking settings
|
4
|
+
- Fixed: crash when attempting to access a deleted channel message
|
5
|
+
|
1
6
|
## 4.0.1 - 2016-09-03 - 'Halt And Catch Fire'
|
2
7
|
|
3
8
|
- Fixed: crash when attempting to access a deleted channel
|
data/lib/ayadn/channel_object.rb
CHANGED
@@ -64,7 +64,10 @@ module Ayadn
|
|
64
64
|
@type = @input["type"]
|
65
65
|
@id = @input["id"]
|
66
66
|
@counts = ChannelCountsObject.new(@input["counts"])
|
67
|
-
|
67
|
+
if @input["recent_message"].blank? || @input["recent_message"]["is_deleted"]
|
68
|
+
return
|
69
|
+
end
|
70
|
+
@recent_message = PostObject.new(@input["recent_message"])
|
68
71
|
end
|
69
72
|
|
70
73
|
end
|
data/lib/ayadn/diagnostics.rb
CHANGED
@@ -344,34 +344,6 @@ module Ayadn
|
|
344
344
|
@status.say_error("active user has no config file")
|
345
345
|
else
|
346
346
|
@status.say_green(:found, "active user config file")
|
347
|
-
@status.say_header("difference default/current")
|
348
|
-
diff = Settings.defaults.deep_diff(config)
|
349
|
-
if diff.blank?
|
350
|
-
@status.say_green(:pass, "current user is using default values")
|
351
|
-
else
|
352
|
-
diff.each do |key, value|
|
353
|
-
skip if key == :movie || key == :tvshow # those are deprecated, not missing
|
354
|
-
if value.is_a?(Hash)
|
355
|
-
value.each do |inner_key, inner_value|
|
356
|
-
default = inner_value[0].nil? ? "none" : inner_value[0]
|
357
|
-
current = if inner_key == :deezer
|
358
|
-
inner_value[1].nil? ? "none" : inner_value[1][:code][0..10] + "..."
|
359
|
-
else
|
360
|
-
inner_value[1].nil? ? "none" : inner_value[1]
|
361
|
-
end
|
362
|
-
@status.say_green(:changed, "#{key}/#{inner_key} - Default: #{default}, Current: #{current}")
|
363
|
-
end
|
364
|
-
else
|
365
|
-
default = value[0].nil? ? "none" : value[0]
|
366
|
-
val = value[1]
|
367
|
-
if val.nil?
|
368
|
-
@status.say_red(:missing, "#{key} - Default: #{default}, Current: none")
|
369
|
-
else
|
370
|
-
@status.say_green(:changed, "#{key} - Default: #{default}, Current: #{val}")
|
371
|
-
end
|
372
|
-
end
|
373
|
-
end
|
374
|
-
end
|
375
347
|
end
|
376
348
|
end
|
377
349
|
|
data/lib/ayadn/post_object.rb
CHANGED
@@ -83,7 +83,7 @@ module Ayadn
|
|
83
83
|
|
84
84
|
class PostObject # also works for messages
|
85
85
|
|
86
|
-
attr_reader :input, :num_stars, :num_reposts, :num_replies, :text, :created_at, :id, :canonical_url, :machine_only, :you_reposted, :you_starred, :thread_id, :pagination_id, :source, :user, :annotations, :entities, :repost_of, :reply_to, :
|
86
|
+
attr_reader :input, :num_stars, :num_reposts, :num_replies, :text, :created_at, :id, :canonical_url, :machine_only, :you_reposted, :you_starred, :thread_id, :pagination_id, :source, :user, :annotations, :entities, :repost_of, :reply_to, :channel_id
|
87
87
|
attr_accessor :view
|
88
88
|
|
89
89
|
def initialize hash
|
@@ -110,7 +110,6 @@ module Ayadn
|
|
110
110
|
end
|
111
111
|
@repost_of = PostObject.new(@input["repost_of"]) if !@input["repost_of"].blank?
|
112
112
|
@reply_to = @input["reply_to"]
|
113
|
-
@is_deleted = @input["is_deleted"]
|
114
113
|
@channel_id = @input["channel_id"]
|
115
114
|
end
|
116
115
|
end
|
data/lib/ayadn/version.rb
CHANGED
data/spec/mock/ayadn.sqlite
CHANGED
Binary file
|