Last active
November 1, 2022 07:33
-
-
Save tatey/03dbce9c5b032a917ddf1f7469ccaa57 to your computer and use it in GitHub Desktop.
A quick script to enable "all access" on a bunch of projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
nixpkgs = | |
import (builtins.fetchTarball { | |
url = https://github.com/NixOS/nixpkgs/archive/e6e6bad81b7e11f37d893ef39712ce8918ae2338.tar.gz; | |
}) { }; | |
in | |
nixpkgs.mkShell { | |
buildInputs = [ | |
nixpkgs.chromedriver | |
nixpkgs.ruby_3_1 | |
]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
gem "capybara" | |
gem "debug" | |
gem "selenium-webdriver" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "bundler/setup" | |
require "capybara" | |
require "capybara/dsl" | |
require "debug" | |
PROJECT_URLS = %w[ | |
https://3.basecamp.com/.../edit | |
] | |
include Capybara::DSL | |
Capybara.default_driver = :selenium_chrome | |
Capybara.reset_sessions! | |
visit "https://3.basecamp.com/..." | |
fill_in "Email or username", with: "[email protected]" | |
click_on "Next" | |
fill_in "Password", with: STDIN.gets | |
fill_in "Authentication code", with: STDIN.gets | |
click_on "Verify" | |
PROJECT_URLS.each do |project_url| | |
visit "#{project_url}/edit" | |
find("#project_admissions_team", visible: false).send(:parent).send(:parent).click | |
click_on "Save changes" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment