lib/siteleaf/site.rb in siteleaf-2.0.2 vs lib/siteleaf/site.rb in siteleaf-2.1.0

- old
+ new

@@ -15,21 +15,21 @@ Job.new(id: result["job_id"]) if result end def source_files(dir = '.', opts = {}) result = Client.get ::File.join(entity_endpoint, "source", dir), opts - result.map { |r| SourceFile.new(r.merge('site_id' => id)) } if result.parsed_response.is_a? Array + result.map { |r| SourceFile.new(r.merge('site_id' => id)) } if result.is_a? Array end def pages result = Client.get "#{entity_endpoint}/pages" - result.map { |r| Page.new(r) } if result.parsed_response.is_a? Array + result.map { |r| Page.new(r) } if result.is_a? Array end def collections result = Client.get "#{entity_endpoint}/collections" - result.map { |r| Collection.new(r) } if result.parsed_response.is_a? Array + result.map { |r| Collection.new(r) } if result.is_a? Array end def posts Collection.new(path: 'posts', site_id: id).documents end @@ -54,6 +54,6 @@ def sha Siteleaf::GitHash.string(to_file) end end -end \ No newline at end of file +end