contentful_bootstrap 3.5.2 → 3.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c266426ff6158f7c5254cab98f9ca38bd5fe20f
4
- data.tar.gz: 5993a12e19927dc0de0caa3e93e58863e59b83f1
3
+ metadata.gz: 145e81e1443e293e56393c88c8609c4520abf6b5
4
+ data.tar.gz: 7ab10aa65b840cb8d00bd463e035ad8b0745484c
5
5
  SHA512:
6
- metadata.gz: aa0980d9e60346eaa9dfd951ff10f007505fd68326f4b6c832842b9feb58b29fb95da89160a864e38c47fd9e7edd6822cf69c63f2940a9416adf92d432ab544b
7
- data.tar.gz: 779f7ef0e31f395930d2a14b20b3a45d156dfb61a951d73d132b4021f803461560fb25d708db23b0a7000629e0c1e27a077ba3e09c994251c8502a98a32ebf97
6
+ metadata.gz: 98bfc62b2a1eb07ab126fb1ab63bfdb7afdaf1d1315b95ec2e6b8b77a06ddfaba54bd99758cba01fc2ad09620fb0839c36bde47091946cbd3cd0d47de23ed544
7
+ data.tar.gz: 90ac5afb07bda160a8384a79d7a739bd9d775a1c7f90c16854d77c391b4b635c04ec12e57c92ceced10451715f2476b7b32568df106e1042091c71bfdd542105
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## v3.6.1
6
+
7
+ ### Changed
8
+ * Changed User Agent Headers to use the new format
9
+ * Updated versions of CMA and CDA SDK to latest available
10
+
5
11
  ## v3.5.2
6
12
 
7
13
  ### Fixed
data/Gemfile CHANGED
@@ -3,8 +3,4 @@ source "https://rubygems.org"
3
3
 
4
4
  gemspec
5
5
 
6
- gem "launchy"
7
- gem "inifile"
8
- gem "contentful-management"
9
- gem "contentful"
10
6
  gem 'pry'
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency "guard-rspec"
30
30
  spec.add_development_dependency 'listen', '~> 3.0.0'
31
31
  spec.add_runtime_dependency "launchy"
32
- spec.add_runtime_dependency "contentful-management", '~> 1.0'
33
- spec.add_runtime_dependency "contentful", "> 0", "< 3"
32
+ spec.add_runtime_dependency "contentful-management", '~> 1.8'
33
+ spec.add_runtime_dependency "contentful", ">= 2.1.0", "< 3"
34
34
  spec.add_runtime_dependency "inifile"
35
35
  end
@@ -3,6 +3,5 @@ require 'contentful/bootstrap/server'
3
3
  require 'contentful/bootstrap/version'
4
4
  require 'contentful/bootstrap/commands'
5
5
  require 'contentful/bootstrap/templates'
6
- require 'contentful/bootstrap/management'
7
6
  require 'contentful/bootstrap/command_runner'
8
7
  require 'contentful/bootstrap/templates/links'
@@ -1,7 +1,7 @@
1
1
  require 'net/http'
2
+ require 'contentful/management'
2
3
  require 'contentful/bootstrap/server'
3
4
  require 'contentful/bootstrap/support'
4
- require 'contentful/bootstrap/management'
5
5
 
6
6
  module Contentful
7
7
  module Bootstrap
@@ -35,7 +35,12 @@ module Contentful
35
35
  private
36
36
 
37
37
  def management_client_init
38
- @client ||= ::Contentful::Bootstrap::Management.new(@token.read, raise_errors: true)
38
+ @client ||= ::Contentful::Management::Client.new(
39
+ @token.read,
40
+ raise_errors: true,
41
+ integration_name: 'bootstrap',
42
+ integration_version: ::Contentful::Bootstrap::VERSION
43
+ )
39
44
  end
40
45
 
41
46
  def configuration
@@ -7,10 +7,15 @@ require 'contentful/bootstrap/version'
7
7
  module Contentful
8
8
  module Bootstrap
9
9
  class Generator
10
- attr_reader :content_types_only
10
+ attr_reader :content_types_only, :client
11
11
 
12
12
  def initialize(space_id, access_token, content_types_only)
13
- @client = Contentful::Client.new(access_token: access_token, space: space_id)
13
+ @client = Contentful::Client.new(
14
+ access_token: access_token,
15
+ space: space_id,
16
+ integration_name: 'bootstrap',
17
+ integration_version: ::Contentful::Bootstrap::VERSION
18
+ )
14
19
  @content_types_only = content_types_only
15
20
  end
16
21
 
@@ -1,6 +1,6 @@
1
1
  module Contentful
2
2
  module Bootstrap
3
- VERSION = '3.5.2'
3
+ VERSION = '3.6.1'
4
4
 
5
5
  def self.major_version
6
6
  VERSION.split('.').first.to_i
@@ -44,7 +44,12 @@ describe Contentful::Bootstrap::Commands::Base do
44
44
  describe 'instance methods' do
45
45
  it '#management_client_init' do
46
46
  allow_any_instance_of(described_class).to receive(:configuration)
47
- expect(Contentful::Management::Client).to receive(:new).with(token.read, raise_errors: true)
47
+ expect(Contentful::Management::Client).to receive(:new).with(
48
+ token.read,
49
+ raise_errors: true,
50
+ integration_name: 'bootstrap',
51
+ integration_version: Contentful::Bootstrap::VERSION
52
+ )
48
53
 
49
54
  described_class.new(token, 'foo', quiet: true)
50
55
  end
@@ -3,6 +3,12 @@ require 'spec_helper'
3
3
  describe Contentful::Bootstrap::Generator do
4
4
  subject { Contentful::Bootstrap::Generator.new('wl1z0pal05vy', '48d7db7d4cd9d09df573c251d456f4acc72141b92f36e57f8684b36cf5cfff6e', false) }
5
5
 
6
+ describe 'user agent headers' do
7
+ it 'client has proper integration data' do
8
+ expect(subject.client.integration_info).to eq(name: 'bootstrap', version: Contentful::Bootstrap::VERSION)
9
+ end
10
+ end
11
+
6
12
  describe 'JSON template generator' do
7
13
  it 'can generate a JSON template for a given space' do
8
14
  vcr('generate_json') {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contentful_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.2
4
+ version: 3.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Litvak Bruno
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-05 00:00:00.000000000 Z
11
+ date: 2017-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -184,21 +184,21 @@ dependencies:
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '1.0'
187
+ version: '1.8'
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '1.0'
194
+ version: '1.8'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: contentful
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - ">"
199
+ - - ">="
200
200
  - !ruby/object:Gem::Version
201
- version: '0'
201
+ version: 2.1.0
202
202
  - - "<"
203
203
  - !ruby/object:Gem::Version
204
204
  version: '3'
@@ -206,9 +206,9 @@ dependencies:
206
206
  prerelease: false
207
207
  version_requirements: !ruby/object:Gem::Requirement
208
208
  requirements:
209
- - - ">"
209
+ - - ">="
210
210
  - !ruby/object:Gem::Version
211
- version: '0'
211
+ version: 2.1.0
212
212
  - - "<"
213
213
  - !ruby/object:Gem::Version
214
214
  version: '3'
@@ -258,7 +258,6 @@ files:
258
258
  - lib/contentful/bootstrap/commands/update_space.rb
259
259
  - lib/contentful/bootstrap/constants.rb
260
260
  - lib/contentful/bootstrap/generator.rb
261
- - lib/contentful/bootstrap/management.rb
262
261
  - lib/contentful/bootstrap/server.rb
263
262
  - lib/contentful/bootstrap/support.rb
264
263
  - lib/contentful/bootstrap/templates.rb
@@ -280,7 +279,6 @@ files:
280
279
  - spec/contentful/bootstrap/commands/generate_token_spec.rb
281
280
  - spec/contentful/bootstrap/commands/update_space_spec.rb
282
281
  - spec/contentful/bootstrap/generator_spec.rb
283
- - spec/contentful/bootstrap/management_spec.rb
284
282
  - spec/contentful/bootstrap/server_spec.rb
285
283
  - spec/contentful/bootstrap/support_spec.rb
286
284
  - spec/contentful/bootstrap/templates/base_spec.rb
@@ -356,7 +354,6 @@ test_files:
356
354
  - spec/contentful/bootstrap/commands/generate_token_spec.rb
357
355
  - spec/contentful/bootstrap/commands/update_space_spec.rb
358
356
  - spec/contentful/bootstrap/generator_spec.rb
359
- - spec/contentful/bootstrap/management_spec.rb
360
357
  - spec/contentful/bootstrap/server_spec.rb
361
358
  - spec/contentful/bootstrap/support_spec.rb
362
359
  - spec/contentful/bootstrap/templates/base_spec.rb
@@ -1,11 +0,0 @@
1
- require 'contentful/management'
2
-
3
- module Contentful
4
- module Bootstrap
5
- class Management < ::Contentful::Management::Client
6
- def user_agent
7
- Hash['User-Agent', "ContentfulBootstrap/#{Contentful::Bootstrap::VERSION}"]
8
- end
9
- end
10
- end
11
- end
@@ -1,11 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Contentful::Bootstrap::Management do
4
- it ':user_agent' do
5
- expect(subject.user_agent).to eq('User-Agent' => "ContentfulBootstrap/#{Contentful::Bootstrap::VERSION}")
6
- end
7
-
8
- it ':request_headers' do
9
- expect(subject.request_headers).to include('User-Agent' => "ContentfulBootstrap/#{Contentful::Bootstrap::VERSION}")
10
- end
11
- end