marketplace-kit 0.2.0 → 0.2.1

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: 8b630bebf9a893b0a57f93311ac7216fc8311f59
4
- data.tar.gz: f708c27fa61ce7333c346836ef2c3afac9379a60
3
+ metadata.gz: d097ad89b43f1bca5625489193194ccdbce4d586
4
+ data.tar.gz: aa42bd855f0195ed154ff7dfecd1ac310be56c9c
5
5
  SHA512:
6
- metadata.gz: fe9c3698a774033d0f64e8f8207ff80d300b350ae95296954d3dfaa38964bfdf6f8d488679175de9549319dd152030575e5d76f07e9ac1d04be12eb706eb5ba5
7
- data.tar.gz: f5fb46f4e5951dff722b94d5cf78e55f7446427c06441aad4c05b4639076acb39e9030dacdf286531c3c08ed412d248bed57404bc49fc15938ab7c06ce555fb9
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
- Example:
34
- `marketplace-kit deploy -f -e staging`
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
- ## Available commands
37
+ ### Available commands
37
38
  All commands should be run in the marketplace directory (ie. `marketplace-nearme/`)
38
39
 
39
- | Command | Description |
40
+ | Command | Description |
40
41
  | ----------------- | ------------- |
41
42
  | `pull` | Pulls files from database and saves them in the filesystem |
42
- | `deploy` | Updates database using the filesystem as a source |
43
- | `deploy -e staging` | Deploys to staging environment (-e option is available for all commands) |
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 @hash_body[:marketplace_builder_file_body]
79
+ return unless font_file?
80
80
 
81
- @hash_body[:marketplace_builder_file_body] = @hash_body[:marketplace_builder_file_body].force_encoding('ISO-8859-1').encode('UTF-8')
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
@@ -1,3 +1,3 @@
1
1
  module MarketplaceKit
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  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.0
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-14 00:00:00.000000000 Z
11
+ date: 2017-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler