cafe_basics_duo 0.0.20 → 0.0.23

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/cafe_basics_duo.rb +64 -54
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09c6ba48d9cdd6060be74a6f8c4a3035a327e71fa613fa0baf9ed2fefb415652'
4
- data.tar.gz: c8331a5baa52b241de005422ee14e2783f6d625942a5e8ad624f2a9b1b8133b0
3
+ metadata.gz: 60fc6a8609e1fd7b3c3f02cbf1ac21468e2077b222ddcfe9a5b5e6f34eb62892
4
+ data.tar.gz: 666b86b3216ea879af982daf61e0a2fd488d950654b1b1f8ab21b8c98279e67b
5
5
  SHA512:
6
- metadata.gz: 1a09ec016dd0ca898c4538b532e78349d3708930f86849a35373f3e53bec40dc5dd9257e06fd6b762f143f6d6aa84cfe029df30585e03ae6e08fd3f5e9a4ffb9
7
- data.tar.gz: 4c0d1e18e6e71d0a8ab1cfab5ff51d4b329a1fb6865abca6aeec9bb675098e436c323aa01a5727e78fc66330813434aa3942b3b9a38d72a8a10c3fbc0b64e93b
6
+ metadata.gz: e2072d52cd775ffc6883b1cc9f2bbe91d695d2e1b603ed3bcce4cfa33b56ce310cd8338d45d50754130811ed7609090d72f151ade87a4f756f19f9315ee2763e
7
+ data.tar.gz: 0b6ca7f3f56902fd9a48ecb53a96c24565b415aae16fcac5268c6f3dbbaaee592d3cd7e866942621d494a2d8fab8ba7a82be7689547f5a8cfcfbbaf934ec62d8
@@ -1247,11 +1247,11 @@ class Naver
1247
1247
  end
1248
1248
  end
1249
1249
  end
1250
- sleep(1)
1250
+ sleep(0.5)
1251
1251
  @driver.action.key_down(:end).key_up(:end).perform
1252
- sleep(1)
1252
+ sleep(0.5)
1253
1253
  @driver.action.key_down(:enter).key_up(:enter).perform
1254
- sleep(1)
1254
+ sleep(0.5)
1255
1255
  # if check_image == 0
1256
1256
  # if value_data['nodes'].length == 0
1257
1257
  # value_data['nodes'][0] = {
@@ -1349,90 +1349,98 @@ class Naver
1349
1349
  tags2.split(',').each do |tag_value|
1350
1350
  tag_mm2 << ''+tag_value
1351
1351
  end
1352
- @driver.find_element(:xpath, '//*[@id="app"]/div/div/section/div/div[2]/div[1]/div[4]/div/div/input').send_keys(tag_mm2.join("\n")+"\n")
1352
+ @driver.find_element(:xpath, '//*[@placeholder="태그를 입력해주세요 (최대 10개)"]').send_keys(tag_mm2.join("\n")+"\n")
1353
1353
 
1354
1354
  sleep(1)
1355
- # data['populationParams'] = '{"configuration":{"openType":'+option['공개']+',"commentYn":'+option['댓글허용']+',"searchYn":'+option['검색허용']+',"sympathyYn":'+option['공감허용']+',"scrapType":'+option['블로그공유']+',"outSideAllowYn":'+option['외부공유허용']+',"twitterPostingYn":false,"facebookPostingYn":false,"cclYn":false},"populationMeta":{"categoryId":'+category_value+',"logNo":null,"directorySeq":0,"directoryDetail":null,"mrBlogTalkCode":null,"postWriteTimeType":"now","tags":"'+tags2+'","moviePanelParticipation":false,"greenReviewBannerYn":false,"continueSaved":false,"noticePostYn":false,"autoByCategoryYn":false,"postLocationSupportYn":false,"postLocationJson":null,"prePostDate":null,"thisDayPostInfo":null,"scrapYn":false,"autoSaveNo":'+(Time.now.to_f.round(3)*1000).to_i.to_s+'},"editorSource":"AbZmtbYiAmhrzPJyhPXNWg=="}'
1356
- # if option['공개'] == '2'
1357
- # @driver.find_element(:xpath ,'//*[@id="root"]/div/div[1]/div/div[3]/div[3]/div/div/div/div[3]/div/div/ul/li[1]/span/label').click
1358
- # elsif option['공개'] == '3'
1359
- # @driver.find_element(:xpath, '//*[@id="root"]/div/div[1]/div/div[3]/div[3]/div/div/div/div[3]/div/div/ul/li[3]/span/label').click
1360
- # elsif option['공개'] == '0'
1361
- # @driver.find_element(:xpath, '//*[@id="root"]/div/div[1]/div/div[3]/div[3]/div/div/div/div[3]/div/div/ul/li[4]/span/label').click
1362
- # else
1363
- # @driver.find_element(:xpath, '//*[@id="root"]/div/div[1]/div/div[3]/div[3]/div/div/div/div[3]/div/div/ul/li[2]/span/label').click
1364
- # end
1355
+
1356
+ if option['전체공개'] == 'true'
1357
+ puts '전체공개'
1358
+ begin
1359
+ @driver.find_element(:xpath, '//*[@class="btn_open_set"]').click
1360
+ sleep(2)
1361
+ @driver.find_element(:xpath, '//*[@for="all"]').click
1362
+ rescue
1363
+ end
1364
+ sleep(1)
1365
+ end
1366
+
1367
+ if option['멤버공개'] == 'true'
1368
+ puts '멤버공개'
1369
+ begin
1370
+ @driver.find_element(:xpath, '//*[@class="btn_open_set"]').click
1371
+ sleep(2)
1372
+ @driver.find_element(:xpath, '//*[@for="member"]').click
1373
+ rescue
1374
+ end
1375
+ sleep(1)
1376
+ end
1377
+
1365
1378
  if option['댓글허용'] == 'true'
1366
1379
  puts '댓글허용'
1367
-
1368
- begin
1369
- @driver.find_element(:xpath, '/html/body/div[1]/div/div/section/div/div[2]/div[2]/div[3]/ul/li[1]/div/label').click
1370
- sleep(1)
1371
- rescue
1372
-
1380
+ begin
1381
+ @driver.find_element(:xpath, '//*[@for="coment"]').click
1382
+ rescue
1383
+ end
1384
+ sleep(1)
1373
1385
  end
1374
- end
1375
1386
 
1376
-
1387
+
1377
1388
  if option['블로그,카페 공유허용'] == 'true'
1378
1389
  puts '블로그,카페 공유허용'
1379
1390
  begin
1380
- @driver.find_element(:xpath, '/html/body/div[1]/div/div/section/div/div[2]/div[2]/div[3]/ul/li[2]/div[1]/label').click
1381
- rescue
1382
-
1391
+ @driver.find_element(:xpath, '//*[@for="blog_sharing"]').click
1392
+ rescue
1393
+ end
1394
+ sleep(1)
1383
1395
  end
1384
- end
1385
1396
 
1386
1397
 
1387
-
1398
+
1388
1399
  if option['외부공유허용'] == 'true'
1389
1400
  puts '외부공유허용'
1390
1401
  begin
1391
- @driver.find_element(:xpath, '/html/body/div[1]/div/div/section/div/div[2]/div[2]/div[3]/ul/li[3]/div[1]/label').click
1392
- sleep(1)
1393
- rescue
1394
-
1402
+ @driver.find_element(:xpath, '//*[@for="external_sharing"]').click
1403
+ rescue
1404
+ end
1405
+ sleep(1)
1395
1406
  end
1396
- end
1397
1407
 
1398
-
1408
+
1399
1409
 
1400
1410
  if option['복사,저장 허용'] == 'true'
1401
1411
  puts '복사,저장 허용'
1402
1412
  begin
1403
- @driver.find_element(:xpath, '/html/body/div[1]/div/div/section/div/div[2]/div[2]/div[3]/ul/li[4]/div[1]/label').click
1404
- sleep(1)
1413
+ @driver.find_element(:xpath, '//*[@for="copy"]').click
1405
1414
  rescue
1406
-
1407
1415
  end
1416
+ sleep(1)
1408
1417
  end
1409
1418
 
1410
-
1419
+
1411
1420
  if option['자동출처 사용'] == 'true'
1412
- puts '자동출처 사용'
1421
+ puts '자동출처 사용'
1413
1422
  begin
1414
- @driver.find_element(:xpath, '/html/body/div[1]/div/div/section/div/div[2]/div[2]/div[3]/ul/li[5]/div[1]/label').click
1415
- sleep(1)
1423
+ @driver.find_element(:xpath, '//*[@for="automatic_source"]').click
1416
1424
  rescue
1417
-
1418
1425
  end
1426
+ sleep(1)
1419
1427
  end
1420
-
1428
+
1429
+
1421
1430
 
1422
1431
  if option['CCL 사용'] == 'true'
1423
1432
  puts 'CCL 사용'
1424
1433
  begin
1425
- @driver.find_element(:xpath, '/html/body/div[1]/div/div/section/div/div[2]/div[2]/div[3]/ul/li[6]/div[1]/label').click
1426
- sleep(1)
1434
+ @driver.find_element(:xpath, '//*[@for="ccl"]').click
1427
1435
  rescue
1428
-
1429
1436
  end
1437
+ sleep(1)
1430
1438
  end
1431
-
1439
+
1432
1440
  # puts data['documentModel'] = data['documentModel'].to_json
1433
1441
 
1434
1442
  sleep(dd_time.to_i)
1435
- @driver.find_element(:xpath, '/html/body/div[1]/div/div/section/div/div[1]/div/a').click
1443
+ @driver.find_element(:xpath, '//*[@class="BaseButton BaseButton--skinGreen size_default"]').click
1436
1444
 
1437
1445
  sleep(7)
1438
1446
 
@@ -2875,13 +2883,15 @@ class Wordpress
2875
2883
 
2876
2884
 
2877
2885
  if @data['포스트설정']['전체공개'].checked?
2878
- option['공개'] = '2'
2879
- # elsif @data['포스트설정']['서로이웃공개'].checked?
2880
- # option['공개'] = '3'
2881
- # elsif @data['포스트설정']['비공개'].checked?
2882
- # option['공개'] = '0'
2886
+ option['전체공개'] = 'true'
2887
+ else
2888
+ option['전체공개'] = 'false'
2889
+ end
2890
+
2891
+ if @data['포스트설정']['멤버공개'].checked?
2892
+ option['멤버공개'] = 'true'
2883
2893
  else
2884
- option['공개'] = '1'
2894
+ option['멤버공개'] = 'false'
2885
2895
  end
2886
2896
 
2887
2897
  if @data['포스트설정']['댓글허용'].checked?
@@ -4832,7 +4842,7 @@ class Wordpress
4832
4842
  end
4833
4843
  }
4834
4844
  }
4835
- @data['포스트설정']['멤버공개'] = checkbox('맴버공개'){
4845
+ @data['포스트설정']['멤버공개'] = checkbox('멤버공개'){
4836
4846
  top 10
4837
4847
  left 1
4838
4848
  on_toggled{
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cafe_basics_duo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - zon