riak-client 1.4.5 → 2.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/Gemfile +0 -1
  4. data/{LICENSE → LICENSE.md} +0 -0
  5. data/README.markdown +211 -66
  6. data/RELEASE_NOTES.md +22 -47
  7. data/Rakefile +45 -0
  8. data/lib/riak.rb +1 -1
  9. data/lib/riak/bucket.rb +2 -2
  10. data/lib/riak/client.rb +22 -195
  11. data/lib/riak/client/beefcake/crdt_loader.rb +127 -0
  12. data/lib/riak/client/beefcake/crdt_operator.rb +222 -0
  13. data/lib/riak/client/beefcake/footer +4 -0
  14. data/lib/riak/client/beefcake/header +6 -0
  15. data/lib/riak/client/beefcake/message_codes.rb +29 -0
  16. data/lib/riak/client/beefcake/message_overlay.rb +61 -0
  17. data/lib/riak/client/beefcake/messages.rb +733 -371
  18. data/lib/riak/client/beefcake/object_methods.rb +1 -1
  19. data/lib/riak/client/beefcake/protocol.rb +105 -0
  20. data/lib/riak/client/beefcake/socket.rb +243 -0
  21. data/lib/riak/client/beefcake_protobuffs_backend.rb +262 -122
  22. data/lib/riak/client/node.rb +4 -75
  23. data/lib/riak/client/protobuffs_backend.rb +6 -14
  24. data/lib/riak/client/search.rb +0 -64
  25. data/lib/riak/client/yokozuna.rb +52 -0
  26. data/lib/riak/counter.rb +1 -1
  27. data/lib/riak/crdt.rb +21 -0
  28. data/lib/riak/crdt/base.rb +97 -0
  29. data/lib/riak/crdt/batch_counter.rb +19 -0
  30. data/lib/riak/crdt/batch_map.rb +41 -0
  31. data/lib/riak/crdt/counter.rb +71 -0
  32. data/lib/riak/crdt/inner_counter.rb +74 -0
  33. data/lib/riak/crdt/inner_flag.rb +42 -0
  34. data/lib/riak/crdt/inner_map.rb +53 -0
  35. data/lib/riak/crdt/inner_register.rb +26 -0
  36. data/lib/riak/crdt/inner_set.rb +95 -0
  37. data/lib/riak/crdt/map.rb +88 -0
  38. data/lib/riak/crdt/operation.rb +19 -0
  39. data/lib/riak/crdt/set.rb +156 -0
  40. data/lib/riak/crdt/typed_collection.rb +131 -0
  41. data/lib/riak/errors/base.rb +9 -0
  42. data/lib/riak/errors/connection_error.rb +44 -0
  43. data/lib/riak/errors/crdt_error.rb +18 -0
  44. data/lib/riak/errors/failed_request.rb +56 -0
  45. data/lib/riak/errors/protobuffs_error.rb +11 -0
  46. data/lib/riak/i18n.rb +2 -0
  47. data/lib/riak/json.rb +1 -1
  48. data/lib/riak/locale/en.yml +26 -1
  49. data/lib/riak/locale/fr.yml +0 -1
  50. data/lib/riak/map_reduce.rb +1 -1
  51. data/lib/riak/map_reduce/results.rb +1 -1
  52. data/lib/riak/multiget.rb +1 -2
  53. data/lib/riak/rcontent.rb +8 -3
  54. data/lib/riak/robject.rb +2 -8
  55. data/lib/riak/secondary_index.rb +4 -4
  56. data/lib/riak/serializers.rb +1 -1
  57. data/lib/riak/util/escape.rb +3 -5
  58. data/lib/riak/version.rb +1 -1
  59. data/lib/riak/walk_spec.rb +7 -3
  60. data/riak-client.gemspec +10 -8
  61. data/spec/fixtures/bitcask.txt +25 -0
  62. data/spec/integration/riak/bucket_types_spec.rb +61 -0
  63. data/spec/integration/riak/counters_spec.rb +17 -32
  64. data/spec/integration/riak/crdt_spec.rb +181 -0
  65. data/spec/integration/riak/crdt_validation/map_spec.rb +63 -0
  66. data/spec/integration/riak/crdt_validation/set_spec.rb +122 -0
  67. data/spec/integration/riak/protobuffs_backends_spec.rb +9 -26
  68. data/spec/integration/riak/security_spec.rb +94 -0
  69. data/spec/integration/riak/threading_spec.rb +24 -67
  70. data/spec/integration/yokozuna/index_spec.rb +61 -0
  71. data/spec/integration/yokozuna/queries_spec.rb +116 -0
  72. data/spec/integration/yokozuna/schema_spec.rb +49 -0
  73. data/spec/riak/beefcake_protobuffs_backend/crdt_operator_spec.rb +222 -0
  74. data/spec/riak/beefcake_protobuffs_backend/object_methods_spec.rb +4 -4
  75. data/spec/riak/beefcake_protobuffs_backend/protocol_spec.rb +189 -0
  76. data/spec/riak/beefcake_protobuffs_backend/socket_spec.rb +151 -0
  77. data/spec/riak/beefcake_protobuffs_backend_spec.rb +68 -106
  78. data/spec/riak/bucket_spec.rb +81 -77
  79. data/spec/riak/client_spec.rb +43 -340
  80. data/spec/riak/core_ext/to_param_spec.rb +2 -2
  81. data/spec/riak/counter_spec.rb +20 -20
  82. data/spec/riak/crdt/counter_spec.rb +52 -0
  83. data/spec/riak/crdt/inner_counter_spec.rb +21 -0
  84. data/spec/riak/crdt/inner_flag_spec.rb +39 -0
  85. data/spec/riak/crdt/inner_map_spec.rb +47 -0
  86. data/spec/riak/crdt/inner_register_spec.rb +40 -0
  87. data/spec/riak/crdt/inner_set_spec.rb +33 -0
  88. data/spec/riak/crdt/map_spec.rb +77 -0
  89. data/spec/riak/crdt/set_spec.rb +58 -0
  90. data/spec/riak/crdt/shared_examples.rb +74 -0
  91. data/spec/riak/crdt/typed_collection_spec.rb +231 -0
  92. data/spec/riak/escape_spec.rb +33 -37
  93. data/spec/riak/feature_detection_spec.rb +45 -45
  94. data/spec/riak/index_collection_spec.rb +12 -12
  95. data/spec/riak/link_spec.rb +34 -34
  96. data/spec/riak/list_buckets_spec.rb +7 -7
  97. data/spec/riak/map_reduce/filter_builder_spec.rb +6 -6
  98. data/spec/riak/map_reduce/phase_spec.rb +35 -35
  99. data/spec/riak/map_reduce_spec.rb +89 -87
  100. data/spec/riak/multiget_spec.rb +20 -15
  101. data/spec/riak/node_spec.rb +5 -152
  102. data/spec/riak/robject_spec.rb +95 -108
  103. data/spec/riak/search_spec.rb +17 -139
  104. data/spec/riak/secondary_index_spec.rb +49 -49
  105. data/spec/riak/serializers_spec.rb +9 -9
  106. data/spec/riak/stamp_spec.rb +9 -9
  107. data/spec/riak/walk_spec_spec.rb +46 -46
  108. data/spec/spec_helper.rb +14 -22
  109. data/spec/support/certs/README.md +13 -0
  110. data/spec/support/certs/ca.crt +22 -0
  111. data/spec/support/certs/client.crt +95 -0
  112. data/spec/support/certs/client.key +27 -0
  113. data/spec/support/certs/empty_ca.crt +21 -0
  114. data/spec/support/certs/server.crl +13 -0
  115. data/spec/support/certs/server.crt +95 -0
  116. data/spec/support/certs/server.key +27 -0
  117. data/spec/support/integration_setup.rb +1 -1
  118. data/spec/support/search_corpus_setup.rb +29 -8
  119. data/spec/support/test_client.rb +46 -0
  120. data/spec/support/test_client.yml.example +10 -0
  121. data/spec/support/unified_backend_examples.rb +104 -83
  122. data/spec/support/version_filter.rb +2 -2
  123. data/spec/support/wait_until.rb +14 -0
  124. metadata +134 -132
  125. data/erl_src/riak_kv_test014_backend.beam +0 -0
  126. data/erl_src/riak_kv_test014_backend.erl +0 -189
  127. data/erl_src/riak_kv_test_backend.beam +0 -0
  128. data/erl_src/riak_kv_test_backend.erl +0 -731
  129. data/erl_src/riak_search_test_backend.beam +0 -0
  130. data/erl_src/riak_search_test_backend.erl +0 -175
  131. data/lib/riak/client/excon_backend.rb +0 -172
  132. data/lib/riak/client/http_backend.rb +0 -413
  133. data/lib/riak/client/http_backend/bucket_streamer.rb +0 -15
  134. data/lib/riak/client/http_backend/chunked_json_streamer.rb +0 -42
  135. data/lib/riak/client/http_backend/configuration.rb +0 -227
  136. data/lib/riak/client/http_backend/key_streamer.rb +0 -15
  137. data/lib/riak/client/http_backend/object_methods.rb +0 -114
  138. data/lib/riak/client/http_backend/request_headers.rb +0 -34
  139. data/lib/riak/client/http_backend/transport_methods.rb +0 -201
  140. data/lib/riak/client/instrumentation.rb +0 -25
  141. data/lib/riak/client/net_http_backend.rb +0 -82
  142. data/lib/riak/cluster.rb +0 -151
  143. data/lib/riak/failed_request.rb +0 -81
  144. data/lib/riak/instrumentation.rb +0 -6
  145. data/lib/riak/node.rb +0 -40
  146. data/lib/riak/node/configuration.rb +0 -304
  147. data/lib/riak/node/console.rb +0 -133
  148. data/lib/riak/node/control.rb +0 -207
  149. data/lib/riak/node/defaults.rb +0 -85
  150. data/lib/riak/node/generation.rb +0 -127
  151. data/lib/riak/node/log.rb +0 -34
  152. data/lib/riak/node/version.rb +0 -29
  153. data/lib/riak/search.rb +0 -3
  154. data/lib/riak/test_server.rb +0 -89
  155. data/lib/riak/util/headers.rb +0 -32
  156. data/lib/riak/util/multipart.rb +0 -52
  157. data/lib/riak/util/multipart/stream_parser.rb +0 -62
  158. data/spec/fixtures/munchausen.txt +0 -1033
  159. data/spec/integration/riak/cluster_spec.rb +0 -88
  160. data/spec/integration/riak/http_backends_spec.rb +0 -180
  161. data/spec/integration/riak/node_spec.rb +0 -170
  162. data/spec/integration/riak/test_server_spec.rb +0 -57
  163. data/spec/riak/excon_backend_spec.rb +0 -102
  164. data/spec/riak/headers_spec.rb +0 -21
  165. data/spec/riak/http_backend/configuration_spec.rb +0 -273
  166. data/spec/riak/http_backend/object_methods_spec.rb +0 -243
  167. data/spec/riak/http_backend/transport_methods_spec.rb +0 -97
  168. data/spec/riak/http_backend_spec.rb +0 -367
  169. data/spec/riak/instrumentation_spec.rb +0 -167
  170. data/spec/riak/multipart_spec.rb +0 -23
  171. data/spec/riak/net_http_backend_spec.rb +0 -15
  172. data/spec/riak/stream_parser_spec.rb +0 -53
  173. data/spec/support/drb_mock_server.rb +0 -39
  174. data/spec/support/http_backend_implementation_examples.rb +0 -253
  175. data/spec/support/mock_server.rb +0 -81
  176. data/spec/support/mocks.rb +0 -4
  177. data/spec/support/riak_test.rb +0 -77
  178. data/spec/support/sometimes.rb +0 -46
  179. data/spec/support/test_server.rb +0 -61
  180. data/spec/support/test_server.yml.example +0 -14
@@ -0,0 +1,19 @@
1
+ module Riak
2
+ module Crdt
3
+ # @api private
4
+ module Operation
5
+ class Update
6
+ attr_accessor :parent
7
+ attr_accessor :name
8
+ attr_accessor :type
9
+ attr_accessor :value
10
+ end
11
+
12
+ class Delete
13
+ attr_accessor :parent
14
+ attr_accessor :name
15
+ attr_accessor :type
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,156 @@
1
+ module Riak
2
+ module Crdt
3
+
4
+ # A distributed set containing strings, using the Riak 2 Data Types feature.
5
+ #
6
+ # Uses the Ruby standard library `::Set` frequently, so the full class names will
7
+ # be used frequently.
8
+ class Set < Base
9
+
10
+ # Create a set instance. If not provided, the default bucket type from
11
+ # {Riak::Crdt} will be used.
12
+ #
13
+ # @param bucket [Bucket] the {Riak::Bucket} for this set
14
+ # @param [String, nil] key The name of the set. A nil key makes
15
+ # Riak assign a key.
16
+ # @param [String] bucket_type The optional bucket type for this set.
17
+ # The default is in `Crdt::Base::DEFAULT_BUCKET_TYPES[:set]`.
18
+ # @param options [Hash]
19
+ def initialize(bucket, key, bucket_type=nil, options={})
20
+ super(bucket, key, bucket_type || DEFAULT_BUCKET_TYPES[:set], options)
21
+ end
22
+
23
+ # Yields a `BatchSet` to proxy multiple set operations into a single
24
+ # Riak update. The `BatchSet` has the same methods as this
25
+ # {Riak::Crdt::Set}.
26
+ #
27
+ # @yieldparam batch_set [BatchSet] collects set operations
28
+ def vivify(value)
29
+ value.each(&:freeze)
30
+ @members = ::Set.new(value)
31
+ @members.freeze
32
+ end
33
+
34
+ def batch
35
+ batcher = BatchSet.new self
36
+
37
+ yield batcher
38
+
39
+ operate batcher.operations
40
+ end
41
+
42
+ # Gets the current set members from Riak if necessary, and return the
43
+ # stdlib `::Set` of them.
44
+ #
45
+ # @return [::Set] a Ruby standard library {::Set} of the members
46
+ # of this {Riak::Crdt::Set}
47
+ def members
48
+ reload if dirty?
49
+ @members
50
+ end
51
+
52
+ alias :value :members
53
+
54
+ # Cast this {Riak::Crdt::Set} to a Ruby {Array}.
55
+ #
56
+ # @return [Array] array of set members
57
+ def to_a
58
+ members.to_a
59
+ end
60
+
61
+ # Check to see if this structure has any members.
62
+ #
63
+ # @return [Boolean] if the structure is empty
64
+ def empty?
65
+ members.empty?
66
+ end
67
+
68
+ # Check to see if a given string is present in this data structure.
69
+ #
70
+ # @param [String] candidate string to check for inclusion in this structure
71
+ # @return [Boolean] if the structure includes
72
+ def include?(candidate)
73
+ members.include?(candidate)
74
+ end
75
+
76
+ # Add a {String} to the {Riak::Crdt::Set}
77
+ #
78
+ # @param [String] element the element to add to the set
79
+ # @param [Hash] options
80
+ def add(element, options={})
81
+ operate operation(:add, element), options
82
+ end
83
+
84
+ # Remove a {String} from the {Riak::Crdt::Set}
85
+ #
86
+ # @param [String] element to remove from the set
87
+ # @param [Hash] options
88
+ def remove(element, options={})
89
+ raise CrdtError::SetRemovalWithoutContextError unless context?
90
+ operate operation(:remove, element), options
91
+ end
92
+
93
+ alias :delete :remove
94
+
95
+ private
96
+ def vivify(value)
97
+ @members = value
98
+ end
99
+
100
+ def operation(direction, element)
101
+ Operation::Update.new.tap do |op|
102
+ op.type = :set
103
+ op.value = { direction => element }
104
+ end
105
+ end
106
+
107
+ class BatchSet
108
+ def initialize(base)
109
+ @base = base
110
+ @adds = ::Set.new
111
+ @removes = ::Set.new
112
+ end
113
+
114
+ def add(element)
115
+ @adds.add element
116
+ end
117
+
118
+ def remove(element)
119
+ raise CrdtError::SetRemovalWithoutContextError.new unless context?
120
+ @removes.add element
121
+ end
122
+
123
+ alias :delete :remove
124
+
125
+ def include?(element)
126
+ members.include? element
127
+ end
128
+
129
+ def empty?
130
+ members.empty?
131
+ end
132
+
133
+ def context?
134
+ @base.context?
135
+ end
136
+
137
+ def to_a
138
+ members.to_a
139
+ end
140
+
141
+ def members
142
+ (@base + @adds).subtract @removes
143
+ end
144
+
145
+ alias :value :members
146
+
147
+ def operations
148
+ Operation::Update.new.tap do |op|
149
+ op.type = :set
150
+ op.value = {add: @adds.to_a, remove: @removes.to_a}
151
+ end
152
+ end
153
+ end
154
+ end
155
+ end
156
+ end
@@ -0,0 +1,131 @@
1
+ module Riak
2
+ module Crdt
3
+ # A collection of elements of a given type inside a {Map}.
4
+ class TypedCollection
5
+
6
+ ALREADY_WRAPPED = ::Set.new [InnerCounter, InnerFlag, InnerMap]
7
+ NEEDS_NAME = ::Set.new [InnerCounter, InnerSet, InnerMap]
8
+ INITIALIZE_NIL = ::Set.new [InnerRegister]
9
+
10
+ # @api private
11
+ def initialize(type, parent, contents={})
12
+ @type = type
13
+ @parent = parent
14
+ contents = {} if contents.nil?
15
+ stringified_contents = contents.stringify_keys
16
+ @contents = stringified_contents.keys.inject(Hash.new) do |contents, key|
17
+ contents.tap do |c|
18
+ content = stringified_contents[key]
19
+ if ALREADY_WRAPPED.include? content.class
20
+ c[key] = content
21
+ else
22
+ c[key] = @type.new self, content
23
+ end
24
+ c[key].name = key if needs_name?
25
+ end
26
+ end
27
+ end
28
+
29
+ # @api private
30
+ def reparent(new_parent)
31
+ reparented = self.class.new(@type,
32
+ new_parent,
33
+ @contents)
34
+ end
35
+
36
+ # Check if a value for a given key exists in this map.
37
+ #
38
+ # @param [String] key the key to check for
39
+ # @return [Boolean] if the key is inside this collection
40
+ def include?(key)
41
+ @contents.include? normalize_key(key)
42
+ end
43
+
44
+ # Get the value for a given key
45
+ #
46
+ # @param [String] key the key to get the value for
47
+ # @return the value for the given key
48
+ def [](key)
49
+ key = normalize_key key
50
+ if include? key
51
+ candidate = @contents[key]
52
+ return candidate unless candidate.respond_to? :parent
53
+ return candidate if candidate.parent == self
54
+ end
55
+
56
+ return nil if initialize_nil?
57
+
58
+ new_instance = @type.new self
59
+ new_instance.name = key if needs_name?
60
+
61
+ return new_instance
62
+ end
63
+
64
+ # Set the value for a given key. Operation of this method
65
+ # is only defined for {InnerCounter}, {InnerRegister}, and
66
+ # {InnerFlag} types.
67
+ #
68
+ # @param [String] key the key to set a new value for
69
+ # @param [Boolean, String, Integer] value the value to set at the key,
70
+ # or in the case of counters, the amount to increment
71
+ def []=(key, value)
72
+ key = normalize_key key
73
+
74
+ operation = @type.update value
75
+ operation.name = key
76
+
77
+ result = @parent.operate operation
78
+
79
+ @contents[key] = @type.new self, value
80
+ @contents[key].name = key if needs_name?
81
+
82
+ result
83
+ end
84
+
85
+ alias :increment :[]=
86
+
87
+ # Remove the entry from the map.
88
+ #
89
+ # @param [String] key the key to remove from the map
90
+ def delete(key)
91
+ key = normalize_key key
92
+ operation = @type.delete
93
+ operation.name = key
94
+
95
+ @parent.operate operation
96
+
97
+ @contents.delete key
98
+ end
99
+
100
+ # @api private
101
+ def operate(key, inner_operation)
102
+ key = normalize_key key
103
+
104
+ inner_operation.name = key
105
+
106
+ @parent.operate inner_operation
107
+ end
108
+
109
+
110
+ # Does this set have the context necessary to remove elements?
111
+ #
112
+ # @return [Boolean] if the set has a defined context
113
+ def context?
114
+ !!@parent.context?
115
+ end
116
+
117
+ private
118
+ def normalize_key(unnormalized_key)
119
+ unnormalized_key.to_s
120
+ end
121
+
122
+ def initialize_nil?
123
+ INITIALIZE_NIL.include? @type
124
+ end
125
+
126
+ def needs_name?
127
+ NEEDS_NAME.include? @type
128
+ end
129
+ end
130
+ end
131
+ end
@@ -0,0 +1,9 @@
1
+ module Riak
2
+
3
+ # Superclass for all errors raised by riak-client. If you catch an error
4
+ # that the client raises that isn't descended from this class, please
5
+ # file a bug. Thanks!
6
+ class Error < StandardError
7
+ include Util::Translation
8
+ end
9
+ end
@@ -0,0 +1,44 @@
1
+ require 'riak/errors/base'
2
+
3
+ module Riak
4
+ class ConnectionError < Error
5
+ end
6
+
7
+ class TlsError < ConnectionError
8
+ class CertHostMismatchError < TlsError
9
+ def initialize
10
+ super t('ssl.cert_host_mismatch')
11
+ end
12
+ end
13
+
14
+ class CertNotValidError < TlsError
15
+ def initialize
16
+ super t('ssl.cert_not_valid')
17
+ end
18
+ end
19
+
20
+ class CertRevokedError < TlsError
21
+ def initialize
22
+ super t('ssl.cert_revoked')
23
+ end
24
+ end
25
+
26
+ class ReadDataError < TlsError
27
+ def initialize(actual, candidate)
28
+ super t('ssl.read_data_error', actual: actual, candidate: candidate)
29
+ end
30
+ end
31
+
32
+ class UnknownKeyTypeError < TlsError
33
+ def initialize
34
+ super t('ssl.unknown_key_type')
35
+ end
36
+ end
37
+ end
38
+
39
+ class UserConfigurationError < ConnectionError
40
+ def initialize
41
+ super t('pbc.user_not_username')
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,18 @@
1
+ require 'riak/errors/base'
2
+
3
+ module Riak
4
+ class CrdtError < Error
5
+
6
+ class SetRemovalWithoutContextError < CrdtError
7
+ def initialize
8
+ super t('crdt.set_removal_without_context')
9
+ end
10
+ end
11
+
12
+ class PreconditionError < CrdtError
13
+ def initialize(message)
14
+ super t('crdt.precondition', message: message)
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,56 @@
1
+ require 'riak/errors/base'
2
+
3
+ module Riak
4
+ class FailedRequest < Error
5
+ def initialize(message)
6
+ super(message || t('failed_request'))
7
+ end
8
+ end
9
+
10
+ # Exception raised when receiving an unexpected Protocol Buffers response from Riak
11
+ class ProtobuffsFailedRequest < FailedRequest
12
+ def initialize(code, message)
13
+ super t('protobuffs_failed_request', :code => code, :body => message)
14
+ @original_message = message
15
+ @not_found = code == :not_found
16
+ @server_error = code == :server_error
17
+ end
18
+
19
+ # @return [true, false] whether the error response is in JSON
20
+ def is_json?
21
+ begin
22
+ JSON.parse(@original_message)
23
+ true
24
+ rescue
25
+ false
26
+ end
27
+ end
28
+
29
+ # @return [true,false] whether the error represents a "not found" response
30
+ def not_found?
31
+ @not_found
32
+ end
33
+
34
+ # @return [true,false] whether the error represents an internal
35
+ # server error
36
+ def server_error?
37
+ @server_error
38
+ end
39
+
40
+ def body
41
+ @original_message
42
+ end
43
+ end
44
+
45
+ class ProtobuffsUnexpectedResponse < ProtobuffsFailedRequest
46
+ def initialize(code, expected)
47
+ super code, t('pbc.unexpected_response', expected: expected, actual: code)
48
+ end
49
+ end
50
+
51
+ class ProtobuffsErrorResponse < ProtobuffsFailedRequest
52
+ def initialize(payload)
53
+ super payload.errcode, payload.errmsg
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,11 @@
1
+ require 'riak/errors/base'
2
+ module Riak
3
+ class ProtobuffsError < Error
4
+ end
5
+
6
+ class ProtobuffsFailedHeader < ProtobuffsError
7
+ def initialize
8
+ super t('pbc.failed_header')
9
+ end
10
+ end
11
+ end