cafe_basics_duo 0.0.21 → 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 -53
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 679b20ad6abad03f4d7fe1678328d1b47d20236fe017a44adaa5b01f0d4015af
4
- data.tar.gz: 481550c7b0decb19d722cdfde237929ba0d1e9b8e540a1188a0a66905cca53b5
3
+ metadata.gz: 60fc6a8609e1fd7b3c3f02cbf1ac21468e2077b222ddcfe9a5b5e6f34eb62892
4
+ data.tar.gz: 666b86b3216ea879af982daf61e0a2fd488d950654b1b1f8ab21b8c98279e67b
5
5
  SHA512:
6
- metadata.gz: ce479dc58f5a40f48f51d67387968159f4302a71f35a78c690aec05025f9eff10efc990c72ce899dcf63773be1380f80db175fa511543b0d1f32a72dba083541
7
- data.tar.gz: bf5eb2bf7640dd95936a05b15b545b6c3430a4762983fdf5c07543c4357d1d79f2c9ce72955bc3e2675059aaf7a9305bf386c13193969863d38c3d267147ca92
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] = {
@@ -1350,88 +1350,97 @@ class Naver
1350
1350
  tag_mm2 << ''+tag_value
1351
1351
  end
1352
1352
  @driver.find_element(:xpath, '//*[@placeholder="태그를 입력해주세요 (최대 10개)"]').send_keys(tag_mm2.join("\n")+"\n")
1353
+
1353
1354
  sleep(1)
1354
- # 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=="}'
1355
- # if option['공개'] == '2'
1356
- # @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
1357
- # elsif option['공개'] == '3'
1358
- # @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
1359
- # elsif option['공개'] == '0'
1360
- # @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
1361
- # else
1362
- # @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
1363
- # 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
+
1364
1378
  if option['댓글허용'] == 'true'
1365
1379
  puts '댓글허용'
1366
-
1367
- begin
1368
- @driver.find_element(:xpath, '/html/body/div[1]/div/div/section/div/div[2]/div[2]/div[3]/ul/li[1]/div/label').click
1369
- sleep(1)
1370
- rescue
1371
-
1380
+ begin
1381
+ @driver.find_element(:xpath, '//*[@for="coment"]').click
1382
+ rescue
1383
+ end
1384
+ sleep(1)
1372
1385
  end
1373
- end
1374
1386
 
1375
-
1387
+
1376
1388
  if option['블로그,카페 공유허용'] == 'true'
1377
1389
  puts '블로그,카페 공유허용'
1378
1390
  begin
1379
- @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
1380
- rescue
1381
-
1391
+ @driver.find_element(:xpath, '//*[@for="blog_sharing"]').click
1392
+ rescue
1393
+ end
1394
+ sleep(1)
1382
1395
  end
1383
- end
1384
1396
 
1385
1397
 
1386
-
1398
+
1387
1399
  if option['외부공유허용'] == 'true'
1388
1400
  puts '외부공유허용'
1389
1401
  begin
1390
- @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
1391
- sleep(1)
1392
- rescue
1393
-
1402
+ @driver.find_element(:xpath, '//*[@for="external_sharing"]').click
1403
+ rescue
1404
+ end
1405
+ sleep(1)
1394
1406
  end
1395
- end
1396
1407
 
1397
-
1408
+
1398
1409
 
1399
1410
  if option['복사,저장 허용'] == 'true'
1400
1411
  puts '복사,저장 허용'
1401
1412
  begin
1402
- @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
1403
- sleep(1)
1413
+ @driver.find_element(:xpath, '//*[@for="copy"]').click
1404
1414
  rescue
1405
-
1406
1415
  end
1416
+ sleep(1)
1407
1417
  end
1408
1418
 
1409
-
1419
+
1410
1420
  if option['자동출처 사용'] == 'true'
1411
- puts '자동출처 사용'
1421
+ puts '자동출처 사용'
1412
1422
  begin
1413
- @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
1414
- sleep(1)
1423
+ @driver.find_element(:xpath, '//*[@for="automatic_source"]').click
1415
1424
  rescue
1416
-
1417
1425
  end
1426
+ sleep(1)
1418
1427
  end
1419
-
1428
+
1429
+
1420
1430
 
1421
1431
  if option['CCL 사용'] == 'true'
1422
1432
  puts 'CCL 사용'
1423
1433
  begin
1424
- @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
1425
- sleep(1)
1434
+ @driver.find_element(:xpath, '//*[@for="ccl"]').click
1426
1435
  rescue
1427
-
1428
1436
  end
1437
+ sleep(1)
1429
1438
  end
1430
-
1439
+
1431
1440
  # puts data['documentModel'] = data['documentModel'].to_json
1432
1441
 
1433
1442
  sleep(dd_time.to_i)
1434
- @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
1435
1444
 
1436
1445
  sleep(7)
1437
1446
 
@@ -2874,13 +2883,15 @@ class Wordpress
2874
2883
 
2875
2884
 
2876
2885
  if @data['포스트설정']['전체공개'].checked?
2877
- option['공개'] = '2'
2878
- # elsif @data['포스트설정']['서로이웃공개'].checked?
2879
- # option['공개'] = '3'
2880
- # elsif @data['포스트설정']['비공개'].checked?
2881
- # option['공개'] = '0'
2886
+ option['전체공개'] = 'true'
2887
+ else
2888
+ option['전체공개'] = 'false'
2889
+ end
2890
+
2891
+ if @data['포스트설정']['멤버공개'].checked?
2892
+ option['멤버공개'] = 'true'
2882
2893
  else
2883
- option['공개'] = '1'
2894
+ option['멤버공개'] = 'false'
2884
2895
  end
2885
2896
 
2886
2897
  if @data['포스트설정']['댓글허용'].checked?
@@ -4831,7 +4842,7 @@ class Wordpress
4831
4842
  end
4832
4843
  }
4833
4844
  }
4834
- @data['포스트설정']['멤버공개'] = checkbox('맴버공개'){
4845
+ @data['포스트설정']['멤버공개'] = checkbox('멤버공개'){
4835
4846
  top 10
4836
4847
  left 1
4837
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.21
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - zon