bearcat 0.9.22 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -133,7 +133,16 @@ module Bearcat
133
133
 
134
134
  #TODO: This is a quick fix for JSONAPI responses if we need to do this for anything else we need to do this a better way
135
135
  def self.array_key(response)
136
- 'conferences' if (response.env[:method] == :get && response.env[:url].path.match(/.*\/(courses||groups)\/\d+\/conferences/))
136
+ key = nil
137
+ if response.env[:method] == :get
138
+ path = response.env[:url].path
139
+ if path.match(/.*\/(courses||groups)\/\d+\/conferences/)
140
+ key = 'conferences'
141
+ elsif path.match(/.*\/accounts\/d+\/terms/)
142
+ key = 'enrollment_terms'
143
+ end
144
+ end
145
+ key
137
146
  end
138
147
 
139
148
  def process_body(response)
@@ -145,4 +154,4 @@ module Bearcat
145
154
  end
146
155
 
147
156
  end
148
- end
157
+ end
@@ -0,0 +1,20 @@
1
+ module Bearcat
2
+ class Client < Footrest::Client
3
+ module SisImports
4
+
5
+ def sis_imports(account, params = {})
6
+ post("/api/v1/accounts/#{account}/sis_imports", params)
7
+ end
8
+
9
+ def get_sis_imports(account)
10
+ binding.pry
11
+ get("/api/v1/accounts/#{account}/sis_imports")
12
+ end
13
+
14
+ def import_status(account, import_id)
15
+ get("/api/v1/accounts/#{account}/sis_imports/#{import_id}")
16
+ end
17
+
18
+ end
19
+ end
20
+ end
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '0.9.22' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.0.0' unless defined?(Bearcat::VERSION)
3
3
  end
metadata CHANGED
@@ -1,46 +1,52 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bearcat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.22
4
+ version: 1.0.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Nathan Mills, Jake Sorce
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-09-30 00:00:00.000000000 Z
12
+ date: 2014-10-01 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rake
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - '>='
19
+ - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: '0'
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - '>='
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
29
  version: '0'
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: bundler
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - '>='
35
+ - - ! '>='
32
36
  - !ruby/object:Gem::Version
33
37
  version: 1.0.0
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - '>='
43
+ - - ! '>='
39
44
  - !ruby/object:Gem::Version
40
45
  version: 1.0.0
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: rspec
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ~>
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ~>
53
60
  - !ruby/object:Gem::Version
@@ -55,43 +62,49 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: webmock
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
- - - '>='
67
+ - - ! '>='
60
68
  - !ruby/object:Gem::Version
61
69
  version: '0'
62
70
  type: :development
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
- - - '>='
75
+ - - ! '>='
67
76
  - !ruby/object:Gem::Version
68
77
  version: '0'
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: pry
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
- - - '>='
83
+ - - ! '>='
74
84
  - !ruby/object:Gem::Version
75
85
  version: '0'
76
86
  type: :development
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
- - - '>='
91
+ - - ! '>='
81
92
  - !ruby/object:Gem::Version
82
93
  version: '0'
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: footrest
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
- - - '>='
99
+ - - ! '>='
88
100
  - !ruby/object:Gem::Version
89
101
  version: 0.2.2
90
102
  type: :runtime
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
- - - '>='
107
+ - - ! '>='
95
108
  - !ruby/object:Gem::Version
96
109
  version: 0.2.2
97
110
  description: Ruby interface for interacting with the canvas API
@@ -123,6 +136,7 @@ files:
123
136
  - lib/bearcat/client/quizzes.rb
124
137
  - lib/bearcat/client/reports.rb
125
138
  - lib/bearcat/client/sections.rb
139
+ - lib/bearcat/client/sis_imports.rb
126
140
  - lib/bearcat/client/submissions.rb
127
141
  - lib/bearcat/client/users.rb
128
142
  - lib/bearcat/client.rb
@@ -220,26 +234,27 @@ files:
220
234
  - spec/helper.rb
221
235
  homepage:
222
236
  licenses: []
223
- metadata: {}
224
237
  post_install_message:
225
238
  rdoc_options: []
226
239
  require_paths:
227
240
  - lib
228
241
  required_ruby_version: !ruby/object:Gem::Requirement
242
+ none: false
229
243
  requirements:
230
- - - '>='
244
+ - - ! '>='
231
245
  - !ruby/object:Gem::Version
232
246
  version: '0'
233
247
  required_rubygems_version: !ruby/object:Gem::Requirement
248
+ none: false
234
249
  requirements:
235
- - - '>='
250
+ - - ! '>='
236
251
  - !ruby/object:Gem::Version
237
252
  version: '0'
238
253
  requirements: []
239
254
  rubyforge_project:
240
- rubygems_version: 2.0.3
255
+ rubygems_version: 1.8.23
241
256
  signing_key:
242
- specification_version: 4
257
+ specification_version: 3
243
258
  summary: Canvas API
244
259
  test_files:
245
260
  - spec/bearcat/client/accounts_spec.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: d1f65e93775b144f2e01c51973a63f9ce1d91b39
4
- data.tar.gz: 36d57632ebb7d4f9c8cf82587b580f96778c7967
5
- SHA512:
6
- metadata.gz: 8b2ac0654b168c2cb3118cfeac68be7acaf7c80a931837c947e94d84440ca5253df3fd1c8662f04f2001a747e67e53b9d5526059ff701101df20b7fe6c5ce087
7
- data.tar.gz: dde7a8fea817f725f05c765546135d5eb722816a9245fe33ed51190c10a86841c5f7f45ce1fa0d171a50f029f787f036195279ad6f245006f44d0c2e234b1aad