lib/chef-api/resources/user.rb in chef-api-0.10.0 vs lib/chef-api/resources/user.rb in chef-api-0.10.2

- old
+ new

@@ -1,8 +1,8 @@ module ChefAPI class Resource::User < Resource::Base - collection_path '/users' + collection_path "/users" schema do flavor :enterprise do attribute :username, type: String, primary: true, required: true @@ -36,11 +36,11 @@ users = collection(prefix) # HEC/EC returns a slightly different response than OSC/CZ if users.is_a?(Array) users.each do |info| - name = URI.escape(info['user']['username']) + name = URI.escape(info["user"]["username"]) response = connection.get("/users/#{name}") result = from_json(response, prefix) block.call(result) if block end @@ -73,10 +73,10 @@ # # @return [Hash] # the parsed JSON response from the server # def authenticate(options = {}) - connection.post('/authenticate_user', options.to_json) + connection.post("/authenticate_user", options.to_json) end end end end