prismic.io 1.0.9 → 1.1.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/.travis.yml +0 -2
- data/Gemfile.lock +1 -1
- data/README.md +2 -1
- data/lib/prismic.rb +20 -29
- data/lib/prismic/api.rb +7 -8
- data/lib/prismic/fragments/group.rb +17 -0
- data/lib/prismic/fragments/link.rb +11 -3
- data/lib/prismic/json_parsers.rb +16 -5
- data/lib/prismic/version.rb +1 -1
- data/lib/prismic/with_fragments.rb +28 -6
- data/prismic.gemspec +10 -10
- data/spec/doc_spec.rb +15 -15
- data/spec/fragments_spec.rb +3 -1
- data/spec/lesbonneschoses_spec.rb +46 -35
- data/spec/prismic_spec.rb +86 -162
- data/spec/responses_mocks/api.json +12 -12
- data/spec/spec_helper.rb +1 -1
- metadata +2 -2
| @@ -38,7 +38,7 @@ | |
| 38 38 | 
             
                     "method":"GET",
         | 
| 39 39 | 
             
                     "rel":"collection",
         | 
| 40 40 | 
             
                     "enctype":"application/x-www-form-urlencoded",
         | 
| 41 | 
            -
                     "action":"http://lesbonneschoses.prismic.io/api/documents/search",
         | 
| 41 | 
            +
                     "action":"http://lesbonneschoses.cdn.prismic.io/api/documents/search",
         | 
| 42 42 | 
             
                     "fields":{
         | 
| 43 43 | 
             
                        "ref":{
         | 
| 44 44 | 
             
                           "type":"String"
         | 
| @@ -54,7 +54,7 @@ | |
| 54 54 | 
             
                     "method":"GET",
         | 
| 55 55 | 
             
                     "rel":"collection",
         | 
| 56 56 | 
             
                     "enctype":"application/x-www-form-urlencoded",
         | 
| 57 | 
            -
                     "action":"http://lesbonneschoses.prismic.io/api/documents/search",
         | 
| 57 | 
            +
                     "action":"http://lesbonneschoses.cdn.prismic.io/api/documents/search",
         | 
| 58 58 | 
             
                     "fields":{
         | 
| 59 59 | 
             
                        "ref":{
         | 
| 60 60 | 
             
                           "type":"String"
         | 
| @@ -70,7 +70,7 @@ | |
| 70 70 | 
             
                     "method":"GET",
         | 
| 71 71 | 
             
                     "rel":"collection",
         | 
| 72 72 | 
             
                     "enctype":"application/x-www-form-urlencoded",
         | 
| 73 | 
            -
                     "action":"http://lesbonneschoses.prismic.io/api/documents/search",
         | 
| 73 | 
            +
                     "action":"http://lesbonneschoses.cdn.prismic.io/api/documents/search",
         | 
| 74 74 | 
             
                     "fields":{
         | 
| 75 75 | 
             
                        "ref":{
         | 
| 76 76 | 
             
                           "type":"String"
         | 
| @@ -86,7 +86,7 @@ | |
| 86 86 | 
             
                     "method":"GET",
         | 
| 87 87 | 
             
                     "rel":"collection",
         | 
| 88 88 | 
             
                     "enctype":"application/x-www-form-urlencoded",
         | 
| 89 | 
            -
                     "action":"http://lesbonneschoses.prismic.io/api/documents/search",
         | 
| 89 | 
            +
                     "action":"http://lesbonneschoses.cdn.prismic.io/api/documents/search",
         | 
| 90 90 | 
             
                     "fields":{
         | 
| 91 91 | 
             
                        "ref":{
         | 
| 92 92 | 
             
                           "type":"String"
         | 
| @@ -102,7 +102,7 @@ | |
| 102 102 | 
             
                     "method":"GET",
         | 
| 103 103 | 
             
                     "rel":"collection",
         | 
| 104 104 | 
             
                     "enctype":"application/x-www-form-urlencoded",
         | 
| 105 | 
            -
                     "action":"http://lesbonneschoses.prismic.io/api/documents/search",
         | 
| 105 | 
            +
                     "action":"http://lesbonneschoses.cdn.prismic.io/api/documents/search",
         | 
| 106 106 | 
             
                     "fields":{
         | 
| 107 107 | 
             
                        "ref":{
         | 
| 108 108 | 
             
                           "type":"String"
         | 
| @@ -118,7 +118,7 @@ | |
| 118 118 | 
             
                     "method":"GET",
         | 
| 119 119 | 
             
                     "rel":"collection",
         | 
| 120 120 | 
             
                     "enctype":"application/x-www-form-urlencoded",
         | 
| 121 | 
            -
                     "action":"http://lesbonneschoses.prismic.io/api/documents/search",
         | 
| 121 | 
            +
                     "action":"http://lesbonneschoses.cdn.prismic.io/api/documents/search",
         | 
| 122 122 | 
             
                     "fields":{
         | 
| 123 123 | 
             
                        "ref":{
         | 
| 124 124 | 
             
                           "type":"String"
         | 
| @@ -134,7 +134,7 @@ | |
| 134 134 | 
             
                     "method":"GET",
         | 
| 135 135 | 
             
                     "rel":"collection",
         | 
| 136 136 | 
             
                     "enctype":"application/x-www-form-urlencoded",
         | 
| 137 | 
            -
                     "action":"http://lesbonneschoses.prismic.io/api/documents/search",
         | 
| 137 | 
            +
                     "action":"http://lesbonneschoses.cdn.prismic.io/api/documents/search",
         | 
| 138 138 | 
             
                     "fields":{
         | 
| 139 139 | 
             
                        "ref":{
         | 
| 140 140 | 
             
                           "type":"String"
         | 
| @@ -150,7 +150,7 @@ | |
| 150 150 | 
             
                     "method":"GET",
         | 
| 151 151 | 
             
                     "rel":"collection",
         | 
| 152 152 | 
             
                     "enctype":"application/x-www-form-urlencoded",
         | 
| 153 | 
            -
                     "action":"http://lesbonneschoses.prismic.io/api/documents/search",
         | 
| 153 | 
            +
                     "action":"http://lesbonneschoses.cdn.prismic.io/api/documents/search",
         | 
| 154 154 | 
             
                     "fields":{
         | 
| 155 155 | 
             
                        "ref":{
         | 
| 156 156 | 
             
                           "type":"String"
         | 
| @@ -166,7 +166,7 @@ | |
| 166 166 | 
             
                     "method":"GET",
         | 
| 167 167 | 
             
                     "rel":"collection",
         | 
| 168 168 | 
             
                     "enctype":"application/x-www-form-urlencoded",
         | 
| 169 | 
            -
                     "action":"http://lesbonneschoses.prismic.io/api/documents/search",
         | 
| 169 | 
            +
                     "action":"http://lesbonneschoses.cdn.prismic.io/api/documents/search",
         | 
| 170 170 | 
             
                     "fields":{
         | 
| 171 171 | 
             
                        "ref":{
         | 
| 172 172 | 
             
                           "type":"String"
         | 
| @@ -180,7 +180,7 @@ | |
| 180 180 | 
             
                  "everything":{
         | 
| 181 181 | 
             
                     "method":"GET",
         | 
| 182 182 | 
             
                     "enctype":"application/x-www-form-urlencoded",
         | 
| 183 | 
            -
                     "action":"http://lesbonneschoses.prismic.io/api/documents/search",
         | 
| 183 | 
            +
                     "action":"http://lesbonneschoses.cdn.prismic.io/api/documents/search",
         | 
| 184 184 | 
             
                     "fields":{
         | 
| 185 185 | 
             
                        "ref":{
         | 
| 186 186 | 
             
                           "type":"String"
         | 
| @@ -191,6 +191,6 @@ | |
| 191 191 | 
             
                     }
         | 
| 192 192 | 
             
                  }
         | 
| 193 193 | 
             
               },
         | 
| 194 | 
            -
               "oauth_initiate": "https://lesbonneschoses.prismic.io/auth",
         | 
| 195 | 
            -
               "oauth_token": "https://lesbonneschoses.prismic.io/auth/token"
         | 
| 194 | 
            +
               "oauth_initiate": "https://lesbonneschoses.cdn.prismic.io/auth",
         | 
| 195 | 
            +
               "oauth_token": "https://lesbonneschoses.cdn.prismic.io/auth/token"
         | 
| 196 196 | 
             
            }
         | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: prismic.io
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.0 | 
| 4 | 
            +
              version: 1.1.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Étienne Vallette d'Osia
         | 
| @@ -11,7 +11,7 @@ authors: | |
| 11 11 | 
             
            autorequire: 
         | 
| 12 12 | 
             
            bindir: bin
         | 
| 13 13 | 
             
            cert_chain: []
         | 
| 14 | 
            -
            date: 2014- | 
| 14 | 
            +
            date: 2014-12-23 00:00:00.000000000 Z
         | 
| 15 15 | 
             
            dependencies:
         | 
| 16 16 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 17 17 | 
             
              name: bundler
         |