tanker 1.1.0 → 1.1.1
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.
- data/VERSION +1 -1
- data/lib/tanker/railtie.rb +8 -10
- data/lib/tanker.rb +0 -6
- data/tanker.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.1
|
data/lib/tanker/railtie.rb
CHANGED
@@ -6,23 +6,21 @@ module Tanker
|
|
6
6
|
config.tanker_pagination_backend = nil
|
7
7
|
|
8
8
|
initializer "tanker.boot" do
|
9
|
-
|
9
|
+
Tanker.configuration = {}.tap do |_new_conf|
|
10
|
+
_new_conf[:url] = config.index_tank_url if config.index_tank_url
|
11
|
+
_new_conf[:pagination_backend] = config.tanker_pagination_backend if config.tanker_pagination_backend
|
12
|
+
end
|
10
13
|
end
|
11
14
|
|
12
15
|
config.after_initialize do
|
13
|
-
setup_tanker_configuration
|
14
|
-
end
|
15
|
-
|
16
|
-
rake_tasks do
|
17
|
-
load "tanker/tasks/tanker.rake"
|
18
|
-
end
|
19
|
-
|
20
|
-
private
|
21
|
-
def setup_tanker_configuration
|
22
16
|
Tanker.configuration = {}.tap do |_new_conf|
|
23
17
|
_new_conf[:url] = config.index_tank_url if config.index_tank_url
|
24
18
|
_new_conf[:pagination_backend] = config.tanker_pagination_backend if config.tanker_pagination_backend
|
25
19
|
end
|
26
20
|
end
|
21
|
+
|
22
|
+
rake_tasks do
|
23
|
+
load "tanker/tasks/tanker.rake"
|
24
|
+
end
|
27
25
|
end
|
28
26
|
end
|
data/lib/tanker.rb
CHANGED
@@ -188,12 +188,6 @@ module Tanker
|
|
188
188
|
instances
|
189
189
|
end
|
190
190
|
|
191
|
-
def constantize(klass_name)
|
192
|
-
Object.const_defined?(klass_name) ?
|
193
|
-
Object.const_get(klass_name) :
|
194
|
-
Object.const_missing(klass_name)
|
195
|
-
end
|
196
|
-
|
197
191
|
# borrowed from Rails' ActiveSupport::Inflector
|
198
192
|
def constantize(camel_cased_word)
|
199
193
|
names = camel_cased_word.split('::')
|
data/tanker.gemspec
CHANGED