commercelayer-cli 0.2.1 → 0.2.2

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
  SHA256:
3
- metadata.gz: d389331fdc49d71bb60ed32db70492e7efc1962c4cc2882333deeef38c1c5b8f
4
- data.tar.gz: 65a2cc630935e96825243aede65681d3b234b32019543cb12a1b8cee861e4302
3
+ metadata.gz: 4154a79fcb71e96e9e19380a957cd5fa22cab0c5796a209ad75d1a02ee032ae6
4
+ data.tar.gz: 4cbdbed284e4361d2dd44c2fe06643ea33aaa62f94f16771c2747e21948b8817
5
5
  SHA512:
6
- metadata.gz: 6304af246d16fdaf2b6b128dfeb57736c4e47eabe97d0c4cdd6902eaa7192283c9fd4732c98b3f3c2adbb24d43a82b2411519e40c3abca01726583c138c8dbb0
7
- data.tar.gz: b8004de7e452099b9e50c55b9dc4396708e6cf34c05f536b1b5674308fc1b4b10a188a3fb2b2decff591b06f2f90ac35453165d2a5993a2866291a9f213c6b54
6
+ metadata.gz: 386f072ed4d6a3bf1cdfe285e7c84aa6f2dc5262bd4e07127ccac95090eebcd2dd2824721eb45ea5ba99151172077bc14680e4fe8829eb51d612ed72047b4808
7
+ data.tar.gz: 7acb7d21dc07c5885ce9d72517fd04b31c4fb22e1dcd4fb070ed5f7ce9442790b3a12d189ac14d01904886fb6cb077be4ea0c44237aad6677e0d799b375d25ca
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- commercelayer-cli (0.2.0)
4
+ commercelayer-cli (0.2.1)
5
5
  commercelayer
6
6
  dato
7
7
  thor
@@ -9,9 +9,9 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activemodel (5.2.0)
13
- activesupport (= 5.2.0)
14
- activesupport (5.2.0)
12
+ activemodel (5.2.1)
13
+ activesupport (= 5.2.1)
14
+ activesupport (5.2.1)
15
15
  concurrent-ruby (~> 1.0, >= 1.0.2)
16
16
  i18n (>= 0.7, < 2)
17
17
  minitest (~> 5.1)
@@ -23,7 +23,7 @@ GEM
23
23
  jsonapi-consumer (~> 1.0)
24
24
  oauth2 (~> 1.4.0)
25
25
  concurrent-ruby (1.0.5)
26
- dato (0.6.3)
26
+ dato (0.6.8)
27
27
  activesupport (>= 4.2.7)
28
28
  addressable
29
29
  cacert
@@ -49,11 +49,11 @@ GEM
49
49
  multipart-post (>= 1.2, < 3)
50
50
  faraday_middleware (0.12.2)
51
51
  faraday (>= 0.7.4, < 1.0)
52
- fastimage (2.1.3)
52
+ fastimage (2.1.4)
53
53
  ffi (1.9.25)
54
54
  http-cookie (1.0.3)
55
55
  domain_name (~> 0.5)
56
- i18n (1.0.1)
56
+ i18n (1.1.0)
57
57
  concurrent-ruby (~> 1.0)
58
58
  imgix (1.1.0)
59
59
  addressable
@@ -83,7 +83,7 @@ GEM
83
83
  multi_xml (~> 0.5)
84
84
  rack (>= 1.2, < 3)
85
85
  parslet (1.8.2)
86
- public_suffix (3.0.2)
86
+ public_suffix (3.0.3)
87
87
  pusher-client (0.6.2)
88
88
  json
89
89
  websocket (~> 1.0)
@@ -131,4 +131,4 @@ DEPENDENCIES
131
131
  rspec (~> 3.0)
132
132
 
133
133
  BUNDLED WITH
134
- 1.16.2
134
+ 1.16.4
@@ -1,6 +1,6 @@
1
1
  module Commercelayer
2
2
  module CLI
3
- module Exporters
3
+ module Bootstrappers
4
4
  class DatoCMS
5
5
 
6
6
  include Helpers
@@ -16,7 +16,7 @@ module Commercelayer
16
16
  end
17
17
  end
18
18
 
19
- def export!
19
+ def bootstrap!
20
20
  create_product_model!
21
21
  create_variant_model!
22
22
  create_product_model_fields!
@@ -1,16 +1,16 @@
1
- require_relative "exporters/datocms"
1
+ require_relative "bootstrappers/datocms"
2
2
 
3
3
  module Commercelayer
4
4
  module CLI
5
- module Exporters
5
+ module Bootstrappers
6
6
 
7
- def export_data!(destination)
7
+ def bootstrap_data!(destination)
8
8
  commercelayer_client.authorize!
9
9
  case destination
10
10
  when "datocms"
11
11
  if yes? "Warning: this will erase your DatoCMS site. Continue?", :yellow
12
12
  say "Exporting data to DatoCMS...", :blue
13
- DatoCMS.new.export!
13
+ DatoCMS.new.bootstrap!
14
14
  else
15
15
  say "Nothing to do here. Bye!", :blue
16
16
  end
@@ -1,5 +1,5 @@
1
1
  module Commercelayer
2
2
  module CLI
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
@@ -4,14 +4,14 @@ require 'dato'
4
4
 
5
5
  require "commercelayer/cli/version"
6
6
  require "commercelayer/cli/helpers"
7
- require "commercelayer/cli/exporters"
7
+ require "commercelayer/cli/bootstrappers"
8
8
 
9
9
  module Commercelayer
10
10
  module CLI
11
11
  class Base < Thor
12
12
 
13
13
  include Helpers
14
- include Exporters
14
+ include Bootstrappers
15
15
  include Thor::Actions
16
16
 
17
17
  desc "init", "Create a config file under $HOME/.commercelayer-cli.yml"
@@ -21,10 +21,10 @@ module Commercelayer
21
21
  end
22
22
  end
23
23
 
24
- desc "export", "Export data from Commerce Layer to a destination"
25
- def export
24
+ desc "bootstrap", "Exports data from Commerce Layer to a destination, clearing existing data"
25
+ def bootstrap
26
26
  destination = ask "What is your destination?", limited_to: ["contentful", "datocms", "csv"]
27
- export_data!(destination)
27
+ bootstrap_data!(destination)
28
28
  end
29
29
 
30
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commercelayer-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Filippo Conforti
@@ -116,8 +116,8 @@ files:
116
116
  - commercelayer-cli.gemspec
117
117
  - exe/commercelayer-cli
118
118
  - lib/commercelayer/cli.rb
119
- - lib/commercelayer/cli/exporters.rb
120
- - lib/commercelayer/cli/exporters/datocms.rb
119
+ - lib/commercelayer/cli/bootstrappers.rb
120
+ - lib/commercelayer/cli/bootstrappers/datocms.rb
121
121
  - lib/commercelayer/cli/helpers.rb
122
122
  - lib/commercelayer/cli/version.rb
123
123
  homepage: https://github.com/commercelayer/commercelayer-cli