summaryrefslogtreecommitdiffstats
path: root/spec/unit/interface
Commit message (Collapse)AuthorAgeFilesLines
* maint: just require 'spec_helper', thanks rspec2Daniel Pittman2011-04-084-4/+4
| | | | | | | | | | | rspec2 automatically sets a bunch of load-path stuff we were by hand, so we can just stop. As a side-effect we can now avoid a whole pile of stupid things to try and include the spec_helper.rb file... ...and then we can stop protecting spec_helper from evaluating twice, since we now require it with a consistent name. Yay. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
* Merge puppet-interfaces into puppet.Daniel Pittman2011-04-071-11/+2
| | | | | This joins the two repositories, including full history, into a single run, as well as landing the interfaces work on the next branch ready for release.
* (#7012) Split plumbing into Puppet::InterfaceDaniel Pittman2011-04-076-0/+753
| | | | | | | | | This splits out the plumbing into the Puppet::Interface namespace, and uses Puppet::Faces for all the public-facing code. The fault line is "what you care about if you are using or writing a face", which is public, against "what you care about to enable either of those two", which is the plumbing.
* MAINT: the API is officially named "string" as of this moment.Daniel Pittman2011-03-2818-757/+0
| | | | | | | Now that we have settled on the final public name for the API, "Puppet::String", mass-rename and mass-edit all the files to follow. Reviewed-By: Randall Hansen <randall@puppetlabs.com>
* (#6770) Add support for version :latest.Pieter van de Bruggen2011-03-251-0/+46
| | | | | | | | | Specifying a version of `:latest` will find the most recent version of the named interface installed in your RUBYLIB, and attempt to load that. This is unlikely to provide a stable dependency in the future, so should be used sparingly, acknowledging the dangers. Reviewed-By: Daniel Pittman
* (#6770) Add version lookup and comparison.Pieter van de Bruggen2011-03-251-0/+102
| | | | Reviewed-By: Jacob Helwig
* (#6770) Refactor Puppet::Interface#initialize.Pieter van de Bruggen2011-03-254-6/+6
| | | | | | | | | P::I#initialize now takes a name and a version (and an optional block). The options hash has been removed, though it may be reintroduced if a legitimate use case can be made for it (so far, it's only been used for the version number). Reviewed-By: Jacob Helwig
* Config#print action always returns nilLuke Kanies2011-03-251-0/+6
| | | | | | | We were returning 'true', which was getting printed unnecessarily. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* (#6833) support 'script' as a short form of 'action'Daniel Pittman2011-03-241-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment the action method is a fairly heavy tool: it provides a DSL, and is designed to allow substantial metadata to be added to the action. For some users this is low on value, since they just want to write a little script that drives things a bit differently. Which there is substantial value in the metadata, adding the capability to do these light-weight things quickly is valid. To meet this we add a script action; the contrast is: action :foo do # other metadata goes here invoke do |args| # method body goes here end end script :bar do |args| # method body goes here end # ...and if you want metadata, you have to add it in more ugly, procedural # ways, which we are not going to encourage. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
* Merge branch 'tickets/master/6770'Pieter van de Bruggen2011-03-2317-53/+38
|\ | | | | | | | | | | | | Conflicts: lib/puppet/interface/certificate.rb spec/unit/application/interface_base_spec.rb spec/unit/interface/interface_collection_spec.rb
| * (#6770) Rename Puppet::Interface::interface method.Pieter van de Bruggen2011-03-2313-13/+13
| | | | | | | | | | | | | | Puppet::Interface::interface is now Puppet::Interface::define, also aliased to Puppet::Interface::[] for convenience. Paired-With: Nick Lewis
| * (#6770) Changing versioning to semver.Pieter van de Bruggen2011-03-2317-32/+32
| | | | | | | | | | | | More information about the versioning scheme can be found at http://semver.org. Paired-With: Nick Lewis
| * (#6770) Add basic versioning for interfaces.Pieter van de Bruggen2011-03-2317-50/+41
| | | | | | | | Reviewed-By: Nick Lewis
* | WIP - all tests failLuke Kanies2011-03-221-0/+8
| | | | | | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* | maint: Fix order-dependent spec failuresNick Lewis2011-03-221-1/+7
|/ | | | | | | | | The specs for InterfaceCollection were clearing the list of interfaces at the end of the spec run, which caused later specs to fail because they couldn't re-require interfaces they needed. This fixes the InterfaceCollection specs to save and restore the interfaces at the end of the file. Reviewed-By: Matt Robinson
* maint: Implement an InterfaceCollection class to manage interfacesNick Lewis2011-03-2215-224/+129
| | | | | | | | | | | Having an instance variable on class Interface is insufficient for Interface::Indirector. This also changes the semantics of "Interface.interface" to handle registration and loading actions, and for "Interface.new" to only instantiate an Interface. Thus, consumers of the API should typically use "Interface.interface", unless they have reasons to not want an interface automatically registered. Paired-With: Pieter van de Bruggen
* Merge branch 'ticket/master/6814'Nick Lewis2011-03-223-33/+185
|\ | | | | | | | | | | | | Conflicts: lib/puppet/interface/catalog.rb lib/puppet/interface/catalog/select.rb lib/puppet/interface/configurer.rb
| * (#6814) Create a dedicated Action classNick Lewis2011-03-223-33/+185
| | | | | | | | | | | | | | | | | | | | | | This class will represents an action, and allows us to store metadata for an action, and programmatically introspect and invoke them. A helper class ActionBuilder represents the DSL for defining an action. Also defined an "invoke" DSL method to handle the functionality of defining the method for an action. Reviewed-By: Daniel Pittman
* | (#6786) Change interface storage and access.Pieter van de Bruggen2011-03-2213-26/+26
|/ | | | | | | | | | | Ruby's namespace mechanism introduced a number of problems, including incorrect name resolution for common and simple cases. Given that, we've refactored back to class-level data structures with accessor methods available. The current method names are unlikely to be the final UI. Reviewed-By: Daniel Pittman
* (Maint.) Remove Puppet::Interface#unload_interfacePieter van de Bruggen2011-03-211-4/+0
| | | | Reviewed-By: Nick Lewis
* (#6805) Add a "configurer" applicationNick Lewis2011-03-211-0/+25
| | | | | | | | | This application is similar in basic functionality to the "agent" application, but implemented in terms of interfaces. It currently will retrieve facts, retrieve a catalog, apply the catalog, and submit a report. Options such as noop and daemonize are still to come. Reviewed-By: Pieter van de Bruggen
* (#6786) Fixing a number of failing tests.Pieter van de Bruggen2011-03-2112-24/+24
| | | | | | | The initial merge of this branch hadn't actually been run against the full suite of specs; a number of specs began failing shortly afterward. Reviewed-By: Daniel Pittman
* Fixing #16 - nodes default to yamlLuke Kanies2011-03-021-0/+4
| | | | | | We don't have json support for node output yet. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fixing #13 - showconfig moved to indirectorLuke Kanies2011-03-021-8/+12
| | | | | | | | | I renamed it to 'info', too. It only showed indirector-related info, so this makes sense. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Adding a simple "config" appLuke Kanies2011-02-221-0/+27
| | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Splitting the Application base classLuke Kanies2011-02-2211-2/+240
| | | | | | | | | | We now have an indirection_base class along with interface_base. I've also added some basic tests for most of the interfaces. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Switching Interfaces to be instancesLuke Kanies2011-02-223-0/+229
They were previously classes, which made a lot of things stupider than they needed to be. This will likely involve some porting, but not much. Signed-off-by: Luke Kanies <luke@puppetlabs.com>