Class: Fastlane::Actions::ClipboardAction
Constant Summary
Fastlane::Action::AVAILABLE_CATEGORIES, Fastlane::Action::RETURN_TYPES
Class Method Summary
collapse
action_name, author, deprecated_notes, details, lane_context, method_missing, other_action, output, return_type, return_value, sample_return_value, shell_out_should_use_bundle_exec?, step_text
Class Method Details
.authors ⇒ Object
29
30
31
|
# File 'fastlane/lib/fastlane/actions/clipboard.rb', line 29
def self.authors
["KrauseFx", "joshdholtz", "rogerluan"]
end
|
.available_options ⇒ Object
21
22
23
24
25
26
27
|
# File 'fastlane/lib/fastlane/actions/clipboard.rb', line 21
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :value,
env_name: "FL_CLIPBOARD_VALUE",
description: "The string that should be copied into the clipboard")
]
end
|
.category ⇒ Object
44
45
46
|
# File 'fastlane/lib/fastlane/actions/clipboard.rb', line 44
def self.category
:misc
end
|
.description ⇒ Object
17
18
19
|
# File 'fastlane/lib/fastlane/actions/clipboard.rb', line 17
def self.description
"Copies a given string into the clipboard. Works only on macOS"
end
|
.example_code ⇒ Object
37
38
39
40
41
42
|
# File 'fastlane/lib/fastlane/actions/clipboard.rb', line 37
def self.example_code
[
'clipboard(value: "https://docs.fastlane.tools/")',
'clipboard(value: lane_context[SharedValues::HOCKEY_DOWNLOAD_LINK] || "")'
]
end
|
.run(params) ⇒ Object
4
5
6
7
8
9
10
11
|
# File 'fastlane/lib/fastlane/actions/clipboard.rb', line 4
def self.run(params)
value = params[:value]
truncated_value = value[0..800].gsub(/\s\w+\s*$/, '...')
UI.message("Storing '#{truncated_value}' in the clipboard 🎨")
FastlaneCore::Clipboard.copy(content: value)
end
|