marfa 0.3.3 → 0.4.0

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06f81303b1ce133d6f968b07f63f06ce79b2a7f5
4
- data.tar.gz: 823b23e24e5a5593ce02b3a4364caa8caeaae1c2
3
+ metadata.gz: f14c3d03481a476f3ddfa3a512f24971d74283ec
4
+ data.tar.gz: f5befde9af61a03573b811198275e8ed4c150b8a
5
5
  SHA512:
6
- metadata.gz: 17641058e03e35b7a25e1ce076991c5e16e405a71f10e7af52e20f0b3387bbefd5ce4cc1e1d473558dbdd0026e714ea9bb12f36d67abc44703d9d3ca0f790971
7
- data.tar.gz: ff805dadf363ac08ca12447d5cffcce0b627516dc804babbf4dc6121246c8c18b0ef5fd75f08c13bebfd6c76c5fbc542281307b21f6133a32eb27a0d20f3c6a1
6
+ metadata.gz: 3b42d83c7e4c900257cbb693d0b46b54682983ec67f7c9e2ef00f9bd9aefdaccd1775a575d6d179bfa29b4b401511507eed252cd709c482a6875efc552a8a383
7
+ data.tar.gz: 69d33f58af93235a556e151c0dcdb36127a69378569cd0012f4853207863da24f01485b262eecf861bc1811028fb6af462b0e54789fa98cfee78a50ec64b4d1c
@@ -47,10 +47,14 @@ module Marfa
47
47
 
48
48
  # Default settings fields for apps
49
49
  def self._default_settings
50
- @_default_settings = [
51
- 'public_folder',
52
- 'static_cache_control',
53
- 'views'
50
+ @_default_settings = %w[
51
+ public_folder
52
+ static_cache_control
53
+ views
54
+ environment
55
+ logging
56
+ dump_errors
57
+ show_exceptions
54
58
  ]
55
59
  end
56
60
  end
@@ -20,32 +20,6 @@ module Marfa
20
20
  get_raw_data(params)
21
21
  end
22
22
 
23
- # Method that make request to delete data from API
24
- # @param model_id [Fixnum] id to delete
25
- # @example
26
- # BaseModel.delete(19)
27
- # @return [Hash]
28
- def self.delete(model_id)
29
- model_name = name.downcase
30
- # data = {}
31
-
32
- # begin
33
- # path = "#{Marfa.config.api_server}#{model_name}/#{model_id.to_s}"
34
- # response = RestClient.delete(path, { params: {}, headers: {} })
35
- # data = JSON.parse(response.body, symbolize_names: true)
36
- # rescue
37
- # p '404 or ParserError'
38
- # end
39
-
40
- # Temporary code
41
- p "#{Marfa.config.api_server}#{model_name}/#{model_id}"
42
- p model_id
43
-
44
- data = { deleted: true }
45
- Marfa.cache.delete_by_pattern(model_name)
46
- data
47
- end
48
-
49
23
  # "Raw" data getting
50
24
  # @param params [Hash] - options hash
51
25
  # @example
@@ -58,8 +32,15 @@ module Marfa
58
32
  begin
59
33
  response = RestClient.get("#{Marfa.config.api_server}#{path}", { params: params[:query], headers: {} })
60
34
  result = JSON.parse(response.body, symbolize_names: true)
61
- rescue
62
- p '404 or ParserError'
35
+ rescue => exception
36
+ if [:development, :test].include? Marfa.config.environment
37
+ p '========== Exception while making request: =========='
38
+ p "Path: #{Marfa.config.api_server}#{path}"
39
+ p 'Params:'
40
+ p params
41
+ p "#{exception.message} (#{exception.class})"
42
+ p '=================================================='
43
+ end
63
44
  end
64
45
 
65
46
  result
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.3.3' unless defined?(Marfa::VERSION)
4
+ VERSION = '0.4.0' 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.3.3'
6
+ s.version = '0.4.0'
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.3.3
4
+ version: 0.4.0
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-04-04 00:00:00.000000000 Z
13
+ date: 2017-04-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: haml