tumblr_autofixer 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a18737fe7b0fb91a113773ec90fbeda392143412
4
- data.tar.gz: 970f4f5303a3137a2df386d7615b290494d09ecc
3
+ metadata.gz: 2dc965b3871e2579c7bce04740856c529f770e9e
4
+ data.tar.gz: 2e8db8131862e98242a4992cb7039a22de0b831f
5
5
  SHA512:
6
- metadata.gz: c94e3ff20eab1b4d230b26fd90ffe419ff14344d2363b57b2216561ba4baaca3ecc95e63e36eb58b66da3ed5c3c8c4862647cc40efff3f12bf83251527e2659b
7
- data.tar.gz: 29217d34b0bb4157ef8bdff68368ec3b69724a472817bebe5a88651a71a420dc4511e670f2c514cd7a02968068bcd604d9e2460ea8f30ca576d5858c8a06d2a6
6
+ metadata.gz: a7994886283bf16acffcc4ee019210061f4c7601e53fea87775da79840ada2ebce745bc25c2e6f858dbfdc34405452e1010fd6a0b20cbf4e98d252b4d7b211bc
7
+ data.tar.gz: '0096975af9698b872ee57572590b879bf6d9198588c16a94a5e32130ed65004d4c69a26c29018efb050beca2def4dfa845adb9eca432f431ccae970ebc0890fd'
@@ -2,7 +2,7 @@ module DK
2
2
  class Idable
3
3
  def open_results(args)
4
4
  return unless args.include?('open')
5
- file = confile('needs_review.html')
5
+ file = confile('need_review.html')
6
6
  `open #{file}` && exit(0) if File.exist?(file)
7
7
  puts
8
8
  puts 'Error:'
@@ -7,7 +7,7 @@ module DK
7
7
  puts
8
8
  puts ' Commands:'
9
9
  puts ' help Show this menu.'
10
- puts ' show Open a webpage with the latest taf results.'
10
+ puts ' open Open a webpage with the latest taf results.'
11
11
  puts
12
12
  puts ' Options:'
13
13
  puts ' -s Simulate Run (no changes saved)'
@@ -70,8 +70,8 @@ module DK
70
70
 
71
71
  def post_image_code(post)
72
72
  # Alt Sizes (0 - 6) Large to Small
73
- photo = post.photos.first.alt_sizes[4].url
74
73
  count = post.photos.size
74
+ photo = count > 0 ? post.photos.first.alt_sizes[4].url : image_missing
75
75
  res = "<td><a target='_blank' href='#{link_to_edit(post)}'>"
76
76
  res += "<img src='#{photo}'>#{' (' + count.to_s + ')' if count > 1}</a></td>"
77
77
  res += "<td><p>#{bfrom(post)}</p></td>"
@@ -130,5 +130,9 @@ module DK
130
130
  )
131
131
  end
132
132
 
133
+ def image_missing
134
+ 'https://us-east-1.tchyn.io/snopes-production/uploads/2018/03/rating-false.png'
135
+ end
136
+
133
137
  end
134
138
  end
@@ -1,5 +1,5 @@
1
1
  module DK
2
2
  class Idable
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
  end
5
5
  end
@@ -3,17 +3,18 @@ require 'yaml/store'
3
3
  require 'sanitize'
4
4
  require 'fileutils'
5
5
  Dir[File.join(__dir__, 'autofixer', '**', '*.rb')].each {|file| require file }
6
- # require 'pry'
6
+ require 'pry'
7
7
 
8
8
  module DK
9
9
  class Idable
10
10
  C_LEN = 25
11
11
  ERROR_STRING = '**'
12
12
  def initialize(opts)
13
+ @config_dir = home_file('/config_md/taf/')
14
+
13
15
  check_for_command(ARGV, opts)
14
16
  extract_opts(opts)
15
17
 
16
- @config_dir = home_file('/config_md/taf/')
17
18
  @dk = DK::Client.new(dk_opts)
18
19
 
19
20
  # Ensure my latest config files are in place.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tumblr_autofixer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Meissa Dia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-26 00:00:00.000000000 Z
11
+ date: 2018-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tumblr_draftking