repo
stringlengths
5
58
path
stringlengths
9
168
func_name
stringlengths
9
130
original_string
stringlengths
66
10.5k
language
stringclasses
1 value
code
stringlengths
66
10.5k
code_tokens
list
docstring
stringlengths
8
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
94
266
partition
stringclasses
1 value
jekyll/jekyll
lib/jekyll/filters.rb
Jekyll.Filters.sort_input
def sort_input(input, property, order) input.map { |item| [item_property(item, property), item] } .sort! do |a_info, b_info| a_property = a_info.first b_property = b_info.first if !a_property.nil? && b_property.nil? - order elsif a_property.nil? && !b_p...
ruby
def sort_input(input, property, order) input.map { |item| [item_property(item, property), item] } .sort! do |a_info, b_info| a_property = a_info.first b_property = b_info.first if !a_property.nil? && b_property.nil? - order elsif a_property.nil? && !b_p...
[ "def", "sort_input", "(", "input", ",", "property", ",", "order", ")", "input", ".", "map", "{", "|", "item", "|", "[", "item_property", "(", "item", ",", "property", ")", ",", "item", "]", "}", ".", "sort!", "do", "|", "a_info", ",", "b_info", "|"...
Sort the input Enumerable by the given property. If the property doesn't exist, return the sort order respective of which item doesn't have the property. We also utilize the Schwartzian transform to make this more efficient.
[ "Sort", "the", "input", "Enumerable", "by", "the", "given", "property", ".", "If", "the", "property", "doesn", "t", "exist", "return", "the", "sort", "order", "respective", "of", "which", "item", "doesn", "t", "have", "the", "property", ".", "We", "also", ...
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/filters.rb#L311-L326
train
jekyll/jekyll
lib/jekyll/filters.rb
Jekyll.Filters.compare_property_vs_target
def compare_property_vs_target(property, target) case target when NilClass return true if property.nil? when Liquid::Expression::MethodLiteral # `empty` or `blank` return true if Array(property).join == target.to_s else Array(property).each do |prop| return true...
ruby
def compare_property_vs_target(property, target) case target when NilClass return true if property.nil? when Liquid::Expression::MethodLiteral # `empty` or `blank` return true if Array(property).join == target.to_s else Array(property).each do |prop| return true...
[ "def", "compare_property_vs_target", "(", "property", ",", "target", ")", "case", "target", "when", "NilClass", "return", "true", "if", "property", ".", "nil?", "when", "Liquid", "::", "Expression", "::", "MethodLiteral", "# `empty` or `blank`", "return", "true", ...
`where` filter helper
[ "where", "filter", "helper" ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/filters.rb#L329-L342
train
jekyll/jekyll
lib/jekyll/collection.rb
Jekyll.Collection.entries
def entries return [] unless exists? @entries ||= Utils.safe_glob(collection_dir, ["**", "*"], File::FNM_DOTMATCH).map do |entry| entry["#{collection_dir}/"] = "" entry end end
ruby
def entries return [] unless exists? @entries ||= Utils.safe_glob(collection_dir, ["**", "*"], File::FNM_DOTMATCH).map do |entry| entry["#{collection_dir}/"] = "" entry end end
[ "def", "entries", "return", "[", "]", "unless", "exists?", "@entries", "||=", "Utils", ".", "safe_glob", "(", "collection_dir", ",", "[", "\"**\"", ",", "\"*\"", "]", ",", "File", "::", "FNM_DOTMATCH", ")", ".", "map", "do", "|", "entry", "|", "entry", ...
All the entries in this collection. Returns an Array of file paths to the documents in this collection relative to the collection's directory
[ "All", "the", "entries", "in", "this", "collection", "." ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/collection.rb#L75-L83
train
jekyll/jekyll
lib/jekyll/collection.rb
Jekyll.Collection.collection_dir
def collection_dir(*files) return directory if files.empty? site.in_source_dir(container, relative_directory, *files) end
ruby
def collection_dir(*files) return directory if files.empty? site.in_source_dir(container, relative_directory, *files) end
[ "def", "collection_dir", "(", "*", "files", ")", "return", "directory", "if", "files", ".", "empty?", "site", ".", "in_source_dir", "(", "container", ",", "relative_directory", ",", "files", ")", "end" ]
The full path to the directory containing the collection, with optional subpaths. *files - (optional) any other path pieces relative to the directory to append to the path Returns a String containing th directory name where the collection is stored on the filesystem.
[ "The", "full", "path", "to", "the", "directory", "containing", "the", "collection", "with", "optional", "subpaths", "." ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/collection.rb#L128-L132
train
jekyll/jekyll
lib/jekyll/regenerator.rb
Jekyll.Regenerator.add
def add(path) return true unless File.exist?(path) metadata[path] = { "mtime" => File.mtime(path), "deps" => [], } cache[path] = true end
ruby
def add(path) return true unless File.exist?(path) metadata[path] = { "mtime" => File.mtime(path), "deps" => [], } cache[path] = true end
[ "def", "add", "(", "path", ")", "return", "true", "unless", "File", ".", "exist?", "(", "path", ")", "metadata", "[", "path", "]", "=", "{", "\"mtime\"", "=>", "File", ".", "mtime", "(", "path", ")", ",", "\"deps\"", "=>", "[", "]", ",", "}", "ca...
Add a path to the metadata Returns true, also on failure.
[ "Add", "a", "path", "to", "the", "metadata" ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/regenerator.rb#L40-L48
train
jekyll/jekyll
lib/jekyll/regenerator.rb
Jekyll.Regenerator.add_dependency
def add_dependency(path, dependency) return if metadata[path].nil? || disabled unless metadata[path]["deps"].include? dependency metadata[path]["deps"] << dependency add(dependency) unless metadata.include?(dependency) end regenerate? dependency end
ruby
def add_dependency(path, dependency) return if metadata[path].nil? || disabled unless metadata[path]["deps"].include? dependency metadata[path]["deps"] << dependency add(dependency) unless metadata.include?(dependency) end regenerate? dependency end
[ "def", "add_dependency", "(", "path", ",", "dependency", ")", "return", "if", "metadata", "[", "path", "]", ".", "nil?", "||", "disabled", "unless", "metadata", "[", "path", "]", "[", "\"deps\"", "]", ".", "include?", "dependency", "metadata", "[", "path",...
Add a dependency of a path Returns nothing.
[ "Add", "a", "dependency", "of", "a", "path" ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/regenerator.rb#L106-L114
train
jekyll/jekyll
lib/jekyll/regenerator.rb
Jekyll.Regenerator.write_metadata
def write_metadata unless disabled? Jekyll.logger.debug "Writing Metadata:", ".jekyll-metadata" File.binwrite(metadata_file, Marshal.dump(metadata)) end end
ruby
def write_metadata unless disabled? Jekyll.logger.debug "Writing Metadata:", ".jekyll-metadata" File.binwrite(metadata_file, Marshal.dump(metadata)) end end
[ "def", "write_metadata", "unless", "disabled?", "Jekyll", ".", "logger", ".", "debug", "\"Writing Metadata:\"", ",", "\".jekyll-metadata\"", "File", ".", "binwrite", "(", "metadata_file", ",", "Marshal", ".", "dump", "(", "metadata", ")", ")", "end", "end" ]
Write the metadata to disk Returns nothing.
[ "Write", "the", "metadata", "to", "disk" ]
fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b
https://github.com/jekyll/jekyll/blob/fd74fe3e93a1fb506fa6621a2e271d7b9c5c3e3b/lib/jekyll/regenerator.rb#L119-L124
train
fastlane/fastlane
frameit/lib/frameit/config_parser.rb
Frameit.ConfigParser.fetch_value
def fetch_value(path) specifics = @data['data'].select { |a| path.include?(a['filter']) } default = @data['default'] values = default.clone specifics.each do |specific| values = values.fastlane_deep_merge(specific) end change_paths_to_absolutes!(values) validate_valu...
ruby
def fetch_value(path) specifics = @data['data'].select { |a| path.include?(a['filter']) } default = @data['default'] values = default.clone specifics.each do |specific| values = values.fastlane_deep_merge(specific) end change_paths_to_absolutes!(values) validate_valu...
[ "def", "fetch_value", "(", "path", ")", "specifics", "=", "@data", "[", "'data'", "]", ".", "select", "{", "|", "a", "|", "path", ".", "include?", "(", "a", "[", "'filter'", "]", ")", "}", "default", "=", "@data", "[", "'default'", "]", "values", "...
Fetches the finished configuration for a given path. This will try to look for a specific value and fallback to a default value if nothing was found
[ "Fetches", "the", "finished", "configuration", "for", "a", "given", "path", ".", "This", "will", "try", "to", "look", "for", "a", "specific", "value", "and", "fallback", "to", "a", "default", "value", "if", "nothing", "was", "found" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/config_parser.rb#L28-L42
train
fastlane/fastlane
frameit/lib/frameit/config_parser.rb
Frameit.ConfigParser.change_paths_to_absolutes!
def change_paths_to_absolutes!(values) values.each do |key, value| if value.kind_of?(Hash) change_paths_to_absolutes!(value) # recursive call elsif value.kind_of?(Array) value.each do |current| change_paths_to_absolutes!(current) if current.kind_of?(Hash) # recursiv...
ruby
def change_paths_to_absolutes!(values) values.each do |key, value| if value.kind_of?(Hash) change_paths_to_absolutes!(value) # recursive call elsif value.kind_of?(Array) value.each do |current| change_paths_to_absolutes!(current) if current.kind_of?(Hash) # recursiv...
[ "def", "change_paths_to_absolutes!", "(", "values", ")", "values", ".", "each", "do", "|", "key", ",", "value", "|", "if", "value", ".", "kind_of?", "(", "Hash", ")", "change_paths_to_absolutes!", "(", "value", ")", "# recursive call", "elsif", "value", ".", ...
Use absolute paths instead of relative
[ "Use", "absolute", "paths", "instead", "of", "relative" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/config_parser.rb#L45-L64
train
fastlane/fastlane
spaceship/lib/spaceship/portal/portal_client.rb
Spaceship.PortalClient.provisioning_profiles_via_xcode_api
def provisioning_profiles_via_xcode_api(mac: false) req = request(:post) do |r| r.url("https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/listProvisioningProfiles.action") r.params = { teamId: team_id, includeInactiveProfiles: true, ...
ruby
def provisioning_profiles_via_xcode_api(mac: false) req = request(:post) do |r| r.url("https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/listProvisioningProfiles.action") r.params = { teamId: team_id, includeInactiveProfiles: true, ...
[ "def", "provisioning_profiles_via_xcode_api", "(", "mac", ":", "false", ")", "req", "=", "request", "(", ":post", ")", "do", "|", "r", "|", "r", ".", "url", "(", "\"https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/listProvisioningProfi...
this endpoint is used by Xcode to fetch provisioning profiles. The response is an xml plist but has the added benefit of containing the appId of each provisioning profile. Use this method over `provisioning_profiles` if possible because no secondary API calls are necessary to populate the ProvisioningProfile data mo...
[ "this", "endpoint", "is", "used", "by", "Xcode", "to", "fetch", "provisioning", "profiles", ".", "The", "response", "is", "an", "xml", "plist", "but", "has", "the", "added", "benefit", "of", "containing", "the", "appId", "of", "each", "provisioning", "profil...
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/portal/portal_client.rb#L645-L660
train
fastlane/fastlane
spaceship/lib/spaceship/portal/portal_client.rb
Spaceship.PortalClient.ensure_csrf
def ensure_csrf(klass) if csrf_cache[klass] self.csrf_tokens = csrf_cache[klass] return end self.csrf_tokens = nil # If we directly create a new resource (e.g. app) without querying anything before # we don't have a valid csrf token, that's why we have to do at least one ...
ruby
def ensure_csrf(klass) if csrf_cache[klass] self.csrf_tokens = csrf_cache[klass] return end self.csrf_tokens = nil # If we directly create a new resource (e.g. app) without querying anything before # we don't have a valid csrf token, that's why we have to do at least one ...
[ "def", "ensure_csrf", "(", "klass", ")", "if", "csrf_cache", "[", "klass", "]", "self", ".", "csrf_tokens", "=", "csrf_cache", "[", "klass", "]", "return", "end", "self", ".", "csrf_tokens", "=", "nil", "# If we directly create a new resource (e.g. app) without quer...
Ensures that there are csrf tokens for the appropriate entity type Relies on store_csrf_tokens to set csrf_tokens to the appropriate value then stores that in the correct place in cache This method also takes a block, if you want to send a custom request, instead of calling `.all` on the given klass. This is used f...
[ "Ensures", "that", "there", "are", "csrf", "tokens", "for", "the", "appropriate", "entity", "type", "Relies", "on", "store_csrf_tokens", "to", "set", "csrf_tokens", "to", "the", "appropriate", "value", "then", "stores", "that", "in", "the", "correct", "place", ...
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/portal/portal_client.rb#L802-L815
train
fastlane/fastlane
frameit/lib/frameit/editor.rb
Frameit.Editor.put_into_frame
def put_into_frame # We have to rotate the screenshot, since the offset information is for portrait # only. Instead of doing the calculations ourselves, it's much easier to let # imagemagick do the hard lifting for landscape screenshots rotation = self.rotation_for_device_orientation frame...
ruby
def put_into_frame # We have to rotate the screenshot, since the offset information is for portrait # only. Instead of doing the calculations ourselves, it's much easier to let # imagemagick do the hard lifting for landscape screenshots rotation = self.rotation_for_device_orientation frame...
[ "def", "put_into_frame", "# We have to rotate the screenshot, since the offset information is for portrait", "# only. Instead of doing the calculations ourselves, it's much easier to let", "# imagemagick do the hard lifting for landscape screenshots", "rotation", "=", "self", ".", "rotation_for_de...
puts the screenshot into the frame
[ "puts", "the", "screenshot", "into", "the", "frame" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/editor.rb#L83-L119
train
fastlane/fastlane
frameit/lib/frameit/editor.rb
Frameit.Editor.modify_offset
def modify_offset(multiplicator) # Format: "+133+50" hash = offset['offset'] x = hash.split("+")[1].to_f * multiplicator y = hash.split("+")[2].to_f * multiplicator new_offset = "+#{x.round}+#{y.round}" @offset_information['offset'] = new_offset end
ruby
def modify_offset(multiplicator) # Format: "+133+50" hash = offset['offset'] x = hash.split("+")[1].to_f * multiplicator y = hash.split("+")[2].to_f * multiplicator new_offset = "+#{x.round}+#{y.round}" @offset_information['offset'] = new_offset end
[ "def", "modify_offset", "(", "multiplicator", ")", "# Format: \"+133+50\"", "hash", "=", "offset", "[", "'offset'", "]", "x", "=", "hash", ".", "split", "(", "\"+\"", ")", "[", "1", "]", ".", "to_f", "*", "multiplicator", "y", "=", "hash", ".", "split", ...
Everything below is related to title, background, etc. and is not used in the easy mode this is used to correct the 1:1 offset information the offset information is stored to work for the template images since we resize the template images to have higher quality screenshots we need to modify the offset information...
[ "Everything", "below", "is", "related", "to", "title", "background", "etc", ".", "and", "is", "not", "used", "in", "the", "easy", "mode" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/editor.rb#L140-L147
train
fastlane/fastlane
frameit/lib/frameit/editor.rb
Frameit.Editor.horizontal_frame_padding
def horizontal_frame_padding padding = fetch_config['padding'] if padding.kind_of?(String) && padding.split('x').length == 2 padding = padding.split('x')[0] padding = padding.to_i unless padding.end_with?('%') end return scale_padding(padding) end
ruby
def horizontal_frame_padding padding = fetch_config['padding'] if padding.kind_of?(String) && padding.split('x').length == 2 padding = padding.split('x')[0] padding = padding.to_i unless padding.end_with?('%') end return scale_padding(padding) end
[ "def", "horizontal_frame_padding", "padding", "=", "fetch_config", "[", "'padding'", "]", "if", "padding", ".", "kind_of?", "(", "String", ")", "&&", "padding", ".", "split", "(", "'x'", ")", ".", "length", "==", "2", "padding", "=", "padding", ".", "split...
Horizontal adding around the frames
[ "Horizontal", "adding", "around", "the", "frames" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/editor.rb#L193-L200
train
fastlane/fastlane
frameit/lib/frameit/editor.rb
Frameit.Editor.title_min_height
def title_min_height @title_min_height ||= begin height = fetch_config['title_min_height'] || 0 if height.kind_of?(String) && height.end_with?('%') height = ([image.width, image.height].min * height.to_f * 0.01).ceil end height end end
ruby
def title_min_height @title_min_height ||= begin height = fetch_config['title_min_height'] || 0 if height.kind_of?(String) && height.end_with?('%') height = ([image.width, image.height].min * height.to_f * 0.01).ceil end height end end
[ "def", "title_min_height", "@title_min_height", "||=", "begin", "height", "=", "fetch_config", "[", "'title_min_height'", "]", "||", "0", "if", "height", ".", "kind_of?", "(", "String", ")", "&&", "height", ".", "end_with?", "(", "'%'", ")", "height", "=", "...
Minimum height for the title
[ "Minimum", "height", "for", "the", "title" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/editor.rb#L213-L221
train
fastlane/fastlane
frameit/lib/frameit/editor.rb
Frameit.Editor.generate_background
def generate_background background = MiniMagick::Image.open(fetch_config['background']) if background.height != screenshot.size[1] background.resize("#{screenshot.size[0]}x#{screenshot.size[1]}^") # `^` says it should fill area background.merge!(["-gravity", "center", "-crop", "#{screenshot...
ruby
def generate_background background = MiniMagick::Image.open(fetch_config['background']) if background.height != screenshot.size[1] background.resize("#{screenshot.size[0]}x#{screenshot.size[1]}^") # `^` says it should fill area background.merge!(["-gravity", "center", "-crop", "#{screenshot...
[ "def", "generate_background", "background", "=", "MiniMagick", "::", "Image", ".", "open", "(", "fetch_config", "[", "'background'", "]", ")", "if", "background", ".", "height", "!=", "screenshot", ".", "size", "[", "1", "]", "background", ".", "resize", "("...
Returns a correctly sized background image
[ "Returns", "a", "correctly", "sized", "background", "image" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/editor.rb#L251-L259
train
fastlane/fastlane
frameit/lib/frameit/editor.rb
Frameit.Editor.resize_frame!
def resize_frame! screenshot_width = self.screenshot.portrait? ? screenshot.size[0] : screenshot.size[1] multiplicator = (screenshot_width.to_f / offset['width'].to_f) # by how much do we have to change this? new_frame_width = multiplicator * frame.width # the new width for the frame frame.resi...
ruby
def resize_frame! screenshot_width = self.screenshot.portrait? ? screenshot.size[0] : screenshot.size[1] multiplicator = (screenshot_width.to_f / offset['width'].to_f) # by how much do we have to change this? new_frame_width = multiplicator * frame.width # the new width for the frame frame.resi...
[ "def", "resize_frame!", "screenshot_width", "=", "self", ".", "screenshot", ".", "portrait?", "?", "screenshot", ".", "size", "[", "0", "]", ":", "screenshot", ".", "size", "[", "1", "]", "multiplicator", "=", "(", "screenshot_width", ".", "to_f", "/", "of...
Resize the frame as it's too low quality by default
[ "Resize", "the", "frame", "as", "it", "s", "too", "low", "quality", "by", "default" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/editor.rb#L273-L280
train
fastlane/fastlane
frameit/lib/frameit/editor.rb
Frameit.Editor.put_title_into_background_stacked
def put_title_into_background_stacked(background, title, keyword) resize_text(title) resize_text(keyword) vertical_padding = vertical_frame_padding # assign padding to variable spacing_between_title_and_keyword = (actual_font_size / 2) title_left_space = (background.width / 2.0 - title.wi...
ruby
def put_title_into_background_stacked(background, title, keyword) resize_text(title) resize_text(keyword) vertical_padding = vertical_frame_padding # assign padding to variable spacing_between_title_and_keyword = (actual_font_size / 2) title_left_space = (background.width / 2.0 - title.wi...
[ "def", "put_title_into_background_stacked", "(", "background", ",", "title", ",", "keyword", ")", "resize_text", "(", "title", ")", "resize_text", "(", "keyword", ")", "vertical_padding", "=", "vertical_frame_padding", "# assign padding to variable", "spacing_between_title_...
Add the title above or below the device
[ "Add", "the", "title", "above", "or", "below", "the", "device" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/editor.rb#L292-L321
train
fastlane/fastlane
frameit/lib/frameit/editor.rb
Frameit.Editor.build_text_images
def build_text_images(max_width, max_height, stack_title) words = [:keyword, :title].keep_if { |a| fetch_text(a) } # optional keyword/title results = {} trim_boxes = {} top_vertical_trim_offset = Float::INFINITY # Init at a large value, as the code will search for a minimal value. bottom_v...
ruby
def build_text_images(max_width, max_height, stack_title) words = [:keyword, :title].keep_if { |a| fetch_text(a) } # optional keyword/title results = {} trim_boxes = {} top_vertical_trim_offset = Float::INFINITY # Init at a large value, as the code will search for a minimal value. bottom_v...
[ "def", "build_text_images", "(", "max_width", ",", "max_height", ",", "stack_title", ")", "words", "=", "[", ":keyword", ",", ":title", "]", ".", "keep_if", "{", "|", "a", "|", "fetch_text", "(", "a", ")", "}", "# optional keyword/title", "results", "=", "...
This will build up to 2 individual images with the title and optional keyword, which will then be added to the real image
[ "This", "will", "build", "up", "to", "2", "individual", "images", "with", "the", "title", "and", "optional", "keyword", "which", "will", "then", "be", "added", "to", "the", "real", "image" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/editor.rb#L396-L489
train
fastlane/fastlane
frameit/lib/frameit/editor.rb
Frameit.Editor.fetch_text
def fetch_text(type) UI.user_error!("Valid parameters :keyword, :title") unless [:keyword, :title].include?(type) # Try to get it from a keyword.strings or title.strings file strings_path = File.join(File.expand_path("..", screenshot.path), "#{type}.strings") if File.exist?(strings_path) ...
ruby
def fetch_text(type) UI.user_error!("Valid parameters :keyword, :title") unless [:keyword, :title].include?(type) # Try to get it from a keyword.strings or title.strings file strings_path = File.join(File.expand_path("..", screenshot.path), "#{type}.strings") if File.exist?(strings_path) ...
[ "def", "fetch_text", "(", "type", ")", "UI", ".", "user_error!", "(", "\"Valid parameters :keyword, :title\"", ")", "unless", "[", ":keyword", ",", ":title", "]", ".", "include?", "(", "type", ")", "# Try to get it from a keyword.strings or title.strings file", "strings...
Fetches the title + keyword for this particular screenshot
[ "Fetches", "the", "title", "+", "keyword", "for", "this", "particular", "screenshot" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/editor.rb#L504-L520
train
fastlane/fastlane
frameit/lib/frameit/editor.rb
Frameit.Editor.font
def font(key) single_font = fetch_config[key.to_s]['font'] return single_font if single_font fonts = fetch_config[key.to_s]['fonts'] if fonts fonts.each do |font| if font['supported'] font['supported'].each do |language| if screenshot.path.include?(la...
ruby
def font(key) single_font = fetch_config[key.to_s]['font'] return single_font if single_font fonts = fetch_config[key.to_s]['fonts'] if fonts fonts.each do |font| if font['supported'] font['supported'].each do |language| if screenshot.path.include?(la...
[ "def", "font", "(", "key", ")", "single_font", "=", "fetch_config", "[", "key", ".", "to_s", "]", "[", "'font'", "]", "return", "single_font", "if", "single_font", "fonts", "=", "fetch_config", "[", "key", ".", "to_s", "]", "[", "'fonts'", "]", "if", "...
The font we want to use
[ "The", "font", "we", "want", "to", "use" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/frameit/lib/frameit/editor.rb#L538-L561
train
fastlane/fastlane
pilot/lib/pilot/build_manager.rb
Pilot.BuildManager.transporter_for_selected_team
def transporter_for_selected_team(options) generic_transporter = FastlaneCore::ItunesTransporter.new(options[:username], nil, false, options[:itc_provider]) return generic_transporter unless options[:itc_provider].nil? && Spaceship::Tunes.client.teams.count > 1 begin team = Spaceship::Tunes.c...
ruby
def transporter_for_selected_team(options) generic_transporter = FastlaneCore::ItunesTransporter.new(options[:username], nil, false, options[:itc_provider]) return generic_transporter unless options[:itc_provider].nil? && Spaceship::Tunes.client.teams.count > 1 begin team = Spaceship::Tunes.c...
[ "def", "transporter_for_selected_team", "(", "options", ")", "generic_transporter", "=", "FastlaneCore", "::", "ItunesTransporter", ".", "new", "(", "options", "[", ":username", "]", ",", "nil", ",", "false", ",", "options", "[", ":itc_provider", "]", ")", "retu...
If itc_provider was explicitly specified, use it. If there are multiple teams, infer the provider from the selected team name. If there are fewer than two teams, don't infer the provider.
[ "If", "itc_provider", "was", "explicitly", "specified", "use", "it", ".", "If", "there", "are", "multiple", "teams", "infer", "the", "provider", "from", "the", "selected", "team", "name", ".", "If", "there", "are", "fewer", "than", "two", "teams", "don", "...
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/pilot/lib/pilot/build_manager.rb#L221-L235
train
fastlane/fastlane
spaceship/lib/spaceship/two_step_or_factor_client.rb
Spaceship.Client.update_request_headers
def update_request_headers(req) req.headers["X-Apple-Id-Session-Id"] = @x_apple_id_session_id req.headers["X-Apple-Widget-Key"] = self.itc_service_key req.headers["Accept"] = "application/json" req.headers["scnt"] = @scnt end
ruby
def update_request_headers(req) req.headers["X-Apple-Id-Session-Id"] = @x_apple_id_session_id req.headers["X-Apple-Widget-Key"] = self.itc_service_key req.headers["Accept"] = "application/json" req.headers["scnt"] = @scnt end
[ "def", "update_request_headers", "(", "req", ")", "req", ".", "headers", "[", "\"X-Apple-Id-Session-Id\"", "]", "=", "@x_apple_id_session_id", "req", ".", "headers", "[", "\"X-Apple-Widget-Key\"", "]", "=", "self", ".", "itc_service_key", "req", ".", "headers", "[...
Responsible for setting all required header attributes for the requests to succeed
[ "Responsible", "for", "setting", "all", "required", "header", "attributes", "for", "the", "requests", "to", "succeed" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/two_step_or_factor_client.rb#L301-L306
train
fastlane/fastlane
fastlane_core/lib/fastlane_core/itunes_transporter.rb
FastlaneCore.ItunesTransporter.upload
def upload(app_id, dir) actual_dir = File.join(dir, "#{app_id}.itmsp") UI.message("Going to upload updated app to App Store Connect") UI.success("This might take a few minutes. Please don't interrupt the script.") command = @transporter_executor.build_upload_command(@user, @password, actual_di...
ruby
def upload(app_id, dir) actual_dir = File.join(dir, "#{app_id}.itmsp") UI.message("Going to upload updated app to App Store Connect") UI.success("This might take a few minutes. Please don't interrupt the script.") command = @transporter_executor.build_upload_command(@user, @password, actual_di...
[ "def", "upload", "(", "app_id", ",", "dir", ")", "actual_dir", "=", "File", ".", "join", "(", "dir", ",", "\"#{app_id}.itmsp\"", ")", "UI", ".", "message", "(", "\"Going to upload updated app to App Store Connect\"", ")", "UI", ".", "success", "(", "\"This might...
Uploads the modified package back to App Store Connect @param app_id [Integer] The unique App ID @param dir [String] the path in which the package file is located @return (Bool) True if everything worked fine @raise [Deliver::TransporterTransferError] when something went wrong when transferring
[ "Uploads", "the", "modified", "package", "back", "to", "App", "Store", "Connect" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/itunes_transporter.rb#L410-L435
train
fastlane/fastlane
fastlane_core/lib/fastlane_core/itunes_transporter.rb
FastlaneCore.ItunesTransporter.load_password_for_transporter
def load_password_for_transporter # 3 different sources for the password # 1) ENV variable for application specific password if ENV[TWO_FACTOR_ENV_VARIABLE].to_s.length > 0 UI.message("Fetching password for transporter from environment variable named `#{TWO_FACTOR_ENV_VARIABLE}`") re...
ruby
def load_password_for_transporter # 3 different sources for the password # 1) ENV variable for application specific password if ENV[TWO_FACTOR_ENV_VARIABLE].to_s.length > 0 UI.message("Fetching password for transporter from environment variable named `#{TWO_FACTOR_ENV_VARIABLE}`") re...
[ "def", "load_password_for_transporter", "# 3 different sources for the password", "# 1) ENV variable for application specific password", "if", "ENV", "[", "TWO_FACTOR_ENV_VARIABLE", "]", ".", "to_s", ".", "length", ">", "0", "UI", ".", "message", "(", "\"Fetching password for...
Returns the password to be used with the transporter
[ "Returns", "the", "password", "to", "be", "used", "with", "the", "transporter" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/itunes_transporter.rb#L457-L473
train
fastlane/fastlane
fastlane_core/lib/fastlane_core/itunes_transporter.rb
FastlaneCore.ItunesTransporter.handle_two_step_failure
def handle_two_step_failure(ex) if ENV[TWO_FACTOR_ENV_VARIABLE].to_s.length > 0 # Password provided, however we already used it UI.error("") UI.error("Application specific password you provided using") UI.error("environment variable #{TWO_FACTOR_ENV_VARIABLE}") UI.error("is...
ruby
def handle_two_step_failure(ex) if ENV[TWO_FACTOR_ENV_VARIABLE].to_s.length > 0 # Password provided, however we already used it UI.error("") UI.error("Application specific password you provided using") UI.error("environment variable #{TWO_FACTOR_ENV_VARIABLE}") UI.error("is...
[ "def", "handle_two_step_failure", "(", "ex", ")", "if", "ENV", "[", "TWO_FACTOR_ENV_VARIABLE", "]", ".", "to_s", ".", "length", ">", "0", "# Password provided, however we already used it", "UI", ".", "error", "(", "\"\"", ")", "UI", ".", "error", "(", "\"Applica...
Tells the user how to get an application specific password
[ "Tells", "the", "user", "how", "to", "get", "an", "application", "specific", "password" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/itunes_transporter.rb#L476-L508
train
fastlane/fastlane
match/lib/match/runner.rb
Match.Runner.prefixed_working_directory
def prefixed_working_directory(working_directory) if self.storage_mode == "git" return working_directory elsif self.storage_mode == "google_cloud" # We fall back to "*", which means certificates and profiles # from all teams that use this bucket would be installed. This is not ideal,...
ruby
def prefixed_working_directory(working_directory) if self.storage_mode == "git" return working_directory elsif self.storage_mode == "google_cloud" # We fall back to "*", which means certificates and profiles # from all teams that use this bucket would be installed. This is not ideal,...
[ "def", "prefixed_working_directory", "(", "working_directory", ")", "if", "self", ".", "storage_mode", "==", "\"git\"", "return", "working_directory", "elsif", "self", ".", "storage_mode", "==", "\"google_cloud\"", "# We fall back to \"*\", which means certificates and profiles...
Used when creating a new certificate or profile
[ "Used", "when", "creating", "a", "new", "certificate", "or", "profile" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/match/lib/match/runner.rb#L127-L146
train
fastlane/fastlane
fastlane/lib/fastlane/setup/setup_ios.rb
Fastlane.SetupIos.find_and_setup_xcode_project
def find_and_setup_xcode_project(ask_for_scheme: true) UI.message("Parsing your local Xcode project to find the available schemes and the app identifier") config = {} # this is needed as the first method call will store information in there if self.project_path.end_with?("xcworkspace") config[...
ruby
def find_and_setup_xcode_project(ask_for_scheme: true) UI.message("Parsing your local Xcode project to find the available schemes and the app identifier") config = {} # this is needed as the first method call will store information in there if self.project_path.end_with?("xcworkspace") config[...
[ "def", "find_and_setup_xcode_project", "(", "ask_for_scheme", ":", "true", ")", "UI", ".", "message", "(", "\"Parsing your local Xcode project to find the available schemes and the app identifier\"", ")", "config", "=", "{", "}", "# this is needed as the first method call will stor...
Helpers Every installation setup that needs an Xcode project should call this method
[ "Helpers", "Every", "installation", "setup", "that", "needs", "an", "Xcode", "project", "should", "call", "this", "method" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/setup/setup_ios.rb#L265-L285
train
fastlane/fastlane
spaceship/lib/spaceship/client.rb
Spaceship.Client.team_id=
def team_id=(team_id) # First, we verify the team actually exists, because otherwise iTC would return the # following confusing error message # # invalid content provider id # available_teams = teams.collect do |team| { team_id: (team["contentProvider"] || {})["...
ruby
def team_id=(team_id) # First, we verify the team actually exists, because otherwise iTC would return the # following confusing error message # # invalid content provider id # available_teams = teams.collect do |team| { team_id: (team["contentProvider"] || {})["...
[ "def", "team_id", "=", "(", "team_id", ")", "# First, we verify the team actually exists, because otherwise iTC would return the", "# following confusing error message", "#", "# invalid content provider id", "#", "available_teams", "=", "teams", ".", "collect", "do", "|", "te...
Set a new team ID which will be used from now on
[ "Set", "a", "new", "team", "ID", "which", "will", "be", "used", "from", "now", "on" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/client.rb#L137-L171
train
fastlane/fastlane
spaceship/lib/spaceship/client.rb
Spaceship.Client.persistent_cookie_path
def persistent_cookie_path if ENV["SPACESHIP_COOKIE_PATH"] path = File.expand_path(File.join(ENV["SPACESHIP_COOKIE_PATH"], "spaceship", self.user, "cookie")) else [File.join(self.fastlane_user_dir, "spaceship"), "~/.spaceship", "/var/tmp/spaceship", "#{Dir.tmpdir}/spaceship"].each do |dir| ...
ruby
def persistent_cookie_path if ENV["SPACESHIP_COOKIE_PATH"] path = File.expand_path(File.join(ENV["SPACESHIP_COOKIE_PATH"], "spaceship", self.user, "cookie")) else [File.join(self.fastlane_user_dir, "spaceship"), "~/.spaceship", "/var/tmp/spaceship", "#{Dir.tmpdir}/spaceship"].each do |dir| ...
[ "def", "persistent_cookie_path", "if", "ENV", "[", "\"SPACESHIP_COOKIE_PATH\"", "]", "path", "=", "File", ".", "expand_path", "(", "File", ".", "join", "(", "ENV", "[", "\"SPACESHIP_COOKIE_PATH\"", "]", ",", "\"spaceship\"", ",", "self", ".", "user", ",", "\"c...
Returns preferred path for storing cookie for two step verification.
[ "Returns", "preferred", "path", "for", "storing", "cookie", "for", "two", "step", "verification", "." ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/client.rb#L285-L299
train
fastlane/fastlane
spaceship/lib/spaceship/client.rb
Spaceship.Client.paging
def paging page = 0 results = [] loop do page += 1 current = yield(page) results += current break if (current || []).count < page_size # no more results end return results end
ruby
def paging page = 0 results = [] loop do page += 1 current = yield(page) results += current break if (current || []).count < page_size # no more results end return results end
[ "def", "paging", "page", "=", "0", "results", "=", "[", "]", "loop", "do", "page", "+=", "1", "current", "=", "yield", "(", "page", ")", "results", "+=", "current", "break", "if", "(", "current", "||", "[", "]", ")", ".", "count", "<", "page_size",...
Handles the paging for you... for free Just pass a block and use the parameter as page number
[ "Handles", "the", "paging", "for", "you", "...", "for", "free", "Just", "pass", "a", "block", "and", "use", "the", "parameter", "as", "page", "number" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/client.rb#L312-L325
train
fastlane/fastlane
spaceship/lib/spaceship/client.rb
Spaceship.Client.login
def login(user = nil, password = nil) if user.to_s.empty? || password.to_s.empty? require 'credentials_manager/account_manager' puts("Reading keychain entry, because either user or password were empty") if Spaceship::Globals.verbose? keychain_entry = CredentialsManager::AccountManager.ne...
ruby
def login(user = nil, password = nil) if user.to_s.empty? || password.to_s.empty? require 'credentials_manager/account_manager' puts("Reading keychain entry, because either user or password were empty") if Spaceship::Globals.verbose? keychain_entry = CredentialsManager::AccountManager.ne...
[ "def", "login", "(", "user", "=", "nil", ",", "password", "=", "nil", ")", "if", "user", ".", "to_s", ".", "empty?", "||", "password", ".", "to_s", ".", "empty?", "require", "'credentials_manager/account_manager'", "puts", "(", "\"Reading keychain entry, because...
Authenticates with Apple's web services. This method has to be called once to generate a valid session. The session will automatically be used from then on. This method will automatically use the username from the Appfile (if available) and fetch the password from the Keychain (if available) @param user (String)...
[ "Authenticates", "with", "Apple", "s", "web", "services", ".", "This", "method", "has", "to", "be", "called", "once", "to", "generate", "a", "valid", "session", ".", "The", "session", "will", "automatically", "be", "used", "from", "then", "on", "." ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/client.rb#L366-L394
train
fastlane/fastlane
spaceship/lib/spaceship/client.rb
Spaceship.Client.send_shared_login_request
def send_shared_login_request(user, password) # Check if we have a cached/valid session # # Background: # December 4th 2017 Apple introduced a rate limit - which is of course fine by itself - # but unfortunately also rate limits successful logins. If you call multiple tools in a # la...
ruby
def send_shared_login_request(user, password) # Check if we have a cached/valid session # # Background: # December 4th 2017 Apple introduced a rate limit - which is of course fine by itself - # but unfortunately also rate limits successful logins. If you call multiple tools in a # la...
[ "def", "send_shared_login_request", "(", "user", ",", "password", ")", "# Check if we have a cached/valid session", "#", "# Background:", "# December 4th 2017 Apple introduced a rate limit - which is of course fine by itself -", "# but unfortunately also rate limits successful logins. If you c...
This method is used for both the Apple Dev Portal and App Store Connect This will also handle 2 step verification and 2 factor authentication It is called in `send_login_request` of sub classes (which the method `login`, above, transferred over to via `do_login`)
[ "This", "method", "is", "used", "for", "both", "the", "Apple", "Dev", "Portal", "and", "App", "Store", "Connect", "This", "will", "also", "handle", "2", "step", "verification", "and", "2", "factor", "authentication" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/client.rb#L400-L513
train
fastlane/fastlane
spaceship/lib/spaceship/client.rb
Spaceship.Client.fetch_program_license_agreement_messages
def fetch_program_license_agreement_messages all_messages = [] messages_request = request(:get, "https://appstoreconnect.apple.com/olympus/v1/contractMessages") body = messages_request.body if body body = JSON.parse(body) if body.kind_of?(String) body.map do |messages| ...
ruby
def fetch_program_license_agreement_messages all_messages = [] messages_request = request(:get, "https://appstoreconnect.apple.com/olympus/v1/contractMessages") body = messages_request.body if body body = JSON.parse(body) if body.kind_of?(String) body.map do |messages| ...
[ "def", "fetch_program_license_agreement_messages", "all_messages", "=", "[", "]", "messages_request", "=", "request", "(", ":get", ",", "\"https://appstoreconnect.apple.com/olympus/v1/contractMessages\"", ")", "body", "=", "messages_request", ".", "body", "if", "body", "bod...
Get contract messages from App Store Connect's "olympus" endpoint
[ "Get", "contract", "messages", "from", "App", "Store", "Connect", "s", "olympus", "endpoint" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/client.rb#L600-L613
train
fastlane/fastlane
spaceship/lib/spaceship/client.rb
Spaceship.Client.raise_insufficient_permission_error!
def raise_insufficient_permission_error!(additional_error_string: nil, caller_location: 2) # get the method name of the request that failed # `block in` is used very often for requests when surrounded for paging or retrying blocks # The ! is part of some methods when they modify or delete a resource, ...
ruby
def raise_insufficient_permission_error!(additional_error_string: nil, caller_location: 2) # get the method name of the request that failed # `block in` is used very often for requests when surrounded for paging or retrying blocks # The ! is part of some methods when they modify or delete a resource, ...
[ "def", "raise_insufficient_permission_error!", "(", "additional_error_string", ":", "nil", ",", "caller_location", ":", "2", ")", "# get the method name of the request that failed", "# `block in` is used very often for requests when surrounded for paging or retrying blocks", "# The ! is pa...
This also gets called from subclasses
[ "This", "also", "gets", "called", "from", "subclasses" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/client.rb#L747-L760
train
fastlane/fastlane
spaceship/lib/spaceship/client.rb
Spaceship.Client.send_request
def send_request(method, url_or_path, params, headers, &block) with_retry do response = @client.send(method, url_or_path, params, headers, &block) log_response(method, url_or_path, response, headers, &block) resp_hash = response.to_hash if resp_hash[:status] == 401 msg =...
ruby
def send_request(method, url_or_path, params, headers, &block) with_retry do response = @client.send(method, url_or_path, params, headers, &block) log_response(method, url_or_path, response, headers, &block) resp_hash = response.to_hash if resp_hash[:status] == 401 msg =...
[ "def", "send_request", "(", "method", ",", "url_or_path", ",", "params", ",", "headers", ",", "&", "block", ")", "with_retry", "do", "response", "=", "@client", ".", "send", "(", "method", ",", "url_or_path", ",", "params", ",", "headers", ",", "block", ...
Actually sends the request to the remote server Automatically retries the request up to 3 times if something goes wrong
[ "Actually", "sends", "the", "request", "to", "the", "remote", "server", "Automatically", "retries", "the", "request", "up", "to", "3", "times", "if", "something", "goes", "wrong" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/client.rb#L843-L865
train
fastlane/fastlane
deliver/lib/deliver/html_generator.rb
Deliver.HtmlGenerator.render_relative_path
def render_relative_path(export_path, path) export_path = Pathname.new(export_path) path = Pathname.new(path).relative_path_from(export_path) return path.to_path end
ruby
def render_relative_path(export_path, path) export_path = Pathname.new(export_path) path = Pathname.new(path).relative_path_from(export_path) return path.to_path end
[ "def", "render_relative_path", "(", "export_path", ",", "path", ")", "export_path", "=", "Pathname", ".", "new", "(", "export_path", ")", "path", "=", "Pathname", ".", "new", "(", "path", ")", ".", "relative_path_from", "(", "export_path", ")", "return", "pa...
Returns a path relative to FastlaneFolder.path This is needed as the Preview.html file is located inside FastlaneFolder.path
[ "Returns", "a", "path", "relative", "to", "FastlaneFolder", ".", "path", "This", "is", "needed", "as", "the", "Preview", ".", "html", "file", "is", "located", "inside", "FastlaneFolder", ".", "path" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/deliver/lib/deliver/html_generator.rb#L37-L41
train
fastlane/fastlane
deliver/lib/deliver/html_generator.rb
Deliver.HtmlGenerator.render
def render(options, screenshots, export_path = nil) @screenshots = screenshots || [] @options = options @export_path = export_path @app_name = (options[:name]['en-US'] || options[:name].values.first) if options[:name] @app_name ||= options[:app].name @languages = options[:descripti...
ruby
def render(options, screenshots, export_path = nil) @screenshots = screenshots || [] @options = options @export_path = export_path @app_name = (options[:name]['en-US'] || options[:name].values.first) if options[:name] @app_name ||= options[:app].name @languages = options[:descripti...
[ "def", "render", "(", "options", ",", "screenshots", ",", "export_path", "=", "nil", ")", "@screenshots", "=", "screenshots", "||", "[", "]", "@options", "=", "options", "@export_path", "=", "export_path", "@app_name", "=", "(", "options", "[", ":name", "]",...
Renders all data available to quickly see if everything was correctly generated. @param export_path (String) The path to a folder where the resulting HTML file should be stored.
[ "Renders", "all", "data", "available", "to", "quickly", "see", "if", "everything", "was", "correctly", "generated", "." ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/deliver/lib/deliver/html_generator.rb#L45-L63
train
fastlane/fastlane
fastlane/lib/fastlane/fast_file.rb
Fastlane.FastFile.sh
def sh(*command, log: true, error_callback: nil, &b) FastFile.sh(*command, log: log, error_callback: error_callback, &b) end
ruby
def sh(*command, log: true, error_callback: nil, &b) FastFile.sh(*command, log: log, error_callback: error_callback, &b) end
[ "def", "sh", "(", "*", "command", ",", "log", ":", "true", ",", "error_callback", ":", "nil", ",", "&", "b", ")", "FastFile", ".", "sh", "(", "command", ",", "log", ":", "log", ",", "error_callback", ":", "error_callback", ",", "b", ")", "end" ]
Execute shell command
[ "Execute", "shell", "command" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/fast_file.rb#L185-L187
train
fastlane/fastlane
snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb
Snapshot.SimulatorLauncherBase.add_media
def add_media(device_types, media_type, paths) media_type = media_type.to_s device_types.each do |device_type| UI.verbose("Adding #{media_type}s to #{device_type}...") device_udid = TestCommandGenerator.device_udid(device_type) UI.message("Launch Simulator #{device_type}") ...
ruby
def add_media(device_types, media_type, paths) media_type = media_type.to_s device_types.each do |device_type| UI.verbose("Adding #{media_type}s to #{device_type}...") device_udid = TestCommandGenerator.device_udid(device_type) UI.message("Launch Simulator #{device_type}") ...
[ "def", "add_media", "(", "device_types", ",", "media_type", ",", "paths", ")", "media_type", "=", "media_type", ".", "to_s", "device_types", ".", "each", "do", "|", "device_type", "|", "UI", ".", "verbose", "(", "\"Adding #{media_type}s to #{device_type}...\"", ")...
pass an array of device types
[ "pass", "an", "array", "of", "device", "types" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb#L71-L95
train
fastlane/fastlane
fastlane/lib/fastlane/setup/setup.rb
Fastlane.Setup.append_lane
def append_lane(lane) lane.compact! # remove nil values new_lines = "\n\n" if self.is_swift_fastfile new_lines = "" unless self.fastfile_content.include?("lane() {") # the first lane we don't want new lines self.fastfile_content.gsub!("[[LANES]]", "#{new_lines}\t#{lane.join("\n\t")}[[...
ruby
def append_lane(lane) lane.compact! # remove nil values new_lines = "\n\n" if self.is_swift_fastfile new_lines = "" unless self.fastfile_content.include?("lane() {") # the first lane we don't want new lines self.fastfile_content.gsub!("[[LANES]]", "#{new_lines}\t#{lane.join("\n\t")}[[...
[ "def", "append_lane", "(", "lane", ")", "lane", ".", "compact!", "# remove nil values", "new_lines", "=", "\"\\n\\n\"", "if", "self", ".", "is_swift_fastfile", "new_lines", "=", "\"\"", "unless", "self", ".", "fastfile_content", ".", "include?", "(", "\"lane() {\"...
Append a lane to the current Fastfile template we're generating
[ "Append", "a", "lane", "to", "the", "current", "Fastfile", "template", "we", "re", "generating" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/setup/setup.rb#L146-L157
train
fastlane/fastlane
fastlane/lib/fastlane/setup/setup.rb
Fastlane.Setup.add_or_update_gemfile
def add_or_update_gemfile(update_gemfile_if_needed: false) if gemfile_exists? ensure_gemfile_valid!(update_gemfile_if_needed: update_gemfile_if_needed) else if update_gemfile_if_needed || UI.confirm("It is recommended to run fastlane with a Gemfile set up, do you want fastlane to create one ...
ruby
def add_or_update_gemfile(update_gemfile_if_needed: false) if gemfile_exists? ensure_gemfile_valid!(update_gemfile_if_needed: update_gemfile_if_needed) else if update_gemfile_if_needed || UI.confirm("It is recommended to run fastlane with a Gemfile set up, do you want fastlane to create one ...
[ "def", "add_or_update_gemfile", "(", "update_gemfile_if_needed", ":", "false", ")", "if", "gemfile_exists?", "ensure_gemfile_valid!", "(", "update_gemfile_if_needed", ":", "update_gemfile_if_needed", ")", "else", "if", "update_gemfile_if_needed", "||", "UI", ".", "confirm",...
This method is responsible for ensuring there is a working Gemfile, and that `fastlane` is defined as a dependency while also having `rubygems` as a gem source
[ "This", "method", "is", "responsible", "for", "ensuring", "there", "is", "a", "working", "Gemfile", "and", "that", "fastlane", "is", "defined", "as", "a", "dependency", "while", "also", "having", "rubygems", "as", "a", "gem", "source" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/setup/setup.rb#L250-L259
train
fastlane/fastlane
credentials_manager/lib/credentials_manager/cli.rb
CredentialsManager.CLI.run
def run program :name, 'CredentialsManager' program :version, Fastlane::VERSION program :description, 'Manage credentials for fastlane tools.' # Command to add entry to Keychain command :add do |c| c.syntax = 'fastlane fastlane-credentials add' c.description = 'Adds a fast...
ruby
def run program :name, 'CredentialsManager' program :version, Fastlane::VERSION program :description, 'Manage credentials for fastlane tools.' # Command to add entry to Keychain command :add do |c| c.syntax = 'fastlane fastlane-credentials add' c.description = 'Adds a fast...
[ "def", "run", "program", ":name", ",", "'CredentialsManager'", "program", ":version", ",", "Fastlane", "::", "VERSION", "program", ":description", ",", "'Manage credentials for fastlane tools.'", "# Command to add entry to Keychain", "command", ":add", "do", "|", "c", "|"...
Parses command options and executes actions
[ "Parses", "command", "options", "and", "executes", "actions" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/credentials_manager/lib/credentials_manager/cli.rb#L10-L48
train
fastlane/fastlane
credentials_manager/lib/credentials_manager/cli.rb
CredentialsManager.CLI.add
def add(username, password) CredentialsManager::AccountManager.new( user: username, password: password ).add_to_keychain end
ruby
def add(username, password) CredentialsManager::AccountManager.new( user: username, password: password ).add_to_keychain end
[ "def", "add", "(", "username", ",", "password", ")", "CredentialsManager", "::", "AccountManager", ".", "new", "(", "user", ":", "username", ",", "password", ":", "password", ")", ".", "add_to_keychain", "end" ]
Add entry to Apple Keychain using AccountManager
[ "Add", "entry", "to", "Apple", "Keychain", "using", "AccountManager" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/credentials_manager/lib/credentials_manager/cli.rb#L53-L58
train
fastlane/fastlane
deliver/lib/deliver/setup.rb
Deliver.Setup.generate_deliver_file
def generate_deliver_file(deliver_path, options) v = options[:app].latest_version metadata_path = options[:metadata_path] || File.join(deliver_path, 'metadata') generate_metadata_files(v, metadata_path) # Generate the final Deliverfile here return File.read(deliverfile_path) end
ruby
def generate_deliver_file(deliver_path, options) v = options[:app].latest_version metadata_path = options[:metadata_path] || File.join(deliver_path, 'metadata') generate_metadata_files(v, metadata_path) # Generate the final Deliverfile here return File.read(deliverfile_path) end
[ "def", "generate_deliver_file", "(", "deliver_path", ",", "options", ")", "v", "=", "options", "[", ":app", "]", ".", "latest_version", "metadata_path", "=", "options", "[", ":metadata_path", "]", "||", "File", ".", "join", "(", "deliver_path", ",", "'metadata...
This method takes care of creating a new 'deliver' folder, containing the app metadata and screenshots folders
[ "This", "method", "takes", "care", "of", "creating", "a", "new", "deliver", "folder", "containing", "the", "app", "metadata", "and", "screenshots", "folders" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/deliver/lib/deliver/setup.rb#L42-L49
train
fastlane/fastlane
fastlane/lib/fastlane/plugins/plugin_info_collector.rb
Fastlane.PluginInfoCollector.gem_name_taken?
def gem_name_taken?(name) require 'open-uri' require 'json' url = "https://rubygems.org/api/v1/gems/#{name}.json" response = JSON.parse(open(url).read) return !!response['version'] rescue false end
ruby
def gem_name_taken?(name) require 'open-uri' require 'json' url = "https://rubygems.org/api/v1/gems/#{name}.json" response = JSON.parse(open(url).read) return !!response['version'] rescue false end
[ "def", "gem_name_taken?", "(", "name", ")", "require", "'open-uri'", "require", "'json'", "url", "=", "\"https://rubygems.org/api/v1/gems/#{name}.json\"", "response", "=", "JSON", ".", "parse", "(", "open", "(", "url", ")", ".", "read", ")", "return", "!", "!", ...
Checks if the gem name is still free on RubyGems
[ "Checks", "if", "the", "gem", "name", "is", "still", "free", "on", "RubyGems" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/plugins/plugin_info_collector.rb#L67-L75
train
fastlane/fastlane
fastlane/lib/fastlane/plugins/plugin_info_collector.rb
Fastlane.PluginInfoCollector.fix_plugin_name
def fix_plugin_name(name) name = name.to_s.downcase fixes = { /[\- ]/ => '_', # dashes and spaces become underscores /[^a-z0-9_]/ => '', # anything other than lower case letters, numbers and underscores is removed /fastlane[_]?/ => '', # 'fastlane' or 'fastlane_' is removed /...
ruby
def fix_plugin_name(name) name = name.to_s.downcase fixes = { /[\- ]/ => '_', # dashes and spaces become underscores /[^a-z0-9_]/ => '', # anything other than lower case letters, numbers and underscores is removed /fastlane[_]?/ => '', # 'fastlane' or 'fastlane_' is removed /...
[ "def", "fix_plugin_name", "(", "name", ")", "name", "=", "name", ".", "to_s", ".", "downcase", "fixes", "=", "{", "/", "\\-", "/", "=>", "'_'", ",", "# dashes and spaces become underscores", "/", "/", "=>", "''", ",", "# anything other than lower case letters, n...
Applies a series of replacement rules to turn the requested plugin name into one that is acceptable, returning that suggestion
[ "Applies", "a", "series", "of", "replacement", "rules", "to", "turn", "the", "requested", "plugin", "name", "into", "one", "that", "is", "acceptable", "returning", "that", "suggestion" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/plugins/plugin_info_collector.rb#L79-L91
train
fastlane/fastlane
sigh/lib/sigh/resign.rb
Sigh.Resign.installed_identities
def installed_identities available = request_valid_identities ids = {} available.split("\n").each do |current| begin sha1 = current.match(/[a-zA-Z0-9]{40}/).to_s name = current.match(/.*\"(.*)\"/)[1] ids[sha1] = name rescue nil end # the ...
ruby
def installed_identities available = request_valid_identities ids = {} available.split("\n").each do |current| begin sha1 = current.match(/[a-zA-Z0-9]{40}/).to_s name = current.match(/.*\"(.*)\"/)[1] ids[sha1] = name rescue nil end # the ...
[ "def", "installed_identities", "available", "=", "request_valid_identities", "ids", "=", "{", "}", "available", ".", "split", "(", "\"\\n\"", ")", ".", "each", "do", "|", "current", "|", "begin", "sha1", "=", "current", ".", "match", "(", "/", "/", ")", ...
Hash of available signing identities
[ "Hash", "of", "available", "signing", "identities" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/sigh/lib/sigh/resign.rb#L188-L202
train
fastlane/fastlane
supply/lib/supply/listing.rb
Supply.Listing.save
def save @google_api.update_listing_for_language(language: language, title: title, short_description: short_description, full_description: full_description, ...
ruby
def save @google_api.update_listing_for_language(language: language, title: title, short_description: short_description, full_description: full_description, ...
[ "def", "save", "@google_api", ".", "update_listing_for_language", "(", "language", ":", "language", ",", "title", ":", "title", ",", "short_description", ":", "short_description", ",", "full_description", ":", "full_description", ",", "video", ":", "video", ")", "...
Initializes the listing to use the given api client, language, and fills it with the current listing if available Updates the listing in the current edit
[ "Initializes", "the", "listing", "to", "use", "the", "given", "api", "client", "language", "and", "fills", "it", "with", "the", "current", "listing", "if", "available", "Updates", "the", "listing", "in", "the", "current", "edit" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/supply/lib/supply/listing.rb#L24-L30
train
fastlane/fastlane
credentials_manager/lib/credentials_manager/account_manager.rb
CredentialsManager.AccountManager.invalid_credentials
def invalid_credentials(force: false) puts("The login credentials for '#{user}' seem to be wrong".red) if fetch_password_from_env puts("The password was taken from the environment variable") puts("Please make sure it is correct") return false end if force || agree("Do y...
ruby
def invalid_credentials(force: false) puts("The login credentials for '#{user}' seem to be wrong".red) if fetch_password_from_env puts("The password was taken from the environment variable") puts("Please make sure it is correct") return false end if force || agree("Do y...
[ "def", "invalid_credentials", "(", "force", ":", "false", ")", "puts", "(", "\"The login credentials for '#{user}' seem to be wrong\"", ".", "red", ")", "if", "fetch_password_from_env", "puts", "(", "\"The password was taken from the environment variable\"", ")", "puts", "(",...
Call this method to ask the user to re-enter the credentials @param force: if false, the user is asked before it gets deleted @return: Did the user decide to remove the old entry and enter a new password?
[ "Call", "this", "method", "to", "ask", "the", "user", "to", "re", "-", "enter", "the", "credentials" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/credentials_manager/lib/credentials_manager/account_manager.rb#L63-L79
train
fastlane/fastlane
credentials_manager/lib/credentials_manager/account_manager.rb
CredentialsManager.AccountManager.options
def options hash = {} hash[:p] = ENV["FASTLANE_PATH"] if ENV["FASTLANE_PATH"] hash[:P] = ENV["FASTLANE_PORT"] if ENV["FASTLANE_PORT"] hash[:r] = ENV["FASTLANE_PROTOCOL"] if ENV["FASTLANE_PROTOCOL"] hash.empty? ? nil : hash end
ruby
def options hash = {} hash[:p] = ENV["FASTLANE_PATH"] if ENV["FASTLANE_PATH"] hash[:P] = ENV["FASTLANE_PORT"] if ENV["FASTLANE_PORT"] hash[:r] = ENV["FASTLANE_PROTOCOL"] if ENV["FASTLANE_PROTOCOL"] hash.empty? ? nil : hash end
[ "def", "options", "hash", "=", "{", "}", "hash", "[", ":p", "]", "=", "ENV", "[", "\"FASTLANE_PATH\"", "]", "if", "ENV", "[", "\"FASTLANE_PATH\"", "]", "hash", "[", ":P", "]", "=", "ENV", "[", "\"FASTLANE_PORT\"", "]", "if", "ENV", "[", "\"FASTLANE_POR...
Use env variables from this method to augment internet password item with additional data. These variables are used by Xamarin Studio to authenticate Apple developers.
[ "Use", "env", "variables", "from", "this", "method", "to", "augment", "internet", "password", "item", "with", "additional", "data", ".", "These", "variables", "are", "used", "by", "Xamarin", "Studio", "to", "authenticate", "Apple", "developers", "." ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/credentials_manager/lib/credentials_manager/account_manager.rb#L100-L106
train
fastlane/fastlane
fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb
Fastlane.InspectorReporter.inspector_started_query
def inspector_started_query(query, inspector) puts("") puts("Looking for related GitHub issues on #{inspector.repo_owner}/#{inspector.repo_name}...") puts("Search query: #{query}") if FastlaneCore::Globals.verbose? puts("") end
ruby
def inspector_started_query(query, inspector) puts("") puts("Looking for related GitHub issues on #{inspector.repo_owner}/#{inspector.repo_name}...") puts("Search query: #{query}") if FastlaneCore::Globals.verbose? puts("") end
[ "def", "inspector_started_query", "(", "query", ",", "inspector", ")", "puts", "(", "\"\"", ")", "puts", "(", "\"Looking for related GitHub issues on #{inspector.repo_owner}/#{inspector.repo_name}...\"", ")", "puts", "(", "\"Search query: #{query}\"", ")", "if", "FastlaneCore...
Called just as the investigation has begun.
[ "Called", "just", "as", "the", "investigation", "has", "begun", "." ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb#L11-L16
train
fastlane/fastlane
fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb
Fastlane.InspectorReporter.inspector_successfully_received_report
def inspector_successfully_received_report(report, inspector) report.issues[0..(NUMBER_OF_ISSUES_INLINE - 1)].each { |issue| print_issue_full(issue) } if report.issues.count > NUMBER_OF_ISSUES_INLINE report.url.sub!('\'', '%27') puts("and #{report.total_results - NUMBER_OF_ISSUES_INLINE} mo...
ruby
def inspector_successfully_received_report(report, inspector) report.issues[0..(NUMBER_OF_ISSUES_INLINE - 1)].each { |issue| print_issue_full(issue) } if report.issues.count > NUMBER_OF_ISSUES_INLINE report.url.sub!('\'', '%27') puts("and #{report.total_results - NUMBER_OF_ISSUES_INLINE} mo...
[ "def", "inspector_successfully_received_report", "(", "report", ",", "inspector", ")", "report", ".", "issues", "[", "0", "..", "(", "NUMBER_OF_ISSUES_INLINE", "-", "1", ")", "]", ".", "each", "{", "|", "issue", "|", "print_issue_full", "(", "issue", ")", "}...
Called once the inspector has received a report with more than one issue.
[ "Called", "once", "the", "inspector", "has", "received", "a", "report", "with", "more", "than", "one", "issue", "." ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb#L19-L29
train
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.select_team
def select_team(team_id: nil, team_name: nil) t_id = (team_id || ENV['FASTLANE_ITC_TEAM_ID'] || '').strip t_name = (team_name || ENV['FASTLANE_ITC_TEAM_NAME'] || '').strip if t_name.length > 0 && t_id.length.zero? # we prefer IDs over names, they are unique puts("Looking for App Store Connect...
ruby
def select_team(team_id: nil, team_name: nil) t_id = (team_id || ENV['FASTLANE_ITC_TEAM_ID'] || '').strip t_name = (team_name || ENV['FASTLANE_ITC_TEAM_NAME'] || '').strip if t_name.length > 0 && t_id.length.zero? # we prefer IDs over names, they are unique puts("Looking for App Store Connect...
[ "def", "select_team", "(", "team_id", ":", "nil", ",", "team_name", ":", "nil", ")", "t_id", "=", "(", "team_id", "||", "ENV", "[", "'FASTLANE_ITC_TEAM_ID'", "]", "||", "''", ")", ".", "strip", "t_name", "=", "(", "team_name", "||", "ENV", "[", "'FASTL...
Shows a team selection for the user in the terminal. This should not be called on CI systems @param team_id (String) (optional): The ID of an App Store Connect team @param team_name (String) (optional): The name of an App Store Connect team
[ "Shows", "a", "team", "selection", "for", "the", "user", "in", "the", "terminal", ".", "This", "should", "not", "be", "called", "on", "CI", "systems" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L64-L123
train
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.fetch_errors_in_data
def fetch_errors_in_data(data_section: nil, sub_section_name: nil, keys: nil) if data_section && sub_section_name sub_section = data_section[sub_section_name] else sub_section = data_section end unless sub_section return {} end error_map = {} keys.each...
ruby
def fetch_errors_in_data(data_section: nil, sub_section_name: nil, keys: nil) if data_section && sub_section_name sub_section = data_section[sub_section_name] else sub_section = data_section end unless sub_section return {} end error_map = {} keys.each...
[ "def", "fetch_errors_in_data", "(", "data_section", ":", "nil", ",", "sub_section_name", ":", "nil", ",", "keys", ":", "nil", ")", "if", "data_section", "&&", "sub_section_name", "sub_section", "=", "data_section", "[", "sub_section_name", "]", "else", "sub_sectio...
Sometimes we get errors or info nested in our data This method allows you to pass in a set of keys to check for along with the name of the sub_section of your original data where we should check Returns a mapping of keys to data array if we find anything, otherwise, empty map
[ "Sometimes", "we", "get", "errors", "or", "info", "nested", "in", "our", "data", "This", "method", "allows", "you", "to", "pass", "in", "a", "set", "of", "keys", "to", "check", "for", "along", "with", "the", "name", "of", "the", "sub_section", "of", "y...
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L139-L156
train
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.create_application!
def create_application!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil, company_name: nil, platform: nil, itunes_connect_users: nil) puts("The `version` parameter is deprecated. Use `Spaceship::Tunes::Application.ensure_version!` method instead") if version ...
ruby
def create_application!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil, company_name: nil, platform: nil, itunes_connect_users: nil) puts("The `version` parameter is deprecated. Use `Spaceship::Tunes::Application.ensure_version!` method instead") if version ...
[ "def", "create_application!", "(", "name", ":", "nil", ",", "primary_language", ":", "nil", ",", "version", ":", "nil", ",", "sku", ":", "nil", ",", "bundle_id", ":", "nil", ",", "bundle_id_suffix", ":", "nil", ",", "company_name", ":", "nil", ",", "plat...
Creates a new application on App Store Connect @param name (String): The name of your app as it will appear on the App Store. This can't be longer than 255 characters. @param primary_language (String): If localized app information isn't available in an App Store territory, the information from your primary lang...
[ "Creates", "a", "new", "application", "on", "App", "Store", "Connect" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L289-L326
train
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.pricing_tiers
def pricing_tiers @pricing_tiers ||= begin r = request(:get, 'ra/apps/pricing/matrix') data = parse_response(r, 'data')['pricingTiers'] data.map { |tier| Spaceship::Tunes::PricingTier.factory(tier) } end end
ruby
def pricing_tiers @pricing_tiers ||= begin r = request(:get, 'ra/apps/pricing/matrix') data = parse_response(r, 'data')['pricingTiers'] data.map { |tier| Spaceship::Tunes::PricingTier.factory(tier) } end end
[ "def", "pricing_tiers", "@pricing_tiers", "||=", "begin", "r", "=", "request", "(", ":get", ",", "'ra/apps/pricing/matrix'", ")", "data", "=", "parse_response", "(", "r", ",", "'data'", ")", "[", "'pricingTiers'", "]", "data", ".", "map", "{", "|", "tier", ...
Returns an array of all available pricing tiers @note Although this information is publicly available, the current spaceship implementation requires you to have a logged in client to access it @return [Array] the PricingTier objects (Spaceship::Tunes::PricingTier) [{ "tierStem": "0", "tierName": "Free", "...
[ "Returns", "an", "array", "of", "all", "available", "pricing", "tiers" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L682-L688
train
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.supported_territories
def supported_territories data = supported_countries data.map { |country| Spaceship::Tunes::Territory.factory(country) } end
ruby
def supported_territories data = supported_countries data.map { |country| Spaceship::Tunes::Territory.factory(country) } end
[ "def", "supported_territories", "data", "=", "supported_countries", "data", ".", "map", "{", "|", "country", "|", "Spaceship", "::", "Tunes", "::", "Territory", ".", "factory", "(", "country", ")", "}", "end" ]
Returns an array of all supported territories @note Although this information is publicly available, the current spaceship implementation requires you to have a logged in client to access it @return [Array] the Territory objects (Spaceship::Tunes::Territory)
[ "Returns", "an", "array", "of", "all", "supported", "territories" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L744-L747
train
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.upload_watch_icon
def upload_watch_icon(app_version, upload_image) raise "app_version is required" unless app_version raise "upload_image is required" unless upload_image du_client.upload_watch_icon(app_version, upload_image, content_provider_id, sso_token_for_image) end
ruby
def upload_watch_icon(app_version, upload_image) raise "app_version is required" unless app_version raise "upload_image is required" unless upload_image du_client.upload_watch_icon(app_version, upload_image, content_provider_id, sso_token_for_image) end
[ "def", "upload_watch_icon", "(", "app_version", ",", "upload_image", ")", "raise", "\"app_version is required\"", "unless", "app_version", "raise", "\"upload_image is required\"", "unless", "upload_image", "du_client", ".", "upload_watch_icon", "(", "app_version", ",", "upl...
Uploads a watch icon @param app_version (AppVersion): The version of your app @param upload_image (UploadFile): The icon to upload @return [JSON] the response
[ "Uploads", "a", "watch", "icon" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L787-L792
train
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.upload_purchase_review_screenshot
def upload_purchase_review_screenshot(app_id, upload_image) data = du_client.upload_purchase_review_screenshot(app_id, upload_image, content_provider_id, sso_token_for_image) { "value" => { "assetToken" => data["token"], "sortOrder" => 0, "type" => du_clie...
ruby
def upload_purchase_review_screenshot(app_id, upload_image) data = du_client.upload_purchase_review_screenshot(app_id, upload_image, content_provider_id, sso_token_for_image) { "value" => { "assetToken" => data["token"], "sortOrder" => 0, "type" => du_clie...
[ "def", "upload_purchase_review_screenshot", "(", "app_id", ",", "upload_image", ")", "data", "=", "du_client", ".", "upload_purchase_review_screenshot", "(", "app_id", ",", "upload_image", ",", "content_provider_id", ",", "sso_token_for_image", ")", "{", "\"value\"", "=...
Uploads an In-App-Purchase Review screenshot @param app_id (AppId): The id of the app @param upload_image (UploadFile): The icon to upload @return [JSON] the screenshot data, ready to be added to an In-App-Purchase
[ "Uploads", "an", "In", "-", "App", "-", "Purchase", "Review", "screenshot" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L798-L812
train
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.upload_screenshot
def upload_screenshot(app_version, upload_image, device, is_messages) raise "app_version is required" unless app_version raise "upload_image is required" unless upload_image raise "device is required" unless device du_client.upload_screenshot(app_version, upload_image, content_provider_id, sso_...
ruby
def upload_screenshot(app_version, upload_image, device, is_messages) raise "app_version is required" unless app_version raise "upload_image is required" unless upload_image raise "device is required" unless device du_client.upload_screenshot(app_version, upload_image, content_provider_id, sso_...
[ "def", "upload_screenshot", "(", "app_version", ",", "upload_image", ",", "device", ",", "is_messages", ")", "raise", "\"app_version is required\"", "unless", "app_version", "raise", "\"upload_image is required\"", "unless", "upload_image", "raise", "\"device is required\"", ...
Uploads a screenshot @param app_version (AppVersion): The version of your app @param upload_image (UploadFile): The image to upload @param device (string): The target device @param is_messages (Bool): True if the screenshot is for iMessage @return [JSON] the response
[ "Uploads", "a", "screenshot" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L820-L826
train
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.upload_messages_screenshot
def upload_messages_screenshot(app_version, upload_image, device) raise "app_version is required" unless app_version raise "upload_image is required" unless upload_image raise "device is required" unless device du_client.upload_messages_screenshot(app_version, upload_image, content_provider_id,...
ruby
def upload_messages_screenshot(app_version, upload_image, device) raise "app_version is required" unless app_version raise "upload_image is required" unless upload_image raise "device is required" unless device du_client.upload_messages_screenshot(app_version, upload_image, content_provider_id,...
[ "def", "upload_messages_screenshot", "(", "app_version", ",", "upload_image", ",", "device", ")", "raise", "\"app_version is required\"", "unless", "app_version", "raise", "\"upload_image is required\"", "unless", "upload_image", "raise", "\"device is required\"", "unless", "...
Uploads an iMessage screenshot @param app_version (AppVersion): The version of your app @param upload_image (UploadFile): The image to upload @param device (string): The target device @return [JSON] the response
[ "Uploads", "an", "iMessage", "screenshot" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L833-L839
train
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.upload_trailer_preview
def upload_trailer_preview(app_version, upload_trailer_preview, device) raise "app_version is required" unless app_version raise "upload_trailer_preview is required" unless upload_trailer_preview raise "device is required" unless device du_client.upload_trailer_preview(app_version, upload_trail...
ruby
def upload_trailer_preview(app_version, upload_trailer_preview, device) raise "app_version is required" unless app_version raise "upload_trailer_preview is required" unless upload_trailer_preview raise "device is required" unless device du_client.upload_trailer_preview(app_version, upload_trail...
[ "def", "upload_trailer_preview", "(", "app_version", ",", "upload_trailer_preview", ",", "device", ")", "raise", "\"app_version is required\"", "unless", "app_version", "raise", "\"upload_trailer_preview is required\"", "unless", "upload_trailer_preview", "raise", "\"device is re...
Uploads the trailer preview @param app_version (AppVersion): The version of your app @param upload_trailer_preview (UploadFile): The trailer preview to upload @param device (string): The target device @return [JSON] the response
[ "Uploads", "the", "trailer", "preview" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L868-L874
train
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.ref_data
def ref_data r = request(:get, '/WebObjects/iTunesConnect.woa/ra/apps/version/ref') data = parse_response(r, 'data') Spaceship::Tunes::AppVersionRef.factory(data) end
ruby
def ref_data r = request(:get, '/WebObjects/iTunesConnect.woa/ra/apps/version/ref') data = parse_response(r, 'data') Spaceship::Tunes::AppVersionRef.factory(data) end
[ "def", "ref_data", "r", "=", "request", "(", ":get", ",", "'/WebObjects/iTunesConnect.woa/ra/apps/version/ref'", ")", "data", "=", "parse_response", "(", "r", ",", "'data'", ")", "Spaceship", "::", "Tunes", "::", "AppVersionRef", ".", "factory", "(", "data", ")"...
Fetches the App Version Reference information from ITC @return [AppVersionRef] the response
[ "Fetches", "the", "App", "Version", "Reference", "information", "from", "ITC" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L878-L882
train
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.all_build_trains
def all_build_trains(app_id: nil, platform: 'ios') platform = 'ios' if platform.nil? r = request(:get, "ra/apps/#{app_id}/buildHistory?platform=#{platform}") handle_itc_response(r.body) end
ruby
def all_build_trains(app_id: nil, platform: 'ios') platform = 'ios' if platform.nil? r = request(:get, "ra/apps/#{app_id}/buildHistory?platform=#{platform}") handle_itc_response(r.body) end
[ "def", "all_build_trains", "(", "app_id", ":", "nil", ",", "platform", ":", "'ios'", ")", "platform", "=", "'ios'", "if", "platform", ".", "nil?", "r", "=", "request", "(", ":get", ",", "\"ra/apps/#{app_id}/buildHistory?platform=#{platform}\"", ")", "handle_itc_re...
All build trains, even if there is no TestFlight
[ "All", "build", "trains", "even", "if", "there", "is", "no", "TestFlight" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L960-L964
train
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.update_iap_family!
def update_iap_family!(app_id: nil, family_id: nil, data: nil) with_tunes_retry do r = request(:put) do |req| req.url("ra/apps/#{app_id}/iaps/family/#{family_id}/") req.body = data.to_json req.headers['Content-Type'] = 'application/json' end handle_itc_respons...
ruby
def update_iap_family!(app_id: nil, family_id: nil, data: nil) with_tunes_retry do r = request(:put) do |req| req.url("ra/apps/#{app_id}/iaps/family/#{family_id}/") req.body = data.to_json req.headers['Content-Type'] = 'application/json' end handle_itc_respons...
[ "def", "update_iap_family!", "(", "app_id", ":", "nil", ",", "family_id", ":", "nil", ",", "data", ":", "nil", ")", "with_tunes_retry", "do", "r", "=", "request", "(", ":put", ")", "do", "|", "req", "|", "req", ".", "url", "(", "\"ra/apps/#{app_id}/iaps/...
updates an In-App-Purchases-Family
[ "updates", "an", "In", "-", "App", "-", "Purchases", "-", "Family" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L1227-L1236
train
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.update_iap!
def update_iap!(app_id: nil, purchase_id: nil, data: nil) with_tunes_retry do r = request(:put) do |req| req.url("ra/apps/#{app_id}/iaps/#{purchase_id}") req.body = data.to_json req.headers['Content-Type'] = 'application/json' end handle_itc_response(r.body) ...
ruby
def update_iap!(app_id: nil, purchase_id: nil, data: nil) with_tunes_retry do r = request(:put) do |req| req.url("ra/apps/#{app_id}/iaps/#{purchase_id}") req.body = data.to_json req.headers['Content-Type'] = 'application/json' end handle_itc_response(r.body) ...
[ "def", "update_iap!", "(", "app_id", ":", "nil", ",", "purchase_id", ":", "nil", ",", "data", ":", "nil", ")", "with_tunes_retry", "do", "r", "=", "request", "(", ":put", ")", "do", "|", "req", "|", "req", ".", "url", "(", "\"ra/apps/#{app_id}/iaps/#{pur...
updates an In-App-Purchases
[ "updates", "an", "In", "-", "App", "-", "Purchases" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L1239-L1248
train
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.create_iap!
def create_iap!(app_id: nil, type: nil, versions: nil, reference_name: nil, product_id: nil, cleared_for_sale: true, review_notes: nil, review_screenshot: nil, pricing_intervals: nil, family_id: nil, subscription_duration: nil, subscription_free_trial: nil) # Load IAP Template based on Type type ||= "consum...
ruby
def create_iap!(app_id: nil, type: nil, versions: nil, reference_name: nil, product_id: nil, cleared_for_sale: true, review_notes: nil, review_screenshot: nil, pricing_intervals: nil, family_id: nil, subscription_duration: nil, subscription_free_trial: nil) # Load IAP Template based on Type type ||= "consum...
[ "def", "create_iap!", "(", "app_id", ":", "nil", ",", "type", ":", "nil", ",", "versions", ":", "nil", ",", "reference_name", ":", "nil", ",", "product_id", ":", "nil", ",", "cleared_for_sale", ":", "true", ",", "review_notes", ":", "nil", ",", "review_s...
Creates an In-App-Purchases
[ "Creates", "an", "In", "-", "App", "-", "Purchases" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L1292-L1350
train
fastlane/fastlane
spaceship/lib/spaceship/tunes/tunes_client.rb
Spaceship.TunesClient.group_for_view_by
def group_for_view_by(view_by, measures) if view_by.nil? || measures.nil? return nil else return { metric: measures.first, dimension: view_by, rank: "DESCENDING", limit: 3 } end end
ruby
def group_for_view_by(view_by, measures) if view_by.nil? || measures.nil? return nil else return { metric: measures.first, dimension: view_by, rank: "DESCENDING", limit: 3 } end end
[ "def", "group_for_view_by", "(", "view_by", ",", "measures", ")", "if", "view_by", ".", "nil?", "||", "measures", ".", "nil?", "return", "nil", "else", "return", "{", "metric", ":", "measures", ".", "first", ",", "dimension", ":", "view_by", ",", "rank", ...
generates group hash used in the analytics time_series API. Using rank=DESCENDING and limit=3 as this is what the App Store Connect analytics dashboard uses.
[ "generates", "group", "hash", "used", "in", "the", "analytics", "time_series", "API", ".", "Using", "rank", "=", "DESCENDING", "and", "limit", "=", "3", "as", "this", "is", "what", "the", "App", "Store", "Connect", "analytics", "dashboard", "uses", "." ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/spaceship/lib/spaceship/tunes/tunes_client.rb#L1512-L1523
train
fastlane/fastlane
snapshot/lib/snapshot/simulator_launchers/simulator_launcher_xcode_8.rb
Snapshot.SimulatorLauncherXcode8.run_for_device_and_language
def run_for_device_and_language(language, locale, device, launch_arguments, retries = 0) return launch_one_at_a_time(language, locale, device, launch_arguments) rescue => ex UI.error(ex.to_s) # show the reason for failure to the user, but still maybe retry if retries < launcher_config.number_of_r...
ruby
def run_for_device_and_language(language, locale, device, launch_arguments, retries = 0) return launch_one_at_a_time(language, locale, device, launch_arguments) rescue => ex UI.error(ex.to_s) # show the reason for failure to the user, but still maybe retry if retries < launcher_config.number_of_r...
[ "def", "run_for_device_and_language", "(", "language", ",", "locale", ",", "device", ",", "launch_arguments", ",", "retries", "=", "0", ")", "return", "launch_one_at_a_time", "(", "language", ",", "locale", ",", "device", ",", "launch_arguments", ")", "rescue", ...
This is its own method so that it can re-try if the tests fail randomly @return true/false depending on if the tests succeeded
[ "This", "is", "its", "own", "method", "so", "that", "it", "can", "re", "-", "try", "if", "the", "tests", "fail", "randomly" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_xcode_8.rb#L34-L48
train
fastlane/fastlane
snapshot/lib/snapshot/simulator_launchers/simulator_launcher_xcode_8.rb
Snapshot.SimulatorLauncherXcode8.launch_one_at_a_time
def launch_one_at_a_time(language, locale, device_type, launch_arguments) prepare_for_launch([device_type], language, locale, launch_arguments) add_media([device_type], :photo, launcher_config.add_photos) if launcher_config.add_photos add_media([device_type], :video, launcher_config.add_videos) if la...
ruby
def launch_one_at_a_time(language, locale, device_type, launch_arguments) prepare_for_launch([device_type], language, locale, launch_arguments) add_media([device_type], :photo, launcher_config.add_photos) if launcher_config.add_photos add_media([device_type], :video, launcher_config.add_videos) if la...
[ "def", "launch_one_at_a_time", "(", "language", ",", "locale", ",", "device_type", ",", "launch_arguments", ")", "prepare_for_launch", "(", "[", "device_type", "]", ",", "language", ",", "locale", ",", "launch_arguments", ")", "add_media", "(", "[", "device_type",...
Returns true if it succeeded
[ "Returns", "true", "if", "it", "succeeded" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_xcode_8.rb#L51-L74
train
fastlane/fastlane
fastlane_core/lib/fastlane_core/configuration/configuration.rb
FastlaneCore.Configuration.verify_default_value_matches_verify_block
def verify_default_value_matches_verify_block @available_options.each do |item| next unless item.verify_block && item.default_value begin unless @values[item.key] # this is important to not verify if there already is a value there item.verify_block.call(item.default_value) ...
ruby
def verify_default_value_matches_verify_block @available_options.each do |item| next unless item.verify_block && item.default_value begin unless @values[item.key] # this is important to not verify if there already is a value there item.verify_block.call(item.default_value) ...
[ "def", "verify_default_value_matches_verify_block", "@available_options", ".", "each", "do", "|", "item", "|", "next", "unless", "item", ".", "verify_block", "&&", "item", ".", "default_value", "begin", "unless", "@values", "[", "item", ".", "key", "]", "# this is...
Verifies the default value is also valid
[ "Verifies", "the", "default", "value", "is", "also", "valid" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/configuration/configuration.rb#L141-L154
train
fastlane/fastlane
fastlane_core/lib/fastlane_core/configuration/configuration.rb
FastlaneCore.Configuration.load_configuration_file
def load_configuration_file(config_file_name = nil, block_for_missing = nil, skip_printing_values = false) return unless config_file_name self.config_file_name = config_file_name path = FastlaneCore::Configuration.find_configuration_file_path(config_file_name: config_file_name) return if path....
ruby
def load_configuration_file(config_file_name = nil, block_for_missing = nil, skip_printing_values = false) return unless config_file_name self.config_file_name = config_file_name path = FastlaneCore::Configuration.find_configuration_file_path(config_file_name: config_file_name) return if path....
[ "def", "load_configuration_file", "(", "config_file_name", "=", "nil", ",", "block_for_missing", "=", "nil", ",", "skip_printing_values", "=", "false", ")", "return", "unless", "config_file_name", "self", ".", "config_file_name", "=", "config_file_name", "path", "=", ...
This method takes care of parsing and using the configuration file as values Call this once you know where the config file might be located Take a look at how `gym` uses this method @param config_file_name [String] The name of the configuration file to use (optional) @param block_for_missing [Block] A ruby block t...
[ "This", "method", "takes", "care", "of", "parsing", "and", "using", "the", "configuration", "file", "as", "values", "Call", "this", "once", "you", "know", "where", "the", "config", "file", "might", "be", "located", "Take", "a", "look", "at", "how", "gym", ...
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/configuration/configuration.rb#L163-L194
train
fastlane/fastlane
fastlane/lib/fastlane/other_action.rb
Fastlane.OtherAction.method_missing
def method_missing(method_sym, *arguments, &_block) # We have to go inside the fastlane directory # since in the fastlane runner.rb we do the following # custom_dir = ".." # Dir.chdir(custom_dir) do # this goes one folder up, since we're inside the "fastlane" # folder at that poi...
ruby
def method_missing(method_sym, *arguments, &_block) # We have to go inside the fastlane directory # since in the fastlane runner.rb we do the following # custom_dir = ".." # Dir.chdir(custom_dir) do # this goes one folder up, since we're inside the "fastlane" # folder at that poi...
[ "def", "method_missing", "(", "method_sym", ",", "*", "arguments", ",", "&", "_block", ")", "# We have to go inside the fastlane directory", "# since in the fastlane runner.rb we do the following", "# custom_dir = \"..\"", "# Dir.chdir(custom_dir) do", "# this goes one folder up, s...
Allows the user to call an action from an action
[ "Allows", "the", "user", "to", "call", "an", "action", "from", "an", "action" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/other_action.rb#L13-L27
train
fastlane/fastlane
produce/lib/produce/itunes_connect.rb
Produce.ItunesConnect.language
def language @language = Produce.config[:language] converted = Spaceship::Tunes::LanguageConverter.from_itc_readable_to_itc(@language) @language = converted if converted # overwrite it with the actual value unless AvailableDefaultLanguages.all_languages.include?(@language) UI.user_erro...
ruby
def language @language = Produce.config[:language] converted = Spaceship::Tunes::LanguageConverter.from_itc_readable_to_itc(@language) @language = converted if converted # overwrite it with the actual value unless AvailableDefaultLanguages.all_languages.include?(@language) UI.user_erro...
[ "def", "language", "@language", "=", "Produce", ".", "config", "[", ":language", "]", "converted", "=", "Spaceship", "::", "Tunes", "::", "LanguageConverter", ".", "from_itc_readable_to_itc", "(", "@language", ")", "@language", "=", "converted", "if", "converted",...
Makes sure to get the value for the language Instead of using the user's value `UK English` spaceship should send `English_UK` to the server
[ "Makes", "sure", "to", "get", "the", "value", "for", "the", "language", "Instead", "of", "using", "the", "user", "s", "value", "UK", "English", "spaceship", "should", "send", "English_UK", "to", "the", "server" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/produce/lib/produce/itunes_connect.rb#L79-L90
train
fastlane/fastlane
fastlane/lib/fastlane/runner.rb
Fastlane.Runner.find_alias
def find_alias(action_name) Actions.alias_actions.each do |key, v| next unless Actions.alias_actions[key] next unless Actions.alias_actions[key].include?(action_name) return key end nil end
ruby
def find_alias(action_name) Actions.alias_actions.each do |key, v| next unless Actions.alias_actions[key] next unless Actions.alias_actions[key].include?(action_name) return key end nil end
[ "def", "find_alias", "(", "action_name", ")", "Actions", ".", "alias_actions", ".", "each", "do", "|", "key", ",", "v", "|", "next", "unless", "Actions", ".", "alias_actions", "[", "key", "]", "next", "unless", "Actions", ".", "alias_actions", "[", "key", ...
lookup if an alias exists
[ "lookup", "if", "an", "alias", "exists" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/runner.rb#L116-L123
train
fastlane/fastlane
fastlane/lib/fastlane/runner.rb
Fastlane.Runner.trigger_action_by_name
def trigger_action_by_name(method_sym, custom_dir, from_action, *arguments) # First, check if there is a predefined method in the actions folder class_ref = class_reference_from_action_name(method_sym) unless class_ref class_ref = class_reference_from_action_alias(method_sym) # notify ...
ruby
def trigger_action_by_name(method_sym, custom_dir, from_action, *arguments) # First, check if there is a predefined method in the actions folder class_ref = class_reference_from_action_name(method_sym) unless class_ref class_ref = class_reference_from_action_alias(method_sym) # notify ...
[ "def", "trigger_action_by_name", "(", "method_sym", ",", "custom_dir", ",", "from_action", ",", "*", "arguments", ")", "# First, check if there is a predefined method in the actions folder", "class_ref", "=", "class_reference_from_action_name", "(", "method_sym", ")", "unless",...
This is being called from `method_missing` from the Fastfile It's also used when an action is called from another action @param from_action Indicates if this action is being trigged by another action. If so, it won't show up in summary.
[ "This", "is", "being", "called", "from", "method_missing", "from", "the", "Fastfile", "It", "s", "also", "used", "when", "an", "action", "is", "called", "from", "another", "action" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/runner.rb#L129-L176
train
fastlane/fastlane
fastlane/lib/fastlane/runner.rb
Fastlane.Runner.add_lane
def add_lane(lane, override = false) lanes[lane.platform] ||= {} if !override && lanes[lane.platform][lane.name] UI.user_error!("Lane '#{lane.name}' was defined multiple times!") end lanes[lane.platform][lane.name] = lane end
ruby
def add_lane(lane, override = false) lanes[lane.platform] ||= {} if !override && lanes[lane.platform][lane.name] UI.user_error!("Lane '#{lane.name}' was defined multiple times!") end lanes[lane.platform][lane.name] = lane end
[ "def", "add_lane", "(", "lane", ",", "override", "=", "false", ")", "lanes", "[", "lane", ".", "platform", "]", "||=", "{", "}", "if", "!", "override", "&&", "lanes", "[", "lane", ".", "platform", "]", "[", "lane", ".", "name", "]", "UI", ".", "u...
Called internally to setup the runner object @param lane [Lane] A lane object
[ "Called", "internally", "to", "setup", "the", "runner", "object" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/runner.rb#L304-L312
train
fastlane/fastlane
fastlane/lib/fastlane/commands_generator.rb
Fastlane.CommandsGenerator.ensure_fastfile
def ensure_fastfile return true if FastlaneCore::FastlaneFolder.setup? create = UI.confirm('Could not find fastlane in current directory. Make sure to have your fastlane configuration files inside a folder called "fastlane". Would you like to set fastlane up?') if create Fastlane::Setup.start...
ruby
def ensure_fastfile return true if FastlaneCore::FastlaneFolder.setup? create = UI.confirm('Could not find fastlane in current directory. Make sure to have your fastlane configuration files inside a folder called "fastlane". Would you like to set fastlane up?') if create Fastlane::Setup.start...
[ "def", "ensure_fastfile", "return", "true", "if", "FastlaneCore", "::", "FastlaneFolder", ".", "setup?", "create", "=", "UI", ".", "confirm", "(", "'Could not find fastlane in current directory. Make sure to have your fastlane configuration files inside a folder called \"fastlane\". ...
Makes sure a Fastfile is available Shows an appropriate message to the user if that's not the case return true if the Fastfile is available
[ "Makes", "sure", "a", "Fastfile", "is", "available", "Shows", "an", "appropriate", "message", "to", "the", "user", "if", "that", "s", "not", "the", "case", "return", "true", "if", "the", "Fastfile", "is", "available" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/commands_generator.rb#L340-L348
train
fastlane/fastlane
deliver/lib/deliver/runner.rb
Deliver.Runner.verify_version
def verify_version app_version = options[:app_version] UI.message("Making sure the latest version on App Store Connect matches '#{app_version}' from the ipa file...") changed = options[:app].ensure_version!(app_version, platform: options[:platform]) if changed UI.success("Successfully ...
ruby
def verify_version app_version = options[:app_version] UI.message("Making sure the latest version on App Store Connect matches '#{app_version}' from the ipa file...") changed = options[:app].ensure_version!(app_version, platform: options[:platform]) if changed UI.success("Successfully ...
[ "def", "verify_version", "app_version", "=", "options", "[", ":app_version", "]", "UI", ".", "message", "(", "\"Making sure the latest version on App Store Connect matches '#{app_version}' from the ipa file...\"", ")", "changed", "=", "options", "[", ":app", "]", ".", "ensu...
Make sure the version on App Store Connect matches the one in the ipa If not, the new version will automatically be created
[ "Make", "sure", "the", "version", "on", "App", "Store", "Connect", "matches", "the", "one", "in", "the", "ipa", "If", "not", "the", "new", "version", "will", "automatically", "be", "created" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/deliver/lib/deliver/runner.rb#L88-L99
train
fastlane/fastlane
deliver/lib/deliver/runner.rb
Deliver.Runner.upload_metadata
def upload_metadata upload_metadata = UploadMetadata.new upload_screenshots = UploadScreenshots.new # First, collect all the things for the HTML Report screenshots = upload_screenshots.collect_screenshots(options) upload_metadata.load_from_filesystem(options) # Assign "default" val...
ruby
def upload_metadata upload_metadata = UploadMetadata.new upload_screenshots = UploadScreenshots.new # First, collect all the things for the HTML Report screenshots = upload_screenshots.collect_screenshots(options) upload_metadata.load_from_filesystem(options) # Assign "default" val...
[ "def", "upload_metadata", "upload_metadata", "=", "UploadMetadata", ".", "new", "upload_screenshots", "=", "UploadScreenshots", ".", "new", "# First, collect all the things for the HTML Report", "screenshots", "=", "upload_screenshots", ".", "collect_screenshots", "(", "options...
Upload all metadata, screenshots, pricing information, etc. to App Store Connect
[ "Upload", "all", "metadata", "screenshots", "pricing", "information", "etc", ".", "to", "App", "Store", "Connect" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/deliver/lib/deliver/runner.rb#L102-L124
train
fastlane/fastlane
deliver/lib/deliver/runner.rb
Deliver.Runner.upload_binary
def upload_binary UI.message("Uploading binary to App Store Connect") if options[:ipa] package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate( app_id: options[:app].apple_id, ipa_path: options[:ipa], package_path: "/tmp", platform: options[:platform...
ruby
def upload_binary UI.message("Uploading binary to App Store Connect") if options[:ipa] package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate( app_id: options[:app].apple_id, ipa_path: options[:ipa], package_path: "/tmp", platform: options[:platform...
[ "def", "upload_binary", "UI", ".", "message", "(", "\"Uploading binary to App Store Connect\"", ")", "if", "options", "[", ":ipa", "]", "package_path", "=", "FastlaneCore", "::", "IpaUploadPackageBuilder", ".", "new", ".", "generate", "(", "app_id", ":", "options", ...
Upload the binary to App Store Connect
[ "Upload", "the", "binary", "to", "App", "Store", "Connect" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/deliver/lib/deliver/runner.rb#L141-L162
train
fastlane/fastlane
supply/lib/supply/uploader.rb
Supply.Uploader.upload_binary_data
def upload_binary_data(apk_path) apk_version_code = nil if apk_path UI.message("Preparing apk at path '#{apk_path}' for upload...") apk_version_code = client.upload_apk(apk_path) UI.user_error!("Could not upload #{apk_path}") unless apk_version_code if Supply.config[:obb_mai...
ruby
def upload_binary_data(apk_path) apk_version_code = nil if apk_path UI.message("Preparing apk at path '#{apk_path}' for upload...") apk_version_code = client.upload_apk(apk_path) UI.user_error!("Could not upload #{apk_path}") unless apk_version_code if Supply.config[:obb_mai...
[ "def", "upload_binary_data", "(", "apk_path", ")", "apk_version_code", "=", "nil", "if", "apk_path", "UI", ".", "message", "(", "\"Preparing apk at path '#{apk_path}' for upload...\"", ")", "apk_version_code", "=", "client", ".", "upload_apk", "(", "apk_path", ")", "U...
Upload binary apk and obb and corresponding change logs with client @param [String] apk_path Path of the apk file to upload. @return [Integer] The apk version code returned after uploading, or nil if there was a problem
[ "Upload", "binary", "apk", "and", "obb", "and", "corresponding", "change", "logs", "with", "client" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/supply/lib/supply/uploader.rb#L180-L213
train
fastlane/fastlane
supply/lib/supply/uploader.rb
Supply.Uploader.all_languages
def all_languages Dir.entries(metadata_path) .select { |f| File.directory?(File.join(metadata_path, f)) } .reject { |f| f.start_with?('.') } .sort { |x, y| x <=> y } end
ruby
def all_languages Dir.entries(metadata_path) .select { |f| File.directory?(File.join(metadata_path, f)) } .reject { |f| f.start_with?('.') } .sort { |x, y| x <=> y } end
[ "def", "all_languages", "Dir", ".", "entries", "(", "metadata_path", ")", ".", "select", "{", "|", "f", "|", "File", ".", "directory?", "(", "File", ".", "join", "(", "metadata_path", ",", "f", ")", ")", "}", ".", "reject", "{", "|", "f", "|", "f",...
returns only language directories from metadata_path
[ "returns", "only", "language", "directories", "from", "metadata_path" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/supply/lib/supply/uploader.rb#L276-L281
train
fastlane/fastlane
supply/lib/supply/uploader.rb
Supply.Uploader.upload_obbs
def upload_obbs(apk_path, apk_version_code) expansion_paths = find_obbs(apk_path) ['main', 'patch'].each do |type| if expansion_paths[type] upload_obb(expansion_paths[type], type, apk_version_code) end end end
ruby
def upload_obbs(apk_path, apk_version_code) expansion_paths = find_obbs(apk_path) ['main', 'patch'].each do |type| if expansion_paths[type] upload_obb(expansion_paths[type], type, apk_version_code) end end end
[ "def", "upload_obbs", "(", "apk_path", ",", "apk_version_code", ")", "expansion_paths", "=", "find_obbs", "(", "apk_path", ")", "[", "'main'", ",", "'patch'", "]", ".", "each", "do", "|", "type", "|", "if", "expansion_paths", "[", "type", "]", "upload_obb", ...
searches for obbs in the directory where the apk is located and upload at most one main and one patch file. Do nothing if it finds more than one of either of them.
[ "searches", "for", "obbs", "in", "the", "directory", "where", "the", "apk", "is", "located", "and", "upload", "at", "most", "one", "main", "and", "one", "patch", "file", ".", "Do", "nothing", "if", "it", "finds", "more", "than", "one", "of", "either", ...
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/supply/lib/supply/uploader.rb#L294-L301
train
fastlane/fastlane
fastlane_core/lib/fastlane_core/configuration/commander_generator.rb
FastlaneCore.CommanderGenerator.generate
def generate(options, command: nil) # First, enable `always_trace`, to show the stack trace always_trace! used_switches = [] options.each do |option| next if option.description.to_s.empty? # "private" options next unless option.display_in_shell short_switch = option.sho...
ruby
def generate(options, command: nil) # First, enable `always_trace`, to show the stack trace always_trace! used_switches = [] options.each do |option| next if option.description.to_s.empty? # "private" options next unless option.display_in_shell short_switch = option.sho...
[ "def", "generate", "(", "options", ",", "command", ":", "nil", ")", "# First, enable `always_trace`, to show the stack trace", "always_trace!", "used_switches", "=", "[", "]", "options", ".", "each", "do", "|", "option", "|", "next", "if", "option", ".", "descript...
Calls the appropriate methods for commander to show the available parameters
[ "Calls", "the", "appropriate", "methods", "for", "commander", "to", "show", "the", "available", "parameters" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb#L11-L90
train
fastlane/fastlane
scan/lib/scan/xcpretty_reporter_options_generator.rb
Scan.XCPrettyReporterOptionsGenerator.generate_reporter_options
def generate_reporter_options reporter = [] valid_types = @output_types & SUPPORTED_REPORT_TYPES valid_types.each do |raw_type| type = raw_type.strip output_path = File.join(File.expand_path(@output_directory), determine_output_file_name(type)) reporter << "--report #{type}" ...
ruby
def generate_reporter_options reporter = [] valid_types = @output_types & SUPPORTED_REPORT_TYPES valid_types.each do |raw_type| type = raw_type.strip output_path = File.join(File.expand_path(@output_directory), determine_output_file_name(type)) reporter << "--report #{type}" ...
[ "def", "generate_reporter_options", "reporter", "=", "[", "]", "valid_types", "=", "@output_types", "&", "SUPPORTED_REPORT_TYPES", "valid_types", ".", "each", "do", "|", "raw_type", "|", "type", "=", "raw_type", ".", "strip", "output_path", "=", "File", ".", "jo...
Intialize with values from Scan.config matching these param names
[ "Intialize", "with", "values", "from", "Scan", ".", "config", "matching", "these", "param", "names" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/scan/lib/scan/xcpretty_reporter_options_generator.rb#L44-L67
train
fastlane/fastlane
supply/lib/supply/client.rb
Supply.Client.abort_current_edit
def abort_current_edit ensure_active_edit! call_google_api { client.delete_edit(current_package_name, current_edit.id) } self.current_edit = nil self.current_package_name = nil end
ruby
def abort_current_edit ensure_active_edit! call_google_api { client.delete_edit(current_package_name, current_edit.id) } self.current_edit = nil self.current_package_name = nil end
[ "def", "abort_current_edit", "ensure_active_edit!", "call_google_api", "{", "client", ".", "delete_edit", "(", "current_package_name", ",", "current_edit", ".", "id", ")", "}", "self", ".", "current_edit", "=", "nil", "self", ".", "current_package_name", "=", "nil",...
Aborts the current edit deleting all pending changes
[ "Aborts", "the", "current", "edit", "deleting", "all", "pending", "changes" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/supply/lib/supply/client.rb#L144-L151
train
fastlane/fastlane
supply/lib/supply/client.rb
Supply.Client.commit_current_edit!
def commit_current_edit! ensure_active_edit! call_google_api { client.commit_edit(current_package_name, current_edit.id) } self.current_edit = nil self.current_package_name = nil end
ruby
def commit_current_edit! ensure_active_edit! call_google_api { client.commit_edit(current_package_name, current_edit.id) } self.current_edit = nil self.current_package_name = nil end
[ "def", "commit_current_edit!", "ensure_active_edit!", "call_google_api", "{", "client", ".", "commit_edit", "(", "current_package_name", ",", "current_edit", ".", "id", ")", "}", "self", ".", "current_edit", "=", "nil", "self", ".", "current_package_name", "=", "nil...
Commits the current edit saving all pending changes on Google Play
[ "Commits", "the", "current", "edit", "saving", "all", "pending", "changes", "on", "Google", "Play" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/supply/lib/supply/client.rb#L161-L168
train
fastlane/fastlane
supply/lib/supply/client.rb
Supply.Client.listing_for_language
def listing_for_language(language) ensure_active_edit! begin result = client.get_listing( current_package_name, current_edit.id, language ) return Listing.new(self, language, result) rescue Google::Apis::ClientError => e return Listing.ne...
ruby
def listing_for_language(language) ensure_active_edit! begin result = client.get_listing( current_package_name, current_edit.id, language ) return Listing.new(self, language, result) rescue Google::Apis::ClientError => e return Listing.ne...
[ "def", "listing_for_language", "(", "language", ")", "ensure_active_edit!", "begin", "result", "=", "client", ".", "get_listing", "(", "current_package_name", ",", "current_edit", ".", "id", ",", "language", ")", "return", "Listing", ".", "new", "(", "self", ","...
Returns the listing for the given language filled with the current values if it already exists
[ "Returns", "the", "listing", "for", "the", "given", "language", "filled", "with", "the", "current", "values", "if", "it", "already", "exists" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/supply/lib/supply/client.rb#L187-L202
train
fastlane/fastlane
supply/lib/supply/client.rb
Supply.Client.apks_version_codes
def apks_version_codes ensure_active_edit! result = call_google_api { client.list_apks(current_package_name, current_edit.id) } return Array(result.apks).map(&:version_code) end
ruby
def apks_version_codes ensure_active_edit! result = call_google_api { client.list_apks(current_package_name, current_edit.id) } return Array(result.apks).map(&:version_code) end
[ "def", "apks_version_codes", "ensure_active_edit!", "result", "=", "call_google_api", "{", "client", ".", "list_apks", "(", "current_package_name", ",", "current_edit", ".", "id", ")", "}", "return", "Array", "(", "result", ".", "apks", ")", ".", "map", "(", "...
Get a list of all APK version codes - returns the list of version codes
[ "Get", "a", "list", "of", "all", "APK", "version", "codes", "-", "returns", "the", "list", "of", "version", "codes" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/supply/lib/supply/client.rb#L205-L211
train
fastlane/fastlane
supply/lib/supply/client.rb
Supply.Client.aab_version_codes
def aab_version_codes ensure_active_edit! result = call_google_api { client.list_edit_bundles(current_package_name, current_edit.id) } return Array(result.bundles).map(&:version_code) end
ruby
def aab_version_codes ensure_active_edit! result = call_google_api { client.list_edit_bundles(current_package_name, current_edit.id) } return Array(result.bundles).map(&:version_code) end
[ "def", "aab_version_codes", "ensure_active_edit!", "result", "=", "call_google_api", "{", "client", ".", "list_edit_bundles", "(", "current_package_name", ",", "current_edit", ".", "id", ")", "}", "return", "Array", "(", "result", ".", "bundles", ")", ".", "map", ...
Get a list of all AAB version codes - returns the list of version codes
[ "Get", "a", "list", "of", "all", "AAB", "version", "codes", "-", "returns", "the", "list", "of", "version", "codes" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/supply/lib/supply/client.rb#L214-L220
train
fastlane/fastlane
supply/lib/supply/client.rb
Supply.Client.track_version_codes
def track_version_codes(track) ensure_active_edit! begin result = client.get_track( current_package_name, current_edit.id, track ) return result.version_codes || [] rescue Google::Apis::ClientError => e return [] if e.status_code == 404 &&...
ruby
def track_version_codes(track) ensure_active_edit! begin result = client.get_track( current_package_name, current_edit.id, track ) return result.version_codes || [] rescue Google::Apis::ClientError => e return [] if e.status_code == 404 &&...
[ "def", "track_version_codes", "(", "track", ")", "ensure_active_edit!", "begin", "result", "=", "client", ".", "get_track", "(", "current_package_name", ",", "current_edit", ".", "id", ",", "track", ")", "return", "result", ".", "version_codes", "||", "[", "]", ...
Get list of version codes for track
[ "Get", "list", "of", "version", "codes", "for", "track" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/supply/lib/supply/client.rb#L337-L351
train
fastlane/fastlane
fastlane/lib/fastlane/plugins/plugin_manager.rb
Fastlane.PluginManager.available_gems
def available_gems return [] unless gemfile_path dsl = Bundler::Dsl.evaluate(gemfile_path, nil, true) return dsl.dependencies.map(&:name) end
ruby
def available_gems return [] unless gemfile_path dsl = Bundler::Dsl.evaluate(gemfile_path, nil, true) return dsl.dependencies.map(&:name) end
[ "def", "available_gems", "return", "[", "]", "unless", "gemfile_path", "dsl", "=", "Bundler", "::", "Dsl", ".", "evaluate", "(", "gemfile_path", ",", "nil", ",", "true", ")", "return", "dsl", ".", "dependencies", ".", "map", "(", ":name", ")", "end" ]
Returns an array of gems that are added to the Gemfile or Pluginfile
[ "Returns", "an", "array", "of", "gems", "that", "are", "added", "to", "the", "Gemfile", "or", "Pluginfile" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/plugins/plugin_manager.rb#L55-L59
train
fastlane/fastlane
fastlane/lib/fastlane/plugins/plugin_manager.rb
Fastlane.PluginManager.plugin_is_added_as_dependency?
def plugin_is_added_as_dependency?(plugin_name) UI.user_error!("fastlane plugins must start with '#{self.class.plugin_prefix}' string") unless plugin_name.start_with?(self.class.plugin_prefix) return available_plugins.include?(plugin_name) end
ruby
def plugin_is_added_as_dependency?(plugin_name) UI.user_error!("fastlane plugins must start with '#{self.class.plugin_prefix}' string") unless plugin_name.start_with?(self.class.plugin_prefix) return available_plugins.include?(plugin_name) end
[ "def", "plugin_is_added_as_dependency?", "(", "plugin_name", ")", "UI", ".", "user_error!", "(", "\"fastlane plugins must start with '#{self.class.plugin_prefix}' string\"", ")", "unless", "plugin_name", ".", "start_with?", "(", "self", ".", "class", ".", "plugin_prefix", "...
Check if a plugin is added as dependency to either the Gemfile or the Pluginfile
[ "Check", "if", "a", "plugin", "is", "added", "as", "dependency", "to", "either", "the", "Gemfile", "or", "the", "Pluginfile" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/plugins/plugin_manager.rb#L71-L74
train
fastlane/fastlane
fastlane/lib/fastlane/plugins/plugin_manager.rb
Fastlane.PluginManager.attach_plugins_to_gemfile!
def attach_plugins_to_gemfile!(path_to_gemfile) content = gemfile_content || (AUTOGENERATED_LINE + GEMFILE_SOURCE_LINE) # We have to make sure fastlane is also added to the Gemfile, since we now use # bundler to run fastlane content += "\ngem 'fastlane'\n" unless available_gems.include?('fastla...
ruby
def attach_plugins_to_gemfile!(path_to_gemfile) content = gemfile_content || (AUTOGENERATED_LINE + GEMFILE_SOURCE_LINE) # We have to make sure fastlane is also added to the Gemfile, since we now use # bundler to run fastlane content += "\ngem 'fastlane'\n" unless available_gems.include?('fastla...
[ "def", "attach_plugins_to_gemfile!", "(", "path_to_gemfile", ")", "content", "=", "gemfile_content", "||", "(", "AUTOGENERATED_LINE", "+", "GEMFILE_SOURCE_LINE", ")", "# We have to make sure fastlane is also added to the Gemfile, since we now use", "# bundler to run fastlane", "conte...
Modify the user's Gemfile to load the plugins
[ "Modify", "the", "user", "s", "Gemfile", "to", "load", "the", "plugins" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/plugins/plugin_manager.rb#L142-L151
train
fastlane/fastlane
fastlane/lib/fastlane/plugins/plugin_manager.rb
Fastlane.PluginManager.print_plugin_information
def print_plugin_information(references) rows = references.collect do |current| if current[1][:actions].empty? # Something is wrong with this plugin, no available actions [current[0].red, current[1][:version_number], "No actions found".red] else [current[0], current[1...
ruby
def print_plugin_information(references) rows = references.collect do |current| if current[1][:actions].empty? # Something is wrong with this plugin, no available actions [current[0].red, current[1][:version_number], "No actions found".red] else [current[0], current[1...
[ "def", "print_plugin_information", "(", "references", ")", "rows", "=", "references", ".", "collect", "do", "|", "current", "|", "if", "current", "[", "1", "]", "[", ":actions", "]", ".", "empty?", "# Something is wrong with this plugin, no available actions", "[", ...
Prints a table all the plugins that were loaded
[ "Prints", "a", "table", "all", "the", "plugins", "that", "were", "loaded" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/fastlane/lib/fastlane/plugins/plugin_manager.rb#L319-L336
train
fastlane/fastlane
screengrab/lib/screengrab/runner.rb
Screengrab.Runner.if_device_path_exists
def if_device_path_exists(device_serial, device_path) return if run_adb_command("adb -s #{device_serial} shell ls #{device_path}", print_all: false, print_command: false).include?('No such file') yield(device_path) rescue # Some vers...
ruby
def if_device_path_exists(device_serial, device_path) return if run_adb_command("adb -s #{device_serial} shell ls #{device_path}", print_all: false, print_command: false).include?('No such file') yield(device_path) rescue # Some vers...
[ "def", "if_device_path_exists", "(", "device_serial", ",", "device_path", ")", "return", "if", "run_adb_command", "(", "\"adb -s #{device_serial} shell ls #{device_path}\"", ",", "print_all", ":", "false", ",", "print_command", ":", "false", ")", ".", "include?", "(", ...
Some device commands fail if executed against a device path that does not exist, so this helper method provides a way to conditionally execute a block only if the provided path exists on the device.
[ "Some", "device", "commands", "fail", "if", "executed", "against", "a", "device", "path", "that", "does", "not", "exist", "so", "this", "helper", "method", "provides", "a", "way", "to", "conditionally", "execute", "a", "block", "only", "if", "the", "provided...
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/screengrab/lib/screengrab/runner.rb#L349-L358
train
fastlane/fastlane
screengrab/lib/screengrab/runner.rb
Screengrab.Runner.installed_packages
def installed_packages(device_serial) packages = run_adb_command("adb -s #{device_serial} shell pm list packages", print_all: true, print_command: true) packages.split("\n").map { |package| package.gsub("package:", "") } end
ruby
def installed_packages(device_serial) packages = run_adb_command("adb -s #{device_serial} shell pm list packages", print_all: true, print_command: true) packages.split("\n").map { |package| package.gsub("package:", "") } end
[ "def", "installed_packages", "(", "device_serial", ")", "packages", "=", "run_adb_command", "(", "\"adb -s #{device_serial} shell pm list packages\"", ",", "print_all", ":", "true", ",", "print_command", ":", "true", ")", "packages", ".", "split", "(", "\"\\n\"", ")",...
Return an array of packages that are installed on the device
[ "Return", "an", "array", "of", "packages", "that", "are", "installed", "on", "the", "device" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/screengrab/lib/screengrab/runner.rb#L361-L366
train
fastlane/fastlane
sigh/lib/sigh/runner.rb
Sigh.Runner.fetch_profiles
def fetch_profiles UI.message("Fetching profiles...") results = profile_type.find_by_bundle_id(bundle_id: Sigh.config[:app_identifier], mac: Sigh.config[:platform].to_s == 'macos', sub_platform: Sigh.config[:pla...
ruby
def fetch_profiles UI.message("Fetching profiles...") results = profile_type.find_by_bundle_id(bundle_id: Sigh.config[:app_identifier], mac: Sigh.config[:platform].to_s == 'macos', sub_platform: Sigh.config[:pla...
[ "def", "fetch_profiles", "UI", ".", "message", "(", "\"Fetching profiles...\"", ")", "results", "=", "profile_type", ".", "find_by_bundle_id", "(", "bundle_id", ":", "Sigh", ".", "config", "[", ":app_identifier", "]", ",", "mac", ":", "Sigh", ".", "config", "[...
Fetches a profile matching the user's search requirements
[ "Fetches", "a", "profile", "matching", "the", "user", "s", "search", "requirements" ]
457c5d647c77f0e078dafa5129da616914e002c5
https://github.com/fastlane/fastlane/blob/457c5d647c77f0e078dafa5129da616914e002c5/sigh/lib/sigh/runner.rb#L68-L119
train