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 +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile +0 -4
- data/contentful_bootstrap.gemspec +2 -2
- data/lib/contentful/bootstrap.rb +0 -1
- data/lib/contentful/bootstrap/commands/base.rb +7 -2
- data/lib/contentful/bootstrap/generator.rb +7 -2
- data/lib/contentful/bootstrap/version.rb +1 -1
- data/spec/contentful/bootstrap/commands/base_spec.rb +6 -1
- data/spec/contentful/bootstrap/generator_spec.rb +6 -0
- metadata +8 -11
- data/lib/contentful/bootstrap/management.rb +0 -11
- data/spec/contentful/bootstrap/management_spec.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 145e81e1443e293e56393c88c8609c4520abf6b5
|
4
|
+
data.tar.gz: 7ab10aa65b840cb8d00bd463e035ad8b0745484c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98bfc62b2a1eb07ab126fb1ab63bfdb7afdaf1d1315b95ec2e6b8b77a06ddfaba54bd99758cba01fc2ad09620fb0839c36bde47091946cbd3cd0d47de23ed544
|
7
|
+
data.tar.gz: 90ac5afb07bda160a8384a79d7a739bd9d775a1c7f90c16854d77c391b4b635c04ec12e57c92ceced10451715f2476b7b32568df106e1042091c71bfdd542105
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -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.
|
33
|
-
spec.add_runtime_dependency "contentful", "
|
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
|
data/lib/contentful/bootstrap.rb
CHANGED
@@ -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::
|
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(
|
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
|
|
@@ -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(
|
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.
|
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-
|
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.
|
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.
|
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:
|
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:
|
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 '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
|