lib/docman/info.rb in docman-0.0.83 vs lib/docman/info.rb in docman-0.0.84

- old
+ new

@@ -17,11 +17,11 @@ @changed = Hash.new @state_name = nil unless self['docroot_config'].deploy_target.nil? if self.has_key? 'states' self['states'].each_pair do |name, state| - if state.has_key?('source') and (not state.has_key?('type') or state.has_key['type'] == 'external_source') + if state.has_key?('source') and (not state.has_key?('type') or (state.has_key?('type') and state['type'] == 'external_source')) if state['source']['type'] == :retrieve_from_repo @state_name = name repo = state['source']['repo'] == :project_repo ? self['repo'] : state['source']['repo'] external_state_info = read_yaml_from_file(repo, self['states_path'], state['source']['branch'], state['source']['file']) state.deep_merge! external_state_info unless external_state_info.nil? or state.nil? @@ -144,10 +144,10 @@ def state(options = {}) states(options)[@state_name] end def states(options = {}) - if options[:type] == 'root' and self['type'] == 'root_chain' + if options[:type] == 'root' and (self['type'] == 'root_chain' or self['type'] == 'single') self['root_repo_states'] else self['states'] end end \ No newline at end of file