restclient_with_cert 0.0.2

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.
@@ -0,0 +1,26 @@
1
+ require 'restclient'
2
+
3
+ module RestClient
4
+ def self.ssl_settings
5
+ {
6
+ :verify_ssl => OpenSSL::SSL::VERIFY_PEER,
7
+ :ssl_ca_file => File.join(File.dirname(__FILE__), 'cert')
8
+ }
9
+ end
10
+
11
+ def self.get(url, headers={}, &block)
12
+ Request.execute(ssl_settings.merge(:method => :get, :url => url, :headers => headers), &block)
13
+ end
14
+
15
+ def self.post(url, payload, headers={}, &block)
16
+ Request.execute(ssl_settings.merge(:method => :post, :url => url, :payload => payload, :headers => headers), &block)
17
+ end
18
+
19
+ def self.put(url, payload, headers={}, &block)
20
+ Request.execute(ssl_settings.merge(:method => :put, :url => url, :payload => payload, :headers => headers), &block)
21
+ end
22
+
23
+ def self.delete(url, headers={}, &block)
24
+ Request.execute(ssl_settings.merge(:method => :delete, :url => url, :headers => headers), &block)
25
+ end
26
+ end
@@ -0,0 +1,17 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "restclient_with_cert"
6
+ s.version = File.read('VERSION')
7
+ s.authors = ["nov matake"]
8
+ s.email = ["nov@matake.jp"]
9
+ s.homepage = "http://github.com/nov/restclient_with_cert"
10
+ s.summary = %q{RestClient with embedded cert}
11
+ s.description = %q{RestClient with embedded cert}
12
+ s.files = `git ls-files`.split("\n")
13
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
14
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
15
+ s.require_paths = ["lib"]
16
+ s.add_runtime_dependency "rest-client", ">= 1.6"
17
+ end
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: restclient_with_cert
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 2
10
+ version: 0.0.2
11
+ platform: ruby
12
+ authors:
13
+ - nov matake
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-03-23 00:00:00 +09:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: rest-client
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 1
32
+ - 6
33
+ version: "1.6"
34
+ type: :runtime
35
+ version_requirements: *id001
36
+ description: RestClient with embedded cert
37
+ email:
38
+ - nov@matake.jp
39
+ executables: []
40
+
41
+ extensions: []
42
+
43
+ extra_rdoc_files: []
44
+
45
+ files:
46
+ - .gitignore
47
+ - Gemfile
48
+ - Rakefile
49
+ - VERSION
50
+ - lib/cert
51
+ - lib/restclient_with_cert.rb
52
+ - restclient_with_cert.gemspec
53
+ has_rdoc: true
54
+ homepage: http://github.com/nov/restclient_with_cert
55
+ licenses: []
56
+
57
+ post_install_message:
58
+ rdoc_options: []
59
+
60
+ require_paths:
61
+ - lib
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ none: false
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ hash: 3
68
+ segments:
69
+ - 0
70
+ version: "0"
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ hash: 3
77
+ segments:
78
+ - 0
79
+ version: "0"
80
+ requirements: []
81
+
82
+ rubyforge_project:
83
+ rubygems_version: 1.5.3
84
+ signing_key:
85
+ specification_version: 3
86
+ summary: RestClient with embedded cert
87
+ test_files: []
88
+