sakura-cli 0.3.0 → 0.3.2
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/LICENSE.txt +1 -1
- data/README.md +1 -1
- data/lib/sakura/cli/version.rb +1 -1
- data/lib/sakura/mail_address.rb +7 -6
- data/sakura-cli.gemspec +3 -3
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f2c8abc937ffe96cbe816f754aeaff5c5b5ecc85c44afde6a6c3e7cee31374ab
|
|
4
|
+
data.tar.gz: d39f9640b9427648fcea0917333ad59cfeece7d8a0b76ed095ba2279d1dfb842
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 38f0e8fdc9c6112786e45ecb94aa42d67e5253f5764cb4d623e518584d5f39174740b841aee814b49a7b0b64032075ab83ebd173db972d455ae2d80ef50e345f
|
|
7
|
+
data.tar.gz: b5193f2d1ef6e06e4634883193a697c68993c58cd65c19244a4483bc58d37536256a09a06cf4fd7eda01aa3041648906b072bfb1e21bcda65308dffe5458bc38
|
data/LICENSE.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2015-
|
|
3
|
+
Copyright (c) 2015-2025 Shintaro Kojima
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
data/lib/sakura/cli/version.rb
CHANGED
data/lib/sakura/mail_address.rb
CHANGED
|
@@ -10,15 +10,16 @@ module Sakura
|
|
|
10
10
|
|
|
11
11
|
class << self
|
|
12
12
|
def create(local_part, password)
|
|
13
|
-
Client.current_session.process(MAIL_URL,
|
|
13
|
+
Client.current_session.process(MAIL_URL, /メールアドレス/) do |page|
|
|
14
14
|
page.first(:xpath, '//a[text() = "新規追加"]').click
|
|
15
15
|
|
|
16
|
-
page.find(:xpath, '//label[contains(text(), "
|
|
16
|
+
page.find(:xpath, '//label[contains(text(), "ユーザー名")]/..//input')
|
|
17
17
|
.fill_in with: local_part
|
|
18
18
|
page.all(:xpath, '//label[contains(text(), "パスワード")]/..//input').each do |e|
|
|
19
19
|
e.fill_in with: password
|
|
20
20
|
end
|
|
21
21
|
page.find(:xpath, '//label[contains(text(), "メールの受信")]/..//*[contains(text(), "受信する")]/../input').choose
|
|
22
|
+
page.find(:xpath, '//label[contains(text(), "迷惑メールフィルター")]/..//*[contains(text(), "利用しない")]/../input').choose
|
|
22
23
|
page.find(:xpath, '//button[text() = "作成する"]').click
|
|
23
24
|
end
|
|
24
25
|
|
|
@@ -26,7 +27,7 @@ module Sakura
|
|
|
26
27
|
end
|
|
27
28
|
|
|
28
29
|
def all
|
|
29
|
-
page = Client.current_session.get(MAIL_URL,
|
|
30
|
+
page = Client.current_session.get(MAIL_URL, /メールアドレス/)
|
|
30
31
|
page.find('.input-text.page-limit-selector').select '300件'
|
|
31
32
|
wait_for_loading page
|
|
32
33
|
|
|
@@ -36,7 +37,7 @@ module Sakura
|
|
|
36
37
|
end
|
|
37
38
|
|
|
38
39
|
def find(local_part)
|
|
39
|
-
page = Client.current_session.get(MAIL_URL,
|
|
40
|
+
page = Client.current_session.get(MAIL_URL, /メールアドレス/)
|
|
40
41
|
page.find('.input-text.page-limit-selector').select '300件'
|
|
41
42
|
wait_for_loading page
|
|
42
43
|
|
|
@@ -63,7 +64,7 @@ module Sakura
|
|
|
63
64
|
|
|
64
65
|
def tabularize(*args)
|
|
65
66
|
args[0].ljust(20) <<
|
|
66
|
-
"#{args[1]} /".
|
|
67
|
+
"#{args[1]} /".rjust(15) <<
|
|
67
68
|
args[2].to_s.rjust(10) <<
|
|
68
69
|
" (#{args[3].to_s.rjust(3)})"
|
|
69
70
|
end
|
|
@@ -229,7 +230,7 @@ module Sakura
|
|
|
229
230
|
action = 'メールを破棄'
|
|
230
231
|
when :mark
|
|
231
232
|
text = '簡易' # "迷惑メールフィルタ" doesn't work
|
|
232
|
-
action = '
|
|
233
|
+
action = 'フィルターのみ利用'
|
|
233
234
|
when :precise
|
|
234
235
|
'高精度迷惑メールフィルタ'
|
|
235
236
|
end
|
data/sakura-cli.gemspec
CHANGED
|
@@ -20,9 +20,9 @@ Gem::Specification.new do |spec|
|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
21
21
|
spec.require_paths = ['lib']
|
|
22
22
|
|
|
23
|
-
spec.
|
|
24
|
-
spec.
|
|
25
|
-
spec.
|
|
23
|
+
spec.add_dependency 'capybara'
|
|
24
|
+
spec.add_dependency 'selenium-webdriver'
|
|
25
|
+
spec.add_dependency 'thor'
|
|
26
26
|
spec.required_ruby_version = '>= 3.0.0'
|
|
27
27
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
28
28
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sakura-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shintaro Kojima
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: capybara
|
|
@@ -82,7 +81,6 @@ licenses:
|
|
|
82
81
|
- MIT
|
|
83
82
|
metadata:
|
|
84
83
|
rubygems_mfa_required: 'true'
|
|
85
|
-
post_install_message:
|
|
86
84
|
rdoc_options: []
|
|
87
85
|
require_paths:
|
|
88
86
|
- lib
|
|
@@ -97,8 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
97
95
|
- !ruby/object:Gem::Version
|
|
98
96
|
version: '0'
|
|
99
97
|
requirements: []
|
|
100
|
-
rubygems_version: 3.
|
|
101
|
-
signing_key:
|
|
98
|
+
rubygems_version: 3.6.9
|
|
102
99
|
specification_version: 4
|
|
103
100
|
summary: Command-line tool for Sakura's Rental Server.
|
|
104
101
|
test_files: []
|