rest-ftp-daemon 0.421.0 → 0.421.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: c257143aa55e12efe93dcd1f9e2829e662a27d33
4
- data.tar.gz: 75b635758132ab9af8e381a9edcca9cfa2b057de
3
+ metadata.gz: 9d5d765b823e1d4589ad7fba0f723c08d08b901d
4
+ data.tar.gz: 9bb488ac0efa76a77a9d2daa006f39e83817065b
5
5
  SHA512:
6
- metadata.gz: 966ca0d76da55605f512de091d853a5a250b2b85cfff0419dc1fbacb54a0065a83b68a11bdb507c8dfaf25834050346d8ec21816ab2d69b806dd2b57d2813989
7
- data.tar.gz: 53d3336b265bb1282c4412d49be9e3a604e8463df9d3fb6d549be7edfe4b9dc010851dac14194bde48d5c45c18126e7e53a55476b9a99618ef1331db42f59460
6
+ metadata.gz: a4a3790911b1e135fd0c217298a0440dbdf60bf605125e0f10f35fe9a70504b670a5b28f4ad7b989da0ac3f00737b44e30309e2615220287f655688977c5fc09
7
+ data.tar.gz: f9fb6bafae5b584f849f6ee403dcceeec684e5ec9d785a56b0dbfb38b290dfd580d48a568a520990816c2302f954cabea83c60911e36fcee4bc1272d701265dc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rest-ftp-daemon (0.421.0)
4
+ rest-ftp-daemon (0.421.1)
5
5
  activesupport (~> 4.2)
6
6
  api-auth
7
7
  aws-sdk-resources (~> 2)
@@ -26,7 +26,6 @@ require_relative "rest-ftp-daemon/job_queue"
26
26
  require_relative "rest-ftp-daemon/counters"
27
27
  require_relative "rest-ftp-daemon/notification"
28
28
  require_relative "rest-ftp-daemon/location"
29
- require_relative "rest-ftp-daemon/pretty_json"
30
29
 
31
30
  # Remotes
32
31
  require_relative "rest-ftp-daemon/remote"
@@ -33,9 +33,22 @@ module RestFtpDaemon
33
33
  do_not_route_head!
34
34
  do_not_route_options!
35
35
  # version 'v1'
36
- format :json
37
- formatter :json, PrettyJSON
36
+
37
+ # Response formats
38
38
  content_type :json, 'application/json; charset=utf-8'
39
+ # format :json
40
+ default_format :json
41
+
42
+ # Pretty JSON
43
+ formatter :json_tmp, ->(object, env) do
44
+ put "----- formatter"
45
+ puts object.inspect
46
+ # JSON.pretty_generate(JSON.parse(object.to_json))
47
+ #if object.respond_to? to_hash
48
+ JSON.pretty_generate(object)
49
+ #end
50
+ put "-----"
51
+ end
39
52
 
40
53
 
41
54
  ### MOUNTPOINTS
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |spec|
3
3
 
4
4
  # Project version
5
- spec.version = "0.421.0"
5
+ spec.version = "0.421.1"
6
6
 
7
7
  # Project description
8
8
  spec.name = "rest-ftp-daemon"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest-ftp-daemon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.421.0
4
+ version: 0.421.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno MEDICI
@@ -436,7 +436,6 @@ files:
436
436
  - lib/rest-ftp-daemon/metrics.rb
437
437
  - lib/rest-ftp-daemon/notification.rb
438
438
  - lib/rest-ftp-daemon/paginate.rb
439
- - lib/rest-ftp-daemon/pretty_json.rb
440
439
  - lib/rest-ftp-daemon/remote.rb
441
440
  - lib/rest-ftp-daemon/remote_ftp.rb
442
441
  - lib/rest-ftp-daemon/remote_s3.rb
@@ -1,5 +0,0 @@
1
- module PrettyJSON
2
- def self.call(object, env)
3
- JSON.pretty_generate(JSON.parse(object.to_json))
4
- end
5
- end