rseed 1.0.8 → 1.0.9

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MGU2YjBiM2ExYWZhZjhiMGVmMjNkNjdkODFjZjMwODliZjA3NWUwYw==
4
+ MGRjNTEyYjQzZGJjMmEwY2EwZjYwMTQyNDI2N2IzN2Y0NTc4NmJjNA==
5
5
  data.tar.gz: !binary |-
6
- YzRiNjZiOGNkMWI3YTg2NTM1NDFkYmU4M2Y3MmVkOWMwZjliMGQyMw==
6
+ NWUwMDU2MTA4OGEwNjA5ZDYwOTc2MWU0MDhmODNmYTRmM2IyNGZiMA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmVhNjQ2MDNhYWY3ODliNDgyMzRiMDc3YmFiZWI4YWQxZDQ3MTcwMjg5MmIw
10
- Y2Q4MWU2MTI2ZGE1MmE3YWU3NzBmMzY2MjM1N2Q0MTIwOTNkYjQ4ODI1MTAx
11
- N2EzNTAwYmFmMTNmMWRmYzFkNGUzZDhhMDRlZDdhZWFmYWVmZjc=
9
+ ODJjNjg2OTgxMTY5ZDhkZmJiNDBlNjNlMzUyZmJmOTk5ZjkwZjk1YzU4MjVl
10
+ ZTIwZmYzOGI0MWU4MzkwYjRkZTViMDYyNzBmMzc4YTc2MjgzN2ZhZmFkMTc1
11
+ ZTcxYzI5M2JkZGYzMWVkZmJkYjc5ZTJiMzNlNWE4ZjY5MzhiYzM=
12
12
  data.tar.gz: !binary |-
13
- ZjcyNjYxZDJmNjE5ZDQyNWZjZGRiMTM2ZmVkNzRmM2U4MDE3ZTA3MTM3NGI3
14
- MjdhNTIzNDA2YzI2NWEzZjNkOTUyMDMzMzZkNWQxNDc4MjRkMzE1ZjYxMTlk
15
- NjRiNWY5OTBjNjFkY2JhNDFlNDc5ZWU4MGNkMWM0ZDBmMWIyYzE=
13
+ MDk0YWI1MThlN2YzZjgxYmMyMzgwNDRjYjhmZDk4ZDJkMTkzZWQ5OTI4MmU0
14
+ YTMwYzU1ZjkxZjE3NmM4NTFhNjRlZmUyN2IyNmI5ZjJhM2FlZTUyODQ0Zjkz
15
+ YjYzY2ZiOWQ5ZTgwMzMxYTkxMTFjNTVhMGQ0YTQ3NmUzNjk3OWY=
@@ -10,18 +10,7 @@ module Rseed
10
10
 
11
11
  adapter = options[:adapter].is_a?(Adapter) ? options[:adapter] : Rseed.const_get("#{options[:adapter].to_s.classify}Adapter").new
12
12
  converter = options[:converter].is_a?(Converter) ? options[:converter] : Rseed.const_get("#{options[:converter].to_s.classify}Converter").new
13
- if options[:converter_options]
14
- converter_options = options[:converter_options]
15
- if converter_options.is_a? String
16
- options = converter_options.split(";")
17
- converter_options = {}
18
- options.each do |option|
19
- s = option.split("=")
20
- converter_options[s[0].strip] = s[1].strip
21
- end
22
- end
23
- converter.options = HashWithIndifferentAccess.new(converter_options)
24
- end
13
+ converter_options = deserialize_converter_options(options[:converter_options])if options[:converter_options]
25
14
  @within_transaction = options[:within_transaction]
26
15
  @adapter = adapter
27
16
  @converter = converter
@@ -109,5 +98,17 @@ module Rseed
109
98
  yield
110
99
  end
111
100
  end
101
+
102
+ def deserialize_converter_options converter_options
103
+ if converter_options.is_a? String
104
+ co = converter_options.split(";")
105
+ converter_options = {}
106
+ co.each do |option|
107
+ s = option.split("=")
108
+ converter_options[s[0].strip] = s[1].strip
109
+ end
110
+ end
111
+ HashWithIndifferentAccess.new(converter_options)
112
+ end
112
113
  end
113
114
  end
data/lib/rseed/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rseed
2
- VERSION = "1.0.8"
2
+ VERSION = "1.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rseed
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Monagle