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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 02a0cccf2fa086175db55a6fea0e5bdff7212108
4
- data.tar.gz: 3ca2e5ca712ed2c72dc81983f785d7ff2debe8b5
3
+ metadata.gz: 908fa1580b37baa5095a2f47c999d5b8f8d863fd
4
+ data.tar.gz: e1670cf15bc7cc7967b1f6f56ec39dd41781da4c
5
5
  SHA512:
6
- metadata.gz: 0ecb46003bc51d754efbbe0b06f11952267c9c0f68837c24813382e1df6674eef56bddb605b4ad4d70a6271dfe0ded668e1a1d1052061a3e5a07ac4f6e902c42
7
- data.tar.gz: eac8e64ac9316910d854e6dcacbc505b9a6caba55e32e8f7deda2d1a0926766d75f9c87f580f3d55e32a1b0322f6a2cfd341a12199d6657aec75d0d8900ba936
6
+ metadata.gz: 8120a8376d3e633531e7ec71863d787a6fbf5617672eaeda4230012f494e57d50860f50deafd91dbbb8a85a1d507321e4fc91d78e1f190bd15741ac6471e7525
7
+ data.tar.gz: 193b2cda0bd8844c9bc17bdf7c12cbde474e7c05d90b8778d52268c0984ed087b943b91d5c0e4093d07ecc986135dc6fb671d3537054c4201128ccf599ec8a5e
@@ -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
@@ -64,7 +64,10 @@ module Ayadn
64
64
  @type = @input["type"]
65
65
  @id = @input["id"]
66
66
  @counts = ChannelCountsObject.new(@input["counts"])
67
- @recent_message = @input["recent_message"].nil? ? nil : PostObject.new(@input["recent_message"])
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
@@ -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
 
@@ -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, :is_deleted, :channel_id
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
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Ayadn
3
- VERSION = "4.0.1"
3
+ VERSION = "4.0.2"
4
4
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ayadn
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Dejonckheere