marketplace-kit 0.2.0 → 0.2.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/README.md +16 -11
- data/lib/marketplace_kit/services/api_driver.rb +16 -2
- data/lib/marketplace_kit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d097ad89b43f1bca5625489193194ccdbce4d586
|
4
|
+
data.tar.gz: aa42bd855f0195ed154ff7dfecd1ac310be56c9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3132226f839c6e1341601af8ed828a4a2bced49325ddb6c49ad72a4e953fa2ae7fc9650dedc68cb948dd23e70627a0574e33fafd0d1f32e43a2e1be4057c416
|
7
|
+
data.tar.gz: b1235bb4cf5ee93ec706be06fe77dcb0a575bbf145ecc6cab23345a85d1835639ddd7c04b689434937785504655cb75e3deb16760c22d5f05680854f7837636a
|
data/README.md
CHANGED
@@ -15,9 +15,6 @@ Install it yourself as:
|
|
15
15
|
3. Create `marketplace_builder/.builder` file with endpoint names and their urls
|
16
16
|
```
|
17
17
|
{
|
18
|
-
"localhost": {
|
19
|
-
"url": "http://marketplace-name.lvh.me:3000"
|
20
|
-
},
|
21
18
|
"staging": {
|
22
19
|
"url": "https://staging-url.near-me.com"
|
23
20
|
},
|
@@ -30,20 +27,28 @@ Install it yourself as:
|
|
30
27
|
## Usage
|
31
28
|
`marketplace-kit <command> [flags]`
|
32
29
|
|
33
|
-
|
34
|
-
|
30
|
+
### Available flags
|
31
|
+
| Flag | For command | Description |
|
32
|
+
| ----------------- | ------------- | ------ |
|
33
|
+
| `-e <endpoint>` | all | Specifies endpoint. Endpoint name is the key inside the `.builder` config file |
|
34
|
+
| `-f` / `--force` | deploy | When added to deploy command it will deploy all the files (also those not changed) to specified endpoint |
|
35
|
+
|
35
36
|
|
36
|
-
|
37
|
+
### Available commands
|
37
38
|
All commands should be run in the marketplace directory (ie. `marketplace-nearme/`)
|
38
39
|
|
39
|
-
| Command
|
40
|
+
| Command | Description |
|
40
41
|
| ----------------- | ------------- |
|
41
42
|
| `pull` | Pulls files from database and saves them in the filesystem |
|
42
|
-
| `
|
43
|
-
| `deploy
|
44
|
-
| `deploy -f` | Updates database using the filesystem as a source with force mode enabled (override all files, don't skip not changed) |
|
45
|
-
| `sync` | Watches filesystem and updates the database on every change |
|
43
|
+
| `sync` | Watches filesystem and updates specified endpoint on every file change inside `marketplace_builder` directory |
|
44
|
+
| `deploy` | Updates database using the filesystem as a source. By default this command is trying to send only files that changed since the last deploy |
|
46
45
|
|
46
|
+
### Examples
|
47
|
+
`marketplace-kit pull -e qa`
|
48
|
+
|
49
|
+
`marketplace-kit sync -e production`
|
50
|
+
|
51
|
+
`marketplace-kit deploy -f -e staging`
|
47
52
|
|
48
53
|
## Contributing
|
49
54
|
|
@@ -76,9 +76,23 @@ module MarketplaceKit
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def fix_font_file_encoding
|
79
|
-
return unless
|
79
|
+
return unless font_file?
|
80
80
|
|
81
|
-
@hash_body[:marketplace_builder_file_body] =
|
81
|
+
@hash_body[:marketplace_builder_file_body] = file_body.force_encoding('ISO-8859-1').encode('UTF-8')
|
82
|
+
end
|
83
|
+
|
84
|
+
FONT_TYPES = %w(.eot .otf .ttc .ttf .woff .woff2 .svg)
|
85
|
+
|
86
|
+
def font_file?
|
87
|
+
path && path.start_with?('custom_themes') && FONT_TYPES.include?(File.extname(path)) && file_body
|
88
|
+
end
|
89
|
+
|
90
|
+
def file_body
|
91
|
+
@hash_body[:marketplace_builder_file_body]
|
92
|
+
end
|
93
|
+
|
94
|
+
def path
|
95
|
+
@hash_body[:path]
|
82
96
|
end
|
83
97
|
end
|
84
98
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marketplace-kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michal Janeczek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|