attache_api 0.1.0 → 0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6234cecf6d434e8f65123cbd50ef9581f0709a05
4
- data.tar.gz: 1862332795ac61a53a672648ebd921ffc7b61f75
3
+ metadata.gz: b44c9e3701ea10a937bd3628fb9a463e653800b2
4
+ data.tar.gz: c4c154e440947bcb0d2538302b3dd0ace671b776
5
5
  SHA512:
6
- metadata.gz: 84b45cd11248eaef66edee79eb0d38e90fedc89de43d813bb5946284700b03db2b387b9518c3d95de7fa15bc72421ca8cc77f33b176abf31b124fd7c13a493b8
7
- data.tar.gz: fa285b2519c2e9d1be70698f24de8b39d9e8364725e2e0fc15ef3b31bc41e55b6cba655a3734c5d314135c258a061486603962be7db4b613468f6636fd8c39b7
6
+ metadata.gz: cd5be5acf6943f2d89c4110940e02728fdf62cbacac685c4b3ce316fa123ae9b2aa527382adad92c51c8bab8cd1f3bc887368d3545cc02c6bd15557f1e4fe464
7
+ data.tar.gz: 249b6211a14a71fc191ed19e94f6cf714d3f5c0028b3bbe4ceb0ad96294524d4354a0a571588e238481b67992a89435dfcfffd6a036f8e21fa11d406f17ef4e2
@@ -37,7 +37,6 @@ module Attache
37
37
  V1.attache_delete(*files.uniq) unless files.empty?
38
38
  rescue Exception
39
39
  raise if ENV['ATTACHE_DISCARD_FAILURE_RAISE_ERROR']
40
- STDERR.puts [$!, $@]
41
40
  end
42
41
  end
43
42
  end
@@ -0,0 +1,13 @@
1
+ require "attache/api/v1"
2
+
3
+ Attache::API::V1::HTTPClient.class_eval do
4
+ def post(*args)
5
+ Struct.new(:body).new.tap do |response|
6
+ response.body = '{}' # empty json
7
+ end
8
+ end
9
+
10
+ def post_content(*args)
11
+ ""
12
+ end
13
+ end
@@ -7,6 +7,8 @@ require 'cgi'
7
7
  module Attache
8
8
  module API
9
9
  module V1
10
+ class HTTPClient < ::HTTPClient; end # local reference
11
+
10
12
  ATTACHE_URL = ENV.fetch('ATTACHE_URL') { "http://localhost:9292" }
11
13
  ATTACHE_UPLOAD_URL = ENV.fetch('ATTACHE_UPLOAD_URL') { "#{ATTACHE_URL}/upload" }
12
14
  ATTACHE_DOWNLOAD_URL = ENV.fetch('ATTACHE_DOWNLOAD_URL') { "#{ATTACHE_URL}/view" }
@@ -1,5 +1,5 @@
1
1
  module Attache
2
2
  module API
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attache_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - choonkeat
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-13 00:00:00.000000000 Z
11
+ date: 2015-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient
@@ -106,6 +106,7 @@ files:
106
106
  - Rakefile
107
107
  - lib/attache/api.rb
108
108
  - lib/attache/api/model.rb
109
+ - lib/attache/api/test.rb
109
110
  - lib/attache/api/utils.rb
110
111
  - lib/attache/api/v1.rb
111
112
  - lib/attache/api/version.rb