Skip to content

Commit 475bc90

Browse files
authored
Merge pull request #3 from atomicjolt/rails_5
Rails 5 support
2 parents 2a8632c + bf9e3f0 commit 475bc90

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
lms-api (1.2.9)
4+
lms-api (1.3.0)
55
activesupport (>= 3.0)
66
httparty
77

lib/lms/canvas.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ def self.allow_scoped_path(type)
282282
end
283283

284284
def self.lms_url(type, params, payload = nil)
285+
params = params.to_h
285286
endpoint = LMS::CANVAS_URLs[type]
286287
parameters = endpoint[:parameters]
287288

@@ -311,7 +312,7 @@ def self.lms_url(type, params, payload = nil)
311312
uri_proc = endpoint[:uri]
312313
path_parameters = parameters.select { |p| p["paramType"] == "path" }.
313314
map { |p| p["name"].to_sym }
314-
args = params.slice(*path_parameters).symbolize_keys
315+
args = params.slice(*path_parameters)
315316
uri = args.blank? ? uri_proc.call : uri_proc.call(**args)
316317

317318
# Handle scopes in the url. These API endpoints allow for additional path

lib/lms/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module LMS
2-
VERSION = "1.2.9".freeze
2+
VERSION = "1.3.0".freeze
33
end

0 commit comments

Comments
 (0)