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 |
|---|---|---|---|---|---|---|---|---|
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/footnote.rb | _vendor/ruby/2.6.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/footnote.rb | # -*- coding: utf-8 -*-
#
#--
# Copyright (C) 2009-2016 Thomas Leitner <t_leitner@gmx.at>
#
# This file is part of kramdown which is licensed under the MIT.
#++
#
require 'kramdown/parser/kramdown/extensions'
require 'kramdown/parser/kramdown/blank_line'
require 'kramdown/parser/kramdown/codeblock'
module Kramdown
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/html.rb | _vendor/ruby/2.6.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/html.rb | # -*- coding: utf-8 -*-
#
#--
# Copyright (C) 2009-2016 Thomas Leitner <t_leitner@gmx.at>
#
# This file is part of kramdown which is licensed under the MIT.
#++
#
require 'kramdown/parser/html'
module Kramdown
module Parser
class Kramdown
include Kramdown::Parser::Html::Parser
# Mapping of markdow... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_plugins/read_time.rb | _plugins/read_time.rb | # Calculates reading time based on the formula used by Medium
# https://medium.com/the-story/read-time-and-you-bc2048ab620c
# Usage: {{ page.content | read_time }}
# Note: this requires img tags to be in the form of <img ... />. If you're
# using this on a post listing page, make sure to markdownify the post content
#... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_plugins/authors.rb | _plugins/authors.rb | module Authors
class Generator < Jekyll::Generator
def generate(site)
# Small method to augment the author object with posts authored by them.
authors_posts = Hash.new { |h, k| h[k] = [] }
site.posts.docs.each do |post|
post['authors'].each do |author_id|
authors_posts[author_i... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/.scripts/bump-version.rb | .scripts/bump-version.rb | file_name = "lib/fastlane/plugin/sentry/version.rb"
text = File.read(file_name)
# The whitespaces are important :P
new_contents = text.gsub(/^ VERSION = ".*"/, " VERSION = \"#{ARGV[1]}\"")
File.open(file_name, "w") {|file| file.puts new_contents }
| ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/spec/sentry_helper_spec.rb | spec/sentry_helper_spec.rb | describe Fastlane::Helper::SentryHelper do
describe "call_sentry_cli" do
it "uses cli path resolved by find_and_check_sentry_cli_path!" do
sentry_cli_path = 'path'
options = {}
expect(Fastlane::Helper::SentryHelper).to receive(:find_and_check_sentry_cli_path!).with(options).and_return(sentry_cli... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/spec/sentry_upload_build_spec.rb | spec/sentry_upload_build_spec.rb | module Fastlane
module Actions
def self.lane_context
@lane_context ||= {}
end
end
module SharedValues
XCODEBUILD_ARCHIVE ||= :xcodebuild_archive
end
end
describe Fastlane do
describe Fastlane::FastFile do
describe "upload build" do
# We'll use the dSYM file as a mock xcarchive fo... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/spec/sentry_set_commits_spec.rb | spec/sentry_set_commits_spec.rb | describe Fastlane do
describe Fastlane::FastFile do
describe "set commits" do
it "accepts app_identifier" do
allow(CredentialsManager::AppfileConfig).to receive(:try_fetch_value).with(:app_identifier).and_return(false)
expect(Fastlane::Helper::SentryConfig).to receive(:parse_api_params).and_... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/spec/sentry_config_spec.rb | spec/sentry_config_spec.rb | describe Fastlane::Helper::SentryConfig do
describe "fallback .sentryclirc" do
it "auth failing calling sentry-cli info" do
expect(Fastlane::Helper::SentryHelper).to receive(:call_sentry_cli).with(anything, ["info", "--config-status-json"]).and_return("{\"auth\":{\"type\":null,\"successful\":false}}")
... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/spec/sentry_debug_files_upload_spec.rb | spec/sentry_debug_files_upload_spec.rb | describe Fastlane do
describe Fastlane::FastFile do
describe "debug-files upload" do
it "includes --path if present" do
expect(Fastlane::Helper::SentryConfig).to receive(:parse_api_params).and_return(true)
expect(Fastlane::Helper::SentryHelper).to receive(:call_sentry_cli).with(anything, ["d... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/spec/sentry_upload_dsym_spec.rb | spec/sentry_upload_dsym_spec.rb | describe Fastlane do
describe Fastlane::FastFile do
describe "upload dsym" do
it "fails with API key and auth token" do
dsym_path_1 = File.absolute_path './assets/SwiftExample.app.dSYM.zip'
expect do
Fastlane::FastFile.new.parse("lane :test do
sentry_upload_dsym(
... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/spec/sentry_check_cli_installed_spec.rb | spec/sentry_check_cli_installed_spec.rb | describe Fastlane do
describe Fastlane::FastFile do
describe "check cli installed" do
it "success when find_and_check_sentry_cli_path passes" do
expect(Fastlane::Helper::SentryHelper).to receive(:find_and_check_sentry_cli_path!).and_return('path')
Fastlane::FastFile.new.parse("lane :test do... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/spec/sentry_upload_sourcemap_spec.rb | spec/sentry_upload_sourcemap_spec.rb | describe Fastlane do
describe Fastlane::FastFile do
describe "upload_sourcemap" do
it "fails with invalid sourcemap path" do
sourcemap_path = File.absolute_path './assets/this_does_not_exist.js.map'
expect do
Fastlane::FastFile.new.parse("lane :test do
sentry_upload_sou... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/spec/sentry_create_release_spec.rb | spec/sentry_create_release_spec.rb | describe Fastlane do
describe Fastlane::FastFile do
describe "create release" do
it "accepts app_identifier" do
allow(CredentialsManager::AppfileConfig).to receive(:try_fetch_value).with(:app_identifier).and_return(false)
expect(Fastlane::Helper::SentryConfig).to receive(:parse_api_params).a... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/spec/sentry_finalize_release_spec.rb | spec/sentry_finalize_release_spec.rb | describe Fastlane do
describe Fastlane::FastFile do
describe "finalize release" do
it "accepts app_identifier" do
allow(CredentialsManager::AppfileConfig).to receive(:try_fetch_value).with(:app_identifier).and_return(false)
expect(Fastlane::Helper::SentryConfig).to receive(:parse_api_params)... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/spec/sentry_upload_proguard_spec.rb | spec/sentry_upload_proguard_spec.rb | describe Fastlane do
describe Fastlane::FastFile do
describe "upload proguard" do
it "fails with API key and auth token" do
mapping_path = File.absolute_path './assets/AndroidExample.mapping.txt'
expect do
Fastlane::FastFile.new.parse("lane :test do
sentry_upload_progu... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/spec/sentry_upload_dif_spec.rb | spec/sentry_upload_dif_spec.rb | describe Fastlane do
describe Fastlane::FastFile do
describe "upload-dif" do
it "includes --path if present" do
expect(Fastlane::Helper::SentryConfig).to receive(:parse_api_params).and_return(true)
expect(Fastlane::Helper::SentryHelper).to receive(:call_sentry_cli).with(anything, ["upload-di... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/spec/sentry_create_deploy_spec.rb | spec/sentry_create_deploy_spec.rb | describe Fastlane do
describe Fastlane::FastFile do
describe "create deploy" do
it "accepts app_identifier" do
allow(CredentialsManager::AppfileConfig).to receive(:try_fetch_value).with(:app_identifier).and_return(false)
expect(Fastlane::Helper::SentryConfig).to receive(:parse_api_params).an... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/spec/spec_helper.rb | spec/spec_helper.rb | $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
# This module is only used to check the environment is currently a testing env
module SpecHelper
end
require 'fastlane' # to import the Action super class
require 'fastlane/plugin/sentry' # import the actual plugin
Fastlane.load_actions # load other actions (in ... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/lib/fastlane/plugin/sentry.rb | lib/fastlane/plugin/sentry.rb | require 'fastlane/plugin/sentry/version'
module Fastlane
module Sentry
# Return all .rb files inside the "actions" and "helper" directory
def self.all_classes
Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
end
end
end
# By default we want to import all available actio... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/lib/fastlane/plugin/sentry/version.rb | lib/fastlane/plugin/sentry/version.rb | module Fastlane
module Sentry
VERSION = "1.36.0"
end
end
| ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/lib/fastlane/plugin/sentry/actions/sentry_upload_sourcemap.rb | lib/fastlane/plugin/sentry/actions/sentry_upload_sourcemap.rb | module Fastlane
module Actions
class SentryUploadSourcemapAction < Action
def self.run(params)
require 'shellwords'
Helper::SentryConfig.parse_api_params(params)
version = params[:version]
version = "#{params[:app_identifier]}@#{params[:version]}" if params[:app_identifier]... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/lib/fastlane/plugin/sentry/actions/sentry_create_deploy.rb | lib/fastlane/plugin/sentry/actions/sentry_create_deploy.rb | module Fastlane
module Actions
class SentryCreateDeployAction < Action
def self.run(params)
require 'shellwords'
Helper::SentryConfig.parse_api_params(params)
version = params[:version]
version = "#{params[:app_identifier]}@#{params[:version]}" if params[:app_identifier]
... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/lib/fastlane/plugin/sentry/actions/sentry_check_cli_installed.rb | lib/fastlane/plugin/sentry/actions/sentry_check_cli_installed.rb | module Fastlane
module Actions
class SentryCheckCliInstalledAction < Action
def self.run(params)
Helper::SentryHelper.find_and_check_sentry_cli_path!(params)
UI.success("Successfully checked that sentry-cli is installed")
end
#####################################################... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/lib/fastlane/plugin/sentry/actions/sentry_upload_proguard.rb | lib/fastlane/plugin/sentry/actions/sentry_upload_proguard.rb | module Fastlane
module Actions
class SentryUploadProguardAction < Action
def self.run(params)
Helper::SentryConfig.parse_api_params(params)
mapping_path = params[:mapping_path]
# Verify file exists
UI.user_error!("Mapping file does not exist at path: #{mapping_path}") unles... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/lib/fastlane/plugin/sentry/actions/sentry_upload_dif.rb | lib/fastlane/plugin/sentry/actions/sentry_upload_dif.rb | module Fastlane
module Actions
class SentryUploadDifAction < Action
def self.run(params)
require 'shellwords'
UI.deprecated("This action is deprecated. Please use the `sentry_debug_files_upload` action.")
Helper::SentryConfig.parse_api_params(params)
paths = params[:path]
... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/lib/fastlane/plugin/sentry/actions/sentry_upload_dsym.rb | lib/fastlane/plugin/sentry/actions/sentry_upload_dsym.rb | module Fastlane
module Actions
class SentryUploadDsymAction < Action
def self.run(params)
UI.deprecated("This action is deprecated. Please use the `sentry_debug_files_upload` action.")
Helper::SentryConfig.parse_api_params(params)
# Params - dSYM
dsym_path = params[:dsym_pa... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/lib/fastlane/plugin/sentry/actions/sentry_create_release.rb | lib/fastlane/plugin/sentry/actions/sentry_create_release.rb | module Fastlane
module Actions
class SentryCreateReleaseAction < Action
def self.run(params)
require 'shellwords'
Helper::SentryConfig.parse_api_params(params)
version = params[:version]
version = "#{params[:app_identifier]}@#{params[:version]}" if params[:app_identifier]
... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/lib/fastlane/plugin/sentry/actions/sentry_debug_files_upload.rb | lib/fastlane/plugin/sentry/actions/sentry_debug_files_upload.rb | module Fastlane
module Actions
class SentryDebugFilesUploadAction < Action
def self.run(params)
require 'shellwords'
Helper::SentryConfig.parse_api_params(params)
paths = params[:path]
paths = ['.'] if paths.nil?
command = [
"debug-files",
"uplo... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/lib/fastlane/plugin/sentry/actions/sentry_finalize_release.rb | lib/fastlane/plugin/sentry/actions/sentry_finalize_release.rb | module Fastlane
module Actions
class SentryFinalizeReleaseAction < Action
def self.run(params)
require 'shellwords'
Helper::SentryConfig.parse_api_params(params)
version = params[:version]
version = "#{params[:app_identifier]}@#{params[:version]}" if params[:app_identifier]... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/lib/fastlane/plugin/sentry/actions/sentry_upload_build.rb | lib/fastlane/plugin/sentry/actions/sentry_upload_build.rb | module Fastlane
module Actions
class SentryUploadBuildAction < Action
def self.run(params)
Helper::SentryConfig.parse_api_params(params)
# Verify xcarchive path
xcarchive_path = params[:xcarchive_path]
UI.user_error!("Could not find xcarchive at path '#{xcarchive_path}'") un... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/lib/fastlane/plugin/sentry/actions/sentry_set_commits.rb | lib/fastlane/plugin/sentry/actions/sentry_set_commits.rb | module Fastlane
module Actions
class SentrySetCommitsAction < Action
def self.run(params)
require 'shellwords'
Helper::SentryConfig.parse_api_params(params)
version = params[:version]
version = "#{params[:app_identifier]}@#{params[:version]}" if params[:app_identifier]
... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/lib/fastlane/plugin/sentry/helper/sentry_config.rb | lib/fastlane/plugin/sentry/helper/sentry_config.rb | module Fastlane
module Helper
class SentryConfig
def self.common_cli_config_items
[
FastlaneCore::ConfigItem.new(key: :sentry_cli_path,
env_name: "SENTRY_CLI_PATH",
description: "Path to your sentry-cli. Defaults... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
getsentry/sentry-fastlane-plugin | https://github.com/getsentry/sentry-fastlane-plugin/blob/1210921f1787d66ab0f0fa02c8e7dabc3d966480/lib/fastlane/plugin/sentry/helper/sentry_helper.rb | lib/fastlane/plugin/sentry/helper/sentry_helper.rb | require 'os'
module Fastlane
module Helper
class SentryHelper
def self.find_and_check_sentry_cli_path!(params)
bundled_sentry_cli_path = self.bundled_sentry_cli_path
bundled_sentry_cli_version = Gem::Version.new(`#{bundled_sentry_cli_path} --version`.scan(/(?:\d+\.?){3}/).first)
se... | ruby | MIT | 1210921f1787d66ab0f0fa02c8e7dabc3d966480 | 2026-01-04T17:37:17.505722Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/benchmarks.rb | dev/test/benchmarks.rb | # frozen_string_literal: true
require "benchmark"
require_relative "../lib/product_taxonomy"
module ProductTaxonomy
# These benchmarks are not part of the test suite, but are useful as a sanity check during development.
# They're not part of the test suite because the runtimes fluctuate depending on the machine, ... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/benchmark_test.rb | dev/test/benchmark_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
class BenchmarkTest < Minitest::Benchmark
class << self
def bench_range
(1..10000).step(1000)
end
end
def bench_load_values
source_data = YAML.safe_load_file("../data/values.yml")
Value.load_from_... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/test_helper.rb | dev/test/test_helper.rb | # frozen_string_literal: true
$LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
require "product_taxonomy"
require "product_taxonomy/cli"
require "active_support/testing/autorun"
require "minitest/benchmark"
require "minitest/pride"
require "minitest/hooks/default"
require "mocha/minitest"
module ProductTaxono... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/identifier_formatter_test.rb | dev/test/identifier_formatter_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
class IdentifierFormatterTest < TestCase
test "format_friendly_id with special characters" do
assert_equal "apparel_accessories", IdentifierFormatter.format_friendly_id("Apparel & Accessories")
end
test "format_handle with... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/product_taxonomy_test.rb | dev/test/product_taxonomy_test.rb | # frozen_string_literal: true
require "test_helper"
class ProductTaxonomyTest < ActiveSupport::TestCase
test "it has a version number" do
assert true
end
end
| ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/localizations_validator_test.rb | dev/test/localizations_validator_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
class LocalizationsValidatorTest < TestCase
setup do
@category = Category.new(id: "test-1", name: "Test Category")
@attribute = Attribute.new(
id: 1,
name: "Test Attribute",
friendly_id: "test_attr",
... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/integration/mapping_validation_test.rb | dev/test/integration/mapping_validation_test.rb | # frozen_string_literal: true
require_relative "../test_helper"
module ProductTaxonomy
class MappingValidationTest < TestCase
DIST_PATH = GenerateDistCommand::OUTPUT_PATH
def setup
@mappings_json_data = JSON.parse(File.read(File.expand_path("en/integrations/all_mappings.json", DIST_PATH)))
end
... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/integration/distribution_matches_data_test.rb | dev/test/integration/distribution_matches_data_test.rb | # frozen_string_literal: true
require_relative "../test_helper"
module ProductTaxonomy
class DistributionMatchesDataTest < TestCase
include Minitest::Hooks
parallelize(workers: 1) # disable parallelization
DIST_PATH = GenerateDistCommand::OUTPUT_PATH
test "dist/ files match the system" do
di... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/integration/all_data_files_import_test.rb | dev/test/integration/all_data_files_import_test.rb | # frozen_string_literal: true
require_relative "../test_helper"
module ProductTaxonomy
class AllDataFilesImportTest < ActiveSupport::TestCase
include Minitest::Hooks
parallelize(workers: 1) # disable parallelization
# I don't _actually_ suck ;-) we need this so that we can load the data a single time to... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/integration/generate_mappings_dist_test.rb | dev/test/integration/generate_mappings_dist_test.rb | # frozen_string_literal: true
require_relative "../test_helper"
require "tmpdir"
module ProductTaxonomy
class GenerateMappingsDistTest < TestCase
FIXTURES_PATH = File.expand_path("../fixtures", __dir__)
setup do
@tmp_path = Dir.mktmpdir
@current_shopify_version = "2025-01-unstable"
# Cre... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/commands/dump_values_command_test.rb | dev/test/commands/dump_values_command_test.rb | # frozen_string_literal: true
require "test_helper"
require "tmpdir"
module ProductTaxonomy
class DumpValuesCommandTest < TestCase
setup do
@tmp_base_path = Dir.mktmpdir
@real_base_path = File.expand_path("..", ProductTaxonomy.data_path)
FileUtils.mkdir_p(File.expand_path("data", @tmp_base_pa... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/commands/command_test.rb | dev/test/commands/command_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
class CommandTest < TestCase
class TestCommand < Command
def execute
logger.debug("Debug message")
logger.info("Info message")
logger.error("Error message")
end
end
test "run runs the command ... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/commands/dump_categories_command_test.rb | dev/test/commands/dump_categories_command_test.rb | # frozen_string_literal: true
require "test_helper"
require "tmpdir"
module ProductTaxonomy
class DumpCategoriesCommandTest < TestCase
setup do
@tmp_base_path = Dir.mktmpdir
@real_base_path = File.expand_path("..", ProductTaxonomy.data_path)
FileUtils.mkdir_p(File.expand_path("data/categories... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/commands/add_category_command_test.rb | dev/test/commands/add_category_command_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
class AddCategoryCommandTest < TestCase
setup do
@root_category = Category.new(id: "aa", name: "Root Category")
@child_category = Category.new(id: "aa-1", name: "Child Category", parent: @root_category)
@root_category.a... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/commands/add_attribute_command_test.rb | dev/test/commands/add_attribute_command_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
class AddAttributeCommandTest < TestCase
setup do
@base_attribute = Attribute.new(
id: 1,
name: "Color",
description: "Defines the primary color or pattern",
friendly_id: "color",
handle: "co... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/commands/dump_attributes_command_test.rb | dev/test/commands/dump_attributes_command_test.rb | # frozen_string_literal: true
require "test_helper"
require "tmpdir"
module ProductTaxonomy
class DumpAttributesCommandTest < TestCase
setup do
@tmp_base_path = Dir.mktmpdir
@real_base_path = File.expand_path("..", ProductTaxonomy.data_path)
FileUtils.mkdir_p(File.expand_path("data", @tmp_bas... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/commands/add_attributes_to_categories_command_test.rb | dev/test/commands/add_attributes_to_categories_command_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
class AddAttributesToCategoriesCommandTest < TestCase
setup do
@color_attribute = Attribute.new(
id: 1,
name: "Color",
description: "Defines the primary color or pattern",
friendly_id: "color",
... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/commands/generate_release_command_test.rb | dev/test/commands/generate_release_command_test.rb | # frozen_string_literal: true
require "test_helper"
require "tmpdir"
module ProductTaxonomy
class GenerateReleaseCommandTest < TestCase
setup do
@tmp_base_path = Dir.mktmpdir
@version = "2024-01"
@next_version = "2024-02-unstable"
@version_file_path = File.expand_path("VERSION", @tmp_bas... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/commands/generate_docs_command_test.rb | dev/test/commands/generate_docs_command_test.rb | # frozen_string_literal: true
require "test_helper"
require "tmpdir"
module ProductTaxonomy
class GenerateDocsCommandTest < TestCase
setup do
@tmp_base_path = Dir.mktmpdir
@real_base_path = File.expand_path("..", ProductTaxonomy.data_path)
# Create test files
FileUtils.mkdir_p(File.expa... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/commands/sync_en_localizations_command_test.rb | dev/test/commands/sync_en_localizations_command_test.rb | # frozen_string_literal: true
require "test_helper"
require "tmpdir"
module ProductTaxonomy
class SyncEnLocalizationsCommandTest < TestCase
setup do
@tmp_base_path = Dir.mktmpdir
@real_base_path = File.expand_path("..", ProductTaxonomy.data_path)
FileUtils.mkdir_p(File.expand_path("data/local... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/commands/dump_integration_full_names_command_test.rb | dev/test/commands/dump_integration_full_names_command_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
class DumpIntegrationFullNamesCommandTest < TestCase
setup do
@tmp_base_path = Dir.mktmpdir
@integrations_path = File.expand_path("data/integrations", @tmp_base_path)
FileUtils.mkdir_p(@integrations_path)
File.wr... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/commands/add_value_command_test.rb | dev/test/commands/add_value_command_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
class AddValueCommandTest < TestCase
setup do
@attribute = Attribute.new(
id: 1,
name: "Color",
description: "Defines the primary color or pattern",
friendly_id: "color",
handle: "color",
... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/attribute_test.rb | dev/test/models/attribute_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
class AttributeTest < TestCase
setup do
@value = Value.new(
id: 1,
name: "Black",
friendly_id: "color__black",
handle: "color__black",
)
@attribute = Attribute.new(
id: 1,
... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/category_test.rb | dev/test/models/category_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
class CategoryTest < TestCase
setup do
@root = Category.new(id: "aa", name: "Root")
@child = Category.new(id: "aa-1", name: "Child")
@root.add_child(@child)
@grandchild = Category.new(id: "aa-1-1", name: "Grandchi... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/integration_version_test.rb | dev/test/models/integration_version_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
class IntegrationVersionTest < TestCase
DATA_PATH = File.expand_path("../fixtures/data", __dir__)
setup do
aa = Category.new(id: "aa", name: "Apparel & Accessories")
aa_1 = Category.new(id: "aa-1", name: "Clothing")
... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/value_test.rb | dev/test/models/value_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
class ValueTest < TestCase
setup do
@value = Value.new(id: 1, name: "Black", friendly_id: "color__black", handle: "color__black")
@attribute = Attribute.new(
id: 1,
name: "Color",
friendly_id: "color",... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/mapping_rule_test.rb | dev/test/models/mapping_rule_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
class MappingRuleTest < TestCase
setup do
@shopify_category = Category.new(id: "aa", name: "Shopify category")
@integration_category = {
"id" => "166",
"full_name" => "Integration category",
}
Cate... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/extended_attribute_test.rb | dev/test/models/extended_attribute_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
class ExtendedAttributeTest < TestCase
test "validates values_from is an attribute" do
extended_attribute = ExtendedAttribute.new(
name: "Clothing Color",
description: "Color of the clothing",
friendly_id: "... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/serializers/category/docs/siblings_serializer_test.rb | dev/test/models/serializers/category/docs/siblings_serializer_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
module Serializers
module Category
module Docs
class SiblingsSerializerTest < TestCase
setup do
@parent = ProductTaxonomy::Category.new(
id: 1,
name: "Parent Category",
... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/serializers/category/docs/search_serializer_test.rb | dev/test/models/serializers/category/docs/search_serializer_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
module Serializers
module Category
module Docs
class SearchSerializerTest < TestCase
setup do
@category = ProductTaxonomy::Category.new(
id: 1,
name: "Test Category",
... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/serializers/category/dist/json_serializer_test.rb | dev/test/models/serializers/category/dist/json_serializer_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
module Serializers
module Category
module Dist
class JsonSerializerTest < TestCase
setup do
@root = ProductTaxonomy::Category.new(id: "aa", name: "Root")
@child = ProductTaxonomy::Category.... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/serializers/category/dist/txt_serializer_test.rb | dev/test/models/serializers/category/dist/txt_serializer_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
module Serializers
module Category
module Dist
class TxtSerializerTest < TestCase
setup do
@root = ProductTaxonomy::Category.new(id: "aa", name: "Root")
@child = ProductTaxonomy::Category.n... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/serializers/category/data/data_serializer_test.rb | dev/test/models/serializers/category/data/data_serializer_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
module Serializers
module Category
module Data
class DataSerializerTest < TestCase
setup do
@root = ProductTaxonomy::Category.new(id: "aa", name: "Root")
@child = ProductTaxonomy::Category.... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/serializers/category/data/localizations_serializer_test.rb | dev/test/models/serializers/category/data/localizations_serializer_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
module Serializers
module Category
module Data
class LocalizationsSerializerTest < TestCase
setup do
@root = ProductTaxonomy::Category.new(id: "aa", name: "Root")
@child = ProductTaxonomy::... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/serializers/category/data/full_names_serializer_test.rb | dev/test/models/serializers/category/data/full_names_serializer_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
module Serializers
module Category
module Data
class FullNamesSerializerTest < TestCase
setup do
@root = ProductTaxonomy::Category.new(id: "aa", name: "Root")
@child = ProductTaxonomy::Cate... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/serializers/value/dist/json_serializer_test.rb | dev/test/models/serializers/value/dist/json_serializer_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
module Serializers
module Value
module Dist
class JsonSerializerTest < TestCase
setup do
@value = ProductTaxonomy::Value.new(
id: 1,
name: "Black",
friendly_id... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/serializers/value/dist/txt_serializer_test.rb | dev/test/models/serializers/value/dist/txt_serializer_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
module Serializers
module Value
module Dist
class TxtSerializerTest < TestCase
setup do
@value = ProductTaxonomy::Value.new(
id: 1,
name: "Black",
friendly_id:... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/serializers/value/data/data_serializer_test.rb | dev/test/models/serializers/value/data/data_serializer_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
module Serializers
module Value
module Data
class DataSerializerTest < TestCase
setup do
@value1 = ProductTaxonomy::Value.new(
id: 1,
name: "Black",
friendly_i... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/serializers/value/data/localizations_serializer_test.rb | dev/test/models/serializers/value/data/localizations_serializer_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
module Serializers
module Value
module Data
class LocalizationsSerializerTest < TestCase
setup do
@value = ProductTaxonomy::Value.new(
id: 1,
name: "Black",
fr... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/serializers/attribute/docs/base_and_extended_serializer_test.rb | dev/test/models/serializers/attribute/docs/base_and_extended_serializer_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
module Serializers
module Attribute
module Docs
class BaseAndExtendedSerializerTest < TestCase
setup do
@value = ProductTaxonomy::Value.new(
id: 1,
name: "Test Value",
... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/serializers/attribute/docs/reversed_serializer_test.rb | dev/test/models/serializers/attribute/docs/reversed_serializer_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
module Serializers
module Attribute
module Docs
class ReversedSerializerTest < TestCase
setup do
@value = ProductTaxonomy::Value.new(
id: 1,
name: "Test Value",
... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/serializers/attribute/docs/search_serializer_test.rb | dev/test/models/serializers/attribute/docs/search_serializer_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
module Serializers
module Attribute
module Docs
class SearchSerializerTest < TestCase
setup do
@value = ProductTaxonomy::Value.new(
id: 1,
name: "Test Value",
... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/serializers/attribute/dist/json_serializer_test.rb | dev/test/models/serializers/attribute/dist/json_serializer_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
module Serializers
module Attribute
module Dist
class JsonSerializerTest < TestCase
setup do
@value = ProductTaxonomy::Value.new(
id: 1,
name: "Black",
friendl... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/serializers/attribute/dist/txt_serializer_test.rb | dev/test/models/serializers/attribute/dist/txt_serializer_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
module Serializers
module Attribute
module Dist
class TxtSerializerTest < TestCase
setup do
@value = ProductTaxonomy::Value.new(
id: 1,
name: "Black",
friendly... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/serializers/attribute/data/data_serializer_test.rb | dev/test/models/serializers/attribute/data/data_serializer_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
module Serializers
module Attribute
module Data
class DataSerializerTest < TestCase
setup do
@value = ProductTaxonomy::Value.new(
id: 1,
name: "Black",
friendl... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/serializers/attribute/data/localizations_serializer_test.rb | dev/test/models/serializers/attribute/data/localizations_serializer_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
module Serializers
module Attribute
module Data
class LocalizationsSerializerTest < TestCase
setup do
@value = ProductTaxonomy::Value.new(
id: 1,
name: "Black",
... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/mixins/formatted_validation_errors_test.rb | dev/test/models/mixins/formatted_validation_errors_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
class FormattedValidationErrorsTest < TestCase
class CategoryModel
include ActiveModel::Validations
include FormattedValidationErrors
attr_reader :id, :name
validates :id, presence: true, format: { with: /\A[a-z... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/mixins/indexed_test.rb | dev/test/models/mixins/indexed_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
class IndexedTest < TestCase
class Model
include ActiveModel::Validations
extend Indexed
class << self
def reset
@hashed_models = nil
end
end
validates_with ProductTaxonomy::Index... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/test/models/mixins/localized_test.rb | dev/test/models/mixins/localized_test.rb | # frozen_string_literal: true
require "test_helper"
module ProductTaxonomy
class LocalizedTest < TestCase
class TestClass
extend Localized
localized_attr_reader :name, keyed_by: :id
attr_reader :id, :non_localized_attr
def initialize(id:, name:, non_localized_attr:)
@id = id
... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/lib/product_taxonomy.rb | dev/lib/product_taxonomy.rb | # frozen_string_literal: true
require "active_support/all"
require "active_model"
module ProductTaxonomy
DEFAULT_DATA_PATH = File.expand_path("../../data", __dir__)
class << self
attr_writer :data_path
def data_path
@data_path ||= DEFAULT_DATA_PATH
end
end
end
require_relative "product_taxo... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/lib/product_taxonomy/version.rb | dev/lib/product_taxonomy/version.rb | # frozen_string_literal: true
module ProductTaxonomy
VERSION = "1.0.0"
end
| ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/lib/product_taxonomy/loader.rb | dev/lib/product_taxonomy/loader.rb | # frozen_string_literal: true
require "yaml"
module ProductTaxonomy
class Loader
class << self
def load(values_path:, attributes_path:, categories_glob:)
return if ProductTaxonomy::Category.all.any?
begin
ProductTaxonomy::Value.load_from_source(YAML.load_file(values_path))
... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/lib/product_taxonomy/alphanumeric_sorter.rb | dev/lib/product_taxonomy/alphanumeric_sorter.rb | # frozen_string_literal: true
module ProductTaxonomy
module AlphanumericSorter
class << self
def sort(values, other_last: false)
values.sort_by.with_index do |value, idx|
[
other_last && value.to_s.downcase == "other" ? 1 : 0,
*normalize_value(value),
i... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/lib/product_taxonomy/identifier_formatter.rb | dev/lib/product_taxonomy/identifier_formatter.rb | # frozen_string_literal: true
module ProductTaxonomy
module IdentifierFormatter
class << self
def format_friendly_id(text)
I18n.transliterate(text)
.downcase
.gsub(%r{[^a-z0-9\s\-_/\.\+#]}, "")
.gsub(/[\s\-\.]+/, "_")
end
def format_handle(text)
I1... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/lib/product_taxonomy/cli.rb | dev/lib/product_taxonomy/cli.rb | # frozen_string_literal: true
require "thor"
require_relative "commands/command"
require_relative "commands/generate_dist_command"
require_relative "commands/find_unmapped_external_categories_command"
require_relative "commands/generate_docs_command"
require_relative "commands/generate_release_command"
require_relativ... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/lib/product_taxonomy/localizations_validator.rb | dev/lib/product_taxonomy/localizations_validator.rb | # frozen_string_literal: true
module ProductTaxonomy
module LocalizationsValidator
class << self
# Validate that all localizations are present for the given locales. If no locales are provided, all locales
# will be validated and the consistency of locales across models will be checked.
#
... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/lib/product_taxonomy/commands/add_attributes_to_categories_command.rb | dev/lib/product_taxonomy/commands/add_attributes_to_categories_command.rb | # frozen_string_literal: true
module ProductTaxonomy
class AddAttributesToCategoriesCommand < Command
def initialize(options)
super
load_taxonomy
@attribute_friendly_ids = options[:attribute_friendly_ids]
@category_ids = options[:category_ids]
@include_descendants = options[:include... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/lib/product_taxonomy/commands/command.rb | dev/lib/product_taxonomy/commands/command.rb | # frozen_string_literal: true
require "logger"
require "benchmark"
module ProductTaxonomy
class Command
attr_reader :logger, :options
def initialize(options)
@options = options
@logger = Logger.new($stdout, level: :info)
@logger.formatter = proc { |_, _, _, msg| "#{msg}\n" }
@logger... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/lib/product_taxonomy/commands/generate_dist_command.rb | dev/lib/product_taxonomy/commands/generate_dist_command.rb | # frozen_string_literal: true
module ProductTaxonomy
class GenerateDistCommand < Command
OUTPUT_PATH = File.expand_path("../../../../dist", __dir__)
def initialize(options)
super
@version = options[:version] || File.read(version_file_path).strip
@locales = if options[:locales] == ["all"]
... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/lib/product_taxonomy/commands/generate_docs_command.rb | dev/lib/product_taxonomy/commands/generate_docs_command.rb | # frozen_string_literal: true
module ProductTaxonomy
class GenerateDocsCommand < Command
UNSTABLE = "unstable"
class << self
def docs_path
File.expand_path("../docs", ProductTaxonomy.data_path)
end
end
def initialize(options)
super
@version = validate_and_sanitize_v... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/lib/product_taxonomy/commands/dump_categories_command.rb | dev/lib/product_taxonomy/commands/dump_categories_command.rb | # frozen_string_literal: true
module ProductTaxonomy
class DumpCategoriesCommand < Command
def initialize(options)
super
load_taxonomy
@verticals = options[:verticals] || Category.verticals.map(&:id)
end
def execute
logger.info("Dumping #{@verticals.size} verticals")
@vert... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/lib/product_taxonomy/commands/dump_integration_full_names_command.rb | dev/lib/product_taxonomy/commands/dump_integration_full_names_command.rb | # frozen_string_literal: true
module ProductTaxonomy
class DumpIntegrationFullNamesCommand < Command
def initialize(options)
super
@version = options[:version] || File.read(version_file_path).strip
end
def execute
logger.info("Dumping full names from current taxonomy for integrations.... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/lib/product_taxonomy/commands/add_value_command.rb | dev/lib/product_taxonomy/commands/add_value_command.rb | # frozen_string_literal: true
module ProductTaxonomy
class AddValueCommand < Command
def initialize(options)
super
load_taxonomy
@name = options[:name]
@attribute_friendly_id = options[:attribute_friendly_id]
end
def execute
create_value!
update_data_files!
end
... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/lib/product_taxonomy/commands/generate_release_command.rb | dev/lib/product_taxonomy/commands/generate_release_command.rb | # frozen_string_literal: true
module ProductTaxonomy
class GenerateReleaseCommand < Command
def initialize(options)
super
@version = validate_and_sanitize_version!(options[:current_version])
@next_version = validate_and_sanitize_version!(options[:next_version])
if @version.end_with?("-u... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/lib/product_taxonomy/commands/sync_en_localizations_command.rb | dev/lib/product_taxonomy/commands/sync_en_localizations_command.rb | # frozen_string_literal: true
module ProductTaxonomy
class SyncEnLocalizationsCommand < Command
PERMITTED_TARGETS = ["categories", "attributes", "values"].freeze
def initialize(options)
super
load_taxonomy
@targets = options[:targets]&.split(",") || PERMITTED_TARGETS
@targets.each do... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Shopify/product-taxonomy | https://github.com/Shopify/product-taxonomy/blob/a1cb6132c9c0885c88ecbda53777f1dfc0e064d9/dev/lib/product_taxonomy/commands/add_attribute_command.rb | dev/lib/product_taxonomy/commands/add_attribute_command.rb | # frozen_string_literal: true
module ProductTaxonomy
class AddAttributeCommand < Command
def initialize(options)
super
load_taxonomy
@name = options[:name]
@description = options[:description]
@values = options[:values]
@base_attribute_friendly_id = options[:base_attribute_fri... | ruby | MIT | a1cb6132c9c0885c88ecbda53777f1dfc0e064d9 | 2026-01-04T17:02:35.318003Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.