wovnrb 0.2.11 → 0.2.12

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: f1372d56b49f0c1760b2b4bdaf7041f014cb8d59
4
- data.tar.gz: 41a174a792c2dd1d43d7efef0fda9be1165fa6eb
3
+ metadata.gz: 3fc52fb60a465751418467b657248cce6527730a
4
+ data.tar.gz: de3eccb1b4e2c8382652cf7675cf50971ea7196f
5
5
  SHA512:
6
- metadata.gz: 9d3a94f093c7829e0c5c19bf3a68e8e3ba646df5516bb8cd7bc45487b37cd6b52796d8e2c36a4fb46c7501b466b4d6986d60e5f216d382f92a005a0d74f3f6f9
7
- data.tar.gz: e73d5a1d9a010a3b438aa6dd77cad5b03565184ccfedc0f95de2baf9713541c179edb658ac534b59e80402167ffae9c26d42b9f187e387b5d8bce286051677fa
6
+ metadata.gz: 876f71f5dc7db5453ef567389f94bd8ad3d9aa90f918b406dac1f87cb220b48b5782c1a5d2b19a4f5ebc3e3097b11158c5c0f9e1e1b852dc1a512b4618016a42
7
+ data.tar.gz: 1ee33b277b6517dfdd6bbb0bcdc00996905a46af903402f5eceff30cf690d28c7ec55bbe45a0b2739e3c4b3767739deef4956ae750eb9a1ed049ecd1174b5686
data/README.md CHANGED
@@ -38,8 +38,7 @@ Insert the following into either config/application.rb or config/environments/.
38
38
  ...
39
39
 
40
40
  config.wovnrb = {
41
- :user_token => '2Wle3',
42
- :secret_key => 'secret',
41
+ :user_token => '2Wle3'
43
42
  }
44
43
 
45
44
  ...
@@ -55,8 +54,7 @@ Insert the following into either the Application File or config.ru.
55
54
  require 'wovnrb'
56
55
 
57
56
  use Wovnrb::Interceptor, {
58
- :user_token => '2Wle3',
59
- :secret_key => 'secret',
57
+ :user_token => '2Wle3'
60
58
  }
61
59
 
62
60
  ...
@@ -71,7 +69,6 @@ WOVN.io Ruby Library's valid parameters are as follows.
71
69
  Parameter Name | Required | Default Setting
72
70
  -------------- | -------- | ----------------
73
71
  user_token | yes | ''
74
- secret_key | yes | ''
75
72
  url_pattern | yes | 'path'
76
73
  query | | []
77
74
  default_lang | yes | 'en'
@@ -80,11 +77,7 @@ default_lang | yes | 'en'
80
77
 
81
78
  Set your WOVN.io Account's user token. This parameter is required.
82
79
 
83
- ### 2.2. secret_key
84
-
85
- This parameter is in development; it is not currently used. However, it is a required parameter, so ensure to set a value for it.
86
-
87
- ### 2.3. url_pattern
80
+ ### 2.2. url_pattern
88
81
 
89
82
  The Library works in the Ruby Application by adding new URL's to be translated. You can set the type of url with the url_pattern parameter. There are 3 types that can be set.
90
83
 
@@ -98,7 +91,7 @@ parameters | Translated page's URL | Notes
98
91
 
99
92
  https://wovn.io/contact
100
93
 
101
- ### 2.4. query
94
+ ### 2.3. query
102
95
 
103
96
  WOVN.io ignores query parameters when searching translated page. If you want to add query parameter to translated page's URL, you should configure "query" parameter. (You need to configure WOVN.io too)
104
97
 
@@ -112,7 +105,7 @@ If the default_lang is 'en', and the query is set to 'os', the above URL will be
112
105
 
113
106
  https://wovn.io/contact?os=mac
114
107
 
115
- ### 2.5. default_lang
108
+ ### 2.4. default_lang
116
109
 
117
110
  This sets the Ruby application's default language. The default value is English ('en').
118
111
 
data/lib/wovnrb/store.rb CHANGED
@@ -22,7 +22,6 @@ module Wovnrb
22
22
  @settings =
23
23
  {
24
24
  'user_token' => '',
25
- 'secret_key' => '',
26
25
  'log_path' => 'log/wovn_error.log',
27
26
  'ignore_paths' => [],
28
27
  'ignore_globs' => [],
@@ -53,10 +52,6 @@ module Wovnrb
53
52
  valid = false
54
53
  errors.push("User token #{settings['user_token']} is not valid.")
55
54
  end
56
- if !settings.has_key?('secret_key') || settings['secret_key'].length == 0 #|| settings['secret_key'].length < 5 || settings['secret_key'].length > 6
57
- valid = false
58
- errors.push("Secret key #{settings['secret_key']} is not valid.")
59
- end
60
55
  if settings.has_key?('ignore_paths') && !settings['ignore_paths'].kind_of?(Array)
61
56
  valid = false
62
57
  errors.push("Ignore Paths #{settings['ignore_paths']} should be Array.")
@@ -1,3 +1,3 @@
1
1
  module Wovnrb
2
- VERSION = "0.2.11"
2
+ VERSION = "0.2.12"
3
3
  end
@@ -41,7 +41,7 @@ module Wovnrb
41
41
  valid = store.valid_settings?
42
42
 
43
43
  assert_equal(false, valid)
44
- assert_equal(['User token is not valid.', 'Secret key is not valid.'], mock.errors)
44
+ assert_equal(['User token is not valid.'], mock.errors)
45
45
  end
46
46
 
47
47
  def test_settings_ignore_paths
@@ -73,7 +73,7 @@ module Wovnrb
73
73
  store.settings({'ignore_paths' => 'aaaa'})
74
74
 
75
75
  assert_equal(false, store.valid_settings?)
76
- assert_equal(['User token is not valid.', 'Secret key is not valid.', 'Ignore Paths aaaa should be Array.'], mock.errors)
76
+ assert_equal(['User token is not valid.', 'Ignore Paths aaaa should be Array.'], mock.errors)
77
77
  end
78
78
 
79
79
  def test_settings_ignore_glob_injection
data/test/test_helper.rb CHANGED
@@ -62,7 +62,6 @@ module Wovnrb
62
62
  settings['api_url'] = 'http://localhost/v0/values'
63
63
  settings['default_lang'] = 'en'
64
64
  settings['supported_langs'] = ['en', 'ja']
65
- settings['secret_key'] = 'secret_key'
66
65
  return settings.merge(options)
67
66
  end
68
67
 
data/wovnrb.gemspec CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  #spec.extensions = %w[ext/dom/extconf.rb]
26
26
  #spec.extensions = spec.files.grep(%r{/extconf\.rb$})
27
27
 
28
- spec.add_dependency "nokogumbo", "1.3.0"
28
+ spec.add_dependency "nokogumbo", ">= 1.3.0"
29
29
  spec.add_dependency "nokogiri", "< 1.6.8.1"
30
30
  spec.add_dependency "activesupport", "< 5"
31
31
  spec.add_dependency "lz4-ruby"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wovnrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Sandford
@@ -9,20 +9,20 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-01-17 00:00:00.000000000 Z
12
+ date: 2017-02-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogumbo
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: 1.3.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: 1.3.0
28
28
  - !ruby/object:Gem::Dependency