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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4154a79fcb71e96e9e19380a957cd5fa22cab0c5796a209ad75d1a02ee032ae6
|
4
|
+
data.tar.gz: 4cbdbed284e4361d2dd44c2fe06643ea33aaa62f94f16771c2747e21948b8817
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
13
|
-
activesupport (= 5.2.
|
14
|
-
activesupport (5.2.
|
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.
|
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.
|
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
|
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.
|
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.
|
134
|
+
1.16.4
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Commercelayer
|
2
2
|
module CLI
|
3
|
-
module
|
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
|
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 "
|
1
|
+
require_relative "bootstrappers/datocms"
|
2
2
|
|
3
3
|
module Commercelayer
|
4
4
|
module CLI
|
5
|
-
module
|
5
|
+
module Bootstrappers
|
6
6
|
|
7
|
-
def
|
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.
|
13
|
+
DatoCMS.new.bootstrap!
|
14
14
|
else
|
15
15
|
say "Nothing to do here. Bye!", :blue
|
16
16
|
end
|
data/lib/commercelayer/cli.rb
CHANGED
@@ -4,14 +4,14 @@ require 'dato'
|
|
4
4
|
|
5
5
|
require "commercelayer/cli/version"
|
6
6
|
require "commercelayer/cli/helpers"
|
7
|
-
require "commercelayer/cli/
|
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
|
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 "
|
25
|
-
def
|
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
|
-
|
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.
|
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/
|
120
|
-
- lib/commercelayer/cli/
|
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
|