msgraph-sdk-ruby icon indicating copy to clipboard operation
msgraph-sdk-ruby copied to clipboard

Nokogiri not required when library is loaded.

Open jasper-lyons-rhul opened this issue 7 years ago • 2 comments

To re-create:

  1. Install microsoft_graph gem with gem install microsoft_graph

  2. create a file with the following code:

# test.rb
MicrosoftGraph.new({
    base_url: 'https://graph.microsoft.com/v1.0',
    cached_metadata_file: File.join(MicrosoftGraph::CACHED_METADATA_DIRECTORY, 'metadata_v1.0.xml'),
}, &(->(r) { r.headers['Authorization'] = "Bearer #{token}" }))
  1. run this code with ruby test.rb

Gem Version: microsoft_graph (0.1.3)

Solution

I think require 'nokogiri' is just required somewhere in the loading process? Would a PR be appreciated?

jasper-lyons-rhul avatar Jun 05 '18 15:06 jasper-lyons-rhul

Nokogiri is required for the ADAL library which is used to obtain a token. If you are using an alternative auth library then you will not need it.

darrelmiller avatar Aug 09 '19 20:08 darrelmiller

Nokogiri is used in the sdk. see https://github.com/microsoftgraph/msgraph-sdk-ruby/blob/master/lib/odata/service.rb#L248

arthurnn avatar Jan 26 '20 02:01 arthurnn

Thanks for reporting this issue. That version of the SDK has been deprecated a number of years ago. We're now starting the work on a new generation of this SDK and you can learn all about it on the updated readme page.

baywet avatar Jan 10 '23 19:01 baywet