wit-importer 0.1.0 → 0.1.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 +6 -12
- data/lib/wit/importer.rb +10 -0
- data/lib/wit/importer/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: 1bb123b41184a995f66fa35fb99d2946509a3611
|
4
|
+
data.tar.gz: 1a670f40be404db0a735e4909300e927b04ddf84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fa43d1a8c4d1cbdc79830a1bf917aadf176b3e04e0a334d51868d6000ab7511f5053356c5af4c964128fce7c671783475af276be400bb5f42add62703bdb477
|
7
|
+
data.tar.gz: e570e2d2fa10c9d36fb6584b4ff74b0427a6608e0abc78c11eb5db50d0160ed4c2ceb6bb065714232c6fc9744c37f4e5f0d0200271290530c892b7e474da13f8
|
data/README.md
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
# Wit::Importer
|
2
2
|
|
3
|
-
|
3
|
+
Currently WIT.AI does not allow any way to export, clone or share application with public only with list of allowed people.
|
4
|
+
You can export you application and let other users import it however, this can be done only when creating new app.
|
4
5
|
|
5
|
-
|
6
|
+
This **WIT IMPORTER** tool allowes you to import all definitions of expoerted app to either new or app that already contains other definitions.
|
7
|
+
|
8
|
+
Be avare that the definitions will load alongside your previous and it can't be undone other than manually.
|
6
9
|
|
7
10
|
## Installation
|
8
11
|
|
@@ -11,20 +14,11 @@ Add this line to your application's Gemfile:
|
|
11
14
|
```ruby
|
12
15
|
gem 'wit-importer'
|
13
16
|
```
|
14
|
-
|
15
|
-
And then execute:
|
16
|
-
|
17
|
-
$ bundle
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
$ gem install wit-importer
|
22
|
-
|
23
17
|
## Usage
|
24
18
|
|
25
19
|
Download the app as zip and unzip it.
|
26
20
|
|
27
|
-
SERVER_KEY: the key of the app you want to import it to
|
21
|
+
SERVER_KEY: the **SERVER** key of the app you want to import it to
|
28
22
|
PATH: path to the root of unzipped app
|
29
23
|
|
30
24
|
``Usage: wit-importer [SERVER_KEY] [PATH_TO_APP_ZIP_ROOT]``
|
data/lib/wit/importer.rb
CHANGED
@@ -87,6 +87,8 @@ module Wit
|
|
87
87
|
entity['entity'] = 'wit$' + entity['entity']
|
88
88
|
end
|
89
89
|
|
90
|
+
entity['value'] = strip(entity['value'])
|
91
|
+
|
90
92
|
end
|
91
93
|
end
|
92
94
|
|
@@ -150,6 +152,14 @@ module Wit
|
|
150
152
|
API_URL + endpoint + '?v=' + API_VERSION
|
151
153
|
end
|
152
154
|
|
155
|
+
def strip(value)
|
156
|
+
value = value.strip
|
157
|
+
value = value[1..-1] if value.start_with?("\"")
|
158
|
+
value = value[0...-1] if value.end_with?("\"")
|
159
|
+
|
160
|
+
return value.strip
|
161
|
+
end
|
162
|
+
|
153
163
|
|
154
164
|
end
|
155
165
|
end
|
data/lib/wit/importer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wit-importer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Ludvigh
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|