contentful 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.README.md.swp +0 -0
- data/.gitignore +2 -0
- data/.rspec +1 -0
- data/.travis.yml +10 -0
- data/ChangeLog.md +3 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +21 -0
- data/README.md +193 -0
- data/Rakefile +30 -0
- data/contentful.gemspec +31 -0
- data/do_request.sh +5 -0
- data/doc/Contentful.html +131 -0
- data/doc/Contentful/AccessDenied.html +158 -0
- data/doc/Contentful/Array.html +346 -0
- data/doc/Contentful/Asset.html +315 -0
- data/doc/Contentful/BadRequest.html +158 -0
- data/doc/Contentful/Client.html +1407 -0
- data/doc/Contentful/ContentType.html +183 -0
- data/doc/Contentful/DynamicEntry.html +333 -0
- data/doc/Contentful/Entry.html +198 -0
- data/doc/Contentful/Error.html +413 -0
- data/doc/Contentful/Field.html +161 -0
- data/doc/Contentful/File.html +160 -0
- data/doc/Contentful/Link.html +275 -0
- data/doc/Contentful/Locale.html +161 -0
- data/doc/Contentful/NotFound.html +158 -0
- data/doc/Contentful/Request.html +669 -0
- data/doc/Contentful/Resource.html +606 -0
- data/doc/Contentful/Resource/AssetFields.html +413 -0
- data/doc/Contentful/Resource/AssetFields/ClassMethods.html +174 -0
- data/doc/Contentful/Resource/ClassMethods.html +271 -0
- data/doc/Contentful/Resource/Fields.html +398 -0
- data/doc/Contentful/Resource/Fields/ClassMethods.html +187 -0
- data/doc/Contentful/Resource/SystemProperties.html +444 -0
- data/doc/Contentful/Resource/SystemProperties/ClassMethods.html +174 -0
- data/doc/Contentful/ResourceBuilder.html +1400 -0
- data/doc/Contentful/Response.html +546 -0
- data/doc/Contentful/ServerError.html +158 -0
- data/doc/Contentful/Space.html +183 -0
- data/doc/Contentful/Support.html +198 -0
- data/doc/Contentful/Unauthorized.html +158 -0
- data/doc/Contentful/UnparsableJson.html +158 -0
- data/doc/Contentful/UnparsableResource.html +158 -0
- data/doc/_index.html +410 -0
- data/doc/class_list.html +54 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +338 -0
- data/doc/file.README.html +214 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +214 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +178 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +533 -0
- data/doc/top-level-namespace.html +112 -0
- data/examples/custom_classes.rb +43 -0
- data/examples/dynamic_entries.rb +126 -0
- data/examples/example_queries.rb +27 -0
- data/examples/raise_errors.rb +22 -0
- data/examples/raw_mode.rb +15 -0
- data/examples/resource_mapping.rb +33 -0
- data/lib/contentful.rb +3 -0
- data/lib/contentful/array.rb +47 -0
- data/lib/contentful/asset.rb +34 -0
- data/lib/contentful/client.rb +193 -0
- data/lib/contentful/content_type.rb +16 -0
- data/lib/contentful/dynamic_entry.rb +54 -0
- data/lib/contentful/entry.rb +12 -0
- data/lib/contentful/error.rb +52 -0
- data/lib/contentful/field.rb +16 -0
- data/lib/contentful/file.rb +13 -0
- data/lib/contentful/link.rb +20 -0
- data/lib/contentful/locale.rb +12 -0
- data/lib/contentful/location.rb +12 -0
- data/lib/contentful/request.rb +37 -0
- data/lib/contentful/resource.rb +146 -0
- data/lib/contentful/resource/asset_fields.rb +50 -0
- data/lib/contentful/resource/fields.rb +39 -0
- data/lib/contentful/resource/system_properties.rb +48 -0
- data/lib/contentful/resource_builder.rb +197 -0
- data/lib/contentful/response.rb +64 -0
- data/lib/contentful/space.rb +14 -0
- data/lib/contentful/support.rb +18 -0
- data/lib/contentful/version.rb +3 -0
- data/spec/array_spec.rb +69 -0
- data/spec/asset_spec.rb +62 -0
- data/spec/auto_includes_spec.rb +12 -0
- data/spec/client_class_spec.rb +59 -0
- data/spec/client_configuration_spec.rb +197 -0
- data/spec/coercions_spec.rb +10 -0
- data/spec/content_type_spec.rb +44 -0
- data/spec/dynamic_entry_spec.rb +34 -0
- data/spec/entry_spec.rb +53 -0
- data/spec/error_class_spec.rb +60 -0
- data/spec/error_requests_spec.rb +32 -0
- data/spec/field_spec.rb +36 -0
- data/spec/file_spec.rb +28 -0
- data/spec/fixtures/json_responses/content_type.json +83 -0
- data/spec/fixtures/json_responses/not_found.json +13 -0
- data/spec/fixtures/json_responses/nyancat.json +48 -0
- data/spec/fixtures/json_responses/unparsable.json +13 -0
- data/spec/fixtures/vcr_cassettes/array.yml +288 -0
- data/spec/fixtures/vcr_cassettes/array_page_1.yml +106 -0
- data/spec/fixtures/vcr_cassettes/array_page_2.yml +73 -0
- data/spec/fixtures/vcr_cassettes/asset.yml +96 -0
- data/spec/fixtures/vcr_cassettes/bad_request.yml +76 -0
- data/spec/fixtures/vcr_cassettes/content_type.yml +147 -0
- data/spec/fixtures/vcr_cassettes/entries.yml +561 -0
- data/spec/fixtures/vcr_cassettes/entry.yml +112 -0
- data/spec/fixtures/vcr_cassettes/entry_cache.yml +288 -0
- data/spec/fixtures/vcr_cassettes/field.yml +147 -0
- data/spec/fixtures/vcr_cassettes/locale.yml +81 -0
- data/spec/fixtures/vcr_cassettes/location.yml +305 -0
- data/spec/fixtures/vcr_cassettes/not_found.yml +71 -0
- data/spec/fixtures/vcr_cassettes/nyancat.yml +112 -0
- data/spec/fixtures/vcr_cassettes/nyancat_include.yml +112 -0
- data/spec/fixtures/vcr_cassettes/reloaded_entry.yml +112 -0
- data/spec/fixtures/vcr_cassettes/space.yml +81 -0
- data/spec/fixtures/vcr_cassettes/unauthorized.yml +64 -0
- data/spec/link_spec.rb +40 -0
- data/spec/locale_spec.rb +20 -0
- data/spec/location_spec.rb +30 -0
- data/spec/request_spec.rb +48 -0
- data/spec/resource_spec.rb +52 -0
- data/spec/response_spec.rb +50 -0
- data/spec/space_spec.rb +36 -0
- data/spec/spec_helper.rb +6 -0
- data/spec/support/client.rb +6 -0
- data/spec/support/json_responses.rb +11 -0
- data/spec/support/vcr.rb +16 -0
- metadata +374 -0
data/spec/link_spec.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Contentful::Link do
|
4
|
+
let(:entry){ vcr('entry'){ create_client.entry('nyancat') } }
|
5
|
+
let(:link){ entry.space }
|
6
|
+
let(:content_type_link){ entry.content_type }
|
7
|
+
|
8
|
+
describe 'SystemProperties' do
|
9
|
+
it 'has a #sys getter returning a hash with symbol keys' do
|
10
|
+
expect( link.sys ).to be_a Hash
|
11
|
+
expect( link.sys.keys.sample ).to be_a Symbol
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'has #id' do
|
15
|
+
expect( link.id ).to eq "cfexampleapi"
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'has #type' do
|
19
|
+
expect( link.type ).to eq "Link"
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'has #link_type' do
|
23
|
+
expect( link.link_type ).to eq "Space"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe '#resolve' do
|
28
|
+
it 'queries the api for the resource' do
|
29
|
+
vcr('space'){
|
30
|
+
expect( link.resolve ).to be_a Contentful::Space
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'queries the api for the resource (different link object)' do
|
35
|
+
vcr('content_type'){
|
36
|
+
expect( content_type_link.resolve ).to be_a Contentful::ContentType
|
37
|
+
}
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/spec/locale_spec.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Contentful::Locale do
|
4
|
+
let(:locale){ vcr('locale'){ create_client.space.locales.first } }
|
5
|
+
|
6
|
+
describe 'Properties' do
|
7
|
+
it 'has a #properties getter returning a hash with symbol keys' do
|
8
|
+
expect( locale.properties ).to be_a Hash
|
9
|
+
expect( locale.properties.keys.sample ).to be_a Symbol
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'has #code' do
|
13
|
+
expect( locale.code ).to eq "en-US"
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'has #name' do
|
17
|
+
expect( locale.name ).to eq "English"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Contentful::Location do
|
4
|
+
let(:location){
|
5
|
+
vcr('location'){
|
6
|
+
Contentful::Client.new(
|
7
|
+
space: 'lzjz8hygvfgu',
|
8
|
+
access_token: '0c6ef483524b5e46b3bafda1bf355f38f5f40b4830f7599f790a410860c7c271',
|
9
|
+
dynamic_entries: :auto,
|
10
|
+
).entry('3f6fq5ylFCi4kIYAQKsAYG').location
|
11
|
+
}
|
12
|
+
}
|
13
|
+
|
14
|
+
describe 'Properties' do
|
15
|
+
it 'has a #properties getter returning a hash with symbol keys' do
|
16
|
+
expect( location.properties ).to be_a Hash
|
17
|
+
expect( location.properties.keys.sample ).to be_a Symbol
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'has #lat' do
|
21
|
+
expect( location.lat ).to be_a Float
|
22
|
+
expect( location.lat.to_i ).to eq 36
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'has #lon' do
|
26
|
+
expect( location.lon ).to be_a Float
|
27
|
+
expect( location.lon.to_i ).to eq -94
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Contentful::Request do
|
4
|
+
describe '#get' do
|
5
|
+
it 'calls client' do
|
6
|
+
client = create_client
|
7
|
+
stub(client).get
|
8
|
+
request = Contentful::Request.new(client, '/content_types', nil, 'nyancat')
|
9
|
+
request.get
|
10
|
+
expect( client ).to have_received.get(request)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
context '[single resource]' do
|
15
|
+
let(:request){
|
16
|
+
Contentful::Request.new(create_client, '/content_types', nil, 'nyancat')
|
17
|
+
}
|
18
|
+
|
19
|
+
describe '#url' do
|
20
|
+
it 'contais endpoint' do
|
21
|
+
expect( request.url ).to include 'content_types'
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'contains id' do
|
25
|
+
expect( request.url ).to include 'nyancat'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context '[multi resource]' do
|
31
|
+
let(:request){
|
32
|
+
Contentful::Request.new(create_client, '/content_types', {"something" => 'requested'})
|
33
|
+
}
|
34
|
+
|
35
|
+
describe '#query' do
|
36
|
+
it 'contains query' do
|
37
|
+
expect( request.query ).not_to be_empty
|
38
|
+
expect( request.query[:something] ).to eq 'requested'
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
describe '#url' do
|
43
|
+
it 'contais endpoint' do
|
44
|
+
expect( request.url ).to include 'content_types'
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Contentful::Resource do
|
4
|
+
it 'must be included to get functionality' do
|
5
|
+
c = Class.new
|
6
|
+
c.send :include, Contentful::Resource
|
7
|
+
expect( c ).to respond_to :property_coercions
|
8
|
+
end
|
9
|
+
|
10
|
+
describe 'creation' do
|
11
|
+
it 'must be initialized with a (hash) object' do
|
12
|
+
expect{
|
13
|
+
Contentful::ContentType.new json_fixture('nyancat')
|
14
|
+
}.not_to raise_error
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'can deal with invalid objects' do
|
18
|
+
expect{
|
19
|
+
Contentful::ContentType.new({})
|
20
|
+
}.not_to raise_error
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe '#request' do
|
25
|
+
it 'will return a request object, if it has been initialized with one' do
|
26
|
+
request = Contentful::Request.new(nil, 'content_types')
|
27
|
+
resource = Contentful::ContentType.new({}, request)
|
28
|
+
expect( resource.request ).to eq request
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe '#reload' do
|
33
|
+
let(:client){ create_client }
|
34
|
+
let(:entry){ vcr('entry'){ client.entry 'nyancat' } }
|
35
|
+
|
36
|
+
it 'triggers the request connected to the resource (again)' do
|
37
|
+
stub(entry.request).get
|
38
|
+
entry.reload
|
39
|
+
expect( entry.request ).to have_received.get
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'the reloaded resource is different from the original one' do
|
43
|
+
reloaded_entry = vcr('reloaded_entry'){ entry.reload }
|
44
|
+
expect( reloaded_entry ).to be_a Contentful::Entry
|
45
|
+
expect( reloaded_entry ).not_to be entry
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'will return false if #request not available' do
|
49
|
+
expect( Contentful::ContentType.new({}).reload ).to be_false
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Contentful::Response do
|
4
|
+
let(:successful_response){ Contentful::Response.new raw_fixture('nyancat'), Contentful::Request.new(nil, '/entries', nil, 'nyancat') }
|
5
|
+
let(:error_response){ Contentful::Response.new raw_fixture('not_found') }
|
6
|
+
let(:unparsable_response){ Contentful::Response.new raw_fixture('unparsable') }
|
7
|
+
|
8
|
+
describe "#raw" do
|
9
|
+
it "returns the raw response it has been initalized with" do
|
10
|
+
expect( successful_response.raw ).to eq raw_fixture('nyancat')
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "#object" do
|
15
|
+
it "returns the repsonse's parsed json" do
|
16
|
+
expect( successful_response.object ).to eq json_fixture('nyancat')
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe "#request" do
|
21
|
+
it "returns the request the response has been initalized with" do
|
22
|
+
expect( successful_response.request ).to be_a Contentful::Request
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe "#status" do
|
27
|
+
it 'returns :ok for normal responses' do
|
28
|
+
expect( successful_response.status ).to eq :ok
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'returns :contentful_error for error responses' do
|
32
|
+
expect( error_response.status ).to eq :contentful_error
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'returns :unparsable_json for unparsable json responses' do
|
36
|
+
expect( unparsable_response.status ).to eq :unparsable_json
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe "#error_message" do
|
41
|
+
it 'returns contentful error message for contentful errors' do
|
42
|
+
expect( error_response.error_message ).to eq "The resource could not be found."
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'returns json parser error message for json parse errors' do
|
46
|
+
expect( unparsable_response.error_message ).to include "unexpected token"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
data/spec/space_spec.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Contentful::Space do
|
4
|
+
let(:space){ vcr('space'){ create_client.space } }
|
5
|
+
|
6
|
+
describe 'SystemProperties' do
|
7
|
+
it 'has a #sys getter returning a hash with symbol keys' do
|
8
|
+
expect( space.sys ).to be_a Hash
|
9
|
+
expect( space.sys.keys.sample ).to be_a Symbol
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'has #id' do
|
13
|
+
expect( space.id ).to eq "cfexampleapi"
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'has #type' do
|
17
|
+
expect( space.type ).to eq "Space"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe 'Properties' do
|
22
|
+
it 'has a #properties getter returning a hash with symbol keys' do
|
23
|
+
expect( space.properties ).to be_a Hash
|
24
|
+
expect( space.properties.keys.sample ).to be_a Symbol
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'has #name' do
|
28
|
+
expect( space.name ).to eq "Contentful Example API"
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'has #locales' do
|
32
|
+
expect( space.locales ).to be_a Array
|
33
|
+
expect( space.locales.first ).to be_a Contentful::Locale
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'multi_json'
|
2
|
+
|
3
|
+
def raw_fixture(which, as_json = false)
|
4
|
+
File.read File.dirname(__FILE__) + "/../fixtures/json_responses/#{which}.json"
|
5
|
+
end
|
6
|
+
|
7
|
+
def json_fixture(which, as_json = false)
|
8
|
+
MultiJson.load(
|
9
|
+
File.read File.dirname(__FILE__) + "/../fixtures/json_responses/#{which}.json"
|
10
|
+
)
|
11
|
+
end
|
data/spec/support/vcr.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'vcr'
|
2
|
+
|
3
|
+
VCR.configure do |c|
|
4
|
+
c.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
|
5
|
+
c.ignore_localhost = true
|
6
|
+
c.hook_into :webmock
|
7
|
+
c.default_cassette_options = { :record => :once }
|
8
|
+
end
|
9
|
+
|
10
|
+
def vcr(name, &block)
|
11
|
+
VCR.use_cassette(name, &block)
|
12
|
+
end
|
13
|
+
|
14
|
+
def expect_vcr(name, &block)
|
15
|
+
expect{ VCR.use_cassette(name, &block) }
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,374 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: contentful
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Contentful GmbH (Jan Lelis)
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-03-14 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: http
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: multi_json
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '1'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '1'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: bundler
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '1.5'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.5'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rake
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '10'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '10'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: rubygems-tasks
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ~>
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0.2'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0.2'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: rspec
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ~>
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '2'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '2'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: rr
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: vcr
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: webmock
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ~>
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '1'
|
150
|
+
- - ! '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 1.17.3
|
153
|
+
type: :development
|
154
|
+
prerelease: false
|
155
|
+
version_requirements: !ruby/object:Gem::Requirement
|
156
|
+
none: false
|
157
|
+
requirements:
|
158
|
+
- - ~>
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '1'
|
161
|
+
- - ! '>='
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: 1.17.3
|
164
|
+
description: Ruby client for the https://www.contentful.com Content Delivery API
|
165
|
+
email: rubygems@contentful.com
|
166
|
+
executables: []
|
167
|
+
extensions: []
|
168
|
+
extra_rdoc_files: []
|
169
|
+
files:
|
170
|
+
- .gitignore
|
171
|
+
- .travis.yml
|
172
|
+
- .rspec
|
173
|
+
- .README.md.swp
|
174
|
+
- doc/js/full_list.js
|
175
|
+
- doc/js/app.js
|
176
|
+
- doc/js/jquery.js
|
177
|
+
- doc/css/style.css
|
178
|
+
- doc/css/full_list.css
|
179
|
+
- doc/css/common.css
|
180
|
+
- doc/Contentful.html
|
181
|
+
- doc/file_list.html
|
182
|
+
- doc/Contentful/Field.html
|
183
|
+
- doc/Contentful/Locale.html
|
184
|
+
- doc/Contentful/ResourceBuilder.html
|
185
|
+
- doc/Contentful/Asset.html
|
186
|
+
- doc/Contentful/NotFound.html
|
187
|
+
- doc/Contentful/Unauthorized.html
|
188
|
+
- doc/Contentful/Request.html
|
189
|
+
- doc/Contentful/Link.html
|
190
|
+
- doc/Contentful/Response.html
|
191
|
+
- doc/Contentful/Error.html
|
192
|
+
- doc/Contentful/Array.html
|
193
|
+
- doc/Contentful/ContentType.html
|
194
|
+
- doc/Contentful/File.html
|
195
|
+
- doc/Contentful/UnparsableResource.html
|
196
|
+
- doc/Contentful/ServerError.html
|
197
|
+
- doc/Contentful/AccessDenied.html
|
198
|
+
- doc/Contentful/Space.html
|
199
|
+
- doc/Contentful/Resource.html
|
200
|
+
- doc/Contentful/DynamicEntry.html
|
201
|
+
- doc/Contentful/Support.html
|
202
|
+
- doc/Contentful/Entry.html
|
203
|
+
- doc/Contentful/UnparsableJson.html
|
204
|
+
- doc/Contentful/BadRequest.html
|
205
|
+
- doc/Contentful/Resource/SystemProperties.html
|
206
|
+
- doc/Contentful/Resource/Fields/ClassMethods.html
|
207
|
+
- doc/Contentful/Resource/SystemProperties/ClassMethods.html
|
208
|
+
- doc/Contentful/Resource/ClassMethods.html
|
209
|
+
- doc/Contentful/Resource/AssetFields/ClassMethods.html
|
210
|
+
- doc/Contentful/Resource/AssetFields.html
|
211
|
+
- doc/Contentful/Resource/Fields.html
|
212
|
+
- doc/Contentful/Client.html
|
213
|
+
- doc/index.html
|
214
|
+
- doc/class_list.html
|
215
|
+
- doc/top-level-namespace.html
|
216
|
+
- doc/_index.html
|
217
|
+
- doc/file.README.html
|
218
|
+
- doc/method_list.html
|
219
|
+
- doc/frames.html
|
220
|
+
- lib/contentful/dynamic_entry.rb
|
221
|
+
- lib/contentful/response.rb
|
222
|
+
- lib/contentful/space.rb
|
223
|
+
- lib/contentful/resource/fields.rb
|
224
|
+
- lib/contentful/resource/system_properties.rb
|
225
|
+
- lib/contentful/resource/asset_fields.rb
|
226
|
+
- lib/contentful/error.rb
|
227
|
+
- lib/contentful/link.rb
|
228
|
+
- lib/contentful/field.rb
|
229
|
+
- lib/contentful/resource.rb
|
230
|
+
- lib/contentful/resource_builder.rb
|
231
|
+
- lib/contentful/file.rb
|
232
|
+
- lib/contentful/content_type.rb
|
233
|
+
- lib/contentful/request.rb
|
234
|
+
- lib/contentful/entry.rb
|
235
|
+
- lib/contentful/locale.rb
|
236
|
+
- lib/contentful/location.rb
|
237
|
+
- lib/contentful/client.rb
|
238
|
+
- lib/contentful/array.rb
|
239
|
+
- lib/contentful/support.rb
|
240
|
+
- lib/contentful/asset.rb
|
241
|
+
- lib/contentful/version.rb
|
242
|
+
- lib/contentful.rb
|
243
|
+
- spec/request_spec.rb
|
244
|
+
- spec/space_spec.rb
|
245
|
+
- spec/entry_spec.rb
|
246
|
+
- spec/error_class_spec.rb
|
247
|
+
- spec/spec_helper.rb
|
248
|
+
- spec/array_spec.rb
|
249
|
+
- spec/asset_spec.rb
|
250
|
+
- spec/coercions_spec.rb
|
251
|
+
- spec/link_spec.rb
|
252
|
+
- spec/field_spec.rb
|
253
|
+
- spec/resource_spec.rb
|
254
|
+
- spec/location_spec.rb
|
255
|
+
- spec/dynamic_entry_spec.rb
|
256
|
+
- spec/locale_spec.rb
|
257
|
+
- spec/support/json_responses.rb
|
258
|
+
- spec/support/vcr.rb
|
259
|
+
- spec/support/client.rb
|
260
|
+
- spec/auto_includes_spec.rb
|
261
|
+
- spec/fixtures/vcr_cassettes/array_page_1.yml
|
262
|
+
- spec/fixtures/vcr_cassettes/array_page_2.yml
|
263
|
+
- spec/fixtures/vcr_cassettes/field.yml
|
264
|
+
- spec/fixtures/vcr_cassettes/space.yml
|
265
|
+
- spec/fixtures/vcr_cassettes/content_type.yml
|
266
|
+
- spec/fixtures/vcr_cassettes/asset.yml
|
267
|
+
- spec/fixtures/vcr_cassettes/unauthorized.yml
|
268
|
+
- spec/fixtures/vcr_cassettes/locale.yml
|
269
|
+
- spec/fixtures/vcr_cassettes/array.yml
|
270
|
+
- spec/fixtures/vcr_cassettes/location.yml
|
271
|
+
- spec/fixtures/vcr_cassettes/entries.yml
|
272
|
+
- spec/fixtures/vcr_cassettes/not_found.yml
|
273
|
+
- spec/fixtures/vcr_cassettes/bad_request.yml
|
274
|
+
- spec/fixtures/vcr_cassettes/nyancat.yml
|
275
|
+
- spec/fixtures/vcr_cassettes/entry.yml
|
276
|
+
- spec/fixtures/vcr_cassettes/entry_cache.yml
|
277
|
+
- spec/fixtures/vcr_cassettes/reloaded_entry.yml
|
278
|
+
- spec/fixtures/vcr_cassettes/nyancat_include.yml
|
279
|
+
- spec/fixtures/json_responses/unparsable.json
|
280
|
+
- spec/fixtures/json_responses/not_found.json
|
281
|
+
- spec/fixtures/json_responses/nyancat.json
|
282
|
+
- spec/fixtures/json_responses/content_type.json
|
283
|
+
- spec/client_configuration_spec.rb
|
284
|
+
- spec/content_type_spec.rb
|
285
|
+
- spec/response_spec.rb
|
286
|
+
- spec/client_class_spec.rb
|
287
|
+
- spec/file_spec.rb
|
288
|
+
- spec/error_requests_spec.rb
|
289
|
+
- README.md
|
290
|
+
- Rakefile
|
291
|
+
- contentful.gemspec
|
292
|
+
- do_request.sh
|
293
|
+
- LICENSE.txt
|
294
|
+
- examples/dynamic_entries.rb
|
295
|
+
- examples/resource_mapping.rb
|
296
|
+
- examples/raise_errors.rb
|
297
|
+
- examples/example_queries.rb
|
298
|
+
- examples/raw_mode.rb
|
299
|
+
- examples/custom_classes.rb
|
300
|
+
- Gemfile
|
301
|
+
- ChangeLog.md
|
302
|
+
homepage: https://github.com/contentful/contentful.rb
|
303
|
+
licenses:
|
304
|
+
- MIT
|
305
|
+
post_install_message:
|
306
|
+
rdoc_options: []
|
307
|
+
require_paths:
|
308
|
+
- lib
|
309
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
310
|
+
none: false
|
311
|
+
requirements:
|
312
|
+
- - ! '>='
|
313
|
+
- !ruby/object:Gem::Version
|
314
|
+
version: '0'
|
315
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
316
|
+
none: false
|
317
|
+
requirements:
|
318
|
+
- - ! '>='
|
319
|
+
- !ruby/object:Gem::Version
|
320
|
+
version: '0'
|
321
|
+
requirements: []
|
322
|
+
rubyforge_project:
|
323
|
+
rubygems_version: 1.8.24
|
324
|
+
signing_key:
|
325
|
+
specification_version: 3
|
326
|
+
summary: contentful
|
327
|
+
test_files:
|
328
|
+
- spec/request_spec.rb
|
329
|
+
- spec/space_spec.rb
|
330
|
+
- spec/entry_spec.rb
|
331
|
+
- spec/error_class_spec.rb
|
332
|
+
- spec/spec_helper.rb
|
333
|
+
- spec/array_spec.rb
|
334
|
+
- spec/asset_spec.rb
|
335
|
+
- spec/coercions_spec.rb
|
336
|
+
- spec/link_spec.rb
|
337
|
+
- spec/field_spec.rb
|
338
|
+
- spec/resource_spec.rb
|
339
|
+
- spec/location_spec.rb
|
340
|
+
- spec/dynamic_entry_spec.rb
|
341
|
+
- spec/locale_spec.rb
|
342
|
+
- spec/support/json_responses.rb
|
343
|
+
- spec/support/vcr.rb
|
344
|
+
- spec/support/client.rb
|
345
|
+
- spec/auto_includes_spec.rb
|
346
|
+
- spec/fixtures/vcr_cassettes/array_page_1.yml
|
347
|
+
- spec/fixtures/vcr_cassettes/array_page_2.yml
|
348
|
+
- spec/fixtures/vcr_cassettes/field.yml
|
349
|
+
- spec/fixtures/vcr_cassettes/space.yml
|
350
|
+
- spec/fixtures/vcr_cassettes/content_type.yml
|
351
|
+
- spec/fixtures/vcr_cassettes/asset.yml
|
352
|
+
- spec/fixtures/vcr_cassettes/unauthorized.yml
|
353
|
+
- spec/fixtures/vcr_cassettes/locale.yml
|
354
|
+
- spec/fixtures/vcr_cassettes/array.yml
|
355
|
+
- spec/fixtures/vcr_cassettes/location.yml
|
356
|
+
- spec/fixtures/vcr_cassettes/entries.yml
|
357
|
+
- spec/fixtures/vcr_cassettes/not_found.yml
|
358
|
+
- spec/fixtures/vcr_cassettes/bad_request.yml
|
359
|
+
- spec/fixtures/vcr_cassettes/nyancat.yml
|
360
|
+
- spec/fixtures/vcr_cassettes/entry.yml
|
361
|
+
- spec/fixtures/vcr_cassettes/entry_cache.yml
|
362
|
+
- spec/fixtures/vcr_cassettes/reloaded_entry.yml
|
363
|
+
- spec/fixtures/vcr_cassettes/nyancat_include.yml
|
364
|
+
- spec/fixtures/json_responses/unparsable.json
|
365
|
+
- spec/fixtures/json_responses/not_found.json
|
366
|
+
- spec/fixtures/json_responses/nyancat.json
|
367
|
+
- spec/fixtures/json_responses/content_type.json
|
368
|
+
- spec/client_configuration_spec.rb
|
369
|
+
- spec/content_type_spec.rb
|
370
|
+
- spec/response_spec.rb
|
371
|
+
- spec/client_class_spec.rb
|
372
|
+
- spec/file_spec.rb
|
373
|
+
- spec/error_requests_spec.rb
|
374
|
+
has_rdoc:
|