marianitadn/foregit — pull request #6 by marianitadn (2014-06-15 17:51:00+00:00)
Title: Create Files/Objects manager 

## Need

```gherkin
As a developer
I want to create a manager which will load the changed files from the Git repository
So that I can update the Foreman instance configuration with the updates
```

## Deliverables
- A manager which will find and load a directory/file as a JSON object, based on repository name and given files names/types.

## Solution

#### Abstract
Create a `ConfigurationManager` class which is initialized with a repo name and a list of resources (file names, directories) will search them in the repo and load them as objects.
All the objects will be then sent to the Foreman instance as configuration updates, which will be handled by another resource.

#### Prerequisites
- [Example](https://github.com/opscode/chef/blob/master/lib/chef/knife/core/object_loader.rb)
- [File module](http://www.ruby-doc.org/core-2.0.0/File.html)

#### TODO
- [ ] Add tests for the ConfigurationManager

- [ ] create `ConfigurationManager` class which will have the following methods:
- load_component_as_object
- load_file_as_object
- dump_object_as_file
- dump_resource_as_directory
- find_file_or_directory
- initialize -- which will receive a repo and a list of components to find and load as objects

- [ ] Define the repo's structure in a file as a dictionary which will be imported via settings

#### Files
- lib/foreman/configuration_manager.rb