grntest 1.2.5 → 1.2.6

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: 0abb970522c59544eb9373c89c179835bdb0818d
4
- data.tar.gz: ad7f18e703fe092758eab01541f271b7ca1aa485
3
+ metadata.gz: 623111bd9759dab5b911292fabd306b098813483
4
+ data.tar.gz: f58cccf27785ee89309f43ad765108daf4efb82d
5
5
  SHA512:
6
- metadata.gz: 245b5e6849384cff5959aec6b6cc75bb188b4cb58b7f354531df756b86fbf060e97d149d0b5849d026d93be50a65b9225480f0fe8a5b70786c9d701586f35025
7
- data.tar.gz: 78483e2708e13fe1bc4ce3e6b423a42976626d0dc1d7f6753b5352965b6a368d3326f424bce54deac2749f284cd951ab85e51b3e26768a591dd795e20280ea00
6
+ metadata.gz: f0580f314af0dccf1649b8516ecc9e487f738def148ca6ad3720b9bf308d194156a1e6873da73d9ccc1399202a44b3cb5fb8500f02f3c11da6f50939c00381ba
7
+ data.tar.gz: 66f8421596ee261fa921e5e9c92375faded61ebf21d18ac522e6e0eb70f5693d28382865404662af0a71c03153accc8425d77795953d42f8363d23323d25080c
data/doc/text/news.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # News
2
2
 
3
+ ## 1.2.6: 2017-08-16
4
+
5
+ ### Improvements
6
+
7
+ * Added `db_directory` variable.
8
+
9
+ * Added `disk_usage` response body value normalization support.
10
+
3
11
  ## 1.2.5: 2017-08-15
4
12
 
5
13
  ### Improvements
@@ -675,15 +675,37 @@ http {
675
675
  exception["message"] = normalize_error_message(message)
676
676
  body.merge("exception" => exception)
677
677
  else
678
- body.each do |key, value|
679
- case value
680
- when Hash
681
- path = value["path"]
682
- value["path"] = normalize_plugin_path(path) if path
678
+ normalize_body_recursive(body)
679
+ end
680
+ else
681
+ body
682
+ end
683
+ end
684
+
685
+ def normalize_body_recursive(body)
686
+ case body
687
+ when Array
688
+ body.collect do |value|
689
+ normalize_body_recursive(value)
690
+ end
691
+ when Hash
692
+ normalized_body = {}
693
+ body.each do |key, value|
694
+ case key
695
+ when "path"
696
+ if value
697
+ normalized_value = normalize_plugin_path(value)
698
+ else
699
+ normalized_value = value
683
700
  end
701
+ normalized_body[key] = normalized_value
702
+ when "disk_usage"
703
+ normalized_body[key] = 0
704
+ else
705
+ normalized_body[key] = normalize_body_recursive(value)
684
706
  end
685
- body
686
707
  end
708
+ normalized_body
687
709
  else
688
710
  body
689
711
  end
@@ -24,6 +24,8 @@ module Grntest
24
24
  case $1
25
25
  when "db_path"
26
26
  @context.db_path.to_s
27
+ when "db_directory"
28
+ @context.db_path.parent.to_s
27
29
  when "base_directory"
28
30
  @context.base_directory.to_s
29
31
  else
@@ -14,5 +14,5 @@
14
14
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
15
 
16
16
  module Grntest
17
- VERSION = "1.2.5"
17
+ VERSION = "1.2.6"
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grntest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-08-15 00:00:00.000000000 Z
12
+ date: 2017-08-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json