haya_select_helpers 0.0.15 → 0.0.20
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/Rakefile +4 -0
- data/lib/haya_select.rb +1 -27
- data/lib/haya_select_helpers/version.rb +1 -1
- data/lib/tasks/haya_select_helpers_tasks.rake +32 -4
- 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: 0da65d2e0ad064fc0a6dbd9b6e4082bbc1ea9b86f6a15aad2792d2aacba632f2
|
|
4
|
+
data.tar.gz: 6cf5a0459df56eee8b1a751529fa61d4ed9bdfd83e31e99393a15c471c75bb5d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 80359d95939e2ff083af33aa017f2fd5af92f2a3f88e8087917e66f7c4df00548f3001f9e9528a82819f6c68fc5a3d656e16285ef32a00bca561c33ce594f06b
|
|
7
|
+
data.tar.gz: 75cd0645b8a449f48463d86d04e316d831e391430993d58297302584f181ba2ae887839de4ce4135b94986d3645d75c1f5b41a18271959ac1717aea4422f6f97
|
data/Rakefile
CHANGED
data/lib/haya_select.rb
CHANGED
|
@@ -500,33 +500,7 @@ private
|
|
|
500
500
|
|
|
501
501
|
def perform_option_selection(option, label, option_value)
|
|
502
502
|
click_option_element(option)
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
if scope.page.has_selector?(current_value_selector(option_value), visible: false, wait: 1) ||
|
|
506
|
-
(label && label_matches?(label))
|
|
507
|
-
return
|
|
508
|
-
end
|
|
509
|
-
|
|
510
|
-
option_text = option.first("[data-testid='option-presentation-text']", minimum: 0)
|
|
511
|
-
click_option_element(option_text) if option_text
|
|
512
|
-
return if selected?(label, option_value)
|
|
513
|
-
|
|
514
|
-
click_option_presentation(option, label, option_value)
|
|
515
|
-
send_option_keys(option, label, option_value)
|
|
516
|
-
click_option_element(option) unless selected?(label, option_value)
|
|
517
|
-
end
|
|
518
|
-
|
|
519
|
-
def click_option_presentation(option, label, option_value)
|
|
520
|
-
return if selected?(label, option_value)
|
|
521
|
-
|
|
522
|
-
option_presentation = option.all("[data-testid='option-presentation']", minimum: 0).first
|
|
523
|
-
click_option_element(option_presentation) if option_presentation
|
|
524
|
-
end
|
|
525
|
-
|
|
526
|
-
def send_option_keys(option, label, option_value)
|
|
527
|
-
return if selected?(label, option_value)
|
|
528
|
-
|
|
529
|
-
option.click
|
|
503
|
+
wait_for_selected_value_or_label(label, option_value)
|
|
530
504
|
end
|
|
531
505
|
|
|
532
506
|
def select_option_container_selector
|
|
@@ -1,4 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
namespace :release do
|
|
2
|
+
desc "Bump patch version and release gem"
|
|
3
|
+
task patch: :environment do
|
|
4
|
+
version_file = File.expand_path("../haya_select_helpers/version.rb", __dir__)
|
|
5
|
+
current_version = File.read(version_file).match(/VERSION\s*=\s*"(\d+\.\d+\.\d+)"/)&.captures&.first
|
|
6
|
+
abort("Could not read current version from #{version_file}") unless current_version
|
|
7
|
+
|
|
8
|
+
segments = current_version.split(".").map(&:to_i)
|
|
9
|
+
segments[2] += 1
|
|
10
|
+
new_version = segments.join(".")
|
|
11
|
+
|
|
12
|
+
updated = File.read(version_file).sub(/VERSION\s*=\s*"\d+\.\d+\.\d+"/, %(VERSION = "#{new_version}"))
|
|
13
|
+
File.write(version_file, updated)
|
|
14
|
+
puts "Version bumped: #{current_version} -> #{new_version}"
|
|
15
|
+
|
|
16
|
+
run_command("bundle install")
|
|
17
|
+
run_command("git add lib/haya_select_helpers/version.rb Gemfile.lock")
|
|
18
|
+
run_command(%(git commit -m "Release #{new_version}"))
|
|
19
|
+
current_branch = `git branch --show-current`.strip
|
|
20
|
+
run_command("git push --set-upstream origin #{current_branch}")
|
|
21
|
+
|
|
22
|
+
gem_file = "haya_select_helpers-#{new_version}.gem"
|
|
23
|
+
run_command("gem build haya_select_helpers.gemspec")
|
|
24
|
+
run_command("gem push #{gem_file}")
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def run_command(command)
|
|
28
|
+
puts "Running: #{command}"
|
|
29
|
+
success = system(command)
|
|
30
|
+
abort("Command failed: #{command}") unless success
|
|
31
|
+
end
|
|
32
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: haya_select_helpers
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.20
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- kaspernj
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|