marfa 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/marfa/models/api_model.rb +4 -12
- data/lib/marfa/version.rb +1 -1
- data/marfa.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90641f7d5612ca1b78d65e6d47bc7b39367edcd6
|
4
|
+
data.tar.gz: 3df9aa6915e89d571bf023bda9513937466cb237
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46f66bb98fea88ffa2696d45774c72838e379c1394930973811aff8d85eca262093f25991c2e38a6bc827ed2729fa069e16bb157496a3dfd77af0544eddaa57e
|
7
|
+
data.tar.gz: de4e0267dcaa010208da1957bc3c3a3d6be95b27115c678470329371122276a87f7ee522f58ebe7c2670b60961651482836cf45865297c80a3d04c516a85afc1
|
@@ -37,7 +37,8 @@ module Marfa
|
|
37
37
|
def self.get_raw_data(params)
|
38
38
|
result = {}
|
39
39
|
path = params[:path]
|
40
|
-
cache_key = "data_#{path}#{params[:query]}".scan(
|
40
|
+
cache_key = "data_#{path}#{params[:query]}".scan(/[a-zA-Zа-яА-Я0-9]+/).join('_')
|
41
|
+
cache_key = params[:cache_key] unless params[:cache_key].nil?
|
41
42
|
|
42
43
|
begin
|
43
44
|
if Marfa.cache.exist?(cache_key)
|
@@ -62,7 +63,8 @@ module Marfa
|
|
62
63
|
def self.get_raw_data_with_pagination(params)
|
63
64
|
result = {}
|
64
65
|
path = params[:path]
|
65
|
-
cache_key = "data_with_pagination_#{path}#{params[:query]}".scan(
|
66
|
+
cache_key = "data_with_pagination_#{path}#{params[:query]}".scan(/[a-zA-Zа-яА-Я0-9]+/).join('_')
|
67
|
+
cache_key = params[:cache_key] unless params[:cache_key].nil?
|
66
68
|
|
67
69
|
begin
|
68
70
|
if Marfa.cache.exist?(cache_key)
|
@@ -79,16 +81,6 @@ module Marfa
|
|
79
81
|
_log_exception(exception, path, params)
|
80
82
|
end
|
81
83
|
end
|
82
|
-
# begin
|
83
|
-
# response = RestClient.get("#{Marfa.config.api_server}#{path}", { params: params[:query], headers: {} })
|
84
|
-
# result[:data] = JSON.parse(response.body, symbolize_names: true)
|
85
|
-
# result[:data_count] = response.headers[:x_count].to_i unless response.headers[:x_count].nil?
|
86
|
-
# result[:data_pages] = response.headers[:x_pages].to_i unless response.headers[:x_pages].nil?
|
87
|
-
# rescue => exception
|
88
|
-
# if [:development, :test].include? Marfa.config.environment
|
89
|
-
# _log_exception(exception, path, params)
|
90
|
-
# end
|
91
|
-
# end
|
92
84
|
|
93
85
|
result
|
94
86
|
end
|
data/lib/marfa/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Version constant
|
2
2
|
module Marfa
|
3
3
|
# The version constant for the current version of Marfa
|
4
|
-
VERSION = '0.5.
|
4
|
+
VERSION = '0.5.1' unless defined?(Marfa::VERSION)
|
5
5
|
|
6
6
|
# The current Marfa version.
|
7
7
|
# @return [String] The version number
|
data/marfa.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marfa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Krechetov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-05-
|
13
|
+
date: 2017-05-31 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: haml
|