fastlane/lib/fastlane/documentation/markdown_docs_generator.rb in fastlane-2.41.0.beta.20170623010027 vs fastlane/lib/fastlane/documentation/markdown_docs_generator.rb in fastlane-2.41.0
- old
+ new
@@ -2,23 +2,20 @@
class MarkdownDocsGenerator
ENHANCER_URL = "https://enhancer.fastlane.tools"
attr_accessor :categories
- attr_accessor :plugins
-
def initialize
require 'fastlane'
require 'fastlane/documentation/actions_list'
Fastlane.load_actions
self.work
end
def work
fill_built_in_actions
- fill_plugins
end
def fill_built_in_actions
self.categories = {}
@@ -31,44 +28,9 @@
if self.categories[readable].kind_of?(Hash)
self.categories[readable][number_of_launches_for_action(action.action_name)] = action
else
UI.error("Action '#{action.name}' doesn't contain category information... skipping")
end
- end
- end
-
- def fill_plugins
- self.plugins = []
-
- all_fastlane_plugins = PluginFetcher.fetch_gems # that's all available gems
-
- # We iterate over the enhancer data, since this includes the various actions per plugin
- # we then access `all_fastlane_plugins` to get the URL to the plugin
- all_actions_from_enhancer.each do |current_action|
- action_name = current_action["action"] # e.g. "fastlane-plugin-synx/synx"
-
- next unless action_name.start_with?("fastlane-plugin") # we only care about plugins here
-
- gem_name = action_name.split("/").first # e.g. fastlane-plugin-synx
- ruby_gem_info = all_fastlane_plugins.find { |a| a.full_name == gem_name }
-
- next unless ruby_gem_info
-
- # `ruby_gem_info` e.g.
- #
- # #<Fastlane::FastlanePlugin:0x007ff7fc4de9e0
- # @downloads=888,
- # @full_name="fastlane-plugin-synx",
- # @homepage="https://github.com/afonsograca/fastlane-plugin-synx",
- # @info="Organise your Xcode project folder to match your Xcode groups.",
- # @name="synx">
-
- self.plugins << {
- linked_title: ruby_gem_info.linked_title,
- action_name: action_name.split("/").last,
- description: ruby_gem_info.info,
- usage: number_of_launches_for_action(action_name)
- }
end
end
def number_of_launches_for_action(action_name)
found = all_actions_from_enhancer.find { |c| c["action"] == action_name.to_s }