pantograph 0.1.4 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -127
  3. data/pantograph/README.md +2 -2
  4. data/pantograph/lib/assets/ActionDetails.md.erb +1 -1
  5. data/pantograph/lib/assets/DefaultPantfileTemplate +18 -5
  6. data/pantograph/lib/pantograph/action_collector.rb +1 -1
  7. data/pantograph/lib/pantograph/actions/actions_helper.rb +2 -2
  8. data/pantograph/lib/pantograph/actions/clipboard.rb +1 -1
  9. data/pantograph/lib/pantograph/actions/lane_context.rb +1 -1
  10. data/pantograph/lib/pantograph/actions/opt_out_usage.rb +1 -1
  11. data/pantograph/lib/pantograph/actions/sh.rb +1 -1
  12. data/pantograph/lib/pantograph/actions/sonar.rb +1 -1
  13. data/pantograph/lib/pantograph/actions/update_pantograph.rb +1 -1
  14. data/pantograph/lib/pantograph/cli_tools_distributor.rb +2 -2
  15. data/pantograph/lib/pantograph/documentation/actions_list.rb +1 -1
  16. data/pantograph/lib/pantograph/documentation/docs_generator.rb +7 -2
  17. data/pantograph/lib/pantograph/pant_file.rb +4 -4
  18. data/pantograph/lib/pantograph/plugins/plugin_manager.rb +1 -1
  19. data/pantograph/lib/pantograph/plugins/template/README.md.erb +2 -2
  20. data/pantograph/lib/pantograph/plugins/template/lib/pantograph/plugin/%plugin_name%/actions/%plugin_name%_action.rb.erb +1 -1
  21. data/pantograph/lib/pantograph/runner.rb +1 -1
  22. data/pantograph/lib/pantograph/setup/setup.rb +28 -64
  23. data/pantograph/lib/pantograph/setup/setup_angular.rb +58 -0
  24. data/pantograph/lib/pantograph/setup/setup_generic.rb +58 -0
  25. data/pantograph/lib/pantograph/setup/setup_gradle.rb +11 -12
  26. data/pantograph/lib/pantograph/setup/setup_maven.rb +58 -0
  27. data/pantograph/lib/pantograph/version.rb +1 -1
  28. data/pantograph_core/lib/pantograph_core/analytics/analytics_ingester_client.rb +1 -1
  29. data/pantograph_core/lib/pantograph_core/analytics/analytics_session.rb +1 -1
  30. data/pantograph_core/lib/pantograph_core/configuration/configuration.rb +1 -1
  31. data/pantograph_core/lib/pantograph_core/helper.rb +1 -1
  32. data/pantograph_core/lib/pantograph_core/keychain_importer.rb +2 -2
  33. data/pantograph_core/lib/pantograph_core/module.rb +1 -1
  34. data/pantograph_core/lib/pantograph_core/ui/pantograph_runner.rb +2 -2
  35. metadata +6 -4
  36. data/pantograph/lib/pantograph/setup/setup_ios.rb +0 -412
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fa63e4bcf142d879063c849efa0df0d4b79def4b948a51cdeb19d429e4fb82f
4
- data.tar.gz: 35a92c277418bba69c250663f2268e58e76f25fe681d13ed6ee079ed5138e51a
3
+ metadata.gz: d7177f398c41a502417f9a672772b8dedb319616f064d6bcfa7676c0b2d1a5a3
4
+ data.tar.gz: b8446cb22d1bd65e02654b09af9a44e711e4178015054c66fcac09f781c39333
5
5
  SHA512:
6
- metadata.gz: 731663c622c10f8394533123b50721b1ab50bb889c66ba404ef2cafc29df42a7f978630305cc8cf34c876de094843d9f5a27ee3bcdbae0f6cdbfd05955c1cbf0
7
- data.tar.gz: 9b30d85754ad8aa6c4aab67ab414eba62370f991f3930e6501c1565eaff3157a9213d91fb5c6db2d38f3daa3d1fef66a1e47920da0a9ff4c65d1a51baecf9127
6
+ metadata.gz: deb2c83f7f39bcd8ce248f9b732a298e8b7bf82aface23a2d0e32f537be720bafb13e5dfa7fab20aed8d0d219179aa06ea37d8ed61ffda4ebd4d543ffaf05020
7
+ data.tar.gz: 9a57635c092686e1d3f557caee8a626412dfcf440af18a395fd5b9e03cc18542b6a8bf1c61e91be736565d315fcc1f564f9739d550835bbedbfe06ee1af4aa5a
data/README.md CHANGED
@@ -16,7 +16,7 @@ _pantograph_ is a tool for iOS and Android developers to automate tedious tasks
16
16
 
17
17
  <hr />
18
18
  <h2 align="center">
19
- ✨ All pantograph docs were moved to <a href="https://docs.pantograph.tools/">docs.pantograph.tools</a> ✨
19
+ ✨ All pantograph docs were moved to <a href="https://johnknapprs.github.io/pantograph/">johnknapprs.github.io/pantograph</a> ✨
20
20
  </h2>
21
21
  <hr />
22
22
 
@@ -24,7 +24,7 @@ _pantograph_ is a tool for iOS and Android developers to automate tedious tasks
24
24
 
25
25
  Before submitting a new GitHub issue, please make sure to
26
26
 
27
- - Check out [docs.pantograph.tools](https://docs.pantograph.tools)
27
+ - Check out [johnknapprs.github.io/pantograph](https://johnknapprs.github.io/pantograph)
28
28
  - Search for [existing GitHub issues](https://github.com/pantograph/pantograph/issues)
29
29
 
30
30
  If the above doesn't help, please [submit an issue](https://github.com/pantograph/pantograph/issues) on GitHub and provide information about your setup, in particular the output of the `pantograph env` command.
@@ -36,131 +36,11 @@ If the above doesn't help, please [submit an issue](https://github.com/pantograp
36
36
  <!-- This table is regenerated and resorted on each release -->
37
37
  <table id='team'>
38
38
  <tr>
39
- <td id='helmut-januschka'>
40
- <a href='https://github.com/hjanuschka'>
41
- <img src='https://github.com/hjanuschka.png?size=140'>
39
+ <td id='john knapp'>
40
+ <a href='https://github.com/johnknapprs'>
41
+ <img src='https://github.com/johnknapprs.png?size=140'>
42
42
  </a>
43
- <h4 align='center'><a href='https://twitter.com/hjanuschka'>Helmut Januschka</a></h4>
44
- </td>
45
- <td id='manu-wallner'>
46
- <a href='https://github.com/milch'>
47
- <img src='https://github.com/milch.png?size=140'>
48
- </a>
49
- <h4 align='center'><a href='https://twitter.com/acrooow'>Manu Wallner</a></h4>
50
- </td>
51
- <td id='aaron-brager'>
52
- <a href='https://github.com/getaaron'>
53
- <img src='https://github.com/getaaron.png?size=140'>
54
- </a>
55
- <h4 align='center'><a href='https://twitter.com/getaaron'>Aaron Brager</a></h4>
56
- </td>
57
- <td id='matthew-ellis'>
58
- <a href='https://github.com/matthewellis'>
59
- <img src='https://github.com/matthewellis.png?size=140'>
60
- </a>
61
- <h4 align='center'><a href='https://twitter.com/mellis1995'>Matthew Ellis</a></h4>
62
- </td>
63
- <td id='olivier-halligon'>
64
- <a href='https://github.com/AliSoftware'>
65
- <img src='https://github.com/AliSoftware.png?size=140'>
66
- </a>
67
- <h4 align='center'><a href='https://twitter.com/aligatr'>Olivier Halligon</a></h4>
68
- </td>
69
- </tr>
70
- <tr>
71
- <td id='kohki-miki'>
72
- <a href='https://github.com/giginet'>
73
- <img src='https://github.com/giginet.png?size=140'>
74
- </a>
75
- <h4 align='center'><a href='https://twitter.com/giginet'>Kohki Miki</a></h4>
76
- </td>
77
- <td id='luka-mirosevic'>
78
- <a href='https://github.com/lmirosevic'>
79
- <img src='https://github.com/lmirosevic.png?size=140'>
80
- </a>
81
- <h4 align='center'><a href='https://twitter.com/lmirosevic'>Luka Mirosevic</a></h4>
82
- </td>
83
- <td id='josh-holtz'>
84
- <a href='https://github.com/joshdholtz'>
85
- <img src='https://github.com/joshdholtz.png?size=140'>
86
- </a>
87
- <h4 align='center'><a href='https://twitter.com/joshdholtz'>Josh Holtz</a></h4>
88
- </td>
89
- <td id='joshua-liebowitz'>
90
- <a href='https://github.com/taquitos'>
91
- <img src='https://github.com/taquitos.png?size=140'>
92
- </a>
93
- <h4 align='center'><a href='https://twitter.com/taquitos'>Joshua Liebowitz</a></h4>
94
- </td>
95
- <td id='jan-piotrowski'>
96
- <a href='https://github.com/janpio'>
97
- <img src='https://github.com/janpio.png?size=140'>
98
- </a>
99
- <h4 align='center'><a href='https://twitter.com/Sujan'>Jan Piotrowski</a></h4>
100
- </td>
101
- </tr>
102
- <tr>
103
- <td id='fumiya-nakamura'>
104
- <a href='https://github.com/nafu'>
105
- <img src='https://github.com/nafu.png?size=140'>
106
- </a>
107
- <h4 align='center'><a href='https://twitter.com/nafu003'>Fumiya Nakamura</a></h4>
108
- </td>
109
- <td id='jorge-revuelta-h'>
110
- <a href='https://github.com/minuscorp'>
111
- <img src='https://github.com/minuscorp.png?size=140'>
112
- </a>
113
- <h4 align='center'><a href='https://twitter.com/minuscorp'>Jorge Revuelta H</a></h4>
114
- </td>
115
- <td id='jimmy-dee'>
116
- <a href='https://github.com/jdee'>
117
- <img src='https://github.com/jdee.png?size=140'>
118
- </a>
119
- <h4 align='center'>Jimmy Dee</h4>
120
- </td>
121
- <td id='stefan-natchev'>
122
- <a href='https://github.com/snatchev'>
123
- <img src='https://github.com/snatchev.png?size=140'>
124
- </a>
125
- <h4 align='center'><a href='https://twitter.com/snatchev'>Stefan Natchev</a></h4>
126
- </td>
127
- <td id='danielle-tomlinson'>
128
- <a href='https://github.com/endocrimes'>
129
- <img src='https://github.com/endocrimes.png?size=140'>
130
- </a>
131
- <h4 align='center'><a href='https://twitter.com/endocrimes'>Danielle Tomlinson</a></h4>
132
- </td>
133
- </tr>
134
- <tr>
135
- <td id='felix-krause'>
136
- <a href='https://github.com/KrauseFx'>
137
- <img src='https://github.com/KrauseFx.png?size=140'>
138
- </a>
139
- <h4 align='center'><a href='https://twitter.com/KrauseFx'>Felix Krause</a></h4>
140
- </td>
141
- <td id='iulian-onofrei'>
142
- <a href='https://github.com/revolter'>
143
- <img src='https://github.com/revolter.png?size=140'>
144
- </a>
145
- <h4 align='center'><a href='https://twitter.com/Revolt666'>Iulian Onofrei</a></h4>
146
- </td>
147
- <td id='jérôme-lacoste'>
148
- <a href='https://github.com/lacostej'>
149
- <img src='https://github.com/lacostej.png?size=140'>
150
- </a>
151
- <h4 align='center'><a href='https://twitter.com/lacostej'>Jérôme Lacoste</a></h4>
152
- </td>
153
- <td id='maksym-grebenets'>
154
- <a href='https://github.com/mgrebenets'>
155
- <img src='https://github.com/mgrebenets.png?size=140'>
156
- </a>
157
- <h4 align='center'><a href='https://twitter.com/mgrebenets'>Maksym Grebenets</a></h4>
158
- </td>
159
- <td id='andrew-mcburney'>
160
- <a href='https://github.com/armcburney'>
161
- <img src='https://github.com/armcburney.png?size=140'>
162
- </a>
163
- <h4 align='center'><a href='https://twitter.com/armcburney'>Andrew McBurney</a></h4>
43
+ <h4 align='center'><a href='https://twitter.com/petrosichor'>Helmut Januschka</a></h4>
164
44
  </td>
165
45
  </tr>
166
46
  </table>
@@ -192,6 +72,6 @@ This project is licensed under the terms of the MIT license. See the [LICENSE](L
192
72
 
193
73
  <hr />
194
74
  <h2 align="center">
195
- ✨ All pantograph docs were moved to <a href="https://docs.pantograph.tools/">docs.pantograph.tools</a> ✨
75
+ ✨ All pantograph docs were moved to <a href="https://johnknapprs.github.io/pantograph/">johnknapprs.github.io/pantograph</a> ✨
196
76
  </h2>
197
77
  <hr />
data/pantograph/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <h3 align="center">
2
- <a href="https://docs.pantograph.tools/">
2
+ <a href="https://johnknapprs.github.io/pantograph/">
3
3
  <img src="https://raw.githubusercontent.com/pantograph/pantograph/master/pantograph/assets/pantograph.png" width="100" />
4
4
  <br />
5
5
  pantograph
@@ -8,4 +8,4 @@
8
8
 
9
9
  ------
10
10
 
11
- <h3 align="center">The <i>pantograph</i> docs were moved to <a href='https://docs.pantograph.tools/'>docs.pantograph.tools</a></h3>
11
+ <h3 align="center">The <i>pantograph</i> docs were moved to <a href='https://johnknapprs.github.io/pantograph/'>johnknapprs.github.io/pantograph</a></h3>
@@ -64,7 +64,7 @@ SharedValue | Description
64
64
  <%- next if array_item.length != 2 -%>
65
65
  `SharedValues::<%= array_item[0] %>` | <%= array_item[1] %>
66
66
  <%- end %>
67
- To get more information check the [Lanes documentation](https://docs.pantograph.tools/advanced/lanes/#lane-context).
67
+ To get more information check the [Lanes documentation](https://johnknapprs.github.io/pantograph/advanced/lanes/#lane-context).
68
68
  <hr />
69
69
  <% end %><%# End of action.output... %>
70
70
 
@@ -1,20 +1,33 @@
1
1
  # This file contains the pantograph.tools configuration
2
- # You can find the documentation at https://docs.pantograph.tools
2
+ # You can find the documentation at https://johnknapprs.github.io/pantograph
3
3
  #
4
4
  # For a list of all available actions, check out
5
5
  #
6
- # https://docs.pantograph.tools/actions
6
+ # https://johnknapprs.github.io/pantograph/actions
7
7
  #
8
8
  # For a list of all available plugins, check out
9
9
  #
10
- # https://docs.pantograph.tools/plugins/available-plugins
10
+ # https://johnknapprs.github.io/pantograph/plugins/available-plugins
11
11
  #
12
12
 
13
13
  # Uncomment the line if you want pantograph to automatically update itself
14
14
  # update_pantograph
15
15
 
16
- default_platform(:ios)
16
+ before_all do |lane|
17
+ # Tasks here execute before every lane called
18
+ end
17
19
 
18
- platform :ios do
19
20
  [[LANES]]
21
+
22
+ after_all do |lane|
23
+ # Tasks here execute after all lanes have been completed
20
24
  end
25
+
26
+ error do |_, error|
27
+ # When a lane fails the `error` lane is triggered
28
+ # Use this space to have Pantograph take action during a failure state
29
+ if is_ci?
30
+ slack(success: false, message: error)
31
+ end
32
+ end
33
+
@@ -1,7 +1,7 @@
1
1
  module Pantograph
2
2
  class ActionCollector
3
3
  def show_message
4
- UI.message("Sending Crash/Success information. Learn more at https://docs.pantograph.tools/#metrics")
4
+ UI.message("Sending Crash/Success information. Learn more at https://johnknapprs.github.io/pantograph/#metrics")
5
5
  UI.message("No personal/sensitive data is sent. Only sharing the following:")
6
6
  UI.message(launches)
7
7
  UI.message(@error) if @error
@@ -130,13 +130,13 @@ module Pantograph
130
130
  UI.success("Successfully loaded custom action '#{file}'.") if PantographCore::Globals.verbose?
131
131
  else
132
132
  UI.error("Could not find method 'run' in class #{class_name}.")
133
- UI.error('For more information, check out the docs: https://docs.pantograph.tools/')
133
+ UI.error('For more information, check out the docs: https://johnknapprs.github.io/pantograph/')
134
134
  UI.user_error!("Action '#{file_name}' is damaged!", show_github_issues: true)
135
135
  end
136
136
  rescue NameError
137
137
  # Action not found
138
138
  UI.error("Could not find '#{class_name}' class defined.")
139
- UI.error('For more information, check out the docs: https://docs.pantograph.tools/')
139
+ UI.error('For more information, check out the docs: https://johnknapprs.github.io/pantograph/')
140
140
  UI.user_error!("Action '#{file_name}' is damaged!", show_github_issues: true)
141
141
  end
142
142
  end
@@ -39,7 +39,7 @@ module Pantograph
39
39
 
40
40
  def self.example_code
41
41
  [
42
- 'clipboard(value: "https://docs.pantograph.tools/")',
42
+ 'clipboard(value: "https://johnknapprs.github.io/pantograph/")',
43
43
  'clipboard(value: lane_context[SharedValues::HOCKEY_DOWNLOAD_LINK] || "")'
44
44
  ]
45
45
  end
@@ -16,7 +16,7 @@ module Pantograph
16
16
  def self.details
17
17
  [
18
18
  "Access the pantograph lane context values.",
19
- "More information about how the lane context works: [https://docs.pantograph.tools/advanced/#lane-context](https://docs.pantograph.tools/advanced/#lane-context)."
19
+ "More information about how the lane context works: [https://johnknapprs.github.io/pantograph/advanced/#lane-context](https://johnknapprs.github.io/pantograph/advanced/#lane-context)."
20
20
  ].join("\n")
21
21
  end
22
22
 
@@ -13,7 +13,7 @@ module Pantograph
13
13
  def self.details
14
14
  [
15
15
  "By default, _pantograph_ will track what actions are being used. No personal/sensitive information is recorded.",
16
- "Learn more at [https://docs.pantograph.tools/#metrics](https://docs.pantograph.tools/#metrics).",
16
+ "Learn more at [https://johnknapprs.github.io/pantograph/#metrics](https://johnknapprs.github.io/pantograph/#metrics).",
17
17
  "Add `opt_out_usage` at the top of your Pantfile to disable metrics collection."
18
18
  ].join("\n")
19
19
  end
@@ -16,7 +16,7 @@ module Pantograph
16
16
  def self.details
17
17
  [
18
18
  "Allows running an arbitrary shell command.",
19
- "Be aware of a specific behavior of `sh` action with regard to the working directory. For details, refer to [Advanced](https://docs.pantograph.tools/advanced/#directory-behavior)."
19
+ "Be aware of a specific behavior of `sh` action with regard to the working directory. For details, refer to [Advanced](https://johnknapprs.github.io/pantograph/advanced/#directory-behavior)."
20
20
  ].join("\n")
21
21
  end
22
22
 
@@ -50,7 +50,7 @@ module Pantograph
50
50
  def self.details
51
51
  [
52
52
  "See [http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner](http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner) for details.",
53
- "It can process unit test results if formatted as junit report as shown in [xctest](https://docs.pantograph.tools/actions/xctest/) action. It can also integrate coverage reports in Cobertura format, which can be transformed into by the [slather](https://docs.pantograph.tools/actions/slather/) action."
53
+ "It can process unit test results if formatted as junit report as shown in [xctest](https://johnknapprs.github.io/pantograph/actions/xctest/) action. It can also integrate coverage reports in Cobertura format, which can be transformed into by the [slather](https://johnknapprs.github.io/pantograph/actions/slather/) action."
54
54
  ].join("\n")
55
55
  end
56
56
 
@@ -31,7 +31,7 @@ module Pantograph
31
31
  UI.important("It seems that your Gem directory is not writable by your current user.")
32
32
  UI.important("pantograph would need sudo rights to update itself, however, running 'sudo pantograph' is not recommended.")
33
33
  UI.important("If you still want to use this action, please read the documentation on how to set this up:")
34
- UI.important("https://docs.pantograph.tools/actions/update_pantograph/")
34
+ UI.important("https://johnknapprs.github.io/pantograph/actions/update_pantograph/")
35
35
  return
36
36
  end
37
37
 
@@ -51,7 +51,7 @@ module Pantograph
51
51
 
52
52
  # Try to check UTF-8 with `locale`, fallback to environment variables
53
53
  unless utf8_locale?
54
- warn = "WARNING: pantograph requires your locale to be set to UTF-8. To learn more go to https://docs.pantograph.tools/getting-started/ios/setup/#set-up-environment-variables"
54
+ warn = "WARNING: pantograph requires your locale to be set to UTF-8. To learn more go to https://johnknapprs.github.io/pantograph/getting-started/ios/setup/#set-up-environment-variables"
55
55
  UI.error(warn)
56
56
  at_exit do
57
57
  # Repeat warning here so users hopefully see it
@@ -163,7 +163,7 @@ module Pantograph
163
163
  UI.message('')
164
164
  UI.important('After creating the Gemfile and Gemfile.lock, commit those files into version control')
165
165
  end
166
- UI.important('Get started using a Gemfile for pantograph https://docs.pantograph.tools/getting-started/ios/setup/#use-a-gemfile')
166
+ UI.important('Get started using a Gemfile for pantograph https://johnknapprs.github.io/pantograph/getting-started/ios/setup/#use-a-gemfile')
167
167
  end
168
168
 
169
169
  # Returns an array of symbols for the available lanes for the Pantfile
@@ -68,7 +68,7 @@ module Pantograph
68
68
  puts("==========================================\n".deprecated)
69
69
  end
70
70
 
71
- puts("More information can be found on https://docs.pantograph.tools/actions/#{filter}")
71
+ puts("More information can be found on https://johnknapprs.github.io/pantograph/actions/#{filter}")
72
72
  puts("")
73
73
  else
74
74
  puts("Couldn't find action for the given filter.".red)
@@ -46,7 +46,7 @@ module Pantograph
46
46
 
47
47
  output << "This README.md is auto-generated and will be re-generated every time [pantograph](https://pantograph.tools) is run."
48
48
  output << "More information about pantograph can be found on [pantograph.tools](https://pantograph.tools)."
49
- output << "The documentation of pantograph can be found on [docs.pantograph.tools](https://docs.pantograph.tools)."
49
+ output << "The documentation of pantograph can be found on [johnknapprs.github.io/pantograph](https://johnknapprs.github.io/pantograph)."
50
50
  output << ""
51
51
 
52
52
  begin
@@ -71,10 +71,15 @@ module Pantograph
71
71
  'Android'
72
72
  when 'mac'
73
73
  'MacOS'
74
+ when 'gradle'
75
+ 'Gradle'
76
+ when 'maven'
77
+ 'Maven'
78
+ when 'angular'
79
+ 'Angular'
74
80
  else
75
81
  pl
76
82
  end
77
-
78
83
  end
79
84
 
80
85
  # @param platform [String]
@@ -362,15 +362,15 @@ module Pantograph
362
362
 
363
363
  def action_launched(action_name)
364
364
  action_launch_context = PantographCore::ActionLaunchContext.context_for_action_name(action_name,
365
- pantograph_client_language: :ruby,
366
- args: ARGV)
365
+ pantograph_client_language: :ruby,
366
+ args: ARGV)
367
367
  PantographCore.session.action_launched(launch_context: action_launch_context)
368
368
  end
369
369
 
370
370
  def action_completed(action_name, status: nil)
371
371
  completion_context = PantographCore::ActionCompletionContext.context_for_action_name(action_name,
372
- args: ARGV,
373
- status: status)
372
+ args: ARGV,
373
+ status: status)
374
374
  PantographCore.session.action_completed(completion_context: completion_context)
375
375
  end
376
376
  end
@@ -9,7 +9,7 @@ module Pantograph
9
9
  AUTOGENERATED_LINE = "# Autogenerated by pantograph\n#\n# Ensure this file is checked in to source control!\n\n"
10
10
  GEMFILE_SOURCE_LINE = "source \"https://rubygems.org\"\n"
11
11
  PANTOGRAPH_PLUGIN_PREFIX = "pantograph-plugin-"
12
- TROUBLESHOOTING_URL = "https://docs.pantograph.tools/plugins/plugins-troubleshooting/"
12
+ TROUBLESHOOTING_URL = "https://johnknapprs.github.io/pantograph/plugins/plugins-troubleshooting/"
13
13
 
14
14
  #####################################################
15
15
  # @!group Reading the files and their paths
@@ -41,11 +41,11 @@ For any other issues and feedback about this plugin, please submit it to this re
41
41
 
42
42
  ## Troubleshooting
43
43
 
44
- If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.pantograph.tools/plugins/plugins-troubleshooting/) guide.
44
+ If you have trouble using plugins, check out the [Plugins Troubleshooting](https://johnknapprs.github.io/pantograph/plugins/plugins-troubleshooting/) guide.
45
45
 
46
46
  ## Using _pantograph_ Plugins
47
47
 
48
- For more information about how the `pantograph` plugin system works, check out the [Plugins documentation](https://docs.pantograph.tools/plugins/create-plugin/).
48
+ For more information about how the `pantograph` plugin system works, check out the [Plugins documentation](https://johnknapprs.github.io/pantograph/plugins/create-plugin/).
49
49
 
50
50
  ## About _pantograph_
51
51
 
@@ -37,7 +37,7 @@ module Pantograph
37
37
 
38
38
  def self.is_supported?(platform)
39
39
  # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
40
- # See: https://docs.pantograph.tools/advanced/#control-configuration-by-lane-and-by-platform
40
+ # See: https://johnknapprs.github.io/pantograph/advanced/#control-configuration-by-lane-and-by-platform
41
41
  #
42
42
  # [:ios, :mac, :android].include?(platform)
43
43
  true
@@ -171,7 +171,7 @@ module Pantograph
171
171
  else
172
172
  # So there is no plugin under that name, so just show the error message generated by the lane switch
173
173
  UI.verbose(caller.join("\n"))
174
- UI.user_error!("Could not find action, lane or variable '#{method_sym}'. Check out the documentation for more details: https://docs.pantograph.tools/actions")
174
+ UI.user_error!("Could not find action, lane or variable '#{method_sym}'. Check out the documentation for more details: https://johnknapprs.github.io/pantograph/actions")
175
175
  end
176
176
  end
177
177
 
@@ -26,7 +26,7 @@ module Pantograph
26
26
  attr_accessor :lane_to_mention
27
27
 
28
28
  # Start the setup process
29
- # rubocop:disable Metrics/BlockNesting
29
+
30
30
  def self.start(user: nil)
31
31
  if PantographCore::PantographFolder.setup? && !Helper.test?
32
32
  require 'pantograph/lane_list'
@@ -35,80 +35,44 @@ module Pantograph
35
35
  UI.important("pantograph is already set up at path `#{PantographCore::PantographFolder.path}`, see the available lanes above")
36
36
  UI.message("")
37
37
 
38
- setup_ios = self.new
39
- setup_ios.add_or_update_gemfile(update_gemfile_if_needed: false)
40
- setup_ios.suggest_next_steps
38
+ setup_generic = self.new
39
+ setup_generic.add_or_update_gemfile(update_gemfile_if_needed: false)
40
+ setup_generic.suggest_next_steps
41
41
  return
42
42
  end
43
43
 
44
44
  # this is used by e.g. configuration.rb to not show warnings when running produce
45
45
  ENV["PANTOGRAPH_ONBOARDING_IN_PROCESS"] = 1.to_s
46
46
 
47
- spinner = TTY::Spinner.new("[:spinner] Looking for iOS and Gradle projects in current directory...", format: :dots)
47
+ spinner = TTY::Spinner.new('[:spinner] Looking for iOS and Gradle projects in current directory...', format: :dots)
48
48
  spinner.auto_spin
49
49
 
50
- maven_projects = Dir["**/pom.xml"]
51
- gradle_projects = Dir["**/*.gradle"] + Dir["**/*.gradle.kts"]
52
-
50
+ maven_projects = Dir["**/pom.xml"]
51
+ gradle_projects = Dir["**/*.gradle"] + Dir["**/*.gradle.kts"]
52
+ angular_projects = Dir['**/package.json']
53
53
  spinner.success
54
54
 
55
55
  PantographCore::PantographFolder.create_folder!
56
56
 
57
- # Currently we prefer iOS app projects, as the `init` process is
58
- # more intelligent and does more things. The user can easily add
59
- # the `:gradle` platform to the resulting Pantfile
60
57
  if maven_projects.count > 0
61
- current_directory = maven_projects.find_all do |current_project_path|
62
- current_project_path.split(File::Separator).count == 1
63
- end
64
- chosen_project = nil
65
- had_multiple_projects_to_choose_from = false
66
-
67
- if current_directory.count == 1
68
- chosen_project = current_directory.first
69
- elsif current_directory.count > 1
70
- if current_directory.count == 2
71
- # This is a common case (e.g. with CocoaPods), where the project has an xcodeproj and an xcworkspace file
72
- extensions = [File.extname(current_directory[0]), File.extname(current_directory[1])]
73
- if extensions.sort == [".xcodeproj", ".xcworkspace"].sort
74
- # Yep, that's this kind of setup
75
- chosen_project = current_directory.find { |d| d.end_with?(".xcworkspace") }
76
- end
77
- end
78
- chosen_project ||= UI.select("Multiple iOS projects found in current directory", current_directory)
79
- had_multiple_projects_to_choose_from = true
80
- else
81
- UI.error("It looks like there is no iOS project in the current directory, though we did find one in a sub-directory")
82
- UI.error("Please `cd` into the directory of the intended Xcode project you wish to use.")
83
- UI.user_error!("Please `cd` into the directory of the intended Xcode project you wish to use and run `pantograph init` again")
84
- end
85
-
86
- UI.message("Detected an iOS/macOS project in the current directory: '#{chosen_project}'")
87
-
88
- SetupIos.new(
89
- user: user,
90
- project_path: chosen_project,
91
- had_multiple_projects_to_choose_from: had_multiple_projects_to_choose_from
92
- ).setup_ios
58
+ UI.message('Detected an Maven project in the current directory...')
59
+ SetupMaven.new.setup_maven
93
60
  elsif gradle_projects.count > 0
94
- UI.message("Detected an gradle project in the current directory...")
61
+ UI.message('Detected an Gradle project in the current directory...')
95
62
  SetupGradle.new.setup_gradle
63
+ elsif angular_projects.count > 0
64
+ UI.message('Detected an Angular project in the current directory...')
65
+ SetupAngular.new.setup_angular
96
66
  else
97
- UI.error("No iOS or gradle projects were found in directory '#{Dir.pwd}'")
98
- UI.error("Make sure to `cd` into the directory containing your iOS or Gradle app")
99
- if UI.confirm("Alternatively, would you like to manually setup a pantograph config in the current directory instead?")
100
- SetupIos.new(
101
- user: user,
102
- project_path: chosen_project,
103
- had_multiple_projects_to_choose_from: had_multiple_projects_to_choose_from,
104
- preferred_setup_method: :ios_manual
105
- ).setup_ios
67
+ UI.error('Unable to determin project type')
68
+ UI.error('Make sure to `cd` into the directory containing your application')
69
+ if UI.confirm('Alternatively, would you like to manually setup a GENERIC pantograph config in the current directory instead?')
70
+ SetupGeneric.new.setup_generic
106
71
  else
107
- UI.user_error!("Make sure to `cd` into the directory containing your project and then use `pantograph init` again")
72
+ UI.user_error!('Make sure to `cd` into the directory containing your project and then use `pantograph init` again')
108
73
  end
109
74
  end
110
75
  end
111
- # rubocop:enable Metrics/BlockNesting
112
76
 
113
77
  def initialize(user: nil, project_path: nil, had_multiple_projects_to_choose_from: nil, preferred_setup_method: nil)
114
78
  self.user = user
@@ -256,20 +220,20 @@ module Pantograph
256
220
  UI.header("Where to go from here?")
257
221
  if self.platform == :gradle
258
222
  UI.message("📸 Learn more about how to automatically generate localized Google Play screenshots:")
259
- UI.message("\t\thttps://docs.pantograph.tools/getting-started/gradle/screenshots/".cyan)
223
+ UI.message("\t\thttps://johnknapprs.github.io/pantograph/getting-started/gradle/screenshots/".cyan)
260
224
  UI.message("👩‍✈️ Learn more about distribution to beta testing services:")
261
- UI.message("\t\thttps://docs.pantograph.tools/getting-started/gradle/beta-deployment/".cyan)
225
+ UI.message("\t\thttps://johnknapprs.github.io/pantograph/getting-started/gradle/beta-deployment/".cyan)
262
226
  UI.message("🚀 Learn more about how to automate the Google Play release process:")
263
- UI.message("\t\thttps://docs.pantograph.tools/getting-started/gradle/release-deployment/".cyan)
227
+ UI.message("\t\thttps://johnknapprs.github.io/pantograph/getting-started/gradle/release-deployment/".cyan)
264
228
  else
265
229
  UI.message("📸 Learn more about how to automatically generate localized App Store screenshots:")
266
- UI.message("\t\thttps://docs.pantograph.tools/getting-started/ios/screenshots/".cyan)
230
+ UI.message("\t\thttps://johnknapprs.github.io/pantograph/getting-started/ios/screenshots/".cyan)
267
231
  UI.message("👩‍✈️ Learn more about distribution to beta testing services:")
268
- UI.message("\t\thttps://docs.pantograph.tools/getting-started/ios/beta-deployment/".cyan)
232
+ UI.message("\t\thttps://johnknapprs.github.io/pantograph/getting-started/ios/beta-deployment/".cyan)
269
233
  UI.message("🚀 Learn more about how to automate the App Store release process:")
270
- UI.message("\t\thttps://docs.pantograph.tools/getting-started/ios/appstore-deployment/".cyan)
234
+ UI.message("\t\thttps://johnknapprs.github.io/pantograph/getting-started/ios/appstore-deployment/".cyan)
271
235
  UI.message("👩‍⚕️ Learn more about how to setup code signing with pantograph")
272
- UI.message("\t\thttps://docs.pantograph.tools/codesigning/getting-started/".cyan)
236
+ UI.message("\t\thttps://johnknapprs.github.io/pantograph/codesigning/getting-started/".cyan)
273
237
  end
274
238
 
275
239
  # we crash here, so that this never happens when a new setup method is added
@@ -281,10 +245,10 @@ module Pantograph
281
245
 
282
246
  def show_analytics_note
283
247
  UI.message("pantograph will collect the number of errors for each action to detect integration issues")
284
- UI.message("No sensitive/private information will be uploaded, more information: " + "https://docs.pantograph.tools/#metrics".cyan)
248
+ UI.message("No sensitive/private information will be uploaded, more information: " + "https://johnknapprs.github.io/pantograph/#metrics".cyan)
285
249
  end
286
250
  end
287
251
  end
288
252
 
289
- require 'pantograph/setup/setup_ios'
253
+ require 'pantograph/setup/setup_generic'
290
254
  require 'pantograph/setup/setup_gradle'