contentful-database-importer 0.3.3 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9abdc777c01f879523c6f4aa2bb1d395e2d42eaf
4
- data.tar.gz: 179fc5d6250c71c34baf4ec663d3281ef6802d46
3
+ metadata.gz: d0b6c4ea7ee70693a4de5e8da44910b91419544d
4
+ data.tar.gz: 82ca191561abd0c77165277532648f2986bab79c
5
5
  SHA512:
6
- metadata.gz: bdd7697218f80a8a164de2382b381cfffb4d3411cbbf9c2b4dc284f6e57df414e46555935a3bc7608859224043899cf76a3f47027b348632e9bc6434075b569b
7
- data.tar.gz: c867fe2cc5f53b8a2a573dfd1a48dc85ae548e0977111467cb6904a3033ff0773d5c0f7809602ce6ebb76dc5c6fdd9b49781e9321185aec94811015571c30a6f
6
+ metadata.gz: 16940ef8010f47ad647ea0f280547d82303047647a552694e9c2f798ade6b34beb31d45233dd73a69b073cd47a8d1bf493e3e2f6568d7c929b06e50d1f5184fc
7
+ data.tar.gz: 01a4f116a6b28909f58e42ddb009f73539238bc9b637fe3e51d504d4b4372be2ce791b2b5ea2410039e39df1e238adbf8f15ef08b7b7270854732fc83f67070d
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.4.0
6
+
7
+ ### Added
8
+ * Added possibility to specify `locale` for Space creation and update.
9
+
5
10
  ## 0.3.3
6
11
 
7
12
  ### Added
data/README.md CHANGED
@@ -256,6 +256,7 @@ Contentful::DatabaseImporter.setup do |config|
256
256
  config.space_id = 'aAbBcC123foo' # Required only for `::update_space!` - the destination space ID
257
257
  config.database_connection = 'postgres://user:pass@host:port' # Required - the DB Connection string
258
258
  config.skip_content_types = true # Optional (only for `::update_space!`) - defaults to `true` - Skips Content Type creation upon updating a space
259
+ config.locale = 'en-US' # Optional (only for `::update_space!` and `::run!`) - defaults to `'en-US'` - Defines the default locale for Space creation, and locale in which the content will be set for both creation and update
259
260
  end
260
261
  ```
261
262
 
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_dependency 'contentful_bootstrap', '~> 3.5'
22
+ spec.add_dependency 'contentful_bootstrap', '~> 3.7'
23
23
  spec.add_dependency 'sequel', '~> 4.39'
24
24
  spec.add_dependency 'base62-rb'
25
25
  spec.add_dependency 'mimemagic'
@@ -5,10 +5,12 @@ module Contentful
5
5
  attr_accessor :space_name,
6
6
  :space_id,
7
7
  :database_connection,
8
- :skip_content_types
8
+ :skip_content_types,
9
+ :locale
9
10
 
10
11
  def initialize
11
12
  @skip_content_types = true
13
+ @locale = 'en-US'
12
14
  end
13
15
 
14
16
  def complete_for_run?
@@ -1,5 +1,5 @@
1
1
  module Contentful
2
2
  module DatabaseImporter
3
- VERSION = '0.3.3'.freeze
3
+ VERSION = '0.4.0'.freeze
4
4
  end
5
5
  end
@@ -47,6 +47,7 @@ module Contentful
47
47
  def self.bootstrap_create_space!(file)
48
48
  Contentful::Bootstrap::CommandRunner.new.create_space(
49
49
  config.space_name,
50
+ locale: config.locale,
50
51
  json_template: file.path
51
52
  )
52
53
  ensure
@@ -56,6 +57,7 @@ module Contentful
56
57
  def self.bootstrap_update_space!(file)
57
58
  Contentful::Bootstrap::CommandRunner.new.update_space(
58
59
  config.space_id,
60
+ locale: config.locale,
59
61
  json_template: file.path,
60
62
  skip_content_types: config.skip_content_types
61
63
  )
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contentful-database-importer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Contentful GmbH (David Litvak Bruno)
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-14 00:00:00.000000000 Z
11
+ date: 2017-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: contentful_bootstrap
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.5'
19
+ version: '3.7'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.5'
26
+ version: '3.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sequel
29
29
  requirement: !ruby/object:Gem::Requirement