parse-ruby-client 0.1.14 → 0.1.15
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.
- data/.travis.yml +3 -2
 - data/Gemfile +12 -12
 - data/Gemfile.lock +26 -12
 - data/OLD_README.md +255 -0
 - data/README.md +1038 -144
 - data/Rakefile +2 -10
 - data/VERSION +1 -1
 - data/features.md +11 -11
 - data/fixtures/vcr_cassettes/test_acls_arent_objects.yml +180 -0
 - data/fixtures/vcr_cassettes/test_array_add.yml +20 -20
 - data/fixtures/vcr_cassettes/test_array_add_pointerizing.yml +239 -0
 - data/fixtures/vcr_cassettes/test_array_add_unique.yml +180 -0
 - data/fixtures/vcr_cassettes/test_batch_create_object.yml +53 -80
 - data/fixtures/vcr_cassettes/test_batch_delete_object.yml +303 -428
 - data/fixtures/vcr_cassettes/test_batch_run.yml +53 -74
 - data/fixtures/vcr_cassettes/test_batch_update_object.yml +303 -432
 - data/fixtures/vcr_cassettes/test_circular_save.yml +121 -0
 - data/fixtures/vcr_cassettes/test_created_at.yml +53 -74
 - data/fixtures/vcr_cassettes/test_decrement.yml +121 -0
 - data/fixtures/vcr_cassettes/test_deep_parse.yml +154 -218
 - data/fixtures/vcr_cassettes/test_destroy.yml +104 -144
 - data/fixtures/vcr_cassettes/test_eq_pointerize.yml +239 -0
 - data/fixtures/vcr_cassettes/test_equality.yml +180 -0
 - data/fixtures/vcr_cassettes/test_get.yml +104 -146
 - data/fixtures/vcr_cassettes/test_get_missing.yml +60 -0
 - data/fixtures/vcr_cassettes/test_include.yml +27 -27
 - data/fixtures/vcr_cassettes/test_new_model.yml +53 -146
 - data/fixtures/vcr_cassettes/test_new_object.yml +53 -74
 - data/fixtures/vcr_cassettes/test_nils_delete_keys.yml +155 -216
 - data/fixtures/vcr_cassettes/test_parse_delete.yml +204 -284
 - data/fixtures/vcr_cassettes/test_pointer.yml +53 -74
 - data/fixtures/vcr_cassettes/test_save_with_sub_objects.yml +298 -0
 - data/fixtures/vcr_cassettes/test_saving_boolean_values.yml +121 -0
 - data/fixtures/vcr_cassettes/test_server_update.yml +257 -358
 - data/fixtures/vcr_cassettes/test_simple_save.yml +53 -74
 - data/fixtures/vcr_cassettes/test_text_file_save.yml +53 -161
 - data/fixtures/vcr_cassettes/test_update.yml +104 -144
 - data/fixtures/vcr_cassettes/test_updated_at.yml +104 -144
 - data/fixtures/vcr_cassettes/test_user_save.yml +10 -10
 - data/lib/parse/client.rb +43 -6
 - data/lib/parse/datatypes.rb +14 -35
 - data/lib/parse/error.rb +8 -0
 - data/lib/parse/object.rb +25 -20
 - data/lib/parse/protocol.rb +3 -4
 - data/lib/parse/query.rb +10 -9
 - data/lib/parse/util.rb +36 -2
 - data/parse-ruby-client.gemspec +22 -18
 - data/test/helper.rb +33 -5
 - data/test/test_batch.rb +1 -4
 - data/test/test_client.rb +59 -7
 - data/test/test_cloud.rb +3 -7
 - data/test/test_datatypes.rb +6 -7
 - data/test/test_file.rb +9 -10
 - data/test/test_model.rb +1 -4
 - data/test/test_object.rb +148 -6
 - data/test/test_push.rb +1 -5
 - data/test/test_query.rb +13 -3
 - data/test/test_throttle.rb +1 -3
 - data/test/test_user.rb +1 -5
 - metadata +23 -19
 - data/fixtures/vcr_cassettes/test_array_add_relation.yml +0 -321
 - data/fixtures/vcr_cassettes/test_cloud_function.yml +0 -81
 - data/fixtures/vcr_cassettes/test_file_save.yml +0 -87
 - data/fixtures/vcr_cassettes/test_image_file_associate_with_object.yml +0 -2034
 - data/fixtures/vcr_cassettes/test_image_file_save.yml +0 -1957
 - data/fixtures/vcr_cassettes/test_object_id.yml +0 -83
 - data/fixtures/vcr_cassettes/test_request_batch.yml +0 -62
 
| 
         @@ -1,83 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            ---
         
     | 
| 
       2 
     | 
    
         
            -
            http_interactions:
         
     | 
| 
       3 
     | 
    
         
            -
            - request:
         
     | 
| 
       4 
     | 
    
         
            -
                method: post
         
     | 
| 
       5 
     | 
    
         
            -
                uri: https://api.parse.com/1/classes/Post
         
     | 
| 
       6 
     | 
    
         
            -
                body:
         
     | 
| 
       7 
     | 
    
         
            -
                  encoding: UTF-8
         
     | 
| 
       8 
     | 
    
         
            -
                  string: ! '{"title":"hello world"}'
         
     | 
| 
       9 
     | 
    
         
            -
                headers:
         
     | 
| 
       10 
     | 
    
         
            -
                  Content-Type:
         
     | 
| 
       11 
     | 
    
         
            -
                  - application/json
         
     | 
| 
       12 
     | 
    
         
            -
                  Accept:
         
     | 
| 
       13 
     | 
    
         
            -
                  - application/json
         
     | 
| 
       14 
     | 
    
         
            -
                  User-Agent:
         
     | 
| 
       15 
     | 
    
         
            -
                  - Parse for Ruby, 0.0
         
     | 
| 
       16 
     | 
    
         
            -
                  X-Parse-Master-Key:
         
     | 
| 
       17 
     | 
    
         
            -
                  - ''
         
     | 
| 
       18 
     | 
    
         
            -
                  X-Parse-Rest-Api-Key:
         
     | 
| 
       19 
     | 
    
         
            -
                  - D3Y8jNCQk6kpkKhpRGnWLYTrFGQ7j8dtDVnWZRnZ
         
     | 
| 
       20 
     | 
    
         
            -
                  X-Parse-Application-Id:
         
     | 
| 
       21 
     | 
    
         
            -
                  - PPVk6L5M9R1R8GVk8Ye9jT8f5SQNBIeoJUDJLmkT
         
     | 
| 
       22 
     | 
    
         
            -
                  X-Parse-Session-Token:
         
     | 
| 
       23 
     | 
    
         
            -
                  - ''
         
     | 
| 
       24 
     | 
    
         
            -
                  Expect:
         
     | 
| 
       25 
     | 
    
         
            -
                  - ''
         
     | 
| 
       26 
     | 
    
         
            -
              response:
         
     | 
| 
       27 
     | 
    
         
            -
                status:
         
     | 
| 
       28 
     | 
    
         
            -
                  code: 201
         
     | 
| 
       29 
     | 
    
         
            -
                  message: !binary |-
         
     | 
| 
       30 
     | 
    
         
            -
                    Q3JlYXRlZA==
         
     | 
| 
       31 
     | 
    
         
            -
                headers:
         
     | 
| 
       32 
     | 
    
         
            -
                  !binary "QWNjZXNzLUNvbnRyb2wtQWxsb3ctT3JpZ2lu":
         
     | 
| 
       33 
     | 
    
         
            -
                  - !binary |-
         
     | 
| 
       34 
     | 
    
         
            -
                    Kg==
         
     | 
| 
       35 
     | 
    
         
            -
                  !binary "QWNjZXNzLUNvbnRyb2wtUmVxdWVzdC1NZXRob2Q=":
         
     | 
| 
       36 
     | 
    
         
            -
                  - !binary |-
         
     | 
| 
       37 
     | 
    
         
            -
                    Kg==
         
     | 
| 
       38 
     | 
    
         
            -
                  !binary "Q2FjaGUtQ29udHJvbA==":
         
     | 
| 
       39 
     | 
    
         
            -
                  - !binary |-
         
     | 
| 
       40 
     | 
    
         
            -
                    bm8tY2FjaGU=
         
     | 
| 
       41 
     | 
    
         
            -
                  !binary "Q29udGVudC1UeXBl":
         
     | 
| 
       42 
     | 
    
         
            -
                  - !binary |-
         
     | 
| 
       43 
     | 
    
         
            -
                    YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
         
     | 
| 
       44 
     | 
    
         
            -
                  !binary "RGF0ZQ==":
         
     | 
| 
       45 
     | 
    
         
            -
                  - !binary |-
         
     | 
| 
       46 
     | 
    
         
            -
                    VHVlLCAwOSBPY3QgMjAxMiAyMTo0NTozMSBHTVQ=
         
     | 
| 
       47 
     | 
    
         
            -
                  !binary "TG9jYXRpb24=":
         
     | 
| 
       48 
     | 
    
         
            -
                  - !binary |-
         
     | 
| 
       49 
     | 
    
         
            -
                    aHR0cHM6Ly9hcGkucGFyc2UuY29tLzEvY2xhc3Nlcy9Qb3N0L1hBV2htNmlU
         
     | 
| 
       50 
     | 
    
         
            -
                    Nm0=
         
     | 
| 
       51 
     | 
    
         
            -
                  !binary "U2VydmVy":
         
     | 
| 
       52 
     | 
    
         
            -
                  - !binary |-
         
     | 
| 
       53 
     | 
    
         
            -
                    bmdpbngvMS4yLjI=
         
     | 
| 
       54 
     | 
    
         
            -
                  !binary "U2V0LUNvb2tpZQ==":
         
     | 
| 
       55 
     | 
    
         
            -
                  - !binary |-
         
     | 
| 
       56 
     | 
    
         
            -
                    X3BhcnNlX3Nlc3Npb249QkFoN0Jra2lEM05sYzNOcGIyNWZhV1FHT2daRlJp
         
     | 
| 
       57 
     | 
    
         
            -
                    SWxaVFV5T1Rnd05qa3lZbVZoTmpCbVkySm1NVFl4WWpBNVpUVmhNamt6TnpZ
         
     | 
| 
       58 
     | 
    
         
            -
                    JTNELS00ZmM0MmY1MWQ3ZjdiMjY1MGNkM2RjM2U2YmY5MmQ3Y2M3NzFhMzNh
         
     | 
| 
       59 
     | 
    
         
            -
                    OyBkb21haW49LnBhcnNlLmNvbTsgcGF0aD0vOyBleHBpcmVzPVN1biwgMDkt
         
     | 
| 
       60 
     | 
    
         
            -
                    T2N0LTIwMjIgMjE6NDU6MzEgR01UOyBzZWN1cmU7IEh0dHBPbmx5
         
     | 
| 
       61 
     | 
    
         
            -
                  !binary "U3RhdHVz":
         
     | 
| 
       62 
     | 
    
         
            -
                  - !binary |-
         
     | 
| 
       63 
     | 
    
         
            -
                    MjAxIENyZWF0ZWQ=
         
     | 
| 
       64 
     | 
    
         
            -
                  !binary "WC1SdW50aW1l":
         
     | 
| 
       65 
     | 
    
         
            -
                  - !binary |-
         
     | 
| 
       66 
     | 
    
         
            -
                    MC4wMjUxNzM=
         
     | 
| 
       67 
     | 
    
         
            -
                  !binary "WC1VYS1Db21wYXRpYmxl":
         
     | 
| 
       68 
     | 
    
         
            -
                  - !binary |-
         
     | 
| 
       69 
     | 
    
         
            -
                    SUU9RWRnZSxjaHJvbWU9MQ==
         
     | 
| 
       70 
     | 
    
         
            -
                  !binary "Q29udGVudC1MZW5ndGg=":
         
     | 
| 
       71 
     | 
    
         
            -
                  - !binary |-
         
     | 
| 
       72 
     | 
    
         
            -
                    NjQ=
         
     | 
| 
       73 
     | 
    
         
            -
                  !binary "Q29ubmVjdGlvbg==":
         
     | 
| 
       74 
     | 
    
         
            -
                  - !binary |-
         
     | 
| 
       75 
     | 
    
         
            -
                    a2VlcC1hbGl2ZQ==
         
     | 
| 
       76 
     | 
    
         
            -
                body:
         
     | 
| 
       77 
     | 
    
         
            -
                  encoding: ASCII-8BIT
         
     | 
| 
       78 
     | 
    
         
            -
                  string: !binary |-
         
     | 
| 
       79 
     | 
    
         
            -
                    eyJjcmVhdGVkQXQiOiIyMDEyLTEwLTA5VDIxOjQ1OjMxLjUyMVoiLCJvYmpl
         
     | 
| 
       80 
     | 
    
         
            -
                    Y3RJZCI6IlhBV2htNmlUNm0ifQ==
         
     | 
| 
       81 
     | 
    
         
            -
                http_version: 
         
     | 
| 
       82 
     | 
    
         
            -
              recorded_at: Tue, 09 Oct 2012 21:45:31 GMT
         
     | 
| 
       83 
     | 
    
         
            -
            recorded_with: VCR 2.0.1
         
     | 
| 
         @@ -1,62 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            --- 
         
     | 
| 
       2 
     | 
    
         
            -
            http_interactions: 
         
     | 
| 
       3 
     | 
    
         
            -
            - request: 
         
     | 
| 
       4 
     | 
    
         
            -
                method: post
         
     | 
| 
       5 
     | 
    
         
            -
                uri: https://api.parse.com/1/batch
         
     | 
| 
       6 
     | 
    
         
            -
                body: 
         
     | 
| 
       7 
     | 
    
         
            -
                  encoding: UTF-8
         
     | 
| 
       8 
     | 
    
         
            -
                  string: "{\"requests\":[{\"method\":\"POST\",\"path\":\"/1/classes/GameScore\",\"body\":{\"gameScore\":42}}]}"
         
     | 
| 
       9 
     | 
    
         
            -
                headers: 
         
     | 
| 
       10 
     | 
    
         
            -
                  Content-Type: 
         
     | 
| 
       11 
     | 
    
         
            -
                  - application/json
         
     | 
| 
       12 
     | 
    
         
            -
                  Accept: 
         
     | 
| 
       13 
     | 
    
         
            -
                  - application/json
         
     | 
| 
       14 
     | 
    
         
            -
                  User-Agent: 
         
     | 
| 
       15 
     | 
    
         
            -
                  - Parse for Ruby, 0.0
         
     | 
| 
       16 
     | 
    
         
            -
                  X-Parse-Master-Key: 
         
     | 
| 
       17 
     | 
    
         
            -
                  - ""
         
     | 
| 
       18 
     | 
    
         
            -
                  X-Parse-Rest-Api-Key: 
         
     | 
| 
       19 
     | 
    
         
            -
                  - jYdptjS76YHikuIFfJEgHD8UMIjH6cp2rWz4fo2C
         
     | 
| 
       20 
     | 
    
         
            -
                  X-Parse-Application-Id: 
         
     | 
| 
       21 
     | 
    
         
            -
                  - hnJRtntbYPvWfjqcqLZsdFaOKT0F3SfNU7Kc7woN
         
     | 
| 
       22 
     | 
    
         
            -
                  X-Parse-Session-Token: 
         
     | 
| 
       23 
     | 
    
         
            -
                  - ""
         
     | 
| 
       24 
     | 
    
         
            -
                  Expect: 
         
     | 
| 
       25 
     | 
    
         
            -
                  - ""
         
     | 
| 
       26 
     | 
    
         
            -
              response: 
         
     | 
| 
       27 
     | 
    
         
            -
                status: 
         
     | 
| 
       28 
     | 
    
         
            -
                  code: 200
         
     | 
| 
       29 
     | 
    
         
            -
                  message: OK
         
     | 
| 
       30 
     | 
    
         
            -
                headers: 
         
     | 
| 
       31 
     | 
    
         
            -
                  Access-Control-Allow-Origin: 
         
     | 
| 
       32 
     | 
    
         
            -
                  - "*"
         
     | 
| 
       33 
     | 
    
         
            -
                  Access-Control-Request-Method: 
         
     | 
| 
       34 
     | 
    
         
            -
                  - "*"
         
     | 
| 
       35 
     | 
    
         
            -
                  Cache-Control: 
         
     | 
| 
       36 
     | 
    
         
            -
                  - max-age=0, private, must-revalidate
         
     | 
| 
       37 
     | 
    
         
            -
                  Content-Type: 
         
     | 
| 
       38 
     | 
    
         
            -
                  - application/json; charset=utf-8
         
     | 
| 
       39 
     | 
    
         
            -
                  Date: 
         
     | 
| 
       40 
     | 
    
         
            -
                  - Tue, 08 Jan 2013 15:12:42 GMT
         
     | 
| 
       41 
     | 
    
         
            -
                  Etag: 
         
     | 
| 
       42 
     | 
    
         
            -
                  - "\"98e77897bd1902cdc3885b7f63ba4765\""
         
     | 
| 
       43 
     | 
    
         
            -
                  Server: 
         
     | 
| 
       44 
     | 
    
         
            -
                  - nginx/1.2.2
         
     | 
| 
       45 
     | 
    
         
            -
                  Set-Cookie: 
         
     | 
| 
       46 
     | 
    
         
            -
                  - _parse_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlYmZjMTc1NWY3MzhkMzY4ZTFlNzA2OTJhNWVmODAxY2I%3D--c18a9b64bbafbd180ba894073d8e6452ee909d69; domain=.parse.com; path=/; expires=Sun, 08-Jan-2023 15:12:42 GMT; secure; HttpOnly
         
     | 
| 
       47 
     | 
    
         
            -
                  Status: 
         
     | 
| 
       48 
     | 
    
         
            -
                  - 200 OK
         
     | 
| 
       49 
     | 
    
         
            -
                  X-Runtime: 
         
     | 
| 
       50 
     | 
    
         
            -
                  - "18.138760"
         
     | 
| 
       51 
     | 
    
         
            -
                  X-Ua-Compatible: 
         
     | 
| 
       52 
     | 
    
         
            -
                  - IE=Edge,chrome=1
         
     | 
| 
       53 
     | 
    
         
            -
                  Content-Length: 
         
     | 
| 
       54 
     | 
    
         
            -
                  - "78"
         
     | 
| 
       55 
     | 
    
         
            -
                  Connection: 
         
     | 
| 
       56 
     | 
    
         
            -
                  - keep-alive
         
     | 
| 
       57 
     | 
    
         
            -
                body: 
         
     | 
| 
       58 
     | 
    
         
            -
                  encoding: ASCII-8BIT
         
     | 
| 
       59 
     | 
    
         
            -
                  string: "[{\"success\":{\"createdAt\":\"2013-01-08T15:12:26.671Z\",\"objectId\":\"YwUiZtIHgm\"}}]"
         
     | 
| 
       60 
     | 
    
         
            -
                http_version: 
         
     | 
| 
       61 
     | 
    
         
            -
              recorded_at: Tue, 08 Jan 2013 15:12:44 GMT
         
     | 
| 
       62 
     | 
    
         
            -
            recorded_with: VCR 2.0.1
         
     |