From 204b61e34a592fa7995e753f111fe349f659171d Mon Sep 17 00:00:00 2001 From: Filippo Liverani Date: Wed, 25 Nov 2026 09:51:57 +0100 Subject: [PATCH 1/9] Run the spec suite offline by default Tags every example that calls micro.prismic.io with `live: true` and excludes them unless LIVE is set, so `bundle exec rspec` no longer depends on Prismic's public test repositories being reachable. The predicates specs now parse the bundled api.json mock instead of fetching micro.prismic.io and a-bool.prismic.io. The private API OAuth specs stub the HTTP client with a 401 response that carries the OAuth endpoints, replacing calls to privaterepository.prismic.io. --- README.md | 2 +- spec/cache_spec.rb | 2 +- spec/fragments_spec.rb | 2 +- spec/micro_spec.rb | 2 +- spec/oauth_spec.rb | 91 +++++++++++++------------------------- spec/predicates_spec.rb | 6 +-- spec/prismic_spec.rb | 2 +- spec/simple_search_spec.rb | 2 +- spec/spec_helper.rb | 1 + 9 files changed, 40 insertions(+), 70 deletions(-) diff --git a/README.md b/README.md index 5cb52a3..896aced 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Clone the kit, then run `bundle install`. #### Test -Please write tests for any bugfix or new feature, by placing your tests in the [spec/](spec/) folder, following the [RSpec](http://rspec.info/) syntax. Launch the tests by running `rspec` +Please write tests for any bugfix or new feature, by placing your tests in the [spec/](spec/) folder, following the [RSpec](http://rspec.info/) syntax. Run `bundle exec rspec` for the offline suite, and `LIVE=1 bundle exec rspec` to include the examples that call `micro.prismic.io`. If you find existing code that is not optimally tested and wish to make it better, we really appreciate it; but you should document it on its own branch and its own pull request. diff --git a/spec/cache_spec.rb b/spec/cache_spec.rb index 4628836..d716a07 100644 --- a/spec/cache_spec.rb +++ b/spec/cache_spec.rb @@ -1,7 +1,7 @@ # encoding: utf-8 require 'spec_helper' -describe "Cache's" do +describe "Cache's", live: true do describe 'on/off switch' do before do diff --git a/spec/fragments_spec.rb b/spec/fragments_spec.rb index 8a8a200..ca3cd08 100644 --- a/spec/fragments_spec.rb +++ b/spec/fragments_spec.rb @@ -766,7 +766,7 @@ def strong(start, stop) end end -describe 'Group' do +describe 'Group', live: true do before do @micro_api = Prismic.api('https://micro.prismic.io/api', nil) @master_ref = @micro_api.master_ref diff --git a/spec/micro_spec.rb b/spec/micro_spec.rb index 411c2a0..a3d8038 100644 --- a/spec/micro_spec.rb +++ b/spec/micro_spec.rb @@ -1,7 +1,7 @@ # encoding: utf-8 require 'spec_helper' -describe 'micro' do +describe 'micro', live: true do before do @api = Prismic.api('https://micro.prismic.io/api', nil) @master_ref = @api.master_ref diff --git a/spec/oauth_spec.rb b/spec/oauth_spec.rb index 03d4828..5242a9d 100644 --- a/spec/oauth_spec.rb +++ b/spec/oauth_spec.rb @@ -17,7 +17,7 @@ client_secret: "client_secret", } - describe "Public API" do + describe "Public API", live: true do PUBLIC_URL = "https://micro.prismic.io/api" @@ -69,71 +69,42 @@ describe "Private API" do - PRIVATE_URL = "https://privaterepository.prismic.io/api" - - it "should deny unauthenticated requests" do - expect { - Prismic.api(PRIVATE_URL, nil) - }.to raise_error(Prismic::API::PrismicWSAuthError) - end - - def catch_wserror(url) - Prismic.api(url, nil) - rescue Prismic::API::PrismicWSAuthError => e - e - end - - it "should provide the error" do - error = catch_wserror(PRIVATE_URL) - error.message.should == "Can't connect to Prismic's API: " - end - - it "should provide oauth entry points" do - error = catch_wserror(PRIVATE_URL) - error.oauth.initiate.should == "https://privaterepository.prismic.io/auth" + let(:url) { "https://private.prismic.io/api" } + let(:auth_error_body) do + JSON.dump( + error: "Invalid access token", + oauth_initiate: "https://private.prismic.io/auth", + oauth_token: "https://private.prismic.io/auth/token", + ) end + let(:http_client) { double(get: double(code: '401', body: auth_error_body, message: 'Unauthorized')) } + let(:api_opts) { { http_client: http_client, api_cache: Prismic::BasicNullCache.new } } - it "should provide oauth token" do - error = catch_wserror(PRIVATE_URL) - error.oauth.token.should == "https://privaterepository.prismic.io/auth/token" + it "raises an auth error carrying the oauth endpoints" do + expect { + Prismic.api(url, api_opts) + }.to raise_error(Prismic::API::PrismicWSAuthError) { |error| + error.message.should == "Can't connect to Prismic's API: Invalid access token" + error.oauth.initiate.should == "https://private.prismic.io/auth" + error.oauth.token.should == "https://private.prismic.io/auth/token" + } end - describe "oauth_initiate_url" do - - it "should returns the URL" do - url = Prismic.oauth_initiate_url(PRIVATE_URL, OAUTH_INITIATE_OPTS) - expected_url = [ - "https://privaterepository.prismic.io/auth?client_id=client_id", - "redirect_uri=http%3A%2F%2Fmyapp.com%2Fcallback", - "scope=master%2Breleases", - ].join("&") - url.should == expected_url - end - - it "should returns the URL (with access_token)" do - url = Prismic.oauth_initiate_url(PRIVATE_URL, OAUTH_INITIATE_OPTS, "token") - expected_url = [ - "https://privaterepository.prismic.io/auth?client_id=client_id", - "redirect_uri=http%3A%2F%2Fmyapp.com%2Fcallback", - "scope=master%2Breleases", - ].join("&") - url.should == expected_url - end - + it "builds the oauth initiate URL from the auth error" do + initiate_url = Prismic.oauth_initiate_url(url, OAUTH_INITIATE_OPTS, api_opts) + expected_url = [ + "https://private.prismic.io/auth?client_id=client_id", + "redirect_uri=http%3A%2F%2Fmyapp.com%2Fcallback", + "scope=master%2Breleases", + ].join("&") + initiate_url.should == expected_url end - describe "oauth_check_token" do - - it "should returns the URL" do - expect { - Prismic::API.oauth_check_token(PRIVATE_URL, OAUTH_CHECKTOKEN_OPTS) - }.to raise_error( - # we don't want to get a PrismicWSAuthError error here - Prismic::API::PrismicWSConnectionError, - "Can't connect to Prismic's API: 400 Bad Request" - ) - end - + it "checks the token against the endpoint from the auth error" do + http_client.should_receive(:post) + .with("https://private.prismic.io/auth/token", OAUTH_CHECKTOKEN_OPTS) + .and_return(double(code: '200', body: JSON.dump(access_token: "the_access_token"))) + Prismic.oauth_check_token(url, OAUTH_CHECKTOKEN_OPTS, api_opts).should == "the_access_token" end end diff --git a/spec/predicates_spec.rb b/spec/predicates_spec.rb index 15bed68..20b628b 100644 --- a/spec/predicates_spec.rb +++ b/spec/predicates_spec.rb @@ -5,11 +5,9 @@ describe 'predicates' do before do - @api = Prismic.api('https://micro.prismic.io/api', nil) - @master_ref = @api.master_ref + @api = Prismic::API.parse_api_response(JSON.parse(File.read("#{File.dirname(__FILE__)}/responses_mocks/api.json")), nil, nil, false) @link_resolver = Prismic.link_resolver('master'){|doc_link| "http://localhost/#{doc_link.id}" } - @boolean_api = Prismic.api("https://a-bool.prismic.io/api", nil) - @boolean_api_master_ref = @boolean_api.master_ref + @boolean_api = @api end describe 'boolean query' do diff --git a/spec/prismic_spec.rb b/spec/prismic_spec.rb index 9dded93..c4e4ec6 100644 --- a/spec/prismic_spec.rb +++ b/spec/prismic_spec.rb @@ -262,7 +262,7 @@ def oauth_initiate_url def redirect_uri_encoded CGI.escape(@redirect_uri) end - it 'build a valid url' do + it 'build a valid url', live: true do oauth_initiate_url.should == "https://micro.prismic.io/auth?client_id=#@client_id&redirect_uri=#{redirect_uri_encoded}&scope=#@scope" end end diff --git a/spec/simple_search_spec.rb b/spec/simple_search_spec.rb index 8b6beab..3c5e52c 100644 --- a/spec/simple_search_spec.rb +++ b/spec/simple_search_spec.rb @@ -1,7 +1,7 @@ # encoding: utf-8 require 'spec_helper' -describe Prismic::API do +describe Prismic::API, live: true do before do @api = Prismic.api('https://micro.prismic.io/api', nil) end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e2e664e..3986b78 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -10,6 +10,7 @@ RSpec.configure do |c| # Stop after the first failure # c.fail_fast = true + c.filter_run_excluding live: true unless ENV['LIVE'] end $LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib') From 36efda6452729fb1a9296c404de59fea41afefd4 Mon Sep 17 00:00:00 2001 From: Filippo Liverani Date: Wed, 25 Nov 2026 09:52:07 +0100 Subject: [PATCH 2/9] Remove Travis, OSSAR, YARD docs and npm tooling The fork runs CI on GitHub Actions and does not publish API docs. Deletes the Travis config and its README badges, the OSSAR workflow, the generated docs/ tree with its .yardopts, and the gulp and npm files with their node_modules ignore entry. --- .github/workflows/ossar-analysis.yml | 44 - .gitignore | 1 - .travis.yml | 30 - .yardopts | 2 - CONTRIBUTING.md | 1 - README.md | 3 - docs/Prismic.html | 1072 ------ docs/Prismic/API.html | 3141 ---------------- docs/Prismic/API/BadPrismicResponseError.html | 148 - docs/Prismic/API/OAuth.html | 561 --- docs/Prismic/API/PrismicWSAuthError.html | 376 -- .../Prismic/API/PrismicWSConnectionError.html | 222 -- docs/Prismic/BasicNullCache.html | 256 -- docs/Prismic/DefaultHTTPClient.html | 356 -- docs/Prismic/Document.html | 1069 ------ docs/Prismic/Error.html | 419 --- docs/Prismic/Experiment.html | 634 ---- docs/Prismic/Experiments.html | 634 ---- docs/Prismic/Field.html | 425 --- docs/Prismic/Form.html | 828 ----- docs/Prismic/Fragments.html | 117 - docs/Prismic/Fragments/Color.html | 633 ---- docs/Prismic/Fragments/Date.html | 400 --- docs/Prismic/Fragments/DocumentLink.html | 1050 ------ docs/Prismic/Fragments/Embed.html | 680 ---- docs/Prismic/Fragments/FileLink.html | 605 ---- docs/Prismic/Fragments/Fragment.html | 340 -- docs/Prismic/Fragments/GeoPoint.html | 470 --- docs/Prismic/Fragments/Group.html | 712 ---- docs/Prismic/Fragments/GroupDocument.html | 384 -- docs/Prismic/Fragments/Image.html | 781 ---- docs/Prismic/Fragments/Image/View.html | 760 ---- .../Image/ViewDoesNotExistException.html | 148 - docs/Prismic/Fragments/ImageLink.html | 337 -- docs/Prismic/Fragments/Link.html | 413 --- docs/Prismic/Fragments/Multiple.html | 514 --- docs/Prismic/Fragments/Number.html | 402 --- docs/Prismic/Fragments/Select.html | 350 -- docs/Prismic/Fragments/Separator.html | 397 -- docs/Prismic/Fragments/Slice.html | 633 ---- docs/Prismic/Fragments/SliceZone.html | 475 --- docs/Prismic/Fragments/StructuredText.html | 665 ---- .../Fragments/StructuredText/Block.html | 233 -- .../Fragments/StructuredText/Block/Embed.html | 368 -- .../StructuredText/Block/Heading.html | 367 -- .../Fragments/StructuredText/Block/Image.html | 756 ---- .../StructuredText/Block/ListItem.html | 373 -- .../StructuredText/Block/Paragraph.html | 224 -- .../StructuredText/Block/Preformatted.html | 224 -- .../Fragments/StructuredText/Block/Text.html | 822 ----- .../Fragments/StructuredText/BlockGroup.html | 424 --- .../Fragments/StructuredText/Span.html | 385 -- .../Fragments/StructuredText/Span/Em.html | 214 -- .../StructuredText/Span/Hyperlink.html | 360 -- .../Fragments/StructuredText/Span/Label.html | 363 -- .../Fragments/StructuredText/Span/Strong.html | 214 -- docs/Prismic/Fragments/Text.html | 397 -- docs/Prismic/Fragments/Timestamp.html | 400 --- docs/Prismic/Fragments/WebLink.html | 341 -- docs/Prismic/HtmlSerializer.html | 271 -- docs/Prismic/JsonParser.html | 1766 --------- docs/Prismic/LinkResolver.html | 400 --- docs/Prismic/LruCache.html | 1141 ------ docs/Prismic/Predicates.html | 1682 --------- docs/Prismic/Ref.html | 644 ---- docs/Prismic/Response.html | 1161 ------ docs/Prismic/SearchForm.html | 2173 ----------- .../SearchForm/AuthenticationException.html | 148 - .../SearchForm/AuthorizationException.html | 148 - .../SearchForm/FormSearchException.html | 148 - .../Prismic/SearchForm/NoRefSetException.html | 148 - .../SearchForm/RefNotFoundException.html | 148 - .../SearchForm/UnsupportedFormKind.html | 148 - docs/Prismic/Variation.html | 547 --- docs/Prismic/WithFragments.html | 1805 ---------- docs/_index.html | 749 ---- docs/class_list.html | 51 - docs/css/common.css | 1 - docs/css/full_list.css | 58 - docs/css/style.css | 492 --- docs/file.README.html | 145 - docs/file_list.html | 56 - docs/frames.html | 17 - docs/index.html | 145 - docs/js/app.js | 243 -- docs/js/full_list.js | 216 -- docs/js/jquery.js | 4 - docs/method_list.html | 3187 ----------------- docs/top-level-namespace.html | 110 - gulpfile.js | 23 - package-lock.json | 2629 -------------- package.json | 10 - 92 files changed, 48567 deletions(-) delete mode 100644 .github/workflows/ossar-analysis.yml delete mode 100644 .travis.yml delete mode 100644 .yardopts delete mode 100644 docs/Prismic.html delete mode 100644 docs/Prismic/API.html delete mode 100644 docs/Prismic/API/BadPrismicResponseError.html delete mode 100644 docs/Prismic/API/OAuth.html delete mode 100644 docs/Prismic/API/PrismicWSAuthError.html delete mode 100644 docs/Prismic/API/PrismicWSConnectionError.html delete mode 100644 docs/Prismic/BasicNullCache.html delete mode 100644 docs/Prismic/DefaultHTTPClient.html delete mode 100644 docs/Prismic/Document.html delete mode 100644 docs/Prismic/Error.html delete mode 100644 docs/Prismic/Experiment.html delete mode 100644 docs/Prismic/Experiments.html delete mode 100644 docs/Prismic/Field.html delete mode 100644 docs/Prismic/Form.html delete mode 100644 docs/Prismic/Fragments.html delete mode 100644 docs/Prismic/Fragments/Color.html delete mode 100644 docs/Prismic/Fragments/Date.html delete mode 100644 docs/Prismic/Fragments/DocumentLink.html delete mode 100644 docs/Prismic/Fragments/Embed.html delete mode 100644 docs/Prismic/Fragments/FileLink.html delete mode 100644 docs/Prismic/Fragments/Fragment.html delete mode 100644 docs/Prismic/Fragments/GeoPoint.html delete mode 100644 docs/Prismic/Fragments/Group.html delete mode 100644 docs/Prismic/Fragments/GroupDocument.html delete mode 100644 docs/Prismic/Fragments/Image.html delete mode 100644 docs/Prismic/Fragments/Image/View.html delete mode 100644 docs/Prismic/Fragments/Image/ViewDoesNotExistException.html delete mode 100644 docs/Prismic/Fragments/ImageLink.html delete mode 100644 docs/Prismic/Fragments/Link.html delete mode 100644 docs/Prismic/Fragments/Multiple.html delete mode 100644 docs/Prismic/Fragments/Number.html delete mode 100644 docs/Prismic/Fragments/Select.html delete mode 100644 docs/Prismic/Fragments/Separator.html delete mode 100644 docs/Prismic/Fragments/Slice.html delete mode 100644 docs/Prismic/Fragments/SliceZone.html delete mode 100644 docs/Prismic/Fragments/StructuredText.html delete mode 100644 docs/Prismic/Fragments/StructuredText/Block.html delete mode 100644 docs/Prismic/Fragments/StructuredText/Block/Embed.html delete mode 100644 docs/Prismic/Fragments/StructuredText/Block/Heading.html delete mode 100644 docs/Prismic/Fragments/StructuredText/Block/Image.html delete mode 100644 docs/Prismic/Fragments/StructuredText/Block/ListItem.html delete mode 100644 docs/Prismic/Fragments/StructuredText/Block/Paragraph.html delete mode 100644 docs/Prismic/Fragments/StructuredText/Block/Preformatted.html delete mode 100644 docs/Prismic/Fragments/StructuredText/Block/Text.html delete mode 100644 docs/Prismic/Fragments/StructuredText/BlockGroup.html delete mode 100644 docs/Prismic/Fragments/StructuredText/Span.html delete mode 100644 docs/Prismic/Fragments/StructuredText/Span/Em.html delete mode 100644 docs/Prismic/Fragments/StructuredText/Span/Hyperlink.html delete mode 100644 docs/Prismic/Fragments/StructuredText/Span/Label.html delete mode 100644 docs/Prismic/Fragments/StructuredText/Span/Strong.html delete mode 100644 docs/Prismic/Fragments/Text.html delete mode 100644 docs/Prismic/Fragments/Timestamp.html delete mode 100644 docs/Prismic/Fragments/WebLink.html delete mode 100644 docs/Prismic/HtmlSerializer.html delete mode 100644 docs/Prismic/JsonParser.html delete mode 100644 docs/Prismic/LinkResolver.html delete mode 100644 docs/Prismic/LruCache.html delete mode 100644 docs/Prismic/Predicates.html delete mode 100644 docs/Prismic/Ref.html delete mode 100644 docs/Prismic/Response.html delete mode 100644 docs/Prismic/SearchForm.html delete mode 100644 docs/Prismic/SearchForm/AuthenticationException.html delete mode 100644 docs/Prismic/SearchForm/AuthorizationException.html delete mode 100644 docs/Prismic/SearchForm/FormSearchException.html delete mode 100644 docs/Prismic/SearchForm/NoRefSetException.html delete mode 100644 docs/Prismic/SearchForm/RefNotFoundException.html delete mode 100644 docs/Prismic/SearchForm/UnsupportedFormKind.html delete mode 100644 docs/Prismic/Variation.html delete mode 100644 docs/Prismic/WithFragments.html delete mode 100644 docs/_index.html delete mode 100644 docs/class_list.html delete mode 100644 docs/css/common.css delete mode 100644 docs/css/full_list.css delete mode 100644 docs/css/style.css delete mode 100644 docs/file.README.html delete mode 100644 docs/file_list.html delete mode 100644 docs/frames.html delete mode 100644 docs/index.html delete mode 100644 docs/js/app.js delete mode 100644 docs/js/full_list.js delete mode 100644 docs/js/jquery.js delete mode 100644 docs/method_list.html delete mode 100644 docs/top-level-namespace.html delete mode 100644 gulpfile.js delete mode 100644 package-lock.json delete mode 100644 package.json diff --git a/.github/workflows/ossar-analysis.yml b/.github/workflows/ossar-analysis.yml deleted file mode 100644 index cb83205..0000000 --- a/.github/workflows/ossar-analysis.yml +++ /dev/null @@ -1,44 +0,0 @@ -# This workflow integrates a collection of open source static analysis tools -# with GitHub code scanning. For documentation, or to provide feedback, visit -# https://github.com/github/ossar-action -name: OSSAR - -on: - push: - branches: [ master ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ master ] - schedule: - - cron: '39 19 * * 0' - -jobs: - OSSAR-Scan: - # OSSAR runs on windows-latest. - # ubuntu-latest and macos-latest support coming soon - runs-on: windows-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - # Ensure a compatible version of dotnet is installed. - # The [Microsoft Security Code Analysis CLI](https://aka.ms/mscadocs) is built with dotnet v3.1.201. - # A version greater than or equal to v3.1.201 of dotnet must be installed on the agent in order to run this action. - # GitHub hosted runners already have a compatible version of dotnet installed and this step may be skipped. - # For self-hosted runners, ensure dotnet version 3.1.201 or later is installed by including this action: - # - name: Install .NET - # uses: actions/setup-dotnet@v1 - # with: - # dotnet-version: '3.1.x' - - # Run open source static analysis tools - - name: Run OSSAR - uses: github/ossar-action@v1 - id: ossar - - # Upload results to the Security tab - - name: Upload OSSAR results - uses: github/codeql-action/upload-sarif@v1 - with: - sarif_file: ${{ steps.ossar.outputs.sarifFile }} diff --git a/.gitignore b/.gitignore index a13c469..e6c76eb 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,4 @@ pkg/*.gem .idea/ .yardoc/ doc/ -node_modules/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 426af67..0000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: ruby -rvm: -- 2.6 -- 2.5 -cache: bundler -before_install: gem install bundler -script: bundle exec rspec spec -jobs: - include: - - rvm: jruby-head - before_install: - - gem install bundler -v 2.1.4 -N - install: - - bundle _2.1.4_ install --jobs=3 --retry=3 --deployment - script: - - bundle _2.1.4_ exec rspec spec -notifications: - email: - - sebastien@prismic.io - - fares.droubi@prismic.io -deploy: - provider: rubygems - api_key: - secure: F/k9ZOYNaWIPQQiBAikbFCwNK4oph4+sZbH6aIXdbi6q+GXQEe1m59z3zqJovxbvZfoqs5ohCY1R352+R280iBRTRq/0Cxcl7ouSHqU9aKwGAYoLfB1mbWVdjykqMlP5k1bYWDi8WyJEjYxRTEkO6hXUAp3q7Qj1AbqHQUFbSdY= - gem: prismic.io - gemspec: prismic.gemspec - on: - tags: true - repo: prismicio-community/ruby-kit - skip_cleanup: 'true' diff --git a/.yardopts b/.yardopts deleted file mode 100644 index 8eecf14..0000000 --- a/.yardopts +++ /dev/null @@ -1,2 +0,0 @@ ---markup markdown ---output-dir ./docs diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8552593..82b25ed 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,4 @@ [![Gem Version](https://badge.fury.io/rb/prismic.io.png)](http://badge.fury.io/rb/prismic.io) -[![Build Status](https://travis-ci.com/prismicio-community/ruby-kit.svg?branch=master)](https://travis-ci.com/prismicio-community/ruby-kit) ## How to contribute to this kit diff --git a/README.md b/README.md index 896aced..0f235eb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ ## Ruby development kit for prismic.io [![Gem Version](https://badge.fury.io/rb/prismic.io.png)](http://badge.fury.io/rb/prismic.io) -[![Build Status](https://travis-ci.com/prismicio-community/ruby-kit.svg?branch=master)](https://travis-ci.com/prismicio-community/ruby-kit) ### Getting Started @@ -59,8 +58,6 @@ If you find existing code that is not optimally tested and wish to make it bette #### Documentation -Please document any bugfix or new feature, using the [Yard](http://yardoc.org/) syntax. Don't worry about generating the doc, we'll take care of that. - If you find existing code that is not optimally documented and wish to make it better, we really appreciate it; but you should document it on its own branch and its own pull request. ### Contributing diff --git a/docs/Prismic.html b/docs/Prismic.html deleted file mode 100644 index 0345cd1..0000000 --- a/docs/Prismic.html +++ /dev/null @@ -1,1072 +0,0 @@ - - - - - - - Module: Prismic - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Prismic - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic.rb,
- lib/prismic/api.rb,
lib/prismic/form.rb,
lib/prismic/version.rb,
lib/prismic/cache/lru.rb,
lib/prismic/predicates.rb,
lib/prismic/experiments.rb,
lib/prismic/json_parsers.rb,
lib/prismic/fragments/date.rb,
lib/prismic/fragments/link.rb,
lib/prismic/fragments/text.rb,
lib/prismic/with_fragments.rb,
lib/prismic/fragments/color.rb,
lib/prismic/fragments/embed.rb,
lib/prismic/fragments/group.rb,
lib/prismic/fragments/image.rb,
lib/prismic/fragments/number.rb,
lib/prismic/fragments/select.rb,
lib/prismic/fragments/slices.rb,
lib/prismic/fragments/fragment.rb,
lib/prismic/fragments/geopoint.rb,
lib/prismic/fragments/multiple.rb,
lib/prismic/fragments/separator.rb,
lib/prismic/fragments/timestamp.rb,
lib/prismic/fragments/structured_text.rb
-
-
- -
- -

Defined Under Namespace

-

- - - Modules: DefaultHTTPClient, Fragments, JsonParser, Predicates, WithFragments - - - - Classes: API, BasicNullCache, Document, Error, Experiment, Experiments, Field, Form, HtmlSerializer, LinkResolver, LruCache, Ref, Response, SearchForm, Variation - - -

- -

Constant Summary

-
- - -
'io.prismic.experiment'
- - -
'io.prismic.preview'
- -
VERSION = - -
-
'1.4.3'
- -
DefaultCache = -
-
-

This default instance is used by the API to avoid creating a new instance -per request (which would make the cache useless).

- - -
-
-
- - -
-
-
LruCache.new
- -
- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - - .api(url) ⇒ API - - .api(url, opts) ⇒ API - - .api(url, access_token) ⇒ API - - - - - - -

-
-

Return an API instance -The access token and HTTP client can be provided.

- -

The HTTP Client must responds to same method than DefaultHTTPClient.

- - -
-
-
- -

Overloads:

-
    - - -
  • - .api(url) ⇒ API -
    -
    -

    Simpler syntax (no configuration)

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - url - - - (String) - - - - — -

      The URL of the prismic.io repository

      -
      - -
    • - -
    - - -
    -
  • - - -
  • - .api(url, opts) ⇒ API -
    -
    -

    Standard use

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - url - - - (String) - - - - — -

      The URL of the prismic.io repository

      -
      - -
    • - -
    • - - opts - - - (Hash) - - - - — -

      The options

      -
      - -
    • - -
    - - - - - - -

    Options Hash (opts):

    -
      - -
    • - :access_token - (String) - - - — default: - nil - - - - —

      The access_token

      -
      - -
    • - -
    • - :http_client - (Object) - - - — default: - DefaultHTTPClient - - - - —

      The HTTP client to use

      -
      - -
    • - -
    • - :cache - (Object) - - - — default: - nil - - - - —

      The caching object (for instance Prismic::Cache) to use, or false for no caching

      -
      - -
    • - -
    - - - -
    -
  • - - -
  • - .api(url, access_token) ⇒ API -
    -
    -

    Provide the access_token (only)

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - url - - - (String) - - - - — -

      The URL of the prismic.io repository

      -
      - -
    • - -
    • - - access_token - - - (String) - - - - — -

      The access token

      -
      - -
    • - -
    - - -
    -
  • - -
- -

Returns:

-
    - -
  • - - - (API) - - - - — -

    The API instance related to this repository

    -
    - -
  • - -
-

Raises:

-
    - -
  • - - - - - - - -

    PrismicWSConnectionError

    -
    - -
  • - -
- -
- - - - -
-
-
-
-64
-65
-66
-67
-68
-69
-70
-71
-
-
# File 'lib/prismic.rb', line 64
-
-def self.api(url, opts=nil)
-  if (not url =~ /\A#{URI::regexp(['http', 'https'])}\z/)
-    raise ArgumentError.new("Valid web URI expected")
-  end
-  opts ||= {}
-  opts = {access_token: opts} if opts.is_a?(String)
-  API.start(url, opts)
-end
-
-
- -
-

- - .html_serializer(&blk) ⇒ Object - - - - - -

- - - - -
-
-
-
-637
-638
-639
-
-
# File 'lib/prismic.rb', line 637
-
-def self.html_serializer(&blk)
-  HtmlSerializer.new(&blk)
-end
-
-
- -
-
-
-

Build a LinkResolver instance -The LinkResolver will help to build URL specific to an application, based -on a generic prismic.io's Document link.

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (Ref) - - - - — -

    The ref to use

    -
    - -
  • - -
- -

Yield Parameters:

- -

Yield Returns:

-
    - -
  • - - - (String) - - - - — -

    The application specific URL of the given document

    -
    - -
  • - -
-

Returns:

- - -
- - - - -
-
-
-
-633
-634
-635
-
-
# File 'lib/prismic.rb', line 633
-
-def self.link_resolver(ref, &blk)
-  LinkResolver.new(ref, &blk)
-end
-
-
- -
-

- - .oauth_check_token(url, oauth_opts, api_opts = nil) ⇒ String - - - - - -

-
-

Check a token and return an access_token

- -

This method allows to check the token received when the user has been -redirected from the OAuth2 server. It returns an access_token that can -be used to authenticate the user on the API.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    The URL of the prismic.io repository

    -
    - -
  • - -
  • - - oauth_opts - - - (Hash) - - - - — -

    The OAuth2 options

    -
    - -
  • - -
  • - - api_opts - - - (Hash) - - - (defaults to: nil) - - - — -

    The API options (the same than accepted by the -api method)

    -
    - -
  • - -
- - - - - - -

Options Hash (oauth_opts):

-
    - -
  • - :client_id - (String) - - - - - —

    The Application's client ID

    -
    - -
  • - -
  • - :redirect_uri - (String) - - - - - —

    The Application's secret

    -
    - -
  • - -
- - - - -

Returns:

-
    - -
  • - - - (String) - - - - — -

    the access_token

    -
    - -
  • - -
-

Raises:

-
    - -
  • - - - - - - - -

    PrismicWSConnectionError

    -
    - -
  • - -
- -
- - - - -
-
-
-
-115
-116
-117
-118
-119
-
-
# File 'lib/prismic.rb', line 115
-
-def self.oauth_check_token(url, oauth_opts, api_opts=nil)
-  api_opts ||= {}
-  api_opts = {access_token: api_opts} if api_opts.is_a?(String)
-  API.oauth_check_token(url, oauth_opts, api_opts)
-end
-
-
- -
-

- - .oauth_initiate_url(url, oauth_opts, api_opts = nil) ⇒ String - - - - - -

-
-

Build the URL where the user can be redirected to authenticated himself -using OAuth2. -@note: The endpoint depends on the repository, so an API call is made to -fetch it.

- - -
-
-
-

Parameters:

-
    - -
  • - - url - - - (String) - - - - — -

    The URL of the prismic.io repository

    -
    - -
  • - -
  • - - oauth_opts - - - (Hash) - - - - — -

    The OAuth2 options

    -
    - -
  • - -
  • - - api_opts - - - (Hash) - - - (defaults to: nil) - - - — -

    The API options (the same than accepted by the api -method)

    -
    - -
  • - -
- - - - - - -

Options Hash (oauth_opts):

-
    - -
  • - :client_id - (String) - - - - - —

    The Application's client ID

    -
    - -
  • - -
  • - :redirect_uri - (String) - - - - - —

    The Application's secret

    -
    - -
  • - -
  • - :scope - (String) - - - - - —

    The desired scope

    -
    - -
  • - -
- - - - -

Returns:

-
    - -
  • - - - (String) - - - - — -

    The built URL

    -
    - -
  • - -
-

Raises:

-
    - -
  • - - - - - - - -

    PrismicWSConnectionError

    -
    - -
  • - -
- -
- - - - -
-
-
-
-92
-93
-94
-95
-96
-
-
# File 'lib/prismic.rb', line 92
-
-def self.oauth_initiate_url(url, oauth_opts, api_opts=nil)
-  api_opts ||= {}
-  api_opts = {access_token: api_opts} if api_opts.is_a?(String)
-  API.oauth_initiate_url(url, oauth_opts, api_opts)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/API.html b/docs/Prismic/API.html deleted file mode 100644 index 77f92c1..0000000 --- a/docs/Prismic/API.html +++ /dev/null @@ -1,3141 +0,0 @@ - - - - - - - Class: Prismic::API - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::API - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/api.rb
-
- -
- -

Overview

-
-

The API is the main class

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: BadPrismicResponseError, OAuth, PrismicWSAuthError, PrismicWSConnectionError - - -

- -

Constant Summary

-
- -
@@warned_create_search_form = - -
-
false
- -
@@warned_oauth_initiate_url = - -
-
false
- -
@@warned_oauth_check_token = - -
-
false
- -
- - - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(json, access_token, http_client, cache) {|_self| ... } ⇒ API - - - - - -

-
-

Returns a new instance of API

- - -
-
-
- -

Yields:

-
    - -
  • - - - (_self) - - - -
  • - -
-

Yield Parameters:

-
    - -
  • - - _self - - - (Prismic::API) - - - - — -

    the object that the method was called on

    -
    - -
  • - -
-

Raises:

- - -
- - - - -
-
-
-
-37
-38
-39
-40
-41
-42
-43
-44
-45
-
-
# File 'lib/prismic/api.rb', line 37
-
-def initialize(json, access_token, http_client, cache)
-  @json = json
-  @access_token = access_token
-  @http_client = http_client
-  yield self if block_given?
-  @cache = cache
-  self.master = refs.values && refs.values.map { |ref| ref if ref.master? }.compact.first
-  raise BadPrismicResponseError, 'No master Ref found' unless master
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #access_token ⇒ String (readonly) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'lib/prismic/api.rb', line 11
-
-def access_token
-  @access_token
-end
-
-
- - - -
-

- - #bookmarks ⇒ Hash{String => String} - - - - - -

-
-

Returns list of bookmarks, as name -> documentId

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash{String => String}) - - - - — -

    list of bookmarks, as name -> documentId

    -
    - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'lib/prismic/api.rb', line 16
-
-def bookmarks
-  @bookmarks
-end
-
-
- - - -
-

- - #cache ⇒ Object - - - - - -

-
-

Returns the value of attribute cache

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'lib/prismic/api.rb', line 19
-
-def cache
-  @cache
-end
-
-
- - - -
-

- - #experiments ⇒ Experiments - - - - - -

-
-

Returns list of all experiments from Prismic

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Experiments) - - - - — -

    list of all experiments from Prismic

    -
    - -
  • - -
- -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'lib/prismic/api.rb', line 21
-
-def experiments
-  @experiments
-end
-
-
- - - -
-

- - #forms ⇒ Hash{String => Form} - - - - - -

-
-

Returns list of forms, as name -> Form

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash{String => Form}) - - - - — -

    list of forms, as name -> Form

    -
    - -
  • - -
- -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'lib/prismic/api.rb', line 18
-
-def forms
-  @forms
-end
-
-
- - - -
-

- - #http_client ⇒ Object (readonly) - - - - - -

-
-

Returns the value of attribute http_client

- - -
-
-
- - -
- - - - -
-
-
-
-12
-13
-14
-
-
# File 'lib/prismic/api.rb', line 12
-
-def http_client
-  @http_client
-end
-
-
- - - -
-

- - #json ⇒ Object (readonly) - - - - - -

-
-

Returns the value of attribute json

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'lib/prismic/api.rb', line 9
-
-def json
-  @json
-end
-
-
- - - -
-

- - #master ⇒ Ref - - - - Also known as: - master_ref - - - - -

-
-

Returns the master reference

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Ref) - - - - — -

    The master reference

    -
    - -
  • - -
- -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'lib/prismic/api.rb', line 34
-
-def master
-  @master
-end
-
-
- - - -
-

- - #oauth ⇒ Object - - - - - -

-
-

Returns the value of attribute oauth

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'lib/prismic/api.rb', line 19
-
-def oauth
-  @oauth
-end
-
-
- - - -
-

- - #refs ⇒ Hash{String => Ref} - - - - - -

-
-

Returns list of references, as label -> reference

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash{String => Ref}) - - - - — -

    list of references, as label -> reference

    -
    - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'lib/prismic/api.rb', line 14
-
-def refs
-  @refs
-end
-
-
- - - -
-

- - #tags ⇒ Object - - - - - -

-
-

Returns the value of attribute tags

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'lib/prismic/api.rb', line 19
-
-def tags
-  @tags
-end
-
-
- - - -
-

- - #types ⇒ Object - - - - - -

-
-

Returns the value of attribute types

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'lib/prismic/api.rb', line 19
-
-def types
-  @types
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .get(url, access_token = nil, http_client = Prismic::DefaultHTTPClient, api_cache = Prismic::DefaultCache) ⇒ Object - - - - - -

-
-

Fetch the API information from the Prismic.io server

- - -
-
-
- - -
- - - - -
-
-
-
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-
-
# File 'lib/prismic/api.rb', line 164
-
-def self.get(url, access_token=nil, http_client=Prismic::DefaultHTTPClient, api_cache=Prismic::DefaultCache)
-  data = {}
-  data['access_token'] = access_token if access_token
-  cache_key = url + (access_token ? ('#' + access_token) : '')
-  api_cache.get_or_set(cache_key, nil, 5) {
-    res = http_client.get(url, data, 'Accept' => 'application/json')
-    case res.code
-    when '200'
-      res
-    when '401', '403'
-      begin
-        json = JSON.load(res.body)
-        raise PrismicWSAuthError.new(
-          json['error'],
-          json['oauth_initiate'],
-          json['oauth_token'],
-          http_client
-        )
-      rescue => e
-        raise PrismicWSConnectionError.new(res, e)
-      end
-    else
-      raise PrismicWSConnectionError, res
-    end
-  }
-end
-
-
- -
-

- - .oauth_check_token(url, oauth_params, api_opts = {}) ⇒ Object - - - - - -

- - - - -
-
-
-
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-
-
# File 'lib/prismic/api.rb', line 242
-
-def self.oauth_check_token(url, oauth_params, api_opts={})
-  oauth =
-      begin
-        api = self.start(url, api_opts)
-        api.oauth
-      rescue PrismicWSAuthError => e
-        e.oauth
-      end
-  oauth.check_token(oauth_params)
-end
-
-
- -
-

- - .oauth_initiate_url(url, oauth_opts, api_opts = {}) ⇒ Object - - - - - -

- - - - -
-
-
-
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-
-
# File 'lib/prismic/api.rb', line 222
-
-def self.oauth_initiate_url(url, oauth_opts, api_opts={})
-  oauth =
-      begin
-        api = self.start(url, api_opts)
-        api.oauth
-      rescue PrismicWSAuthError => e
-        e.oauth
-      end
-  oauth.initiate_url(oauth_opts)
-end
-
-
- -
-

- - .parse_api_response(data, access_token, http_client, cache) ⇒ Object - - - - - -

- - - - -
-
-
-
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-
-
# File 'lib/prismic/api.rb', line 203
-
-def self.parse_api_response(data, access_token, http_client, cache)
-  data_forms = data['forms'] || []
-  data_refs = data.fetch('refs'){ raise BadPrismicResponseError, "No refs given" }
-  new(data, access_token, http_client, cache) {|api|
-    api.bookmarks = data['bookmarks']
-    api.forms = Hash[data_forms.map { |k, form|
-      [k, Form.from_json(api, form)]
-    }]
-    api.refs = Hash[data_refs.map { |ref|
-      scheduled_at = ref['scheduledAt']
-      [ref['label'].downcase, Ref.new(ref['id'], ref['ref'], ref['label'], ref['isMasterRef'], scheduled_at && Time.at(scheduled_at / 1000.0))]
-    }]
-    api.tags = data['tags']
-    api.types = data['types']
-    api.oauth = OAuth.new(data['oauth_initiate'], data['oauth_token'], http_client)
-    api.experiments = Experiments.parse(data['experiments'])
-  }
-end
-
-
- -
-

- - .start(url, opts = {}) ⇒ Object - - - - - -

- - - - -
-
-
-
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-
-
# File 'lib/prismic/api.rb', line 191
-
-def self.start(url, opts={})
-  http_client = opts[:http_client] || Prismic::DefaultHTTPClient
-  access_token = opts[:access_token]
-  # We don't use ||= because we want to keep the DefaultCache if nil was explicitly passed
-  api_cache = opts.has_key?(:api_cache) ? opts[:api_cache] : Prismic::DefaultCache
-  cache = opts.has_key?(:cache) ? opts[:cache] : Prismic::DefaultCache
-
-  resp = get(url, access_token, http_client, api_cache)
-  json = JSON.load(resp.body)
-  parse_api_response(json, access_token, http_client, cache)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #all(opts = {}) ⇒ Object - - - - - -

-
-

Retrieve all documents (paginated)

- - -
-
-
-

Parameters:

-
    - -
  • - - opts - - - (Hash) - - - (defaults to: {}) - - - — -

    query options (page, pageSize, ref, etc.)

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-96
-97
-98
-99
-
-
# File 'lib/prismic/api.rb', line 96
-
-def all(opts={})
-  ref = opts['ref'] || opts[:ref] || self.master.ref
-  form('everything', opts).submit(ref)
-end
-
-
- -
-

- - #as_json ⇒ Object - - - - - -

- - - - -
-
-
-
-159
-160
-161
-
-
# File 'lib/prismic/api.rb', line 159
-
-def as_json
-  @json
-end
-
-
- -
-

- - #bookmark(name) ⇒ String - - - - - -

-
-

Get a bookmark by its name

- - -
-
-
-

Parameters:

-
    - -
  • - - The - - - (String) - - - - — -

    bookmark's name

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    The bookmark document id

    -
    - -
  • - -
- -
- - - - -
-
-
-
-52
-53
-54
-
-
# File 'lib/prismic/api.rb', line 52
-
-def bookmark(name)
-  bookmarks[name]
-end
-
-
- -
-

- - #create_search_form(name, data = {}, ref = {}) ⇒ Object - - - - - -

-
-
Deprecated.

Use #form instead.

-
- - -
-
-
- - -
- - - - -
-
-
-
-78
-79
-80
-81
-82
-83
-84
-
-
# File 'lib/prismic/api.rb', line 78
-
-def create_search_form(name, data={}, ref={})
-  unless @@warned_create_search_form
-    warn '[DEPRECATION] `create_search_form` is deprecated.  Please use `form` instead.'
-    @@warned_create_search_form = true
-  end
-  form(name, data, ref)
-end
-
-
- -
-

- - #form(name, data = {}, ref = {}) ⇒ SearchForm - - - - - -

-
-

Returns a search form by its name. This is where you start to query a repository.

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - - — -

    The name of the form

    -
    - -
  • - -
  • - - data - - - (Hash) - - - (defaults to: {}) - - - — -

    Default values

    -
    - -
  • - -
  • - - ref - - - (type) - - - (defaults to: {}) - - - — -

    Default reference

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (SearchForm) - - - - — -

    The search form

    -
    - -
  • - -
- -
- - - - -
-
-
-
-72
-73
-74
-75
-
-
# File 'lib/prismic/api.rb', line 72
-
-def form(name, data={}, ref={})
-  form = self.forms[name]
-  form and form.create_search_form(data, ref)
-end
-
-
- -
-

- - #get_by_id(id, opts = {}) ⇒ Object - - - - Also known as: - getByID - - - - -

-
-

Retrieve one document by its id

- - -
-
-
-

Parameters:

-
    - -
  • - - id - - - (String) - - - - — -

    the id to search

    -
    - -
  • - -
  • - - opts - - - (Hash) - - - (defaults to: {}) - - - — -

    query options (page, pageSize, ref, etc.)

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - - - - - -

    the document, or nil if not found

    -
    - -
  • - -
- -
- - - - -
-
-
-
-105
-106
-107
-
-
# File 'lib/prismic/api.rb', line 105
-
-def get_by_id(id, opts={})
-  query(Prismic::Predicates::at('document.id', id), opts)[0]
-end
-
-
- -
-

- - #get_by_ids(ids, opts = {}) ⇒ Object - - - - Also known as: - getByIDs - - - - -

-
-

Retrieve multiple documents by their ids

- - -
-
-
-

Parameters:

-
    - -
  • - - ids - - - (String) - - - - — -

    the ids to fetch

    -
    - -
  • - -
  • - - opts - - - (Hash) - - - (defaults to: {}) - - - — -

    query options (page, pageSize, ref, etc.)

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - - - - - -

    the document, or nil if not found

    -
    - -
  • - -
- -
- - - - -
-
-
-
-124
-125
-126
-
-
# File 'lib/prismic/api.rb', line 124
-
-def get_by_ids(ids, opts={})
-  query(Prismic::Predicates::in('document.id', ids), opts)
-end
-
-
- -
-

- - #get_by_uid(typ, uid, opts = {}) ⇒ Object - - - - Also known as: - getByUID - - - - -

-
-

Retrieve one document by its uid

- - -
-
-
-

Parameters:

-
    - -
  • - - typ - - - (String) - - - - — -

    the document type's name

    -
    - -
  • - -
  • - - uid - - - (String) - - - - — -

    the uid to search

    -
    - -
  • - -
  • - - opts - - - (Hash) - - - (defaults to: {}) - - - — -

    query options (ref, etc.)

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - - - - - -

    the document, or nil if not found

    -
    - -
  • - -
- -
- - - - -
-
-
-
-115
-116
-117
-
-
# File 'lib/prismic/api.rb', line 115
-
-def get_by_uid(typ, uid, opts={})
-  query(Prismic::Predicates::at('my.'+typ+'.uid', uid), opts)[0]
-end
-
-
- -
-

- - #get_single(typ, opts = {}) ⇒ Object - - - - Also known as: - getSingle - - - - -

-
-

Retrieve one single typed document by its type

- - -
-
-
-

Parameters:

-
    - -
  • - - typ - - - (String) - - - - — -

    the document type's name

    -
    - -
  • - -
  • - - opts - - - (Hash) - - - (defaults to: {}) - - - — -

    query options (ref, etc.)

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - - - - - -

    the document, or nil if not found

    -
    - -
  • - -
- -
- - - - -
-
-
-
-133
-134
-135
-
-
# File 'lib/prismic/api.rb', line 133
-
-def get_single(typ, opts={})
-  query(Prismic::Predicates::at('document.type', typ), opts)[0]
-end
-
-
- -
-

- - #has_cache? ⇒ Boolean - - - - - -

-
-

Is the cache enabled on this API object?

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'lib/prismic/api.rb', line 26
-
-def has_cache?
-  !!cache
-end
-
-
- -
-

- - #oauth_check_token(params) ⇒ Object - - - - - -

- - - - -
-
-
-
-253
-254
-255
-256
-257
-258
-259
-260
-
-
# File 'lib/prismic/api.rb', line 253
-
-def oauth_check_token(params)
-  unless @@warned_oauth_check_token
-    warn "[DEPRECATION] Method `API#oauth_check_token` is deprecated.  " +
-             "Please use `Prismic::API.oauth_check_token` instead."
-    @@warned_oauth_check_token = true
-  end
-  oauth.check_token(params)
-end
-
-
- -
-

- - #oauth_initiate_url(opts) ⇒ Object - - - - - -

- - - - -
-
-
-
-233
-234
-235
-236
-237
-238
-239
-240
-
-
# File 'lib/prismic/api.rb', line 233
-
-def oauth_initiate_url(opts)
-  if !@@warned_oauth_initiate_url
-    warn "[DEPRECATION] Method `API#oauth_initiate_url` is deprecated.  " +
-      "Please use `Prismic::API.oauth_initiate_url` instead."
-    @@warned_oauth_initiate_url = true
-  end
-  oauth.initiate_url(opts)
-end
-
-
- -
-

- - #preview_session(token, link_resolver, default_url) ⇒ String - - - - - -

-
-

Return the URL to display a given preview -(usually the home page of your site)

- - -
-
-
-

Parameters:

-
    - -
  • - - token - - - (String) - - - - — -

    as received from Prismic server to identify the content to preview

    -
    - -
  • - -
  • - - link_resolver - - - - - - - — -

    the link resolver to build URL for your site

    -
    - -
  • - -
  • - - default_url - - - (String) - - - - — -

    the URL to default to return if the preview doesn't correspond to a document

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    the URL to redirect the user to

    -
    - -
  • - -
- -
- - - - -
-
-
-
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-
-
# File 'lib/prismic/api.rb', line 145
-
-def preview_session(token, link_resolver, default_url)
-  response = self.http_client.get(token, {}, 'Accept' => 'application/json')
-  if response.code.to_s != '200'
-    return default_url
-  end
-  json = JSON.load(response.body)
-  documents = self.form('everything').query(Prismic::Predicates.at('document.id', json['mainDocument'])).submit(token)
-  if documents.results.size > 0
-    link_resolver.link_to(documents.results[0])
-  else
-    default_url
-  end
-end
-
-
- -
-

- - #query(q, opts = {}) ⇒ Object - - - - - -

-
-

Perform a query on this API. Use the master reference is no ref is specified in data.

- - -
-
-
-

Parameters:

-
    - -
  • - - q - - - (String) - - - - — -

    the query to perform

    -
    - -
  • - -
  • - - opts - - - (Hash) - - - (defaults to: {}) - - - — -

    query options (page, pageSize, ref, etc.)

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-89
-90
-91
-92
-
-
# File 'lib/prismic/api.rb', line 89
-
-def query(q, opts={})
-  ref = opts['ref'] || opts[:ref] || self.master.ref
-  form('everything', opts).query(q).submit(ref)
-end
-
-
- -
-

- - #ref(name) ⇒ Ref - - - - - -

-
-

Get a reference by its alias

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - - — -

    The reference's alias

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Ref) - - - - — -

    The reference

    -
    - -
  • - -
- -
- - - - -
-
-
-
-61
-62
-63
-
-
# File 'lib/prismic/api.rb', line 61
-
-def ref(name)
-  refs[name.downcase]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/API/BadPrismicResponseError.html b/docs/Prismic/API/BadPrismicResponseError.html deleted file mode 100644 index 0dd3172..0000000 --- a/docs/Prismic/API/BadPrismicResponseError.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - Exception: Prismic::API::BadPrismicResponseError - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Prismic::API::BadPrismicResponseError - - - -

-
- -
-
Inherits:
-
- Error - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/api.rb
-
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Error

-

#cause

- - - - - - - - - -

Method Summary

- -

Methods inherited from Error

-

#full_trace, #initialize

- -
-

Constructor Details

- -

This class inherits a constructor from Prismic::Error

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/API/OAuth.html b/docs/Prismic/API/OAuth.html deleted file mode 100644 index 8310c67..0000000 --- a/docs/Prismic/API/OAuth.html +++ /dev/null @@ -1,561 +0,0 @@ - - - - - - - Class: Prismic::API::OAuth - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::API::OAuth - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/api.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #http_client ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute http_client.

    -
    - -
  • - - -
  • - - - #initiate ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute initiate.

    -
    - -
  • - - -
  • - - - #token ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute token.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(initiate, token, http_client) ⇒ OAuth - - - - - -

-
-

Returns a new instance of OAuth

- - -
-
-
- - -
- - - - -
-
-
-
-283
-284
-285
-286
-287
-
-
# File 'lib/prismic/api.rb', line 283
-
-def initialize(initiate, token, http_client)
-  @http_client = http_client
-  @initiate = initiate
-  @token = token
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #http_client ⇒ Object (readonly) - - - - - -

-
-

Returns the value of attribute http_client

- - -
-
-
- - -
- - - - -
-
-
-
-282
-283
-284
-
-
# File 'lib/prismic/api.rb', line 282
-
-def http_client
-  @http_client
-end
-
-
- - - -
-

- - #initiate ⇒ Object (readonly) - - - - - -

-
-

Returns the value of attribute initiate

- - -
-
-
- - -
- - - - -
-
-
-
-282
-283
-284
-
-
# File 'lib/prismic/api.rb', line 282
-
-def initiate
-  @initiate
-end
-
-
- - - -
-

- - #token ⇒ Object (readonly) - - - - - -

-
-

Returns the value of attribute token

- - -
-
-
- - -
- - - - -
-
-
-
-282
-283
-284
-
-
# File 'lib/prismic/api.rb', line 282
-
-def token
-  @token
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #check_token(params) ⇒ Object - - - - - -

- - - - -
-
-
-
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-
-
# File 'lib/prismic/api.rb', line 295
-
-def check_token(params)
-  res = http_client.post(token, params)
-  if res.code == '200'
-    begin
-      JSON.load(res.body)['access_token']
-    rescue Exception => e
-      raise PrismicWSConnectionError.new(res, e)
-    end
-  else
-    raise PrismicWSConnectionError, res
-  end
-end
-
-
- -
-

- - #initiate_url(opts) ⇒ Object - - - - - -

- - - - -
-
-
-
-288
-289
-290
-291
-292
-293
-294
-
-
# File 'lib/prismic/api.rb', line 288
-
-def initiate_url(opts)
-  initiate + '?' + {
-    'client_id' => opts.fetch(:client_id),
-    'redirect_uri' => opts.fetch(:redirect_uri),
-    'scope' => opts.fetch(:scope),
-  }.map{|kv| kv.map{|e| CGI.escape(e) }.join('=') }.join('&')
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/API/PrismicWSAuthError.html b/docs/Prismic/API/PrismicWSAuthError.html deleted file mode 100644 index 60f2a49..0000000 --- a/docs/Prismic/API/PrismicWSAuthError.html +++ /dev/null @@ -1,376 +0,0 @@ - - - - - - - Exception: Prismic::API::PrismicWSAuthError - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Prismic::API::PrismicWSAuthError - - - -

-
- -
-
Inherits:
-
- Error - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/api.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #error ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute error.

    -
    - -
  • - - -
  • - - - #oauth ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute oauth.

    -
    - -
  • - - -
- - - - - -

Attributes inherited from Error

-

#cause

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Error

-

#full_trace

- -
-

Constructor Details

- -
-

- - #initialize(error, oauth_initialize, oauth_token, http_client) ⇒ PrismicWSAuthError - - - - - -

-
-

Returns a new instance of PrismicWSAuthError

- - -
-
-
- - -
- - - - -
-
-
-
-274
-275
-276
-277
-278
-
-
# File 'lib/prismic/api.rb', line 274
-
-def initialize(error, oauth_initialize, oauth_token, http_client)
-  super("Can't connect to Prismic's API: #{error}")
-  @error = error
-  @oauth = OAuth.new(oauth_initialize, oauth_token, http_client)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #error ⇒ Object (readonly) - - - - - -

-
-

Returns the value of attribute error

- - -
-
-
- - -
- - - - -
-
-
-
-273
-274
-275
-
-
# File 'lib/prismic/api.rb', line 273
-
-def error
-  @error
-end
-
-
- - - -
-

- - #oauth ⇒ Object (readonly) - - - - - -

-
-

Returns the value of attribute oauth

- - -
-
-
- - -
- - - - -
-
-
-
-273
-274
-275
-
-
# File 'lib/prismic/api.rb', line 273
-
-def oauth
-  @oauth
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/API/PrismicWSConnectionError.html b/docs/Prismic/API/PrismicWSConnectionError.html deleted file mode 100644 index bcc91d0..0000000 --- a/docs/Prismic/API/PrismicWSConnectionError.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - Exception: Prismic::API::PrismicWSConnectionError - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Prismic::API::PrismicWSConnectionError - - - -

-
- -
-
Inherits:
-
- Error - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/api.rb
-
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Error

-

#cause

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Error

-

#full_trace

- -
-

Constructor Details

- -
-

- - #initialize(resp, cause = nil) ⇒ PrismicWSConnectionError - - - - - -

-
-

Returns a new instance of PrismicWSConnectionError

- - -
-
-
- - -
- - - - -
-
-
-
-267
-268
-269
-
-
# File 'lib/prismic/api.rb', line 267
-
-def initialize(resp, cause=nil)
-  super("Can't connect to Prismic's API: #{resp.code} #{resp.message}", cause)
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/BasicNullCache.html b/docs/Prismic/BasicNullCache.html deleted file mode 100644 index ad47e28..0000000 --- a/docs/Prismic/BasicNullCache.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - - Class: Prismic::BasicNullCache - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::BasicNullCache - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/cache/lru.rb
-
- -
- -

Overview

-
-

Available as an api cache for testing purposes (no caching)

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #get(key) ⇒ Object - - - - - -

- - - - -
-
-
-
-111
-112
-
-
# File 'lib/prismic/cache/lru.rb', line 111
-
-def get(key)
-end
-
-
- -
-

- - #set(key, value = nil, expired_in = nil) ⇒ Object - - - - Also known as: - get_or_set - - - - -

- - - - -
-
-
-
-114
-115
-116
-
-
# File 'lib/prismic/cache/lru.rb', line 114
-
-def set(key, value = nil, expired_in = nil)
-  block_given? ? yield : value
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/DefaultHTTPClient.html b/docs/Prismic/DefaultHTTPClient.html deleted file mode 100644 index 257ca16..0000000 --- a/docs/Prismic/DefaultHTTPClient.html +++ /dev/null @@ -1,356 +0,0 @@ - - - - - - - Module: Prismic::DefaultHTTPClient - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Prismic::DefaultHTTPClient - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic.rb
-
- -
- -

Overview

-
-

Default HTTP client implementation, using the standard Net::HTTP library.

- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .get(uri, data = {}, headers = {}) ⇒ Object - - - - - -

-
-

Performs a GET call and returns the result

- -

The result must respond to

- -
    -
  • code: returns the response's HTTP status code (as number or String)
  • -
  • body: returns the response's body (as String)
  • -
- - -
-
-
- - -
- - - - -
-
-
-
-579
-580
-581
-582
-583
-584
-585
-
-
# File 'lib/prismic.rb', line 579
-
-def get(uri, data={}, headers={})
-  uri = URI(uri) if uri.is_a?(String)
-  add_query(uri, data)
-  http = Net::HTTP.new(uri.host, uri.port)
-  http.use_ssl = uri.scheme =~ /https/i
-  http.get(uri.request_uri, headers)
-end
-
-
- -
-

- - .post(uri, data = {}, headers = {}) ⇒ Object - - - - - -

-
-

Performs a POST call and returns the result

- -

The result must respond to

- -
    -
  • code: returns the response's HTTP status code (as number or String)
  • -
  • body: returns the response's body (as String)
  • -
- - -
-
-
- - -
- - - - -
-
-
-
-592
-593
-594
-595
-596
-597
-598
-
-
# File 'lib/prismic.rb', line 592
-
-def post(uri, data={}, headers={})
-  uri = URI(uri) if uri.is_a?(String)
-  add_query(uri, data)
-  http = Net::HTTP.new(uri.host, uri.port)
-  http.use_ssl = uri.scheme =~ /https/i
-  http.post(uri.path, uri.query, headers)
-end
-
-
- -
-

- - .url_encode(data) ⇒ Object - - - - - -

- - - - -
-
-
-
-600
-601
-602
-603
-604
-605
-606
-607
-608
-609
-610
-
-
# File 'lib/prismic.rb', line 600
-
-def url_encode(data)
-  # Can't use URI.encode_www_form (doesn't support multi-values in 1.9.2)
-  encode = ->(k, v){ "#{k}=#{CGI::escape(v)}" }
-  data.map { |k, vs|
-    if vs.is_a?(Array)
-      vs.map{|v| encode.(k, v) }.join("&")
-    else
-      encode.(k, vs)
-    end
-  }.join("&")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Document.html b/docs/Prismic/Document.html deleted file mode 100644 index ba4dac1..0000000 --- a/docs/Prismic/Document.html +++ /dev/null @@ -1,1069 +0,0 @@ - - - - - - - Class: Prismic::Document - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Document - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
WithFragments
-
- - - - - - -
-
Defined in:
-
lib/prismic.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from WithFragments

-

#[], #as_html, #as_text, #each, #first_title, #get_color, #get_date, #get_embed, #get_geopoint, #get_group, #get_image, #get_link, #get_number, #get_slice_zone, #get_structured_text, #get_text, #get_timestamp, #length, #linked_documents

- -
-

Constructor Details

- -
-

- - #initialize(id, uid, type, href, tags, slugs, first_publication_date, last_publication_date, fragments) ⇒ Document - - - - - -

-
-

Returns a new instance of Document

- - -
-
-
- - -
- - - - -
-
-
-
-460
-461
-462
-463
-464
-465
-466
-467
-468
-469
-470
-471
-472
-473
-474
-475
-476
-477
-478
-479
-480
-
-
# File 'lib/prismic.rb', line 460
-
-def initialize(
-  id,
-  uid,
-  type,
-  href,
-  tags,
-  slugs,
-  first_publication_date,
-  last_publication_date,
-  fragments
-)
-  @id = id
-  @uid = uid
-  @type = type
-  @href = href
-  @tags = tags
-  @slugs = slugs
-  @first_publication_date = first_publication_date
-  @last_publication_date = last_publication_date
-  @fragments = fragments
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #first_publication_date ⇒ Object - - - - - -

-
-

Returns Time

- - -
-
-
- -

Returns:

-
    - -
  • - - - - - - - -

    Time

    -
    - -
  • - -
- -
- - - - -
-
-
-
-454
-455
-456
-
-
# File 'lib/prismic.rb', line 454
-
-def first_publication_date
-  @first_publication_date
-end
-
-
- - - -
-

- - #fragments ⇒ Array<Fragment> - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array<Fragment>) - - - -
  • - -
- -
- - - - -
-
-
-
-458
-459
-460
-
-
# File 'lib/prismic.rb', line 458
-
-def fragments
-  @fragments
-end
-
-
- - - -
-

- - #href ⇒ String - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-448
-449
-450
-
-
# File 'lib/prismic.rb', line 448
-
-def href
-  @href
-end
-
-
- - - -
-

- - #id ⇒ String - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-442
-443
-444
-
-
# File 'lib/prismic.rb', line 442
-
-def id
-  @id
-end
-
-
- - - -
-

- - #last_publication_date ⇒ Object - - - - - -

-
-

Returns Time

- - -
-
-
- -

Returns:

-
    - -
  • - - - - - - - -

    Time

    -
    - -
  • - -
- -
- - - - -
-
-
-
-456
-457
-458
-
-
# File 'lib/prismic.rb', line 456
-
-def last_publication_date
-  @last_publication_date
-end
-
-
- - - -
-

- - #slugs ⇒ Array<String> - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array<String>) - - - -
  • - -
- -
- - - - -
-
-
-
-452
-453
-454
-
-
# File 'lib/prismic.rb', line 452
-
-def slugs
-  @slugs
-end
-
-
- - - -
-

- - #tags ⇒ Array<String> - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array<String>) - - - -
  • - -
- -
- - - - -
-
-
-
-450
-451
-452
-
-
# File 'lib/prismic.rb', line 450
-
-def tags
-  @tags
-end
-
-
- - - -
-

- - #type ⇒ String - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-446
-447
-448
-
-
# File 'lib/prismic.rb', line 446
-
-def type
-  @type
-end
-
-
- - - -
-

- - #uid ⇒ String - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-444
-445
-446
-
-
# File 'lib/prismic.rb', line 444
-
-def uid
-  @uid
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #slug ⇒ String - - - - - -

-
-

Returns the document's slug

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-485
-486
-487
-
-
# File 'lib/prismic.rb', line 485
-
-def slug
-  slugs.empty? ? '-' : slugs.first
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Error.html b/docs/Prismic/Error.html deleted file mode 100644 index c659de8..0000000 --- a/docs/Prismic/Error.html +++ /dev/null @@ -1,419 +0,0 @@ - - - - - - - Exception: Prismic::Error - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Prismic::Error - - - -

-
- -
-
Inherits:
-
- Exception - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic.rb
-
- -
- -

Overview

-
-

These exception can contains an error cause and is able to show them

- - -
-
-
- - -
- - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #cause ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute cause.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(msg = nil, cause = nil) ⇒ Error - - - - - -

-
-

Returns a new instance of Error

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-
-
# File 'lib/prismic.rb', line 19
-
-def initialize(msg=nil, cause=nil)
-  msg ? super(msg) : msg
-  @cause = cause
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #cause ⇒ Object (readonly) - - - - - -

-
-

Returns the value of attribute cause

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'lib/prismic.rb', line 18
-
-def cause
-  @cause
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #full_trace(e = self) ⇒ String - - - - - -

-
-

Return the full trace of the error (including nested errors)

- - -
-
-
-

Parameters:

-
    - -
  • - - e - - - (Exception) - - - (defaults to: self) - - - — -

    Parent error (for internal use)

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    The trace

    -
    - -
  • - -
- -
- - - - -
-
-
-
-28
-29
-30
-31
-32
-33
-34
-35
-36
-
-
# File 'lib/prismic.rb', line 28
-
-def full_trace(e=self)
-  first, *backtrace = e.backtrace
-  msg = e == self ? "" : "Caused by "
-  msg += "#{first}: #{e.message} (#{e.class})"
-  stack = backtrace.map{|s| "\tfrom #{s}" }.join("\n")
-  cause = e.respond_to?(:cause) ? e.cause : nil
-  cause_stack = cause ? full_trace(cause) : nil
-  [msg, stack, cause_stack].compact.join("\n")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Experiment.html b/docs/Prismic/Experiment.html deleted file mode 100644 index 0e74df9..0000000 --- a/docs/Prismic/Experiment.html +++ /dev/null @@ -1,634 +0,0 @@ - - - - - - - Class: Prismic::Experiment - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Experiment - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/experiments.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(id, google_id, name, variations) ⇒ Experiment - - - - - -

-
-

Returns a new instance of Experiment

- - -
-
-
- - -
- - - - -
-
-
-
-64
-65
-66
-67
-68
-69
-
-
# File 'lib/prismic/experiments.rb', line 64
-
-def initialize(id, google_id, name, variations)
-  @id = id
-  @google_id = google_id
-  @name = name
-  @variations = variations
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #google_id ⇒ String (readonly) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-58
-59
-60
-
-
# File 'lib/prismic/experiments.rb', line 58
-
-def google_id
-  @google_id
-end
-
-
- - - -
-

- - #id ⇒ String (readonly) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-56
-57
-58
-
-
# File 'lib/prismic/experiments.rb', line 56
-
-def id
-  @id
-end
-
-
- - - -
-

- - #name ⇒ String (readonly) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-61
-62
-
-
# File 'lib/prismic/experiments.rb', line 60
-
-def name
-  @name
-end
-
-
- - - -
-

- - #variations ⇒ Array<Variation> (readonly) - - - - - -

-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'lib/prismic/experiments.rb', line 62
-
-def variations
-  @variations
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .parse(data) ⇒ Experiment - - - - - -

-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-72
-73
-74
-75
-76
-
-
# File 'lib/prismic/experiments.rb', line 72
-
-def self.parse(data)
-  new(data['id'], data['googleId'], data['name'], data['variations'].map { |variation|
-    Variation.parse(variation)
-  })
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Experiments.html b/docs/Prismic/Experiments.html deleted file mode 100644 index d4e63a6..0000000 --- a/docs/Prismic/Experiments.html +++ /dev/null @@ -1,634 +0,0 @@ - - - - - - - Class: Prismic::Experiments - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Experiments - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/experiments.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(draft, running) ⇒ Experiments - - - - - -

-
-

Returns a new instance of Experiments

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-13
-
-
# File 'lib/prismic/experiments.rb', line 10
-
-def initialize(draft, running)
-  @draft = draft
-  @running = running
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #draft ⇒ Array<Experiment> (readonly) - - - - - -

-
-

Returns list of all experiments from Prismic

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array<Experiment>) - - - - — -

    list of all experiments from Prismic

    -
    - -
  • - -
- -
- - - - -
-
-
-
-6
-7
-8
-
-
# File 'lib/prismic/experiments.rb', line 6
-
-def draft
-  @draft
-end
-
-
- - - -
-

- - #running ⇒ Array<Experiments> (readonly) - - - - - -

-
-

Returns list of all experiments from Prismic

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array<Experiments>) - - - - — -

    list of all experiments from Prismic

    -
    - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'lib/prismic/experiments.rb', line 8
-
-def running
-  @running
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .parse(data) ⇒ Experiments - - - - - -

-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-
-
# File 'lib/prismic/experiments.rb', line 38
-
-def self.parse(data)
-  draft = []
-  running = []
-  if data != nil
-    draft = data['draft'].map { |exp|
-      Experiment.parse(exp)
-    }
-    running = data['running'].map { |exp|
-      Experiment.parse(exp)
-    }
-  end
-  new(draft, running)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #current ⇒ Object - - - - - -

- - - - -
-
-
-
-15
-16
-17
-
-
# File 'lib/prismic/experiments.rb', line 15
-
-def current
-  running.first
-end
-
-
- -
- - - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-
-
# File 'lib/prismic/experiments.rb', line 19
-
-def ref_from_cookie(cookie)
-  if cookie == nil
-    return nil
-  end
-  splitted = cookie.strip.split('%20')
-  if splitted.size >= 2
-    experiment = running.find { |exp| exp.google_id == splitted[0] }
-    if experiment == nil
-      return nil
-    end
-    var_index = splitted[1].to_i
-    if var_index > -1 && var_index < experiment.variations.size
-      return experiment.variations[var_index].ref
-    end
-  end
-  nil
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Field.html b/docs/Prismic/Field.html deleted file mode 100644 index e273479..0000000 --- a/docs/Prismic/Field.html +++ /dev/null @@ -1,425 +0,0 @@ - - - - - - - Class: Prismic::Field - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Field - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #default ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute default.

    -
    - -
  • - - -
  • - - - #field_type ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute field_type.

    -
    - -
  • - - -
  • - - - #repeatable ⇒ Object - - - - (also: #repeatable?) - - - - - - - - - - - - - - -

    Returns the value of attribute repeatable.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(field_type, default, repeatable = false) ⇒ Field - - - - - -

-
-

Returns a new instance of Field

- - -
-
-
- - -
- - - - -
-
-
-
-367
-368
-369
-370
-371
-
-
# File 'lib/prismic.rb', line 367
-
-def initialize(field_type, default, repeatable = false)
-  @field_type = field_type
-  @default = default
-  @repeatable = repeatable
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #default ⇒ Object - - - - - -

-
-

Returns the value of attribute default

- - -
-
-
- - -
- - - - -
-
-
-
-365
-366
-367
-
-
# File 'lib/prismic.rb', line 365
-
-def default
-  @default
-end
-
-
- - - -
-

- - #field_type ⇒ Object - - - - - -

-
-

Returns the value of attribute field_type

- - -
-
-
- - -
- - - - -
-
-
-
-365
-366
-367
-
-
# File 'lib/prismic.rb', line 365
-
-def field_type
-  @field_type
-end
-
-
- - - -
-

- - #repeatable ⇒ Object - - - - Also known as: - repeatable? - - - - -

-
-

Returns the value of attribute repeatable

- - -
-
-
- - -
- - - - -
-
-
-
-365
-366
-367
-
-
# File 'lib/prismic.rb', line 365
-
-def repeatable
-  @repeatable
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Form.html b/docs/Prismic/Form.html deleted file mode 100644 index 960aad1..0000000 --- a/docs/Prismic/Form.html +++ /dev/null @@ -1,828 +0,0 @@ - - - - - - - Class: Prismic::Form - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Form - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/form.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #action ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute action.

    -
    - -
  • - - -
  • - - - #enctype ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute enctype.

    -
    - -
  • - - -
  • - - - #fields ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute fields.

    -
    - -
  • - - -
  • - - - #form_method ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute form_method.

    -
    - -
  • - - -
  • - - - #name ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute name.

    -
    - -
  • - - -
  • - - - #rel ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute rel.

    -
    - -
  • - - -
- - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(api, name, fields, form_method, rel, enctype, action) ⇒ Form - - - - - -

-
-

Returns a new instance of Form

- - -
-
-
- - -
- - - - -
-
-
-
-6
-7
-8
-9
-10
-11
-12
-13
-14
-
-
# File 'lib/prismic/form.rb', line 6
-
-def initialize(api, name, fields, form_method, rel, enctype, action)
-  @api = api
-  @name = name
-  @fields = fields
-  @form_method = form_method
-  @rel = rel
-  @enctype = enctype
-  @action = action
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #action ⇒ Object - - - - - -

-
-

Returns the value of attribute action

- - -
-
-
- - -
- - - - -
-
-
-
-4
-5
-6
-
-
# File 'lib/prismic/form.rb', line 4
-
-def action
-  @action
-end
-
-
- - - -
-

- - #enctype ⇒ Object - - - - - -

-
-

Returns the value of attribute enctype

- - -
-
-
- - -
- - - - -
-
-
-
-4
-5
-6
-
-
# File 'lib/prismic/form.rb', line 4
-
-def enctype
-  @enctype
-end
-
-
- - - -
-

- - #fields ⇒ Object - - - - - -

-
-

Returns the value of attribute fields

- - -
-
-
- - -
- - - - -
-
-
-
-4
-5
-6
-
-
# File 'lib/prismic/form.rb', line 4
-
-def fields
-  @fields
-end
-
-
- - - -
-

- - #form_method ⇒ Object - - - - - -

-
-

Returns the value of attribute form_method

- - -
-
-
- - -
- - - - -
-
-
-
-4
-5
-6
-
-
# File 'lib/prismic/form.rb', line 4
-
-def form_method
-  @form_method
-end
-
-
- - - -
-

- - #name ⇒ Object - - - - - -

-
-

Returns the value of attribute name

- - -
-
-
- - -
- - - - -
-
-
-
-4
-5
-6
-
-
# File 'lib/prismic/form.rb', line 4
-
-def name
-  @name
-end
-
-
- - - -
-

- - #rel ⇒ Object - - - - - -

-
-

Returns the value of attribute rel

- - -
-
-
- - -
- - - - -
-
-
-
-4
-5
-6
-
-
# File 'lib/prismic/form.rb', line 4
-
-def rel
-  @rel
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .from_json(api, json) ⇒ Object - - - - - -

- - - - -
-
-
-
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-
-
# File 'lib/prismic/form.rb', line 24
-
-def self.from_json(api, json)
-  Form.new(
-      api,
-      json['name'],
-      Hash[json['fields'].map { |k2, field|
-        [k2, Field.new(field['type'], field['default'], k2 == 'q')]
-      }],
-      json['method'],
-      json['rel'],
-      json['enctype'],
-      json['action']
-  )
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #create_search_form(data = {}, ref = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-20
-21
-22
-
-
# File 'lib/prismic/form.rb', line 20
-
-def create_search_form(data={}, ref=nil)
-  SearchForm.new(@api, self, data, ref)
-end
-
-
- -
-

- - #default_data ⇒ Object - - - - - -

- - - - -
-
-
-
-16
-17
-18
-
-
# File 'lib/prismic/form.rb', line 16
-
-def default_data
-  Hash[fields.map{|key, field| [key, field.default] if field.default }.compact]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments.html b/docs/Prismic/Fragments.html deleted file mode 100644 index 78ff100..0000000 --- a/docs/Prismic/Fragments.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - Module: Prismic::Fragments - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Prismic::Fragments - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/date.rb,
- lib/prismic/fragments/link.rb,
lib/prismic/fragments/text.rb,
lib/prismic/fragments/color.rb,
lib/prismic/fragments/embed.rb,
lib/prismic/fragments/group.rb,
lib/prismic/fragments/image.rb,
lib/prismic/fragments/number.rb,
lib/prismic/fragments/select.rb,
lib/prismic/fragments/slices.rb,
lib/prismic/fragments/fragment.rb,
lib/prismic/fragments/geopoint.rb,
lib/prismic/fragments/multiple.rb,
lib/prismic/fragments/separator.rb,
lib/prismic/fragments/timestamp.rb,
lib/prismic/fragments/structured_text.rb
-
-
- -
- -

Defined Under Namespace

-

- - - - - Classes: Color, Date, DocumentLink, Embed, FileLink, Fragment, GeoPoint, Group, GroupDocument, Image, ImageLink, Link, Multiple, Number, Select, Separator, Slice, SliceZone, StructuredText, Text, Timestamp, WebLink - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/Color.html b/docs/Prismic/Fragments/Color.html deleted file mode 100644 index aef80fd..0000000 --- a/docs/Prismic/Fragments/Color.html +++ /dev/null @@ -1,633 +0,0 @@ - - - - - - - Class: Prismic::Fragments::Color - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::Color - - - -

-
- -
-
Inherits:
-
- Fragment - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/color.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #value ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute value.

    -
    - -
  • - - -
- - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Fragment

-

#as_text

-
-

Constructor Details

- -
-

- - #initialize(value) ⇒ Color - - - - - -

-
-

Returns a new instance of Color

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/prismic/fragments/color.rb', line 7
-
-def initialize(value)
-  @value = value
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #value ⇒ Object - - - - - -

-
-

Returns the value of attribute value

- - -
-
-
- - -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'lib/prismic/fragments/color.rb', line 5
-
-def value
-  @value
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .asRGB(value) ⇒ Object - - - - - -

- - - - -
-
-
-
-21
-22
-23
-24
-25
-26
-27
-
-
# File 'lib/prismic/fragments/color.rb', line 21
-
-def self.asRGB(value)
-  {
-    'red'   => value[0..1].to_i(16),
-    'green' => value[2..3].to_i(16),
-    'blue'  => value[4..5].to_i(16)
-  }
-end
-
-
- -
-

- - .valid?(value) ⇒ Boolean - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'lib/prismic/fragments/color.rb', line 39
-
-def self.valid?(value)
-  /(\h{2})(\h{2})(\h{2})/ ===  value
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil) ⇒ String - - - - - -

-
-

Generate an HTML representation of the fragment

- - -
-
-
-

Parameters:

-
    - -
  • - - link_resolver - - - (LinkResolver) - - - (defaults to: nil) - - - — -

    The LinkResolver used to build -application's specific URL

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    the HTML representation

    -
    - -
  • - -
- -
- - - - -
-
-
-
-35
-36
-37
-
-
# File 'lib/prismic/fragments/color.rb', line 35
-
-def as_html(link_resolver=nil)
-  %(<span class="color">##@value</span>)
-end
-
-
- -
-

- - #asRGB ⇒ Hash - - - - - -

-
-

Returns the RGB values in a Hash

- - -
-
-
- -
-

Examples:

- - -
color.asRGB  # => {'red' => 123, 'green' => 123, 'blue' => 123}
- -
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'lib/prismic/fragments/color.rb', line 17
-
-def asRGB
-  Fragments::Color.asRGB(@value)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/Date.html b/docs/Prismic/Fragments/Date.html deleted file mode 100644 index 27a80f1..0000000 --- a/docs/Prismic/Fragments/Date.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - Class: Prismic::Fragments::Date - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::Date - - - -

-
- -
-
Inherits:
-
- Fragment - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/date.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #value ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute value.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Fragment

-

#as_text

-
-

Constructor Details

- -
-

- - #initialize(value) ⇒ Date - - - - - -

-
-

Returns a new instance of Date

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/prismic/fragments/date.rb', line 7
-
-def initialize(value)
-  @value = value
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #value ⇒ Object - - - - - -

-
-

Returns the value of attribute value

- - -
-
-
- - -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'lib/prismic/fragments/date.rb', line 5
-
-def value
-  @value
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil) ⇒ String - - - - - -

-
-

Generate an HTML representation of the fragment

- - -
-
-
-

Parameters:

-
    - -
  • - - link_resolver - - - (LinkResolver) - - - (defaults to: nil) - - - — -

    The LinkResolver used to build -application's specific URL

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    the HTML representation

    -
    - -
  • - -
- -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'lib/prismic/fragments/date.rb', line 17
-
-def as_html(link_resolver=nil)
-  %(<time>#{value.iso8601(3)}</time>)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/DocumentLink.html b/docs/Prismic/Fragments/DocumentLink.html deleted file mode 100644 index c15878a..0000000 --- a/docs/Prismic/Fragments/DocumentLink.html +++ /dev/null @@ -1,1050 +0,0 @@ - - - - - - - Class: Prismic::Fragments::DocumentLink - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::DocumentLink - - - -

-
- -
-
Inherits:
-
- Link - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
WithFragments
-
- - - - - - -
-
Defined in:
-
lib/prismic/fragments/link.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #broken ⇒ Object - - - - (also: #broken?) - - - - - - - - - - - - - - -

    Returns the value of attribute broken.

    -
    - -
  • - - -
  • - - - #fragments ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute fragments.

    -
    - -
  • - - -
  • - - - #id ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute id.

    -
    - -
  • - - -
  • - - - #slug ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute slug.

    -
    - -
  • - - -
  • - - - #tags ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute tags.

    -
    - -
  • - - -
  • - - - #type ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute type.

    -
    - -
  • - - -
  • - - - #uid ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute uid.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from WithFragments

-

#[], #as_text, #each, #first_title, #get_color, #get_date, #get_embed, #get_geopoint, #get_group, #get_image, #get_link, #get_number, #get_slice_zone, #get_structured_text, #get_text, #get_timestamp, #length, #linked_documents

- - - - - - - - - - - - - - - - -

Methods inherited from Fragment

-

#as_text

-
-

Constructor Details

- -
-

- - #initialize(id, uid, type, tags, slug, fragments, broken) ⇒ DocumentLink - - - - - -

-
-

Returns a new instance of DocumentLink

- - -
-
-
- - -
- - - - -
-
-
-
-101
-102
-103
-104
-105
-106
-107
-108
-109
-
-
# File 'lib/prismic/fragments/link.rb', line 101
-
-def initialize(id, uid, type, tags, slug, fragments, broken)
-  @id = id
-  @uid = uid
-  @type = type
-  @tags = tags
-  @slug = slug
-  @fragments = fragments
-  @broken = broken
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #broken ⇒ Object - - - - Also known as: - broken? - - - - -

-
-

Returns the value of attribute broken

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-
-
# File 'lib/prismic/fragments/link.rb', line 99
-
-def broken
-  @broken
-end
-
-
- - - -
-

- - #fragments ⇒ Object - - - - - -

-
-

Returns the value of attribute fragments

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-
-
# File 'lib/prismic/fragments/link.rb', line 99
-
-def fragments
-  @fragments
-end
-
-
- - - -
-

- - #id ⇒ Object - - - - - -

-
-

Returns the value of attribute id

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-
-
# File 'lib/prismic/fragments/link.rb', line 99
-
-def id
-  @id
-end
-
-
- - - -
-

- - #slug ⇒ Object - - - - - -

-
-

Returns the value of attribute slug

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-
-
# File 'lib/prismic/fragments/link.rb', line 99
-
-def slug
-  @slug
-end
-
-
- - - -
-

- - #tags ⇒ Object - - - - - -

-
-

Returns the value of attribute tags

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-
-
# File 'lib/prismic/fragments/link.rb', line 99
-
-def tags
-  @tags
-end
-
-
- - - -
-

- - #type ⇒ Object - - - - - -

-
-

Returns the value of attribute type

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-
-
# File 'lib/prismic/fragments/link.rb', line 99
-
-def type
-  @type
-end
-
-
- - - -
-

- - #uid ⇒ Object - - - - - -

-
-

Returns the value of attribute uid

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-
-
# File 'lib/prismic/fragments/link.rb', line 99
-
-def uid
-  @uid
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-119
-120
-121
-
-
# File 'lib/prismic/fragments/link.rb', line 119
-
-def as_html(link_resolver=nil)
-  %(#{start_html(link_resolver)}#{slug}#{end_html})
-end
-
-
- -
-

- - #end_html ⇒ Object - - - - - -

- - - - -
-
-
-
-115
-116
-117
-
-
# File 'lib/prismic/fragments/link.rb', line 115
-
-def end_html
-  broken? ? %(</span>) : super
-end
-
-
- -
- - - - - -
-
-
-
-123
-124
-125
-126
-
-
# File 'lib/prismic/fragments/link.rb', line 123
-
-def link_type
-  warn('WARNING: DocumentLink.link_type is deprecated, use DocumentLink.type instead')
-  self.type
-end
-
-
- -
-

- - #start_html(link_resolver) ⇒ Object - - - - - -

- - - - -
-
-
-
-111
-112
-113
-
-
# File 'lib/prismic/fragments/link.rb', line 111
-
-def start_html(link_resolver)
-  broken? ? %(<span>) : super
-end
-
-
- -
-

- - #url(link_resolver) ⇒ Object - - - - - -

-
-

Returns the URL of the link

- - -
-
-
- - -

Parameters:

-
    - -
  • - - link_resolver - - - (LinkResolver) - - - (defaults to: nil) - - -
  • - -
- - -

See Also:

- - -
- - - - -
-
-
-
-135
-136
-137
-138
-
-
# File 'lib/prismic/fragments/link.rb', line 135
-
-def url(link_resolver = nil)
-  raise "A link_resolver method is needed to serialize document links into a correct URL on your website. If you're using a starter kit, a trivial one is provided out-of-the-box, that you can update later." if link_resolver == nil
-  link_resolver.link_to(self)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/Embed.html b/docs/Prismic/Fragments/Embed.html deleted file mode 100644 index 12a0300..0000000 --- a/docs/Prismic/Fragments/Embed.html +++ /dev/null @@ -1,680 +0,0 @@ - - - - - - - Class: Prismic::Fragments::Embed - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::Embed - - - -

-
- -
-
Inherits:
-
- Fragment - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/embed.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #embed_type ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute embed_type.

    -
    - -
  • - - -
  • - - - #html ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute html.

    -
    - -
  • - - -
  • - - - #o_embed_json ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute o_embed_json.

    -
    - -
  • - - -
  • - - - #provider ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute provider.

    -
    - -
  • - - -
  • - - - #url ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute url.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Fragment

-

#as_text

-
-

Constructor Details

- -
-

- - #initialize(embed_type, provider, url, html, o_embed_json) ⇒ Embed - - - - - -

-
-

Returns a new instance of Embed

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-10
-11
-12
-13
-
-
# File 'lib/prismic/fragments/embed.rb', line 7
-
-def initialize(embed_type, provider, url, html, o_embed_json)
-  @embed_type   = embed_type
-  @provider     = provider
-  @url          = url
-  @html         = html
-  @o_embed_json = o_embed_json
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #embed_type ⇒ Object - - - - - -

-
-

Returns the value of attribute embed_type

- - -
-
-
- - -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'lib/prismic/fragments/embed.rb', line 5
-
-def embed_type
-  @embed_type
-end
-
-
- - - -
-

- - #html ⇒ Object - - - - - -

-
-

Returns the value of attribute html

- - -
-
-
- - -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'lib/prismic/fragments/embed.rb', line 5
-
-def html
-  @html
-end
-
-
- - - -
-

- - #o_embed_json ⇒ Object - - - - - -

-
-

Returns the value of attribute o_embed_json

- - -
-
-
- - -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'lib/prismic/fragments/embed.rb', line 5
-
-def o_embed_json
-  @o_embed_json
-end
-
-
- - - -
-

- - #provider ⇒ Object - - - - - -

-
-

Returns the value of attribute provider

- - -
-
-
- - -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'lib/prismic/fragments/embed.rb', line 5
-
-def provider
-  @provider
-end
-
-
- - - -
-

- - #url ⇒ Object - - - - - -

-
-

Returns the value of attribute url

- - -
-
-
- - -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'lib/prismic/fragments/embed.rb', line 5
-
-def url
-  @url
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil, html_serializer = nil) ⇒ String - - - - - -

-
-

Generate an HTML representation of the fragment

- - -
-
-
-

Parameters:

-
    - -
  • - - link_resolver - - - (LinkResolver) - - - (defaults to: nil) - - - — -

    The LinkResolver used to build -application's specific URL

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    the HTML representation

    -
    - -
  • - -
- -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'lib/prismic/fragments/embed.rb', line 21
-
-def as_html(link_resolver=nil, html_serializer=nil)
-  %Q|<div data-oembed="#{@url}" data-oembed-type="#{@embed_type.downcase}" data-oembed-provider="#{@provider.downcase}">#@html</div>|
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/FileLink.html b/docs/Prismic/Fragments/FileLink.html deleted file mode 100644 index 4149d72..0000000 --- a/docs/Prismic/Fragments/FileLink.html +++ /dev/null @@ -1,605 +0,0 @@ - - - - - - - Class: Prismic::Fragments::FileLink - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::FileLink - - - -

-
- -
-
Inherits:
-
- Link - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/link.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #kind ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute kind.

    -
    - -
  • - - -
  • - - - #name ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute name.

    -
    - -
  • - - -
  • - - - #size ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute size.

    -
    - -
  • - - -
  • - - - #url(link_resolver = nil) ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the URL of the link.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Link

-

#end_html, #start_html

- - - - - - - - - -

Methods inherited from Fragment

-

#as_text

-
-

Constructor Details

- -
-

- - #initialize(url, name, kind, size) ⇒ FileLink - - - - - -

-
-

Returns a new instance of FileLink

- - -
-
-
- - -
- - - - -
-
-
-
-52
-53
-54
-55
-56
-57
-
-
# File 'lib/prismic/fragments/link.rb', line 52
-
-def initialize(url, name, kind, size)
-  @url = url
-  @name = name
-  @kind = kind
-  @size = size
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #kind ⇒ Object - - - - - -

-
-

Returns the value of attribute kind

- - -
-
-
- - -
- - - - -
-
-
-
-50
-51
-52
-
-
# File 'lib/prismic/fragments/link.rb', line 50
-
-def kind
-  @kind
-end
-
-
- - - -
-

- - #name ⇒ Object - - - - - -

-
-

Returns the value of attribute name

- - -
-
-
- - -
- - - - -
-
-
-
-50
-51
-52
-
-
# File 'lib/prismic/fragments/link.rb', line 50
-
-def name
-  @name
-end
-
-
- - - -
-

- - #size ⇒ Object - - - - - -

-
-

Returns the value of attribute size

- - -
-
-
- - -
- - - - -
-
-
-
-50
-51
-52
-
-
# File 'lib/prismic/fragments/link.rb', line 50
-
-def size
-  @size
-end
-
-
- - - -
-

- - #url(link_resolver = nil) ⇒ Object - - - - - -

-
- -
- Note: -

The link_resolver parameter is accepted but it is not used by -this method, so not providing it is perfectly fine.

-
-
- -

Returns the URL of the link

- - -
-
-
-

Parameters:

-
    - -
  • - - link_resolver - - - (LinkResolver) - - - (defaults to: nil) - - -
  • - -
- - -

See Also:

- - -
- - - - -
-
-
-
-71
-72
-73
-
-
# File 'lib/prismic/fragments/link.rb', line 71
-
-def url
-  @url
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-59
-60
-61
-
-
# File 'lib/prismic/fragments/link.rb', line 59
-
-def as_html(link_resolver=nil)
-  %(#{start_html(link_resolver)}#@name#{end_html})
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/Fragment.html b/docs/Prismic/Fragments/Fragment.html deleted file mode 100644 index 85cf1ef..0000000 --- a/docs/Prismic/Fragments/Fragment.html +++ /dev/null @@ -1,340 +0,0 @@ - - - - - - - Class: Prismic::Fragments::Fragment - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::Fragment - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/fragment.rb
-
- -
- -

Overview

-
-

Generic fragment, this class is to be extended by all fragment classes.

- - -
-
-
- - -
- - - - - - - - -

- Instance Method Summary - collapse -

- -
    - -
  • - - - #as_html(link_resolver = nil) ⇒ String - - - - - - - - - - - - - -

    Generic as_html method for fragments, meant to be overriden by specific fragment classes.

    -
    - -
  • - - -
  • - - - #as_text ⇒ String - - - - - - - - - - - - - -

    Generic as_text method for fragments, meant to be overriden by specific fragment classes.

    -
    - -
  • - - -
- - - - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil) ⇒ String - - - - - -

-
-

Generic as_html method for fragments, meant to be overriden by -specific fragment classes.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    an empty string

    -
    - -
  • - -
-

Raises:

-
    - -
  • - - - (NotImplementedError) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'lib/prismic/fragments/fragment.rb', line 11
-
-def as_html(link_resolver = nil)
-  raise NotImplementedError, "Method #{__method__} is not implemented for #{inspect}", caller
-end
-
-
- -
-

- - #as_text ⇒ String - - - - - -

-
-

Generic as_text method for fragments, meant to be overriden by -specific fragment classes.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    an empty string

    -
    - -
  • - -
-

Raises:

-
    - -
  • - - - (NotImplementedError) - - - -
  • - -
- -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'lib/prismic/fragments/fragment.rb', line 19
-
-def as_text()
-  raise NotImplementedError, "Method #{__method__} is not implemented for #{inspect}", caller
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/GeoPoint.html b/docs/Prismic/Fragments/GeoPoint.html deleted file mode 100644 index fd3b723..0000000 --- a/docs/Prismic/Fragments/GeoPoint.html +++ /dev/null @@ -1,470 +0,0 @@ - - - - - - - Class: Prismic::Fragments::GeoPoint - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::GeoPoint - - - -

-
- -
-
Inherits:
-
- Fragment - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/geopoint.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #latitude ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute latitude.

    -
    - -
  • - - -
  • - - - #longitude ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute longitude.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Fragment

-

#as_text

-
-

Constructor Details

- -
-

- - #initialize(longitude, latitude) ⇒ GeoPoint - - - - - -

-
-

Returns a new instance of GeoPoint

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-10
-
-
# File 'lib/prismic/fragments/geopoint.rb', line 7
-
-def initialize(longitude, latitude)
-  @longitude = longitude
-  @latitude = latitude
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #latitude ⇒ Object - - - - - -

-
-

Returns the value of attribute latitude

- - -
-
-
- - -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'lib/prismic/fragments/geopoint.rb', line 5
-
-def latitude
-  @latitude
-end
-
-
- - - -
-

- - #longitude ⇒ Object - - - - - -

-
-

Returns the value of attribute longitude

- - -
-
-
- - -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'lib/prismic/fragments/geopoint.rb', line 5
-
-def longitude
-  @longitude
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil) ⇒ String - - - - - -

-
-

Generate an HTML representation of the fragment

- - -
-
-
-

Parameters:

-
    - -
  • - - link_resolver - - - (LinkResolver) - - - (defaults to: nil) - - - — -

    The LinkResolver used to build -application's specific URL

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    the HTML representation

    -
    - -
  • - -
- -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'lib/prismic/fragments/geopoint.rb', line 18
-
-def as_html(link_resolver=nil)
-  %(<div class="geopoint"><span class="longitude">#@longitude</span><span class="latitude">#@latitude</span></div>)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/Group.html b/docs/Prismic/Fragments/Group.html deleted file mode 100644 index 36ed6bb..0000000 --- a/docs/Prismic/Fragments/Group.html +++ /dev/null @@ -1,712 +0,0 @@ - - - - - - - Class: Prismic::Fragments::Group - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::Group - - - -

-
- -
-
Inherits:
-
- Fragment - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
Enumerable
-
- - - - - - -
-
Defined in:
-
lib/prismic/fragments/group.rb
-
- -
- -

Overview

-
-

A fragment of type Group, which contains an array of FragmentList (which -itself is a Hash of fragments).

- -

For instance, imagining this group is defined with two possible fragments: -an image fragment "image", and a text fragment "caption"; then accessing -the first image will look like this: group[0]['image'].

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(group_documents) ⇒ Group - - - - - -

-
-

Returns a new instance of Group

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'lib/prismic/fragments/group.rb', line 33
-
-def initialize(group_documents)
-  @group_documents = group_documents
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #group_documents ⇒ Object - - - - - -

-
-

The array of group documents

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'lib/prismic/fragments/group.rb', line 31
-
-def group_documents
-  @group_documents
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #[](index) ⇒ Prismic::WithFragments - - - - Also known as: - get - - - - -

-
-

Get the group document corresponding to index

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'lib/prismic/fragments/group.rb', line 39
-
-def [](index)
-  @group_documents[index]
-end
-
-
- -
-

- - #as_html(link_resolver = nil) ⇒ String - - - - - -

-
-

Generate an HTML representation of the group

- - -
-
-
-

Parameters:

-
    - -
  • - - link_resolver - - - (LinkResolver) - - - (defaults to: nil) - - - — -

    The LinkResolver used to build -application's specific URL

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    the HTML representation

    -
    - -
  • - -
- -
- - - - -
-
-
-
-61
-62
-63
-
-
# File 'lib/prismic/fragments/group.rb', line 61
-
-def as_html(link_resolver = nil)
-  @group_documents.map { |doc| doc.as_html(link_resolver) }.join("\n")
-end
-
-
- -
-

- - #as_text ⇒ String - - - - - -

-
-

Generate an text representation of the group

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    the text representation

    -
    - -
  • - -
- -
- - - - -
-
-
-
-68
-69
-70
-
-
# File 'lib/prismic/fragments/group.rb', line 68
-
-def as_text
-  @group_documents.map { |doc| doc.as_text }.join("\n")
-end
-
-
- -
-

- - #each {|group_doc| ... } ⇒ Object - - - - - -

-
- - -
-
-
- -

Yield Parameters:

-
    - -
  • - - group_doc - - - (WithFragment) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-46
-47
-
-
# File 'lib/prismic/fragments/group.rb', line 45
-
-def each(&blk)
-  @group_documents.each(&blk)
-end
-
-
- -
-

- - #length ⇒ Object - - - - Also known as: - size - - - - -

- - - - -
-
-
-
-50
-51
-52
-
-
# File 'lib/prismic/fragments/group.rb', line 50
-
-def length
-  @group_documents.length
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/GroupDocument.html b/docs/Prismic/Fragments/GroupDocument.html deleted file mode 100644 index 864647b..0000000 --- a/docs/Prismic/Fragments/GroupDocument.html +++ /dev/null @@ -1,384 +0,0 @@ - - - - - - - Class: Prismic::Fragments::GroupDocument - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::GroupDocument - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
WithFragments
-
- - - - - - -
-
Defined in:
-
lib/prismic/fragments/group.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #fragments ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute fragments.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from WithFragments

-

#as_html, #as_text, #each, #first_title, #get_color, #get_date, #get_embed, #get_geopoint, #get_group, #get_image, #get_link, #get_number, #get_slice_zone, #get_structured_text, #get_text, #get_timestamp, #length, #linked_documents

- -
-

Constructor Details

- -
-

- - #initialize(fragments) ⇒ GroupDocument - - - - - -

-
-

Returns a new instance of GroupDocument

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'lib/prismic/fragments/group.rb', line 9
-
-def initialize(fragments)
-  @fragments = fragments
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #fragments ⇒ Object - - - - - -

-
-

Returns the value of attribute fragments

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/prismic/fragments/group.rb', line 7
-
-def fragments
-  @fragments
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #[](field) ⇒ Fragments::Fragment - - - - Also known as: - get - - - - -

-
-

Get a document's field

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-15
-16
-17
-
-
# File 'lib/prismic/fragments/group.rb', line 15
-
-def [](field)
-  @fragments[field]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/Image.html b/docs/Prismic/Fragments/Image.html deleted file mode 100644 index 499bfc4..0000000 --- a/docs/Prismic/Fragments/Image.html +++ /dev/null @@ -1,781 +0,0 @@ - - - - - - - Class: Prismic::Fragments::Image - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::Image - - - -

-
- -
-
Inherits:
-
- Fragment - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/image.rb
-
- -
- -

Defined Under Namespace

-

- - - - - Classes: View, ViewDoesNotExistException - - -

- - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #main ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute main.

    -
    - -
  • - - -
  • - - - #views ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute views.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(main, views) ⇒ Image - - - - - -

-
-

Returns a new instance of Image

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-10
-
-
# File 'lib/prismic/fragments/image.rb', line 7
-
-def initialize(main, views)
-  @main = main
-  @views = views
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #main ⇒ Object - - - - - -

-
-

Returns the value of attribute main

- - -
-
-
- - -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'lib/prismic/fragments/image.rb', line 5
-
-def main
-  @main
-end
-
-
- - - -
-

- - #views ⇒ Object - - - - - -

-
-

Returns the value of attribute views

- - -
-
-
- - -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'lib/prismic/fragments/image.rb', line 5
-
-def views
-  @views
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #alt ⇒ Object - - - - - -

- - - - -
-
-
-
-23
-
-
# File 'lib/prismic/fragments/image.rb', line 23
-
-def alt() main.alt end
-
-
- -
-

- - #as_html(link_resolver = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-12
-13
-14
-
-
# File 'lib/prismic/fragments/image.rb', line 12
-
-def as_html(link_resolver=nil)
-  main.as_html(link_resolver)
-end
-
-
- -
-

- - #as_text ⇒ Object - - - - - -

- - - - -
-
-
-
-16
-17
-18
-
-
# File 'lib/prismic/fragments/image.rb', line 16
-
-def as_text
-  ""
-end
-
-
- -
- - - - - -
-
-
-
-24
-
-
# File 'lib/prismic/fragments/image.rb', line 24
-
-def copyright() main.copyright end
-
-
- -
-

- - #get_view(key) ⇒ Object - - - - - -

- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-32
-33
-34
-
-
# File 'lib/prismic/fragments/image.rb', line 26
-
-def get_view(key)
-  if key == 'main'
-    main
-  elsif @views.has_key?(key)
-    views[key]
-  else
-    raise ViewDoesNotExistException
-  end
-end
-
-
- -
-

- - #height ⇒ Object - - - - - -

- - - - -
-
-
-
-22
-
-
# File 'lib/prismic/fragments/image.rb', line 22
-
-def height() main.height end
-
-
- -
-

- - #url ⇒ Object - - - - - -

- - - - -
-
-
-
-20
-
-
# File 'lib/prismic/fragments/image.rb', line 20
-
-def url() main.url end
-
-
- -
-

- - #width ⇒ Object - - - - - -

- - - - -
-
-
-
-21
-
-
# File 'lib/prismic/fragments/image.rb', line 21
-
-def width() main.width end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/Image/View.html b/docs/Prismic/Fragments/Image/View.html deleted file mode 100644 index 13c10cb..0000000 --- a/docs/Prismic/Fragments/Image/View.html +++ /dev/null @@ -1,760 +0,0 @@ - - - - - - - Class: Prismic::Fragments::Image::View - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::Image::View - - - -

-
- -
-
Inherits:
-
- Fragment - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/image.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #alt ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute alt.

    -
    - -
  • - - -
  • - - - #copyright ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute copyright.

    -
    - -
  • - - -
  • - - - #height ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute height.

    -
    - -
  • - - -
  • - - - #link_to ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute link_to.

    -
    - -
  • - - -
  • - - - #url ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute url.

    -
    - -
  • - - -
  • - - - #width ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute width.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Fragment

-

#as_text

-
-

Constructor Details

- -
-

- - #initialize(url, width, height, alt, copyright, link_to) ⇒ View - - - - - -

-
-

Returns a new instance of View

- - -
-
-
- - -
- - - - -
-
-
-
-41
-42
-43
-44
-45
-46
-47
-48
-
-
# File 'lib/prismic/fragments/image.rb', line 41
-
-def initialize(url, width, height, alt, copyright, link_to)
-  @url = url
-  @width = width
-  @height = height
-  @alt = alt
-  @copyright = copyright
-  @link_to = link_to
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #alt ⇒ Object - - - - - -

-
-

Returns the value of attribute alt

- - -
-
-
- - -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'lib/prismic/fragments/image.rb', line 39
-
-def alt
-  @alt
-end
-
-
- - - -
-
-
-

Returns the value of attribute copyright

- - -
-
-
- - -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'lib/prismic/fragments/image.rb', line 39
-
-def copyright
-  @copyright
-end
-
-
- - - -
-

- - #height ⇒ Object - - - - - -

-
-

Returns the value of attribute height

- - -
-
-
- - -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'lib/prismic/fragments/image.rb', line 39
-
-def height
-  @height
-end
-
-
- - - -
-
-
-

Returns the value of attribute link_to

- - -
-
-
- - -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'lib/prismic/fragments/image.rb', line 39
-
-def link_to
-  @link_to
-end
-
-
- - - -
-

- - #url ⇒ Object - - - - - -

-
-

Returns the value of attribute url

- - -
-
-
- - -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'lib/prismic/fragments/image.rb', line 39
-
-def url
-  @url
-end
-
-
- - - -
-

- - #width ⇒ Object - - - - - -

-
-

Returns the value of attribute width

- - -
-
-
- - -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'lib/prismic/fragments/image.rb', line 39
-
-def width
-  @width
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-54
-55
-56
-57
-58
-59
-60
-
-
# File 'lib/prismic/fragments/image.rb', line 54
-
-def as_html(link_resolver=nil)
-  html = []
-  html << (link_to.nil? ? '' : link_to.start_html(link_resolver))
-  html << %(<img src="#@url" alt="#@alt" width="#@width" height="#@height" />)
-  html << (link_to.nil? ? '' : link_to.end_html)
-  html.join
-end
-
-
- -
-

- - #ratio ⇒ Object - - - - - -

- - - - -
-
-
-
-50
-51
-52
-
-
# File 'lib/prismic/fragments/image.rb', line 50
-
-def ratio
-  return @width / @height
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/Image/ViewDoesNotExistException.html b/docs/Prismic/Fragments/Image/ViewDoesNotExistException.html deleted file mode 100644 index 56015ef..0000000 --- a/docs/Prismic/Fragments/Image/ViewDoesNotExistException.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - Exception: Prismic::Fragments::Image::ViewDoesNotExistException - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Prismic::Fragments::Image::ViewDoesNotExistException - - - -

-
- -
-
Inherits:
-
- Error - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/image.rb
-
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Error

-

#cause

- - - - - - - - - -

Method Summary

- -

Methods inherited from Error

-

#full_trace, #initialize

- -
-

Constructor Details

- -

This class inherits a constructor from Prismic::Error

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/ImageLink.html b/docs/Prismic/Fragments/ImageLink.html deleted file mode 100644 index 173f763..0000000 --- a/docs/Prismic/Fragments/ImageLink.html +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - - Class: Prismic::Fragments::ImageLink - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::ImageLink - - - -

-
- -
-
Inherits:
-
- Link - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/link.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Link

-

#as_html, #end_html, #start_html

- - - - - - - - - -

Methods inherited from Fragment

-

#as_html, #as_text

-
-

Constructor Details

- -
-

- - #initialize(url) ⇒ ImageLink - - - - - -

-
-

Returns a new instance of ImageLink

- - -
-
-
- - -
- - - - -
-
-
-
-80
-81
-82
-
-
# File 'lib/prismic/fragments/link.rb', line 80
-
-def initialize(url)
-  @url = url
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #url(link_resolver = nil) ⇒ Object - - - - - -

-
- -
- Note: -

The link_resolver parameter is accepted but it is not used by -this method, so not providing it is perfectly fine.

-
-
- -

Returns the URL of the link

- - -
-
-
-

Parameters:

-
    - -
  • - - link_resolver - - - (LinkResolver) - - - (defaults to: nil) - - -
  • - -
- - -

See Also:

- - -
- - - - -
-
-
-
-92
-93
-94
-
-
# File 'lib/prismic/fragments/link.rb', line 92
-
-def url
-  @url
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/Link.html b/docs/Prismic/Fragments/Link.html deleted file mode 100644 index c66eb79..0000000 --- a/docs/Prismic/Fragments/Link.html +++ /dev/null @@ -1,413 +0,0 @@ - - - - - - - Class: Prismic::Fragments::Link - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::Link - - - -

-
- -
-
Inherits:
-
- Fragment - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/link.rb
-
- -
- -
-

Direct Known Subclasses

-

DocumentLink, FileLink, ImageLink, WebLink

-
- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Fragment

-

#as_text

- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-14
-15
-16
-
-
# File 'lib/prismic/fragments/link.rb', line 14
-
-def as_html(link_resolver=nil)
-  %(#{start_html(link_resolver)}#{url(link_resolver)}#{end_html})
-end
-
-
- -
-

- - #end_html ⇒ Object - - - - - -

- - - - -
-
-
-
-10
-11
-12
-
-
# File 'lib/prismic/fragments/link.rb', line 10
-
-def end_html
-  %(</a>)
-end
-
-
- -
-

- - #start_html(link_resolver = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-6
-7
-8
-
-
# File 'lib/prismic/fragments/link.rb', line 6
-
-def start_html(link_resolver = nil)
-  %(<a href="#{url(link_resolver)}">)
-end
-
-
- -
-

- - #url(link_resolver = nil) ⇒ Object - - - - - -

-
-
- This method is abstract. - -
-

Returns the URL of the link

- - -
-
-
-

Parameters:

-
    - -
  • - - link_resolver - - - (LinkResolver) - - - (defaults to: nil) - - - — -

    The link resolver

    -
    - -
  • - -
- -

Raises:

-
    - -
  • - - - (NotImplementedError) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-24
-25
-
-
# File 'lib/prismic/fragments/link.rb', line 23
-
-def url(link_resolver = nil)
-  raise NotImplementedError, "Method #{__method__} is not implemented for #{inspect}", caller
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/Multiple.html b/docs/Prismic/Fragments/Multiple.html deleted file mode 100644 index ad6f20c..0000000 --- a/docs/Prismic/Fragments/Multiple.html +++ /dev/null @@ -1,514 +0,0 @@ - - - - - - - Class: Prismic::Fragments::Multiple - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::Multiple - - - -

-
- -
-
Inherits:
-
- Fragment - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/multiple.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #fragments ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute fragments.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Fragment

-

#as_text

-
-

Constructor Details

- -
-

- - #initialize(fragments = []) ⇒ Multiple - - - - - -

-
-

Returns a new instance of Multiple

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/prismic/fragments/multiple.rb', line 7
-
-def initialize(fragments=[])
-  @fragments = fragments
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #fragments ⇒ Object (readonly) - - - - - -

-
-

Returns the value of attribute fragments

- - -
-
-
- - -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'lib/prismic/fragments/multiple.rb', line 5
-
-def fragments
-  @fragments
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #[](i) ⇒ Object - - - - - -

- - - - -
-
-
-
-15
-16
-17
-
-
# File 'lib/prismic/fragments/multiple.rb', line 15
-
-def [](i)
-  @fragments[i]
-end
-
-
- -
-

- - #as_html(link_resolver) ⇒ Object - - - - - -

- - - - -
-
-
-
-23
-24
-25
-
-
# File 'lib/prismic/fragments/multiple.rb', line 23
-
-def as_html(link_resolver)
-  @fragments.map { |f| f.as_html(link_resolver) }.join
-end
-
-
- -
-

- - #push(fragment) ⇒ Object - - - - - -

- - - - -
-
-
-
-19
-20
-21
-
-
# File 'lib/prismic/fragments/multiple.rb', line 19
-
-def push(fragment)
-  @fragments.push(fragment)
-end
-
-
- -
-

- - #size ⇒ Object - - - - Also known as: - length - - - - -

- - - - -
-
-
-
-11
-12
-13
-
-
# File 'lib/prismic/fragments/multiple.rb', line 11
-
-def size
-  @fragments.size
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/Number.html b/docs/Prismic/Fragments/Number.html deleted file mode 100644 index c666fb0..0000000 --- a/docs/Prismic/Fragments/Number.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - - - Class: Prismic::Fragments::Number - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::Number - - - -

-
- -
-
Inherits:
-
- Fragment - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/number.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #value ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute value.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Fragment

-

#as_text

-
-

Constructor Details

- -
-

- - #initialize(value) ⇒ Number - - - - - -

-
-

Returns a new instance of Number

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/prismic/fragments/number.rb', line 7
-
-def initialize(value)
-  @value = value
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #value ⇒ Object - - - - - -

-
-

Returns the value of attribute value

- - -
-
-
- - -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'lib/prismic/fragments/number.rb', line 5
-
-def value
-  @value
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-15
-16
-17
-
-
# File 'lib/prismic/fragments/number.rb', line 15
-
-def as_html(link_resolver=nil)
-  %(<span class="number">#@value</span>)
-end
-
-
- -
-

- - #as_int ⇒ Object - - - - - -

- - - - -
-
-
-
-11
-12
-13
-
-
# File 'lib/prismic/fragments/number.rb', line 11
-
-def as_int
-  @value.to_int
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/Select.html b/docs/Prismic/Fragments/Select.html deleted file mode 100644 index ec9b1dd..0000000 --- a/docs/Prismic/Fragments/Select.html +++ /dev/null @@ -1,350 +0,0 @@ - - - - - - - Class: Prismic::Fragments::Select - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::Select - - - -

-
- -
-
Inherits:
-
- Fragment - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/select.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #value ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute value.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Fragment

-

#as_text

-
-

Constructor Details

- -
-

- - #initialize(value) ⇒ Select - - - - - -

-
-

Returns a new instance of Select

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/prismic/fragments/select.rb', line 7
-
-def initialize(value)
-  @value = value
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #value ⇒ Object - - - - - -

-
-

Returns the value of attribute value

- - -
-
-
- - -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'lib/prismic/fragments/select.rb', line 5
-
-def value
-  @value
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-11
-12
-13
-
-
# File 'lib/prismic/fragments/select.rb', line 11
-
-def as_html(link_resolver=nil)
-  %(<span class="text">#{CGI::escapeHTML(@value)}</span>)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/Separator.html b/docs/Prismic/Fragments/Separator.html deleted file mode 100644 index 11b736c..0000000 --- a/docs/Prismic/Fragments/Separator.html +++ /dev/null @@ -1,397 +0,0 @@ - - - - - - - Class: Prismic::Fragments::Separator - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::Separator - - - -

-
- -
-
Inherits:
-
- Fragment - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/separator.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #value ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute value.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(value) ⇒ Separator - - - - - -

-
-

Returns a new instance of Separator

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/prismic/fragments/separator.rb', line 7
-
-def initialize(value)
-  @value = value
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #value ⇒ Object - - - - - -

-
-

Returns the value of attribute value

- - -
-
-
- - -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'lib/prismic/fragments/separator.rb', line 5
-
-def value
-  @value
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-11
-12
-13
-
-
# File 'lib/prismic/fragments/separator.rb', line 11
-
-def as_html(link_resolver=nil)
-  %(<hr class="separator" />)
-end
-
-
- -
-

- - #as_text ⇒ Object - - - - - -

- - - - -
-
-
-
-15
-16
-17
-
-
# File 'lib/prismic/fragments/separator.rb', line 15
-
-def as_text
-  @value
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/Slice.html b/docs/Prismic/Fragments/Slice.html deleted file mode 100644 index 0519467..0000000 --- a/docs/Prismic/Fragments/Slice.html +++ /dev/null @@ -1,633 +0,0 @@ - - - - - - - Class: Prismic::Fragments::Slice - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::Slice - - - -

-
- -
-
Inherits:
-
- Fragment - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/slices.rb
-
- -
- -

Overview

-
-

A fragment of type Slice, an item in a SliceZone

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #slice_label ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute slice_label.

    -
    - -
  • - - -
  • - - - #slice_type ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute slice_type.

    -
    - -
  • - - -
  • - - - #value ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute value.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(slice_type, slice_label, value) ⇒ Slice - - - - - -

-
-

Returns a new instance of Slice

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-
-
# File 'lib/prismic/fragments/slices.rb', line 11
-
-def initialize(slice_type, slice_label, value)
-  @slice_type = slice_type
-  @slice_label = slice_label
-  @value = value
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #slice_label ⇒ Object - - - - - -

-
-

Returns the value of attribute slice_label

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'lib/prismic/fragments/slices.rb', line 8
-
-def slice_label
-  @slice_label
-end
-
-
- - - -
-

- - #slice_type ⇒ Object - - - - - -

-
-

Returns the value of attribute slice_type

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/prismic/fragments/slices.rb', line 7
-
-def slice_type
-  @slice_type
-end
-
-
- - - -
-

- - #value ⇒ Object - - - - - -

-
-

Returns the value of attribute value

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'lib/prismic/fragments/slices.rb', line 9
-
-def value
-  @value
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil) ⇒ String - - - - - -

-
-

Generate an HTML representation of the group

- - -
-
-
-

Parameters:

-
    - -
  • - - link_resolver - - - (LinkResolver) - - - (defaults to: nil) - - - — -

    The LinkResolver used to build -application's specific URL

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    the HTML representation

    -
    - -
  • - -
- -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-36
-
-
# File 'lib/prismic/fragments/slices.rb', line 30
-
-def as_html(link_resolver=nil)
-  classes = ['slice']
-  unless (@slice_label.nil?)
-    classes.push(@slice_label)
-  end
-  %[<div data-slicetype="#{@slice_type}" class="#{classes.join(' ')}">#{@value.as_html(link_resolver)}</div>]
-end
-
-
- -
-

- - #as_text ⇒ String - - - - - -

-
-

Generate an text representation of the group

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    the text representation

    -
    - -
  • - -
- -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'lib/prismic/fragments/slices.rb', line 20
-
-def as_text
-  @value.as_text
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/SliceZone.html b/docs/Prismic/Fragments/SliceZone.html deleted file mode 100644 index 84b6b8b..0000000 --- a/docs/Prismic/Fragments/SliceZone.html +++ /dev/null @@ -1,475 +0,0 @@ - - - - - - - Class: Prismic::Fragments::SliceZone - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::SliceZone - - - -

-
- -
-
Inherits:
-
- Fragment - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/slices.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #slices ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute slices.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(slices) ⇒ SliceZone - - - - - -

-
-

Returns a new instance of SliceZone

- - -
-
-
- - -
- - - - -
-
-
-
-42
-43
-44
-
-
# File 'lib/prismic/fragments/slices.rb', line 42
-
-def initialize(slices)
-  @slices = slices
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #slices ⇒ Object - - - - - -

-
-

Returns the value of attribute slices

- - -
-
-
- - -
- - - - -
-
-
-
-40
-41
-42
-
-
# File 'lib/prismic/fragments/slices.rb', line 40
-
-def slices
-  @slices
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil) ⇒ String - - - - - -

-
-

Generate an HTML representation of the group

- - -
-
-
-

Parameters:

-
    - -
  • - - link_resolver - - - (LinkResolver) - - - (defaults to: nil) - - - — -

    The LinkResolver used to build -application's specific URL

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    the HTML representation

    -
    - -
  • - -
- -
- - - - -
-
-
-
-59
-60
-61
-
-
# File 'lib/prismic/fragments/slices.rb', line 59
-
-def as_html(link_resolver=nil)
-  @slices.map { |slice| slice.as_html(link_resolver) }.join("\n")
-end
-
-
- -
-

- - #as_text ⇒ String - - - - - -

-
-

Generate an text representation of the group

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    the text representation

    -
    - -
  • - -
- -
- - - - -
-
-
-
-49
-50
-51
-
-
# File 'lib/prismic/fragments/slices.rb', line 49
-
-def as_text
-  @slices.map { |slice| slice.as_text }.join("\n")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/StructuredText.html b/docs/Prismic/Fragments/StructuredText.html deleted file mode 100644 index d4c6ba1..0000000 --- a/docs/Prismic/Fragments/StructuredText.html +++ /dev/null @@ -1,665 +0,0 @@ - - - - - - - Class: Prismic::Fragments::StructuredText - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::StructuredText - - - -

-
- -
-
Inherits:
-
- Fragment - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/structured_text.rb
-
- -
- -

Defined Under Namespace

-

- - - - - Classes: Block, BlockGroup, Span - - -

- - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #blocks ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute blocks.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(blocks) ⇒ StructuredText - - - - - -

-
-

Returns a new instance of StructuredText

- - -
-
-
- - -
- - - - -
-
-
-
-22
-23
-24
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 22
-
-def initialize(blocks)
-  @blocks = blocks
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #blocks ⇒ Object - - - - - -

-
-

Returns the value of attribute blocks

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 20
-
-def blocks
-  @blocks
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver, html_serializer = nil) ⇒ String - - - - - -

-
-

Serializes the current StructuredText fragment into a fully usable HTML code. -You need to pass a proper link_resolver so that internal links are turned into the proper URL in -your website. If you use a starter kit, one is provided, that you can still update later.

- -

This method simply executes the as_html methods on blocks; -it is not advised to override this method if you want to change the HTML output, you should -override the as_html method at the block level (like Heading.as_html, or Preformatted.as_html, -for instance).

- - -
-
-
-

Parameters:

-
    - -
  • - - link_resolver - - - (LinkResolver) - - - -
  • - -
  • - - html_serializer - - - (HtmlSerializer) - - - (defaults to: nil) - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    the resulting html snippet

    -
    - -
  • - -
- -
- - - - -
-
-
-
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 38
-
-def as_html(link_resolver, html_serializer=nil)
-  # Defining blocks that deserve grouping, assigning them "group kind" names
-  block_group = ->(block){
-    case block
-    when Block::ListItem
-      block.ordered? ? "ol" : "ul"
-    else
-      nil
-    end
-  }
-  # Initializing groups, which is an array of BlockGroup objects
-  groups, last = [], nil
-  blocks.each {|block|
-    group = block_group.(block)
-    groups << BlockGroup.new(group) if !last || group != last
-    groups.last << block
-    last = group
-  }
-  # HTML-serializing the groups object (delegating the serialization of Block objects),
-  # without forgetting to frame the BlockGroup objects right if needed
-  groups.map{|group|
-    html = group.blocks.map { |b|
-      b.as_html(link_resolver, html_serializer)
-    }.join
-    case group.kind
-    when "ol"
-      %(<ol>#{html}</ol>)
-    when "ul"
-      %(<ul>#{html}</ul>)
-    else
-      html
-    end
-  }.join("\n\n")
-end
-
-
- -
-

- - #as_text(separator = ' ') ⇒ String - - - - - -

-
-

Returns the StructuredText as plain text, with zero formatting. -Non-textual blocks (like images and embeds) are simply ignored.

- - -
-
-
-

Parameters:

-
    - -
  • - - separator - - - (String) - - - (defaults to: ' ') - - - — -

    The string separator inserted between the blocks (a blank space by default)

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    The complete string representing the textual value of the StructuredText field.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-78
-79
-80
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 78
-
-def as_text(separator=' ')
-  blocks.map{|block| block.as_text }.compact.join(separator)
-end
-
-
- -
-

- - #first_title ⇒ Object - - - - - -

-
-

Finds the first highest title in a structured text

- - -
-
-
- - -
- - - - -
-
-
-
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 83
-
-def first_title
-  max_level = 6 # any title with a higher level kicks the current one out
-  title = false
-  @blocks.each do |block|
-    if block.is_a?(Prismic::Fragments::StructuredText::Block::Heading)
-      if block.level < max_level
-        title = block.text
-        max_level = block.level # new maximum
-      end
-    end
-  end
-  title
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/StructuredText/Block.html b/docs/Prismic/Fragments/StructuredText/Block.html deleted file mode 100644 index 16ff2c5..0000000 --- a/docs/Prismic/Fragments/StructuredText/Block.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - Class: Prismic::Fragments::StructuredText::Block - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::StructuredText::Block - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/structured_text.rb
-
- -
- -
-

Direct Known Subclasses

-

Embed, Image

-
-

Defined Under Namespace

-

- - - - - Classes: Embed, Heading, Image, ListItem, Paragraph, Preformatted, Text - - -

- - - - - - - - -

- Instance Method Summary - collapse -

- -
    - -
  • - - - #as_text ⇒ Object - - - - - - - - - - - - - -

    Returns nil, as a block is not textual by default.

    -
    - -
  • - - -
- - - - -
-

Instance Method Details

- - -
-

- - #as_text ⇒ Object - - - - - -

-
-

Returns nil, as a block is not textual by default. -This is meant to be overriden by textual blocks (see Prismic::Fragments::StructuredText::Block::Text.as_text, for instance)

- - -
-
-
- -

Returns:

-
    - -
  • - - - - - - - -

    nil, always.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-155
-156
-157
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 155
-
-def as_text
-  nil
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/StructuredText/Block/Embed.html b/docs/Prismic/Fragments/StructuredText/Block/Embed.html deleted file mode 100644 index 844a9fa..0000000 --- a/docs/Prismic/Fragments/StructuredText/Block/Embed.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - - Class: Prismic::Fragments::StructuredText::Block::Embed - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::StructuredText::Block::Embed - - - -

-
- -
-
Inherits:
-
- Prismic::Fragments::StructuredText::Block - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/structured_text.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #label ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute label.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Prismic::Fragments::StructuredText::Block

-

#as_text

-
-

Constructor Details

- -
-

- - #initialize(embed, label) ⇒ Embed - - - - - -

-
-

Returns a new instance of Embed

- - -
-
-
- - -
- - - - -
-
-
-
-375
-376
-377
-378
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 375
-
-def initialize(embed, label)
-  @embed = embed
-  @label = label
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #label ⇒ Object - - - - - -

-
-

Returns the value of attribute label

- - -
-
-
- - -
- - - - -
-
-
-
-373
-374
-375
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 373
-
-def label
-  @label
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver, html_serializer = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 380
-
-def as_html(link_resolver, html_serializer = nil)
-  custom = nil
-  unless html_serializer.nil?
-    custom = html_serializer.serialize(self, '')
-  end
-  if custom.nil?
-    embed.as_html(link_resolver)
-  else
-    custom
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/StructuredText/Block/Heading.html b/docs/Prismic/Fragments/StructuredText/Block/Heading.html deleted file mode 100644 index c52c8fc..0000000 --- a/docs/Prismic/Fragments/StructuredText/Block/Heading.html +++ /dev/null @@ -1,367 +0,0 @@ - - - - - - - Class: Prismic::Fragments::StructuredText::Block::Heading - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::StructuredText::Block::Heading - - - -

-
- -
-
Inherits:
-
- Text - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/structured_text.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #level ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute level.

    -
    - -
  • - - -
- - - - - -

Attributes inherited from Text

-

#label, #spans, #text

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Text

-

#as_text, #prepare_spans, #serialize

-
-

Constructor Details

- -
-

- - #initialize(text, spans, level, label = nil) ⇒ Heading - - - - - -

-
-

Returns a new instance of Heading

- - -
-
-
- - -
- - - - -
-
-
-
-267
-268
-269
-270
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 267
-
-def initialize(text, spans, level, label = nil)
-  super(text, spans, label)
-  @level = level
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #level ⇒ Object - - - - - -

-
-

Returns the value of attribute level

- - -
-
-
- - -
- - - - -
-
-
-
-265
-266
-267
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 265
-
-def level
-  @level
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil, html_serializer = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-272
-273
-274
-275
-276
-277
-278
-279
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 272
-
-def as_html(link_resolver=nil, html_serializer=nil)
-  custom_html = html_serializer && html_serializer.serialize(self, super)
-  if custom_html.nil?
-    %(<h#{level}#{class_code}>#{super}</h#{level}>)
-  else
-    custom_html
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/StructuredText/Block/Image.html b/docs/Prismic/Fragments/StructuredText/Block/Image.html deleted file mode 100644 index 2e4b096..0000000 --- a/docs/Prismic/Fragments/StructuredText/Block/Image.html +++ /dev/null @@ -1,756 +0,0 @@ - - - - - - - Class: Prismic::Fragments::StructuredText::Block::Image - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::StructuredText::Block::Image - - - -

-
- -
-
Inherits:
-
- Prismic::Fragments::StructuredText::Block - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/structured_text.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #label ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute label.

    -
    - -
  • - - -
  • - - - #view ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute view.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Prismic::Fragments::StructuredText::Block

-

#as_text

-
-

Constructor Details

- -
-

- - #initialize(view, label = nil) ⇒ Image - - - - - -

-
-

Returns a new instance of Image

- - -
-
-
- - -
- - - - -
-
-
-
-326
-327
-328
-329
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 326
-
-def initialize(view, label = nil)
-  @view = view
-  @label = label
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #label ⇒ Object - - - - - -

-
-

Returns the value of attribute label

- - -
-
-
- - -
- - - - -
-
-
-
-324
-325
-326
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 324
-
-def label
-  @label
-end
-
-
- - - -
-

- - #view ⇒ Object - - - - - -

-
-

Returns the value of attribute view

- - -
-
-
- - -
- - - - -
-
-
-
-324
-325
-326
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 324
-
-def view
-  @view
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #alt ⇒ Object - - - - - -

- - - - -
-
-
-
-343
-344
-345
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 343
-
-def alt
-  @view.alt
-end
-
-
- -
-

- - #as_html(link_resolver, html_serializer = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 355
-
-def as_html(link_resolver, html_serializer = nil)
-  custom = nil
-  unless html_serializer.nil?
-    custom = html_serializer.serialize(self, '')
-  end
-  if custom.nil?
-    classes = ['block-img']
-    unless @label.nil?
-      classes.push(@label)
-    end
-    %(<p class="#{classes.join(' ')}">#{view.as_html(link_resolver)}</p>)
-  else
-    custom
-  end
-end
-
-
- -
- - - - - -
-
-
-
-347
-348
-349
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 347
-
-def copyright
-  @view.copyright
-end
-
-
- -
-

- - #height ⇒ Object - - - - - -

- - - - -
-
-
-
-339
-340
-341
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 339
-
-def height
-  @view.height
-end
-
-
- -
- - - - - -
-
-
-
-351
-352
-353
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 351
-
-def link_to
-  @view.link_to
-end
-
-
- -
-

- - #url ⇒ Object - - - - - -

- - - - -
-
-
-
-331
-332
-333
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 331
-
-def url
-  @view.url
-end
-
-
- -
-

- - #width ⇒ Object - - - - - -

- - - - -
-
-
-
-335
-336
-337
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 335
-
-def width
-  @view.width
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/StructuredText/Block/ListItem.html b/docs/Prismic/Fragments/StructuredText/Block/ListItem.html deleted file mode 100644 index 2923a8b..0000000 --- a/docs/Prismic/Fragments/StructuredText/Block/ListItem.html +++ /dev/null @@ -1,373 +0,0 @@ - - - - - - - Class: Prismic::Fragments::StructuredText::Block::ListItem - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::StructuredText::Block::ListItem - - - -

-
- -
-
Inherits:
-
- Text - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/structured_text.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #ordered ⇒ Object - - - - (also: #ordered?) - - - - - - - - - - - - - - -

    Returns the value of attribute ordered.

    -
    - -
  • - - -
- - - - - -

Attributes inherited from Text

-

#label, #spans, #text

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Text

-

#as_text, #prepare_spans, #serialize

-
-

Constructor Details

- -
-

- - #initialize(text, spans, ordered, label = nil) ⇒ ListItem - - - - - -

-
-

Returns a new instance of ListItem

- - -
-
-
- - -
- - - - -
-
-
-
-308
-309
-310
-311
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 308
-
-def initialize(text, spans, ordered, label = nil)
-  super(text, spans, label)
-  @ordered = ordered
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #ordered ⇒ Object - - - - Also known as: - ordered? - - - - -

-
-

Returns the value of attribute ordered

- - -
-
-
- - -
- - - - -
-
-
-
-305
-306
-307
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 305
-
-def ordered
-  @ordered
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver, html_serializer = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-313
-314
-315
-316
-317
-318
-319
-320
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 313
-
-def as_html(link_resolver, html_serializer=nil)
-  custom_html = html_serializer && html_serializer.serialize(self, super)
-  if custom_html.nil?
-    %(<li#{class_code}>#{super}</li>)
-  else
-    custom_html
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/StructuredText/Block/Paragraph.html b/docs/Prismic/Fragments/StructuredText/Block/Paragraph.html deleted file mode 100644 index e08236f..0000000 --- a/docs/Prismic/Fragments/StructuredText/Block/Paragraph.html +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - Class: Prismic::Fragments::StructuredText::Block::Paragraph - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::StructuredText::Block::Paragraph - - - -

-
- -
-
Inherits:
-
- Text - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/structured_text.rb
-
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Text

-

#label, #spans, #text

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Text

-

#as_text, #initialize, #prepare_spans, #serialize

-
-

Constructor Details

- -

This class inherits a constructor from Prismic::Fragments::StructuredText::Block::Text

- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil, html_serializer = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-283
-284
-285
-286
-287
-288
-289
-290
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 283
-
-def as_html(link_resolver=nil, html_serializer=nil)
-  custom_html = html_serializer && html_serializer.serialize(self, super)
-  if custom_html.nil?
-    %(<p#{class_code}>#{super}</p>)
-  else
-    custom_html
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/StructuredText/Block/Preformatted.html b/docs/Prismic/Fragments/StructuredText/Block/Preformatted.html deleted file mode 100644 index ffbbf8e..0000000 --- a/docs/Prismic/Fragments/StructuredText/Block/Preformatted.html +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - Class: Prismic::Fragments::StructuredText::Block::Preformatted - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::StructuredText::Block::Preformatted - - - -

-
- -
-
Inherits:
-
- Text - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/structured_text.rb
-
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Text

-

#label, #spans, #text

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Text

-

#as_text, #initialize, #prepare_spans, #serialize

-
-

Constructor Details

- -

This class inherits a constructor from Prismic::Fragments::StructuredText::Block::Text

- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil, html_serializer = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-294
-295
-296
-297
-298
-299
-300
-301
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 294
-
-def as_html(link_resolver=nil, html_serializer=nil)
-  custom_html = html_serializer && html_serializer.serialize(self, super)
-  if custom_html.nil?
-    %(<pre#{class_code}>#{super}</pre>)
-  else
-    custom_html
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/StructuredText/Block/Text.html b/docs/Prismic/Fragments/StructuredText/Block/Text.html deleted file mode 100644 index 04d6e9a..0000000 --- a/docs/Prismic/Fragments/StructuredText/Block/Text.html +++ /dev/null @@ -1,822 +0,0 @@ - - - - - - - Class: Prismic::Fragments::StructuredText::Block::Text - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::StructuredText::Block::Text - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/structured_text.rb
-
- -
- -
-

Direct Known Subclasses

-

Heading, ListItem, Paragraph, Preformatted

-
- - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(text, spans, label = nil) ⇒ Text - - - - - -

-
-

Returns a new instance of Text

- - -
-
-
- - -
- - - - -
-
-
-
-167
-168
-169
-170
-171
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 167
-
-def initialize(text, spans, label = nil)
-  @text = text
-  @spans = spans.select{|span| span.start < span.end}
-  @label = label
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #label ⇒ String - - - - - -

-
-

Returns may be nil

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    may be nil

    -
    - -
  • - -
- -
- - - - -
-
-
-
-165
-166
-167
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 165
-
-def label
-  @label
-end
-
-
- - - -
-

- - #spans ⇒ Array<Span> - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array<Span>) - - - -
  • - -
- -
- - - - -
-
-
-
-163
-164
-165
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 163
-
-def spans
-  @spans
-end
-
-
- - - -
-

- - #text ⇒ String - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-161
-162
-163
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 161
-
-def text
-  @text
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil, html_serializer = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 177
-
-def as_html(link_resolver=nil, html_serializer=nil)
-  html = ''
-  # Getting Hashes of spanning tags to insert, sorted by starting position, and by ending position
-  start_spans, end_spans = prepare_spans
-  # Open tags
-  stack = Array.new
-  (text.length + 1).times do |pos| # Looping to length + 1 to catch closing tags
-    end_spans[pos].each do |t|
-      # Close a tag
-      tag = stack.pop
-      inner_html = serialize(tag[:span], tag[:html], link_resolver, html_serializer)
-      if stack.empty?
-        # The tag was top-level
-        html += inner_html
-      else
-        # Add the content to the parent tag
-        stack[-1][:html] += inner_html
-      end
-    end
-    start_spans[pos].each do |tag|
-      # Open a tag
-      stack.push({
-          :span => tag,
-          :html => ''
-      })
-    end
-    if pos < text.length
-      if stack.empty?
-        # Top level text
-        html += cgi_escape_html(text[pos])
-      else
-        # Inner text of a span
-        stack[-1][:html] += cgi_escape_html(text[pos])
-      end
-    end
-  end
-  html.gsub("\n", '<br>')
-end
-
-
- -
-

- - #as_text ⇒ Object - - - - - -

-
-

Zero-formatted textual value of the block.

- - -
-
-
- -

Returns:

-
    - -
  • - - - - - - - -

    The textual value.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-248
-249
-250
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 248
-
-def as_text
-  @text
-end
-
-
- -
-

- - #prepare_spans ⇒ Object - - - - - -

-
-

Building two span Hashes:

- -
    -
  • start_spans, with the starting positions as keys, and spans as values
  • -
  • end_spans, with the ending positions as keys, and spans as values
  • -
- - -
-
-
- - -
- - - - -
-
-
-
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 230
-
-def prepare_spans
-  unless defined?(@prepared_spans)
-    start_spans = Hash.new{|h,k| h[k] = [] }
-    end_spans = Hash.new{|h,k| h[k] = [] }
-    spans.each {|span|
-      start_spans[span.start] << span
-      end_spans[span.end] << span
-    }
-    # Make sure the spans are sorted bigger first to respect the hierarchy
-    @start_spans = start_spans.each { |_, spans| spans.sort! { |a, b| b.end - b.start <=> a.end - a.start } }
-    @end_spans = end_spans
-  end
-  [@start_spans, @end_spans]
-end
-
-
- -
-

- - #serialize(elt, text, link_resolver, html_serializer) ⇒ Object - - - - - -

- - - - -
-
-
-
-252
-253
-254
-255
-256
-257
-258
-259
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 252
-
-def serialize(elt, text, link_resolver, html_serializer)
-  custom_html = html_serializer && html_serializer.serialize(elt, text)
-  if custom_html.nil?
-    elt.serialize(text, link_resolver)
-  else
-    custom_html
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/StructuredText/BlockGroup.html b/docs/Prismic/Fragments/StructuredText/BlockGroup.html deleted file mode 100644 index 67dd148..0000000 --- a/docs/Prismic/Fragments/StructuredText/BlockGroup.html +++ /dev/null @@ -1,424 +0,0 @@ - - - - - - - Class: Prismic::Fragments::StructuredText::BlockGroup - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::StructuredText::BlockGroup - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/structured_text.rb
-
- -
- -

Overview

-
-

Used during the call of #as_html : blocks are first gathered by groups, -so that list items of the same list are placed within the same group, allowing to frame -their serialization with

    ...
or
    ...
. -Images, paragraphs, headings, embed, ... are then placed alone in their own BlockGroup.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #blocks ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute blocks.

    -
    - -
  • - - -
  • - - - #kind ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute kind.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(kind) ⇒ BlockGroup - - - - - -

-
-

Returns a new instance of BlockGroup

- - -
-
-
- - -
- - - - -
-
-
-
-12
-13
-14
-15
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 12
-
-def initialize(kind)
-  @kind = kind
-  @blocks = []
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #blocks ⇒ Object (readonly) - - - - - -

-
-

Returns the value of attribute blocks

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 11
-
-def blocks
-  @blocks
-end
-
-
- - - -
-

- - #kind ⇒ Object (readonly) - - - - - -

-
-

Returns the value of attribute kind

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 11
-
-def kind
-  @kind
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #<<(block) ⇒ Object - - - - - -

- - - - -
-
-
-
-16
-17
-18
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 16
-
-def <<(block)
-  blocks << block
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/StructuredText/Span.html b/docs/Prismic/Fragments/StructuredText/Span.html deleted file mode 100644 index 09d303c..0000000 --- a/docs/Prismic/Fragments/StructuredText/Span.html +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - - Class: Prismic::Fragments::StructuredText::Span - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::StructuredText::Span - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/structured_text.rb
-
- -
- -
-

Direct Known Subclasses

-

Em, Hyperlink, Label, Strong

-
-

Defined Under Namespace

-

- - - - - Classes: Em, Hyperlink, Label, Strong - - -

- - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(start, finish) ⇒ Span - - - - - -

-
-

Returns a new instance of Span

- - -
-
-
- - -
- - - - -
-
-
-
-103
-104
-105
-106
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 103
-
-def initialize(start, finish)
-  @start = start
-  @end = finish
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #end ⇒ Number - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Number) - - - -
  • - -
- -
- - - - -
-
-
-
-101
-102
-103
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 101
-
-def end
-  @end
-end
-
-
- - - -
-

- - #start ⇒ Number - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Number) - - - -
  • - -
- -
- - - - -
-
-
-
-99
-100
-101
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 99
-
-def start
-  @start
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/StructuredText/Span/Em.html b/docs/Prismic/Fragments/StructuredText/Span/Em.html deleted file mode 100644 index 183ef40..0000000 --- a/docs/Prismic/Fragments/StructuredText/Span/Em.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - - Class: Prismic::Fragments::StructuredText::Span::Em - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::StructuredText::Span::Em - - - -

-
- -
-
Inherits:
-
- Prismic::Fragments::StructuredText::Span - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/structured_text.rb
-
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Prismic::Fragments::StructuredText::Span

-

#end, #start

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Prismic::Fragments::StructuredText::Span

-

#initialize

-
-

Constructor Details

- -

This class inherits a constructor from Prismic::Fragments::StructuredText::Span

- -
- - -
-

Instance Method Details

- - -
-

- - #serialize(text, link_resolver = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-121
-122
-123
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 121
-
-def serialize(text, link_resolver = nil)
-  "<em>#{text}</em>"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/StructuredText/Span/Hyperlink.html b/docs/Prismic/Fragments/StructuredText/Span/Hyperlink.html deleted file mode 100644 index 3f26889..0000000 --- a/docs/Prismic/Fragments/StructuredText/Span/Hyperlink.html +++ /dev/null @@ -1,360 +0,0 @@ - - - - - - - Class: Prismic::Fragments::StructuredText::Span::Hyperlink - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::StructuredText::Span::Hyperlink - - - -

-
- -
-
Inherits:
-
- Prismic::Fragments::StructuredText::Span - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/structured_text.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #link ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute link.

    -
    - -
  • - - -
- - - - - -

Attributes inherited from Prismic::Fragments::StructuredText::Span

-

#end, #start

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(start, finish, link) ⇒ Hyperlink - - - - - -

-
-

Returns a new instance of Hyperlink

- - -
-
-
- - -
- - - - -
-
-
-
-134
-135
-136
-137
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 134
-
-def initialize(start, finish, link)
-  super(start, finish)
-  @link = link
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-
-
-

Returns the value of attribute link

- - -
-
-
- - -
- - - - -
-
-
-
-133
-134
-135
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 133
-
-def link
-  @link
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #serialize(text, link_resolver = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-138
-139
-140
-141
-142
-143
-144
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 138
-
-def serialize(text, link_resolver = nil)
-  if link.is_a? Prismic::Fragments::DocumentLink and link.broken
-    "<span>#{text}</span>"
-  else
-    %(<a href="#{link.url(link_resolver)}">#{text}</a>)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/StructuredText/Span/Label.html b/docs/Prismic/Fragments/StructuredText/Span/Label.html deleted file mode 100644 index a91d0fe..0000000 --- a/docs/Prismic/Fragments/StructuredText/Span/Label.html +++ /dev/null @@ -1,363 +0,0 @@ - - - - - - - Class: Prismic::Fragments::StructuredText::Span::Label - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::StructuredText::Span::Label - - - -

-
- -
-
Inherits:
-
- Prismic::Fragments::StructuredText::Span - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/structured_text.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

Attributes inherited from Prismic::Fragments::StructuredText::Span

-

#end, #start

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(start, finish, label) ⇒ Label - - - - - -

-
-

Returns a new instance of Label

- - -
-
-
- - -
- - - - -
-
-
-
-111
-112
-113
-114
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 111
-
-def initialize(start, finish, label)
-  super(start, finish)
-  @label = label
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #label ⇒ String - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-110
-111
-112
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 110
-
-def label
-  @label
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #serialize(text, link_resolver = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-115
-116
-117
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 115
-
-def serialize(text, link_resolver = nil)
-  "<span class=\"#{@label}\">#{text}</span>"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/StructuredText/Span/Strong.html b/docs/Prismic/Fragments/StructuredText/Span/Strong.html deleted file mode 100644 index ae1d996..0000000 --- a/docs/Prismic/Fragments/StructuredText/Span/Strong.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - - Class: Prismic::Fragments::StructuredText::Span::Strong - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::StructuredText::Span::Strong - - - -

-
- -
-
Inherits:
-
- Prismic::Fragments::StructuredText::Span - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/structured_text.rb
-
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Prismic::Fragments::StructuredText::Span

-

#end, #start

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Prismic::Fragments::StructuredText::Span

-

#initialize

-
-

Constructor Details

- -

This class inherits a constructor from Prismic::Fragments::StructuredText::Span

- -
- - -
-

Instance Method Details

- - -
-

- - #serialize(text, link_resolver = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-127
-128
-129
-
-
# File 'lib/prismic/fragments/structured_text.rb', line 127
-
-def serialize(text, link_resolver = nil)
-  "<strong>#{text}</strong>"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/Text.html b/docs/Prismic/Fragments/Text.html deleted file mode 100644 index 4eda905..0000000 --- a/docs/Prismic/Fragments/Text.html +++ /dev/null @@ -1,397 +0,0 @@ - - - - - - - Class: Prismic::Fragments::Text - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::Text - - - -

-
- -
-
Inherits:
-
- Fragment - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/text.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #value ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute value.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(value) ⇒ Text - - - - - -

-
-

Returns a new instance of Text

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/prismic/fragments/text.rb', line 7
-
-def initialize(value)
-  @value = value
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #value ⇒ Object - - - - - -

-
-

Returns the value of attribute value

- - -
-
-
- - -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'lib/prismic/fragments/text.rb', line 5
-
-def value
-  @value
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-11
-12
-13
-
-
# File 'lib/prismic/fragments/text.rb', line 11
-
-def as_html(link_resolver=nil)
-  %(<span class="text">#{CGI::escapeHTML(@value)}</span>)
-end
-
-
- -
-

- - #as_text ⇒ Object - - - - - -

- - - - -
-
-
-
-15
-16
-17
-
-
# File 'lib/prismic/fragments/text.rb', line 15
-
-def as_text
-  @value
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/Timestamp.html b/docs/Prismic/Fragments/Timestamp.html deleted file mode 100644 index 8d0ba34..0000000 --- a/docs/Prismic/Fragments/Timestamp.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - Class: Prismic::Fragments::Timestamp - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::Timestamp - - - -

-
- -
-
Inherits:
-
- Fragment - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/timestamp.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #value ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute value.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Fragment

-

#as_text

-
-

Constructor Details

- -
-

- - #initialize(value) ⇒ Timestamp - - - - - -

-
-

Returns a new instance of Timestamp

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/prismic/fragments/timestamp.rb', line 7
-
-def initialize(value)
-  @value = value
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #value ⇒ Object - - - - - -

-
-

Returns the value of attribute value

- - -
-
-
- - -
- - - - -
-
-
-
-5
-6
-7
-
-
# File 'lib/prismic/fragments/timestamp.rb', line 5
-
-def value
-  @value
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #as_html(link_resolver = nil) ⇒ String - - - - - -

-
-

Generate an HTML representation of the fragment

- - -
-
-
-

Parameters:

-
    - -
  • - - link_resolver - - - (LinkResolver) - - - (defaults to: nil) - - - — -

    The LinkResolver used to build -application's specific URL

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    the HTML representation

    -
    - -
  • - -
- -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'lib/prismic/fragments/timestamp.rb', line 17
-
-def as_html(link_resolver=nil)
-  %(<time>#{value.iso8601(3)}</time>)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Fragments/WebLink.html b/docs/Prismic/Fragments/WebLink.html deleted file mode 100644 index 173ef6f..0000000 --- a/docs/Prismic/Fragments/WebLink.html +++ /dev/null @@ -1,341 +0,0 @@ - - - - - - - Class: Prismic::Fragments::WebLink - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Fragments::WebLink - - - -

-
- -
-
Inherits:
-
- Link - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/fragments/link.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Link

-

#as_html, #end_html, #start_html

- - - - - - - - - -

Methods inherited from Fragment

-

#as_html, #as_text

-
-

Constructor Details

- -
-

- - #initialize(url) ⇒ WebLink - - - - - -

-
-

Returns a new instance of WebLink

- - -
-
-
- - -
- - - - -
-
-
-
-32
-33
-34
-
-
# File 'lib/prismic/fragments/link.rb', line 32
-
-def initialize(url)
-  @url = url
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #url(link_resolver = nil) ⇒ Object - - - - - -

-
- -
- Note: -

The link_resolver parameter is accepted but it is not used by -this method, so not providing it is perfectly fine.

-
-
- -

Returns the URL of the link

- - -
-
-
-

Parameters:

-
    - -
  • - - link_resolver - - - (LinkResolver) - - - (defaults to: nil) - - - — -

    The link resolver

    -
    - -
  • - -
- - -

See Also:

- - -
- - - - -
-
-
-
-44
-45
-46
-
-
# File 'lib/prismic/fragments/link.rb', line 44
-
-def url
-  @url
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/HtmlSerializer.html b/docs/Prismic/HtmlSerializer.html deleted file mode 100644 index e8634f9..0000000 --- a/docs/Prismic/HtmlSerializer.html +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - - Class: Prismic::HtmlSerializer - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::HtmlSerializer - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic.rb
-
- -
- -

Overview

-
-

A class to override the default was to serialize HTML. Only needed if you want to override the default HTML serialization.

- -

The html_serializer function is the recommended way to create an HtmlSerializer.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(&blk) ⇒ HtmlSerializer - - - - - -

-
-

Returns a new instance of HtmlSerializer

- - -
-
-
- - -
- - - - -
-
-
-
-562
-563
-564
-
-
# File 'lib/prismic.rb', line 562
-
-def initialize(&blk)
-  @blk = blk
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #serialize(element, content) ⇒ Object - - - - - -

- - - - -
-
-
-
-566
-567
-568
-
-
# File 'lib/prismic.rb', line 566
-
-def serialize(element, content)
-  @blk.call(element, content)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/JsonParser.html b/docs/Prismic/JsonParser.html deleted file mode 100644 index f5d677c..0000000 --- a/docs/Prismic/JsonParser.html +++ /dev/null @@ -1,1766 +0,0 @@ - - - - - - - Module: Prismic::JsonParser - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Prismic::JsonParser - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/json_parsers.rb
-
- -
- - -

Constant Summary

-
- -
@@warned_unknown_type = - -
-
[]
- -
- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .color_parser(json) ⇒ Object - - - - - -

- - - - -
-
-
-
-119
-120
-121
-
-
# File 'lib/prismic/json_parsers.rb', line 119
-
-def color_parser(json)
-  Prismic::Fragments::Color.new(json['value'][1..6])
-end
-
-
- -
-

- - .date_parser(json) ⇒ Object - - - - - -

- - - - -
-
-
-
-79
-80
-81
-
-
# File 'lib/prismic/json_parsers.rb', line 79
-
-def date_parser(json)
-  Prismic::Fragments::Date.new(Time.parse(json['value']))
-end
-
-
- -
- - - - - -
-
-
-
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-
-
# File 'lib/prismic/json_parsers.rb', line 32
-
-def document_link_parser(json)
-  doc = json['value']['document']
-  type = doc['type']
-  fragments = {}
-  if doc['data'] and doc['data'][type]
-    fragments = Hash[doc['data'][type].map { |name, fragment|
-      if fragment.is_a? Array
-        [name, multiple_parser(fragment)]
-      else
-        [name, parsers[fragment['type']].call(fragment)]
-      end
-    }]
-  end
-  Prismic::Fragments::DocumentLink.new(
-    doc['id'],
-    doc['uid'],
-    type,
-    doc['tags'],
-    URI.unescape(doc['slug']),
-    fragments,
-    json['value']['isBroken'])
-end
-
-
- -
-

- - .document_parser(json) ⇒ Object - - - - - -

- - - - -
-
-
-
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-
-
# File 'lib/prismic/json_parsers.rb', line 224
-
-def document_parser(json)
-  data_json = json['data'].values.first  # {"doc_type": data}
-
-  # Removing the unknown types + sending a warning, once
-  data_json.select!{ |_, fragment|
-    known_type = fragment.is_a?(Array) || parsers.include?(fragment['type'])
-    if !known_type && !@@warned_unknown_type.include?(fragment['type'])
-      warn "Type #{fragment['type']} is unknown, fragment was skipped; perhaps you should update your prismic.io gem?"
-      @@warned_unknown_type << fragment['type']
-    end
-    known_type
-  }
-
-  fragments = Hash[data_json.map { |name, fragment|
-    [name, fragment_parser(fragment)]
-  }]
-
-  Prismic::Document.new(
-      json['id'],
-      json['uid'],
-      json['type'],
-      json['href'],
-      json['tags'],
-      json['slugs'].map { |slug| URI.unescape(slug) },
-      json['first_publication_date'] && Time.parse(json['first_publication_date']),
-      json['last_publication_date'] && Time.parse(json['last_publication_date']),
-      fragments)
-end
-
-
- -
-

- - .embed_parser(json) ⇒ Object - - - - - -

- - - - -
-
-
-
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-
-
# File 'lib/prismic/json_parsers.rb', line 91
-
-def embed_parser(json)
-  oembed = json['value']['oembed']
-  Prismic::Fragments::Embed.new(
-    oembed['type'],
-    oembed['provider_name'],
-    oembed['provider_url'],
-    oembed['html'],
-    oembed
-  )
-end
-
-
- -
- - - - - -
-
-
-
-59
-60
-61
-
-
# File 'lib/prismic/json_parsers.rb', line 59
-
-def file_link_parser(json)
-  Prismic::Fragments::FileLink.new(json['value']['file']['url'], json['value']['file']['name'], json['value']['file']['kind'], json['value']['file']['size'])
-end
-
-
- -
-

- - .fragment_parser(fragment) ⇒ Object - - - - - -

- - - - -
-
-
-
-216
-217
-218
-219
-220
-221
-222
-
-
# File 'lib/prismic/json_parsers.rb', line 216
-
-def fragment_parser(fragment)
-  if fragment.is_a? Array
-    multiple_parser(fragment)
-  else
-    parsers[fragment['type']].call(fragment)
-  end
-end
-
-
- -
-

- - .geo_point_parser(json) ⇒ Object - - - - - -

- - - - -
-
-
-
-102
-103
-104
-105
-106
-107
-
-
# File 'lib/prismic/json_parsers.rb', line 102
-
-def geo_point_parser(json)
-  Prismic::Fragments::GeoPoint.new(
-    json['value']['longitude'],
-    json['value']['latitude']
-  )
-end
-
-
- -
-

- - .group_parser(json) ⇒ Object - - - - - -

- - - - -
-
-
-
-199
-200
-201
-202
-203
-204
-205
-206
-
-
# File 'lib/prismic/json_parsers.rb', line 199
-
-def group_parser(json)
-  fragment_list_array = []
-  json['value'].each do |group|
-    fragments = Hash[ group.map {|name, fragment| [name, parsers[fragment['type']].call(fragment)] }]
-    fragment_list_array << Prismic::Fragments::GroupDocument.new(fragments)
-  end
-  Prismic::Fragments::Group.new(fragment_list_array)
-end
-
-
- -
- - - - - -
-
-
-
-55
-56
-57
-
-
# File 'lib/prismic/json_parsers.rb', line 55
-
-def image_link_parser(json)
-  Prismic::Fragments::ImageLink.new(json['value']['image']['url'])
-end
-
-
- -
-

- - .image_parser(json) ⇒ Object - - - - - -

- - - - -
-
-
-
-109
-110
-111
-112
-113
-114
-115
-116
-117
-
-
# File 'lib/prismic/json_parsers.rb', line 109
-
-def image_parser(json)
-  main  = view_parser(json['value']['main'])
-  views = {}
-  json['value']['views'].each do |name, view|
-    views[name] = view_parser(view)
-  end
-
-  Prismic::Fragments::Image.new(main, views)
-end
-
-
- -
-

- - .multiple_parser(json) ⇒ Object - - - - - -

- - - - -
-
-
-
-192
-193
-194
-195
-196
-197
-
-
# File 'lib/prismic/json_parsers.rb', line 192
-
-def multiple_parser(json)
-  fragments = json.map do |fragment|
-    parsers[fragment['type']].call(fragment)
-  end
-  Prismic::Fragments::Multiple.new(fragments)
-end
-
-
- -
-

- - .number_parser(json) ⇒ Object - - - - - -

- - - - -
-
-
-
-87
-88
-89
-
-
# File 'lib/prismic/json_parsers.rb', line 87
-
-def number_parser(json)
-  Prismic::Fragments::Number.new(json['value'])
-end
-
-
- -
-

- - .parsers ⇒ Object - - - - - -

- - - - -
-
-
-
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-
-
# File 'lib/prismic/json_parsers.rb', line 9
-
-def parsers
-  @parsers ||= {
-    'Link.document'  => method(:document_link_parser),
-    'Text'           => method(:text_parser),
-    'Link.web'       => method(:web_link_parser),
-    'Link.image'     => method(:image_link_parser),
-    'Link.file'      => method(:file_link_parser),
-    'Date'           => method(:date_parser),
-    'Timestamp'      => method(:timestamp_parser),
-    'Number'         => method(:number_parser),
-    'Embed'          => method(:embed_parser),
-    'GeoPoint'       => method(:geo_point_parser),
-    'Image'          => method(:image_parser),
-    'Color'          => method(:color_parser),
-    'StructuredText' => method(:structured_text_parser),
-    'Select'         => method(:select_parser),
-    'Multiple'       => method(:multiple_parser),
-    'Group'          => method(:group_parser),
-    'SliceZone'      => method(:slices_parser),
-    'Separator'      => method(:separator_parser)
-  }
-end
-
-
- -
-

- - .response_parser(documents) ⇒ Object - - - - - -

-
- - -
-
-
- -

Raises:

-
    - -
  • - - - (FormSearchException) - - - -
  • - -
- -
- - - - -
-
-
-
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-
-
# File 'lib/prismic/json_parsers.rb', line 259
-
-def response_parser(documents)
-  raise FormSearchException, "Error : #{documents['error']}" if documents['error']
-  Prismic::Response.new(
-    documents['page'],
-    documents['results_per_page'],
-    documents['results_size'],
-    documents['total_results_size'],
-    documents['total_pages'],
-    documents['next_page'],
-    documents['prev_page'],
-    results_parser(documents['results'])
-  )
-end
-
-
- -
-

- - .results_parser(results) ⇒ Object - - - - - -

- - - - -
-
-
-
-253
-254
-255
-256
-257
-
-
# File 'lib/prismic/json_parsers.rb', line 253
-
-def results_parser(results)
-  results.map do |doc|
-    document_parser(doc)
-  end
-end
-
-
- -
-

- - .select_parser(json) ⇒ Object - - - - - -

- - - - -
-
-
-
-71
-72
-73
-
-
# File 'lib/prismic/json_parsers.rb', line 71
-
-def select_parser(json)
-  Prismic::Fragments::Text.new(json['value'])
-end
-
-
- -
-

- - .separator_parser(json) ⇒ Object - - - - - -

- - - - -
-
-
-
-67
-68
-69
-
-
# File 'lib/prismic/json_parsers.rb', line 67
-
-def separator_parser(json)
-  Prismic::Fragments::Separator.new('')
-end
-
-
- -
-

- - .slices_parser(json) ⇒ Object - - - - - -

- - - - -
-
-
-
-208
-209
-210
-211
-212
-213
-214
-
-
# File 'lib/prismic/json_parsers.rb', line 208
-
-def slices_parser(json)
-  slices = []
-  json['value'].each do |data|
-    slices << Prismic::Fragments::Slice.new(data['slice_type'], data['slice_label'], fragment_parser(data['value']))
-  end
-  Prismic::Fragments::SliceZone.new(slices)
-end
-
-
- -
-

- - .span_parser(span) ⇒ Object - - - - - -

- - - - -
-
-
-
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-
-
# File 'lib/prismic/json_parsers.rb', line 124
-
-def self.span_parser(span)
-  case span['type']
-  when 'em'
-    Prismic::Fragments::StructuredText::Span::Em.new(span['start'], span['end'])
-  when 'strong'
-    Prismic::Fragments::StructuredText::Span::Strong.new(span['start'], span['end'])
-  when 'hyperlink'
-    Prismic::Fragments::StructuredText::Span::Hyperlink.new(span['start'], span['end'], link_parser(span['data']))
-  else
-    label = span['data'] && span['data']['label']
-    Prismic::Fragments::StructuredText::Span::Label.new(span['start'], span['end'], label)
-  end
-end
-
-
- -
-

- - .structured_text_parser(json) ⇒ Object - - - - - -

- - - - -
-
-
-
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-
-
# File 'lib/prismic/json_parsers.rb', line 123
-
-def structured_text_parser(json)
-  def self.span_parser(span)
-    case span['type']
-    when 'em'
-      Prismic::Fragments::StructuredText::Span::Em.new(span['start'], span['end'])
-    when 'strong'
-      Prismic::Fragments::StructuredText::Span::Strong.new(span['start'], span['end'])
-    when 'hyperlink'
-      Prismic::Fragments::StructuredText::Span::Hyperlink.new(span['start'], span['end'], link_parser(span['data']))
-    else
-      label = span['data'] && span['data']['label']
-      Prismic::Fragments::StructuredText::Span::Label.new(span['start'], span['end'], label)
-    end
-  end
-
-  blocks = json['value'].map do |block|
-    case block['type']
-    when 'paragraph'
-      spans = block['spans'].map {|span| span_parser(span) }
-      Prismic::Fragments::StructuredText::Block::Paragraph.new(block['text'], spans, block['label'])
-    when 'preformatted'
-      spans = block['spans'].map {|span| span_parser(span) }
-      Prismic::Fragments::StructuredText::Block::Preformatted.new(block['text'], spans, block['label'])
-    when /^heading(\d+)$/
-      heading = $1
-      spans = block['spans'].map {|span| span_parser(span) }
-      Prismic::Fragments::StructuredText::Block::Heading.new(
-        block['text'],
-        spans,
-        heading.to_i,
-        block['label']
-      )
-    when 'o-list-item'
-      spans = block['spans'].map {|span| span_parser(span) }
-      Prismic::Fragments::StructuredText::Block::ListItem.new(
-        block['text'],
-        spans,
-        true,  # ordered
-        block['label']
-      )
-    when 'list-item'
-      spans = block['spans'].map {|span| span_parser(span) }
-      Prismic::Fragments::StructuredText::Block::ListItem.new(
-        block['text'],
-        spans,
-        false,  # unordered
-        block['label']
-      )
-    when 'image'
-      Prismic::Fragments::StructuredText::Block::Image.new(
-          view_parser(block),
-          block['label']
-      )
-    when 'embed'
-      boembed = block['oembed']
-      Prismic::Fragments::Embed.new(
-        boembed['type'],
-        boembed['provider_name'],
-        boembed['provider_url'],
-        boembed['html'],
-        boembed
-      )
-    else
-      puts "Unknown bloc type: #{block['type']}"
-    end
-  end
-  Prismic::Fragments::StructuredText.new(blocks)
-end
-
-
- -
-

- - .text_parser(json) ⇒ Object - - - - - -

- - - - -
-
-
-
-63
-64
-65
-
-
# File 'lib/prismic/json_parsers.rb', line 63
-
-def text_parser(json)
-  Prismic::Fragments::Text.new(json['value'])
-end
-
-
- -
-

- - .timestamp_parser(json) ⇒ Object - - - - - -

- - - - -
-
-
-
-83
-84
-85
-
-
# File 'lib/prismic/json_parsers.rb', line 83
-
-def timestamp_parser(json)
-  Prismic::Fragments::Timestamp.new(Time.parse(json['value']))
-end
-
-
- -
- - - - - -
-
-
-
-75
-76
-77
-
-
# File 'lib/prismic/json_parsers.rb', line 75
-
-def web_link_parser(json)
-  Prismic::Fragments::WebLink.new(json['value']['url'])
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/LinkResolver.html b/docs/Prismic/LinkResolver.html deleted file mode 100644 index e1a8240..0000000 --- a/docs/Prismic/LinkResolver.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - Class: Prismic::LinkResolver - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::LinkResolver - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic.rb
-
- -
- -

Overview

-
-

The LinkResolver will help to build URL specific to an application, based -on a generic prismic.io's Document link.

- -

The link_resolver function is the recommended way to create a LinkResolver.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #ref ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute ref.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(ref) {|doc_link| ... } ⇒ LinkResolver - - - - - -

-
-

Returns a new instance of LinkResolver

- - -
-
-
- -

Yield Parameters:

- -

Yield Returns:

-
    - -
  • - - - (String) - - - - — -

    The application specific URL of the given document

    -
    - -
  • - -
- -
- - - - -
-
-
-
-544
-545
-546
-547
-
-
# File 'lib/prismic.rb', line 544
-
-def initialize(ref, &blk)
-  @ref = ref
-  @blk = blk
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #ref ⇒ Object (readonly) - - - - - -

-
-

Returns the value of attribute ref

- - -
-
-
- - -
- - - - -
-
-
-
-540
-541
-542
-
-
# File 'lib/prismic.rb', line 540
-
-def ref
-  @ref
-end
-
-
- -
- - -
-

Instance Method Details

- - -
- - - - - -
-
-
-
-548
-549
-550
-551
-552
-553
-554
-555
-
-
# File 'lib/prismic.rb', line 548
-
-def link_to(doc)
-  if doc.is_a? Prismic::Fragments::DocumentLink
-    @blk.call(doc)
-  elsif doc.is_a? Prismic::Document
-    doc_link = Prismic::Fragments::DocumentLink.new(doc.id, doc.uid, doc.type, doc.tags, doc.slug, doc.fragments, false)
-    @blk.call(doc_link)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/LruCache.html b/docs/Prismic/LruCache.html deleted file mode 100644 index 43a5d0b..0000000 --- a/docs/Prismic/LruCache.html +++ /dev/null @@ -1,1141 +0,0 @@ - - - - - - - Class: Prismic::LruCache - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::LruCache - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/cache/lru.rb
-
- -
- -

Overview

-
-

This is a simple cache class provided with the prismic.io Ruby kit.

- -

It is pretty dumb but effective: * everything is stored in memory,

- -

If you need a smarter caching (for instance, rely on memcached), you can -extend this class and replace its methods, and when creating your API object -like this for instance: Prismic.api(url, options), pass the name of the -class you created as a :cache option. Therefore, to use this simple cache, -you can create your API object like this: Prismic.api(url, cache: -Prismic::DefaultCache)

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(max_size = 100) ⇒ LruCache - - - - - -

-
-

Returns a new instance of LruCache

- - -
-
-
-

Parameters:

-
    - -
  • - - max_size - - - (Fixnum) - - - (defaults to: 100) - - - — -

    (100) The default maximum of keys to store

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-22
-23
-24
-
-
# File 'lib/prismic/cache/lru.rb', line 22
-
-def initialize(max_size=100)
-  @intern = Hashery::LRUHash.new(max_size)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #intern ⇒ LRUHash<String,Object> (readonly) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (LRUHash<String,Object>) - - - -
  • - -
- -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'lib/prismic/cache/lru.rb', line 19
-
-def intern
-  @intern
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #[]=(key, value) ⇒ Object - - - - - -

- - - - -
-
-
-
-37
-38
-39
-
-
# File 'lib/prismic/cache/lru.rb', line 37
-
-def []=(key, value)
-  set(key, value, nil)
-end
-
-
- -
-

- - #delete(key) ⇒ Object - - - - - -

- - - - -
-
-
-
-60
-61
-62
-63
-
-
# File 'lib/prismic/cache/lru.rb', line 60
-
-def delete(key)
-  @intern.delete(key)
-  nil
-end
-
-
- -
-

- - #expired?(key) ⇒ Boolean - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-75
-76
-77
-78
-79
-80
-81
-82
-
-
# File 'lib/prismic/cache/lru.rb', line 75
-
-def expired?(key)
-  if include?(key) && @intern[key][:expired_in] != nil
-    expired_in = @intern[key][:expired_in]
-    expired_in && expired_in < Time.now.getutc.to_i
-  else
-    false
-  end
-end
-
-
- -
-

- - #get(key) ⇒ Object - - - - Also known as: - [] - - - - -

-
-

Get a cache entry

- - -
-
-
-

Parameters:

-
    - -
  • - - key - - - (String) - - - - — -

    The key to fetch

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    The cache object as was stored

    -
    - -
  • - -
- -
- - - - -
-
-
-
-46
-47
-48
-49
-
-
# File 'lib/prismic/cache/lru.rb', line 46
-
-def get(key)
-  return delete(key) if expired?(key)
-  include?(key) ? @intern[key][:data] : nil
-end
-
-
- -
-

- - #get_or_set(key, value = nil, expired_in = nil) ⇒ Object - - - - - -

- - - - -
-
-
-
-52
-53
-54
-55
-56
-57
-58
-
-
# File 'lib/prismic/cache/lru.rb', line 52
-
-def get_or_set(key, value = nil, expired_in = nil)
-  if include?(key) && !expired?(key)
-    return get(key)
-  else
-    set(key, block_given? ? yield : value, expired_in)
-  end
-end
-
-
- -
-

- - #has_key?(key) ⇒ Boolean - - - - Also known as: - include? - - - - -

-
-

Checks if a cache entry exists

- - -
-
-
-

Parameters:

-
    - -
  • - - key - - - (String) - - - - — -

    The key to test

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-70
-71
-72
-
-
# File 'lib/prismic/cache/lru.rb', line 70
-
-def has_key?(key)
-  @intern.has_key?(key)
-end
-
-
- -
-

- - #invalidate_all! ⇒ Object - - - - Also known as: - clear! - - - - -

-
-

Invalidates all entries

- - -
-
-
- - -
- - - - -
-
-
-
-85
-86
-87
-
-
# File 'lib/prismic/cache/lru.rb', line 85
-
-def invalidate_all!
-  @intern.clear
-end
-
-
- -
-

- - #keys ⇒ Array<String> - - - - - -

-
-

Expose the Hash keys

- -

This is only for debugging purposes.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array<String>) - - - -
  • - -
- -
- - - - -
-
-
-
-95
-96
-97
-
-
# File 'lib/prismic/cache/lru.rb', line 95
-
-def keys
-  @intern.keys
-end
-
-
- -
-

- - #set(key, value, expired_in = nil) ⇒ Object - - - - - -

-
-

Add a cache entry.

- - -
-
-
-

Parameters:

-
    - -
  • - - key - - - (String) - - - - — -

    The key

    -
    - -
  • - -
  • - - value - - - (Object) - - - - — -

    The value to store

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Object) - - - - — -

    The stored value

    -
    - -
  • - -
- -
- - - - -
-
-
-
-32
-33
-34
-35
-
-
# File 'lib/prismic/cache/lru.rb', line 32
-
-def set(key, value, expired_in = nil)
-  @intern.store(key, { :data => value, :expired_in => expired_in = expired_in && Time.now.getutc.to_i + expired_in })
-  value
-end
-
-
- -
-

- - #size ⇒ Fixum - - - - Also known as: - length - - - - -

-
-

Return the number of stored keys

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Fixum) - - - -
  • - -
- -
- - - - -
-
-
-
-102
-103
-104
-
-
# File 'lib/prismic/cache/lru.rb', line 102
-
-def size
-  @intern.size
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Predicates.html b/docs/Prismic/Predicates.html deleted file mode 100644 index 8e0eca4..0000000 --- a/docs/Prismic/Predicates.html +++ /dev/null @@ -1,1682 +0,0 @@ - - - - - - - Module: Prismic::Predicates - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Prismic::Predicates - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/predicates.rb
-
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .any(fragment, values) ⇒ Object - - - - - -

- - - - -
-
-
-
-16
-17
-18
-
-
# File 'lib/prismic/predicates.rb', line 16
-
-def self.any(fragment, values)
-  ['any', fragment, values]
-end
-
-
- -
-

- - .at(fragment, value) ⇒ Object - - - - - -

- - - - -
-
-
-
-4
-5
-6
-
-
# File 'lib/prismic/predicates.rb', line 4
-
-def self.at(fragment, value)
-  ['at', fragment, value]
-end
-
-
- -
-

- - .date_after(fragment, after) ⇒ Object - - - - - -

- - - - -
-
-
-
-52
-53
-54
-
-
# File 'lib/prismic/predicates.rb', line 52
-
-def self.date_after(fragment, after)
-  ['date.after', fragment, as_timestamp(after)]
-end
-
-
- -
-

- - .date_before(fragment, before) ⇒ Object - - - - - -

- - - - -
-
-
-
-48
-49
-50
-
-
# File 'lib/prismic/predicates.rb', line 48
-
-def self.date_before(fragment, before)
-  ['date.before', fragment, as_timestamp(before)]
-end
-
-
- -
-

- - .date_between(fragment, before, after) ⇒ Object - - - - - -

- - - - -
-
-
-
-56
-57
-58
-
-
# File 'lib/prismic/predicates.rb', line 56
-
-def self.date_between(fragment, before, after)
-  ['date.between', fragment, as_timestamp(before), as_timestamp(after)]
-end
-
-
- -
-

- - .day_of_month(fragment, day) ⇒ Object - - - - - -

- - - - -
-
-
-
-60
-61
-62
-
-
# File 'lib/prismic/predicates.rb', line 60
-
-def self.day_of_month(fragment, day)
-  ['date.day-of-month', fragment, day]
-end
-
-
- -
-

- - .day_of_month_after(fragment, day) ⇒ Object - - - - - -

- - - - -
-
-
-
-64
-65
-66
-
-
# File 'lib/prismic/predicates.rb', line 64
-
-def self.day_of_month_after(fragment, day)
-  ['date.day-of-month-after', fragment, day]
-end
-
-
- -
-

- - .day_of_month_before(fragment, day) ⇒ Object - - - - - -

- - - - -
-
-
-
-68
-69
-70
-
-
# File 'lib/prismic/predicates.rb', line 68
-
-def self.day_of_month_before(fragment, day)
-  ['date.day-of-month-before', fragment, day]
-end
-
-
- -
-

- - .day_of_week(fragment, day) ⇒ Object - - - - - -

- - - - -
-
-
-
-72
-73
-74
-
-
# File 'lib/prismic/predicates.rb', line 72
-
-def self.day_of_week(fragment, day)
-  ['date.day-of-week', fragment, day]
-end
-
-
- -
-

- - .day_of_week_after(fragment, day) ⇒ Object - - - - - -

- - - - -
-
-
-
-76
-77
-78
-
-
# File 'lib/prismic/predicates.rb', line 76
-
-def self.day_of_week_after(fragment, day)
-  ['date.day-of-week-after', fragment, day]
-end
-
-
- -
-

- - .day_of_week_before(fragment, day) ⇒ Object - - - - - -

- - - - -
-
-
-
-80
-81
-82
-
-
# File 'lib/prismic/predicates.rb', line 80
-
-def self.day_of_week_before(fragment, day)
-  ['date.day-of-week-before', fragment, day]
-end
-
-
- -
-

- - .fulltext(fragment, values) ⇒ Object - - - - - -

- - - - -
-
-
-
-20
-21
-22
-
-
# File 'lib/prismic/predicates.rb', line 20
-
-def self.fulltext(fragment, values)
-  ['fulltext', fragment, values]
-end
-
-
- -
-

- - .gt(fragment, value) ⇒ Object - - - - - -

- - - - -
-
-
-
-36
-37
-38
-
-
# File 'lib/prismic/predicates.rb', line 36
-
-def self.gt(fragment, value)
-  ['number.gt', fragment, value]
-end
-
-
- -
-

- - .has(fragment) ⇒ Object - - - - - -

- - - - -
-
-
-
-28
-29
-30
-
-
# File 'lib/prismic/predicates.rb', line 28
-
-def self.has(fragment)
-  ['has', fragment]
-end
-
-
- -
-

- - .hour(fragment, hour) ⇒ Object - - - - - -

- - - - -
-
-
-
-108
-109
-110
-
-
# File 'lib/prismic/predicates.rb', line 108
-
-def self.hour(fragment, hour)
-  ['date.hour', fragment, hour]
-end
-
-
- -
-

- - .hour_after(fragment, hour) ⇒ Object - - - - - -

- - - - -
-
-
-
-116
-117
-118
-
-
# File 'lib/prismic/predicates.rb', line 116
-
-def self.hour_after(fragment, hour)
-  ['date.hour-after', fragment, hour]
-end
-
-
- -
-

- - .hour_before(fragment, hour) ⇒ Object - - - - - -

- - - - -
-
-
-
-112
-113
-114
-
-
# File 'lib/prismic/predicates.rb', line 112
-
-def self.hour_before(fragment, hour)
-  ['date.hour-before', fragment, hour]
-end
-
-
- -
-

- - .in(fragment, value) ⇒ Object - - - - - -

- - - - -
-
-
-
-12
-13
-14
-
-
# File 'lib/prismic/predicates.rb', line 12
-
-def self.in(fragment, value)
-  ['in', fragment, value]
-end
-
-
- -
-

- - .in_range(fragment, before, after) ⇒ Object - - - - - -

- - - - -
-
-
-
-44
-45
-46
-
-
# File 'lib/prismic/predicates.rb', line 44
-
-def self.in_range(fragment, before, after)
-  ['number.inRange', fragment, before, after]
-end
-
-
- -
-

- - .lt(fragment, value) ⇒ Object - - - - - -

- - - - -
-
-
-
-40
-41
-42
-
-
# File 'lib/prismic/predicates.rb', line 40
-
-def self.lt(fragment, value)
-  ['number.lt', fragment, value]
-end
-
-
- -
-

- - .missing(fragment) ⇒ Object - - - - - -

- - - - -
-
-
-
-32
-33
-34
-
-
# File 'lib/prismic/predicates.rb', line 32
-
-def self.missing(fragment)
-  ['missing', fragment]
-end
-
-
- -
-

- - .month(fragment, month) ⇒ Object - - - - - -

- - - - -
-
-
-
-84
-85
-86
-
-
# File 'lib/prismic/predicates.rb', line 84
-
-def self.month(fragment, month)
-  ['date.month', fragment, month]
-end
-
-
- -
-

- - .month_after(fragment, month) ⇒ Object - - - - - -

- - - - -
-
-
-
-92
-93
-94
-
-
# File 'lib/prismic/predicates.rb', line 92
-
-def self.month_after(fragment, month)
-  ['date.month-after', fragment, month]
-end
-
-
- -
-

- - .month_before(fragment, month) ⇒ Object - - - - - -

- - - - -
-
-
-
-88
-89
-90
-
-
# File 'lib/prismic/predicates.rb', line 88
-
-def self.month_before(fragment, month)
-  ['date.month-before', fragment, month]
-end
-
-
- -
-

- - .near(fragment, latitude, longitude, radius) ⇒ Object - - - - - -

- - - - -
-
-
-
-120
-121
-122
-
-
# File 'lib/prismic/predicates.rb', line 120
-
-def self.near(fragment, latitude, longitude, radius)
-  ['geopoint.near', fragment, latitude, longitude, radius]
-end
-
-
- -
-

- - .not(fragment, value) ⇒ Object - - - - - -

- - - - -
-
-
-
-8
-9
-10
-
-
# File 'lib/prismic/predicates.rb', line 8
-
-def self.not(fragment, value)
-  ['not', fragment, value]
-end
-
-
- -
-

- - .similar(fragment, value) ⇒ Object - - - - - -

- - - - -
-
-
-
-24
-25
-26
-
-
# File 'lib/prismic/predicates.rb', line 24
-
-def self.similar(fragment, value)
-  ['similar', fragment, value]
-end
-
-
- -
-

- - .year(fragment, year) ⇒ Object - - - - - -

- - - - -
-
-
-
-96
-97
-98
-
-
# File 'lib/prismic/predicates.rb', line 96
-
-def self.year(fragment, year)
-  ['date.year', fragment, year]
-end
-
-
- -
-

- - .year_after(fragment, year) ⇒ Object - - - - - -

- - - - -
-
-
-
-104
-105
-106
-
-
# File 'lib/prismic/predicates.rb', line 104
-
-def self.year_after(fragment, year)
-  ['date.year-after', fragment, year]
-end
-
-
- -
-

- - .year_before(fragment, year) ⇒ Object - - - - - -

- - - - -
-
-
-
-100
-101
-102
-
-
# File 'lib/prismic/predicates.rb', line 100
-
-def self.year_before(fragment, year)
-  ['date.year-before', fragment, year]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Ref.html b/docs/Prismic/Ref.html deleted file mode 100644 index 9b1200e..0000000 --- a/docs/Prismic/Ref.html +++ /dev/null @@ -1,644 +0,0 @@ - - - - - - - Class: Prismic::Ref - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Ref - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic.rb
-
- -
- -

Overview

-
-

Represent a prismic.io reference, a fix point in time.

- -

The references must be provided when accessing to any prismic.io resource -(except /api) and allow to assert that the URL you use will always -returns the same results.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #id ⇒ String - - - - - - - - - - - - - - - - -

    Returns the value of attribute id.

    -
    - -
  • - - -
  • - - - #is_master ⇒ Boolean - - - - (also: #master?) - - - - - - - - - - - - - - -

    Returns the value of attribute is_master.

    -
    - -
  • - - -
  • - - - #label ⇒ String - - - - - - - - - - - - - - - - -

    Returns the value of attribute label.

    -
    - -
  • - - -
  • - - - #ref ⇒ String - - - - - - - - - - - - - - - - -

    Returns the value of attribute ref.

    -
    - -
  • - - -
  • - - - #scheduled_at ⇒ Time - - - - - - - - - - - - - - - - -

    Returns the value of attribute scheduled_at.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(id, ref, label, is_master = false, scheduled_at = nil) ⇒ Ref - - - - - -

-
-

Returns a new instance of Ref

- - -
-
-
- - -
- - - - -
-
-
-
-524
-525
-526
-527
-528
-529
-530
-
-
# File 'lib/prismic.rb', line 524
-
-def initialize(id, ref, label, is_master = false, scheduled_at = nil)
-  @id = id
-  @ref = ref
-  @label = label
-  @is_master = is_master
-  @scheduled_at = scheduled_at
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #id ⇒ String - - - - - -

-
-

Returns the value of attribute id.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-502
-503
-504
-
-
# File 'lib/prismic.rb', line 502
-
-def id
-  @id
-end
-
-
- - - -
-

- - #is_master ⇒ Boolean - - - - Also known as: - master? - - - - -

-
-

Returns the value of attribute is_master.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-517
-518
-519
-
-
# File 'lib/prismic.rb', line 517
-
-def is_master
-  @is_master
-end
-
-
- - - -
-

- - #label ⇒ String - - - - - -

-
-

Returns the value of attribute label.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-512
-513
-514
-
-
# File 'lib/prismic.rb', line 512
-
-def label
-  @label
-end
-
-
- - - -
-

- - #ref ⇒ String - - - - - -

-
-

Returns the value of attribute ref.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-507
-508
-509
-
-
# File 'lib/prismic.rb', line 507
-
-def ref
-  @ref
-end
-
-
- - - -
-

- - #scheduled_at ⇒ Time - - - - - -

-
-

Returns the value of attribute scheduled_at.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Time) - - - -
  • - -
- -
- - - - -
-
-
-
-522
-523
-524
-
-
# File 'lib/prismic.rb', line 522
-
-def scheduled_at
-  @scheduled_at
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Response.html b/docs/Prismic/Response.html deleted file mode 100644 index bcca906..0000000 --- a/docs/Prismic/Response.html +++ /dev/null @@ -1,1161 +0,0 @@ - - - - - - - Class: Prismic::Response - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Response - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
Enumerable
-
- - - - - - -
-
Defined in:
-
lib/prismic.rb
-
- -
- -

Overview

-
-

Paginated response to a Prismic.io query. Note that you may not get all documents in the first page, -and may need to retrieve more pages or increase the page size.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - -
-

Constructor Details

- -
-

- - #initialize(page, results_per_page, results_size, total_results_size, total_pages, next_page, prev_page, results) ⇒ Response - - - - - -

-
-

Returns a new instance of Response

- - -
-
-
- - -
- - - - -
-
-
-
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-
-
# File 'lib/prismic.rb', line 400
-
-def initialize(page, results_per_page, results_size, total_results_size, total_pages, next_page, prev_page, results)
-  @page = page
-  @results_per_page = results_per_page
-  @results_size = results_size
-  @total_results_size = total_results_size
-  @total_pages = total_pages
-  @next_page = next_page
-  @prev_page = prev_page
-  @results = results
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #next_page ⇒ String - - - - - -

-
-

Returns URL to the next page - nil if current page is the last page

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    URL to the next page - nil if current page is the last page

    -
    - -
  • - -
- -
- - - - -
-
-
-
-390
-391
-392
-
-
# File 'lib/prismic.rb', line 390
-
-def next_page
-  @next_page
-end
-
-
- - - -
-

- - #page ⇒ Number - - - - Also known as: - current_page - - - - -

-
-

Returns current page, starting at 1

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Number) - - - - — -

    current page, starting at 1

    -
    - -
  • - -
- -
- - - - -
-
-
-
-380
-381
-382
-
-
# File 'lib/prismic.rb', line 380
-
-def page
-  @page
-end
-
-
- - - -
-

- - #prev_page ⇒ String - - - - - -

-
-

Returns URL to the previous page - nil if current page is the first page

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    URL to the previous page - nil if current page is the first page

    -
    - -
  • - -
- -
- - - - -
-
-
-
-392
-393
-394
-
-
# File 'lib/prismic.rb', line 392
-
-def prev_page
-  @prev_page
-end
-
-
- - - -
-

- - #results ⇒ Array<Document> - - - - - -

-
-

Returns Documents of the current page

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array<Document>) - - - - — -

    Documents of the current page

    -
    - -
  • - -
- -
- - - - -
-
-
-
-394
-395
-396
-
-
# File 'lib/prismic.rb', line 394
-
-def results
-  @results
-end
-
-
- - - -
-

- - #results_per_page ⇒ Number - - - - Also known as: - limit_value - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Number) - - - -
  • - -
- -
- - - - -
-
-
-
-382
-383
-384
-
-
# File 'lib/prismic.rb', line 382
-
-def results_per_page
-  @results_per_page
-end
-
-
- - - -
-

- - #results_size ⇒ Number - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Number) - - - -
  • - -
- -
- - - - -
-
-
-
-384
-385
-386
-
-
# File 'lib/prismic.rb', line 384
-
-def results_size
-  @results_size
-end
-
-
- - - -
-

- - #total_pages ⇒ Number - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Number) - - - -
  • - -
- -
- - - - -
-
-
-
-388
-389
-390
-
-
# File 'lib/prismic.rb', line 388
-
-def total_pages
-  @total_pages
-end
-
-
- - - -
-

- - #total_results_size ⇒ Number - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Number) - - - -
  • - -
- -
- - - - -
-
-
-
-386
-387
-388
-
-
# File 'lib/prismic.rb', line 386
-
-def total_results_size
-  @total_results_size
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #[](i) ⇒ Document - - - - Also known as: - get - - - - -

-
-

Accessing the i-th document in the results

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-413
-414
-415
-
-
# File 'lib/prismic.rb', line 413
-
-def [](i)
-  @results[i]
-end
-
-
- -
-

- - #each {|document| ... } ⇒ Object - - - - - -

-
-

Iterates over received documents

- -

This method does not paginates by itself. So only the received document -will be returned.

- - -
-
-
- -

Yield Parameters:

-
    - -
  • - - document - - - (Document) - - - -
  • - -
- -
- - - - -
-
-
-
-424
-425
-426
-
-
# File 'lib/prismic.rb', line 424
-
-def each(&blk)
-  @results.each(&blk)
-end
-
-
- -
-

- - #length ⇒ Fixum - - - - Also known as: - size - - - - -

-
-

Return the number of returned documents

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Fixum) - - - -
  • - -
- -
- - - - -
-
-
-
-432
-433
-434
-
-
# File 'lib/prismic.rb', line 432
-
-def length
-  @results.length
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/SearchForm.html b/docs/Prismic/SearchForm.html deleted file mode 100644 index df5160c..0000000 --- a/docs/Prismic/SearchForm.html +++ /dev/null @@ -1,2173 +0,0 @@ - - - - - - - Class: Prismic::SearchForm - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::SearchForm - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic.rb
-
- -
- -

Overview

-
-

A SearchForm represent a Form returned by the prismic.io API.

- -

These forms depend on the prismic.io repository, and can be filled and sent -as regular HTML forms.

- -

You may get a SearchForm instance through the API#form method.

- -

The SearchForm instance contains helper methods for each predefined form's fields. -Note that these methods are not created if they risk to add confusion:

- -
    -
  • only letters, underscore and digits are authorized in the name
  • -
  • name starting with a digit or an underscore are forbidden
  • -
  • generated method can't override existing methods
  • -
- - -
-
-
- -
-

Examples:

- - -
search_form = api.form('everything')
-search_form.page(3)  # specify the field 'page'
-search_form.page_size("20")  # specify the 'page_size' field
-results = search_form.submit(master_ref)  # submit the search form
-results = api.form('everything').page(3).page_size("20").submit(master_ref) # methods can be chained
- -
- - -

Defined Under Namespace

-

- - - - - Classes: AuthenticationException, AuthorizationException, FormSearchException, NoRefSetException, RefNotFoundException, UnsupportedFormKind - - -

- - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #api ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute api.

    -
    - -
  • - - -
  • - - - #data ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute data.

    -
    - -
  • - - -
  • - - - #form ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute form.

    -
    - -
  • - - -
  • - - - #ref(ref) ⇒ SearchForm - - - - - - - - - - - - - - - - -

    Set the reference to use.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(api, form, data = {}, ref = nil) ⇒ SearchForm - - - - - -

-
-

Returns a new instance of SearchForm

- - -
-
-
- - -
- - - - -
-
-
-
-144
-145
-146
-147
-148
-149
-150
-151
-152
-
-
# File 'lib/prismic.rb', line 144
-
-def initialize(api, form, data={}, ref=nil)
-  @api = api
-  @form = form
-  @data = {}
-  form.fields.each { |name, _| create_field_helper_method(name) }
-  form.default_data.each { |key, value| set(key, value) }
-  data.each { |key, value| set(key, value) }
-  @ref = ref
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #api ⇒ Object - - - - - -

-
-

Returns the value of attribute api

- - -
-
-
- - -
- - - - -
-
-
-
-142
-143
-144
-
-
# File 'lib/prismic.rb', line 142
-
-def api
-  @api
-end
-
-
- - - -
-

- - #data ⇒ Object - - - - - -

-
-

Returns the value of attribute data

- - -
-
-
- - -
- - - - -
-
-
-
-142
-143
-144
-
-
# File 'lib/prismic.rb', line 142
-
-def data
-  @data
-end
-
-
- - - -
-

- - #form ⇒ Object - - - - - -

-
-

Returns the value of attribute form

- - -
-
-
- - -
- - - - -
-
-
-
-142
-143
-144
-
-
# File 'lib/prismic.rb', line 142
-
-def form
-  @form
-end
-
-
- - - -
-

- - #ref(ref) ⇒ SearchForm - - - - - -

-
-

Set the reference to use

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (Ref, String) - - - - — -

    The reference to use

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (SearchForm) - - - - — -

    self

    -
    - -
  • - -
- -
- - - - -
-
-
-
-351
-352
-353
-
-
# File 'lib/prismic.rb', line 351
-
-def ref
-  @ref
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #fetch(fields) ⇒ SearchForm - - - - - -

-
-

Restrict the document fragments to the specified fields

- - -
-
-
-

Parameters:

-
    - -
  • - - fields - - - (String) - - - - — -

    The fields separated by commas (,)

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (SearchForm) - - - - — -

    self

    -
    - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File 'lib/prismic.rb', line 197
-
-
-
-
- -
-
-
-

Include the document fragments correspondong to the specified fields for DocumentLink

- - -
-
-
-

Parameters:

-
    - -
  • - - fields - - - (String) - - - - — -

    The fields separated by commas (,)

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (SearchForm) - - - - — -

    self

    -
    - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File 'lib/prismic.rb', line 202
-
-
-
-
- -
-

- - #form_action ⇒ String - - - - - -

-
-

Returns the form's action (URL)

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-248
-249
-250
-
-
# File 'lib/prismic.rb', line 248
-
-def form_action
-  form.action
-end
-
-
- -
-

- - #form_enctype ⇒ String - - - - - -

-
-

Returns the form's encoding type

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-241
-242
-243
-
-
# File 'lib/prismic.rb', line 241
-
-def form_enctype
-  form.enctype
-end
-
-
- -
-

- - #form_fields ⇒ String - - - - - -

-
-

Returns the form's fields

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-255
-256
-257
-
-
# File 'lib/prismic.rb', line 255
-
-def form_fields
-  form.fields
-end
-
-
- -
-

- - #form_method ⇒ String - - - - - -

-
-

Returns the form's HTTP method

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-227
-228
-229
-
-
# File 'lib/prismic.rb', line 227
-
-def form_method
-  form.form_method
-end
-
-
- -
-

- - #form_name ⇒ String - - - - - -

-
-

Returns the form's name

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-220
-221
-222
-
-
# File 'lib/prismic.rb', line 220
-
-def form_name
-  form.name
-end
-
-
- -
-

- - #form_rel ⇒ String - - - - - -

-
-

Returns the form's relationship

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-234
-235
-236
-
-
# File 'lib/prismic.rb', line 234
-
-def form_rel
-  form.rel
-end
-
-
- -
-

- - #orderings(orderings) ⇒ SearchForm - - - - - -

-
-

Specify a orderings for this form.

- - -
-
-
-

Parameters:

-
    - -
  • - - orderings - - - (String) - - - - — -

    The orderings

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (SearchForm) - - - - — -

    self

    -
    - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File 'lib/prismic.rb', line 182
-
-
-
-
- -
-

- - #page(page) ⇒ SearchForm - - - - - -

-
-

Specify a page for this form.

- - -
-
-
-

Parameters:

-
    - -
  • - - page - - - (String, Fixum) - - - - — -

    The page

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (SearchForm) - - - - — -

    self

    -
    - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File 'lib/prismic.rb', line 187
-
-
-
-
- -
-

- - #page_size(page_size) ⇒ SearchForm - - - - - -

-
-

Specify a page size for this form.

- - -
-
-
-

Parameters:

-
    - -
  • - - page_size - - - (String, Fixum) - - - - — -

    The page size

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (SearchForm) - - - - — -

    self

    -
    - -
  • - -
- -
- - - - -
-
-
-
-
-
-
# File 'lib/prismic.rb', line 192
-
-
-
-
- -
-

- - #q(*query) ⇒ Object - - - - - -

- - - - -
-
-
-
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-
-
# File 'lib/prismic.rb', line 161
-
-def q(*query)
-  def serialize(field)
-    if field.kind_of?(String) and not (field.start_with?('my.') or field.start_with?('document'))
-      %("#{field}")
-    elsif field.kind_of?(Array)
-      %([#{field.map{ |arg| serialize(arg) }.join(', ')}])
-    else
-      %(#{field})
-    end
-  end
-  if query[0].kind_of?(String)
-    set('q', query[0])
-  else
-    predicates = query.map { |q|
-      op = q.shift
-      "[:d = #{op}(#{q.map { |arg| serialize(arg) }.join(', ')})]"
-    }
-    set('q', "[#{predicates * ''}]")
-  end
-end
-
-
- -
-

- - #query(*query) ⇒ Object - - - - - -

-
-

Specify a query for this form. - @param query [String] The query - @return [SearchForm] self

- - -
-
-
- - -
- - - - -
-
-
-
-157
-158
-159
-
-
# File 'lib/prismic.rb', line 157
-
-def query(*query)
-  q(*query)
-end
-
-
- -
-

- - #serialize(field) ⇒ Object - - - - - -

- - - - -
-
-
-
-162
-163
-164
-165
-166
-167
-168
-169
-170
-
-
# File 'lib/prismic.rb', line 162
-
-def serialize(field)
-  if field.kind_of?(String) and not (field.start_with?('my.') or field.start_with?('document'))
-    %("#{field}")
-  elsif field.kind_of?(Array)
-    %([#{field.map{ |arg| serialize(arg) }.join(', ')}])
-  else
-    %(#{field})
-  end
-end
-
-
- -
-

- - #set(field_name, value) ⇒ SearchForm - - - - - -

-
-

Specify a parameter for this form

- - -
-
-
-

Parameters:

-
    - -
  • - - field_name - - - (String) - - - - — -

    The parameter's name

    -
    - -
  • - -
  • - - value - - - (String) - - - - — -

    The parameter's value

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (SearchForm) - - - - — -

    self

    -
    - -
  • - -
- -
- - - - -
-
-
-
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-
-
# File 'lib/prismic.rb', line 333
-
-def set(field_name, value)
-  field = @form.fields[field_name]
-  unless value == nil
-    if field && field.repeatable?
-      data[field_name] = [] unless data.include? field_name
-      data[field_name] << value.to_s
-    else
-      data[field_name] = value.to_s
-    end
-  end
-  self
-end
-
-
- -
-

- - #submit(ref = nil) ⇒ Response - - - - - -

-
- -
- Note: -

The reference MUST be defined, either by:

- -
    -
  • setting it at creation
  • -
  • using the #ref method
  • -
  • providing the ref parameter.
  • -
-
-
- -

Submit the form

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (Ref, String) - - - (defaults to: nil) - - - — -

    The reference to use (if not already -defined)

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Response) - - - - — -

    The results (array of Document object + pagination -specifics)

    -
    - -
  • - -
- -
- - - - -
-
-
-
-273
-274
-275
-
-
# File 'lib/prismic.rb', line 273
-
-def submit(ref = nil)
-  Prismic::JsonParser.response_parser(JSON.load(submit_raw(ref)))
-end
-
-
- -
-

- - #submit_raw(ref = nil) ⇒ string - - - - - -

-
- -
- Note: -

The reference MUST be defined, either by:

- -
    -
  • setting it at creation
  • -
  • using the #ref method
  • -
  • providing the ref parameter.
  • -
-
-
- -

Submit the form, returns a raw JSON string

- - -
-
-
-

Parameters:

-
    - -
  • - - ref - - - (Ref, String) - - - (defaults to: nil) - - - — -

    The reference to use (if not already -defined)

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (string) - - - - — -

    The JSON string returned by the API

    -
    - -
  • - -
-

Raises:

- - -
- - - - -
-
-
-
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-
-
# File 'lib/prismic.rb', line 290
-
-def submit_raw(ref = nil)
-  self.ref(ref) if ref
-  data['ref'] = @ref
-  raise NoRefSetException unless @ref
-
-  # cache_key is a mix of HTTP URL and HTTP method
-  cache_key = form_method+'::'+form_action+'?'+data.map{|k,v|"#{k}=#{v}"}.join('&')
-
-  from_cache = api.has_cache? && api.cache.get(cache_key)
-  if (from_cache)
-    from_cache
-  else
-    if form_method == 'GET' && form_enctype == 'application/x-www-form-urlencoded'
-      data['access_token'] = api.access_token if api.access_token
-      data.delete_if { |k, v| v.nil? }
-
-      response = api.http_client.get(form_action, data, 'Accept' => 'application/json')
-
-      if response.code.to_s == '200'
-        ttl = (response['Cache-Control'] || '').scan(/max-age\s*=\s*(\d+)/).flatten.first
-        if ttl != nil && api.has_cache?
-          api.cache.set(cache_key, response.body, ttl.to_i)
-        end
-        response.body
-      else
-        body = JSON.load(response.body) rescue nil
-        error = body.is_a?(Hash) ? body['error'] : response.body
-        raise AuthenticationException, error if response.code.to_s == '401'
-        raise AuthorizationException, error if response.code.to_s == '403'
-        raise RefNotFoundException, error if response.code.to_s == '404'
-        raise FormSearchException, error
-      end
-    else
-      raise UnsupportedFormKind, "Unsupported kind of form: #{form_method} / #{enctype}"
-    end
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/SearchForm/AuthenticationException.html b/docs/Prismic/SearchForm/AuthenticationException.html deleted file mode 100644 index 2997c44..0000000 --- a/docs/Prismic/SearchForm/AuthenticationException.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - Exception: Prismic::SearchForm::AuthenticationException - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Prismic::SearchForm::AuthenticationException - - - -

-
- -
-
Inherits:
-
- Error - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic.rb
-
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Error

-

#cause

- - - - - - - - - -

Method Summary

- -

Methods inherited from Error

-

#full_trace, #initialize

- -
-

Constructor Details

- -

This class inherits a constructor from Prismic::Error

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/SearchForm/AuthorizationException.html b/docs/Prismic/SearchForm/AuthorizationException.html deleted file mode 100644 index fae7898..0000000 --- a/docs/Prismic/SearchForm/AuthorizationException.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - Exception: Prismic::SearchForm::AuthorizationException - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Prismic::SearchForm::AuthorizationException - - - -

-
- -
-
Inherits:
-
- Error - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic.rb
-
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Error

-

#cause

- - - - - - - - - -

Method Summary

- -

Methods inherited from Error

-

#full_trace, #initialize

- -
-

Constructor Details

- -

This class inherits a constructor from Prismic::Error

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/SearchForm/FormSearchException.html b/docs/Prismic/SearchForm/FormSearchException.html deleted file mode 100644 index eb464db..0000000 --- a/docs/Prismic/SearchForm/FormSearchException.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - Exception: Prismic::SearchForm::FormSearchException - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Prismic::SearchForm::FormSearchException - - - -

-
- -
-
Inherits:
-
- Error - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic.rb
-
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Error

-

#cause

- - - - - - - - - -

Method Summary

- -

Methods inherited from Error

-

#full_trace, #initialize

- -
-

Constructor Details

- -

This class inherits a constructor from Prismic::Error

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/SearchForm/NoRefSetException.html b/docs/Prismic/SearchForm/NoRefSetException.html deleted file mode 100644 index 45cec31..0000000 --- a/docs/Prismic/SearchForm/NoRefSetException.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - Exception: Prismic::SearchForm::NoRefSetException - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Prismic::SearchForm::NoRefSetException - - - -

-
- -
-
Inherits:
-
- Error - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic.rb
-
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Error

-

#cause

- - - - - - - - - -

Method Summary

- -

Methods inherited from Error

-

#full_trace, #initialize

- -
-

Constructor Details

- -

This class inherits a constructor from Prismic::Error

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/SearchForm/RefNotFoundException.html b/docs/Prismic/SearchForm/RefNotFoundException.html deleted file mode 100644 index b8a638b..0000000 --- a/docs/Prismic/SearchForm/RefNotFoundException.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - Exception: Prismic::SearchForm::RefNotFoundException - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Prismic::SearchForm::RefNotFoundException - - - -

-
- -
-
Inherits:
-
- Error - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic.rb
-
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Error

-

#cause

- - - - - - - - - -

Method Summary

- -

Methods inherited from Error

-

#full_trace, #initialize

- -
-

Constructor Details

- -

This class inherits a constructor from Prismic::Error

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/SearchForm/UnsupportedFormKind.html b/docs/Prismic/SearchForm/UnsupportedFormKind.html deleted file mode 100644 index fafe64e..0000000 --- a/docs/Prismic/SearchForm/UnsupportedFormKind.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - Exception: Prismic::SearchForm::UnsupportedFormKind - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Prismic::SearchForm::UnsupportedFormKind - - - -

-
- -
-
Inherits:
-
- Error - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic.rb
-
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Error

-

#cause

- - - - - - - - - -

Method Summary

- -

Methods inherited from Error

-

#full_trace, #initialize

- -
-

Constructor Details

- -

This class inherits a constructor from Prismic::Error

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/Variation.html b/docs/Prismic/Variation.html deleted file mode 100644 index 68cfb65..0000000 --- a/docs/Prismic/Variation.html +++ /dev/null @@ -1,547 +0,0 @@ - - - - - - - Class: Prismic::Variation - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Prismic::Variation - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/prismic/experiments.rb
-
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(id, ref, label) ⇒ Variation - - - - - -

-
-

Returns a new instance of Variation

- - -
-
-
- - -
- - - - -
-
-
-
-87
-88
-89
-90
-91
-
-
# File 'lib/prismic/experiments.rb', line 87
-
-def initialize(id, ref, label)
-  @id = id
-  @ref = ref
-  @label = label
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #id ⇒ String (readonly) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-81
-82
-83
-
-
# File 'lib/prismic/experiments.rb', line 81
-
-def id
-  @id
-end
-
-
- - - -
-

- - #label ⇒ String (readonly) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-85
-86
-87
-
-
# File 'lib/prismic/experiments.rb', line 85
-
-def label
-  @label
-end
-
-
- - - -
-

- - #ref ⇒ String (readonly) - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-83
-84
-85
-
-
# File 'lib/prismic/experiments.rb', line 83
-
-def ref
-  @ref
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .parse(data) ⇒ Variation - - - - - -

-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-94
-95
-96
-
-
# File 'lib/prismic/experiments.rb', line 94
-
-def self.parse(data)
-  new(data['id'], data['ref'], data['label'])
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/Prismic/WithFragments.html b/docs/Prismic/WithFragments.html deleted file mode 100644 index 583261d..0000000 --- a/docs/Prismic/WithFragments.html +++ /dev/null @@ -1,1805 +0,0 @@ - - - - - - - Module: Prismic::WithFragments - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Prismic::WithFragments - - - -

-
- - - - - - -
-
Includes:
-
Enumerable
-
- - - - -
-
Included in:
-
Document, Fragments::DocumentLink, Fragments::GroupDocument
-
- - - -
-
Defined in:
-
lib/prismic/with_fragments.rb
-
- -
- -

Overview

-
-

A document with Fragments: usually a Prismic.io Document, or a Document within a Group

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

- - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Attribute Details

- - - -
-

- - #fragments ⇒ Hash{String => Fragment} - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash{String => Fragment}) - - - -
  • - -
- -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/prismic/with_fragments.rb', line 7
-
-def fragments
-  @fragments
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #[](field) ⇒ Fragments::Fragment - - - - Also known as: - get - - - - -

-
-

Get a document's field

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-53
-54
-55
-56
-57
-58
-59
-60
-
-
# File 'lib/prismic/with_fragments.rb', line 53
-
-def [](field)
-  array = field.split('.')
-  if array.length != 2
-    raise ArgumentError, 'Argument should contain one dot. Example: product.price'
-  end
-  return nil if array[0] != self.type
-  fragments[array[1]]
-end
-
-
- -
-

- - #as_html(link_resolver) ⇒ String - - - - - -

-
-

Generate an HTML representation of the entire document

- - -
-
-
-

Parameters:

-
    - -
  • - - link_resolver - - - (LinkResolver) - - - - — -

    The LinkResolver used to build -application's specific URL

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    the HTML representation

    -
    - -
  • - -
- -
- - - - -
-
-
-
-22
-23
-24
-25
-26
-
-
# File 'lib/prismic/with_fragments.rb', line 22
-
-def as_html(link_resolver)
-  fragments.map { |field, fragment|
-    %(<section data-field="#{field}">#{fragment.as_html(link_resolver)}</section>)
-  }.join("\n")
-end
-
-
- -
-

- - #as_text ⇒ String - - - - - -

-
-

Generate a Text representation of the entire document

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -

    the text representation

    -
    - -
  • - -
- -
- - - - -
-
-
-
-12
-13
-14
-
-
# File 'lib/prismic/with_fragments.rb', line 12
-
-def as_text
-  fragments.map { |field, fragment| fragment.as_text }.join("\n")
-end
-
-
- -
-

- - #each {|name, fragment| ... } ⇒ Object - - - - - -

-
- - -
-
-
- -

Yield Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - fragment - - - (Fragment) - - - -
  • - -
- -
- - - - -
-
-
-
-65
-66
-67
-
-
# File 'lib/prismic/with_fragments.rb', line 65
-
-def each(&blk)
-  @fragments.each(&blk)
-end
-
-
- -
-

- - #first_title ⇒ String - - - - - -

-
-

Finds the first highest title in a document (if any)

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-
-
# File 'lib/prismic/with_fragments.rb', line 31
-
-def first_title
-  # It is impossible to reuse the StructuredText.first_title method, since
-  # we need to test the highest title across the whole document
-  title = false
-  max_level = 6 # any title with a higher level kicks the current one out
-  @fragments.each do |_, fragment|
-    if fragment.is_a? Prismic::Fragments::StructuredText
-      fragment.blocks.each do |block|
-        if block.is_a?(Prismic::Fragments::StructuredText::Block::Heading)
-          if block.level < max_level
-            title = block.text
-            max_level = block.level # new maximum
-          end
-        end
-      end
-    end
-  end
-  title
-end
-
-
- -
-

- - #get_color(field) ⇒ Fragments::Color - - - - - -

-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-140
-141
-142
-143
-144
-
-
# File 'lib/prismic/with_fragments.rb', line 140
-
-def get_color(field)
-  fragment = self[field]
-  return nil unless fragment.is_a? Prismic::Fragments::Color
-  fragment
-end
-
-
- -
-

- - #get_date(field) ⇒ Fragments::Date - - - - - -

-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-105
-106
-107
-108
-109
-
-
# File 'lib/prismic/with_fragments.rb', line 105
-
-def get_date(field)
-  fragment = self[field]
-  return nil unless fragment.is_a? Prismic::Fragments::Date
-  fragment
-end
-
-
- -
-

- - #get_embed(field) ⇒ Fragments::Embed - - - - - -

-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-133
-134
-135
-136
-137
-
-
# File 'lib/prismic/with_fragments.rb', line 133
-
-def get_embed(field)
-  fragment = self[field]
-  return nil unless fragment.is_a? Prismic::Fragments::Embed
-  fragment
-end
-
-
- -
-

- - #get_geopoint(field) ⇒ Fragments::GeoPoint - - - - - -

-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-147
-148
-149
-150
-151
-
-
# File 'lib/prismic/with_fragments.rb', line 147
-
-def get_geopoint(field)
-  fragment = self[field]
-  return nil unless fragment.is_a? Prismic::Fragments::GeoPoint
-  fragment
-end
-
-
- -
-

- - #get_group(field) ⇒ Fragments::Group - - - - - -

-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-119
-120
-121
-122
-123
-
-
# File 'lib/prismic/with_fragments.rb', line 119
-
-def get_group(field)
-  fragment = self[field]
-  return nil unless fragment.is_a? Prismic::Fragments::Group
-  fragment
-end
-
-
- -
-

- - #get_image(field) ⇒ Fragments::Image - - - - - -

-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-98
-99
-100
-101
-102
-
-
# File 'lib/prismic/with_fragments.rb', line 98
-
-def get_image(field)
-  fragment = self[field]
-  return nil unless fragment.is_a? Prismic::Fragments::Image
-  fragment
-end
-
-
- -
-
-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-126
-127
-128
-129
-130
-
-
# File 'lib/prismic/with_fragments.rb', line 126
-
-def get_link(field)
-  fragment = self[field]
-  return nil unless fragment.is_a? Prismic::Fragments::Link
-  fragment
-end
-
-
- -
-

- - #get_number(field) ⇒ Fragments::Number - - - - - -

-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-91
-92
-93
-94
-95
-
-
# File 'lib/prismic/with_fragments.rb', line 91
-
-def get_number(field)
-  fragment = self[field]
-  return nil unless fragment.is_a? Prismic::Fragments::Number
-  fragment
-end
-
-
- -
-

- - #get_slice_zone(field) ⇒ Object - - - - - -

- - - - -
-
-
-
-153
-154
-155
-156
-157
-
-
# File 'lib/prismic/with_fragments.rb', line 153
-
-def get_slice_zone(field)
-  fragment = self[field]
-  return nil unless fragment.is_a? Prismic::Fragments::SliceZone
-  fragment
-end
-
-
- -
-

- - #get_structured_text(field) ⇒ Fragments::StructuredText - - - - - -

-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-77
-78
-79
-80
-81
-
-
# File 'lib/prismic/with_fragments.rb', line 77
-
-def get_structured_text(field)
-  fragment = self[field]
-  return nil unless fragment.is_a? Prismic::Fragments::StructuredText
-  fragment
-end
-
-
- -
-

- - #get_text(field) ⇒ Fragments::Text - - - - - -

-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-84
-85
-86
-87
-88
-
-
# File 'lib/prismic/with_fragments.rb', line 84
-
-def get_text(field)
-  fragment = self[field]
-  return nil unless fragment.is_a? Prismic::Fragments::Text
-  fragment
-end
-
-
- -
-

- - #get_timestamp(field) ⇒ Fragments::Timestamp - - - - - -

-
- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-112
-113
-114
-115
-116
-
-
# File 'lib/prismic/with_fragments.rb', line 112
-
-def get_timestamp(field)
-  fragment = self[field]
-  return nil unless fragment.is_a? Prismic::Fragments::Timestamp
-  fragment
-end
-
-
- -
-

- - #length ⇒ Fixum - - - - Also known as: - size - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Fixum) - - - -
  • - -
- -
- - - - -
-
-
-
-71
-72
-73
-
-
# File 'lib/prismic/with_fragments.rb', line 71
-
-def length
-  @fragments.length
-end
-
-
- -
-

- - #linked_documents ⇒ Array<LinkedDocument> - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array<LinkedDocument>) - - - -
  • - -
- -
- - - - -
-
-
-
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-
-
# File 'lib/prismic/with_fragments.rb', line 160
-
-def linked_documents
-  self.fragments.map { |name, fragment|
-    if fragment.is_a? Prismic::Fragments::DocumentLink
-      [fragment]
-    elsif fragment.is_a? Prismic::Fragments::StructuredText
-      fragment.blocks
-        .select { |block| block.is_a? Prismic::Fragments::StructuredText::Block::Text}
-        .map { |block| block.spans }.flatten
-        .select { |span| span.is_a? Prismic::Fragments::StructuredText::Span::Hyperlink }
-        .map { |span| span.link }
-        .select { |link| link.is_a? Prismic::Fragments::DocumentLink }
-    elsif fragment.is_a? Prismic::Fragments::Group
-      fragment.group_documents
-        .map { |groupDoc| groupDoc.linked_documents }
-        .flatten
-    else
-      []
-    end
-  }.flatten
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/_index.html b/docs/_index.html deleted file mode 100644 index 6680174..0000000 --- a/docs/_index.html +++ /dev/null @@ -1,749 +0,0 @@ - - - - - - - Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Documentation by YARD 0.9.8

-
-

Alphabetic Index

- -

File Listing

- - -
-

Namespace Listing A-Z

- - - - - - - - -
- - - - - - - - -
    -
  • C
  • -
      - -
    • - Color - - (Prismic::Fragments) - -
    • - -
    -
- - - - - -
    -
  • E
  • -
      - -
    • - Em - - (Prismic::Fragments::StructuredText::Span) - -
    • - -
    • - Embed - - (Prismic::Fragments) - -
    • - -
    • - Embed - - (Prismic::Fragments::StructuredText::Block) - -
    • - -
    • - Error - - (Prismic) - -
    • - -
    • - Experiment - - (Prismic) - -
    • - -
    • - Experiments - - (Prismic) - -
    • - -
    -
- - - - - -
    -
  • G
  • -
      - -
    • - GeoPoint - - (Prismic::Fragments) - -
    • - -
    • - Group - - (Prismic::Fragments) - -
    • - -
    • - GroupDocument - - (Prismic::Fragments) - -
    • - -
    -
- - -
- - -
    -
  • H
  • -
      - -
    • - Heading - - (Prismic::Fragments::StructuredText::Block) - -
    • - -
    • - HtmlSerializer - - (Prismic) - -
    • - -
    • - Hyperlink - - (Prismic::Fragments::StructuredText::Span) - -
    • - -
    -
- - -
    -
  • I
  • -
      - -
    • - Image - - (Prismic::Fragments) - -
    • - -
    • - Image - - (Prismic::Fragments::StructuredText::Block) - -
    • - -
    • - ImageLink - - (Prismic::Fragments) - -
    • - -
    -
- - - - - -
    -
  • L
  • -
      - -
    • - Label - - (Prismic::Fragments::StructuredText::Span) - -
    • - -
    • - Link - - (Prismic::Fragments) - -
    • - -
    • - LinkResolver - - (Prismic) - -
    • - -
    • - ListItem - - (Prismic::Fragments::StructuredText::Block) - -
    • - -
    • - LruCache - - (Prismic) - -
    • - -
    -
- - -
    -
  • M
  • -
      - -
    • - Multiple - - (Prismic::Fragments) - -
    • - -
    -
- - - - - -
    -
  • O
  • -
      - -
    • - OAuth - - (Prismic::API) - -
    • - -
    -
- - - - - -
- - - - - -
    -
  • S
  • -
      - -
    • - SearchForm - - (Prismic) - -
    • - -
    • - Select - - (Prismic::Fragments) - -
    • - -
    • - Separator - - (Prismic::Fragments) - -
    • - -
    • - Slice - - (Prismic::Fragments) - -
    • - -
    • - SliceZone - - (Prismic::Fragments) - -
    • - -
    • - Span - - (Prismic::Fragments::StructuredText) - -
    • - -
    • - Strong - - (Prismic::Fragments::StructuredText::Span) - -
    • - -
    • - StructuredText - - (Prismic::Fragments) - -
    • - -
    -
- - -
    -
  • T
  • -
      - -
    • - Text - - (Prismic::Fragments) - -
    • - -
    • - Text - - (Prismic::Fragments::StructuredText::Block) - -
    • - -
    • - Timestamp - - (Prismic::Fragments) - -
    • - -
    -
- - - - - - - - - - -
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/class_list.html b/docs/class_list.html deleted file mode 100644 index 1a5cde5..0000000 --- a/docs/class_list.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - Class List - - - -
-
-

Class List

- - - -
- - -
- - diff --git a/docs/css/common.css b/docs/css/common.css deleted file mode 100644 index cf25c45..0000000 --- a/docs/css/common.css +++ /dev/null @@ -1 +0,0 @@ -/* Override this file with custom rules */ \ No newline at end of file diff --git a/docs/css/full_list.css b/docs/css/full_list.css deleted file mode 100644 index fa35982..0000000 --- a/docs/css/full_list.css +++ /dev/null @@ -1,58 +0,0 @@ -body { - margin: 0; - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-size: 13px; - height: 101%; - overflow-x: hidden; - background: #fafafa; -} - -h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; } -.clear { clear: both; } -.fixed_header { position: fixed; background: #fff; width: 100%; padding-bottom: 10px; margin-top: 0; top: 0; z-index: 9999; height: 70px; } -#search { position: absolute; right: 5px; top: 9px; padding-left: 24px; } -#content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; } -#full_list { padding: 0; list-style: none; margin-left: 0; margin-top: 80px; font-size: 1.1em; } -#full_list ul { padding: 0; } -#full_list li { padding: 0; margin: 0; list-style: none; } -#full_list li .item { padding: 5px 5px 5px 12px; } -#noresults { padding: 7px 12px; background: #fff; } -#content.insearch #noresults { margin-left: 7px; } -li.collapsed ul { display: none; } -li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; } -li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; } -li { color: #888; cursor: pointer; } -li.deprecated { text-decoration: line-through; font-style: italic; } -li.odd { background: #f0f0f0; } -li.even { background: #fafafa; } -.item:hover { background: #ddd; } -li small:before { content: "("; } -li small:after { content: ")"; } -li small.search_info { display: none; } -a, a:visited { text-decoration: none; color: #05a; } -li.clicked > .item { background: #05a; color: #ccc; } -li.clicked > .item a, li.clicked > .item a:visited { color: #eee; } -li.clicked > .item a.toggle { opacity: 0.5; background-position: bottom right; } -li.collapsed.clicked a.toggle { background-position: top right; } -#search input { border: 1px solid #bbb; border-radius: 3px; } -#full_list_nav { margin-left: 10px; font-size: 0.9em; display: block; color: #aaa; } -#full_list_nav a, #nav a:visited { color: #358; } -#full_list_nav a:hover { background: transparent; color: #5af; } -#full_list_nav span:after { content: ' | '; } -#full_list_nav span:last-child:after { content: ''; } - -#content h1 { margin-top: 0; } -li { white-space: nowrap; cursor: normal; } -li small { display: block; font-size: 0.8em; } -li small:before { content: ""; } -li small:after { content: ""; } -li small.search_info { display: none; } -#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; } -#content.insearch #search { background-position: center right; } -#search input { width: 110px; } - -#full_list.insearch ul { display: block; } -#full_list.insearch .item { display: none; } -#full_list.insearch .found { display: block; padding-left: 11px !important; } -#full_list.insearch li a.toggle { display: none; } -#full_list.insearch li small.search_info { display: block; } diff --git a/docs/css/style.css b/docs/css/style.css deleted file mode 100644 index f682a69..0000000 --- a/docs/css/style.css +++ /dev/null @@ -1,492 +0,0 @@ -html { - width: 100%; - height: 100%; -} -body { - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-size: 13px; - width: 100%; - margin: 0; - padding: 0; - display: flex; - display: -webkit-flex; - display: -ms-flexbox; -} - -#nav { - position: relative; - width: 100%; - height: 100%; - border: 0; - border-right: 1px dotted #eee; - overflow: auto; -} -.nav_wrap { - margin: 0; - padding: 0; - width: 20%; - height: 100%; - position: relative; - display: flex; - display: -webkit-flex; - display: -ms-flexbox; - flex-shrink: 0; - -webkit-flex-shrink: 0; - -ms-flex: 1 0; -} -#resizer { - position: absolute; - right: -5px; - top: 0; - width: 10px; - height: 100%; - cursor: col-resize; - z-index: 9999; -} -#main { - flex: 5 1; - -webkit-flex: 5 1; - -ms-flex: 5 1; - outline: none; - position: relative; - background: #fff; - padding: 1.2em; - padding-top: 0.2em; -} - -@media (max-width: 920px) { - .nav_wrap { width: 100%; top: 0; right: 0; overflow: visible; position: absolute; } - #resizer { display: none; } - #nav { - z-index: 9999; - background: #fff; - display: none; - position: absolute; - top: 40px; - right: 12px; - width: 500px; - max-width: 80%; - height: 80%; - overflow-y: scroll; - border: 1px solid #999; - border-collapse: collapse; - box-shadow: -7px 5px 25px #aaa; - border-radius: 2px; - } -} - -@media (min-width: 920px) { - body { height: 100%; overflow: hidden; } - #main { height: 100%; overflow: auto; } - #search { display: none; } -} - -#main img { max-width: 100%; } -h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; } -h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; } -h1.title { margin-bottom: 10px; } -h1.alphaindex { margin-top: 0; font-size: 22px; } -h2 { - padding: 0; - padding-bottom: 3px; - border-bottom: 1px #aaa solid; - font-size: 1.4em; - margin: 1.8em 0 0.5em; - position: relative; -} -h2 small { font-weight: normal; font-size: 0.7em; display: inline; position: absolute; right: 0; } -h2 small a { - display: block; - height: 20px; - border: 1px solid #aaa; - border-bottom: 0; - border-top-left-radius: 5px; - background: #f8f8f8; - position: relative; - padding: 2px 7px; -} -.clear { clear: both; } -.inline { display: inline; } -.inline p:first-child { display: inline; } -.docstring, .tags, #filecontents { font-size: 15px; line-height: 1.5145em; } -.docstring p > code, .docstring p > tt, .tags p > code, .tags p > tt { - color: #c7254e; background: #f9f2f4; padding: 2px 4px; font-size: 1em; - border-radius: 4px; -} -.docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; } -.docstring h1 { font-size: 1.2em; } -.docstring h2 { font-size: 1.1em; } -.docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; } -.summary_desc .object_link a, .docstring .object_link a { - font-family: monospace; font-size: 1.05em; - color: #05a; background: #EDF4FA; padding: 2px 4px; font-size: 1em; - border-radius: 4px; -} -.rdoc-term { padding-right: 25px; font-weight: bold; } -.rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; } -.summary_desc pre.code .object_link a, .docstring pre.code .object_link a { - padding: 0px; background: inherit; color: inherit; border-radius: inherit; -} - -/* style for */ -#filecontents table, .docstring table { border-collapse: collapse; } -#filecontents table th, #filecontents table td, -.docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; } -#filecontents table tr:nth-child(odd), -.docstring table tr:nth-child(odd) { background: #eee; } -#filecontents table tr:nth-child(even), -.docstring table tr:nth-child(even) { background: #fff; } -#filecontents table th, .docstring table th { background: #fff; } - -/* style for
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; -f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() -{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/docs/method_list.html b/docs/method_list.html deleted file mode 100644 index 59e048f..0000000 --- a/docs/method_list.html +++ /dev/null @@ -1,3187 +0,0 @@ - - - - - - - - - - - - - - - - - - Method List - - - -
-
-

Method List

- - - -
- -
    - - -
  • -
    - #<< - Prismic::Fragments::StructuredText::BlockGroup -
    -
  • - - -
  • -
    - #[] - Prismic::WithFragments -
    -
  • - - -
  • -
    - #[] - Prismic::Fragments::GroupDocument -
    -
  • - - -
  • -
    - #[] - Prismic::Response -
    -
  • - - -
  • -
    - #[] - Prismic::Fragments::Multiple -
    -
  • - - -
  • -
    - #[] - Prismic::Fragments::Group -
    -
  • - - -
  • -
    - #[]= - Prismic::LruCache -
    -
  • - - -
  • -
    - #access_token - Prismic::API -
    -
  • - - -
  • -
    - #action - Prismic::Form -
    -
  • - - -
  • -
    - #all - Prismic::API -
    -
  • - - -
  • -
    - #alt - Prismic::Fragments::Image -
    -
  • - - -
  • -
    - #alt - Prismic::Fragments::StructuredText::Block::Image -
    -
  • - - -
  • -
    - #alt - Prismic::Fragments::Image::View -
    -
  • - - -
  • -
    - any - Prismic::Predicates -
    -
  • - - -
  • -
    - api - Prismic -
    -
  • - - -
  • -
    - #api - Prismic::SearchForm -
    -
  • - - -
  • -
    - #asRGB - Prismic::Fragments::Color -
    -
  • - - -
  • -
    - asRGB - Prismic::Fragments::Color -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::DocumentLink -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::Text -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::StructuredText::Block::Paragraph -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::StructuredText::Block::Text -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::Link -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::FileLink -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::StructuredText::Block::Preformatted -
    -
  • - - -
  • -
    - #as_html - Prismic::WithFragments -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::StructuredText::Block::ListItem -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::StructuredText -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::Date -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::Timestamp -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::Separator -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::Multiple -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::GeoPoint -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::StructuredText::Block::Image -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::Fragment -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::SliceZone -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::Slice -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::Select -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::Number -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::Image::View -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::StructuredText::Block::Embed -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::Color -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::Image -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::Group -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::Embed -
    -
  • - - -
  • -
    - #as_html - Prismic::Fragments::StructuredText::Block::Heading -
    -
  • - - -
  • -
    - #as_int - Prismic::Fragments::Number -
    -
  • - - -
  • -
    - #as_json - Prismic::API -
    -
  • - - -
  • -
    - #as_text - Prismic::Fragments::Group -
    -
  • - - -
  • -
    - #as_text - Prismic::Fragments::StructuredText -
    -
  • - - -
  • -
    - #as_text - Prismic::Fragments::Slice -
    -
  • - - -
  • -
    - #as_text - Prismic::Fragments::StructuredText::Block -
    -
  • - - -
  • -
    - #as_text - Prismic::Fragments::SliceZone -
    -
  • - - -
  • -
    - #as_text - Prismic::WithFragments -
    -
  • - - -
  • -
    - #as_text - Prismic::Fragments::Separator -
    -
  • - - -
  • -
    - #as_text - Prismic::Fragments::Text -
    -
  • - - -
  • -
    - #as_text - Prismic::Fragments::Image -
    -
  • - - -
  • -
    - #as_text - Prismic::Fragments::Fragment -
    -
  • - - -
  • -
    - #as_text - Prismic::Fragments::StructuredText::Block::Text -
    -
  • - - -
  • -
    - at - Prismic::Predicates -
    -
  • - - -
  • -
    - #blocks - Prismic::Fragments::StructuredText -
    -
  • - - -
  • -
    - #blocks - Prismic::Fragments::StructuredText::BlockGroup -
    -
  • - - -
  • -
    - #bookmark - Prismic::API -
    -
  • - - -
  • -
    - #bookmarks - Prismic::API -
    -
  • - - -
  • -
    - #broken - Prismic::Fragments::DocumentLink -
    -
  • - - -
  • -
    - #cache - Prismic::API -
    -
  • - - -
  • -
    - #cause - Prismic::Error -
    -
  • - - -
  • -
    - #check_token - Prismic::API::OAuth -
    -
  • - - -
  • -
    - color_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - #copyright - Prismic::Fragments::StructuredText::Block::Image -
    -
  • - - -
  • -
    - #copyright - Prismic::Fragments::Image -
    -
  • - - -
  • -
    - #copyright - Prismic::Fragments::Image::View -
    -
  • - - -
  • -
    - #create_search_form - Prismic::Form -
    -
  • - - -
  • -
    - #create_search_form - Prismic::API -
    -
  • - - -
  • -
    - #current - Prismic::Experiments -
    -
  • - - -
  • -
    - #data - Prismic::SearchForm -
    -
  • - - -
  • -
    - date_after - Prismic::Predicates -
    -
  • - - -
  • -
    - date_before - Prismic::Predicates -
    -
  • - - -
  • -
    - date_between - Prismic::Predicates -
    -
  • - - -
  • -
    - date_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - day_of_month - Prismic::Predicates -
    -
  • - - -
  • -
    - day_of_month_after - Prismic::Predicates -
    -
  • - - -
  • -
    - day_of_month_before - Prismic::Predicates -
    -
  • - - -
  • -
    - day_of_week - Prismic::Predicates -
    -
  • - - -
  • -
    - day_of_week_after - Prismic::Predicates -
    -
  • - - -
  • -
    - day_of_week_before - Prismic::Predicates -
    -
  • - - -
  • -
    - #default - Prismic::Field -
    -
  • - - -
  • -
    - #default_data - Prismic::Form -
    -
  • - - -
  • -
    - #delete - Prismic::LruCache -
    -
  • - - -
  • -
    - document_link_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - document_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - #draft - Prismic::Experiments -
    -
  • - - -
  • -
    - #each - Prismic::WithFragments -
    -
  • - - -
  • -
    - #each - Prismic::Fragments::Group -
    -
  • - - -
  • -
    - #each - Prismic::Response -
    -
  • - - -
  • -
    - embed_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - #embed_type - Prismic::Fragments::Embed -
    -
  • - - -
  • -
    - #enctype - Prismic::Form -
    -
  • - - -
  • -
    - #end - Prismic::Fragments::StructuredText::Span -
    -
  • - - -
  • -
    - #end_html - Prismic::Fragments::DocumentLink -
    -
  • - - -
  • -
    - #end_html - Prismic::Fragments::Link -
    -
  • - - -
  • -
    - #error - Prismic::API::PrismicWSAuthError -
    -
  • - - -
  • -
    - #experiments - Prismic::API -
    -
  • - - -
  • -
    - #expired? - Prismic::LruCache -
    -
  • - - -
  • -
    - #fetch - Prismic::SearchForm -
    -
  • - - -
  • -
    - #fetch_links - Prismic::SearchForm -
    -
  • - - -
  • -
    - #field_type - Prismic::Field -
    -
  • - - -
  • -
    - #fields - Prismic::Form -
    -
  • - - -
  • -
    - file_link_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - #first_publication_date - Prismic::Document -
    -
  • - - -
  • -
    - #first_title - Prismic::Fragments::StructuredText -
    -
  • - - -
  • -
    - #first_title - Prismic::WithFragments -
    -
  • - - -
  • -
    - #form - Prismic::API -
    -
  • - - -
  • -
    - #form - Prismic::SearchForm -
    -
  • - - -
  • -
    - #form_action - Prismic::SearchForm -
    -
  • - - -
  • -
    - #form_enctype - Prismic::SearchForm -
    -
  • - - -
  • -
    - #form_fields - Prismic::SearchForm -
    -
  • - - -
  • -
    - #form_method - Prismic::Form -
    -
  • - - -
  • -
    - #form_method - Prismic::SearchForm -
    -
  • - - -
  • -
    - #form_name - Prismic::SearchForm -
    -
  • - - -
  • -
    - #form_rel - Prismic::SearchForm -
    -
  • - - -
  • -
    - #forms - Prismic::API -
    -
  • - - -
  • -
    - fragment_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - #fragments - Prismic::Fragments::GroupDocument -
    -
  • - - -
  • -
    - #fragments - Prismic::WithFragments -
    -
  • - - -
  • -
    - #fragments - Prismic::Fragments::DocumentLink -
    -
  • - - -
  • -
    - #fragments - Prismic::Fragments::Multiple -
    -
  • - - -
  • -
    - #fragments - Prismic::Document -
    -
  • - - -
  • -
    - from_json - Prismic::Form -
    -
  • - - -
  • -
    - #full_trace - Prismic::Error -
    -
  • - - -
  • -
    - fulltext - Prismic::Predicates -
    -
  • - - -
  • -
    - geo_point_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - #get - Prismic::LruCache -
    -
  • - - -
  • -
    - #get - Prismic::BasicNullCache -
    -
  • - - -
  • -
    - get - Prismic::DefaultHTTPClient -
    -
  • - - -
  • -
    - get - Prismic::API -
    -
  • - - -
  • -
    - #get_by_id - Prismic::API -
    -
  • - - -
  • -
    - #get_by_ids - Prismic::API -
    -
  • - - -
  • -
    - #get_by_uid - Prismic::API -
    -
  • - - -
  • -
    - #get_color - Prismic::WithFragments -
    -
  • - - -
  • -
    - #get_date - Prismic::WithFragments -
    -
  • - - -
  • -
    - #get_embed - Prismic::WithFragments -
    -
  • - - -
  • -
    - #get_geopoint - Prismic::WithFragments -
    -
  • - - -
  • -
    - #get_group - Prismic::WithFragments -
    -
  • - - -
  • -
    - #get_image - Prismic::WithFragments -
    -
  • - - -
  • -
    - #get_link - Prismic::WithFragments -
    -
  • - - -
  • -
    - #get_number - Prismic::WithFragments -
    -
  • - - -
  • -
    - #get_or_set - Prismic::LruCache -
    -
  • - - -
  • -
    - #get_single - Prismic::API -
    -
  • - - -
  • -
    - #get_slice_zone - Prismic::WithFragments -
    -
  • - - -
  • -
    - #get_structured_text - Prismic::WithFragments -
    -
  • - - -
  • -
    - #get_text - Prismic::WithFragments -
    -
  • - - -
  • -
    - #get_timestamp - Prismic::WithFragments -
    -
  • - - -
  • -
    - #get_view - Prismic::Fragments::Image -
    -
  • - - -
  • -
    - #google_id - Prismic::Experiment -
    -
  • - - -
  • -
    - #group_documents - Prismic::Fragments::Group -
    -
  • - - -
  • -
    - group_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - gt - Prismic::Predicates -
    -
  • - - -
  • -
    - has - Prismic::Predicates -
    -
  • - - -
  • -
    - #has_cache? - Prismic::API -
    -
  • - - -
  • -
    - #has_key? - Prismic::LruCache -
    -
  • - - -
  • -
    - #height - Prismic::Fragments::Image -
    -
  • - - -
  • -
    - #height - Prismic::Fragments::Image::View -
    -
  • - - -
  • -
    - #height - Prismic::Fragments::StructuredText::Block::Image -
    -
  • - - -
  • -
    - hour - Prismic::Predicates -
    -
  • - - -
  • -
    - hour_after - Prismic::Predicates -
    -
  • - - -
  • -
    - hour_before - Prismic::Predicates -
    -
  • - - -
  • -
    - #href - Prismic::Document -
    -
  • - - -
  • -
    - #html - Prismic::Fragments::Embed -
    -
  • - - -
  • -
    - html_serializer - Prismic -
    -
  • - - -
  • -
    - #http_client - Prismic::API::OAuth -
    -
  • - - -
  • -
    - #http_client - Prismic::API -
    -
  • - - -
  • -
    - #id - Prismic::Variation -
    -
  • - - -
  • -
    - #id - Prismic::Fragments::DocumentLink -
    -
  • - - -
  • -
    - #id - Prismic::Document -
    -
  • - - -
  • -
    - #id - Prismic::Ref -
    -
  • - - -
  • -
    - #id - Prismic::Experiment -
    -
  • - - -
  • -
    - image_link_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - image_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - in - Prismic::Predicates -
    -
  • - - -
  • -
    - in_range - Prismic::Predicates -
    -
  • - - -
  • -
    - #initialize - Prismic::LinkResolver -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::StructuredText::Block::Text -
    -
  • - - -
  • -
    - #initialize - Prismic::Ref -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::StructuredText::Span::Hyperlink -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::StructuredText::Block::Embed -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::StructuredText::Span::Label -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::StructuredText::Span -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::StructuredText -
    -
  • - - -
  • -
    - #initialize - Prismic::API::PrismicWSConnectionError -
    -
  • - - -
  • -
    - #initialize - Prismic::API::PrismicWSAuthError -
    -
  • - - -
  • -
    - #initialize - Prismic::Field -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::StructuredText::BlockGroup -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::Timestamp -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::Separator -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::Date -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::Multiple -
    -
  • - - -
  • -
    - #initialize - Prismic::Response -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::GeoPoint -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::Image::View -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::Number -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::Embed -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::GroupDocument -
    -
  • - - -
  • -
    - #initialize - Prismic::Experiments -
    -
  • - - -
  • -
    - #initialize - Prismic::Error -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::StructuredText::Block::Image -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::Group -
    -
  • - - -
  • -
    - #initialize - Prismic::HtmlSerializer -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::Color -
    -
  • - - -
  • -
    - #initialize - Prismic::Experiment -
    -
  • - - -
  • -
    - #initialize - Prismic::SearchForm -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::StructuredText::Block::ListItem -
    -
  • - - -
  • -
    - #initialize - Prismic::API -
    -
  • - - -
  • -
    - #initialize - Prismic::Variation -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::StructuredText::Block::Heading -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::Image -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::ImageLink -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::SliceZone -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::Slice -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::Select -
    -
  • - - -
  • -
    - #initialize - Prismic::Form -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::DocumentLink -
    -
  • - - -
  • -
    - #initialize - Prismic::Document -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::WebLink -
    -
  • - - -
  • -
    - #initialize - Prismic::API::OAuth -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::Text -
    -
  • - - -
  • -
    - #initialize - Prismic::Fragments::FileLink -
    -
  • - - -
  • -
    - #initialize - Prismic::LruCache -
    -
  • - - -
  • -
    - #initiate - Prismic::API::OAuth -
    -
  • - - -
  • -
    - #initiate_url - Prismic::API::OAuth -
    -
  • - - -
  • -
    - #intern - Prismic::LruCache -
    -
  • - - -
  • -
    - #invalidate_all! - Prismic::LruCache -
    -
  • - - -
  • -
    - #is_master - Prismic::Ref -
    -
  • - - -
  • -
    - #json - Prismic::API -
    -
  • - - -
  • -
    - #keys - Prismic::LruCache -
    -
  • - - -
  • -
    - #kind - Prismic::Fragments::StructuredText::BlockGroup -
    -
  • - - -
  • -
    - #kind - Prismic::Fragments::FileLink -
    -
  • - - -
  • -
    - #label - Prismic::Variation -
    -
  • - - -
  • -
    - #label - Prismic::Fragments::StructuredText::Block::Image -
    -
  • - - -
  • -
    - #label - Prismic::Fragments::StructuredText::Span::Label -
    -
  • - - -
  • -
    - #label - Prismic::Ref -
    -
  • - - -
  • -
    - #label - Prismic::Fragments::StructuredText::Block::Embed -
    -
  • - - -
  • -
    - #label - Prismic::Fragments::StructuredText::Block::Text -
    -
  • - - -
  • -
    - #last_publication_date - Prismic::Document -
    -
  • - - -
  • -
    - #latitude - Prismic::Fragments::GeoPoint -
    -
  • - - -
  • -
    - #length - Prismic::Fragments::Group -
    -
  • - - -
  • -
    - #length - Prismic::Response -
    -
  • - - -
  • -
    - #length - Prismic::WithFragments -
    -
  • - - -
  • -
    - #level - Prismic::Fragments::StructuredText::Block::Heading -
    -
  • - - -
  • -
    - #link - Prismic::Fragments::StructuredText::Span::Hyperlink -
    -
  • - - -
  • -
    - link_resolver - Prismic -
    -
  • - - -
  • -
    - #link_to - Prismic::Fragments::Image::View -
    -
  • - - -
  • -
    - #link_to - Prismic::Fragments::StructuredText::Block::Image -
    -
  • - - -
  • -
    - #link_to - Prismic::LinkResolver -
    -
  • - - -
  • -
    - #link_type - Prismic::Fragments::DocumentLink -
    -
  • - - -
  • -
    - #linked_documents - Prismic::WithFragments -
    -
  • - - -
  • -
    - #longitude - Prismic::Fragments::GeoPoint -
    -
  • - - -
  • -
    - lt - Prismic::Predicates -
    -
  • - - -
  • -
    - #main - Prismic::Fragments::Image -
    -
  • - - -
  • -
    - #master - Prismic::API -
    -
  • - - -
  • -
    - missing - Prismic::Predicates -
    -
  • - - -
  • -
    - month - Prismic::Predicates -
    -
  • - - -
  • -
    - month_after - Prismic::Predicates -
    -
  • - - -
  • -
    - month_before - Prismic::Predicates -
    -
  • - - -
  • -
    - multiple_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - #name - Prismic::Fragments::FileLink -
    -
  • - - -
  • -
    - #name - Prismic::Form -
    -
  • - - -
  • -
    - #name - Prismic::Experiment -
    -
  • - - -
  • -
    - near - Prismic::Predicates -
    -
  • - - -
  • -
    - #next_page - Prismic::Response -
    -
  • - - -
  • -
    - not - Prismic::Predicates -
    -
  • - - -
  • -
    - number_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - #o_embed_json - Prismic::Fragments::Embed -
    -
  • - - -
  • -
    - #oauth - Prismic::API::PrismicWSAuthError -
    -
  • - - -
  • -
    - #oauth - Prismic::API -
    -
  • - - -
  • -
    - #oauth_check_token - Prismic::API -
    -
  • - - -
  • -
    - oauth_check_token - Prismic::API -
    -
  • - - -
  • -
    - oauth_check_token - Prismic -
    -
  • - - -
  • -
    - #oauth_initiate_url - Prismic::API -
    -
  • - - -
  • -
    - oauth_initiate_url - Prismic::API -
    -
  • - - -
  • -
    - oauth_initiate_url - Prismic -
    -
  • - - -
  • -
    - #ordered - Prismic::Fragments::StructuredText::Block::ListItem -
    -
  • - - -
  • -
    - #orderings - Prismic::SearchForm -
    -
  • - - -
  • -
    - #page - Prismic::SearchForm -
    -
  • - - -
  • -
    - #page - Prismic::Response -
    -
  • - - -
  • -
    - #page_size - Prismic::SearchForm -
    -
  • - - -
  • -
    - parse - Prismic::Variation -
    -
  • - - -
  • -
    - parse - Prismic::Experiments -
    -
  • - - -
  • -
    - parse - Prismic::Experiment -
    -
  • - - -
  • -
    - parse_api_response - Prismic::API -
    -
  • - - -
  • -
    - parsers - Prismic::JsonParser -
    -
  • - - -
  • -
    - post - Prismic::DefaultHTTPClient -
    -
  • - - -
  • -
    - #prepare_spans - Prismic::Fragments::StructuredText::Block::Text -
    -
  • - - -
  • -
    - #prev_page - Prismic::Response -
    -
  • - - -
  • -
    - #preview_session - Prismic::API -
    -
  • - - -
  • -
    - #provider - Prismic::Fragments::Embed -
    -
  • - - -
  • -
    - #push - Prismic::Fragments::Multiple -
    -
  • - - -
  • -
    - #q - Prismic::SearchForm -
    -
  • - - -
  • -
    - #query - Prismic::SearchForm -
    -
  • - - -
  • -
    - #query - Prismic::API -
    -
  • - - -
  • -
    - #ratio - Prismic::Fragments::Image::View -
    -
  • - - -
  • -
    - #ref - Prismic::SearchForm -
    -
  • - - -
  • -
    - #ref - Prismic::Variation -
    -
  • - - -
  • -
    - #ref - Prismic::API -
    -
  • - - -
  • -
    - #ref - Prismic::LinkResolver -
    -
  • - - -
  • -
    - #ref - Prismic::Ref -
    -
  • - - -
  • -
    - #ref_from_cookie - Prismic::Experiments -
    -
  • - - -
  • -
    - #refs - Prismic::API -
    -
  • - - -
  • -
    - #rel - Prismic::Form -
    -
  • - - -
  • -
    - #repeatable - Prismic::Field -
    -
  • - - -
  • -
    - response_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - #results - Prismic::Response -
    -
  • - - -
  • -
    - results_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - #results_per_page - Prismic::Response -
    -
  • - - -
  • -
    - #results_size - Prismic::Response -
    -
  • - - -
  • -
    - #running - Prismic::Experiments -
    -
  • - - -
  • -
    - #scheduled_at - Prismic::Ref -
    -
  • - - -
  • -
    - select_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - separator_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - #serialize - Prismic::Fragments::StructuredText::Span::Em -
    -
  • - - -
  • -
    - #serialize - Prismic::Fragments::StructuredText::Span::Strong -
    -
  • - - -
  • -
    - #serialize - Prismic::Fragments::StructuredText::Block::Text -
    -
  • - - -
  • -
    - #serialize - Prismic::SearchForm -
    -
  • - - -
  • -
    - #serialize - Prismic::HtmlSerializer -
    -
  • - - -
  • -
    - #serialize - Prismic::Fragments::StructuredText::Span::Hyperlink -
    -
  • - - -
  • -
    - #serialize - Prismic::Fragments::StructuredText::Span::Label -
    -
  • - - -
  • -
    - #set - Prismic::BasicNullCache -
    -
  • - - -
  • -
    - #set - Prismic::LruCache -
    -
  • - - -
  • -
    - #set - Prismic::SearchForm -
    -
  • - - -
  • -
    - similar - Prismic::Predicates -
    -
  • - - -
  • -
    - #size - Prismic::Fragments::FileLink -
    -
  • - - -
  • -
    - #size - Prismic::LruCache -
    -
  • - - -
  • -
    - #size - Prismic::Fragments::Multiple -
    -
  • - - -
  • -
    - #slice_label - Prismic::Fragments::Slice -
    -
  • - - -
  • -
    - #slice_type - Prismic::Fragments::Slice -
    -
  • - - -
  • -
    - #slices - Prismic::Fragments::SliceZone -
    -
  • - - -
  • -
    - slices_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - #slug - Prismic::Fragments::DocumentLink -
    -
  • - - -
  • -
    - #slug - Prismic::Document -
    -
  • - - -
  • -
    - #slugs - Prismic::Document -
    -
  • - - -
  • -
    - span_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - #spans - Prismic::Fragments::StructuredText::Block::Text -
    -
  • - - -
  • -
    - #start - Prismic::Fragments::StructuredText::Span -
    -
  • - - -
  • -
    - start - Prismic::API -
    -
  • - - -
  • -
    - #start_html - Prismic::Fragments::Link -
    -
  • - - -
  • -
    - #start_html - Prismic::Fragments::DocumentLink -
    -
  • - - -
  • -
    - structured_text_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - #submit - Prismic::SearchForm -
    -
  • - - -
  • -
    - #submit_raw - Prismic::SearchForm -
    -
  • - - -
  • -
    - #tags - Prismic::Fragments::DocumentLink -
    -
  • - - -
  • -
    - #tags - Prismic::Document -
    -
  • - - -
  • -
    - #tags - Prismic::API -
    -
  • - - -
  • -
    - #text - Prismic::Fragments::StructuredText::Block::Text -
    -
  • - - -
  • -
    - text_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - timestamp_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - #token - Prismic::API::OAuth -
    -
  • - - -
  • -
    - #total_pages - Prismic::Response -
    -
  • - - -
  • -
    - #total_results_size - Prismic::Response -
    -
  • - - -
  • -
    - #type - Prismic::Document -
    -
  • - - -
  • -
    - #type - Prismic::Fragments::DocumentLink -
    -
  • - - -
  • -
    - #types - Prismic::API -
    -
  • - - -
  • -
    - #uid - Prismic::Fragments::DocumentLink -
    -
  • - - -
  • -
    - #uid - Prismic::Document -
    -
  • - - -
  • -
    - #url - Prismic::Fragments::FileLink -
    -
  • - - -
  • -
    - #url - Prismic::Fragments::ImageLink -
    -
  • - - -
  • -
    - #url - Prismic::Fragments::Embed -
    -
  • - - -
  • -
    - #url - Prismic::Fragments::Link -
    -
  • - - -
  • -
    - #url - Prismic::Fragments::WebLink -
    -
  • - - -
  • -
    - #url - Prismic::Fragments::DocumentLink -
    -
  • - - -
  • -
    - #url - Prismic::Fragments::Image::View -
    -
  • - - -
  • -
    - #url - Prismic::Fragments::Image -
    -
  • - - -
  • -
    - #url - Prismic::Fragments::StructuredText::Block::Image -
    -
  • - - -
  • -
    - url_encode - Prismic::DefaultHTTPClient -
    -
  • - - -
  • -
    - valid? - Prismic::Fragments::Color -
    -
  • - - -
  • -
    - #value - Prismic::Fragments::Text -
    -
  • - - -
  • -
    - #value - Prismic::Fragments::Select -
    -
  • - - -
  • -
    - #value - Prismic::Fragments::Number -
    -
  • - - -
  • -
    - #value - Prismic::Fragments::Color -
    -
  • - - -
  • -
    - #value - Prismic::Fragments::Timestamp -
    -
  • - - -
  • -
    - #value - Prismic::Fragments::Date -
    -
  • - - -
  • -
    - #value - Prismic::Fragments::Separator -
    -
  • - - -
  • -
    - #value - Prismic::Fragments::Slice -
    -
  • - - -
  • -
    - #variations - Prismic::Experiment -
    -
  • - - -
  • -
    - #view - Prismic::Fragments::StructuredText::Block::Image -
    -
  • - - -
  • -
    - #views - Prismic::Fragments::Image -
    -
  • - - -
  • -
    - web_link_parser - Prismic::JsonParser -
    -
  • - - -
  • -
    - #width - Prismic::Fragments::Image -
    -
  • - - -
  • -
    - #width - Prismic::Fragments::Image::View -
    -
  • - - -
  • -
    - #width - Prismic::Fragments::StructuredText::Block::Image -
    -
  • - - -
  • -
    - year - Prismic::Predicates -
    -
  • - - -
  • -
    - year_after - Prismic::Predicates -
    -
  • - - -
  • -
    - year_before - Prismic::Predicates -
    -
  • - - - -
-
- - diff --git a/docs/top-level-namespace.html b/docs/top-level-namespace.html deleted file mode 100644 index 9986c33..0000000 --- a/docs/top-level-namespace.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - Top Level Namespace - - — Documentation by YARD 0.9.8 - - - - - - - - - - - - - - - - - - - -
- - -

Top Level Namespace - - - -

-
- - - - - - - - - - - -
- -

Defined Under Namespace

-

- - - Modules: Prismic - - - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index b63bbf7..0000000 --- a/gulpfile.js +++ /dev/null @@ -1,23 +0,0 @@ -var gulp = require('gulp'), - gist = require('gulp-gist'), - deploy = require("gulp-gh-pages"); - -gulp.task('deploy:doc', function () { - gulp.src("./doc/**/*") - .pipe(deploy()); -}); - -gulp.task('deploy:gist', function () { - - gulp.src("./spec/doc_spec.rb") - .pipe(gist()); -}); - -gulp.task('dist', ['deploy:doc', 'deploy:gist']); - -/** - * Default task - */ - -gulp.task('default', ['deploy:gist']); - diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 7be16ec..0000000 --- a/package-lock.json +++ /dev/null @@ -1,2629 +0,0 @@ -{ - "name": "prismic.io", - "requires": true, - "lockfileVersion": 1, - "dependencies": { - "ansi-gray": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", - "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", - "dev": true, - "requires": { - "ansi-wrap": "0.1.0" - } - }, - "ansi-regex": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz", - "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=", - "dev": true - }, - "ansi-styles": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz", - "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=", - "dev": true - }, - "ansi-wrap": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", - "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", - "dev": true - }, - "archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-differ": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", - "dev": true - }, - "array-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", - "dev": true - }, - "array-slice": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", - "dev": true - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "beeper": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", - "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", - "dev": true - }, - "bl": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", - "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", - "dev": true, - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "chalk": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", - "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", - "dev": true, - "requires": { - "ansi-styles": "^1.1.0", - "escape-string-regexp": "^1.0.0", - "has-ansi": "^0.1.0", - "strip-ansi": "^0.3.0", - "supports-color": "^0.2.0" - } - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true - }, - "clone-stats": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "collections": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/collections/-/collections-0.2.2.tgz", - "integrity": "sha1-HyMCay7zb5J+7MkB6ZxfDUj6M04=", - "dev": true, - "requires": { - "weak-map": "1.0.0" - } - }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "dateformat": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", - "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "defaults": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", - "dev": true, - "requires": { - "clone": "^1.0.2" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "deprecated": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", - "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=", - "dev": true - }, - "detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", - "dev": true - }, - "duplexer2": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", - "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", - "dev": true, - "requires": { - "readable-stream": "~1.1.9" - } - }, - "end-of-stream": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", - "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", - "dev": true, - "requires": { - "once": "~1.3.0" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "fancy-log": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", - "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", - "dev": true, - "requires": { - "ansi-gray": "^0.1.1", - "color-support": "^1.1.3", - "parse-node-version": "^1.0.0", - "time-stamp": "^1.0.0" - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "find-index": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", - "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=", - "dev": true - }, - "findup-sync": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", - "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", - "dev": true, - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^3.1.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - } - }, - "fined": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", - "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" - } - }, - "first-chunk-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", - "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", - "dev": true - }, - "flagged-respawn": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", - "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", - "dev": true - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "gaze": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", - "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", - "dev": true, - "requires": { - "globule": "~0.1.0" - } - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "gift": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/gift/-/gift-0.4.2.tgz", - "integrity": "sha1-G9JNKEatP6cdKP8LVPTAai/dIq0=", - "dev": true, - "requires": { - "underscore": "1.x.x" - } - }, - "git-remote-origin-url": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-1.1.2.tgz", - "integrity": "sha1-dSxkdUldxJO/81DEbHq6pQopNH4=", - "dev": true, - "requires": { - "gitconfiglocal": "^1.0.0" - } - }, - "gitconfiglocal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", - "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", - "dev": true, - "requires": { - "ini": "^1.3.2" - } - }, - "glob": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", - "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^2.0.1", - "once": "^1.3.0" - } - }, - "glob-stream": { - "version": "3.1.18", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", - "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", - "dev": true, - "requires": { - "glob": "^4.3.1", - "glob2base": "^0.0.12", - "minimatch": "^2.0.1", - "ordered-read-streams": "^0.1.0", - "through2": "^0.6.1", - "unique-stream": "^1.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "dev": true, - "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - } - } - } - }, - "glob-watcher": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", - "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", - "dev": true, - "requires": { - "gaze": "^0.5.1" - } - }, - "glob2base": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", - "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", - "dev": true, - "requires": { - "find-index": "^0.1.1" - } - }, - "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } - }, - "global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - } - }, - "globule": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", - "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", - "dev": true, - "requires": { - "glob": "~3.1.21", - "lodash": "~1.0.1", - "minimatch": "~0.2.11" - }, - "dependencies": { - "glob": { - "version": "3.1.21", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", - "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", - "dev": true, - "requires": { - "graceful-fs": "~1.2.0", - "inherits": "1", - "minimatch": "~0.2.11" - } - }, - "graceful-fs": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", - "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", - "dev": true - }, - "inherits": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", - "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", - "dev": true - }, - "minimatch": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", - "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", - "dev": true, - "requires": { - "lru-cache": "2", - "sigmund": "~1.0.0" - } - } - } - }, - "glogg": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", - "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", - "dev": true, - "requires": { - "sparkles": "^1.0.0" - } - }, - "graceful-fs": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.12.tgz", - "integrity": "sha512-J55gaCS4iTTJfTXIxSVw3EMQckcqkpdRv3IR7gu6sq0+tbC363Zx6KH/SEwXASK9JRbhyZmVjJEVJIOxYsB3Qg==", - "dev": true, - "requires": { - "natives": "^1.1.3" - } - }, - "gulp": { - "version": "3.8.11", - "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.8.11.tgz", - "integrity": "sha1-1Vfgpyg+tBNkkZabBJd2eXLx0oo=", - "dev": true, - "requires": { - "archy": "^1.0.0", - "chalk": "^0.5.0", - "deprecated": "^0.0.1", - "gulp-util": "^3.0.0", - "interpret": "^0.3.2", - "liftoff": "^2.0.1", - "minimist": "^1.1.0", - "orchestrator": "^0.3.0", - "pretty-hrtime": "^0.2.0", - "semver": "^4.1.0", - "tildify": "^1.0.0", - "v8flags": "^2.0.2", - "vinyl-fs": "^0.3.0" - } - }, - "gulp-gh-pages": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/gulp-gh-pages/-/gulp-gh-pages-0.3.4.tgz", - "integrity": "sha1-Oqo8fP/kfUy96Ww1T16ku8DTViM=", - "dev": true, - "requires": { - "gift": "^0.4.1", - "git-remote-origin-url": "^1.0.0", - "gulp-util": "^3.0.1", - "lodash": "^2.4.1", - "rimraf": "^2.2.6", - "through2": "^0.6.1", - "when": "^3.4.5" - }, - "dependencies": { - "lodash": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", - "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "dev": true, - "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - } - } - } - }, - "gulp-gist": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/gulp-gist/-/gulp-gist-1.1.0.tgz", - "integrity": "sha1-rdDzp458q8rTjw+Zw/f++GU1vzE=", - "dev": true, - "requires": { - "gulp": "^3.8.8", - "gulp-util": "^3.0.1", - "q": "~1.0.1", - "q-io": "~1.11.5", - "throat": "~1.0.0", - "vinyl-map": "~1.0.1" - } - }, - "gulp-util": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", - "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", - "dev": true, - "requires": { - "array-differ": "^1.0.0", - "array-uniq": "^1.0.2", - "beeper": "^1.0.0", - "chalk": "^1.0.0", - "dateformat": "^2.0.0", - "fancy-log": "^1.1.0", - "gulplog": "^1.0.0", - "has-gulplog": "^0.1.0", - "lodash._reescape": "^3.0.0", - "lodash._reevaluate": "^3.0.0", - "lodash._reinterpolate": "^3.0.0", - "lodash.template": "^3.0.0", - "minimist": "^1.1.0", - "multipipe": "^0.1.2", - "object-assign": "^3.0.0", - "replace-ext": "0.0.1", - "through2": "^2.0.0", - "vinyl": "^0.5.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "gulplog": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", - "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", - "dev": true, - "requires": { - "glogg": "^1.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz", - "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=", - "dev": true, - "requires": { - "ansi-regex": "^0.2.0" - } - }, - "has-gulplog": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", - "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", - "dev": true, - "requires": { - "sparkles": "^1.0.0" - } - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "dev": true, - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "interpret": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-0.3.10.tgz", - "integrity": "sha1-CIwl3nMcbFsRKpDwBxz69Fnlp7s=", - "dev": true - }, - "is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "dev": true, - "requires": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-core-module": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", - "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "dev": true, - "requires": { - "is-unc-path": "^1.0.0" - } - }, - "is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "dev": true, - "requires": { - "unc-path-regex": "^0.1.2" - } - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "liftoff": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz", - "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=", - "dev": true, - "requires": { - "extend": "^3.0.0", - "findup-sync": "^2.0.0", - "fined": "^1.0.1", - "flagged-respawn": "^1.0.0", - "is-plain-object": "^2.0.4", - "object.map": "^1.0.0", - "rechoir": "^0.6.2", - "resolve": "^1.1.7" - } - }, - "lodash": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", - "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=", - "dev": true - }, - "lodash._basecopy": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", - "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", - "dev": true - }, - "lodash._basetostring": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", - "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", - "dev": true - }, - "lodash._basevalues": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", - "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", - "dev": true - }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", - "dev": true - }, - "lodash._isiterateecall": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", - "dev": true - }, - "lodash._reescape": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", - "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", - "dev": true - }, - "lodash._reevaluate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", - "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", - "dev": true - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", - "dev": true - }, - "lodash._root": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", - "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", - "dev": true - }, - "lodash.escape": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", - "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", - "dev": true, - "requires": { - "lodash._root": "^3.0.0" - } - }, - "lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", - "dev": true - }, - "lodash.isarray": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", - "dev": true - }, - "lodash.keys": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", - "dev": true, - "requires": { - "lodash._getnative": "^3.0.0", - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - } - }, - "lodash.restparam": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", - "dev": true - }, - "lodash.template": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", - "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", - "dev": true, - "requires": { - "lodash._basecopy": "^3.0.0", - "lodash._basetostring": "^3.0.0", - "lodash._basevalues": "^3.0.0", - "lodash._isiterateecall": "^3.0.0", - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0", - "lodash.keys": "^3.0.0", - "lodash.restparam": "^3.0.0", - "lodash.templatesettings": "^3.0.0" - } - }, - "lodash.templatesettings": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", - "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", - "dev": true, - "requires": { - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0" - } - }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", - "dev": true - }, - "make-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "mimeparse": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/mimeparse/-/mimeparse-0.1.4.tgz", - "integrity": "sha1-2vsCdSNw/SJgk64xUsJxrwGsJUo=", - "dev": true - }, - "minimatch": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", - "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", - "dev": true, - "requires": { - "brace-expansion": "^1.0.0" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "multipipe": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", - "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", - "dev": true, - "requires": { - "duplexer2": "0.0.2" - } - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "natives": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.6.tgz", - "integrity": "sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA==", - "dev": true - }, - "new-from": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/new-from/-/new-from-0.0.3.tgz", - "integrity": "sha1-HErRNhPePhXWMhtw7Vwjk36iXmc=", - "dev": true, - "requires": { - "readable-stream": "~1.1.8" - } - }, - "object-assign": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", - "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.defaults": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", - "dev": true, - "requires": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "object.map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", - "dev": true, - "requires": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "once": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", - "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "orchestrator": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", - "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", - "dev": true, - "requires": { - "end-of-stream": "~0.1.5", - "sequencify": "~0.0.7", - "stream-consume": "~0.1.0" - } - }, - "ordered-read-streams": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz", - "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=", - "dev": true - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "parse-filepath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", - "dev": true, - "requires": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" - } - }, - "parse-node-version": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", - "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", - "dev": true - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "path-root": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", - "dev": true, - "requires": { - "path-root-regex": "^0.1.0" - } - }, - "path-root-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", - "dev": true - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "pretty-hrtime": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-0.2.2.tgz", - "integrity": "sha1-1P2INR46R0H4Fzr31qS4RvmJXAA=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "promise": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/promise/-/promise-3.2.0.tgz", - "integrity": "sha1-tND6KBvNXKnWreVWtp3VlHuau5Q=", - "dev": true - }, - "q": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.0.1.tgz", - "integrity": "sha1-EYcq7t7okmgRCxCnGESP+xARKhQ=", - "dev": true - }, - "q-io": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/q-io/-/q-io-1.11.6.tgz", - "integrity": "sha1-poUJduHo98W9D6Plg19eudlPoXM=", - "dev": true, - "requires": { - "collections": "^0.2.0", - "mime": "^1.2.11", - "mimeparse": "^0.1.4", - "q": "^1.0.1", - "qs": "^1.2.1", - "url2": "^0.0.0" - } - }, - "qs": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-1.2.2.tgz", - "integrity": "sha1-GbV/8k3CqZzh+L32r82ln472H4g=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "repeat-element": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", - "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", - "dev": true - }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", - "dev": true, - "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - } - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "requires": { - "glob": "^7.1.3" - }, - "dependencies": { - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "semver": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", - "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", - "dev": true - }, - "sequencify": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", - "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=", - "dev": true - }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "sigmund": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "dev": true, - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", - "dev": true - }, - "sparkles": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", - "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", - "dev": true - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "stream-consume": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz", - "integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==", - "dev": true - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "strip-ansi": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz", - "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", - "dev": true, - "requires": { - "ansi-regex": "^0.2.1" - } - }, - "strip-bom": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", - "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", - "dev": true, - "requires": { - "first-chunk-stream": "^1.0.0", - "is-utf8": "^0.2.0" - } - }, - "supports-color": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz", - "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=", - "dev": true - }, - "throat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/throat/-/throat-1.0.0.tgz", - "integrity": "sha1-BMng+c6I4lDbYw/eq8LluxUqBiU=", - "dev": true, - "requires": { - "promise": "~3.2.0" - } - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "tildify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", - "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", - "dev": true, - "requires": { - "os-homedir": "^1.0.0" - } - }, - "time-stamp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", - "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", - "dev": true - }, - "underscore": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz", - "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==", - "dev": true - }, - "union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - } - }, - "unique-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", - "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - } - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "url2": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/url2/-/url2-0.0.0.tgz", - "integrity": "sha1-Tqq9HVw6yQ1iq0SFyZhCKGWgSxo=", - "dev": true - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, - "user-home": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", - "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "v8flags": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", - "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", - "dev": true, - "requires": { - "user-home": "^1.1.1" - } - }, - "vinyl": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", - "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", - "dev": true, - "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - } - }, - "vinyl-fs": { - "version": "0.3.14", - "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", - "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", - "dev": true, - "requires": { - "defaults": "^1.0.0", - "glob-stream": "^3.1.5", - "glob-watcher": "^0.0.6", - "graceful-fs": "^3.0.0", - "mkdirp": "^0.5.0", - "strip-bom": "^1.0.0", - "through2": "^0.6.1", - "vinyl": "^0.4.0" - }, - "dependencies": { - "clone": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", - "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "dev": true, - "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - } - }, - "vinyl": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", - "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", - "dev": true, - "requires": { - "clone": "^0.2.0", - "clone-stats": "^0.0.1" - } - } - } - }, - "vinyl-map": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/vinyl-map/-/vinyl-map-1.0.2.tgz", - "integrity": "sha1-qLKWAl+XP6fK1igXlnpI8dF2v3w=", - "dev": true, - "requires": { - "bl": "^1.1.2", - "new-from": "0.0.3", - "through2": "^0.4.1" - }, - "dependencies": { - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "through2": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz", - "integrity": "sha1-2/WGYDEVHsg1K7bE22SiKSqEC5s=", - "dev": true, - "requires": { - "readable-stream": "~1.0.17", - "xtend": "~2.1.1" - } - }, - "xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", - "dev": true, - "requires": { - "object-keys": "~0.4.0" - } - } - } - }, - "weak-map": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/weak-map/-/weak-map-1.0.0.tgz", - "integrity": "sha1-tm5Wqd8L0lp2u/G1FNsSkIBhSjc=", - "dev": true - }, - "when": { - "version": "3.7.8", - "resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz", - "integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I=", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 2b49e6d..0000000 --- a/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "prismic.io", - "description": "Ruby development kit for prismic.io", - "url": "https://github.com/prismicio/ruby-kit", - "devDependencies": { - "gulp": "~3.8.8", - "gulp-gist": "~1.1.0", - "gulp-gh-pages": "~0.3.4" - } -} From b8aa79e4e405dfa7cb262f12bf1c09af6776ed08 Mon Sep 17 00:00:00 2001 From: Filippo Liverani Date: Wed, 25 Nov 2026 09:52:17 +0100 Subject: [PATCH 3/9] Replace redefined accessors and the nested serialize method WebLink, FileLink and ImageLink declared an `url` reader and then redefined it; SearchForm did the same with `ref`. Each now declares only the writer. SearchForm#q defined `serialize` inside its own body on every call; the logic moves to a private `serialize_predicate_value`. Reindents BooleanField. Behavior is unchanged. --- lib/prismic.rb | 25 ++++++++++++---------- lib/prismic/fragments/boolean_field.rb | 29 +++++++++++++------------- lib/prismic/fragments/link.rb | 9 +++++--- 3 files changed, 34 insertions(+), 29 deletions(-) diff --git a/lib/prismic.rb b/lib/prismic.rb index 589e554..9f784f1 100644 --- a/lib/prismic.rb +++ b/lib/prismic.rb @@ -140,7 +140,8 @@ def self.oauth_check_token(url, oauth_opts, api_opts=nil) # results = search_form.submit(master_ref) # submit the search form # results = api.form('everything').page(3).page_size("20").submit(master_ref) # methods can be chained class SearchForm - attr_accessor :api, :form, :data, :ref + attr_accessor :api, :form, :data + attr_writer :ref def initialize(api, form, data={}, ref=nil) @api = api @@ -160,15 +161,6 @@ def query(*query) end def q(*query) - def serialize(field) - if field.kind_of?(String) and not (field.start_with?('my.') or field.start_with?('document')) - %("#{field}") - elsif field.kind_of?(Array) - %([#{field.map{ |arg| serialize(arg) }.join(', ')}]) - else - %(#{field}) - end - end if query[0].kind_of?(String) set('q', query[0]) else @@ -179,13 +171,24 @@ def serialize(field) predicate.map { |q| op = q[0] rest = q[1..-1] - "[:d = #{op}(#{rest.map { |arg| serialize(arg) }.join(', ')})]" + "[:d = #{op}(#{rest.map { |arg| serialize_predicate_value(arg) }.join(', ')})]" }.join('') } set('q', "[#{predicates * ''}]") end end + def serialize_predicate_value(field) + if field.kind_of?(String) and not (field.start_with?('my.') or field.start_with?('document')) + %("#{field}") + elsif field.kind_of?(Array) + %([#{field.map{ |arg| serialize_predicate_value(arg) }.join(', ')}]) + else + %(#{field}) + end + end + private :serialize_predicate_value + # @!method orderings(orderings) # Specify a orderings for this form. # @param orderings [String] The orderings diff --git a/lib/prismic/fragments/boolean_field.rb b/lib/prismic/fragments/boolean_field.rb index 382bd8c..1a6f907 100644 --- a/lib/prismic/fragments/boolean_field.rb +++ b/lib/prismic/fragments/boolean_field.rb @@ -1,21 +1,20 @@ # encoding: utf-8 module Prismic - module Fragments - class BooleanField < Fragment - attr_accessor :value - - def initialize(value) - @value = value - end - - def as_html(link_resolver=nil) - if (@value === true) - %() - else - %() - end + module Fragments + class BooleanField < Fragment + attr_accessor :value + + def initialize(value) + @value = value + end + + def as_html(link_resolver=nil) + if (@value === true) + %() + else + %() end end end end - \ No newline at end of file +end diff --git a/lib/prismic/fragments/link.rb b/lib/prismic/fragments/link.rb index fe0a6b7..9c52545 100644 --- a/lib/prismic/fragments/link.rb +++ b/lib/prismic/fragments/link.rb @@ -31,7 +31,8 @@ def url(link_resolver = nil) end class WebLink < Link - attr_accessor :url, :target + attr_accessor :target + attr_writer :url def initialize(url, target = nil) @url = url @@ -56,7 +57,8 @@ def url(link_resolver = nil) end class FileLink < Link - attr_accessor :url, :name, :kind, :size, :target + attr_accessor :name, :kind, :size, :target + attr_writer :url def initialize(url, name, kind, size, target = nil) @url = url @@ -85,7 +87,8 @@ def url(link_resolver = nil) end class ImageLink < Link - attr_accessor :url, :target + attr_accessor :target + attr_writer :url def initialize(url, target = nil) @url = url From 91137fbf5da4a128064e8fa2a6b24b3e19060fe8 Mon Sep 17 00:00:00 2001 From: Filippo Liverani Date: Wed, 25 Nov 2026 09:52:27 +0100 Subject: [PATCH 4/9] Require Ruby 3.4 and test on Ruby 3.4 and 4.0 Runs the GitHub Actions workflow on main against Ruby 3.4 and 4.0 with current checkout and setup-ruby actions, and sets the gemspec's required_ruby_version to match. Builds the URL check in Prismic.api from URI::RFC2396_PARSER, since URI.regexp is obsolete on Ruby 3.4. The gem now packages only lib/, LICENSE.md and README.md instead of every tracked file. Drops the redundant rspec-core dependency, the yajl fallback in spec_helper, and the java and x86_64-darwin-19 lockfile platforms in favor of arm64-darwin. --- .github/workflows/ruby.yml | 13 +++++-------- Gemfile.lock | 11 +++-------- lib/prismic.rb | 6 +++--- prismic.gemspec | 6 ++---- spec/spec_helper.rb | 6 ------ 5 files changed, 13 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index a4ea394..8bbdb64 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -9,9 +9,9 @@ name: Ruby on: push: - branches: [ "master" ] + branches: [ "main" ] pull_request: - branches: [ "master" ] + branches: [ "main" ] permissions: contents: read @@ -22,15 +22,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: ['3.0', '3.1', '3.2'] + ruby-version: ['3.4', '4.0'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v7 - name: Set up Ruby - # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, - # change this to (see https://github.com/ruby/setup-ruby#versioning): - # uses: ruby/setup-ruby@v1 - uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 + uses: ruby/setup-ruby@78c62f2208e480ce3d5ae4dfd9b9e181acf48b63 # v1.344.0 with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically diff --git a/Gemfile.lock b/Gemfile.lock index 288eb12..a99f732 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,14 +11,11 @@ GEM nokogiri (1.19.4) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.19.4-java) - racc (~> 1.4) - nokogiri (1.19.4-x86_64-darwin) + nokogiri (1.19.4-arm64-darwin) racc (~> 1.4) nokogiri (1.19.4-x86_64-linux-gnu) racc (~> 1.4) racc (1.8.1) - racc (1.8.1-java) rspec (3.13.2) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) @@ -34,16 +31,14 @@ GEM rspec-support (3.13.7) PLATFORMS - java + arm64-darwin ruby - x86_64-darwin-19 x86_64-linux DEPENDENCIES nokogiri prismic.io! rspec - rspec-core BUNDLED WITH - 4.0.12 + 4.1.1 diff --git a/lib/prismic.rb b/lib/prismic.rb index 9f784f1..618a2bd 100644 --- a/lib/prismic.rb +++ b/lib/prismic.rb @@ -13,6 +13,8 @@ module Prismic PREVIEW_COOKIE = 'io.prismic.preview' + URL_PATTERN = /\A#{URI::RFC2396_PARSER.make_regexp(%w[http https])}\z/ + # These exception can contains an error cause and is able to show them class Error < Exception attr_reader :cause @@ -63,9 +65,7 @@ def full_trace(e=self) # # @return [API] The API instance related to this repository def self.api(url, opts=nil) - if (not url =~ /\A#{URI::regexp(['http', 'https'])}\z/) - raise ArgumentError.new("Valid web URI expected") - end + raise ArgumentError, 'Valid web URI expected' unless URL_PATTERN.match?(url.to_s) opts ||= {} opts = {access_token: opts} if opts.is_a?(String) API.start(url, opts) diff --git a/prismic.gemspec b/prismic.gemspec index 85a7924..e064440 100644 --- a/prismic.gemspec +++ b/prismic.gemspec @@ -12,12 +12,10 @@ Gem::Specification.new do |spec| spec.homepage = 'http://prismic.io' spec.license = 'Apache-2.0' - spec.files = `git ls-files`.split($/) - spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } - spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) + spec.files = Dir['lib/**/*.rb'] + %w[LICENSE.md README.md] spec.require_paths = ['lib'] + spec.required_ruby_version = '>= 3.4' spec.add_development_dependency 'nokogiri' spec.add_development_dependency 'rspec' - spec.add_development_dependency 'rspec-core' end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 3986b78..83c175c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,11 +1,5 @@ # encoding: utf-8 require 'nokogiri' -begin - require 'yajl/json_gem' -rescue LoadError - # ok not a big deal - require 'json' -end RSpec.configure do |c| # Stop after the first failure From b06899f86a756f6cc717a8ac8d1b2ba5162bcfd5 Mon Sep 17 00:00:00 2001 From: Filippo Liverani Date: Wed, 25 Nov 2026 09:52:34 +0100 Subject: [PATCH 5/9] Render Text, Select and Embed with nil values Text and Select raised on a nil value, and Embed raised on a nil type or provider, because CGI.escapeHTML requires a String. Each now converts the value with to_s and renders an empty string. --- lib/prismic/fragments/embed.rb | 2 +- lib/prismic/fragments/select.rb | 2 +- lib/prismic/fragments/text.rb | 2 +- spec/fragments_spec.rb | 9 +++++++++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/prismic/fragments/embed.rb b/lib/prismic/fragments/embed.rb index ae619a6..73ee675 100644 --- a/lib/prismic/fragments/embed.rb +++ b/lib/prismic/fragments/embed.rb @@ -19,7 +19,7 @@ def initialize(embed_type, provider, url, html, o_embed_json) # # @return [String] the HTML representation def as_html(link_resolver=nil, html_serializer=nil) - %Q|
#@html
| + %Q|
#@html
| end end end diff --git a/lib/prismic/fragments/select.rb b/lib/prismic/fragments/select.rb index 8bf5f12..c495189 100644 --- a/lib/prismic/fragments/select.rb +++ b/lib/prismic/fragments/select.rb @@ -9,7 +9,7 @@ def initialize(value) end def as_html(link_resolver=nil) - %(#{CGI::escapeHTML(@value)}) + %(#{CGI::escapeHTML(@value.to_s)}) end end end diff --git a/lib/prismic/fragments/text.rb b/lib/prismic/fragments/text.rb index d83f627..c235efe 100644 --- a/lib/prismic/fragments/text.rb +++ b/lib/prismic/fragments/text.rb @@ -9,7 +9,7 @@ def initialize(value) end def as_html(link_resolver=nil) - %(#{CGI::escapeHTML(@value)}) + %(#{CGI::escapeHTML(@value.to_s)}) end def as_text diff --git a/spec/fragments_spec.rb b/spec/fragments_spec.rb index ca3cd08..13649ea 100644 --- a/spec/fragments_spec.rb +++ b/spec/fragments_spec.rb @@ -219,6 +219,10 @@ def strong(start, stop) @text = Prismic::Fragments::Text.new('&my #abcde') @text.as_html.should =~ /^<[^>]+>&my <value> #abcde<[^>]+>$/ end + + it "renders an empty span for a nil value" do + Prismic::Fragments::Text.new(nil).as_html.should == '' + end end describe 'as_text' do @@ -451,6 +455,11 @@ def strong(start, stop) embed = Prismic::Fragments::Embed.new('Vi"deo', 'You&Tube', 'https://example.com/?v=1&t="2"', '', nil) embed.as_html.should == '
' end + + it "renders without a provider name" do + embed = Prismic::Fragments::Embed.new('video', nil, 'my_url', 'my_html', nil) + embed.as_html.should == '
my_html
' + end end describe 'as_text' do From 2c05b19e35664d314cf6c9e520d8cd5d5a51d041 Mon Sep 17 00:00:00 2001 From: Filippo Liverani Date: Wed, 25 Nov 2026 09:52:41 +0100 Subject: [PATCH 6/9] Skip unknown fragments and empty dates when parsing Only document_parser filtered out fragments of unknown type; document links, groups, multiples and slices called a nil parser and raised. All of them now go through fragment_parser, which warns once per unknown type and returns nil, and the callers drop nil results. Date and Timestamp fields with an empty value are omitted instead of raising in Time.parse. Unknown structured text block types are dropped with a single warning per type instead of a `puts` and a nil block. --- lib/prismic/json_parsers.rb | 72 +++++++++++-------- spec/json_parsers_spec.rb | 139 ++++++++++++++++++++++++++++++++++++ 2 files changed, 180 insertions(+), 31 deletions(-) diff --git a/lib/prismic/json_parsers.rb b/lib/prismic/json_parsers.rb index fa25506..d0f5ced 100644 --- a/lib/prismic/json_parsers.rb +++ b/lib/prismic/json_parsers.rb @@ -7,6 +7,7 @@ module Prismic module JsonParser class << self @@warned_unknown_type = [] + @@warned_unknown_block_type = [] def parsers @parsers ||= { 'Link.document' => method(:document_link_parser), @@ -45,13 +46,7 @@ def document_link_parser(json) type = doc['type'] fragments = {} if doc['data'] and doc['data'][type] - fragments = Hash[doc['data'][type].map { |name, fragment| - if fragment.is_a? Array - [name, multiple_parser(fragment)] - else - [name, parsers[fragment['type']].call(fragment)] - end - }] + fragments = fragments_parser(doc['data'][type]) end Prismic::Fragments::DocumentLink.new( doc['id'], @@ -97,10 +92,14 @@ def web_link_parser(json) end def date_parser(json) + return if json['value'].to_s.empty? + Prismic::Fragments::Date.new(Time.parse(json['value'])) end def timestamp_parser(json) + return if json['value'].to_s.empty? + Prismic::Fragments::Timestamp.new(Time.parse(json['value'])) end @@ -148,7 +147,7 @@ def span_parser(span) end def structured_text_parser(json) - blocks = json['value'].map do |block| + blocks = json['value'].filter_map do |block| case block['type'] when 'paragraph' spans = block['spans'].map {|span| span_parser(span) } @@ -192,15 +191,16 @@ def structured_text_parser(json) block['label'] ) else - puts "Unknown bloc type: #{block['type']}" + warn_unknown_block_type(block['type']) + nil end end Prismic::Fragments::StructuredText.new(blocks) end def multiple_parser(json) - fragments = json.map do |fragment| - parsers[fragment['type']].call(fragment) + fragments = json.filter_map do |fragment| + fragment_parser(fragment) end Prismic::Fragments::Multiple.new(fragments) end @@ -208,7 +208,7 @@ def multiple_parser(json) def group_parser(json) fragment_list_array = [] json['value'].each do |group| - fragments = Hash[ group.map {|name, fragment| [name, parsers[fragment['type']].call(fragment)] }] + fragments = fragments_parser(group) fragment_list_array << Prismic::Fragments::GroupDocument.new(fragments) end Prismic::Fragments::Group.new(fragment_list_array) @@ -222,12 +222,10 @@ def slices_parser(json) slice_label = data['slice_label'] if data.key?('value') - slices << Prismic::Fragments::SimpleSlice.new(slice_type, slice_label, fragment_parser(data['value'])) + value = fragment_parser(data['value']) + slices << Prismic::Fragments::SimpleSlice.new(slice_type, slice_label, value) if value else - non_repeat = {} - data['non-repeat'].each do |fragment_key, fragment_value| - non_repeat[fragment_key] = fragment_parser(fragment_value) - end + non_repeat = fragments_parser(data['non-repeat']) repeat = group_parser({ 'type' => 'Group', 'value' => data['repeat']}) @@ -240,8 +238,11 @@ def slices_parser(json) def fragment_parser(fragment) if fragment.is_a? Array multiple_parser(fragment) + elsif (parser = parsers[fragment['type']]) + parser.call(fragment) else - parsers[fragment['type']].call(fragment) + warn_unknown_type(fragment['type']) + nil end end @@ -252,16 +253,6 @@ def alternate_language_parser(alternate_language) def document_parser(json) data_json = json['data'].values.first # {"doc_type": data} - # Removing the unknown types + sending a warning, once - data_json.select!{ |_, fragment| - known_type = fragment.is_a?(Array) || parsers.include?(fragment['type']) - if !known_type && !@@warned_unknown_type.include?(fragment['type']) - warn "Type #{fragment['type']} is unknown, fragment was skipped; perhaps you should update your prismic.io gem?" - @@warned_unknown_type << fragment['type'] - end - known_type - } - alternate_languages = nil if json.key?('alternate_languages') alternate_languages = Hash[json['alternate_languages'].map { |doc| @@ -269,9 +260,7 @@ def document_parser(json) }] end - fragments = Hash[data_json.map { |name, fragment| - [name, fragment_parser(fragment)] - }] + fragments = fragments_parser(data_json) Prismic::Document.new( json['id'], @@ -309,6 +298,27 @@ def response_parser(documents) private + def fragments_parser(json) + json.filter_map do |name, fragment| + parsed = fragment_parser(fragment) + [name, parsed] if parsed + end.to_h + end + + def warn_unknown_type(type) + return if @@warned_unknown_type.include?(type) + + warn "Type #{type} is unknown, fragment was skipped; perhaps you should update your prismic.io gem?" + @@warned_unknown_type << type + end + + def warn_unknown_block_type(type) + return if @@warned_unknown_block_type.include?(type) + + warn "Unknown block type: #{type}" + @@warned_unknown_block_type << type + end + def view_parser(json) Prismic::Fragments::Image::View.new(json['url'], json['dimensions']['width'], diff --git a/spec/json_parsers_spec.rb b/spec/json_parsers_spec.rb index f985141..afddf8b 100644 --- a/spec/json_parsers_spec.rb +++ b/spec/json_parsers_spec.rb @@ -30,6 +30,74 @@ document_link.lang.should == "en-us" document_link.broken?.should == false end + + it "skips an unknown fetched field" do + json = JSON.load(<<-JSON) + { + "type": "Link.document", + "value": { + "document": { + "id": "UdUjvt_mqVNObPeO", + "type": "product", + "tags": [], + "slug": "dark-chocolate-macaron", + "lang": "en-us", + "data": { + "product": { + "name": { "type": "Text", "value": "Dark chocolate macaron" }, + "flavour": { "type": "Unicorn", "value": "sparkles" } + } + } + }, + "isBroken": false + } + } + JSON + document_link = Prismic::JsonParser.document_link_parser(json) + document_link.fragments.keys.should == ['name'] + end +end + +describe 'group_parser' do + it "skips a fragment of unknown type" do + json = JSON.load(<<-JSON) + { + "type": "Group", + "value": [ + { + "title": { "type": "Text", "value": "Chapter one" }, + "flavour": { "type": "Unicorn", "value": "sparkles" } + } + ] + } + JSON + group = Prismic::JsonParser.group_parser(json) + group[0].fragments.keys.should == ['title'] + end +end + +describe 'slices_parser' do + it "skips an unknown fragment in non-repeat" do + json = JSON.load(<<-JSON) + { + "type": "SliceZone", + "value": [ + { + "type": "Slice", + "slice_type": "features", + "slice_label": null, + "non-repeat": { + "title": { "type": "Text", "value": "Features" }, + "flavour": { "type": "Unicorn", "value": "sparkles" } + }, + "repeat": [] + } + ] + } + JSON + slice_zone = Prismic::JsonParser.slices_parser(json) + slice_zone.slices[0].non_repeat.keys.should == ['title'] + end end describe 'text_parser' do @@ -348,6 +416,35 @@ @structured_text_paragraph.blocks[0].spans[1].link.should be_a Prismic::Fragments::WebLink end end + + it "drops a block of unknown type" do + json = JSON.load(<<-JSON) + { + "type": "StructuredText", + "value": [ + { "type": "paragraph", "text": "Before", "spans": [] }, + { "type": "hologram", "text": "Ignored", "spans": [] }, + { "type": "paragraph", "text": "After", "spans": [] } + ] + } + JSON + structured_text = Prismic::JsonParser.structured_text_parser(json) + structured_text.as_html(nil).should == "

Before

\n\n

After

" + end + + it "warns once per unknown block type" do + json = JSON.load(<<-JSON) + { + "type": "StructuredText", + "value": [ + { "type": "table", "text": "First", "spans": [] }, + { "type": "table", "text": "Second", "spans": [] } + ] + } + JSON + Prismic::JsonParser.should_receive(:warn).with("Unknown block type: table").once + Prismic::JsonParser.structured_text_parser(json) + end end describe 'document_parser' do @@ -384,6 +481,48 @@ @document.fragments.size.should == 15 @document.fragments['name'].should be_a Prismic::Fragments::StructuredText end + + it "omits a Date field with an empty value" do + json = JSON.load(<<-JSON) + { + "id": "WL2IziIAACIAem33", + "type": "event", + "href": "doc-url", + "tags": [], + "slugs": ["launch"], + "data": { + "event": { + "title": { "type": "Text", "value": "Launch" }, + "starts_on": { "type": "Date", "value": "" } + } + } + } + JSON + document = Prismic::JsonParser.document_parser(json) + document['event.starts_on'].should be_nil + document['event.title'].value.should == 'Launch' + end + + it "omits a Timestamp field with an empty value" do + json = JSON.load(<<-JSON) + { + "id": "WL2IziIAACIAem33", + "type": "event", + "href": "doc-url", + "tags": [], + "slugs": ["launch"], + "data": { + "event": { + "title": { "type": "Text", "value": "Launch" }, + "starts_at": { "type": "Timestamp", "value": "" } + } + } + } + JSON + document = Prismic::JsonParser.document_parser(json) + document['event.starts_at'].should be_nil + document['event.title'].value.should == 'Launch' + end end describe 'response_parser' do From 2f5b381873a70d4f108db05ccec88edf599008e1 Mon Sep 17 00:00:00 2001 From: Filippo Liverani Date: Wed, 25 Nov 2026 09:52:49 +0100 Subject: [PATCH 7/9] Fix structured text spans that overlap or run past the text A span ending inside another span popped the wrong tag off the stack. The outer tags it crossed are now closed and reopened after it, so overlapping spans nest correctly. Spans that start past the end of the text are ignored, and text slicing stops at the end of the text. Drops the memoized span hashes, whose default procs made rendered blocks fail Marshal.dump, and renders blocks without spans as escaped text directly. --- lib/prismic/fragments/structured_text.rb | 43 ++++++++++++--------- spec/fragments_spec.rb | 48 ++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 17 deletions(-) diff --git a/lib/prismic/fragments/structured_text.rb b/lib/prismic/fragments/structured_text.rb index 63879d6..cc18e43 100644 --- a/lib/prismic/fragments/structured_text.rb +++ b/lib/prismic/fragments/structured_text.rb @@ -141,6 +141,12 @@ def class_code end def as_html(link_resolver = nil, html_serializer = nil) + if spans.empty? + html = CGI.escapeHTML(text) + html.gsub!("\n", '
') + return html + end + start_spans, end_spans = prepare_spans boundaries = boundary_positions html = String.new @@ -149,15 +155,19 @@ def as_html(link_resolver = nil, html_serializer = nil) boundaries.each_with_index do |pos, idx| if (ending = end_spans[pos]) - ending.each do - tag = stack.pop - inner = serialize(tag[:span], tag[:html], link_resolver, html_serializer) - if stack.empty? - html << inner + remaining = ending.length + reopened = [] + while remaining > 0 && (tag = stack.pop) + unless tag[:continued] && tag[:html].empty? + (stack.empty? ? html : stack[-1][:html]) << serialize(tag[:span], tag[:html], link_resolver, html_serializer) + end + if ending.any? { |span| span.equal?(tag[:span]) } + remaining -= 1 else - stack[-1][:html] << inner + reopened << tag[:span] end end + reopened.reverse_each { |span| stack.push(span: span, html: String.new, continued: true) } end if (starting = start_spans[pos]) @@ -169,7 +179,7 @@ def as_html(link_resolver = nil, html_serializer = nil) break if idx == last_idx next_pos = boundaries[idx + 1] - next if pos == next_pos + next if pos == next_pos || pos >= text.length escaped = cgi_escape_html(text[pos...next_pos]) if stack.empty? @@ -188,20 +198,17 @@ def cgi_escape_html(string) end def prepare_spans - return [@start_spans, @end_spans] if @prepared_spans - - start_spans = Hash.new { |h, k| h[k] = [] } - end_spans = Hash.new { |h, k| h[k] = [] } + start_spans = {} + end_spans = {} spans.each do |span| - start_spans[span.start] << span - end_spans[span.end] << span + next if span.start > text.length + + (start_spans[span.start] ||= []) << span + (end_spans[span.end] ||= []) << span end start_spans.each_value { |s| s.sort! { |a, b| (b.end - b.start) <=> (a.end - a.start) } } - @start_spans = start_spans - @end_spans = end_spans - @prepared_spans = true - [@start_spans, @end_spans] + [start_spans, end_spans] end def as_text @@ -220,6 +227,8 @@ def serialize(elt, text, link_resolver, html_serializer) def boundary_positions positions = [0, text.length] spans.each do |span| + next if span.start > text.length + positions << span.start positions << span.end end diff --git a/spec/fragments_spec.rb b/spec/fragments_spec.rb index 13649ea..93f6fc0 100644 --- a/spec/fragments_spec.rb +++ b/spec/fragments_spec.rb @@ -603,6 +603,10 @@ def strong(start, stop) @heading = 2 block.as_html(nil).should == '

This is a simple test.

' end + it 'ignores a span past the end of the parsed heading' do + json = JSON.load(File.read("#{File.dirname(__FILE__)}/responses_mocks/structured_text_heading.json")) + Prismic::JsonParser.structured_text_parser(json).as_html(nil).should == '

Salted Caramel Macaron

' + end end describe 'StructuredText::Paragraph' do @@ -647,6 +651,50 @@ def strong(start, stop) @spans = [em(2, 4), strong(4, 6)] block.as_html(nil).should =~ %r{^<[^>]+>abcdefghijklmnopqrstuvwxyz<[^>]+>$} end + it 'ignores a span that starts past the end of the text' do + @text = 'abc' + @spans = [em(5, 10)] + block.as_html(nil).should == '

abc

' + end + it 'renders spans that end at different positions past the text' do + @text = 'abc' + @spans = [strong(1, 5), em(1, 10)] + block.as_html(nil).should == '

abc

' + end + it 'keeps an empty span that starts at the end of the text' do + @text = 'abc' + @spans = [strong(3, 10)] + block.as_html(nil).should == '

abc

' + end + it 'splits a span that overlaps the one ending before it' do + @text = 'abcdef' + @spans = [em(0, 4), strong(2, 6)] + block.as_html(nil).should == '

abcdef

' + end + it 'does not emit an empty continuation' do + @text = 'abc' + @spans = [em(0, 3), strong(1, 10)] + block.as_html(nil).should == '

abc

' + end + it 'calls the serializer once per piece of a split span' do + @text = 'abcdef' + @spans = [em(0, 4), strong(2, 6)] + seen = [] + serializer = Prismic.html_serializer { |element, _content| seen << element; nil } + block.as_html(nil, serializer) + seen.size.should == 4 + end + it 'can be Marshal-dumped after rendering' do + @text = "This is a simple test." + @spans = [em(5, 7), strong(8, 9)] + html = block.as_html(nil) + Marshal.load(Marshal.dump(block)).as_html(nil).should == html + end + it 'renders a block without spans' do + @text = "a < b & c\nd" + @spans = [] + block.as_html(nil).should == '

a < b & c
d

' + end end describe 'StructuredText::Preformatted' do From 508257709ba21649752b0aeddf2ad87a26f738a8 Mon Sep 17 00:00:00 2001 From: Filippo Liverani Date: Wed, 25 Nov 2026 11:17:49 +0100 Subject: [PATCH 8/9] Stop the HTTP client from changing the URI it is given DefaultHTTPClient.get and .post appended the query to the URI object they received. A caller that passed the same URI more than once sent the access token again on every call, and the query grew with each request. Both methods now add the query to a copy and leave the caller's URI unchanged. --- lib/prismic.rb | 4 ++-- spec/default_http_client_spec.rb | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 spec/default_http_client_spec.rb diff --git a/lib/prismic.rb b/lib/prismic.rb index 618a2bd..593fa21 100644 --- a/lib/prismic.rb +++ b/lib/prismic.rb @@ -624,7 +624,7 @@ class << self # - code: returns the response's HTTP status code (as number or String) # - body: returns the response's body (as String) def get(uri, data={}, headers={}) - uri = URI(uri) if uri.is_a?(String) + uri = uri.is_a?(String) ? URI(uri) : uri.dup add_query(uri, data) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = uri.scheme =~ /https/i @@ -637,7 +637,7 @@ def get(uri, data={}, headers={}) # - code: returns the response's HTTP status code (as number or String) # - body: returns the response's body (as String) def post(uri, data={}, headers={}) - uri = URI(uri) if uri.is_a?(String) + uri = uri.is_a?(String) ? URI(uri) : uri.dup add_query(uri, data) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = uri.scheme =~ /https/i diff --git a/spec/default_http_client_spec.rb b/spec/default_http_client_spec.rb new file mode 100644 index 0000000..3c615b9 --- /dev/null +++ b/spec/default_http_client_spec.rb @@ -0,0 +1,29 @@ +# encoding: utf-8 +require 'spec_helper' + +describe Prismic::DefaultHTTPClient do + let(:http) { instance_double(Net::HTTP, :use_ssl= => nil, get: nil, post: nil) } + let(:uri) { URI('https://micro.prismic.io/api') } + + before do + allow(Net::HTTP).to receive(:new).and_return(http) + end + + describe '.get' do + it 'sends the token once per call without changing the given URI' do + 2.times { described_class.get(uri, 'access_token' => 'abc') } + + expect(uri.to_s).to eq('https://micro.prismic.io/api') + expect(http).to have_received(:get).with('/api?access_token=abc', {}).twice + end + end + + describe '.post' do + it 'sends the token once per call without changing the given URI' do + 2.times { described_class.post(uri, 'access_token' => 'abc') } + + expect(uri.to_s).to eq('https://micro.prismic.io/api') + expect(http).to have_received(:post).with('/api', 'access_token=abc', {}).twice + end + end +end From 07710b0c6f9f4fb121d30ef9b37fe2f4690be183 Mon Sep 17 00:00:00 2001 From: Filippo Liverani Date: Wed, 25 Nov 2026 09:52:50 +0100 Subject: [PATCH 9/9] Bump to 1.11.0 --- Gemfile.lock | 2 +- lib/prismic/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a99f732..c74fc0b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - prismic.io (1.10.0) + prismic.io (1.11.0) GEM remote: https://rubygems.org/ diff --git a/lib/prismic/version.rb b/lib/prismic/version.rb index 6335fe0..47f2c46 100644 --- a/lib/prismic/version.rb +++ b/lib/prismic/version.rb @@ -1,3 +1,3 @@ module Prismic - VERSION = '1.10.0' + VERSION = '1.11.0' end