quiz_api_client 2.1.0 → 2.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 +4 -4
 - data/README.md +1 -1
 - data/bin/contracts +1 -1
 - data/lib/quiz_api_client/services/session_items_service.rb +5 -4
 - data/lib/quiz_api_client/version.rb +1 -1
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: e64852d5f64c4a1aeabe4a686bf2187a76b56567
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 213526a561bcb3436037078cb058ffb2615d3823
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 96968a0e1e51a07fa36b8085a92c494b2f751c3499afc29076be1cc6e33824ddac704e43bfe9a0a38651f2e4f812bed63605447622cdf735ecd5fc4b465b576a
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 7b0f51fd1f972c68e7eca19de0cb2a6e375d4768dcc8847d17b372472e80d693f3b493e6bd7814842012c1113be886095b90bcced01f9042c4e6d38c890b0c18
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -44,7 +44,7 @@ JWTs are created without hitting quiz_api and and they are validated on quiz_api 
     | 
|
| 
       44 
44 
     | 
    
         
             
            Example, generate a token for building:
         
     | 
| 
       45 
45 
     | 
    
         
             
            ```ruby
         
     | 
| 
       46 
46 
     | 
    
         
             
            client.jwt_service.grant_permission(
         
     | 
| 
       47 
     | 
    
         
            -
              scope:  
     | 
| 
      
 47 
     | 
    
         
            +
              scope: 'quiz.build',
         
     | 
| 
       48 
48 
     | 
    
         
             
              exp: Time.now.utc.to_i + 60, # some reasonable time, obviously longer is more a security risk
         
     | 
| 
       49 
49 
     | 
    
         
             
              resource_id: 1)
         
     | 
| 
       50 
50 
     | 
    
         
             
            ```
         
     | 
    
        data/bin/contracts
    CHANGED
    
    | 
         @@ -14,6 +14,6 @@ function print_results() { 
     | 
|
| 
       14 
14 
     | 
    
         
             
            trap print_results INT TERM EXIT
         
     | 
| 
       15 
15 
     | 
    
         
             
            set -e
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
       17 
     | 
    
         
            -
            docker-compose run --name contracts contracts-testrunner bundle exec rspec spec/contracts
         
     | 
| 
      
 17 
     | 
    
         
            +
            docker-compose run --name contracts contracts-testrunner bundle && bundle exec rspec spec/contracts
         
     | 
| 
       18 
18 
     | 
    
         
             
            docker cp contracts:/usr/src/app/log .
         
     | 
| 
       19 
19 
     | 
    
         
             
            docker cp contracts:/usr/src/app/pacts .
         
     | 
| 
         @@ -1,15 +1,16 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module QuizApiClient::Services
         
     | 
| 
       2 
2 
     | 
    
         
             
              class SessionItemsService < BaseApiService
         
     | 
| 
       3 
     | 
    
         
            -
                def list(params:, token: nil)
         
     | 
| 
      
 3 
     | 
    
         
            +
                def list(params:, token: nil, all: false)
         
     | 
| 
       4 
4 
     | 
    
         
             
                  raise 'QuizSession Id Required' unless params && params[:quiz_session_id]
         
     | 
| 
       5 
     | 
    
         
            -
                  get_from_quiz_api(params: params, token: token)
         
     | 
| 
      
 5 
     | 
    
         
            +
                  get_from_quiz_api(params: params, token: token, all: all)
         
     | 
| 
       6 
6 
     | 
    
         
             
                end
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
                private
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
     | 
    
         
            -
                def get_from_quiz_api(params:, token:)
         
     | 
| 
      
 10 
     | 
    
         
            +
                def get_from_quiz_api(params:, token:, all:)
         
     | 
| 
       11 
11 
     | 
    
         
             
                  client(token: token).get(
         
     | 
| 
       12 
     | 
    
         
            -
                    "/api/quiz_sessions/#{params[:quiz_session_id]}/session_items"
         
     | 
| 
      
 12 
     | 
    
         
            +
                    "/api/quiz_sessions/#{params[:quiz_session_id]}/session_items",
         
     | 
| 
      
 13 
     | 
    
         
            +
                    all: all
         
     | 
| 
       13 
14 
     | 
    
         
             
                  )
         
     | 
| 
       14 
15 
     | 
    
         
             
                end
         
     | 
| 
       15 
16 
     | 
    
         
             
              end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: quiz_api_client
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.2.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Chris Wang
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2017-07- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2017-07-18 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: httparty
         
     | 
| 
         @@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       195 
195 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       196 
196 
     | 
    
         
             
            requirements: []
         
     | 
| 
       197 
197 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       198 
     | 
    
         
            -
            rubygems_version: 2. 
     | 
| 
      
 198 
     | 
    
         
            +
            rubygems_version: 2.6.12
         
     | 
| 
       199 
199 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       200 
200 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       201 
201 
     | 
    
         
             
            summary: Ruby client for quiz_api
         
     |