Commit 78185af3 authored by Mauricio Giacomini Girardello's avatar Mauricio Giacomini Girardello
Browse files

adding active_support lib

parent 1f1c8c55
......@@ -8,6 +8,7 @@ gem 'json'
gem 'resource_kit'
gem 'faraday'
gem 'net-http-persistent'
gem 'activesupport'
group :development, :spec do
gem 'minitest', '~> 5.8.3'
......@@ -2,7 +2,7 @@ require "forwardable"
require "json"
require "resource_kit"
require "faraday"
require "active_support"
require "active_support/all"
require_relative "dspace/version"
require_relative "dspace/resources/community_resource"
......@@ -7,13 +7,14 @@ module Dspace
def initialize(options = {})
@access_token = options.with_indifferent_access[:access_token]
@dspace_api = options.with_indifferent_access[:dspace_api]
@logger = options.with_indifferent_access[:logger]
def connection do |req|
req.request :multipart
req.request :url_encoded
req.use Faraday::Response::Logger,'faraday.log')
req.use(Faraday::Response::Logger, @logger) unless @logger.nil?
req.adapter :net_http_persistent
......@@ -2,6 +2,6 @@ require_relative 'lib/dspace'
require 'faraday'
faraday ='', {ssl: {verify: false}, headers: {content_type: 'application/json',
accept: 'application/json'}})
accept: 'application/json'}})
r = faraday)
\ No newline at end of file
r = faraday)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment