progresso 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 39598eb82f3f673381ee57b774da0e4f2d8939cf
4
- data.tar.gz: 8579643172117810568cd680c7faf63a7ceedd79
2
+ SHA256:
3
+ metadata.gz: 881a11ab5dcbc5f4fa1ce1f5501edc1394665d2410620642f7ec6d375ec7eb47
4
+ data.tar.gz: 86d959d5c62c06cb6ab6af24c3f58372212955395a45e8f472780b5c75ec6360
5
5
  SHA512:
6
- metadata.gz: 59a3a71f10146eb0ceea2218971209c7add8cb71f842ff93dae7c6f8e1046c92b1c1bf4ec6876f4490015004d19240e9654d660e13a1df9b5db2b10583dc9abd
7
- data.tar.gz: de5d824dd0470bc5514739e4c6df922882b6f56d791a6f02d754cc9c5b485750b783185e5caa56b4b47604a5838ad6dd0968473c2cbbccbe6c43b301422d6705
6
+ metadata.gz: 93adb1a3ff20f5b9a5114ef7b6421139cf4ff41fe59c9e5da89ee14a9075a73539fd6ee14ef6cfa2af91a0325c3ee14c10ab9d4a6505bca772a669ddcc68d3f3
7
+ data.tar.gz: 707bcf7b256db2fae88e431b6dd22f9c87a6993d11faeda2e41d30d551f26f298404abd6c1ec01c366c8159dafe57de1236a3b3a03028b96482eca1d86f9b36f
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ Gemfile.lock
@@ -31,6 +31,7 @@ module Progresso
31
31
  attendance_codes
32
32
  learner_roll_call_attendance
33
33
  learner_lesson_attendance
34
+ learner_roll_call_attendance_summary
34
35
  get_photo
35
36
  udf
36
37
  udf_values
@@ -76,13 +77,13 @@ module Progresso
76
77
  resource = resource.split('_').map {|w| w.capitalize}.join
77
78
  response = http_request_with_token("/#{resource}", params: options)
78
79
 
79
- content_type = response.headers["Content-Type"].match(/^(\w*\/\w*)/)[1]
80
-
81
80
  case response.status
82
81
  when 204
83
82
  []
84
83
  when 404
85
84
  raise InvalidRequestError, response.body
85
+ when 401
86
+ raise InsufficientAccessError, response.status_line
86
87
  when 200
87
88
  JSON.parse(response.body)
88
89
  end
@@ -1,4 +1,5 @@
1
1
  module Progresso
2
2
  InvalidCredentialsError = Class.new(StandardError)
3
3
  InvalidRequestError = Class.new(StandardError)
4
+ InsufficientAccessError = Class.new(StandardError)
4
5
  end
@@ -1,3 +1,3 @@
1
1
  module Progresso
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: progresso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hakim Aryan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-10 00:00:00.000000000 Z
11
+ date: 2019-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon
@@ -75,7 +75,6 @@ extra_rdoc_files: []
75
75
  files:
76
76
  - ".gitignore"
77
77
  - Gemfile
78
- - Gemfile.lock
79
78
  - README.md
80
79
  - Rakefile
81
80
  - bin/console
@@ -104,8 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
103
  - !ruby/object:Gem::Version
105
104
  version: '0'
106
105
  requirements: []
107
- rubyforge_project:
108
- rubygems_version: 2.6.12
106
+ rubygems_version: 3.0.1
109
107
  signing_key:
110
108
  specification_version: 4
111
109
  summary: Progresso API client
@@ -1,35 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- progresso (0.1.0)
5
- activesupport (>= 4)
6
- excon (>= 0.45)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- activesupport (5.2.0)
12
- concurrent-ruby (~> 1.0, >= 1.0.2)
13
- i18n (>= 0.7, < 2)
14
- minitest (~> 5.1)
15
- tzinfo (~> 1.1)
16
- concurrent-ruby (1.0.5)
17
- excon (0.62.0)
18
- i18n (1.0.1)
19
- concurrent-ruby (~> 1.0)
20
- minitest (5.11.3)
21
- rake (10.5.0)
22
- thread_safe (0.3.6)
23
- tzinfo (1.2.5)
24
- thread_safe (~> 0.1)
25
-
26
- PLATFORMS
27
- ruby
28
-
29
- DEPENDENCIES
30
- bundler (~> 1.16.a)
31
- progresso!
32
- rake (~> 10.0)
33
-
34
- BUNDLED WITH
35
- 1.16.1