duo_blog_comment 0.0.55 β†’ 0.0.59

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/duo_blog_comment.rb +54 -21
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 74797d9340de012e29c4ec005c642dc11b6bdedf395474b30de492194f75856f
4
- data.tar.gz: cd9dcee0497d103eab0fc6c7eb691c22c934401c0282c44a1df7ee0f4b719976
3
+ metadata.gz: 99ad31d996a770a68df57c8eada7650db342fed79b2fb33326854e2e34b368cd
4
+ data.tar.gz: d4012342e4a1d8588f1537676e4aa75387f787b045e92b89e7cc7e3e14e08770
5
5
  SHA512:
6
- metadata.gz: d3a7be6c6c079e1ed1288d59c7858a29cb373da393386f0dbda360ce8200f4bb352808da170fcbb31381d70672ce31f2f331e99e4a9bb74e2510bca728861f65
7
- data.tar.gz: 121e006dee89cb8346915dbaafc24bbbd5cf2a1c7f8ea19cbfc88c66ab4fcac205bd0245d84b6561bc6e3abf833a3c8f2205f9f382a77b2006fb95f36a05738e
6
+ metadata.gz: 3c5cd5a5b73cb054437002dbc1ccc9dfcfffebf900572bf3481f2f5f93dc69b2f9dfbc1edb6cd042382b4eb30e8c015aa6a32b16182fb7b3505a0ca82ecc2911
7
+ data.tar.gz: ad0ae0e546da4c367fa657ea7f8023f1c1287ec6a22224938be5dda77d9ed4192c138108d5e3cfc91eb5ecffd13f4c7e74f171ef6c83d3c2c98e2801e80e5fe9
@@ -1058,21 +1058,22 @@ class Naver
1058
1058
  else
1059
1059
  end
1060
1060
 
1061
- content_soon = 0
1062
- # πŸ’¬ content μ„€μ • (μ—¬κΈ° μΆ”κ°€!)
1063
- if @data['λ‚΄μš©μ„€μ •']['λ‚΄μš©'].nil? || @data['λ‚΄μš©μ„€μ •']['λ‚΄μš©'].empty?
1064
- content = ''
1065
- else
1066
- if @data.dig('λ‚΄μš©μ„€μ •', 'λžœλ€μ‚¬μš©')&.respond_to?(:checked?) && @data['λ‚΄μš©μ„€μ •']['λžœλ€μ‚¬μš©'].checked?
1067
- content = @data['λ‚΄μš©μ„€μ •']['λ‚΄μš©'].sample[2] # 랜덀 μ‚¬μš© μ‹œ
1061
+ if @data['ν¬μŠ€νŠΈμ„€μ •']['μˆœμ„œμ‚¬μš©2'].checked?
1062
+ @content_soon ||= 0 # 초기 ν•œ 번만 0으둜 μ„ΈνŒ…
1063
+
1064
+ if @data['λ‚΄μš©μ„€μ •']['λ‚΄μš©'].nil? || @data['λ‚΄μš©μ„€μ •']['λ‚΄μš©'].empty?
1065
+ content = ''
1068
1066
  else
1069
- content = @data['λ‚΄μš©μ„€μ •']['λ‚΄μš©'][content_soon][2] # 순차적으둜 μ‚¬μš©
1070
- content_soon += 1
1071
- if content_soon >= @data['λ‚΄μš©μ„€μ •']['λ‚΄μš©'].length
1072
- content_soon = 0
1067
+ if @data.dig('λ‚΄μš©μ„€μ •', 'λžœλ€μ‚¬μš©')&.respond_to?(:checked?) && @data['λ‚΄μš©μ„€μ •']['λžœλ€μ‚¬μš©'].checked?
1068
+ content = @data['λ‚΄μš©μ„€μ •']['λ‚΄μš©'].sample[2]
1069
+ else
1070
+ content = @data['λ‚΄μš©μ„€μ •']['λ‚΄μš©'][@content_soon][2]
1071
+ @content_soon += 1
1072
+ @content_soon = 0 if @content_soon >= @data['λ‚΄μš©μ„€μ •']['λ‚΄μš©'].length
1073
1073
  end
1074
1074
  end
1075
- end
1075
+ else
1076
+ end
1076
1077
 
1077
1078
  # λ””μ—  μžλ™ 변경이 체크된 경우 contentλ₯Ό λ³€ν™˜
1078
1079
  if @data['ν¬μŠ€νŠΈμ„€μ •']['λ‚΄μš©μžλ™λ³€κ²½'].checked?
@@ -1091,14 +1092,25 @@ class Naver
1091
1092
  begin #λŒ“κΈ€ μž‘μ—… >> μ‹œμž‘
1092
1093
  # λŒ“κΈ€ μ“°κΈ° λ²„νŠΌ 클릭
1093
1094
  begin
1094
- element = @driver.find_element(:xpath, '//*[@class="area_comment pcol2"]')
1095
- @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", element) # 크둀 이동
1096
- sleep(1)
1097
- @driver.find_element(:xpath, '//*[@class="area_comment pcol2"]').click
1098
- sleep(1)
1099
- rescue => e
1100
- puts "λŒ“κΈ€ μž‘μ„± ν•„λ“œκ°€ 쑴재 ν•˜μ§€μ•ŠμŠ΅λ‹ˆλ‹€."
1101
-
1095
+ wait = Selenium::WebDriver::Wait.new(:timeout => 3)
1096
+ wait.until { @driver.find_element(:xpath, '//*[@class="area_comment pcol2"]') }
1097
+ element = @driver.find_element(:xpath, '//*[@class="area_comment pcol2"]')
1098
+ @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", element) # 크둀 이동
1099
+ sleep(1)
1100
+ @driver.find_element(:xpath, '//*[@class="area_comment pcol2"]').click
1101
+ sleep(1)
1102
+ rescue
1103
+ begin
1104
+ wait = Selenium::WebDriver::Wait.new(:timeout => 3)
1105
+ wait.until { @driver.find_element(xpath: "//span[@class='btn_arr']//span[@class='blind']") }
1106
+ element = @driver.find_element(xpath: "//span[@class='btn_arr']//span[@class='blind']")
1107
+ @driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", element) # 크둀 이동
1108
+ sleep(1)
1109
+ @driver.find_element(xpath: "//span[@class='btn_arr']//span[@class='blind']").click
1110
+ sleep(1)
1111
+ rescue => e
1112
+ puts "λŒ“κΈ€ μž‘μ„± ν•„λ“œκ°€ 쑴재 ν•˜μ§€μ•ŠμŠ΅λ‹ˆλ‹€."
1113
+ end
1102
1114
  end
1103
1115
 
1104
1116
  if option['λŒ“κΈ€νŒ¨μŠ€'] == 'true'
@@ -1761,6 +1773,16 @@ class Wordpress
1761
1773
  @data['table'] << []
1762
1774
  @data['table'].pop
1763
1775
 
1776
+
1777
+ if @data['ν¬μŠ€νŠΈμ„€μ •']['μˆœμ„œμ‚¬μš©2'].checked?
1778
+ option['μˆœμ„œμ‚¬μš©2'] = 'true'
1779
+ else
1780
+ option['μˆœμ„œμ‚¬μš©2'] = 'false'
1781
+ end
1782
+ @data['table'][index][-1] = 35
1783
+ @data['table'] << []
1784
+ @data['table'].pop
1785
+
1764
1786
 
1765
1787
 
1766
1788
  #λ„€μ΄λ²„λ‘œκ·ΈμΈ
@@ -2963,11 +2985,21 @@ class Wordpress
2963
2985
 
2964
2986
  horizontal_box{
2965
2987
  stretchy false
2966
- @data['λ‚΄μš©μ„€μ •']['μˆœμ„œμ‚¬μš©'] = checkbox('μˆœμ„œμ‚¬μš©'){
2988
+ @data['λ‚΄μš©μ„€μ •']['μˆœμ„œμ‚¬μš©'] = checkbox('κ³„μ •λ§ˆλ‹€ μˆœμ„œμ‚¬μš©'){
2967
2989
  stretchy false
2968
2990
  on_toggled{ |c|
2969
2991
  if c.checked?
2970
2992
  @data['λ‚΄μš©μ„€μ •']['λžœλ€μ‚¬μš©'].checked = false
2993
+ @data['ν¬μŠ€νŠΈμ„€μ •']['μˆœμ„œμ‚¬μš©2'].checked = false
2994
+ end
2995
+ }
2996
+ }
2997
+ @data['ν¬μŠ€νŠΈμ„€μ •']['μˆœμ„œμ‚¬μš©2'] = checkbox('κ²Œμ‹œκΈ€λ§ˆλ‹€ μˆœμ„œμ‚¬μš©'){
2998
+ stretchy false
2999
+ on_toggled{ |c|
3000
+ if c.checked?
3001
+ @data['λ‚΄μš©μ„€μ •']['λžœλ€μ‚¬μš©'].checked = false
3002
+ @data['λ‚΄μš©μ„€μ •']['μˆœμ„œμ‚¬μš©'].checked = false
2971
3003
  end
2972
3004
  }
2973
3005
  }
@@ -2976,6 +3008,7 @@ class Wordpress
2976
3008
  on_toggled{ |c|
2977
3009
  if c.checked?
2978
3010
  @data['λ‚΄μš©μ„€μ •']['μˆœμ„œμ‚¬μš©'].checked = false
3011
+ @data['ν¬μŠ€νŠΈμ„€μ •']['μˆœμ„œμ‚¬μš©2'].checked = false
2979
3012
  end
2980
3013
  }
2981
3014
  }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duo_blog_comment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.55
4
+ version: 0.0.59
5
5
  platform: ruby
6
6
  authors:
7
7
  - zon
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-06-19 00:00:00.000000000 Z
10
+ date: 2025-06-27 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: File to Clipboard gem
13
13
  email: mymin26@naver.com