pantograph 0.1.14 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/pantograph/lib/assets/custom_action_template.rb +18 -14
  4. data/pantograph/lib/pantograph/action.rb +1 -1
  5. data/pantograph/lib/pantograph/action_collector.rb +1 -1
  6. data/pantograph/lib/pantograph/actions/actions_helper.rb +2 -2
  7. data/pantograph/lib/pantograph/actions/bundle_install.rb +120 -84
  8. data/pantograph/lib/pantograph/actions/cloc.rb +64 -49
  9. data/pantograph/lib/pantograph/actions/create_pull_request.rb +1 -1
  10. data/pantograph/lib/pantograph/actions/danger.rb +103 -82
  11. data/pantograph/lib/pantograph/actions/debug.rb +2 -2
  12. data/pantograph/lib/pantograph/actions/default_platform.rb +5 -3
  13. data/pantograph/lib/pantograph/actions/download.rb +10 -9
  14. data/pantograph/lib/pantograph/actions/echo.rb +1 -1
  15. data/pantograph/lib/pantograph/actions/ensure_bundle_exec.rb +18 -10
  16. data/pantograph/lib/pantograph/actions/ensure_env_vars.rb +16 -17
  17. data/pantograph/lib/pantograph/actions/ensure_git_branch.rb +14 -14
  18. data/pantograph/lib/pantograph/actions/ensure_git_status_clean.rb +18 -34
  19. data/pantograph/lib/pantograph/actions/get_github_release.rb +1 -1
  20. data/pantograph/lib/pantograph/actions/git_branch.rb +6 -7
  21. data/pantograph/lib/pantograph/actions/git_commit.rb +21 -13
  22. data/pantograph/lib/pantograph/actions/git_pull.rb +4 -23
  23. data/pantograph/lib/pantograph/actions/git_pull_tags.rb +31 -0
  24. data/pantograph/lib/pantograph/actions/git_submodule_update.rb +23 -16
  25. data/pantograph/lib/pantograph/actions/git_tag_exists.rb +21 -25
  26. data/pantograph/lib/pantograph/actions/gradle.rb +82 -58
  27. data/pantograph/lib/pantograph/actions/import.rb +1 -1
  28. data/pantograph/lib/pantograph/actions/import_from_git.rb +48 -31
  29. data/pantograph/lib/pantograph/actions/is_ci.rb +1 -1
  30. data/pantograph/lib/pantograph/actions/is_verbose.rb +77 -0
  31. data/pantograph/lib/pantograph/actions/jira.rb +50 -55
  32. data/pantograph/lib/pantograph/actions/lane_context.rb +6 -6
  33. data/pantograph/lib/pantograph/actions/last_git_commit.rb +3 -3
  34. data/pantograph/lib/pantograph/actions/min_pantograph_version.rb +19 -25
  35. data/pantograph/lib/pantograph/actions/number_of_commits.rb +34 -30
  36. data/pantograph/lib/pantograph/actions/opt_out_usage.rb +15 -9
  37. data/pantograph/lib/pantograph/actions/pantograph_version.rb +2 -2
  38. data/pantograph/lib/pantograph/actions/println.rb +1 -1
  39. data/pantograph/lib/pantograph/actions/prompt.rb +31 -22
  40. data/pantograph/lib/pantograph/actions/prompt_secure.rb +128 -0
  41. data/pantograph/lib/pantograph/actions/reset_git_repo.rb +1 -1
  42. data/pantograph/lib/pantograph/actions/set_github_release.rb +4 -4
  43. data/pantograph/lib/pantograph/actions/sh.rb +3 -3
  44. data/pantograph/lib/pantograph/commands_generator.rb +1 -1
  45. data/pantograph/lib/pantograph/helper/git_helper.rb +29 -0
  46. data/pantograph/lib/pantograph/lane_manager.rb +1 -1
  47. data/pantograph/lib/pantograph/pant_file.rb +22 -16
  48. data/pantograph/lib/pantograph/plugins/template/README.md.erb +1 -1
  49. data/pantograph/lib/pantograph/setup/setup.rb +6 -17
  50. data/pantograph/lib/pantograph/version.rb +1 -1
  51. data/pantograph_core/lib/pantograph_core/configuration/commander_generator.rb +1 -1
  52. data/pantograph_core/lib/pantograph_core/globals.rb +1 -2
  53. data/pantograph_core/lib/pantograph_core/helper.rb +19 -6
  54. data/pantograph_core/lib/pantograph_core/ui/implementations/shell.rb +1 -4
  55. metadata +19 -5
  56. data/pantograph/lib/pantograph/actions/git_add.rb +0 -93
  57. data/pantograph/lib/pantograph/actions/make_changelog_from_jenkins.rb +0 -81
  58. data/pantograph/lib/pantograph/actions/nexus_upload.rb +0 -230
@@ -32,19 +32,27 @@ module Pantograph
32
32
 
33
33
  def self.available_options
34
34
  [
35
- PantographCore::ConfigItem.new(key: :path,
36
- description: "The file you want to commit",
37
- is_string: false),
38
- PantographCore::ConfigItem.new(key: :message,
39
- description: "The commit message that should be used"),
40
- PantographCore::ConfigItem.new(key: :skip_git_hooks,
41
- description: "Set to true to pass --no-verify to git",
42
- type: Boolean,
43
- optional: true),
44
- PantographCore::ConfigItem.new(key: :allow_nothing_to_commit,
45
- description: "Set to true to allow commit without any git changes",
46
- type: Boolean,
47
- optional: true)
35
+ PantographCore::ConfigItem.new(
36
+ key: :path,
37
+ description: "The file you want to commit",
38
+ is_string: false
39
+ ),
40
+ PantographCore::ConfigItem.new(
41
+ key: :message,
42
+ description: "The commit message that should be used"
43
+ ),
44
+ PantographCore::ConfigItem.new(
45
+ key: :skip_git_hooks,
46
+ description: "Set to true to pass --no-verify to git",
47
+ type: Boolean,
48
+ optional: true
49
+ ),
50
+ PantographCore::ConfigItem.new(
51
+ key: :allow_nothing_to_commit,
52
+ description: "Set to true to allow commit without any git changes",
53
+ type: Boolean,
54
+ optional: true
55
+ )
48
56
  ]
49
57
  end
50
58
 
@@ -2,36 +2,18 @@ module Pantograph
2
2
  module Actions
3
3
  class GitPullAction < Action
4
4
  def self.run(params)
5
- commands = []
6
-
7
- unless params[:only_tags]
8
- commands += ["git pull &&"]
9
- end
10
-
11
- commands += ["git fetch --tags"]
12
-
13
- Actions.sh(commands.join(' '))
5
+ Actions.sh('git pull')
14
6
  end
15
7
 
16
8
  def self.description
17
- "Executes a simple git pull command"
9
+ 'Executes a simple git pull command'
18
10
  end
19
11
 
20
12
  def self.available_options
21
- [
22
- PantographCore::ConfigItem.new(key: :only_tags,
23
- description: "Simply pull the tags, and not bring new commits to the current branch from the remote",
24
- is_string: false,
25
- optional: true,
26
- default_value: false,
27
- verify_block: proc do |value|
28
- UI.user_error!("Please pass a valid value for only_tags. Use one of the following: true, false") unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
29
- end)
30
- ]
31
13
  end
32
14
 
33
15
  def self.authors
34
- ["KrauseFx", "JaviSoto"]
16
+ ['johnknapprs']
35
17
  end
36
18
 
37
19
  def self.is_supported?(platform)
@@ -40,8 +22,7 @@ module Pantograph
40
22
 
41
23
  def self.example_code
42
24
  [
43
- 'git_pull',
44
- 'git_pull(only_tags: true) # only the tags, no commits'
25
+ 'git_pull'
45
26
  ]
46
27
  end
47
28
 
@@ -0,0 +1,31 @@
1
+ module Pantograph
2
+ module Actions
3
+ class GitPullTagsAction < Action
4
+ def self.run(params)
5
+ Actions.sh('git fetch --tags')
6
+ end
7
+
8
+ def self.description
9
+ 'Executes a simple `git fetch --tags` command'
10
+ end
11
+
12
+ def self.authors
13
+ ['johnknapprs']
14
+ end
15
+
16
+ def self.is_supported?(platform)
17
+ true
18
+ end
19
+
20
+ def self.example_code
21
+ [
22
+ 'git_pull_tags'
23
+ ]
24
+ end
25
+
26
+ def self.category
27
+ :source_control
28
+ end
29
+ end
30
+ end
31
+ end
@@ -2,10 +2,13 @@ module Pantograph
2
2
  module Actions
3
3
  class GitSubmoduleUpdateAction < Action
4
4
  def self.run(params)
5
- commands = ["git submodule update"]
6
- commands += ["--init"] if params[:init]
7
- commands += ["--recursive"] if params[:recursive]
8
- Actions.sh(commands.join(' '))
5
+ cmd = []
6
+ cmd << 'git submodule update'
7
+ cmd << '--init' if params[:init]
8
+ cmd << '--recursive' if params[:recursive]
9
+ cmd = cmd.join(' ')
10
+
11
+ Actions.sh(cmd)
9
12
  end
10
13
 
11
14
  #####################################################
@@ -13,20 +16,24 @@ module Pantograph
13
16
  #####################################################
14
17
 
15
18
  def self.description
16
- "Executes a git submodule command"
19
+ 'Execute git submodule command'
17
20
  end
18
21
 
19
22
  def self.available_options
20
23
  [
21
- PantographCore::ConfigItem.new(key: :recursive,
22
- description: "Should the submodules be updated recursively",
23
- type: Boolean,
24
- default_value: false),
25
- PantographCore::ConfigItem.new(key: :init,
26
- description: "Should the submodules be initiated before update",
27
- type: Boolean,
28
- is_string: false,
29
- default_value: false)
24
+ PantographCore::ConfigItem.new(
25
+ key: :recursive,
26
+ description: 'Add the `--recursive` flag',
27
+ type: Boolean,
28
+ default_value: false
29
+ ),
30
+ PantographCore::ConfigItem.new(
31
+ key: :init,
32
+ description: 'Add the `--init` flag',
33
+ type: Boolean,
34
+ is_string: false,
35
+ default_value: false
36
+ )
30
37
  ]
31
38
  end
32
39
 
@@ -37,11 +44,11 @@ module Pantograph
37
44
  end
38
45
 
39
46
  def self.authors
40
- ["braunico"]
47
+ ['johnknapprs']
41
48
  end
42
49
 
43
50
  def self.is_supported?(platform)
44
- return true
51
+ true
45
52
  end
46
53
 
47
54
  def self.category
@@ -1,20 +1,20 @@
1
1
  module Pantograph
2
2
  module Actions
3
3
  class GitTagExistsAction < Action
4
+ module SharedValues
5
+ GIT_TAG_EXISTS ||= :GIT_TAG_EXISTS
6
+ end
7
+
4
8
  def self.run(params)
5
- tag_ref = "refs/tags/#{params[:tag].shellescape}"
6
- if params[:remote]
7
- command = "git ls-remote -q --exit-code #{params[:remote_name].shellescape} #{tag_ref}"
8
- else
9
- command = "git rev-parse -q --verify #{tag_ref}"
10
- end
11
- exists = true
9
+ tag_exists = true
10
+
12
11
  Actions.sh(
13
- command,
12
+ "git rev-parse -q --verify refs/tags/#{params[:tag].shellescape}",
14
13
  log: PantographCore::Globals.verbose?,
15
- error_callback: ->(result) { exists = false }
14
+ error_callback: ->(result) { tag_exists = false }
16
15
  )
17
- exists
16
+
17
+ Actions.lane_context[SharedValues::GIT_TAG_EXISTS] = tag_exists
18
18
  end
19
19
 
20
20
  #####################################################
@@ -22,36 +22,32 @@ module Pantograph
22
22
  #####################################################
23
23
 
24
24
  def self.description
25
- "Checks if the git tag with the given name exists in the current repo"
25
+ 'Checks if the git tag with the given name exists'
26
26
  end
27
27
 
28
28
  def self.available_options
29
29
  [
30
- PantographCore::ConfigItem.new(key: :tag,
31
- description: "The tag name that should be checked"),
32
- PantographCore::ConfigItem.new(key: :remote,
33
- description: "Whether to check remote. Defaults to `false`",
34
- type: Boolean,
35
- default_value: false,
36
- optional: true),
37
- PantographCore::ConfigItem.new(key: :remote_name,
38
- description: "The remote to check. Defaults to `origin`",
39
- default_value: 'origin',
40
- optional: true)
30
+ PantographCore::ConfigItem.new(
31
+ key: :tag,
32
+ env_name: 'GIT_TAG_EXISTS_TAG',
33
+ description: 'The tag name that should be checked',
34
+ is_string: true
35
+ )
41
36
  ]
42
37
  end
43
38
 
44
39
  def self.return_value
45
- "Boolean value whether the tag exists or not"
40
+ 'Returns Boolean value whether the tag exists'
46
41
  end
47
42
 
48
43
  def self.output
49
44
  [
45
+ ['GIT_TAG_EXISTS', 'Boolean value whether tag exists']
50
46
  ]
51
47
  end
52
48
 
53
49
  def self.authors
54
- ["antondomashnev"]
50
+ ['johnknapprs']
55
51
  end
56
52
 
57
53
  def self.is_supported?(platform)
@@ -61,7 +57,7 @@ module Pantograph
61
57
  def self.example_code
62
58
  [
63
59
  'if git_tag_exists(tag: "1.1.0")
64
- UI.message("Found it 🚀")
60
+ UI.message("Git Tag Exists!")
65
61
  end'
66
62
  ]
67
63
  end
@@ -27,7 +27,9 @@ module Pantograph
27
27
  end
28
28
 
29
29
  # Ensure we ended up with a valid path to gradle
30
- UI.user_error!("Couldn't find gradlew at path '#{File.expand_path(gradle_path)}'") unless File.exist?(gradle_path)
30
+ unless File.exist?(gradle_path)
31
+ UI.user_error!("Couldn't find gradlew at path '#{File.expand_path(gradle_path)}'")
32
+ end
31
33
 
32
34
  # Construct our flags
33
35
  flags = []
@@ -93,63 +95,85 @@ module Pantograph
93
95
 
94
96
  def self.available_options
95
97
  [
96
- PantographCore::ConfigItem.new(key: :task,
97
- env_name: 'GRADLE_TASK',
98
- description: 'The gradle task you want to execute, e.g. `assemble`, `bundle` or `test`. For tasks such as `assembleMyFlavorRelease` you should use gradle(task: \'assemble\', flavor: \'Myflavor\', build_type: \'Release\')',
99
- optional: false,
100
- type: String),
101
- PantographCore::ConfigItem.new(key: :flavor,
102
- env_name: 'GRADLE_FLAVOR',
103
- description: 'The flavor that you want the task for, e.g. `MyFlavor`. If you are running the `assemble` task in a multi-flavor project, and you rely on Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] then you must specify a flavor here or else this value will be undefined',
104
- optional: true,
105
- type: String),
106
- PantographCore::ConfigItem.new(key: :build_type,
107
- env_name: 'GRADLE_BUILD_TYPE',
108
- description: 'The build type that you want the task for, e.g. `Release`. Useful for some tasks such as `assemble`',
109
- optional: true,
110
- type: String),
111
- PantographCore::ConfigItem.new(key: :flags,
112
- env_name: 'GRADLE_FLAGS',
113
- description: 'All parameter flags you want to pass to the gradle command, e.g. `--exitcode --xml file.xml`',
114
- optional: true,
115
- type: String),
116
- PantographCore::ConfigItem.new(key: :project_dir,
117
- env_name: 'GRADLE_PROJECT_DIR',
118
- description: 'The root directory of the gradle project',
119
- default_value: '.',
120
- type: String),
121
- PantographCore::ConfigItem.new(key: :gradle_path,
122
- env_name: 'GRADLE_PATH',
123
- description: 'The path to your `gradlew`. If you specify a relative path, it is assumed to be relative to the `project_dir`',
124
- optional: true,
125
- type: String,
126
- default_value: './gradlew'),
127
- PantographCore::ConfigItem.new(key: :properties,
128
- env_name: 'GRADLE_PROPERTIES',
129
- description: 'Gradle properties to be exposed to the gradle script',
130
- optional: true,
131
- is_string: false),
132
- PantographCore::ConfigItem.new(key: :artifact_extension,
133
- env_name: 'GRADLE_ARTIFACT_EXTENSION',
134
- description: 'Gradle build output filetype extension',
135
- optional: true,
136
- is_string: true,
137
- default_value: 'jar'),
138
- PantographCore::ConfigItem.new(key: :system_properties,
139
- env_name: 'GRADLE_SYSTEM_PROPERTIES',
140
- description: 'Gradle system properties to be exposed to the gradle script',
141
- optional: true,
142
- is_string: false),
143
- PantographCore::ConfigItem.new(key: :print_command,
144
- env_name: 'GRADLE_PRINT_COMMAND',
145
- description: 'Control whether the generated Gradle command is printed as output before running it (true/false)',
146
- is_string: false,
147
- default_value: true),
148
- PantographCore::ConfigItem.new(key: :print_command_output,
149
- env_name: 'GRADLE_PRINT_COMMAND_OUTPUT',
150
- description: 'Control whether the output produced by given Gradle command is printed while running (true/false)',
151
- is_string: false,
152
- default_value: true)
98
+ PantographCore::ConfigItem.new(
99
+ key: :task,
100
+ env_name: 'GRADLE_TASK',
101
+ description: 'The gradle task you want to execute, e.g. `assemble`, `bundle` or `test`. For tasks such as `assembleMyFlavorRelease` you should use gradle(task: \'assemble\', flavor: \'Myflavor\', build_type: \'Release\')',
102
+ optional: false,
103
+ type: String
104
+ ),
105
+ PantographCore::ConfigItem.new(
106
+ key: :flavor,
107
+ env_name: 'GRADLE_FLAVOR',
108
+ description: 'The flavor that you want the task for, e.g. `MyFlavor`. If you are running the `assemble` task in a multi-flavor project, and you rely on Actions.lane_context[SharedValues::GRADLE_ARTIFACT _OUTPUT_PATH] then you must specify a flavor here or else this value will be undefined',
109
+ optional: true,
110
+ type: String
111
+ ),
112
+ PantographCore::ConfigItem.new(
113
+ key: :build_type,
114
+ env_name: 'GRADLE_BUILD_TYPE',
115
+ description: 'The build type that you want the task for, e.g. `Release`. Useful for some tasks such as `assemble`',
116
+ optional: true,
117
+ type: String
118
+ ),
119
+ PantographCore::ConfigItem.new(
120
+ key: :flags,
121
+ env_name: 'GRADLE_FLAGS',
122
+ description: 'All parameter flags you want to pass to the gradle command, e.g. `--exitcode --xml file.xml`',
123
+ optional: true,
124
+ type: String
125
+ ),
126
+ PantographCore::ConfigItem.new(
127
+ key: :project_dir,
128
+ env_name: 'GRADLE_PROJECT_DIR',
129
+ description: 'The root directory of the gradle project',
130
+ default_value: '.',
131
+ type: String
132
+ ),
133
+ PantographCore::ConfigItem.new(
134
+ key: :gradle_path,
135
+ env_name: 'GRADLE_PATH',
136
+ description: 'The path to your `gradlew`. If you specify a relative path, it is assumed to be relative to the `project_dir`',
137
+ optional: true,
138
+ type: String,
139
+ default_value: './gradlew'
140
+ ),
141
+ PantographCore::ConfigItem.new(
142
+ key: :properties,
143
+ env_name: 'GRADLE_PROPERTIES',
144
+ description: 'Gradle properties to be exposed to the gradle script',
145
+ optional: true,
146
+ is_string: false
147
+ ),
148
+ PantographCore::ConfigItem.new(
149
+ key: :artifact_extension,
150
+ env_name: 'GRADLE_ARTIFACT_EXTENSION',
151
+ description: 'Gradle build output filetype extension',
152
+ optional: true,
153
+ is_string: true,
154
+ default_value: 'jar'
155
+ ),
156
+ PantographCore::ConfigItem.new(
157
+ key: :system_properties,
158
+ env_name: 'GRADLE_SYSTEM_PROPERTIES',
159
+ description: 'Gradle system properties to be exposed to the gradle script',
160
+ optional: true,
161
+ is_string: false
162
+ ),
163
+ PantographCore::ConfigItem.new(
164
+ key: :print_command,
165
+ env_name: 'GRADLE_PRINT_COMMAND',
166
+ description: 'Control whether the generated Gradle command is printed as output before running it (true/false)',
167
+ is_string: false,
168
+ default_value: true
169
+ ),
170
+ PantographCore::ConfigItem.new(
171
+ key: :print_command_output,
172
+ env_name: 'GRADLE_PRINT_COMMAND_OUTPUT',
173
+ description: 'Control whether the output produced by given Gradle command is printed while running (true/false)',
174
+ is_string: false,
175
+ default_value: true
176
+ )
153
177
  ]
154
178
  end
155
179
 
@@ -15,7 +15,7 @@ module Pantograph
15
15
 
16
16
  def self.details
17
17
  [
18
- 'This is useful if you have shared lanes across multiple apps and you want to store a Pantfile in a separate folder.',
18
+ 'This is useful when sharing the same lanes across multiple projects',
19
19
  'The path must be relative to the Pantfile this is called from.'
20
20
  ].join("\n")
21
21
  end
@@ -10,36 +10,45 @@ module Pantograph
10
10
  #####################################################
11
11
 
12
12
  def self.description
13
- "Import another Pantfile from a remote git repository to use its lanes"
13
+ 'Import another Pantfile from a remote git repository to use its lanes'
14
14
  end
15
15
 
16
16
  def self.details
17
- "This is useful if you have shared lanes across multiple apps and you want to store the Pantfile in a remote git repository."
17
+ 'This is useful when sharing the same lanes across multiple projects'
18
18
  end
19
19
 
20
20
  def self.available_options
21
21
  [
22
- PantographCore::ConfigItem.new(key: :url,
23
- description: "The URL of the repository to import the Pantfile from",
24
- default_value: nil),
25
- PantographCore::ConfigItem.new(key: :branch,
26
- description: "The branch or tag to check-out on the repository",
27
- default_value: 'HEAD',
28
- optional: true),
29
- PantographCore::ConfigItem.new(key: :path,
30
- description: "The path of the Pantfile in the repository",
31
- default_value: 'pantograph/Pantfile',
32
- optional: true),
33
- PantographCore::ConfigItem.new(key: :version,
34
- description: "The version to checkout on the repository. Optimistic match operator or multiple conditions can be used to select the latest version within constraints",
35
- default_value: nil,
36
- is_string: false,
37
- optional: true)
22
+ PantographCore::ConfigItem.new(
23
+ key: :url,
24
+ description: 'The URL of the repository to import the Pantfile from',
25
+ default_value: nil,
26
+ optional: false
27
+ ),
28
+ PantographCore::ConfigItem.new(
29
+ key: :branch,
30
+ description: 'The branch or tag to check-out on the repository',
31
+ default_value: 'master',
32
+ optional: true
33
+ ),
34
+ PantographCore::ConfigItem.new(
35
+ key: :path,
36
+ description: 'The path of the Pantfile in the repository',
37
+ default_value: 'pantograph/Pantfile',
38
+ optional: true
39
+ ),
40
+ PantographCore::ConfigItem.new(
41
+ key: :version,
42
+ description: 'The version to checkout on the repository. Optimistic match operator or multiple conditions can be used to select the version within constraints',
43
+ default_value: nil,
44
+ is_string: false,
45
+ optional: true
46
+ )
38
47
  ]
39
48
  end
40
49
 
41
50
  def self.authors
42
- ["fabiomassimo", "KrauseFx", "Liquidsoul"]
51
+ ['fabiomassimo', 'KrauseFx', 'Liquidsoul', 'johnknapprs']
43
52
  end
44
53
 
45
54
  def self.is_supported?(platform)
@@ -48,18 +57,26 @@ module Pantograph
48
57
 
49
58
  def self.example_code
50
59
  [
51
- 'import_from_git(
52
- url: "git@github.com:pantograph/pantograph.git", # The URL of the repository to import the Pantfile from.
53
- branch: "HEAD", # The branch to checkout on the repository
54
- path: "pantograph/Pantfile", # The path of the Pantfile in the repository
55
- version: "~> 1.0.0" # The version to checkout on the repository. Optimistic match operator can be used to select the latest version within constraints.
56
- )',
57
- 'import_from_git(
58
- url: "git@github.com:pantograph/pantograph.git", # The URL of the repository to import the Pantfile from.
59
- branch: "HEAD", # The branch to checkout on the repository
60
- path: "pantograph/Pantfile", # The path of the Pantfile in the repository
61
- version: [">= 1.1.0", "< 2.0.0"] # The version to checkout on the repository. Multiple conditions can be used to select the latest version within constraints.
62
- )'
60
+ ' # Simple import on master branch
61
+ import_from_git(
62
+ url: "git@github.com:johnknapprs/pantograph.git"
63
+ )
64
+ ',
65
+ ' # Import a Pantfile with an Optimistic version match operator
66
+ import_from_git(
67
+ url: "git@github.com:johnknapprs/pantograph.git",
68
+ branch: "master",
69
+ path: "pantograph/Pantfile",
70
+ version: "~> 1.0.0"
71
+ )
72
+ ',
73
+ ' # Import a Pantfile with multiple version conditions
74
+ import_from_git(
75
+ url: "git@github.com:johnknapprs/pantograph.git", # The URL of the repository to import the Pantfile from.
76
+ branch: "development", # The branch to checkout on the repository
77
+ version: [">= 1.1.0", "< 2.0.0"]
78
+ )
79
+ '
63
80
  ]
64
81
  end
65
82
 
@@ -14,7 +14,7 @@ module Pantograph
14
14
  end
15
15
 
16
16
  def self.details
17
- 'The return value of this method is true if pantograph is currently executed on Travis, Jenkins, Circle or a similar CI service'
17
+ 'Return `true` if pantograph is currently executed on Travis, Jenkins, or a similar CI service'
18
18
  end
19
19
 
20
20
  def self.available_options
@@ -0,0 +1,77 @@
1
+ module Pantograph
2
+ module Actions
3
+ module SharedValues
4
+ IS_VERBOSE = :IS_VERBOSE
5
+ end
6
+
7
+ class IsVerboseAction < Action
8
+ def self.run(params)
9
+ Actions.lane_context[:IS_VERBOSE] = PantographCore::Globals.verbose? ? true : false
10
+ end
11
+
12
+ #####################################################
13
+ # @!group Documentation
14
+ #####################################################
15
+
16
+ def self.description
17
+ 'Returns Boolean whether `--verbose` flag was set'
18
+ end
19
+
20
+ def self.details
21
+ ''
22
+ end
23
+
24
+ def self.available_options
25
+ []
26
+ end
27
+
28
+ def self.output
29
+ [
30
+ ['IS_VERBOSE', 'Boolean whether verbosity flag was set']
31
+ ]
32
+ end
33
+
34
+ def self.return_value
35
+ # If your method provides a return value, you can describe here what it does
36
+ end
37
+
38
+ def self.authors
39
+ # So no one will ever forget your contribution to pantograph :) You are awesome btw!
40
+ ['johnknapprs']
41
+ end
42
+
43
+ def self.is_supported?(platform)
44
+ true
45
+ end
46
+
47
+ # Is printed out in the Steps: output in the terminal
48
+ # Return nil if you don't want any logging in the terminal/JUnit Report
49
+ def self.step_text
50
+ self.action_name
51
+ end
52
+
53
+ # Returns an array of string of sample usage of this action
54
+ def self.example_code
55
+ [
56
+ 'if is_verbose?
57
+ UI.important("Verbosity is turned on!")
58
+ else
59
+ UI.message("Verbosity is turned off!")
60
+ end
61
+ '
62
+
63
+ ]
64
+ end
65
+
66
+ def category
67
+ # Available Categories: ./pantograph/lib/pantograph/action.rb
68
+ :misc
69
+ end
70
+
71
+ # If category == :deprecated, uncomment to include a message for user
72
+ # def self.deprecated_notes
73
+ # nil
74
+ # end
75
+ end
76
+ end
77
+ end