cafe_buy_duo 0.0.7 → 0.0.10
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.
Potentially problematic release.
This version of cafe_buy_duo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/cafe_buy_duo.rb +50 -21
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 69f822498d2a7c548092090ebb42cf643ab3f1e17075a1f61a66542abfe76e0c
         | 
| 4 | 
            +
              data.tar.gz: 9bbe8d88f50c23137a97d98fc0021a30454683f0ae605e561541f59aca31383f
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 4995b53d0a52ba782f51def5fa609766f940d06be13ae0afe1b620524bac23c417edbbf5a482d6bce83cd45f5a443b375420d91790ca0431fa73335cd5e07849
         | 
| 7 | 
            +
              data.tar.gz: b6c0dc2a769b615c12d10218bf113c9e80a3d41d45656f0f2238655692b7ea6d6bfcc951df15dcbf887e3ad6abc81bf4ce2a398da3dc1ae84ade67cdaf2c62f7
         | 
    
        data/lib/cafe_buy_duo.rb
    CHANGED
    
    | @@ -1040,20 +1040,43 @@ end | |
| 1040 1040 | 
             
                            if i2.to_s.include?('<img')
         | 
| 1041 1041 | 
             
                                path = i2.to_s.split('src="')[1].split('"')[0]
         | 
| 1042 1042 | 
             
                                path = URI.decode_www_form(path)[0][0]
         | 
| 1043 | 
            +
                                # 이미지 등록 버튼 클릭
         | 
| 1043 1044 | 
             
                                @driver.find_element(:xpath, '//*[@id="'+page_id+'"]/div[1]/div/header/div[1]/ul/li[1]/button').click
         | 
| 1044 | 
            -
                                sleep(2)
         | 
| 1045 | 
            -
                                Clipboard.copy(path.split('/').join("\\"))
         | 
| 1046 | 
            -
                                key_down('ctrl')
         | 
| 1047 | 
            -
                                key_stroke('v')
         | 
| 1048 | 
            -
                                key_up('ctrl')
         | 
| 1049 1045 | 
             
                                sleep(3)
         | 
| 1050 | 
            -
                                key_stroke(' | 
| 1046 | 
            +
                                key_stroke('escape')
         | 
| 1047 | 
            +
                               
         | 
| 1048 | 
            +
                                # 파일 경로 변환 (슬래시 -> 백슬래시)
         | 
| 1049 | 
            +
                                file_path = path.split('/').join("\\")  # 윈도우 스타일 경로로 변환
         | 
| 1050 | 
            +
             | 
| 1051 | 
            +
                                # 파일 입력 필드 찾기 (input[type="file"])
         | 
| 1052 | 
            +
                                file_input = @driver.find_element(:id, 'hidden-file')
         | 
| 1053 | 
            +
             | 
| 1054 | 
            +
                                # send_keys로 파일 경로를 직접 입력하여 파일 업로드
         | 
| 1055 | 
            +
                                file_input.send_keys(file_path)
         | 
| 1051 1056 | 
             
                                sleep(3)
         | 
| 1052 | 
            -
             | 
| 1057 | 
            +
                            
         | 
| 1058 | 
            +
             | 
| 1059 | 
            +
                           
         | 
| 1060 | 
            +
                                begin
         | 
| 1061 | 
            +
                                @driver.action.key_down(:up).key_up(:up).perform
         | 
| 1062 | 
            +
                                wait = Selenium::WebDriver::Wait.new(:timeout => 3)
         | 
| 1063 | 
            +
                                #요소가 나타날 때까지 60초 동안 기다립니다.
         | 
| 1064 | 
            +
                                wait.until { @driver.find_element(:xpath, '//*[@class="se-placeholder __se_placeholder se-ff-system se-fs13"]') }
         | 
| 1065 | 
            +
                                sleep(1)
         | 
| 1066 | 
            +
                                @driver.find_element(:xpath, '//*[@class="se-placeholder __se_placeholder se-ff-system se-fs13"]').click
         | 
| 1067 | 
            +
                                sleep(1)
         | 
| 1068 | 
            +
                                @driver.action.send_keys(title).perform
         | 
| 1069 | 
            +
                                sleep(1)
         | 
| 1070 | 
            +
                                @driver.action.key_down(:enter).key_up(:enter).perform #엔터
         | 
| 1071 | 
            +
                                sleep(1)
         | 
| 1072 | 
            +
                                rescue
         | 
| 1073 | 
            +
                                @driver.action.key_down(:down).key_up(:down).perform
         | 
| 1074 | 
            +
                                end    
         | 
| 1075 | 
            +
                           
         | 
| 1053 1076 |  | 
| 1054 1077 | 
             
                                if i2.to_s.split('href="')[1] != nil
         | 
| 1055 1078 | 
             
                                    href2 = i2.to_s.split('href="')[1].split('"')[0]
         | 
| 1056 | 
            -
                                     | 
| 1079 | 
            +
                                    @driver.action.key_down(:up).key_up(:up).perform
         | 
| 1057 1080 | 
             
                                    sleep(1)
         | 
| 1058 1081 | 
             
                                    @driver.find_element(:xpath, '//*[@id="'+page_id+'"]/div[1]/div/header/div[2]/ul/li[7]/div/button').click
         | 
| 1059 1082 | 
             
                                    sleep(1)
         | 
| @@ -1101,11 +1124,20 @@ end | |
| 1101 1124 | 
             
                                sleep(3)
         | 
| 1102 1125 | 
             
                                @driver.action.key_down(:up).key_up(:up).perform #x탭
         | 
| 1103 1126 | 
             
                                sleep(1)
         | 
| 1127 | 
            +
                                begin
         | 
| 1128 | 
            +
                                wait = Selenium::WebDriver::Wait.new(:timeout => 3)
         | 
| 1129 | 
            +
                                #요소가 나타날 때까지 60초 동안 기다립니다.
         | 
| 1130 | 
            +
                                wait.until { @driver.find_element(:xpath, '//*[@class="se-placeholder __se_placeholder se-ff-system se-fs13"]') }
         | 
| 1131 | 
            +
                                sleep(1)
         | 
| 1104 1132 | 
             
                                @driver.find_element(:xpath, '//*[@class="se-placeholder __se_placeholder se-ff-system se-fs13"]').click
         | 
| 1133 | 
            +
                                sleep(1)
         | 
| 1105 1134 | 
             
                                @driver.action.send_keys(title).perform
         | 
| 1106 1135 | 
             
                                sleep(1)
         | 
| 1107 1136 | 
             
                                @driver.action.key_down(:enter).key_up(:enter).perform #엔터
         | 
| 1108 1137 | 
             
                                sleep(1)
         | 
| 1138 | 
            +
                                rescue
         | 
| 1139 | 
            +
                                @driver.action.key_down(:down).key_up(:down).perform
         | 
| 1140 | 
            +
                                end   
         | 
| 1109 1141 |  | 
| 1110 1142 | 
             
                            elsif i2.to_s.include?('<inyonggoo')
         | 
| 1111 1143 | 
             
                                if i2.text == ''
         | 
| @@ -1117,14 +1149,13 @@ end | |
| 1117 1149 | 
             
                                    @driver.find_element(:xpath, '//*[@id="'+page_id+'"]/div[1]/div/header/div[1]/ul/li[5]/div/div/button['+select_number+']').click
         | 
| 1118 1150 | 
             
                                    sleep(1)
         | 
| 1119 1151 | 
             
                                    Clipboard.copy(i2.text)
         | 
| 1120 | 
            -
                                     | 
| 1121 | 
            -
                                     | 
| 1122 | 
            -
                                     | 
| 1123 | 
            -
                                    sleep(3)
         | 
| 1152 | 
            +
                                    sleep(1)
         | 
| 1153 | 
            +
                                    @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
         | 
| 1154 | 
            +
                                    sleep(1)
         | 
| 1124 1155 |  | 
| 1125 | 
            -
                                     | 
| 1156 | 
            +
                                    @driver.action.key_down(:down).key_up(:down).perform
         | 
| 1126 1157 | 
             
                                    sleep(1)
         | 
| 1127 | 
            -
                                     | 
| 1158 | 
            +
                                    @driver.action.key_down(:down).key_up(:down).perform
         | 
| 1128 1159 | 
             
                                    sleep(1)
         | 
| 1129 1160 | 
             
                                    @driver.action.key_down(:enter).key_up(:enter).perform
         | 
| 1130 1161 |  | 
| @@ -1519,7 +1550,7 @@ end | |
| 1519 1550 | 
             
                                            @driver.find_element(:xpath, '//*[@id="'+page_id+'"]/div[1]/div/header/div[2]/ul/li[15]/div/div/button').click
         | 
| 1520 1551 | 
             
                                        end
         | 
| 1521 1552 | 
             
                                        sleep(1)
         | 
| 1522 | 
            -
                                         | 
| 1553 | 
            +
                                        @driver.action.key_down(:arrow_right).key_up(:arrow_right).perform
         | 
| 1523 1554 | 
             
                                        sleep(1)
         | 
| 1524 1555 | 
             
                                    end
         | 
| 1525 1556 | 
             
                                end
         | 
| @@ -1573,9 +1604,8 @@ end | |
| 1573 1604 | 
             
                        sleep(3)
         | 
| 1574 1605 | 
             
                        # @driver.action.send_keys(soosick_1.text).perform
         | 
| 1575 1606 | 
             
                        Clipboard.copy(soosick_1.to_s)
         | 
| 1576 | 
            -
                         | 
| 1577 | 
            -
                         | 
| 1578 | 
            -
                        key_up('ctrl')
         | 
| 1607 | 
            +
                        sleep(1)
         | 
| 1608 | 
            +
                        @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
         | 
| 1579 1609 | 
             
                        sleep(2)
         | 
| 1580 1610 | 
             
                        @driver.find_element(:xpath, '//*[@id="'+page_id+'"]/div[1]/div/div[4]/div[2]/div/div/div[3]/div/button[2]').click
         | 
| 1581 1611 | 
             
                        sleep(3)
         | 
| @@ -1593,9 +1623,8 @@ end | |
| 1593 1623 | 
             
                        sleep(3)
         | 
| 1594 1624 | 
             
                        # @driver.action.send_keys(soosick_2).perform
         | 
| 1595 1625 | 
             
                        Clipboard.copy(soosick_2.to_s)
         | 
| 1596 | 
            -
                         | 
| 1597 | 
            -
                         | 
| 1598 | 
            -
                        key_up('ctrl')
         | 
| 1626 | 
            +
                        sleep(1)
         | 
| 1627 | 
            +
                        @driver.action.key_down(:control).send_keys('v').key_up(:control).perform
         | 
| 1599 1628 | 
             
                        sleep(2)
         | 
| 1600 1629 | 
             
                        @driver.find_element(:xpath, '//*[@id="'+page_id+'"]/div[1]/div/div[4]/div[2]/div/div/div[3]/div/button[2]').click
         | 
| 1601 1630 | 
             
                        sleep(3)
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: cafe_buy_duo
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.10
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - zon
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2024-12- | 
| 11 | 
            +
            date: 2024-12-18 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies: []
         | 
| 13 13 | 
             
            description: File to Clipboard gem
         | 
| 14 14 | 
             
            email: mymin26@naver.com
         |