pantograph 0.1.14 → 0.1.15

Sign up to get free protection for your applications and to get access to all the features.
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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 34956aca404ca67cbc3a8f5e2a8c1d5ae75407974697851c98849db6725d28d7
4
- data.tar.gz: 7ae671c2a4ed20ff2f193709bde6f824d75927348062db003b8c819aef86b2f0
3
+ metadata.gz: f3aaf63f4f502ed686b74bbf229d968123d9314cf79cbcf8ddd21d7eee6711f8
4
+ data.tar.gz: fd29fd8ebba2bb912cc723022dd16326e91db6993e0c8060f112b14b6cf0fce0
5
5
  SHA512:
6
- metadata.gz: 747e3fcba2656ec3a230ab282a7effd7ed1885f048d6dd367f20408eecef443be292fe5ad5ad03e2af2b889c673caff1ccbf9534f869c7b2ca95ac087e9b14ee
7
- data.tar.gz: e41179d1c3aea5f90131d3513aff1e480ae6a6c4933dcfd62185733106adda32835b8d339b818a9e2150fb71ba0895b329b5e339c6747ba379a7d7c4910948d8
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/pantograph/pantograph)
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(key: :api_token,
37
- env_name: '[[NAME_UP]]_API_TOKEN', # The name of the environment variable
38
- description: 'API Token for [[NAME_CLASS]]', # a short description of this parameter
39
- verify_block: proc do |value|
40
- unless (value and not value.empty?)
41
- UI.user_error!('No API token for [[NAME_CLASS]] given, pass using `api_token: "token"`')
42
- end
43
- end),
44
- PantographCore::ConfigItem.new(key: :development,
45
- env_name: '[[NAME_UP]]_DEVELOPMENT',
46
- description: 'Create a development certificate instead of a distribution one',
47
- is_string: false, # true: verifies the input is a string, false: every kind of value
48
- default_value: false) # the default value if the user didn't provide one
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
- :undefined
106
+ :misc
103
107
  end
104
108
 
105
109
  # If category == :deprecated, uncomment to include a message for user
@@ -112,7 +112,7 @@ module Pantograph
112
112
 
113
113
  # Documentation category, available values defined in AVAILABLE_CATEGORIES
114
114
  def self.category
115
- :undefined
115
+ :misc
116
116
  end
117
117
 
118
118
  # instead of "AddGitAction", this will return "add_git" to print it to the user
@@ -25,7 +25,7 @@ module Pantograph
25
25
  return Pantograph.const_get(plugin_name.pantograph_class)::VERSION
26
26
  rescue => ex
27
27
  UI.verbose(ex)
28
- return "undefined"
28
+ return 'undefined'
29
29
  end
30
30
  end
31
31
 
@@ -1,9 +1,9 @@
1
1
  module Pantograph
2
2
  module Actions
3
3
  module SharedValues
4
- LANE_NAME = :LANE_NAME
4
+ LANE_NAME = :LANE_NAME
5
5
  PLATFORM_NAME = :PLATFORM_NAME
6
- ENVIRONMENT = :ENVIRONMENT
6
+ ENVIRONMENT = :ENVIRONMENT
7
7
  end
8
8
 
9
9
  def self.reset_aliases
@@ -65,90 +65,126 @@ module Pantograph
65
65
 
66
66
  def self.available_options
67
67
  [
68
- PantographCore::ConfigItem.new(key: :binstubs,
69
- env_name: 'BUNDLE_INSTALL_BINSTUBS',
70
- description: 'Generate bin stubs for bundled gems to ./bin',
71
- optional: true),
72
- PantographCore::ConfigItem.new(key: :clean,
73
- env_name: 'BUNDLE_INSTALL_CLEAN',
74
- description: 'Run bundle clean automatically after install',
75
- is_string: false,
76
- default_value: false),
77
- PantographCore::ConfigItem.new(key: :full_index,
78
- env_name: 'BUNDLE_INSTALL_FULL_INDEX',
79
- description: 'Use the rubygems modern index instead of the API endpoint',
80
- is_string: false,
81
- default_value: false),
82
- PantographCore::ConfigItem.new(key: :gemfile,
83
- env_name: 'BUNDLE_INSTALL_GEMFILE',
84
- description: 'Use the specified gemfile instead of Gemfile',
85
- optional: true),
86
- PantographCore::ConfigItem.new(key: :jobs,
87
- env_name: 'BUNDLE_INSTALL_JOBS',
88
- description: 'Install gems using parallel workers',
89
- is_string: false,
90
- type: Boolean,
91
- optional: true),
92
- PantographCore::ConfigItem.new(key: :local,
93
- env_name: 'BUNDLE_INSTALL_LOCAL',
94
- description: 'Do not attempt to fetch gems remotely and use the gem cache instead',
95
- is_string: false,
96
- default_value: false),
97
- PantographCore::ConfigItem.new(key: :deployment,
98
- env_name: 'BUNDLE_INSTALL_DEPLOYMENT',
99
- description: 'Install using defaults tuned for deployment and CI environments',
100
- is_string: false,
101
- default_value: false),
102
- PantographCore::ConfigItem.new(key: :no_cache,
103
- env_name: 'BUNDLE_INSTALL_NO_CACHE',
104
- description: "Don't update the existing gem cache",
105
- is_string: false,
106
- default_value: false),
107
- PantographCore::ConfigItem.new(key: :no_prune,
108
- env_name: 'BUNDLE_INSTALL_NO_PRUNE',
109
- description: "Don't remove stale gems from the cache",
110
- is_string: false,
111
- default_value: false),
112
- PantographCore::ConfigItem.new(key: :path,
113
- env_name: 'BUNDLE_INSTALL_PATH',
114
- 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',
115
- optional: true),
116
- PantographCore::ConfigItem.new(key: :system,
117
- env_name: 'BUNDLE_INSTALL_SYSTEM',
118
- description: 'Install to the system location ($BUNDLE_PATH or $GEM_HOME) even if the bundle was previously installed somewhere else for this application',
119
- is_string: false,
120
- default_value: false),
121
- PantographCore::ConfigItem.new(key: :quiet,
122
- env_name: 'BUNDLE_INSTALL_QUIET',
123
- description: 'Only output warnings and errors',
124
- is_string: false,
125
- default_value: false),
126
- PantographCore::ConfigItem.new(key: :retry,
127
- env_name: 'BUNDLE_INSTALL_RETRY',
128
- description: 'Retry network and git requests that have failed',
129
- is_string: false,
130
- type: Boolean,
131
- optional: true),
132
- PantographCore::ConfigItem.new(key: :shebang,
133
- env_name: 'BUNDLE_INSTALL_SHEBANG',
134
- description: "Specify a different shebang executable name than the default (usually 'ruby')",
135
- optional: true),
136
- PantographCore::ConfigItem.new(key: :standalone,
137
- env_name: 'BUNDLE_INSTALL_STANDALONE',
138
- description: 'Make a bundle that can work without the Bundler runtime',
139
- optional: true),
140
- PantographCore::ConfigItem.new(key: :trust_policy,
141
- env_name: 'BUNDLE_INSTALL_TRUST_POLICY',
142
- description: 'Sets level of security when dealing with signed gems. Accepts `LowSecurity`, `MediumSecurity` and `HighSecurity` as values',
143
- optional: true),
144
- PantographCore::ConfigItem.new(key: :without,
145
- env_name: 'BUNDLE_INSTALL_WITHOUT',
146
- description: 'Exclude gems that are part of the specified named group',
147
- optional: true),
148
- PantographCore::ConfigItem.new(key: :with,
149
- env_name: 'BUNDLE_INSTALL_WITH',
150
- description: 'Include gems that are part of the specified named group',
151
- optional: true)
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
- cloc_binary = params[:binary_path]
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
- command = [
13
- cloc_binary,
14
- exclude_dirs,
15
- '--by-file',
16
- xml_format ? '--xml ' : '',
17
- "--out=#{output_file}",
18
- source_directory
19
- ].join(' ').strip
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(command)
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 SLOC report that the Jenkins SLOCCount plugin can read.',
31
- 'See [https://wiki.jenkins-ci.org/display/JENKINS/SLOCCount+Plugin](https://wiki.jenkins-ci.org/display/JENKINS/SLOCCount+Plugin) and [https://github.com/AlDanial/cloc](https://github.com/AlDanial/cloc) for more information.'
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(key: :binary_path,
38
- env_name: 'CLOC_BINARY_PATH',
39
- description: 'Where the cloc binary lives on your system (full path including "cloc")',
40
- optional: true,
41
- type: String,
42
- default_value: '/usr/local/bin/cloc'),
43
- PantographCore::ConfigItem.new(key: :exclude_dir,
44
- env_name: 'CLOC_EXCLUDE_DIR',
45
- description: 'Comma separated list of directories to exclude', # a short description of this parameter
46
- optional: true,
47
- type: String),
48
- PantographCore::ConfigItem.new(key: :output_directory,
49
- env_name: 'CLOC_OUTPUT_DIRECTORY',
50
- description: 'Where to put the generated report file',
51
- type: String,
52
- default_value: "build"),
53
- PantographCore::ConfigItem.new(key: :source_directory,
54
- env_name: 'CLOC_SOURCE_DIRECTORY',
55
- description: 'Where to look for the source code (relative to the project root folder)',
56
- type: String,
57
- default_value: ''),
58
- PantographCore::ConfigItem.new(key: :xml,
59
- env_name: 'CLOC_XML',
60
- description: 'Should we generate an XML File (if false, it will generate a plain text file)?',
61
- is_string: false,
62
- default_value: true)
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
- ['intere']
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
- 'cloc(
77
- exclude_dir: "ThirdParty,Resources",
78
- output_directory: "reports",
79
- source_directory: "MyCoolApp"
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: "pantograph/pantograph",
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"