pantograph 0.1.14 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/pantograph/lib/assets/custom_action_template.rb +18 -14
- data/pantograph/lib/pantograph/action.rb +1 -1
- data/pantograph/lib/pantograph/action_collector.rb +1 -1
- data/pantograph/lib/pantograph/actions/actions_helper.rb +2 -2
- data/pantograph/lib/pantograph/actions/bundle_install.rb +120 -84
- data/pantograph/lib/pantograph/actions/cloc.rb +64 -49
- data/pantograph/lib/pantograph/actions/create_pull_request.rb +1 -1
- data/pantograph/lib/pantograph/actions/danger.rb +103 -82
- data/pantograph/lib/pantograph/actions/debug.rb +2 -2
- data/pantograph/lib/pantograph/actions/default_platform.rb +5 -3
- data/pantograph/lib/pantograph/actions/download.rb +10 -9
- data/pantograph/lib/pantograph/actions/echo.rb +1 -1
- data/pantograph/lib/pantograph/actions/ensure_bundle_exec.rb +18 -10
- data/pantograph/lib/pantograph/actions/ensure_env_vars.rb +16 -17
- data/pantograph/lib/pantograph/actions/ensure_git_branch.rb +14 -14
- data/pantograph/lib/pantograph/actions/ensure_git_status_clean.rb +18 -34
- data/pantograph/lib/pantograph/actions/get_github_release.rb +1 -1
- data/pantograph/lib/pantograph/actions/git_branch.rb +6 -7
- data/pantograph/lib/pantograph/actions/git_commit.rb +21 -13
- data/pantograph/lib/pantograph/actions/git_pull.rb +4 -23
- data/pantograph/lib/pantograph/actions/git_pull_tags.rb +31 -0
- data/pantograph/lib/pantograph/actions/git_submodule_update.rb +23 -16
- data/pantograph/lib/pantograph/actions/git_tag_exists.rb +21 -25
- data/pantograph/lib/pantograph/actions/gradle.rb +82 -58
- data/pantograph/lib/pantograph/actions/import.rb +1 -1
- data/pantograph/lib/pantograph/actions/import_from_git.rb +48 -31
- data/pantograph/lib/pantograph/actions/is_ci.rb +1 -1
- data/pantograph/lib/pantograph/actions/is_verbose.rb +77 -0
- data/pantograph/lib/pantograph/actions/jira.rb +50 -55
- data/pantograph/lib/pantograph/actions/lane_context.rb +6 -6
- data/pantograph/lib/pantograph/actions/last_git_commit.rb +3 -3
- data/pantograph/lib/pantograph/actions/min_pantograph_version.rb +19 -25
- data/pantograph/lib/pantograph/actions/number_of_commits.rb +34 -30
- data/pantograph/lib/pantograph/actions/opt_out_usage.rb +15 -9
- data/pantograph/lib/pantograph/actions/pantograph_version.rb +2 -2
- data/pantograph/lib/pantograph/actions/println.rb +1 -1
- data/pantograph/lib/pantograph/actions/prompt.rb +31 -22
- data/pantograph/lib/pantograph/actions/prompt_secure.rb +128 -0
- data/pantograph/lib/pantograph/actions/reset_git_repo.rb +1 -1
- data/pantograph/lib/pantograph/actions/set_github_release.rb +4 -4
- data/pantograph/lib/pantograph/actions/sh.rb +3 -3
- data/pantograph/lib/pantograph/commands_generator.rb +1 -1
- data/pantograph/lib/pantograph/helper/git_helper.rb +29 -0
- data/pantograph/lib/pantograph/lane_manager.rb +1 -1
- data/pantograph/lib/pantograph/pant_file.rb +22 -16
- data/pantograph/lib/pantograph/plugins/template/README.md.erb +1 -1
- data/pantograph/lib/pantograph/setup/setup.rb +6 -17
- data/pantograph/lib/pantograph/version.rb +1 -1
- data/pantograph_core/lib/pantograph_core/configuration/commander_generator.rb +1 -1
- data/pantograph_core/lib/pantograph_core/globals.rb +1 -2
- data/pantograph_core/lib/pantograph_core/helper.rb +19 -6
- data/pantograph_core/lib/pantograph_core/ui/implementations/shell.rb +1 -4
- metadata +19 -5
- data/pantograph/lib/pantograph/actions/git_add.rb +0 -93
- data/pantograph/lib/pantograph/actions/make_changelog_from_jenkins.rb +0 -81
- data/pantograph/lib/pantograph/actions/nexus_upload.rb +0 -230
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3aaf63f4f502ed686b74bbf229d968123d9314cf79cbcf8ddd21d7eee6711f8
|
4
|
+
data.tar.gz: fd29fd8ebba2bb912cc723022dd16326e91db6993e0c8060f112b14b6cf0fce0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a87ad0772ab91d607b4ee1d5ad915c6b58adcc7b0854de80ebfa45085d00ae41b43a5be84acc141bc9a9c2f69c9eef8aae0dd8f331bd9db1f328745fcd0aff6a
|
7
|
+
data.tar.gz: b2e1e20f381ec260708b069fada78968b74bc31638a13979a58761622326fb565acff10387bde640a977cbbcd860ad40f3e0863e558389586fdb097fae50cc4d
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
[![Twitter: @PantographTools](https://img.shields.io/badge/contact-@PantographTools-blue.svg?style=flat)](https://twitter.com/PantographTools)
|
11
11
|
[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/johnknapprs/pantograph/blob/master/LICENSE)
|
12
12
|
[![Gem](https://img.shields.io/gem/v/pantograph.svg?style=flat)](https://rubygems.org/gems/pantograph)
|
13
|
-
[![Build Status](https://img.shields.io/circleci/project/github/johnknapprs/pantograph/master.svg)](https://circleci.com/gh/
|
13
|
+
[![Build Status](https://img.shields.io/circleci/project/github/johnknapprs/pantograph/master.svg)](https://circleci.com/gh/johnknapprs/pantograph)
|
14
14
|
[![PRs welcome!](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/johnknapprs/pantograph/blob/master/CONTRIBUTING.md)
|
15
15
|
|
16
16
|
_pantograph_ is a tool for iOS and Android developers to automate tedious tasks like generating screenshots, dealing with provisioning profiles, and releasing your application.
|
@@ -33,19 +33,23 @@ module Pantograph
|
|
33
33
|
|
34
34
|
# Below a few examples
|
35
35
|
[
|
36
|
-
PantographCore::ConfigItem.new(
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
36
|
+
PantographCore::ConfigItem.new(
|
37
|
+
key: :api_token,
|
38
|
+
env_name: '[[NAME_UP]]_API_TOKEN', # The name of the environment variable
|
39
|
+
description: 'API Token for [[NAME_CLASS]]', # a short description of this parameter
|
40
|
+
verify_block: proc do |value|
|
41
|
+
unless (value and not value.empty?)
|
42
|
+
UI.user_error!('No API token for [[NAME_CLASS]] given, pass using `api_token: "token"`')
|
43
|
+
end
|
44
|
+
end
|
45
|
+
),
|
46
|
+
PantographCore::ConfigItem.new(
|
47
|
+
key: :development,
|
48
|
+
env_name: '[[NAME_UP]]_DEVELOPMENT',
|
49
|
+
description: 'Create a development certificate instead of a distribution one',
|
50
|
+
is_string: false, # true: verifies the input is a string, false: every kind of value
|
51
|
+
default_value: false # the default value if the user didn't provide one
|
52
|
+
)
|
49
53
|
]
|
50
54
|
end
|
51
55
|
|
@@ -99,7 +103,7 @@ module Pantograph
|
|
99
103
|
|
100
104
|
def category
|
101
105
|
# Available Categories: ./pantograph/lib/pantograph/action.rb
|
102
|
-
:
|
106
|
+
:misc
|
103
107
|
end
|
104
108
|
|
105
109
|
# If category == :deprecated, uncomment to include a message for user
|
@@ -65,90 +65,126 @@ module Pantograph
|
|
65
65
|
|
66
66
|
def self.available_options
|
67
67
|
[
|
68
|
-
PantographCore::ConfigItem.new(
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
PantographCore::ConfigItem.new(
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
PantographCore::ConfigItem.new(
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
PantographCore::ConfigItem.new(
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
68
|
+
PantographCore::ConfigItem.new(
|
69
|
+
key: :binstubs,
|
70
|
+
env_name: 'BUNDLE_INSTALL_BINSTUBS',
|
71
|
+
description: 'Generate bin stubs for bundled gems to ./bin',
|
72
|
+
optional: true
|
73
|
+
),
|
74
|
+
PantographCore::ConfigItem.new(
|
75
|
+
key: :clean,
|
76
|
+
env_name: 'BUNDLE_INSTALL_CLEAN',
|
77
|
+
description: 'Run bundle clean automatically after install',
|
78
|
+
is_string: false,
|
79
|
+
default_value: false
|
80
|
+
),
|
81
|
+
PantographCore::ConfigItem.new(
|
82
|
+
key: :full_index,
|
83
|
+
env_name: 'BUNDLE_INSTALL_FULL_INDEX',
|
84
|
+
description: 'Use the rubygems modern index instead of the API endpoint',
|
85
|
+
is_string: false,
|
86
|
+
default_value: false
|
87
|
+
),
|
88
|
+
PantographCore::ConfigItem.new(
|
89
|
+
key: :gemfile,
|
90
|
+
env_name: 'BUNDLE_INSTALL_GEMFILE',
|
91
|
+
description: 'Use the specified gemfile instead of Gemfile',
|
92
|
+
optional: true
|
93
|
+
),
|
94
|
+
PantographCore::ConfigItem.new(
|
95
|
+
key: :jobs,
|
96
|
+
env_name: 'BUNDLE_INSTALL_JOBS',
|
97
|
+
description: 'Install gems using parallel workers',
|
98
|
+
is_string: false,
|
99
|
+
type: Boolean,
|
100
|
+
optional: true
|
101
|
+
),
|
102
|
+
PantographCore::ConfigItem.new(
|
103
|
+
key: :local,
|
104
|
+
env_name: 'BUNDLE_INSTALL_LOCAL',
|
105
|
+
description: 'Do not attempt to fetch gems remotely and use the gem cache instead',
|
106
|
+
is_string: false,
|
107
|
+
default_value: false
|
108
|
+
),
|
109
|
+
PantographCore::ConfigItem.new(
|
110
|
+
key: :deployment,
|
111
|
+
env_name: 'BUNDLE_INSTALL_DEPLOYMENT',
|
112
|
+
description: 'Install using defaults tuned for deployment and CI environments',
|
113
|
+
is_string: false,
|
114
|
+
default_value: false
|
115
|
+
),
|
116
|
+
PantographCore::ConfigItem.new(
|
117
|
+
key: :no_cache,
|
118
|
+
env_name: 'BUNDLE_INSTALL_NO_CACHE',
|
119
|
+
description: "Don't update the existing gem cache",
|
120
|
+
is_string: false,
|
121
|
+
default_value: false
|
122
|
+
),
|
123
|
+
PantographCore::ConfigItem.new(
|
124
|
+
key: :no_prune,
|
125
|
+
env_name: 'BUNDLE_INSTALL_NO_PRUNE',
|
126
|
+
description: "Don't remove stale gems from the cache",
|
127
|
+
is_string: false,
|
128
|
+
default_value: false
|
129
|
+
),
|
130
|
+
PantographCore::ConfigItem.new(
|
131
|
+
key: :path,
|
132
|
+
env_name: 'BUNDLE_INSTALL_PATH',
|
133
|
+
description: 'Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME). Bundler will remember this value for future installs on this machine',
|
134
|
+
optional: true
|
135
|
+
),
|
136
|
+
PantographCore::ConfigItem.new(
|
137
|
+
key: :system,
|
138
|
+
env_name: 'BUNDLE_INSTALL_SYSTEM',
|
139
|
+
description: 'Install to the system location ($BUNDLE_PATH or $GEM_HOME) even if the bundle was previously installed somewhere else for this application',
|
140
|
+
is_string: false,
|
141
|
+
default_value: false
|
142
|
+
),
|
143
|
+
PantographCore::ConfigItem.new(
|
144
|
+
key: :quiet,
|
145
|
+
env_name: 'BUNDLE_INSTALL_QUIET',
|
146
|
+
description: 'Only output warnings and errors',
|
147
|
+
is_string: false,
|
148
|
+
default_value: false
|
149
|
+
),
|
150
|
+
PantographCore::ConfigItem.new(
|
151
|
+
key: :retry,
|
152
|
+
env_name: 'BUNDLE_INSTALL_RETRY',
|
153
|
+
description: 'Retry network and git requests that have failed',
|
154
|
+
is_string: false,
|
155
|
+
type: Boolean,
|
156
|
+
optional: true
|
157
|
+
),
|
158
|
+
PantographCore::ConfigItem.new(
|
159
|
+
key: :shebang,
|
160
|
+
env_name: 'BUNDLE_INSTALL_SHEBANG',
|
161
|
+
description: "Specify a different shebang executable name than the default (usually 'ruby')",
|
162
|
+
optional: true
|
163
|
+
),
|
164
|
+
PantographCore::ConfigItem.new(
|
165
|
+
key: :standalone,
|
166
|
+
env_name: 'BUNDLE_INSTALL_STANDALONE',
|
167
|
+
description: 'Make a bundle that can work without the Bundler runtime',
|
168
|
+
optional: true
|
169
|
+
),
|
170
|
+
PantographCore::ConfigItem.new(
|
171
|
+
key: :trust_policy,
|
172
|
+
env_name: 'BUNDLE_INSTALL_TRUST_POLICY',
|
173
|
+
description: 'Sets level of security when dealing with signed gems. Accepts `LowSecurity`, `MediumSecurity` and `HighSecurity` as values',
|
174
|
+
optional: true
|
175
|
+
),
|
176
|
+
PantographCore::ConfigItem.new(
|
177
|
+
key: :without,
|
178
|
+
env_name: 'BUNDLE_INSTALL_WITHOUT',
|
179
|
+
description: 'Exclude gems that are part of the specified named group',
|
180
|
+
optional: true
|
181
|
+
),
|
182
|
+
PantographCore::ConfigItem.new(
|
183
|
+
key: :with,
|
184
|
+
env_name: 'BUNDLE_INSTALL_WITH',
|
185
|
+
description: 'Include gems that are part of the specified named group',
|
186
|
+
optional: true
|
187
|
+
)
|
152
188
|
]
|
153
189
|
end
|
154
190
|
end
|
@@ -2,23 +2,18 @@ module Pantograph
|
|
2
2
|
module Actions
|
3
3
|
class ClocAction < Action
|
4
4
|
def self.run(params)
|
5
|
-
|
6
|
-
exclude_dirs = params[:exclude_dir].nil? ? '' : "--exclude-dir=#{params[:exclude_dir]}"
|
7
|
-
xml_format = params[:xml]
|
8
|
-
out_dir = params[:output_directory]
|
9
|
-
output_file = xml_format ? "#{out_dir}/cloc.xml" : "#{out_dir}/cloc.txt"
|
10
|
-
source_directory = params[:source_directory]
|
5
|
+
output_type = params[:output_type]
|
11
6
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
7
|
+
cloc_cmd = []
|
8
|
+
cloc_cmd << params[:binary_path]
|
9
|
+
cloc_cmd << params[:source_directory]
|
10
|
+
cloc_cmd << "--exclude-dir=#{params[:exclude_dir]}" if params[:exclude_dir]
|
11
|
+
cloc_cmd << '--by-file' if params[:list_each_file]
|
12
|
+
cloc_cmd << "--#{output_type}"
|
13
|
+
cloc_cmd << "--report-file=#{params[:output_directory]}/cloc.#{output_type}"
|
14
|
+
cloc_cmd = cloc_cmd.join(' ').strip
|
20
15
|
|
21
|
-
Actions.sh(
|
16
|
+
Actions.sh(cloc_cmd)
|
22
17
|
end
|
23
18
|
|
24
19
|
def self.description
|
@@ -27,44 +22,61 @@ module Pantograph
|
|
27
22
|
|
28
23
|
def self.details
|
29
24
|
[
|
30
|
-
'This action will run cloc to generate a
|
31
|
-
'See [https://
|
25
|
+
'This action will run cloc to generate a code count report',
|
26
|
+
'See [https://github.com/AlDanial/cloc](https://github.com/AlDanial/cloc) for more information.'
|
32
27
|
].join("\n")
|
33
28
|
end
|
34
29
|
|
35
30
|
def self.available_options
|
36
31
|
[
|
37
|
-
PantographCore::ConfigItem.new(
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
32
|
+
PantographCore::ConfigItem.new(
|
33
|
+
key: :binary_path,
|
34
|
+
env_name: 'CLOC_BINARY_PATH',
|
35
|
+
description: 'Where the cloc binary lives on your system (full path including "cloc")',
|
36
|
+
optional: true,
|
37
|
+
is_string: true,
|
38
|
+
default_value: '/usr/local/bin/cloc'
|
39
|
+
),
|
40
|
+
PantographCore::ConfigItem.new(
|
41
|
+
key: :exclude_dir,
|
42
|
+
env_name: 'CLOC_EXCLUDE_DIR',
|
43
|
+
description: 'Comma separated list of directories to exclude',
|
44
|
+
optional: true,
|
45
|
+
is_string: true
|
46
|
+
),
|
47
|
+
PantographCore::ConfigItem.new(
|
48
|
+
key: :source_directory,
|
49
|
+
env_name: 'CLOC_SOURCE_DIRECTORY',
|
50
|
+
description: 'Starting point for Cloc analysis',
|
51
|
+
is_string: true,
|
52
|
+
default_value: '.'
|
53
|
+
),
|
54
|
+
PantographCore::ConfigItem.new(
|
55
|
+
key: :output_directory,
|
56
|
+
env_name: 'CLOC_OUTPUT_DIRECTORY',
|
57
|
+
description: 'Where to put the generated report file',
|
58
|
+
is_string: true,
|
59
|
+
default_value: 'pantograph/reports'
|
60
|
+
),
|
61
|
+
PantographCore::ConfigItem.new(
|
62
|
+
key: :output_type,
|
63
|
+
env_name: 'CLOC_OUTPUT_TYPE',
|
64
|
+
description: 'Output file type: xml, yaml, cvs, json',
|
65
|
+
is_string: true,
|
66
|
+
default_value: 'yaml'
|
67
|
+
),
|
68
|
+
PantographCore::ConfigItem.new(
|
69
|
+
key: :list_each_file,
|
70
|
+
env_name: 'CLOC_LIST_EACH_FILE',
|
71
|
+
description: 'List each individual file in cloc report',
|
72
|
+
is_string: false,
|
73
|
+
default_value: true
|
74
|
+
)
|
63
75
|
]
|
64
76
|
end
|
65
77
|
|
66
78
|
def self.authors
|
67
|
-
['
|
79
|
+
['johnknapprs']
|
68
80
|
end
|
69
81
|
|
70
82
|
def self.is_supported?(platform)
|
@@ -73,11 +85,14 @@ module Pantograph
|
|
73
85
|
|
74
86
|
def self.example_code
|
75
87
|
[
|
76
|
-
'
|
77
|
-
|
78
|
-
|
79
|
-
source_directory: "
|
80
|
-
|
88
|
+
' # Generate JSON report of project code count
|
89
|
+
cloc(
|
90
|
+
exclude_dir: "build",
|
91
|
+
source_directory: ".",
|
92
|
+
output_directory: "pantograph/reports",
|
93
|
+
output_type: "json"
|
94
|
+
)
|
95
|
+
'
|
81
96
|
]
|
82
97
|
end
|
83
98
|
|
@@ -172,7 +172,7 @@ module Pantograph
|
|
172
172
|
[
|
173
173
|
'create_pull_request(
|
174
174
|
api_token: "secret", # optional, defaults to ENV["GITHUB_API_TOKEN"]
|
175
|
-
repo: "
|
175
|
+
repo: "johnknapprs/pantograph",
|
176
176
|
title: "Amazing new feature",
|
177
177
|
head: "my-feature", # optional, defaults to current branch name
|
178
178
|
base: "master", # optional, defaults to "master"
|