Skip to content

Commit

Permalink
Completed refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
katylouise committed Apr 19, 2017
1 parent a4fbea5 commit 5dda347
Show file tree
Hide file tree
Showing 211 changed files with 113 additions and 18,786 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ gemspec
# Include coveralls for CI coverage reports
gem 'coveralls', require: false

# gem 'parliament-grom-decorators', git: 'https://github.com/ukparliament/parliament-grom-decorators', branch: 'master'
gem 'parliament-grom-decorators', path: '../parliament-grom-decorators'
gem 'parliament-ntriple', path: '../parliament-ntriple'
1 change: 0 additions & 1 deletion lib/parliament.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
require 'parliament/request'
require 'parliament/response'
require 'parliament/utils'
require 'parliament/decorator'
require 'parliament/builder'

require 'parliament/network_error'
Expand Down
13 changes: 11 additions & 2 deletions lib/parliament/builder/base_response_builder.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
module Parliament
module Builder
# API response builder, allowing the user to return the body of an HTTPResponse.
# @since 0.7.5
class BaseResponseBuilder
def initialize(response)
# Creates a new BaseReponseBuilder.
# @param [HTTPResponse] response an HTTP response containing n-triple data.
# @param [Module] decorators the decorator modules to provide alias methods to the resulting objects.
def initialize(response:, decorators: nil)
@response = response
@decorators = decorators
end

# Builds a Parliament::Response::BaseResponse.
#
# @return [Parliament::Response::Base::Response] a Parliament::Response::BaseResponse containing the HTTPResponse.
def build
@response
Parliament::Response::BaseResponse.new(@response)
end
end
end
Expand Down
27 changes: 0 additions & 27 deletions lib/parliament/decorator.rb

This file was deleted.

27 changes: 0 additions & 27 deletions lib/parliament/decorator/constituency_area.rb

This file was deleted.

92 changes: 0 additions & 92 deletions lib/parliament/decorator/constituency_group.rb

This file was deleted.

48 changes: 0 additions & 48 deletions lib/parliament/decorator/contact_point.rb

This file was deleted.

13 changes: 0 additions & 13 deletions lib/parliament/decorator/gender.rb

This file was deleted.

13 changes: 0 additions & 13 deletions lib/parliament/decorator/gender_identity.rb

This file was deleted.

41 changes: 0 additions & 41 deletions lib/parliament/decorator/house.rb

This file was deleted.

48 changes: 0 additions & 48 deletions lib/parliament/decorator/house_incumbency.rb

This file was deleted.

27 changes: 0 additions & 27 deletions lib/parliament/decorator/house_seat.rb

This file was deleted.

Loading

0 comments on commit 5dda347

Please sign in to comment.