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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c0759f81941c873aa1735687444f031c919ea122
4
- data.tar.gz: 5a395cc867d247b1524bc8447b168296fdb8065a
3
+ metadata.gz: 90641f7d5612ca1b78d65e6d47bc7b39367edcd6
4
+ data.tar.gz: 3df9aa6915e89d571bf023bda9513937466cb237
5
5
  SHA512:
6
- metadata.gz: 8f396b685edab492541f969c49cc10e83ae1e9a5685c1c7addee2cd87a311f0c8aa16c9594b3bc44c89e5c36c68bb8d87284c8209bc18a940c397c20c68f1196
7
- data.tar.gz: a00519de9f1b9ed6c32c04e3e61391585a6b2c22ed75306750e702d058abc18adef2205cc7850ad3e4df1058e67f35fc0b04a453109d7dbe2d88b00dda2db14c
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(/\w+/).join('_')
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(/\w+/).join('_')
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.0' unless defined?(Marfa::VERSION)
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
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'marfa'
6
- s.version = '0.5.0'
6
+ s.version = '0.5.1'
7
7
  s.required_ruby_version = '>= 2.3.0'
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.date = Time.now.strftime('%Y-%m-%d')
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.0
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-26 00:00:00.000000000 Z
13
+ date: 2017-05-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: haml