signet 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ # 0.3.4
2
+
3
+ * Attempts to auto-detect CA cert location
4
+
1
5
  # 0.3.3
2
6
 
3
7
  * Request objects no longer recreated during processing
@@ -2,16 +2,25 @@ GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
4
  addressable (2.2.8)
5
+ bouncy-castle-java (1.5.0146.1)
5
6
  extlib (0.9.15)
6
7
  faraday (0.7.6)
7
8
  addressable (~> 2.2)
8
9
  multipart-post (~> 1.1)
9
10
  rack (~> 1.1)
11
+ ffi (1.0.11-java)
12
+ jruby-openssl (0.7.7)
13
+ bouncy-castle-java (>= 1.5.0146.1)
10
14
  json (1.7.3)
15
+ json (1.7.3-java)
11
16
  jwt (0.1.4)
12
17
  json (>= 1.2.4)
13
18
  launchy (2.1.0)
14
19
  addressable (~> 2.2.6)
20
+ launchy (2.1.0-java)
21
+ addressable (~> 2.2.6)
22
+ ffi (~> 1.0.9)
23
+ spoon (~> 0.0.1)
15
24
  multi_json (1.3.5)
16
25
  multipart-post (1.1.5)
17
26
  rack (1.4.1)
@@ -19,9 +28,11 @@ GEM
19
28
  rcov (1.0.0)
20
29
  redcarpet (2.1.1)
21
30
  rspec (1.2.9)
31
+ spoon (0.0.1)
22
32
  yard (0.8.1)
23
33
 
24
34
  PLATFORMS
35
+ java
25
36
  ruby
26
37
 
27
38
  DEPENDENCIES
@@ -7,6 +7,8 @@ rescue LoadError
7
7
  require 'compat/securerandom'
8
8
  end
9
9
 
10
+ require 'signet/ssl_config'
11
+
10
12
  module Signet #:nodoc:
11
13
  module OAuth1
12
14
  OUT_OF_BAND = 'oob'
@@ -15,6 +15,7 @@
15
15
  require 'base64'
16
16
  require 'signet'
17
17
  require 'multi_json'
18
+ require 'signet/ssl_config'
18
19
 
19
20
  module Signet #:nodoc:
20
21
  ##
@@ -0,0 +1,54 @@
1
+ if (!ENV['SSL_CERT_FILE'] || !File.exist?(ENV['SSL_CERT_FILE'])) &&
2
+ (!ENV['SSL_CERT_DIR'] || !File.exist?(ENV['SSL_CERT_DIR']))
3
+ # Attempt to copy over from other environment variables or well-known
4
+ # locations. But seriously, just set the environment variables!
5
+ common_ca_file_locations = [
6
+ ENV['CA_FILE'],
7
+ '/usr/local/lib/ssl/certs/ca-certificates.crt',
8
+ '/usr/local/ssl/certs/ca-certificates.crt',
9
+ '/usr/local/share/curl/curl-ca-bundle.crt',
10
+ '/usr/local/etc/openssl/cert.pem',
11
+ '/opt/local/lib/ssl/certs/ca-certificates.crt',
12
+ '/opt/local/ssl/certs/ca-certificates.crt',
13
+ '/opt/local/share/curl/curl-ca-bundle.crt',
14
+ '/opt/local/etc/openssl/cert.pem',
15
+ '/usr/lib/ssl/certs/ca-certificates.crt',
16
+ '/usr/ssl/certs/ca-certificates.crt',
17
+ '/usr/share/curl/curl-ca-bundle.crt',
18
+ '/etc/ssl/certs/ca-certificates.crt',
19
+ '/etc/pki/tls/cert.pem',
20
+ '/etc/pki/CA/cacert.pem',
21
+ 'C:\Windows\curl-ca-bundle.crt',
22
+ 'C:\Windows\ca-bundle.crt',
23
+ 'C:\Windows\cacert.pem',
24
+ './curl-ca-bundle.crt',
25
+ './cacert.pem',
26
+ '~/.cacert.pem'
27
+ ]
28
+ common_ca_path_locations = [
29
+ ENV['CA_PATH'],
30
+ '/usr/local/lib/ssl/certs',
31
+ '/usr/local/ssl/certs',
32
+ '/opt/local/lib/ssl/certs',
33
+ '/opt/local/ssl/certs',
34
+ '/usr/lib/ssl/certs',
35
+ '/usr/ssl/certs',
36
+ '/etc/ssl/certs'
37
+ ]
38
+ ENV['SSL_CERT_FILE'] = nil
39
+ ENV['SSL_CERT_DIR'] = nil
40
+ for location in common_ca_file_locations
41
+ if location && File.exist?(location)
42
+ ENV['SSL_CERT_FILE'] = File.expand_path(location)
43
+ break
44
+ end
45
+ end
46
+ unless ENV['SSL_CERT_FILE']
47
+ for location in common_ca_path_locations
48
+ if location && File.exist?(location)
49
+ ENV['SSL_CERT_DIR'] = File.expand_path(location)
50
+ break
51
+ end
52
+ end
53
+ end
54
+ end
@@ -18,7 +18,7 @@ unless defined? Signet::VERSION
18
18
  module VERSION
19
19
  MAJOR = 0
20
20
  MINOR = 3
21
- TINY = 3
21
+ TINY = 4
22
22
 
23
23
  STRING = [MAJOR, MINOR, TINY].join('.')
24
24
  end
@@ -7,4 +7,5 @@ $:.unshift(lib_dir)
7
7
  $:.unshift(compat_dir)
8
8
  $:.uniq!
9
9
 
10
+ require 'rubygems'
10
11
  require 'signet'
@@ -16,6 +16,7 @@ namespace :spec do
16
16
  end
17
17
  t.rcov_opts = [
18
18
  '--exclude', 'lib\\/compat',
19
+ '--exclude', 'lib\\/signet\\/ssl_config\\.rb',
19
20
  '--exclude', 'spec',
20
21
  '--exclude', '\\.rvm\\/gems',
21
22
  '--exclude', '1\\.8\\/gems',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: signet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-05-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: addressable
16
- requirement: &2160769840 !ruby/object:Gem::Requirement
16
+ requirement: &2156909880 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.2.3
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2160769840
24
+ version_requirements: *2156909880
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: faraday
27
- requirement: &2160769240 !ruby/object:Gem::Requirement
27
+ requirement: &2156909220 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.7.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2160769240
35
+ version_requirements: *2156909220
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: multi_json
38
- requirement: &2160768620 !ruby/object:Gem::Requirement
38
+ requirement: &2156908540 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.0.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2160768620
46
+ version_requirements: *2156908540
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: jwt
49
- requirement: &2160768040 !ruby/object:Gem::Requirement
49
+ requirement: &2156907900 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.1.4
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *2160768040
57
+ version_requirements: *2156907900
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rake
60
- requirement: &2160767280 !ruby/object:Gem::Requirement
60
+ requirement: &2156907300 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 0.8.3
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *2160767280
68
+ version_requirements: *2156907300
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
- requirement: &2160766640 !ruby/object:Gem::Requirement
71
+ requirement: &2156906600 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 1.1.11
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *2160766640
79
+ version_requirements: *2156906600
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: launchy
82
- requirement: &2160766000 !ruby/object:Gem::Requirement
82
+ requirement: &2156905940 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: 2.0.0
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *2160766000
90
+ version_requirements: *2156905940
91
91
  description: ! 'Signet is an OAuth 1.0 / OAuth 2.0 implementation.
92
92
 
93
93
  '
@@ -106,6 +106,7 @@ files:
106
106
  - lib/signet/oauth_1.rb
107
107
  - lib/signet/oauth_2/client.rb
108
108
  - lib/signet/oauth_2.rb
109
+ - lib/signet/ssl_config.rb
109
110
  - lib/signet/version.rb
110
111
  - lib/signet.rb
111
112
  - spec/force_compat/digest/hmac.rb