barthes 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -13,6 +13,7 @@ end
13
13
  system "git add lib/barthes/version.rb"
14
14
  system "git commit -m 'version up to #{version}'"
15
15
  system "git push origin master"
16
+ system "git push --tags"
16
17
  system "rake build"
17
18
  system "gem push pkg/barthes-#{version}.gem"
18
19
  end
@@ -7,7 +7,7 @@ module Barthes
7
7
  def initialize(env)
8
8
  @env = env.dup
9
9
  client_class = @env['client_class'] ? @env['client_class'].constantize : Barthes::Client::HTTParty
10
- @client = client_class.new(env)
10
+ @client = client_class.new(evalute_params env)
11
11
  end
12
12
 
13
13
  def indent(size, string)
@@ -8,10 +8,20 @@ module Barthes
8
8
 
9
9
  def initialize(env)
10
10
  @env = env
11
+ set_proxy
12
+ end
13
+
14
+ def set_proxy
15
+ if proxy_uri = ENV['HTTP_PROXY']
16
+ uri = URI.parse(proxy_uri)
17
+ self.class.http_proxy uri.host, uri.port
18
+ end
11
19
  end
12
20
 
13
21
  def action(params)
14
22
  url = @env['path'] ? @env['endpoint'] + @env['path'] : @env['endpoint']
23
+ headers = @env['header'] ? @env['header'] : {}
24
+ # TODO: method
15
25
  self.class.post(url, query: params)
16
26
  end
17
27
 
@@ -1,3 +1,3 @@
1
1
  module Barthes
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: barthes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-11-05 00:00:00.000000000 Z
12
+ date: 2014-11-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler