wit-importer 0.1.0 → 0.1.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: b39db68fe86235a9c48d54d53d3c06ae28cb147b
4
- data.tar.gz: 398cb8e7026e3f1883404ac9840897c9caa93dd9
3
+ metadata.gz: 1bb123b41184a995f66fa35fb99d2946509a3611
4
+ data.tar.gz: 1a670f40be404db0a735e4909300e927b04ddf84
5
5
  SHA512:
6
- metadata.gz: 108cf7572209a35b9335079612126a3ae1c4fe8aa39463bb0dda3775f70199231617cbc9f2f4594f82c9a23b840e6e4e37e4b5a42042941921f5e6cdd065758e
7
- data.tar.gz: 559fc1e79bb3d585f9fa33008425fd6283fecd05eeef9d326ee3fef945ca3a1ebed16ad7885c6875cc6ab7aba232f02c34db14de35abf73f7b458634e6be317f
6
+ metadata.gz: 5fa43d1a8c4d1cbdc79830a1bf917aadf176b3e04e0a334d51868d6000ab7511f5053356c5af4c964128fce7c671783475af276be400bb5f42add62703bdb477
7
+ data.tar.gz: e570e2d2fa10c9d36fb6584b4ff74b0427a6608e0abc78c11eb5db50d0160ed4c2ceb6bb065714232c6fc9744c37f4e5f0d0200271290530c892b7e474da13f8
data/README.md CHANGED
@@ -1,8 +1,11 @@
1
1
  # Wit::Importer
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/wit/importer`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- TODO: Delete this and the text above, and describe your gem
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
@@ -1,5 +1,5 @@
1
1
  module Wit
2
2
  class Importer
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
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.0
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-25 00:00:00.000000000 Z
11
+ date: 2018-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler