source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/helper.rb | Ruby | mit | 41,450 | master | 15,962 | require 'logger'
require 'colored'
require 'tty-spinner'
require 'pathname'
require_relative 'fastlane_folder'
require_relative 'ui/ui'
require_relative 'env'
module FastlaneCore
module Helper
# fastlane
#
def self.fastlane_enabled?
# This is called from the root context on the first start
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/swag.rb | Ruby | mit | 41,450 | master | 75,844 | require "stringio"
require_relative 'helper'
module FastlaneCore
class Swag
# rubocop:disable Layout/LineLength
require 'zlib'
FRAMES = ["x\x9C\xED[\xD9u\xDB0\x10\xFCO\v\xFEq\t<C\xE0\xB9\x14\xD7\xE0\x1ERE\nt%\x91D\x12<0\xB3\aH\xC9\x8A\x9F\xF3\xF2\x13\x02\xC4\xB13;{Pyyo\xE3[\x17?^O\xFF\xF3\xF2\xDE\xDDV\x... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/android_package_name_guesser.rb | Ruby | mit | 41,450 | master | 3,463 | require 'credentials_manager/appfile_config'
require_relative 'configuration/configuration'
require_relative 'env'
module FastlaneCore
class AndroidPackageNameGuesser
class << self
def android_package_name_arg?(gem_name, arg)
return arg == "--package_name" ||
arg == "--app_package_n... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/tag_version.rb | Ruby | mit | 41,450 | master | 916 | require "rubygems/version"
module FastlaneCore
# Utility class to construct a Gem::Version from a tag.
# Accepts vX.Y.Z and X.Y.Z.
class TagVersion < Gem::Version
class << self
def correct?(tag)
result = superclass.correct?(version_number_from_tag(tag))
# It seems like depending on the... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb | Ruby | mit | 41,450 | master | 2,525 | require "digest/md5"
require 'securerandom'
require_relative 'globals'
require_relative 'ui/ui'
require_relative 'module'
module FastlaneCore
# Builds a package for the binary ready to be uploaded with the iTunes Transporter
class IpaUploadPackageBuilder
METADATA_FILE_NAME = "metadata.xml"
attr_accessor ... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/module.rb | Ruby | mit | 41,450 | master | 1,014 | require 'fastlane/boolean'
require_relative 'analytics/analytics_session'
module FastlaneCore
ROOT = Pathname.new(File.expand_path('../../..', __FILE__))
Boolean = Fastlane::Boolean
# Session is used to report usage metrics.
# If you opt out, we will not send anything.
# You can confirm this by observing h... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/core_ext/cfpropertylist.rb | Ruby | mit | 41,450 | master | 777 | # To be used instead of require "cfpropertylist". Restores extensions from
# Plist overwritten by CFPropertyList.
require "cfpropertylist"
require "plist"
# Brute-force solution to conflict between #to_plist introduced by
# CFPropertyList and plist. Remove the method added by CFPropertyList
# and restore the method f... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/core_ext/shellwords.rb | Ruby | mit | 41,450 | master | 1,566 | require_relative '../helper'
require 'shellwords'
# Here be monkey patches
class String
# CrossplatformShellwords
def shellescape
CrossplatformShellwords.shellescape(self)
end
end
class Array
def shelljoin
CrossplatformShellwords.shelljoin(self)
end
end
# Here be helper
module CrossplatformShellw... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/core_ext/string.rb | Ruby | mit | 41,450 | master | 344 | class String
def fastlane_class
split('_').collect!(&:capitalize).join
end
def fastlane_module
self == "pem" ? 'PEM' : self.fastlane_class
end
def fastlane_underscore
self.gsub(/::/, '/').
gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2').
gsub(/([a-z\d])([A-Z])/, '\1_\2').
tr("-", "_").
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/configuration/configuration.rb | Ruby | mit | 41,450 | master | 12,824 | require_relative '../helper'
require_relative '../globals'
require_relative 'config_item'
require_relative 'commander_generator'
require_relative 'configuration_file'
module FastlaneCore
class Configuration
attr_accessor :available_options
attr_accessor :values
# @return [Array] An array of symbols whi... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/configuration/configuration_file.rb | Ruby | mit | 41,450 | master | 6,726 | require_relative '../print_table'
require_relative '../ui/ui'
module FastlaneCore
# Responsible for loading configuration files
class ConfigurationFile
class ExceptionWhileParsingError < RuntimeError
attr_reader :wrapped_exception
attr_reader :recovered_options
def initialize(wrapped_ex, opt... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/configuration/commander_generator.rb | Ruby | mit | 41,450 | master | 4,995 | require 'commander'
require_relative '../module'
require_relative '../ui/ui'
module FastlaneCore
class CommanderGenerator
include Commander::Methods
# Calls the appropriate methods for commander to show the available parameters
def generate(options, command: nil)
# First, enable `always_trace`, t... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/configuration/config_item.rb | Ruby | mit | 41,450 | master | 15,055 | require_relative '../ui/ui'
require_relative '../ui/errors/fastlane_error'
require_relative '../helper'
require_relative '../module'
require 'json'
module FastlaneCore
class ConfigItem
# [Symbol] the key which is used as command parameters or key in the fastlane tools
attr_accessor :key
# [String] the n... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/update_checker/changelog.rb | Ruby | mit | 41,450 | master | 1,289 | require 'excon'
module FastlaneCore
class Changelog
class << self
def show_changes(gem_name, current_version, update_gem_command: "bundle update")
did_show_changelog = false
self.releases(gem_name).each_with_index do |release, index|
next unless Gem::Version.new(release['tag_name... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/update_checker/update_checker.rb | Ruby | mit | 41,450 | master | 4,072 | require 'excon'
require 'digest'
require_relative 'changelog'
require_relative '../analytics/app_identifier_guesser'
require_relative '../helper'
require_relative '../ui/ui'
module FastlaneCore
# Verifies, the user runs the latest version of this gem
class UpdateChecker
def self.start_looking_for_update(gem_n... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/ui/disable_colors.rb | Ruby | mit | 41,450 | master | 657 | # This code overwrites the methods from the colored gem
# via https://github.com/defunkt/colored/blob/master/lib/colored.rb
require 'colored'
class String
Colored::COLORS.keys.each do |color|
define_method(color) do
self # do nothing with the string, but return it
end
end
Colored::EXTRAS.keys.each... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/ui/ui.rb | Ruby | mit | 41,450 | master | 816 | module FastlaneCore
class UI
class << self
attr_accessor(:ui_object)
def ui_object
require_relative 'implementations/shell'
@ui_object ||= Shell.new
end
def method_missing(method_sym, *args, &_block)
# not using `responds` because we don't care about methods like ... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/ui/help_formatter.rb | Ruby | mit | 41,450 | master | 336 | require 'commander'
module FastlaneCore
class HelpFormatter < ::Commander::HelpFormatter::TerminalCompact
def template(name)
# fastlane only customizes the global command help
return super unless name == :help
ERB.new(File.read(File.join(File.dirname(__FILE__), "help.erb")), trim_mode: '-')
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/ui/interface.rb | Ruby | mit | 41,450 | master | 6,844 | require_relative 'errors'
module FastlaneCore
# Abstract super class
class Interface
#####################################################
# @!group Messaging: show text to the user
#####################################################
# Level Error: Can be used to show additional error
# in... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb | Ruby | mit | 41,450 | master | 2,341 | require_relative '../helper'
require_relative '../globals'
module Fastlane
# Adds all the necessary emojis (obv)
#
class InspectorReporter
NUMBER_OF_ISSUES_INLINE = 3
# Called just as the investigation has begun.
def inspector_started_query(query, inspector)
puts("")
puts("Looking for re... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb | Ruby | mit | 41,450 | master | 15,392 | unless Object.const_defined?("Faraday")
# We create these empty error classes if we didn't require Faraday
# so that we can use it in the rescue block below even if we didn't
# require Faraday or didn't use it
module Faraday
class Error < StandardError; end
class ClientError < Error; end
class SSLEr... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/ui/errors/fastlane_common_error.rb | Ruby | mit | 41,450 | master | 730 | require_relative 'fastlane_exception'
module FastlaneCore
class Interface
# Super class for exception types that we do not want to record
# explicitly as crashes or user errors
class FastlaneCommonException < FastlaneException; end
# Raised when there is a build failure in xcodebuild
class Fastl... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/ui/errors/fastlane_exception.rb | Ruby | mit | 41,450 | master | 482 | module FastlaneCore
class Interface
class FastlaneException < StandardError
def prefix
'[FASTLANE_EXCEPTION]'
end
def caused_by_calling_ui_method?(method_name: nil)
return false if backtrace.nil? || backtrace[0].nil? || method_name.nil?
first_frame = backtrace[0]
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/ui/errors/fastlane_error.rb | Ruby | mit | 41,450 | master | 498 | require_relative 'fastlane_exception'
module FastlaneCore
class Interface
class FastlaneError < FastlaneException
attr_reader :show_github_issues
attr_reader :error_info
def initialize(show_github_issues: false, error_info: nil)
@show_github_issues = show_github_issues
@error_i... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/ui/implementations/shell.rb | Ruby | mit | 41,450 | master | 5,009 | require_relative '../../helper'
require_relative '../../globals'
require_relative '../../env'
require_relative '../interface'
module FastlaneCore
# Shell is the terminal output of things
# For documentation for each of the methods open `interface.rb`
class Shell < Interface
require 'tty-screen'
def log... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/feature/feature.rb | Ruby | mit | 41,450 | master | 1,636 | require_relative '../env'
module FastlaneCore
class Feature
class << self
attr_reader :features
def register(env_var: nil, description: nil)
feature = self.new(description: description, env_var: env_var)
@features[feature.env_var] = feature
end
def enabled?(env_var)
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/analytics/analytics_ingester_client.rb | Ruby | mit | 41,450 | master | 1,747 | require 'faraday'
require 'openssl'
require 'json'
require_relative '../helper'
module FastlaneCore
class AnalyticsIngesterClient
GA_URL = "https://www.google-analytics.com"
private_constant :GA_URL
def initialize(ga_tracking)
@ga_tracking = ga_tracking
end
def post_event(event)
#... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/analytics/analytics_event_builder.rb | Ruby | mit | 41,450 | master | 650 | module FastlaneCore
class AnalyticsEventBuilder
attr_accessor :action_name
# fastlane_client_language valid options are :ruby or :swift
def initialize(p_hash: nil, session_id: nil, action_name: nil, fastlane_client_language: :ruby)
@p_hash = p_hash
@session_id = session_id
@action_name ... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/analytics/analytics_session.rb | Ruby | mit | 41,450 | master | 1,942 | require_relative 'analytics_ingester_client'
require_relative 'action_launch_context'
require_relative 'analytics_event_builder'
module FastlaneCore
class AnalyticsSession
GA_TRACKING = "UA-121171860-1"
private_constant :GA_TRACKING
attr_accessor :session_id
attr_accessor :client
def initialize... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/analytics/action_completion_context.rb | Ruby | mit | 41,450 | master | 1,077 | require_relative 'app_identifier_guesser'
module FastlaneCore
class ActionCompletionStatus
SUCCESS = 'success'
FAILED = 'failed' # fastlane crashes unrelated to user_error!
USER_ERROR = 'user_error' # Anytime a user_error! is triggered
INTERRUPTED = 'interrupted'
end
class ActionCompletionContex... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/analytics/app_identifier_guesser.rb | Ruby | mit | 41,450 | master | 2,280 | require_relative '../android_package_name_guesser'
require_relative '../ios_app_identifier_guesser'
require_relative '../env'
module FastlaneCore
class AppIdentifierGuesser
attr_accessor :args
attr_accessor :gem_name
attr_accessor :platform
attr_accessor :p_hash
attr_accessor :app_id
def ini... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb | Ruby | mit | 41,450 | master | 1,150 | require_relative '../helper'
require_relative 'app_identifier_guesser'
module FastlaneCore
class ActionLaunchContext
UNKNOWN_P_HASH = 'unknown'
attr_accessor :action_name
attr_accessor :p_hash
attr_accessor :platform
attr_accessor :fastlane_client_language # example: ruby fastfile, swift fastfil... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/wordwrap_spec.rb | Ruby | mit | 41,450 | master | 747 | require 'fastlane_core/string_filters'
describe WordWrap do
context 'wordwrapping will return an array of strings' do
let(:test_string) { 'some big long string with lots of characters I think there should be more than eighty characters here!' }
it 'will return an empty array if the length is zero' do
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/update_checker_spec.rb | Ruby | mit | 41,450 | master | 2,760 | require 'fastlane_core/update_checker/update_checker'
describe FastlaneCore do
describe FastlaneCore::UpdateChecker do
let(:name) { 'fastlane' }
describe "#update_available?" do
it "no update is available" do
FastlaneCore::UpdateChecker.server_results[name] = '0.1'
expect(FastlaneCore:... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/device_manager_spec.rb | Ruby | mit | 41,450 | master | 20,368 | require 'open3'
describe FastlaneCore do
describe FastlaneCore::DeviceManager do
before(:all) do
@simctl_output = File.read('./fastlane_core/spec/fixtures/DeviceManagerSimctlOutputXcode7')
@system_profiler_output = File.read('./fastlane_core/spec/fixtures/DeviceManagerSystem_profilerOutput')
@i... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/simulator_spec.rb | Ruby | mit | 41,450 | master | 5,425 | require 'open3'
describe FastlaneCore do
describe FastlaneCore::Simulator do
before do
@valid_simulators = "== Devices ==
-- iOS 7.1 --
iPhone 4s (8E3D97C4-1143-4E84-8D57-F697140F2ED0) (Shutdown) (unavailable, failed to open liblaunch_sim.dylib)
iPhone 5 (65D0F571-1260-4241-9583-611EAF4D56AE) (Shut... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/spec_helper.rb | Ruby | mit | 41,450 | master | 2,085 | require_relative 'test_commander_program'
# Necessary, as we're now running this in a different context
def stub_request(*args)
WebMock::API.stub_request(*args)
end
def before_each_fastlane_core
# iTunes Lookup API by Apple ID
["invalid", "", 0, '284882215', ['338986109', 'FR']].each do |current|
if current... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/env_spec.rb | Ruby | mit | 41,450 | master | 979 | describe FastlaneCore do
describe FastlaneCore::Env do
describe '#disabled/unset' do
it "Reports false on disabled env" do
FastlaneSpec::Env.with_env_values('FL_TEST_FALSE' => 'false', 'FL_TEST_ZERO' => '0', 'FL_TEST_OFF' => 'off', 'FL_TEST_NO' => 'no', 'FL_TEST_NIL' => nil) do
expect(Fast... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/fastlane_pty_spec.rb | Ruby | mit | 41,450 | master | 4,740 | describe FastlaneCore do
describe FastlaneCore::FastlanePty do
describe "spawn" do
it 'executes a simple command successfully' do
@all_lines = []
exit_status = FastlaneCore::FastlanePty.spawn('echo foo') do |command_stdout, command_stdin, pid|
command_stdout.each do |line|
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/ios_app_identifier_guesser_spec.rb | Ruby | mit | 41,450 | master | 5,703 | require 'spec_helper'
require 'fastlane_core/ios_app_identifier_guesser'
describe FastlaneCore::IOSAppIdentifierGuesser do
it 'returns nil if no clues' do
# this might also fail if the environment or config files are not clean
expect(FastlaneCore::IOSAppIdentifierGuesser.guess_app_identifier([])).to be_nil
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/help_formatter_spec.rb | Ruby | mit | 41,450 | master | 2,063 | describe FastlaneCore::HelpFormatter do
class MockCommand
attr_accessor :name, :summary, :description, :options, :examples
def initialize(name, summary, description, options, examples)
@name = name
@summary = summary
@description = description
@options = options
@examples = exam... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/test_commander_program.rb | Ruby | mit | 41,450 | master | 743 | # Helper class that encapsulates the setup of a do-nothing Commander
# program that captures the results of parsing command line options
class TestCommanderProgram
include Commander::Methods
attr_accessor :args
attr_accessor :options
def self.run(config_items)
new(config_items).tap(&:run!)
end
def in... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/configuration_file_spec.rb | Ruby | mit | 41,450 | master | 10,256 | describe FastlaneCore do
describe FastlaneCore::ConfigurationFile do
describe "Properly loads and handles various configuration files" do
let(:options) do
[
FastlaneCore::ConfigItem.new(key: :devices,
description: "desc",
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/commander_generator_spec.rb | Ruby | mit | 41,450 | master | 14,666 | describe FastlaneCore do
describe FastlaneCore::CommanderGenerator do
describe 'while options parsing' do
describe '' do
it 'should not return `true` for String options with no short flag' do
config_items = [
FastlaneCore::ConfigItem.new(key: :long_option_only_string,
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/print_table_spec.rb | Ruby | mit | 41,450 | master | 7,003 | describe FastlaneCore do
describe FastlaneCore::PrintTable do
before do
@options = [
FastlaneCore::ConfigItem.new(key: :cert_name,
env_name: "SIGH_PROVISIONING_PROFILE_NAME",
description: "Set the profile name",
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/fastlane_runner_spec.rb | Ruby | mit | 41,450 | master | 2,608 | describe Commander::Runner do
describe 'tool collector interactions' do
class CommandsGenerator
include Commander::Methods
def initialize(raise_error: nil)
@raise_error = raise_error
end
def run
program :name, 'tool_name'
program :version, '1.9'
program :d... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/ipa_file_analyser_spec.rb | Ruby | mit | 41,450 | master | 2,055 | describe FastlaneCore do
describe FastlaneCore::IpaFileAnalyser do
let(:ipa) { 'iOSAppOnly' }
let(:path) { File.expand_path("../fixtures/ipas/#{ipa}.ipa", __FILE__) }
context 'with fetch_info_plist_with_rubyzip' do
before(:each) do
expect(FastlaneCore::IpaFileAnalyser).to receive(:fetch_inf... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/ui_spec.rb | Ruby | mit | 41,450 | master | 663 | require 'spec_helper'
describe FastlaneCore::UI do
it "uses a FastlaneCore::Shell by default" do
expect(FastlaneCore::UI.ui_object).to be_kind_of(FastlaneCore::Shell)
end
it "redirects all method calls to the current UI object" do
expect(FastlaneCore::UI.ui_object).to receive(:error).with("yolo")
Fa... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/build_watcher_spec.rb | Ruby | mit | 41,450 | master | 35,839 | require 'spec_helper'
describe FastlaneCore::BuildWatcher do
context '.wait_for_build_processing_to_be_complete' do
let(:processing_build) do
double(
app_version: "1.0",
version: "1",
processed?: false,
platform: 'IOS',
processing_state: 'PROCESSING'
)
end
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/tag_version_spec.rb | Ruby | mit | 41,450 | master | 1,558 | describe FastlaneCore::TagVersion do
describe "version_number_from_tag" do
# This is the style generated by rake release.
it "removes any initial v" do
tag = "v0.1.0-beta.3"
version_number = FastlaneCore::TagVersion.version_number_from_tag(tag)
expect(version_number).to eq("0.1.0-beta.3")
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/project_spec.rb | Ruby | mit | 41,450 | master | 32,938 | describe FastlaneCore do
describe FastlaneCore::Project do
describe 'project and workspace detection' do
def within_a_temp_dir
Dir.mktmpdir do |dir|
FileUtils.cd(dir) do
yield(dir) if block_given?
end
end
end
let(:options) do
[
F... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/queue_worker_spec.rb | Ruby | mit | 41,450 | master | 1,500 | describe FastlaneCore::QueueWorker do
describe '#new' do
it 'should initialize an instance' do
expect(described_class.new { |_| }).to be_kind_of(described_class)
expect(described_class.new(1) { |_| }).to be_kind_of(described_class)
end
end
describe '#enqueue' do
subject { described_class.... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/fastlane_exception_spec.rb | Ruby | mit | 41,450 | master | 876 | describe FastlaneCore::Interface::FastlaneException do
context 'raising fastlane exceptions' do
it 'properly determines that it was called via `UI.user_error!`' do
begin
UI.user_error!('USER ERROR!!')
rescue => e
expect(e.caused_by_calling_ui_method?(method_name: 'user_error!')).to be(... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/app_identifier_guesser_spec.rb | Ruby | mit | 41,450 | master | 1,404 | require 'fastlane_core/analytics/app_identifier_guesser'
describe FastlaneCore do
describe FastlaneCore::AppIdentifierGuesser do
def android_hash_of(value)
hash_of("android_project_#{value}")
end
def hash_of(value)
Digest::SHA256.hexdigest("p#{value}fastlan3_SAlt")
end
describe "#p_... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/ipa_upload_package_builder_spec.rb | Ruby | mit | 41,450 | master | 1,841 | describe FastlaneCore do
describe FastlaneCore::IpaUploadPackageBuilder do
let(:ipa) { 'iOSAppOnly' }
let(:path) { File.expand_path("../fixtures/ipas/#{ipa}.ipa", __FILE__) }
let(:uploader) { FastlaneCore::IpaUploadPackageBuilder.new }
let(:unique_path) { uploader.unique_ipa_path(path) }
let(:ipa... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/fastlane_user_dir_spec.rb | Ruby | mit | 41,450 | master | 327 | describe FastlaneCore do
it "returns the path to the user's directory" do
expected_path = File.join(Dir.home, ".fastlane")
expect(File).to receive(:directory?).and_return(false)
expect(FileUtils).to receive(:mkdir_p).with(expected_path)
expect(FastlaneCore.fastlane_user_dir).to eq(expected_path)
e... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/configuration_spec.rb | Ruby | mit | 41,450 | master | 39,021 | describe FastlaneCore do
describe FastlaneCore::Configuration do
describe "Create a new Configuration Manager" do
it "raises an error if no hash is given" do
expect do
FastlaneCore::Configuration.create([], "string")
end.to raise_error("values parameter must be a hash")
end
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/config_item_spec.rb | Ruby | mit | 41,450 | master | 11,504 | describe FastlaneCore do
describe FastlaneCore::ConfigItem do
describe "ConfigItem sensitivity testing" do
it "is code_gen_sensitive if just sensitive" do
item = FastlaneCore::ConfigItem.new(key: :tacos,
short_option: "-t",
de... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/fastlane_folder_spec.rb | Ruby | mit | 41,450 | master | 2,106 | describe FastlaneCore::FastlaneFolder do
let(:fastfile_name) { "Fastfile" }
describe "#path" do
it "returns the fastlane path if it exists" do
expect(FastlaneCore::FastlaneFolder.path).to eq("./fastlane/")
end
it "returns nil if the fastlane path isn't available" do
Dir.chdir("/") do
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/provisioning_profile_spec.rb | Ruby | mit | 41,450 | master | 875 | describe FastlaneCore do
describe FastlaneCore::ProvisioningProfile do
describe "#profiles_path" do
["16.0", "17"].each do |xcode_version|
it "returns correct profiles path for Xcode #{xcode_version}" do
allow(FastlaneCore::Helper).to receive(:xcode_version).and_return(xcode_version)
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/globals_spec.rb | Ruby | mit | 41,450 | master | 604 | require 'spec_helper'
describe FastlaneCore do
describe FastlaneCore::Globals do
it "Toggle verbose mode" do
FastlaneCore::Globals.verbose = true
expect(FastlaneCore::Globals.verbose?).to eq(true)
FastlaneCore::Globals.verbose = false
expect(FastlaneCore::Globals.verbose?).to eq(nil)
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/helper_spec.rb | Ruby | mit | 41,450 | master | 10,044 | describe FastlaneCore do
describe FastlaneCore::Helper do
describe "#bundler?" do
it "returns false when not in a bundler environment" do
stub_const('ENV', {})
expect(FastlaneCore::Helper.bundler?).to be(false)
end
it "returns true BUNDLE_BIN_PATH is defined" do
stub_con... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/feature_spec.rb | Ruby | mit | 41,450 | master | 5,840 | class FeatureHelper
def self.disabled_class_method
end
def self.enabled_class_method
end
def disabled_instance_method; end
def enabled_instance_method; end
def self.reset_test_method
FeatureHelper.instance_eval { undef test_method }
end
def reset_test_method
undef test_method
end
end
d... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/clipboard_spec.rb | Ruby | mit | 41,450 | master | 1,035 | describe FastlaneCore do
describe FastlaneCore::Clipboard do
describe '#copy and paste' do
before(:each) do
@test_message = "_fastlane_ is awesome"
end
it 'should work on supported environments', if: FastlaneCore::Clipboard.is_supported? do
# Save clipboard
clipboard = F... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/interface_spec.rb | Ruby | mit | 41,450 | master | 352 | describe FastlaneCore::Interface do
describe "Abort helper methods" do
describe "#abort_with_message!" do
it "raises FastlaneCommonException" do
expect do
FastlaneCore::Interface.new.abort_with_message!("Yup")
end.to raise_error(FastlaneCore::Interface::FastlaneCommonException, "Yu... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/cert_checker_spec.rb | Ruby | mit | 41,450 | master | 9,272 | describe FastlaneCore do
describe FastlaneCore::CertChecker do
let(:success_status) {
class ProcessStatusMock
end
allow_any_instance_of(ProcessStatusMock).to receive(:success?).and_return(true)
ProcessStatusMock.new
}
describe '#installed_identities' do
it 'should print an... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/android_package_name_guesser_spec.rb | Ruby | mit | 41,450 | master | 3,124 | require 'spec_helper'
require 'fastlane_core/android_package_name_guesser'
describe FastlaneCore::AndroidPackageNameGuesser do
it 'returns nil if no clues' do
# this might also fail if the environment or config files are not clean
expect(FastlaneCore::AndroidPackageNameGuesser.guess_package_name('fastlane',... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/pkg_file_analyser_spec.rb | Ruby | mit | 41,450 | master | 1,051 | describe FastlaneCore do
describe FastlaneCore::PkgFileAnalyser do
let(:path) { File.expand_path("../fixtures/pkgs/#{pkg}.pkg", __FILE__) }
context "with a normal path" do
let(:pkg) { 'MacAppOnly' }
describe '::fetch_app_identifier', requires_xar: true do
subject { described_class.fetch_... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/shell_spec.rb | Ruby | mit | 41,450 | master | 540 | describe FastlaneCore do
describe FastlaneCore::Shell do
describe "command_output" do
before(:all) do
@shell = FastlaneCore::Shell.new
end
it 'command_output handles encodings incorrectly tagged as UTF-8' do
expect do
@shell.command_output("utf_16_string_tagged_as_utf_... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/itunes_transporter_spec.rb | Ruby | mit | 41,450 | master | 76,112 | require 'shellwords'
require 'credentials_manager'
describe FastlaneCore do
let(:password) { "!> p@$s_-+=w'o%rd\"&#*<" }
let(:email) { 'fabric.devtools@gmail.com' }
let(:jwt) { '409jjl43j90ghjqoineio49024' }
let(:api_key) { { key_id: "TESTAPIK2HW", issuer_id: "11223344-1122-aabb-aabb-uuvvwwxxyyzz" } }
descr... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/command_executor_spec.rb | Ruby | mit | 41,450 | master | 7,935 | describe FastlaneCore do
describe FastlaneCore::CommandExecutor do
describe "execute" do
let(:failing_command) { FastlaneCore::Helper.windows? ? 'echo log && exit 42' : 'echo log; exit 42' }
let(:failing_command_output) { FastlaneCore::Helper.windows? ? "log \n" : "log\n" }
let(:failing_command_... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/core_ext/shellwords_ext_spec.rb | Ruby | mit | 41,450 | master | 13,510 | # references
# normal implementation:
# https://ruby-doc.org/stdlib-2.3.0/libdoc/shellwords/rdoc/Shellwords.html
# https://github.com/ruby/ruby/blob/trunk/lib/shellwords.rb
# "tests":
# https://github.com/ruby/ruby/blob/trunk/test/test_shellwords.rb
# https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/shellwords... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | fastlane_core/spec/core_ext/cfpropertylist_ext_spec.rb | Ruby | mit | 41,450 | master | 635 | require "fastlane_core/core_ext/cfpropertylist"
describe "Extension to CFPropertyList" do
let(:array) { [1, 2, 3] }
let(:hash) { ["key" => "value"] }
it "adds a #to_binary_plist method to Array" do
expect(array).to respond_to(:to_binary_plist)
end
it "adds a #to_binary_plist method to Hash" do
expe... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/spec/rule_processor_spec.rb | Ruby | mit | 41,450 | master | 3,993 | require 'precheck'
require 'spaceship'
require 'webmock'
describe Precheck do
describe Precheck::RuleProcessor do
let(:fake_happy_app) { "fake_app_object" }
let(:fake_happy_app_version) { "fake_app_version_object" }
let(:fake_happy_app_info) { "fake_app_info_object" }
let(:fake_in_app_purchase) { "fa... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/spec/rules/curse_words_rule_spec.rb | Ruby | mit | 41,450 | master | 1,338 | require 'precheck'
module Precheck
describe Precheck do
describe Precheck::CurseWordsRule do
let(:rule) { CurseWordsRule.new }
let(:happy_item) { TextItemToCheck.new("tacos are really delicious, seriously, I can't even", :description, "description") }
let(:curse_item) { TextItemToCheck.new("ple... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/spec/rules/copyright_date_rule_spec.rb | Ruby | mit | 41,450 | master | 1,205 | require 'precheck'
module Precheck
describe Precheck do
describe Precheck::CopyrightDateRule do
let(:rule) { CopyrightDateRule.new }
let(:happy_item) { TextItemToCheck.new("Copyright taquitos, #{DateTime.now.year}", :copyright, "copyright") }
let(:old_copyright_item) { TextItemToCheck.new("Copy... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/spec/rules/unreachable_urls_rule_spec.rb | Ruby | mit | 41,450 | master | 3,605 | require 'precheck'
module Precheck
describe Precheck do
describe Precheck::UnreachableURLRule do
let(:rule) { UnreachableURLRule.new }
def setup_url_rule_mock(url: "http://fastlane.tools", return_status: 200)
request = "fake request"
head_object = "fake head object"
allow(he... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/spec/rules/abstract_text_match_rule_spec.rb | Ruby | mit | 41,450 | master | 5,024 | require 'precheck'
module Precheck
# all the stuff we need that doesn't matter for testing
class TestingRule < AbstractTextMatchRule
def self.key
return :test_rule_key
end
def self.env_name
return "JUST_A_TEST_RULE"
end
def self.description
return "test descriptions"
end... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/spec/rules/other_platforms_rule_spec.rb | Ruby | mit | 41,450 | master | 779 | require 'precheck'
module Precheck
describe Precheck do
describe Precheck::OtherPlatformsRule do
let(:rule) { OtherPlatformsRule.new }
let(:allowed_item) { TextItemToCheck.new("We have integration with the Files app so you can open documents stored in your Google Drive.", :description, "description")... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/spec/rules/rule_spec.rb | Ruby | mit | 41,450 | master | 3,388 | require 'precheck'
module Precheck
class TestItemToCheck < ItemToCheck
attr_accessor :data
def initialize(data: nil, item_name: :a, friendly_name: "none", is_optional: false)
@data = data
super(item_name, friendly_name, is_optional)
end
def item_data
return data
end
end
c... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/rule.rb | Ruby | mit | 41,450 | master | 5,258 | require 'credentials_manager/appfile_config'
require 'fastlane_core/configuration/config_item'
require_relative 'module'
require_relative 'item_to_check'
require_relative 'rule_check_result'
module Precheck
VALIDATION_STATES = {
passed: "passed",
failed: "failed"
}
# rules can cause warnings, errors, o... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/options.rb | Ruby | mit | 41,450 | master | 6,404 | require 'fastlane_core/configuration/config_item'
require 'credentials_manager/appfile_config'
require_relative 'rules/all'
module Precheck
class Options
def self.rules
[
NegativeAppleSentimentRule,
PlaceholderWordsRule,
OtherPlatformsRule,
FutureFunctionalityRule,
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/module.rb | Ruby | mit | 41,450 | master | 708 | require 'fastlane_core/helper'
require 'fastlane_core/ui/ui'
require 'fastlane/boolean'
module Precheck
# Use this to just setup the configuration attribute and set it later somewhere else
class << self
attr_accessor :config
def precheckfile_name
"Precheckfile"
end
end
Helper = FastlaneCore... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/item_to_check.rb | Ruby | mit | 41,450 | master | 1,837 | module Precheck
# each attribute on a app version is a single item.
# for example: .name, .keywords, .description, will all have a single item to represent them
# which includes their name and a more user-friendly name we can use to print out information
class ItemToCheck
attr_accessor :item_name
attr_a... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/rule_processor.rb | Ruby | mit | 41,450 | master | 11,368 | require 'spaceship/tunes/language_item'
require 'spaceship/tunes/iap_list'
require 'fastlane/markdown_table_formatter'
require_relative 'module'
require_relative 'item_to_check'
require_relative 'rule'
module Precheck
# encapsulated the results of the rule processing, needed to return not just an array of the resul... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/commands_generator.rb | Ruby | mit | 41,450 | master | 2,531 | require "commander"
require "fastlane_core/globals"
require "fastlane_core/configuration/commander_generator"
require "fastlane_core/configuration/configuration"
require "fastlane_core/helper"
require "fastlane/version"
require 'fastlane_core/ui/help_formatter'
require_relative 'module'
require_relative 'options'
requ... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/rule_check_result.rb | Ruby | mit | 41,450 | master | 489 | module Precheck
# after each item is checked for rule conformance to a single rule, a result is generated
# a result can have a status of success or fail for a given rule/item
class RuleCheckResult
attr_accessor :item
attr_accessor :rule_return # RuleReturn
attr_accessor :rule
def initialize(item... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/runner.rb | Ruby | mit | 41,450 | master | 7,292 | require 'terminal-table'
require 'fastlane_core/print_table'
require 'spaceship/tunes/tunes'
require 'spaceship/tunes/application'
require_relative 'rule_processor'
require_relative 'options'
module Precheck
class Runner
attr_accessor :spaceship
# Uses the spaceship to download app metadata and then run al... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/rules/other_platforms_rule.rb | Ruby | mit | 41,450 | master | 816 | require_relative 'abstract_text_match_rule'
module Precheck
class OtherPlatformsRule < AbstractTextMatchRule
def self.key
:other_platforms
end
def self.env_name
"RULE_OTHER_PLATFORMS"
end
def self.friendly_name
"No mentioning competitors"
end
def self.description
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/rules/copyright_date_rule.rb | Ruby | mit | 41,450 | master | 714 | require_relative 'abstract_text_match_rule'
module Precheck
class CopyrightDateRule < AbstractTextMatchRule
def self.key
:copyright_date
end
def self.env_name
"RULE_COPYRIGHT_DATE"
end
def self.friendly_name
"Incorrect, or missing copyright date"
end
def self.descript... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/rules/curse_words_rule.rb | Ruby | mit | 41,450 | master | 2,016 | require 'digest'
require_relative '../rule'
module Precheck
class CurseWordsRule < TextRule
def self.key
:curse_words
end
def self.env_name
"RULE_CURSE_WORDS"
end
def self.friendly_name
"No curse words"
end
def self.description
"including words that might be co... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/rules/unreachable_urls_rule.rb | Ruby | mit | 41,450 | master | 1,438 | require 'addressable'
require 'faraday_middleware'
require_relative '../rule'
module Precheck
class UnreachableURLRule < URLRule
def self.key
:unreachable_urls
end
def self.env_name
"RULE_UNREACHABLE_URLS"
end
def self.friendly_name
"No broken urls"
end
def self.desc... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/rules/negative_apple_sentiment_rule.rb | Ruby | mit | 41,450 | master | 728 | require_relative 'abstract_text_match_rule'
module Precheck
class NegativeAppleSentimentRule < AbstractTextMatchRule
def self.key
:negative_apple_sentiment
end
def self.env_name
"RULE_NEGATIVE_APPLE_SENTIMENT"
end
def self.friendly_name
"No negative sentiment"
end
d... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/rules/custom_text_rule.rb | Ruby | mit | 41,450 | master | 669 | require_relative 'abstract_text_match_rule'
module Precheck
class CustomTextRule < AbstractTextMatchRule
attr_accessor :data
def self.key
:custom_text
end
def self.env_name
"RULE_CUSTOM_TEXT"
end
def self.friendly_name
"No user-specified words are included"
end
d... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/rules/free_stuff_iap_rule.rb | Ruby | mit | 41,450 | master | 569 | require_relative 'abstract_text_match_rule'
module Precheck
class FreeStuffIAPRule < AbstractTextMatchRule
def self.key
:free_stuff_in_iap
end
def self.env_name
"RULE_FREE_STUFF_IN_IAP"
end
def self.friendly_name
"No words indicating your IAP is free"
end
def self.des... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/rules/placeholder_words_rule.rb | Ruby | mit | 41,450 | master | 608 | require_relative 'abstract_text_match_rule'
module Precheck
class PlaceholderWordsRule < AbstractTextMatchRule
def self.key
:placeholder_text
end
def self.env_name
"RULE_PLACEHOLDER_TEXT_THINGS"
end
def self.friendly_name
"No placeholder text"
end
def self.description... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/rules/future_functionality_rule.rb | Ruby | mit | 41,450 | master | 694 | require_relative 'abstract_text_match_rule'
module Precheck
class FutureFunctionalityRule < AbstractTextMatchRule
def self.key
:future_functionality
end
def self.env_name
"RULE_FUTURE_FUNCTIONALITY"
end
def self.friendly_name
"No future functionality promises"
end
def... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/rules/test_words_rule.rb | Ruby | mit | 41,450 | master | 541 | require_relative 'abstract_text_match_rule'
module Precheck
class TestWordsRule < AbstractTextMatchRule
def self.key
:test_words
end
def self.env_name
"RULE_TEST_WORDS"
end
def self.friendly_name
"No words indicating test content"
end
def self.description
"using... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | precheck/lib/precheck/rules/abstract_text_match_rule.rb | Ruby | mit | 41,450 | master | 2,963 | require_relative '../rule'
module Precheck
# abstract class that defines a default way to check for the presence of a list of words within a block of text
class AbstractTextMatchRule < TextRule
WORD_SEARCH_TYPES = {
fail_on_inclusion: "fail_on_inclusion",
fail_on_exclusion: "fail_on_exclusion"
... |
github | fastlane/fastlane | https://github.com/fastlane/fastlane | rakelib/issue_stats.rake | Ruby | mit | 41,450 | master | 4,165 | require 'json'
require 'yaml'
def load_fastlane_members
team_path = File.expand_path('../team.json', __dir__)
data = JSON.parse(File.read(team_path))
members = data.keys.map { |u| u.to_s.downcase }
members << 'fastlane-bot'
members.uniq.freeze
end
def load_tool_labels
labeler_path = File.expand_path('../.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.