Issue #3779 has been updated by Ken Barber.

Status changed from Accepted to Closed

A lot of this no longer applies today. Closing.
----------------------------------------
Refactor #3779: Tool should be a CLI written on top of a proper library that's 
also used by the Site
https://projects.puppetlabs.com/issues/3779#change-65187

Author: Igal Koshevoy
Status: Closed
Priority: Low
Assignee: 
Category: module tool
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


Currently the tool is a pile of Thor tasks and disparate utility classes that 
don't cooperate. There's no easy way to say "install this module" or "search 
for this string" without invoking the command-line tool and parsing it's 
output. The lack of this has significantly complicated my ability to add fix 
and test the code. Worse still, because the Tool and Site share no code, 
they're both reinventing the same wheels poorly, which means more wonky code 
that we either need to beef up or refactor away. 

The ideal is to have a single, well-written library with a good API that the 
Tool, Site and third-parties can use. 

Sample API:

  # Return a list of modules matching the +query+. Optionally
  # restrict searching to the +kind+ field and/or the +repository+
  search(query, kind=ENUM[:any, :module, :username], 
repository=DEFAULT_REPOSITORY)

  # Return a description of the module with a matching +name+, 
  # e.g. documentation, types, releases, URLs, author, etc.
  describe(name, repository=DEFAULT_REPOSITORY)

  # Install a module release matching the +name+ and optional
  # +version+ from the optional +repository+. Defaults to 
  # latest release in the default repository.
  install(name, version=nil, repository=DEFAULT_REPOSITORY)

  # Generate a new module with the given +name+ in the optional
  # target +path+, otherwise defaults to the current directory..
  generate(name, path=nil)

  # Build a new module release from the module at the optional 
  # +path+, otherwise defaults to the current directory.
  build(path=nil)
  
  # Upload a release at the optional +path+ to the +repository+.
  # If no path is specified, uploads latest release in current 
  # directory.
  upload(path=nil, repository=DEFAULT_REPOSITORY)

  # Import a release of the module with the matching +name+
  # and +version+ from the +source_repository+ and into the 
  # +local_repository+.
  import(name, version=nil, source_repository=DEFAULT_REPOSITORY, 
target_repository=DEFAULT_REPOSITORY)

  # Analyze the module release at +path+ and returns its
  # details (e.g., name, version, author, files, types, etc)
  analyze(path=nil)

I'm marking this as a "low" priority because this isn't urgent, but it is 
important.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to