repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/apis/admin/stats/test_search.rb | test/apis/admin/stats/test_search.rb | require_relative "../../../test_helper"
class Test::Apis::Admin::Stats::TestSearch < Minitest::Test
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
LogItem.clean_indices!
end
def test_bins_results_by_day_with_time_zone_support
Tim... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/apis/admin/stats/test_users.rb | test/apis/admin/stats/test_users.rb | require_relative "../../../test_helper"
class Test::Apis::Admin::Stats::TestUsers < Minitest::Test
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
@user1 = FactoryBot.create(:api_user)
@user2 = FactoryBot.create(:api_user)
LogItem.... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/cli/test_commands.rb | test/cli/test_commands.rb | require_relative "../test_helper"
class Test::Cli::TestCommands < Minitest::Test
def test_version
stdout, stderr, status = Open3.capture3(ApiUmbrellaTestHelpers::Process.instance.test_environment_variables, File.join(API_UMBRELLA_SRC_ROOT, "bin/api-umbrella"), "version")
assert_equal("#{File.read(File.join(A... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/cli/test_flags.rb | test/cli/test_flags.rb | require_relative "../test_helper"
class Test::Cli::TestFlags < Minitest::Test
def test_version
stdout, stderr, status = Open3.capture3(ApiUmbrellaTestHelpers::Process.instance.test_environment_variables, File.join(API_UMBRELLA_SRC_ROOT, "bin/api-umbrella"), "--version")
assert_equal("#{File.read(File.join(AP... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/static_site/test_signup.rb | test/static_site/test_signup.rb | require_relative "../test_helper"
class Test::StaticSite::TestSignup < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::Setup
include ApiUmbrellaTestHelpers::SentEmails
def setup
super
setup_server
clear_all_test_emails
end
def test_submis... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/static_site/test_contact.rb | test/static_site/test_contact.rb | require_relative "../test_helper"
class Test::StaticSite::TestContact < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::Setup
include ApiUmbrellaTestHelpers::SentEmails
def setup
super
setup_server
clear_all_test_emails
end
def test_submi... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_api_scopes.rb | test/admin_ui/test_api_scopes.rb | require_relative "../test_helper"
class Test::AdminUi::TestApiScopes < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_create
admin_login
visit("... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_legacy_redirects.rb | test/admin_ui/test_legacy_redirects.rb | require_relative "../test_helper"
class Test::AdminUi::TestLegacyRedirects < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
LogItem.clean_indices!
FactoryBot.cre... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_api_users_allowed_referers.rb | test/admin_ui/test_api_users_allowed_referers.rb | require_relative "../test_helper"
class Test::AdminUi::TestApiUsersAllowedReferers < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_empty_input_saves_as... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_admin_groups.rb | test/admin_ui/test_admin_groups.rb | require_relative "../test_helper"
class Test::AdminUi::TestAdminGroups < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_create
api_scope = FactoryBo... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_loading_button.rb | test/admin_ui/test_loading_button.rb | require_relative "../test_helper"
class Test::AdminUi::TestLoadingButton < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::DelayServerResponses
include ApiUmbrellaTestHelpers::Setup
include Minitest::Hooks
def ... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_api_users_xss.rb | test/admin_ui/test_api_users_xss.rb | require_relative "../test_helper"
class Test::AdminUi::TestApiUsersXss < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_xss_escaping_in_table
@user ... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_cache_control.rb | test/admin_ui/test_cache_control.rb | require_relative "../test_helper"
class Test::AdminUi::TestCacheControl < Minitest::Test
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
parallelize_me!
def setup
super
setup_server
end
def test_admin_ui
# Check the admin index.html
response = Typhoeus.get... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_api_users_welcome_email.rb | test/admin_ui/test_api_users_welcome_email.rb | require_relative "../test_helper"
class Test::AdminUi::TestApiUsersWelcomeEmail < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
include ApiUmbrellaTestHelpers::SentEmails
def setup
super
setup_ser... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_noscript.rb | test/admin_ui/test_noscript.rb | require_relative "../test_helper"
class Test::AdminUi::TestNoscript < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::DelayServerResponses
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_noscript_message
res... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_config_publish_submit.rb | test/admin_ui/test_config_publish_submit.rb | require_relative "../test_helper"
class Test::AdminUi::TestConfigPublishSubmit < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
include Minitest::Hooks
def setup
super
setup_server
publish_def... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_page_title.rb | test/admin_ui/test_page_title.rb | require_relative "../test_helper"
class Test::AdminUi::TestPageTitle < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_rails_login_page_title
Factory... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_version_display.rb | test/admin_ui/test_version_display.rb | require_relative "../test_helper"
class Test::AdminUi::TestVersionDisplay < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
FactoryBot.create(:admin)
@expected_ver... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_stats_logs.rb | test/admin_ui/test_stats_logs.rb | require_relative "../test_helper"
class Test::AdminUi::TestStatsLogs < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::DateRangePicker
include ApiUmbrellaTestHelpers::Downloads
include ApiUmbrellaTestHelpers::Setu... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_roles.rb | test/admin_ui/test_roles.rb | require_relative "../test_helper"
class Test::AdminUi::TestRoles < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_prefills_user_roles
FactoryBot.cre... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_stats_map.rb | test/admin_ui/test_stats_map.rb | require_relative "../test_helper"
class Test::AdminUi::TestStatsMap < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::DateRangePicker
include ApiUmbrellaTestHelpers::Downloads
include ApiUmbrellaTestHelpers::Setup... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_api_users_rate_limits.rb | test/admin_ui/test_api_users_rate_limits.rb | require_relative "../test_helper"
class Test::AdminUi::TestApiUsersRateLimits < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_add_custom_rate_limits
... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_tooltips.rb | test/admin_ui/test_tooltips.rb | require_relative "../test_helper"
class Test::AdminUi::TestTooltips < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_tooltips_markdown
admin_login
... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_permissions_navigation.rb | test/admin_ui/test_permissions_navigation.rb | require_relative "../test_helper"
class Test::AdminUi::TestPermissionsNavigation < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_superuser
admin_lo... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_elasticsearch_proxy.rb | test/admin_ui/test_elasticsearch_proxy.rb | require_relative "../test_helper"
class Test::AdminUi::TestElasticsearchProxy < Minitest::Test
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
parallelize_me!
def setup
super
setup_server
end
def test_no_longer_exists_for_unauthenticated_requests
FactoryBot.cr... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_stats_drilldown.rb | test/admin_ui/test_stats_drilldown.rb | require_relative "../test_helper"
class Test::AdminUi::TestStatsDrilldown < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::DateRangePicker
include ApiUmbrellaTestHelpers::Downloads
include ApiUmbrellaTestHelpers:... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_stats_users.rb | test/admin_ui/test_stats_users.rb | require_relative "../test_helper"
class Test::AdminUi::TestStatsUsers < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::DateRangePicker
include ApiUmbrellaTestHelpers::Downloads
include ApiUmbrellaTestHelpers::Set... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_flash_messages_html_safety.rb | test/admin_ui/test_flash_messages_html_safety.rb | require_relative "../test_helper"
class Test::AdminUi::TestFlashMessagesHtmlSafety < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::Setup
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::AdminUiLogin
include Minitest::Hooks
de... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_apis.rb | test/admin_ui/test_apis.rb | require_relative "../test_helper"
class Test::AdminUi::TestApis < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_saves_when_only_nested_fields_change
... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_api_users_allowed_ips.rb | test/admin_ui/test_api_users_allowed_ips.rb | require_relative "../test_helper"
class Test::AdminUi::TestApiUsersAllowedIps < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_empty_input_saves_as_null... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_locales.rb | test/admin_ui/test_locales.rb | require_relative "../test_helper"
class Test::AdminUi::TestLocales < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
LOCALES_ROOT_DIR = File.join(API_UMBRELLA_SRC_ROOT, "locale")
EXPECTED_I18N = {
:de =... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_record_reloading.rb | test/admin_ui/test_record_reloading.rb | require_relative "../test_helper"
class Test::AdminUi::TestRecordReloading < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_repeated_edits
user = Fa... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_validations.rb | test/admin_ui/test_validations.rb | require_relative "../test_helper"
class Test::AdminUi::TestValidations < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_client_side_validations
admi... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_api_users_api_key_visibility.rb | test/admin_ui/test_api_users_api_key_visibility.rb | require_relative "../test_helper"
class Test::AdminUi::TestApiUsersApiKeyVisibility < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_api_key_in_create_n... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_api_users.rb | test/admin_ui/test_api_users.rb | require_relative "../test_helper"
class Test::AdminUi::TestApiUsers < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_form
admin_login
visit "/ad... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_apis_nested_reordering.rb | test/admin_ui/test_apis_nested_reordering.rb | require_relative "../test_helper"
class Test::AdminUi::TestApisNestedReordering < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_reordering_nested_assoc... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_datatables.rb | test/admin_ui/test_datatables.rb | require_relative "../test_helper"
class Test::AdminUi::TestDatatables < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_uses_placeholder_not_label_for_se... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_config_publish_pending.rb | test/admin_ui/test_config_publish_pending.rb | require_relative "../test_helper"
class Test::AdminUi::TestConfigPublishPending < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
include Minitest::Hooks
def setup
super
setup_server
publish_de... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/test_admins.rb | test/admin_ui/test_admins.rb | require_relative "../test_helper"
class Test::AdminUi::TestAdmins < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_superuser_checkbox_as_superuser_admin... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/login/test_external_providers.rb | test/admin_ui/login/test_external_providers.rb | require_relative "../../test_helper"
class Test::AdminUi::Login::TestExternalProviders < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::Setup
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::AdminUiLogin
include Minitest::Hooks
... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/login/test_username_not_email.rb | test/admin_ui/login/test_username_not_email.rb | require_relative "../../test_helper"
class Test::AdminUi::Login::TestUsernameNotEmail < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::Setup
include ApiUmbrellaTestHelpers::AdminAuth
include Minitest::Hooks
def setup
super
setup_server
Fact... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/login/test_username_is_email.rb | test/admin_ui/login/test_username_is_email.rb | require_relative "../../test_helper"
class Test::AdminUi::Login::TestUsernameIsEmail < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::Setup
include ApiUmbrellaTestHelpers::AdminAuth
def setup
super
setup_server
@admin = FactoryBot.create(:adm... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/login/test_invite.rb | test/admin_ui/login/test_invite.rb | require_relative "../../test_helper"
class Test::AdminUi::Login::TestInvite < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
include ApiUmbrellaTestHelpers::SentEmails
def setup
super
setup_server
... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/login/test_ldap_provider.rb | test/admin_ui/login/test_ldap_provider.rb | require_relative "../../test_helper"
class Test::AdminUi::Login::TestLdapProvider < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::Setup
include ApiUmbrellaTestHelpers::AdminAuth
include Minitest::Hooks
def setup
super
setup_server
@default... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/login/test_first_time_setup.rb | test/admin_ui/login/test_first_time_setup.rb | require_relative "../../test_helper"
class Test::AdminUi::Login::TestFirstTimeSetup < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::Setup
include ApiUmbrellaTestHelpers::AdminAuth
def setup
super
setup_server
end
def test_redirects_to_signup... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/login/test_initial_superuser_seeding.rb | test/admin_ui/login/test_initial_superuser_seeding.rb | require_relative "../../test_helper"
class Test::AdminUi::Login::TestInitialSuperuserSeeding < Minitest::Test
include ApiUmbrellaTestHelpers::Setup
include Minitest::Hooks
def setup
super
setup_server
once_per_class_setup do
assert_equal(0, Admin.count)
override_config_set({
"we... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/login/test_forgot_password.rb | test/admin_ui/login/test_forgot_password.rb | require_relative "../../test_helper"
class Test::AdminUi::Login::TestForgotPassword < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::Setup
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::SentEmails
def setup
super
setup... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/login/test_local_and_external_providers.rb | test/admin_ui/login/test_local_and_external_providers.rb | require_relative "../../test_helper"
class Test::AdminUi::Login::TestLocalAndExternalProviders < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::Setup
include ApiUmbrellaTestHelpers::AdminAuth
include Minitest::Hooks
def setup
super
setup_server
... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/login/test_tracking.rb | test/admin_ui/login/test_tracking.rb | require_relative "../../test_helper"
class Test::AdminUi::Login::TestTracking < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_populates_tracking_fields... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/login/test_local_provider.rb | test/admin_ui/login/test_local_provider.rb | require_relative "../../test_helper"
class Test::AdminUi::Login::TestLocalProvider < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::DelayServerResponses
include ApiUmbrellaTestHelpers::Setup
def setup
super
... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/admin_ui/login/test_logout.rb | test/admin_ui/login/test_logout.rb | require_relative "../../test_helper"
class Test::AdminUi::Login::TestLogout < Minitest::Capybara::Test
include Capybara::Screenshot::MiniTestPlugin
include ApiUmbrellaTestHelpers::AdminAuth
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
@admin = FactoryBot.create(:admin)
end... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/processes/test_fluent_bit.rb | test/processes/test_fluent_bit.rb | require_relative "../test_helper"
class Test::Processes::TestFluentBit < Minitest::Test
include ApiUmbrellaTestHelpers::Setup
include ApiUmbrellaTestHelpers::Logging
def setup
super
setup_server
end
# To make sure fluent-bit doesn't leak memory while logging requests
def test_memory_leak
log_... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/processes/test_trafficserver.rb | test/processes/test_trafficserver.rb | require_relative "../test_helper"
class Test::Processes::TestTrafficserver < Minitest::Test
include ApiUmbrellaTestHelpers::Setup
include ApiUmbrellaTestHelpers::Logging
def setup
super
setup_server
end
def test_trafficserver_logging
# Default file-based logging.
access_log_tail = LogTail.n... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/processes/test_geoip_auto_updater.rb | test/processes/test_geoip_auto_updater.rb | require_relative "../test_helper"
class Test::Processes::TestGeoipAutoUpdater < Minitest::Test
include ApiUmbrellaTestHelpers::Setup
include Minitest::Hooks
def setup
super
setup_server
@@geoip_path = File.join($config.fetch("db_dir"), "geoip/GeoLite2-City.mmdb")
once_per_class_setup do
... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/processes/test_config.rb | test/processes/test_config.rb | require_relative "../test_helper"
class Test::Processes::TestConfig < Minitest::Test
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
end
def test_migrates_legacy_cached_values
legacy_path = File.join($config["run_dir"], "cached_random_config_values.yml")
new_path = File.joi... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/processes/test_reloads.rb | test/processes/test_reloads.rb | require_relative "../test_helper"
class Test::Processes::TestReloads < Minitest::Test
include ApiUmbrellaTestHelpers::Setup
include ApiUmbrellaTestHelpers::Lsof
def setup
super
setup_server
end
def test_no_file_descriptor_leaks_across_nginx_reloads
all_reload_descriptors = []
all_reload_ura... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/processes/test_network_binds.rb | test/processes/test_network_binds.rb | require_relative "../test_helper"
class Test::Processes::TestNetworkBinds < Minitest::Test
include ApiUmbrellaTestHelpers::Setup
include ApiUmbrellaTestHelpers::Lsof
def setup
super
setup_server
end
def test_binds_http_to_public_interface_other_services_to_localhost
files = lsof("-i", "TCP", "-... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/processes/test_rpaths.rb | test/processes/test_rpaths.rb | require_relative "../test_helper"
require "find"
class Test::Processes::TestRpaths < Minitest::Test
include ApiUmbrellaTestHelpers::Setup
# Ensure that any binaries have RPATH settings stripped before they're
# installed. This ensures that the load path is always determined by
# LD_LIBRARY_PATH, rather than w... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/test/processes/test_file_permissions.rb | test/processes/test_file_permissions.rb | require_relative "../test_helper"
class Test::Processes::TestFilePermissions < Minitest::Test
include ApiUmbrellaTestHelpers::Setup
def setup
super
setup_server
once_per_class_setup do
@@user_uid = nil
@@group_gid = nil
@@process_uid = ::Process.euid
@@process_gid = ::Process.e... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/build/package/verify/spec/spec_helper.rb | build/package/verify/spec/spec_helper.rb | require "serverspec"
# Wipe the bundler environment variables, so they don't propagate down to the
# various api-umbrella restart commands the tests run (otherwise, the
# api-umbrella processes might try to use this verify bundle for starting the
# web app).
#
# Note: This shouldn't be necessary once we're only testin... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
NREL/api-umbrella | https://github.com/NREL/api-umbrella/blob/eac5a7c32d971c7f193179da3469d3cbd561d590/build/package/verify/spec/localhost/service_spec.rb | build/package/verify/spec/localhost/service_spec.rb | require "spec_helper"
require "multi_json"
require "net/https"
require "uri"
require "yaml"
MultiJson.use(:ok_json)
RSpec.shared_examples("installed") do
it "installs the package" do
expect(package("api-umbrella")).to be_installed
end
it "enables the service" do
expect(service("api-umbrella")).to be_e... | ruby | MIT | eac5a7c32d971c7f193179da3469d3cbd561d590 | 2026-01-04T15:57:56.164132Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/langchain_test.rb | test/langchain_test.rb | require "test_helper"
class LangchainTest < ActiveSupport::TestCase
test "it has a version number" do
assert Langchain::VERSION
end
end
| ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/test_helper.rb | test/test_helper.rb | # Configure Rails Environment
ENV["RAILS_ENV"] = "test"
require_relative "../test/dummy/config/environment"
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../test/dummy/db/migrate", __dir__)]
ActiveRecord::Migrator.migrations_paths << File.expand_path("../db/migrate", __dir__)
require "rails/test_help"
... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/integration/navigation_test.rb | test/integration/navigation_test.rb | require "test_helper"
class NavigationTest < ActionDispatch::IntegrationTest
# test "the truth" do
# assert true
# end
end
| ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/dummy/app/jobs/application_job.rb | test/dummy/app/jobs/application_job.rb | class ApplicationJob < ActiveJob::Base
# Automatically retry jobs that encountered a deadlock
# retry_on ActiveRecord::Deadlocked
# Most jobs are safe to ignore if the underlying records are no longer available
# discard_on ActiveJob::DeserializationError
end
| ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/dummy/app/helpers/application_helper.rb | test/dummy/app/helpers/application_helper.rb | module ApplicationHelper
end
| ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/dummy/app/controllers/application_controller.rb | test/dummy/app/controllers/application_controller.rb | class ApplicationController < ActionController::Base
# Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has.
allow_browser versions: :modern
end
| ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/dummy/app/models/application_record.rb | test/dummy/app/models/application_record.rb | class ApplicationRecord < ActiveRecord::Base
primary_abstract_class
end
| ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/dummy/config/application.rb | test/dummy/config/application.rb | require_relative "boot"
require "rails"
# Pick the frameworks you want:
require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
require "active_storage/engine"
require "action_controller/railtie"
# require "action_mailer/railtie"
require "action_mailbox/engine"
require "action_text/... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/dummy/config/environment.rb | test/dummy/config/environment.rb | # Load the Rails application.
require_relative "application"
# Initialize the Rails application.
Rails.application.initialize!
| ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/dummy/config/puma.rb | test/dummy/config/puma.rb | # This configuration file will be evaluated by Puma. The top-level methods that
# are invoked here are part of Puma's configuration DSL. For more information
# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html.
#
# Puma starts a configurable number of processes (workers) and each process
# serve... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/dummy/config/routes.rb | test/dummy/config/routes.rb | Rails.application.routes.draw do
mount Langchain::Engine => "/langchain"
end
| ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/dummy/config/boot.rb | test/dummy/config/boot.rb | # Set up gems listed in the Gemfile.
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile", __dir__)
require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])
$LOAD_PATH.unshift File.expand_path("../../../lib", __dir__)
| ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/dummy/config/initializers/content_security_policy.rb | test/dummy/config/initializers/content_security_policy.rb | # Be sure to restart your server when you modify this file.
# Define an application-wide content security policy.
# See the Securing Rails Applications Guide for more information:
# https://guides.rubyonrails.org/security.html#content-security-policy-header
# Rails.application.configure do
# config.content_security... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/dummy/config/initializers/filter_parameter_logging.rb | test/dummy/config/initializers/filter_parameter_logging.rb | # Be sure to restart your server when you modify this file.
# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
# Use this to limit dissemination of sensitive information.
# See the ActiveSupport::ParameterFilter documentation for supported notations and behavio... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/dummy/config/initializers/inflections.rb | test/dummy/config/initializers/inflections.rb | # Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflec... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/dummy/config/initializers/assets.rb | test/dummy/config/initializers/assets.rb | # Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
# Rails.application.config.assets.version = "1.0"
# Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path
| ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/dummy/config/environments/test.rb | test/dummy/config/environments/test.rb | # The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
Rails.application.configure do
# Settings... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/dummy/config/environments/development.rb | test/dummy/config/environments/development.rb | require "active_support/core_ext/integer/time"
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Make code changes take effect immediately without server restart.
config.enable_reloading = true
# Do not eager load code on boot.
config.eager... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/test/dummy/config/environments/production.rb | test/dummy/config/environments/production.rb | require "active_support/core_ext/integer/time"
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.enable_reloading = false
# Eager load code on boot for better performance and memory savings (ignor... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/dependency_helper_spec.rb | spec/dependency_helper_spec.rb | # frozen_string_literal: true
RSpec.describe "depends_on" do
subject do
object = Object.new
object.extend(Langchain::DependencyHelper)
object
end
it "doesn't raise an error if the gem is included" do
expect { subject.depends_on("rspec") }.not_to raise_error
end
it "raises an error if the ge... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/rails_helper.rb | spec/rails_helper.rb | # This file is copied to spec/ when you run 'rails generate rspec:install'
require "spec_helper"
ENV["RAILS_ENV"] ||= "test"
require File.expand_path("../test/dummy/config/environment", __dir__)
require "rspec/rails"
require "langchain"
# Prevent database truncation if the environment is production
abort("The Rails en... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/langchain_spec.rb | spec/langchain_spec.rb | # frozen_string_literal: true
RSpec.describe Langchain do
it "has a version number" do
expect(Langchain::VERSION).not_to be nil
end
end
| ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/tool_definition_spec.rb | spec/tool_definition_spec.rb | # frozen_string_literal: true
require "spec_helper"
RSpec.describe Langchain::ToolDefinition do
let(:dummy_class) do
Class.new do
extend Langchain::ToolDefinition
def self.name
"DummyTool"
end
end
end
describe "Module inclusion" do
it "adds expected methods to the class" ... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/tool_response_spec.rb | spec/tool_response_spec.rb | # frozen_string_literal: true
require "spec_helper"
RSpec.describe Langchain::ToolResponse do
describe "#initialize" do
context "with content" do
subject(:response) { described_class.new(content: "test content") }
it "creates a valid instance" do
expect(response).to be_a(described_class)
... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/spec_helper.rb | spec/spec_helper.rb | require "support/custom_matchers"
require "support/vcr"
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# The generated `.rspec` file contains `--require spec_helper` which will cause
# this file t... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/support/vcr.rb | spec/support/vcr.rb | require "webmock"
require "vcr"
VCR.configure do |config|
config.cassette_library_dir = "spec/fixtures/vcr_cassettes"
config.hook_into :webmock
config.default_cassette_options = {
record: :once,
record_on_error: false,
match_requests_on: %i[method uri body]
}
# config.filter_sensitive_data("<OPE... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/support/custom_matchers.rb | spec/support/custom_matchers.rb | module CustomMatchers
# Validates that the array is of certain size
# @param size [Integer] Array size/length
def array_with_strings_matcher(size:)
proc do |array|
array.is_a?(Array) &&
array.length == size &&
array.all? { |e| e.is_a?(String) }
end
end
end
| ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/lib/langchain/chunk_spec.rb | spec/lib/langchain/chunk_spec.rb | # frozen_string_literal: true
require "rails_helper"
RSpec.describe Langchain::Chunk do
subject { described_class.new(text: "Hello World") }
it "has a text" do
expect(subject.text).to eq("Hello World")
end
end
| ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/lib/langchain/loader_spec.rb | spec/lib/langchain/loader_spec.rb | # frozen_string_literal: true
RSpec.describe Langchain::Loader do
describe "#load" do
let(:status) { ["200", "OK"] }
let(:body) { "Lorem Ipsum" }
let(:content_type) { "text/plain" }
let(:response) { double("response", status: status, read: body, content_type: content_type) }
subject { described_... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/lib/langchain/data_spec.rb | spec/lib/langchain/data_spec.rb | # frozen_string_literal: true
RSpec.describe Langchain::Data do
let(:source) { "spec/fixtures/loaders/example.txt" }
let(:data) { File.read(source) }
subject { described_class.new(data, source: source) }
describe "#chunks" do
it "returns an array of chunks" do
chunks = subject.chunks
split_da... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/lib/langchain/chunker/text_spec.rb | spec/lib/langchain/chunker/text_spec.rb | # frozen_string_literal: true
RSpec.describe Langchain::Chunker::Text do
let(:source) { "spec/fixtures/loaders/example.txt" }
let(:text) { File.read(source) }
subject {
described_class.new(text,
chunk_size: 1000,
chunk_overlap: 200,
separator: "\n\n")
}
describe "#chunks" do
it "r... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/lib/langchain/chunker/recursive_text_spec.rb | spec/lib/langchain/chunker/recursive_text_spec.rb | # frozen_string_literal: true
RSpec.describe Langchain::Chunker::RecursiveText do
let(:source) { "spec/fixtures/loaders/random_facts.txt" }
let(:text) { File.read(source) }
subject {
described_class.new(text,
chunk_size: 1000,
chunk_overlap: 200,
separators: ["\n\n"])
}
describe "#chu... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/lib/langchain/chunker/semantic_spec.rb | spec/lib/langchain/chunker/semantic_spec.rb | # frozen_string_literal: true
RSpec.describe Langchain::Chunker::Semantic do
let(:source) { "spec/fixtures/loaders/random_facts.txt" }
let(:text) { File.read(source) }
let(:llm) { Langchain::LLM::OpenAI.new(api_key: "123") }
subject { described_class.new(text, llm: llm) }
describe "#chunks" do
it "retu... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/lib/langchain/chunker/base_spec.rb | spec/lib/langchain/chunker/base_spec.rb | # frozen_string_literal: true
RSpec.describe Langchain::Chunker::Base do
describe "#chunks" do
it "raises NotImplementedError" do
expect { described_class.new.chunks }.to raise_error(NotImplementedError)
end
end
end
| ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/lib/langchain/chunker/sentence_spec.rb | spec/lib/langchain/chunker/sentence_spec.rb | # frozen_string_literal: true
RSpec.describe Langchain::Chunker::Sentence do
let(:source) { "spec/fixtures/loaders/the_alchemist.txt" }
let(:text) { File.read(source) }
subject { described_class.new(text) }
describe "#chunks" do
it "returns an array of chunks" do
expect(subject.chunks.count).to eq(... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/lib/langchain/chunker/markdown_spec.rb | spec/lib/langchain/chunker/markdown_spec.rb | # frozen_string_literal: true
RSpec.describe Langchain::Chunker::Markdown do
let(:source) { "spec/fixtures/loaders/example.md" }
let(:markdown) { File.read(source) }
subject {
described_class.new(markdown,
chunk_size: 1000,
chunk_overlap: 200)
}
describe "#chunks" do
it "returns an arra... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/lib/langchain/evals/ragas/context_relevance_spec.rb | spec/lib/langchain/evals/ragas/context_relevance_spec.rb | # frozen_string_literal: true
RSpec.describe Langchain::Evals::Ragas::ContextRelevance do
let(:llm) { Langchain::LLM::OpenAI.new(api_key: "123") }
subject { described_class.new(llm: llm) }
let(:question) { "When was the Chimnabai Clock Tower completed, and who was it named after?" }
let(:context) { "The Chimn... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/lib/langchain/evals/ragas/answer_relevance_spec.rb | spec/lib/langchain/evals/ragas/answer_relevance_spec.rb | # frozen_string_literal: true
RSpec.describe Langchain::Evals::Ragas::AnswerRelevance do
let(:llm) { Langchain::LLM::OpenAI.new(api_key: "123") }
subject { described_class.new(llm: llm, batch_size: 1) }
let(:question) { "When is the scheduled launch date and time for the PSLV-C56 mission, and where will it be l... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
patterns-ai-core/langchainrb | https://github.com/patterns-ai-core/langchainrb/blob/fca40568a1d5632d9efc8cf8779343bbbe03dc99/spec/lib/langchain/evals/ragas/faithfulness_spec.rb | spec/lib/langchain/evals/ragas/faithfulness_spec.rb | # frozen_string_literal: true
RSpec.describe Langchain::Evals::Ragas::Faithfulness do
let(:llm) { Langchain::LLM::OpenAI.new(api_key: "123") }
subject { described_class.new(llm: llm) }
let(:question) { "Who directed the film Oppenheimer and who stars as J. Robert Oppenheimer in the film?" }
let(:answer) { "Ch... | ruby | MIT | fca40568a1d5632d9efc8cf8779343bbbe03dc99 | 2026-01-04T15:59:30.394142Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.