duo_cafe_comment 0.0.39 → 0.0.50
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/lib/duo_cafe_comment.rb +59 -32
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cabde427e0735c5601a9e4eb4b65f902f9142d77e98b0d9dd13df2219ef9510a
|
4
|
+
data.tar.gz: fe91ed61260c781797a8bea41bb1d969e7bbff944161bcbdfa9f5dc425dd47a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78dc732b8c047feb5a5a82340ee93785c8940b050edf580c6a90c807386a663eef1b7bd6756478750a5b6189e2797c045f377bc40289323af37f694e8b4fff4d
|
7
|
+
data.tar.gz: cf8d99978872ed86f7f8352ec0e552290505bb26bc994f575bec1ddcb8976085fcf00dbc8bcb3f0aea04ad982cb92779621b8651d9069fe6883ca0579391a8a4
|
data/lib/duo_cafe_comment.rb
CHANGED
@@ -493,19 +493,22 @@ class Naver
|
|
493
493
|
sleep(1)
|
494
494
|
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="cafe_main"]')) # 아이프레임 선택
|
495
495
|
|
496
|
-
@
|
496
|
+
if @data['포스트설정']['순서사용2'].checked?
|
497
|
+
@content_soon ||= 0 # 초기 한 번만 0으로 세팅
|
497
498
|
|
498
|
-
|
499
|
-
|
500
|
-
else
|
501
|
-
if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
|
502
|
-
content = @data['내용설정']['내용'].sample[2]
|
499
|
+
if @data['내용설정']['내용'].nil? || @data['내용설정']['내용'].empty?
|
500
|
+
content = ''
|
503
501
|
else
|
504
|
-
|
505
|
-
|
506
|
-
|
502
|
+
if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
|
503
|
+
content = @data['내용설정']['내용'].sample[2]
|
504
|
+
else
|
505
|
+
content = @data['내용설정']['내용'][@content_soon][2]
|
506
|
+
@content_soon += 1
|
507
|
+
@content_soon = 0 if @content_soon >= @data['내용설정']['내용'].length
|
508
|
+
end
|
507
509
|
end
|
508
|
-
|
510
|
+
else
|
511
|
+
end
|
509
512
|
|
510
513
|
# 디엠 자동 변경이 체크된 경우 content를 변환
|
511
514
|
if @data['포스트설정']['내용자동변경'].checked?
|
@@ -753,19 +756,22 @@ class Naver
|
|
753
756
|
sleep(1)
|
754
757
|
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="cafe_main"]')) # 아이프레임 선택
|
755
758
|
|
756
|
-
@
|
759
|
+
if @data['포스트설정']['순서사용2'].checked?
|
760
|
+
@content_soon ||= 0 # 초기 한 번만 0으로 세팅
|
757
761
|
|
758
|
-
|
759
|
-
|
760
|
-
else
|
761
|
-
if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
|
762
|
-
content = @data['내용설정']['내용'].sample[2]
|
762
|
+
if @data['내용설정']['내용'].nil? || @data['내용설정']['내용'].empty?
|
763
|
+
content = ''
|
763
764
|
else
|
764
|
-
|
765
|
-
|
766
|
-
|
765
|
+
if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
|
766
|
+
content = @data['내용설정']['내용'].sample[2]
|
767
|
+
else
|
768
|
+
content = @data['내용설정']['내용'][@content_soon][2]
|
769
|
+
@content_soon += 1
|
770
|
+
@content_soon = 0 if @content_soon >= @data['내용설정']['내용'].length
|
771
|
+
end
|
767
772
|
end
|
768
|
-
|
773
|
+
else
|
774
|
+
end
|
769
775
|
|
770
776
|
# 디엠 자동 변경이 체크된 경우 content를 변환
|
771
777
|
if @data['포스트설정']['내용자동변경'].checked?
|
@@ -1099,19 +1105,22 @@ class Naver
|
|
1099
1105
|
sleep(1)
|
1100
1106
|
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="cafe_main"]')) # 아이프레임 선택
|
1101
1107
|
|
1102
|
-
@
|
1108
|
+
if @data['포스트설정']['순서사용2'].checked?
|
1109
|
+
@content_soon ||= 0 # 초기 한 번만 0으로 세팅
|
1103
1110
|
|
1104
|
-
|
1105
|
-
|
1106
|
-
else
|
1107
|
-
if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
|
1108
|
-
content = @data['내용설정']['내용'].sample[2]
|
1111
|
+
if @data['내용설정']['내용'].nil? || @data['내용설정']['내용'].empty?
|
1112
|
+
content = ''
|
1109
1113
|
else
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1114
|
+
if @data.dig('내용설정', '랜덤사용')&.respond_to?(:checked?) && @data['내용설정']['랜덤사용'].checked?
|
1115
|
+
content = @data['내용설정']['내용'].sample[2]
|
1116
|
+
else
|
1117
|
+
content = @data['내용설정']['내용'][@content_soon][2]
|
1118
|
+
@content_soon += 1
|
1119
|
+
@content_soon = 0 if @content_soon >= @data['내용설정']['내용'].length
|
1120
|
+
end
|
1113
1121
|
end
|
1114
|
-
|
1122
|
+
else
|
1123
|
+
end
|
1115
1124
|
|
1116
1125
|
# 디엠 자동 변경이 체크된 경우 content를 변환
|
1117
1126
|
if @data['포스트설정']['내용자동변경'].checked?
|
@@ -1707,7 +1716,14 @@ end
|
|
1707
1716
|
@data['table'] << []
|
1708
1717
|
@data['table'].pop
|
1709
1718
|
|
1710
|
-
|
1719
|
+
if @data['포스트설정']['순서사용2'].checked?
|
1720
|
+
option['순서사용2'] = 'true'
|
1721
|
+
else
|
1722
|
+
option['순서사용2'] = 'false'
|
1723
|
+
end
|
1724
|
+
@data['table'][index][-1] = 35
|
1725
|
+
@data['table'] << []
|
1726
|
+
@data['table'].pop
|
1711
1727
|
|
1712
1728
|
#네이버로그인
|
1713
1729
|
login_check = naver.login(user_id, user_pw, option['proxy'])
|
@@ -2895,11 +2911,21 @@ end
|
|
2895
2911
|
|
2896
2912
|
horizontal_box{
|
2897
2913
|
stretchy false
|
2898
|
-
@data['내용설정']['순서사용'] = checkbox('순서사용'){
|
2914
|
+
@data['내용설정']['순서사용'] = checkbox('계정마다 순서사용'){
|
2915
|
+
stretchy false
|
2916
|
+
on_toggled{ |c|
|
2917
|
+
if c.checked?
|
2918
|
+
@data['내용설정']['랜덤사용'].checked = false
|
2919
|
+
@data['포스트설정']['순서사용2'].checked = false
|
2920
|
+
end
|
2921
|
+
}
|
2922
|
+
}
|
2923
|
+
@data['포스트설정']['순서사용2'] = checkbox('게시글마다 순서사용'){
|
2899
2924
|
stretchy false
|
2900
2925
|
on_toggled{ |c|
|
2901
2926
|
if c.checked?
|
2902
2927
|
@data['내용설정']['랜덤사용'].checked = false
|
2928
|
+
@data['내용설정']['순서사용'].checked = false
|
2903
2929
|
end
|
2904
2930
|
}
|
2905
2931
|
}
|
@@ -2908,6 +2934,7 @@ end
|
|
2908
2934
|
on_toggled{ |c|
|
2909
2935
|
if c.checked?
|
2910
2936
|
@data['내용설정']['순서사용'].checked = false
|
2937
|
+
@data['포스트설정']['순서사용2'].checked = false
|
2911
2938
|
end
|
2912
2939
|
}
|
2913
2940
|
}
|