contentful_middleman 3.0.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +10 -3
  3. data/CHANGELOG.md +8 -5
  4. data/DEPLOYING.md +0 -18
  5. data/Gemfile +2 -1
  6. data/README.md +2 -3
  7. data/contentful_middleman.gemspec +2 -1
  8. data/examples/mappers/backref.rb +1 -1
  9. data/lib/contentful_middleman/commands/contentful.rb +24 -22
  10. data/lib/contentful_middleman/core.rb +8 -0
  11. data/lib/contentful_middleman/import_task.rb +3 -10
  12. data/lib/contentful_middleman/instance.rb +1 -1
  13. data/lib/contentful_middleman/mappers/base.rb +5 -12
  14. data/lib/contentful_middleman/version.rb +1 -1
  15. data/lib/contentful_middleman/version_hash.rb +2 -3
  16. data/spec/contentful_middleman/core_spec.rb +3 -3
  17. data/spec/contentful_middleman/import_task_spec.rb +2 -3
  18. data/spec/contentful_middleman/instance_spec.rb +1 -1
  19. data/spec/contentful_middleman/mappers/base_spec.rb +0 -31
  20. data/spec/fixtures/backup_fixtures/.tmp/backups/.gitkeep +0 -0
  21. data/spec/fixtures/vcr_fixtures/client.yml +1 -1
  22. data/spec/fixtures/vcr_fixtures/entries/localized_references.yml +2 -2
  23. data/spec/fixtures/vcr_fixtures/entries/localized_references_localized_assets.yml +2 -2
  24. data/spec/fixtures/vcr_fixtures/entries/locations.yml +2 -2
  25. data/spec/fixtures/vcr_fixtures/entries/nil_file.yml +2 -2
  26. data/spec/fixtures/vcr_fixtures/entries/repeated_entry.yml +2 -2
  27. data/spec/fixtures/vcr_fixtures/helpers/preview.yml +2 -2
  28. data/spec/fixtures/vcr_fixtures/instance/entries_1.yml +1 -1
  29. data/spec/fixtures/vcr_fixtures/instance/entries_2.yml +3 -3
  30. data/spec/fixtures/vcr_fixtures/instance/entries_3.yml +3 -3
  31. data/spec/fixtures/vcr_fixtures/instance/include_resolution_1.yml +2 -2
  32. data/spec/fixtures/vcr_fixtures/mappers/entries.yml +2 -2
  33. data/spec/fixtures/vcr_fixtures/mappers/entries_localized.yml +2 -2
  34. data/spec/fixtures/vcr_fixtures/tools/preview_helper/asset.yml +1 -1
  35. data/spec/fixtures/vcr_fixtures/tools/preview_helper/asset_2.yml +1 -1
  36. data/spec/fixtures/vcr_fixtures/tools/preview_helper/assets.yml +1 -1
  37. data/spec/fixtures/vcr_fixtures/tools/preview_helper/assets_2.yml +1 -1
  38. data/spec/fixtures/vcr_fixtures/tools/preview_helper/entries.yml +1 -1
  39. data/spec/fixtures/vcr_fixtures/tools/preview_helper/entries_2.yml +1 -1
  40. data/spec/fixtures/vcr_fixtures/tools/preview_helper/entry.yml +1 -1
  41. data/spec/fixtures/vcr_fixtures/tools/preview_helper/entry_2.yml +1 -1
  42. data/spec/fixtures/vcr_fixtures/tools/preview_helper.yml +1 -1
  43. data/spec/spec_helper.rb +7 -10
  44. metadata +19 -7
  45. data/spec/fixtures/vcr_fixtures/entries/map_with_camel_case.yml +0 -244
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: e9ffdf90b11369b5a8889218f9b961c1fb32273b2acf2eae06785e944a27a539
4
- data.tar.gz: 47679bc6168d7cfd968a1e226fc01ce25ea4e4e44bcd9ef2a5e128c873bb00c6
2
+ SHA1:
3
+ metadata.gz: e51a2eac628788ddb604e97937212f087b37e0ab
4
+ data.tar.gz: 45ee41c807a5d790d4e5a997db1f7004fa1f4adf
5
5
  SHA512:
6
- metadata.gz: 275ea6a5292da0585fe3ae0f9cf3b7c23ebf3dcd05eb23966a5b0fedc9078508ea6586f90a7b41d704b69b90aa603c6a6cb10631ddeb818ed3f7d3b0a5ccaf54
7
- data.tar.gz: 659f627c6a8b70cce3b29f27ee90c0dc840f34a67834c3c89d888b816646d613548e75536f302f4f71ff95002ae9a606a9c97e59805103ec605a0bb53d5cb284
6
+ metadata.gz: d9db96ccef66c5c8d299aea7fbd3e34b5ebea4b4e70e903ca87a2388bd7e73527885068a3c28ea9b1578c8828543065ac3be50a5a4af28cfb304455166119e84
7
+ data.tar.gz: c8e1c9569519691d2c5c0d55ca9f647da672545c658b4785abdd7528343efa9bf3e9d21e70920b4e42be84d6e73f5584865e29a80402730618e770ca79ce5ee7
data/.travis.yml CHANGED
@@ -1,12 +1,19 @@
1
1
  rvm:
2
- - 2.2.3
3
- - 2.3.1
4
- - 2.4.1
2
+ - 2.2.2
3
+ - 2.2.6
4
+ - 2.3.3
5
+ - 2.4.0
6
+ - jruby
5
7
 
6
8
  script: "bundle exec rake test"
7
9
 
8
10
  before_install: gem install bundler -v 1.10.6
9
11
 
12
+ env: TEST=true JRUBY_OPTS='--2.0'
10
13
  notifications:
11
14
  slack:
12
15
  secure: MMWxqKMT4m2UhZ+Ix4wgCs1nLvu9hUFCbyV/qJWmIFif7V4GUKXi6h9krMqGqBAd3YV3pP/InPlw3QoKBUGIAIr5GzDpSnU5ACv7E61v548qViEvPBqsfhRHha2M164rUHn32tpejJnIizVUyND/hIzNviIrab+G8uOaZXUtB5I=
16
+
17
+ matrix:
18
+ allow_failures:
19
+ - rvm: jruby
data/CHANGELOG.md CHANGED
@@ -1,9 +1,12 @@
1
1
  # Change Log
2
2
  ## Unreleased
3
3
 
4
- ## 3.0.1
5
- ### Fixed
6
- * Allow usage of `use_camel_case` in client options.
4
+ ## 4.0.0
5
+
6
+ ### Changed
7
+ * Middleman v4 is now the supported Middleman version.
8
+
9
+ This release symbolises the break in compatibility from Middleman v3 - moving the main development branch to Middleman v4.
7
10
 
8
11
  ## 3.0.0
9
12
 
@@ -34,11 +37,11 @@ will stay compatible with.
34
37
 
35
38
  ## 2.0.0
36
39
 
37
- ## Changed
40
+ ### Changed
38
41
  * Upgraded to 2.0.1 Ruby CDA SDK which solves a number of pre-existing bugs [#116](https://github.com/contentful/contentful_middleman/issues/116) [#113](https://github.com/contentful/contentful_middleman/issues/113) [#103](https://github.com/contentful/contentful_middleman/issues/103)
39
42
  * Field IDs will now be `snake_cased` following the 2.0.1 Ruby CDA SDK Upgrade
40
43
 
41
- ## Added
44
+ ### Added
42
45
  * Added `_meta` to all entries and assets [#117](https://github.com/contentful/contentful_middleman/issues/117) [#93](https://github.com/contentful/contentful_middleman/issues/93)
43
46
  * Added `client_options` to extension options to control Client instantiation
44
47
 
data/DEPLOYING.md CHANGED
@@ -21,24 +21,6 @@
21
21
 
22
22
  ---
23
23
 
24
- # Netlify
25
-
26
- ## Requirements for Build
27
-
28
- > Minimum requirements for a clean build of a Contentful Middleman app on Netlify
29
-
30
- Steps to solve:
31
-
32
- 1. add `.*-space-hash` to .gitignore
33
- 2. add `/data` to .gitignore
34
- 3. add a .ruby-version file
35
- 4. add a .nvmrc file
36
- 5. Netlify Site > Settings > Deploy Settings > Build Command: `middleman contentful --rebuild && middleman build`
37
-
38
- > Contributed by @joshRpowell
39
-
40
- ---
41
-
42
24
  # Placeholder Platform
43
25
 
44
26
  ## Placeholder Caveat
data/Gemfile CHANGED
@@ -2,7 +2,8 @@
2
2
  # the following line to use "https"
3
3
  source 'http://rubygems.org'
4
4
 
5
- gem "middleman-core", '~> 3.4'
5
+ gem "middleman-core", '~> 4.0'
6
+ gem "middleman-cli", '~> 4.0'
6
7
 
7
8
  # Specify your gem's dependencies in contentful_middleman.gemspec
8
9
  gemspec
data/README.md CHANGED
@@ -6,10 +6,9 @@ Contentful Middleman is a [Middleman](http://middlemanapp.com/) extension to use
6
6
 
7
7
  Experience the power of Middleman while staying sane as a developer by letting end-users edit content in a web-based interface.
8
8
 
9
- > The main release works for Middleman v3 - The most used version
9
+ > The main release works for Middleman v4 starting on version `4.0.0`.
10
10
  >
11
- > If you are using Middleman v4, consider trying out our [experimental branch](https://github.com/contentful/contentful_middleman/tree/dl/upgrade-to-v4).
12
- > Feel free to communicate with us if you are experiencing any bugs.
11
+ > If you are using Middleman v3, use older releases. Latest stable release is `3.0.0`
13
12
 
14
13
 
15
14
  ## Installation
@@ -19,7 +19,8 @@ Gem::Specification.new do |s|
19
19
  s.require_paths = ["lib"]
20
20
 
21
21
  # The version of middleman-core your extension depends on
22
- s.add_dependency("middleman-core", ["~> 3.4"])
22
+ s.add_dependency("middleman-core", ["~> 4.0"])
23
+ s.add_dependency("middleman-cli", ["~> 4.0"])
23
24
 
24
25
  # Additional dependencies
25
26
  s.add_dependency("contentful", '~> 2.1')
@@ -48,7 +48,7 @@ def self.BackrefMapper(content_type_id, content_type_field, backref_field)
48
48
 
49
49
  def map(context, entry)
50
50
  super
51
- content_type_entries = @entries.select { |e| e.sys[:content_type].id == @@content_type_id }
51
+ content_type_entries = @entries.select { |e| e.sys[:contentType].id == @@content_type_id }
52
52
  referencing_entries = content_type_entries.select{ |e| e.send(@@content_type_field).map{|x| x.id}.include? entry.id }
53
53
  referencing_ids = referencing_entries.map{ |e| e.id }
54
54
  context.set(@@backref_field, map_value(referencing_ids))
@@ -1,4 +1,4 @@
1
- require 'middleman-core/cli'
1
+ require 'middleman-cli'
2
2
  require 'date'
3
3
  require 'digest'
4
4
  require 'contentful_middleman/commands/context'
@@ -12,7 +12,7 @@ module Middleman
12
12
  module Cli
13
13
  # This class provides an "contentful" command for the middleman CLI.
14
14
 
15
- class Contentful < Thor
15
+ class Contentful < Thor::Group
16
16
  include Thor::Actions
17
17
 
18
18
  # Path where Middleman expects the local data to be stored
@@ -20,10 +20,7 @@ module Middleman
20
20
 
21
21
  check_unknown_options!
22
22
 
23
- namespace :contentful
24
- desc 'contentful', 'Import data from Contentful'
25
-
26
- method_option "rebuild",
23
+ class_option "rebuild",
27
24
  aliases: "-r",
28
25
  desc: "Rebuilds the site if there were changes in the imported data"
29
26
 
@@ -37,7 +34,7 @@ module Middleman
37
34
  end
38
35
 
39
36
  def contentful
40
- if shared_instance.respond_to? :contentful_instances
37
+ if contentful_instances.size > 0
41
38
  ContentfulMiddleman::VersionHash.source_root = self.class.source_root
42
39
  ContentfulMiddleman::LocalData::Store.base_path = MIDDLEMAN_LOCAL_DATA_FOLDER
43
40
  ContentfulMiddleman::LocalData::File.thor = self
@@ -50,31 +47,36 @@ module Middleman
50
47
  end
51
48
 
52
49
  Middleman::Cli::Build.new.build if hash_local_data_changed && options[:rebuild]
53
- shared_instance.logger.info 'Contentful Import: Done!'
50
+ logger.info 'Contentful Import: Done!'
54
51
  else
55
52
  raise Thor::Error.new "You need to activate the contentful extension in config.rb before you can import data from Contentful"
56
53
  end
57
54
  end
58
55
 
59
56
  private
60
- def contentful_instances
61
- shared_instance.contentful_instances
62
- end
57
+ def logger
58
+ ::Middleman::Logger.singleton
59
+ end
63
60
 
64
- def create_import_task(instance)
65
- space_name = instance.space_name.to_s
66
- content_type_names = instance.content_types_ids_to_names
67
- content_type_mappers = instance.content_types_ids_to_mappers
61
+ def contentful_instances
62
+ app.contentful_instances
63
+ end
68
64
 
69
- ContentfulMiddleman::ImportTask.new(space_name, content_type_names, content_type_mappers, instance)
65
+ def app
66
+ @app ||= ::Middleman::Application.new do
67
+ config[:mode] = :contentful
70
68
  end
69
+ end
71
70
 
72
- def shared_instance
73
- @shared_instance ||= ::Middleman::Application.server.inst do
74
- set :environment, :contentful
75
- end
76
- end
77
- end
71
+ def create_import_task(instance)
72
+ space_name = instance.space_name.to_s
73
+ content_type_names = instance.content_types_ids_to_names
74
+ content_type_mappers = instance.content_types_ids_to_mappers
78
75
 
76
+ ContentfulMiddleman::ImportTask.new(space_name, content_type_names, content_type_mappers, instance)
77
+ end
78
+
79
+ Base.register(self, 'contentful', 'contentful [--rebuild]', 'Import Contentful data to your Data folder')
80
+ end
79
81
  end
80
82
  end
@@ -54,6 +54,14 @@ module ContentfulMiddleman
54
54
 
55
55
 
56
56
  helpers ContentfulMiddleman::Helpers
57
+ include ContentfulMiddleman::Helpers
58
+
59
+ expose_to_application contentful_instances: :contentful_instances
60
+
61
+ expose_to_template localize_entry: :localize_entry
62
+ expose_to_template localize: :localize
63
+ expose_to_template localize_array: :localize_array
64
+ expose_to_template localize_value: :localize_value
57
65
 
58
66
  attr_reader :middleman_app
59
67
  def initialize(app, options_hash = {}, &block)
@@ -6,7 +6,6 @@ module ContentfulMiddleman
6
6
  @content_type_mappers = content_type_mappers
7
7
  @changed_local_data = false
8
8
  @contentful = contentful
9
- @use_camel_case = @contentful.options.client_options.fetch(:use_camel_case, false)
10
9
  end
11
10
 
12
11
  def run
@@ -14,7 +13,7 @@ module ContentfulMiddleman
14
13
 
15
14
  LocalData::Store.new(local_data_files, @space_name).write
16
15
 
17
- new_version_hash = ContentfulMiddleman::VersionHash.write_for_space_with_entries(@space_name, entries, @use_camel_case)
16
+ new_version_hash = ContentfulMiddleman::VersionHash.write_for_space_with_entries(@space_name, entries)
18
17
 
19
18
  @changed_local_data = new_version_hash != old_version_hash
20
19
  end
@@ -34,18 +33,12 @@ module ContentfulMiddleman
34
33
 
35
34
  private
36
35
  def local_data_files
37
- content_type_key = if @use_camel_case
38
- :contentType
39
- else
40
- :content_type
41
- end
42
-
43
36
  entries.map do |entry|
44
- content_type_mapper_class = @content_type_mappers.fetch(entry.sys[content_type_key].id, nil)
37
+ content_type_mapper_class = @content_type_mappers.fetch(entry.sys[:content_type].id, nil)
45
38
 
46
39
  next unless content_type_mapper_class
47
40
 
48
- content_type_name = @content_type_names.fetch(entry.sys[content_type_key].id).to_s
41
+ content_type_name = @content_type_names.fetch(entry.sys[:content_type].id).to_s
49
42
  context = ContentfulMiddleman::Context.new
50
43
 
51
44
  content_type_mapper = content_type_mapper_class.new(entries, @contentful.options)
@@ -67,7 +67,7 @@ module ContentfulMiddleman
67
67
  dynamic_entries: :auto,
68
68
  raise_errors: true,
69
69
  default_locale: options.default_locale,
70
- integration_name: 'middleman',
70
+ integration_name: 'middleman.v4',
71
71
  integration_version: ContentfulMiddleman::VERSION
72
72
  }.merge(options.client_options)
73
73
 
@@ -9,9 +9,6 @@ module ContentfulMiddleman
9
9
  @entries = entries
10
10
  @options = options
11
11
  @children = {}
12
- @created_at_key = using_camel_case? ? :createdAt : :created_at
13
- @updated_at_key = using_camel_case? ? :updatedAt : :updated_at
14
- @content_type_key = using_camel_case? ? :contentType : :content_type
15
12
  end
16
13
 
17
14
  def map(context, entry)
@@ -28,10 +25,6 @@ module ContentfulMiddleman
28
25
 
29
26
  private
30
27
 
31
- def using_camel_case?
32
- @options.client_options.fetch(:use_camel_case, false)
33
- end
34
-
35
28
  def has_multiple_locales?
36
29
  @options.cda_query.fetch(:locale, nil) == '*'
37
30
  end
@@ -68,8 +61,8 @@ module ContentfulMiddleman
68
61
 
69
62
  def map_asset_metadata(asset)
70
63
  context = Context.new
71
- context.updated_at = asset.sys[@updated_at_key].iso8601 unless asset.sys[@updated_at_key].nil?
72
- context.created_at = asset.sys[@created_at_key].iso8601 unless asset.sys[@created_at_key].nil?
64
+ context.updated_at = asset.sys[:updated_at].iso8601 unless asset.sys[:updated_at].nil?
65
+ context.created_at = asset.sys[:created_at].iso8601 unless asset.sys[:created_at].nil?
73
66
  context.id = asset.sys[:id]
74
67
 
75
68
  context
@@ -94,9 +87,9 @@ module ContentfulMiddleman
94
87
 
95
88
  def map_entry_metadata(entry)
96
89
  context = Context.new
97
- context.content_type_id = entry.sys[@content_type_key].id unless entry.sys[@content_type_key].nil?
98
- context.updated_at = entry.sys[@updated_at_key].iso8601 unless entry.sys[@updated_at_key].nil?
99
- context.created_at = entry.sys[@created_at_key].iso8601 unless entry.sys[@created_at_key].nil?
90
+ context.content_type_id = entry.sys[:content_type].id unless entry.sys[:content_type].nil?
91
+ context.updated_at = entry.sys[:updated_at].iso8601 unless entry.sys[:updated_at].nil?
92
+ context.created_at = entry.sys[:created_at].iso8601 unless entry.sys[:created_at].nil?
100
93
  context.id = entry.sys[:id]
101
94
 
102
95
  context
@@ -1,3 +1,3 @@
1
1
  module ContentfulMiddleman
2
- VERSION = "3.0.1"
2
+ VERSION = "4.0.0"
3
3
  end
@@ -10,10 +10,9 @@ module ContentfulMiddleman
10
10
  ::File.read(hashfilename_for_space) if File.exist? hashfilename_for_space
11
11
  end
12
12
 
13
- def write_for_space_with_entries(space_name, entries, use_camel_case = false)
14
- updated_at_key = use_camel_case ? :updatedAt : :updated_at
13
+ def write_for_space_with_entries(space_name, entries)
15
14
  sorted_entries = entries.sort {|a, b| a.id <=> b.id}
16
- ids_and_revisions_string = sorted_entries.map {|e| "#{e.id}#{e.public_send(updated_at_key)}"}.join
15
+ ids_and_revisions_string = sorted_entries.map {|e| "#{e.id}#{e.updated_at}"}.join
17
16
  entries_hash = Digest::SHA1.hexdigest( ids_and_revisions_string )
18
17
 
19
18
  File.open(hashfilename(space_name), 'w') { |file| file.write(entries_hash) }
@@ -4,7 +4,7 @@ class MapperDouble
4
4
  end
5
5
 
6
6
  describe ContentfulMiddleman::Core do
7
- subject { described_class.new Middleman::Application }
7
+ subject { described_class.new Middleman::Application.new }
8
8
  let(:options) { subject.options }
9
9
 
10
10
  before(:each) do
@@ -74,7 +74,7 @@ describe ContentfulMiddleman::Core do
74
74
  it 'does not get called if rebuild_on_webhook is false' do
75
75
  expect(ContentfulMiddleman::WebhookHandler).not_to receive(:start)
76
76
 
77
- subject.middleman_app.run_hook(:before_server)
77
+ subject.app.execute_callbacks(:before_server)
78
78
  end
79
79
 
80
80
  it 'gets called if rebuild_on_webhook is true' do
@@ -82,7 +82,7 @@ describe ContentfulMiddleman::Core do
82
82
 
83
83
  expect(ContentfulMiddleman::WebhookHandler).to receive(:start)
84
84
 
85
- subject.middleman_app.run_hook(:before_server)
85
+ subject.app.execute_callbacks(:before_server)
86
86
  end
87
87
  end
88
88
  end
@@ -4,10 +4,9 @@ class ClientDouble
4
4
  def entries
5
5
  []
6
6
  end
7
+ end
7
8
 
8
- def options
9
- OptionsDouble.new
10
- end
9
+ class EntryDouble
11
10
  end
12
11
 
13
12
  describe ContentfulMiddleman::ImportTask do
@@ -88,7 +88,7 @@ describe ContentfulMiddleman::Instance do
88
88
  subject = described_class.new(extension)
89
89
 
90
90
  vcr('client') {
91
- expect(subject.client.integration_info).to eq(name: 'middleman', version: ContentfulMiddleman::VERSION)
91
+ expect(subject.client.integration_info).to eq(name: 'middleman.v4', version: ContentfulMiddleman::VERSION)
92
92
  }
93
93
  end
94
94
 
@@ -160,37 +160,6 @@ describe ContentfulMiddleman::Mapper::Base do
160
160
  }
161
161
  end
162
162
 
163
- it 'maps properly when using camel case option' do
164
- vcr('entries/map_with_camel_case') {
165
- subject = described_class.new entries, OptionsDouble.new(client_options: { use_camel_case: true })
166
- expect(context.hashize).to eq ({})
167
-
168
- expected = {
169
- :_meta => {
170
- :content_type_id=>"test",
171
- :updated_at=>"2018-06-14T13:13:17+00:00",
172
- :created_at=>"2018-06-14T13:13:17+00:00",
173
- :id=>"5xkCBpVmHmS2WwqOW8OSwK"
174
- },
175
- id: "5xkCBpVmHmS2WwqOW8OSwK",
176
- someField: "foobar"
177
- }
178
-
179
- client = Contentful::Client.new(
180
- space: 'ycz65dz7s75m',
181
- access_token: '7790b343268100301696628b99678de6a552c967ded5c448bf9f2cba3de806ca',
182
- dynamic_entries: :auto,
183
- use_camel_case: true
184
- )
185
-
186
- entry = client.entries.first
187
-
188
- subject.map(context, entry)
189
-
190
- expect(context.hashize).to eq(expected)
191
- }
192
- end
193
-
194
163
  it 'maps entries with multiple locales with nested resources that are also localized' do
195
164
  vcr('entries/localized_references_localized_assets') {
196
165
  subject = described_class.new entries, OptionsDouble.new(cda_query: {locale: '*'})
File without changes
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/content_types?limit=1000
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/content_types?limit=1000
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/1sjfpsn7l90g/environments/master/content_types?limit=1000
5
+ uri: https://cdn.contentful.com/spaces/1sjfpsn7l90g/content_types?limit=1000
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -117,7 +117,7 @@ http_interactions:
117
117
  recorded_at: Thu, 29 Sep 2016 22:30:25 GMT
118
118
  - request:
119
119
  method: get
120
- uri: https://cdn.contentful.com/spaces/1sjfpsn7l90g/environments/master/entries?locale=*
120
+ uri: https://cdn.contentful.com/spaces/1sjfpsn7l90g/entries?locale=*
121
121
  body:
122
122
  encoding: US-ASCII
123
123
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/bht13amj0fva/environments/master/content_types?limit=1000
5
+ uri: https://cdn.contentful.com/spaces/bht13amj0fva/content_types?limit=1000
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -119,7 +119,7 @@ http_interactions:
119
119
  recorded_at: Wed, 05 Oct 2016 14:33:01 GMT
120
120
  - request:
121
121
  method: get
122
- uri: https://cdn.contentful.com/spaces/bht13amj0fva/environments/master/entries?locale=*
122
+ uri: https://cdn.contentful.com/spaces/bht13amj0fva/entries?locale=*
123
123
  body:
124
124
  encoding: US-ASCII
125
125
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/v0h47qlgo3zl/environments/master/content_types?limit=1000
5
+ uri: https://cdn.contentful.com/spaces/v0h47qlgo3zl/content_types?limit=1000
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -80,7 +80,7 @@ http_interactions:
80
80
  recorded_at: Mon, 21 Aug 2017 21:10:22 GMT
81
81
  - request:
82
82
  method: get
83
- uri: https://cdn.contentful.com/spaces/v0h47qlgo3zl/environments/master/entries?content_type=destination&select=fields.name,fields.coordinates,sys&sys.id=4ik8UErhRmIwomiQs8EUkI
83
+ uri: https://cdn.contentful.com/spaces/v0h47qlgo3zl/entries?content_type=destination&select=fields.name,fields.coordinates,sys&sys.id=4ik8UErhRmIwomiQs8EUkI
84
84
  body:
85
85
  encoding: US-ASCII
86
86
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://preview.contentful.com/spaces/7f19o1co4hn7/environments/master/content_types?limit=1000
5
+ uri: https://preview.contentful.com/spaces/7f19o1co4hn7/content_types?limit=1000
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -79,7 +79,7 @@ http_interactions:
79
79
  recorded_at: Tue, 19 Jul 2016 13:49:05 GMT
80
80
  - request:
81
81
  method: get
82
- uri: https://preview.contentful.com/spaces/7f19o1co4hn7/environments/master/entries?sys.id=6C4T3KAZUWaysA6ooQOWiE
82
+ uri: https://preview.contentful.com/spaces/7f19o1co4hn7/entries?sys.id=6C4T3KAZUWaysA6ooQOWiE
83
83
  body:
84
84
  encoding: US-ASCII
85
85
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/a80guayqr8ut/environments/master/content_types?limit=1000
5
+ uri: https://cdn.contentful.com/spaces/a80guayqr8ut/content_types?limit=1000
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -90,7 +90,7 @@ http_interactions:
90
90
  recorded_at: Tue, 13 Dec 2016 12:56:31 GMT
91
91
  - request:
92
92
  method: get
93
- uri: https://cdn.contentful.com/spaces/a80guayqr8ut/environments/master/entries?sys.id=DT1yQgZABwuWeY842sGYY
93
+ uri: https://cdn.contentful.com/spaces/a80guayqr8ut/entries?sys.id=DT1yQgZABwuWeY842sGYY
94
94
  body:
95
95
  encoding: US-ASCII
96
96
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://preview.contentful.com/spaces/cfexampleapi/environments/master/content_types?limit=1000
5
+ uri: https://preview.contentful.com/spaces/cfexampleapi/content_types?limit=1000
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -92,7 +92,7 @@ http_interactions:
92
92
  recorded_at: Thu, 10 Dec 2015 19:42:11 GMT
93
93
  - request:
94
94
  method: get
95
- uri: https://preview.contentful.com/spaces/cfexampleapi/environments/master/entries
95
+ uri: https://preview.contentful.com/spaces/cfexampleapi/entries
96
96
  body:
97
97
  encoding: US-ASCII
98
98
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/content_types?limit=1000
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/content_types?limit=1000
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/content_types?limit=1000
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/content_types?limit=1000
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -92,7 +92,7 @@ http_interactions:
92
92
  recorded_at: Thu, 26 Nov 2015 14:05:49 GMT
93
93
  - request:
94
94
  method: get
95
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/entries?limit=1
95
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/entries?limit=1
96
96
  body:
97
97
  encoding: US-ASCII
98
98
  string: ''
@@ -176,7 +176,7 @@ http_interactions:
176
176
  recorded_at: Thu, 26 Nov 2015 14:05:49 GMT
177
177
  - request:
178
178
  method: get
179
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/entries?limit=1000&order=sys.createdAt&skip=0
179
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/entries?limit=1000&order=sys.createdAt&skip=0
180
180
  body:
181
181
  encoding: US-ASCII
182
182
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/content_types?limit=1000
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/content_types?limit=1000
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -98,7 +98,7 @@ http_interactions:
98
98
  recorded_at: Wed, 07 Sep 2016 22:51:13 GMT
99
99
  - request:
100
100
  method: get
101
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/entries?limit=1
101
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/entries?limit=1
102
102
  body:
103
103
  encoding: US-ASCII
104
104
  string: ''
@@ -213,7 +213,7 @@ http_interactions:
213
213
  recorded_at: Wed, 07 Sep 2016 22:51:13 GMT
214
214
  - request:
215
215
  method: get
216
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/entries?limit=100&order=sys.createdAt&skip=0
216
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/entries?limit=100&order=sys.createdAt&skip=0
217
217
  body:
218
218
  encoding: US-ASCII
219
219
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/content_types?limit=1000
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/content_types?limit=1000
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -97,7 +97,7 @@ http_interactions:
97
97
  recorded_at: Thu, 27 Apr 2017 13:45:07 GMT
98
98
  - request:
99
99
  method: get
100
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/entries?sys.id=nyancat
100
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/entries?sys.id=nyancat
101
101
  body:
102
102
  encoding: US-ASCII
103
103
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/content_types?limit=1000
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/content_types?limit=1000
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -321,7 +321,7 @@ http_interactions:
321
321
  recorded_at: Wed, 02 Dec 2015 18:20:27 GMT
322
322
  - request:
323
323
  method: get
324
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/entries
324
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/entries
325
325
  body:
326
326
  encoding: US-ASCII
327
327
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/content_types?limit=1000
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/content_types?limit=1000
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -321,7 +321,7 @@ http_interactions:
321
321
  recorded_at: Wed, 02 Dec 2015 18:20:29 GMT
322
322
  - request:
323
323
  method: get
324
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/entries?include=1&locale=*
324
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/entries?include=1&locale=*
325
325
  body:
326
326
  encoding: US-ASCII
327
327
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/assets/nyancat
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/assets/nyancat
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/assets/happycat
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/assets/happycat
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/assets
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/assets
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/assets?order=sys.createdAt
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/assets?order=sys.createdAt
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/entries
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/entries
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/entries?content_type=cat
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/entries?content_type=cat
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/entries?sys.id=garfield
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/entries?sys.id=garfield
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/entries?sys.id=happycat
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/entries?sys.id=happycat
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://cdn.contentful.com/spaces/cfexampleapi/environments/master/content_types?limit=1000
5
+ uri: https://cdn.contentful.com/spaces/cfexampleapi/content_types?limit=1000
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
data/spec/spec_helper.rb CHANGED
@@ -85,20 +85,13 @@ end
85
85
  class EntryDouble
86
86
  attr_reader :id, :sys, :fields
87
87
 
88
- def initialize(id, sys_data = {}, fields = {}, updated_at = nil, camel_case = false)
88
+ def initialize(id, sys_data = {}, fields = {}, updated_at = nil)
89
89
  @id = id
90
90
  sys_data[:id] = id
91
- sys_data[camel_case ? :updatedAt : :updated_at] = updated_at
92
- sys_data[camel_case ? :contentType : :content_type] = ContentTypeDouble.new("#{id}_ct")
91
+ sys_data[:updated_at] = updated_at
92
+ sys_data[:content_type] = ContentTypeDouble.new("#{id}_ct")
93
93
  @sys = sys_data
94
94
  @fields = fields
95
- @camel_case = camel_case
96
-
97
- sys_data.each do |k, v|
98
- define_singleton_method k do
99
- v
100
- end
101
- end
102
95
 
103
96
  unless fields.nil?
104
97
  fields.each do |k, v|
@@ -108,4 +101,8 @@ class EntryDouble
108
101
  end
109
102
  end
110
103
  end
104
+
105
+ def updated_at
106
+ sys[:updated_at]
107
+ end
111
108
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contentful_middleman
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sascha Konietzke
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-06-14 00:00:00.000000000 Z
12
+ date: 2017-11-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: middleman-core
@@ -17,14 +17,28 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '3.4'
20
+ version: '4.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '3.4'
27
+ version: '4.0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: middleman-cli
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '4.0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '4.0'
28
42
  - !ruby/object:Gem::Dependency
29
43
  name: contentful
30
44
  requirement: !ruby/object:Gem::Requirement
@@ -259,7 +273,6 @@ files:
259
273
  - spec/fixtures/vcr_fixtures/entries/localized_references.yml
260
274
  - spec/fixtures/vcr_fixtures/entries/localized_references_localized_assets.yml
261
275
  - spec/fixtures/vcr_fixtures/entries/locations.yml
262
- - spec/fixtures/vcr_fixtures/entries/map_with_camel_case.yml
263
276
  - spec/fixtures/vcr_fixtures/entries/nil_file.yml
264
277
  - spec/fixtures/vcr_fixtures/entries/repeated_entry.yml
265
278
  - spec/fixtures/vcr_fixtures/helpers/preview.yml
@@ -299,7 +312,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
299
312
  version: '0'
300
313
  requirements: []
301
314
  rubyforge_project:
302
- rubygems_version: 2.7.6
315
+ rubygems_version: 2.6.14
303
316
  signing_key:
304
317
  specification_version: 4
305
318
  summary: Include mangablable content from the Contentful CMS and API into your Middleman
@@ -327,7 +340,6 @@ test_files:
327
340
  - spec/fixtures/vcr_fixtures/entries/localized_references.yml
328
341
  - spec/fixtures/vcr_fixtures/entries/localized_references_localized_assets.yml
329
342
  - spec/fixtures/vcr_fixtures/entries/locations.yml
330
- - spec/fixtures/vcr_fixtures/entries/map_with_camel_case.yml
331
343
  - spec/fixtures/vcr_fixtures/entries/nil_file.yml
332
344
  - spec/fixtures/vcr_fixtures/entries/repeated_entry.yml
333
345
  - spec/fixtures/vcr_fixtures/helpers/preview.yml
@@ -1,244 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://cdn.contentful.com/spaces/ycz65dz7s75m/environments/master/content_types?limit=1000
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- X-Contentful-User-Agent:
11
- - sdk contentful.rb/2.2.1; platform ruby/2.5.1; os macOS/16;
12
- Authorization:
13
- - Bearer 7790b343268100301696628b99678de6a552c967ded5c448bf9f2cba3de806ca
14
- Content-Type:
15
- - application/vnd.contentful.delivery.v1+json
16
- Accept-Encoding:
17
- - gzip
18
- Connection:
19
- - close
20
- Host:
21
- - cdn.contentful.com
22
- User-Agent:
23
- - http.rb/2.2.2
24
- response:
25
- status:
26
- code: 200
27
- message: OK
28
- headers:
29
- Access-Control-Allow-Headers:
30
- - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature
31
- Access-Control-Allow-Methods:
32
- - GET,HEAD,OPTIONS
33
- Access-Control-Allow-Origin:
34
- - "*"
35
- Access-Control-Expose-Headers:
36
- - Etag
37
- Access-Control-Max-Age:
38
- - '86400'
39
- Cache-Control:
40
- - max-age=0
41
- Content-Type:
42
- - application/vnd.contentful.delivery.v1+json
43
- Etag:
44
- - '"a802c9553879adaad0097a8beedb5ecc"'
45
- Server:
46
- - Contentful
47
- X-Content-Type-Options:
48
- - nosniff
49
- X-Contentful-Request-Id:
50
- - b86f4e978f9a1bfee6bc90007bbe9e41
51
- Content-Length:
52
- - '957'
53
- Accept-Ranges:
54
- - bytes
55
- Date:
56
- - Thu, 14 Jun 2018 13:16:11 GMT
57
- Via:
58
- - 1.1 varnish
59
- Age:
60
- - '0'
61
- Connection:
62
- - close
63
- X-Served-By:
64
- - cache-hhn1532-HHN
65
- X-Cache:
66
- - MISS
67
- X-Cache-Hits:
68
- - '0'
69
- X-Timer:
70
- - S1528982171.382086,VS0,VE270
71
- Vary:
72
- - Accept-Encoding
73
- body:
74
- encoding: ASCII-8BIT
75
- string: |
76
- {
77
- "sys": {
78
- "type": "Array"
79
- },
80
- "total": 1,
81
- "skip": 0,
82
- "limit": 1000,
83
- "items": [
84
- {
85
- "sys": {
86
- "space": {
87
- "sys": {
88
- "type": "Link",
89
- "linkType": "Space",
90
- "id": "ycz65dz7s75m"
91
- }
92
- },
93
- "id": "test",
94
- "type": "ContentType",
95
- "createdAt": "2018-06-14T13:13:07.886Z",
96
- "updatedAt": "2018-06-14T13:13:07.886Z",
97
- "environment": {
98
- "sys": {
99
- "id": "master",
100
- "type": "Link",
101
- "linkType": "Environment"
102
- }
103
- },
104
- "revision": 1
105
- },
106
- "displayField": "someField",
107
- "name": "Test",
108
- "description": "",
109
- "fields": [
110
- {
111
- "id": "someField",
112
- "name": "someField",
113
- "type": "Symbol",
114
- "localized": false,
115
- "required": false,
116
- "disabled": false,
117
- "omitted": false
118
- }
119
- ]
120
- }
121
- ]
122
- }
123
- http_version:
124
- recorded_at: Thu, 14 Jun 2018 13:16:11 GMT
125
- - request:
126
- method: get
127
- uri: https://cdn.contentful.com/spaces/ycz65dz7s75m/environments/master/entries
128
- body:
129
- encoding: US-ASCII
130
- string: ''
131
- headers:
132
- X-Contentful-User-Agent:
133
- - sdk contentful.rb/2.2.1; platform ruby/2.5.1; os macOS/16;
134
- Authorization:
135
- - Bearer 7790b343268100301696628b99678de6a552c967ded5c448bf9f2cba3de806ca
136
- Content-Type:
137
- - application/vnd.contentful.delivery.v1+json
138
- Accept-Encoding:
139
- - gzip
140
- Connection:
141
- - close
142
- Host:
143
- - cdn.contentful.com
144
- User-Agent:
145
- - http.rb/2.2.2
146
- response:
147
- status:
148
- code: 200
149
- message: OK
150
- headers:
151
- Access-Control-Allow-Headers:
152
- - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent,X-Contentful-Enable-Alpha-Feature
153
- Access-Control-Allow-Methods:
154
- - GET,HEAD,OPTIONS
155
- Access-Control-Allow-Origin:
156
- - "*"
157
- Access-Control-Expose-Headers:
158
- - Etag
159
- Access-Control-Max-Age:
160
- - '86400'
161
- Cache-Control:
162
- - max-age=0
163
- Content-Type:
164
- - application/vnd.contentful.delivery.v1+json
165
- Etag:
166
- - '"376db3c86ef859e48397c6520bfcf235"'
167
- Server:
168
- - Contentful
169
- X-Content-Type-Options:
170
- - nosniff
171
- X-Contentful-Request-Id:
172
- - 6644c1c7f9d2b797077967aa07c407b8
173
- Content-Length:
174
- - '879'
175
- Accept-Ranges:
176
- - bytes
177
- Date:
178
- - Thu, 14 Jun 2018 13:16:12 GMT
179
- Via:
180
- - 1.1 varnish
181
- Age:
182
- - '0'
183
- Connection:
184
- - close
185
- X-Served-By:
186
- - cache-hhn1526-HHN
187
- X-Cache:
188
- - MISS
189
- X-Cache-Hits:
190
- - '0'
191
- X-Timer:
192
- - S1528982172.794017,VS0,VE278
193
- Vary:
194
- - Accept-Encoding
195
- body:
196
- encoding: ASCII-8BIT
197
- string: |
198
- {
199
- "sys": {
200
- "type": "Array"
201
- },
202
- "total": 1,
203
- "skip": 0,
204
- "limit": 100,
205
- "items": [
206
- {
207
- "sys": {
208
- "space": {
209
- "sys": {
210
- "type": "Link",
211
- "linkType": "Space",
212
- "id": "ycz65dz7s75m"
213
- }
214
- },
215
- "id": "5xkCBpVmHmS2WwqOW8OSwK",
216
- "type": "Entry",
217
- "createdAt": "2018-06-14T13:13:17.377Z",
218
- "updatedAt": "2018-06-14T13:13:17.377Z",
219
- "environment": {
220
- "sys": {
221
- "id": "master",
222
- "type": "Link",
223
- "linkType": "Environment"
224
- }
225
- },
226
- "revision": 1,
227
- "contentType": {
228
- "sys": {
229
- "type": "Link",
230
- "linkType": "ContentType",
231
- "id": "test"
232
- }
233
- },
234
- "locale": "en-US"
235
- },
236
- "fields": {
237
- "someField": "foobar"
238
- }
239
- }
240
- ]
241
- }
242
- http_version:
243
- recorded_at: Thu, 14 Jun 2018 13:16:12 GMT
244
- recorded_with: VCR 3.0.3