appfuel 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/appfuel/storage/repository/mapping_dsl.rb +15 -11
- data/lib/appfuel/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19c9a0a0f8b98e6ff2aa760b235be925681b2d56
|
4
|
+
data.tar.gz: 9b204bab5d8e2f054effcc3a6fc2eaf527916a93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f1221be2c438f441d24b1751820c1e25cd84be90b6d2a87d3ca50a830c025361dd0cbd2ae182e6f315f72e49b1d13c90cadb3bc44d15e0362a2e0a47bce08bd
|
7
|
+
data.tar.gz: f2cce133a6207adae6cde406cc01d6bbf1cbc078dea433593a257a249b87140abfb2118d513a832a6b4e909341f699181ca495e24a7e6f2256bd2901bcf6ae6f
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file. (Pending ap
|
|
5
5
|
|
6
6
|
|
7
7
|
# Releases
|
8
|
+
## [[0.3.1]](https://github.com/rsb/appfuel/releases/tag/0.3.1) 2017-06-20
|
9
|
+
### Fixed
|
10
|
+
- `mapping_dsl` was missing `web_api`
|
8
11
|
## [[0.3.0]](https://github.com/rsb/appfuel/releases/tag/0.3.0) 2017-06-20
|
9
12
|
### Added
|
10
13
|
- adding `web_api` storage to be used for WebApi repositories. The default
|
@@ -9,7 +9,7 @@ module Appfuel
|
|
9
9
|
attr_reader :domain_name, :storage, :entries, :entry_class,
|
10
10
|
:container_name
|
11
11
|
|
12
|
-
STORAGE_TYPES = [:db, :file, :memory]
|
12
|
+
STORAGE_TYPES = [:db, :file, :memory, :web_api]
|
13
13
|
|
14
14
|
# 1) mapping 'feature.domain', db: true, do
|
15
15
|
# ...
|
@@ -97,10 +97,7 @@ module Appfuel
|
|
97
97
|
|
98
98
|
if all_storage_symbols?(*args)
|
99
99
|
args.unshift(type)
|
100
|
-
|
101
|
-
@storage[storage_type] = send("initialize_#{storage_type}_storage", true)
|
102
|
-
end
|
103
|
-
|
100
|
+
@storage = initialize_storage(storage: args)
|
104
101
|
return self
|
105
102
|
end
|
106
103
|
|
@@ -142,26 +139,33 @@ module Appfuel
|
|
142
139
|
storage = {}
|
143
140
|
if data.key?(:db)
|
144
141
|
value = data[:db]
|
145
|
-
storage[:db] =
|
142
|
+
storage[:db] = initialize_general_storage(:db, value, data)
|
146
143
|
elsif data.key?(:file)
|
147
144
|
value = data[:file]
|
148
|
-
storage[:file] =
|
145
|
+
storage[:file] = initialize_file_storage(value)
|
146
|
+
elsif data.key?(:web_api)
|
147
|
+
value = data[:web_api]
|
148
|
+
storage[:webapi] = initialize_general_storage(:web_api, value, data)
|
149
149
|
elsif data.key?(:storage) && data[:storage].is_a?(Array)
|
150
150
|
data[:storage].each do |type|
|
151
|
-
storage[type] =
|
151
|
+
storage[type] = if type.to_s.downcase == 'file'
|
152
|
+
initialize_file_storage(true)
|
153
|
+
else
|
154
|
+
initialize_general_storage(type, true)
|
155
|
+
end
|
152
156
|
end
|
153
157
|
end
|
154
158
|
storage
|
155
159
|
end
|
156
160
|
|
157
|
-
def
|
161
|
+
def initialize_general_storage(key, value, opts = {})
|
158
162
|
case
|
159
163
|
when value == true
|
160
|
-
translate_storage_key(
|
164
|
+
translate_storage_key(key, domain_name)
|
161
165
|
when opts.is_a?(Hash) && opts[:key_translation] == false
|
162
166
|
value
|
163
167
|
else
|
164
|
-
translate_storage_key(
|
168
|
+
translate_storage_key(key, value)
|
165
169
|
end
|
166
170
|
end
|
167
171
|
|
data/lib/appfuel/version.rb
CHANGED