active_cmis 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,7 +23,7 @@ module ActiveCMIS
23
23
  def self.connect(config)
24
24
  if config.is_a? Hash
25
25
  if config.has_key? "log_file"
26
- trace_file = config["trace_file"]
26
+ trace_file = config["log_file"]
27
27
  if trace_file == "-"
28
28
  trace_file = STDOUT
29
29
  end
@@ -32,7 +32,7 @@ module ActiveCMIS
32
32
  logger = default_logger
33
33
  end
34
34
  if config.has_key? "log_level"
35
- logger.level = Logger.const_get(config["trace_level"].upcase) rescue config["trace_level"].to_i
35
+ logger.level = (Logger.const_get(config["log_level"].upcase) rescue config["log_level"].to_i)
36
36
  else
37
37
  logger.level = Logger::WARN
38
38
  end
@@ -128,8 +128,20 @@ module ActiveCMIS
128
128
  end
129
129
  end
130
130
 
131
+ def http_class
132
+ @http_class ||= begin
133
+ if proxy = ENV['HTTP_PROXY'] || ENV['http_proxy'] then
134
+ p_uri = URI.parse(proxy)
135
+ p_user, p_pass = p_uri.user, p_uri.password if p_uri.user
136
+ Net::HTTP::Proxy(p_uri.host, p_uri.port, p_user, p_pass)
137
+ else
138
+ Net::HTTP
139
+ end
140
+ end
141
+ end
142
+
131
143
  def authenticate_request(uri, req)
132
- http = Net::HTTP.new(uri.host, uri.port)
144
+ http = http_class.new(uri.host, uri.port)
133
145
  if uri.scheme == 'https'
134
146
  http.use_ssl = true
135
147
  end
@@ -352,9 +352,9 @@ module ActiveCMIS
352
352
  end
353
353
  xml["at"].title attributes["cmis:name"]
354
354
  if attributes["cmis:objectId"]
355
- xml["at"].id attributes["cmis:objectId"]
355
+ xml["at"].id_ attributes["cmis:objectId"]
356
356
  else
357
- xml["at"].id "random-garbage"
357
+ xml["at"].id_ "random-garbage"
358
358
  end
359
359
  xml["cra"].object do
360
360
  xml["c"].properties do
@@ -2,7 +2,7 @@ module ActiveCMIS
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- PATCH = 12
5
+ PATCH = 13
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,29 +1,39 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_cmis
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 1
4
5
  prerelease:
5
- version: 0.1.12
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 13
10
+ version: 0.1.13
6
11
  platform: ruby
7
12
  authors:
8
- - Joeri Samson
13
+ - Joeri Samson
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
17
 
13
- date: 2011-04-08 00:00:00 +02:00
18
+ date: 2011-04-09 00:00:00 +02:00
14
19
  default_executable:
15
20
  dependencies:
16
- - !ruby/object:Gem::Dependency
17
- name: nokogiri
18
- prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
20
- none: false
21
- requirements:
22
- - - ">="
23
- - !ruby/object:Gem::Version
24
- version: 1.4.1
25
- type: :runtime
26
- version_requirements: *id001
21
+ - !ruby/object:Gem::Dependency
22
+ name: nokogiri
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 5
30
+ segments:
31
+ - 1
32
+ - 4
33
+ - 1
34
+ version: 1.4.1
35
+ type: :runtime
36
+ version_requirements: *id001
27
37
  description: A CMIS library implementing both reading and updating capabilities through the AtomPub/REST binding to CMIS.
28
38
  email: joeri@xaop.com
29
39
  executables: []
@@ -31,38 +41,38 @@ executables: []
31
41
  extensions: []
32
42
 
33
43
  extra_rdoc_files:
34
- - LICENSE
35
- - README.md
36
- - TODO
44
+ - LICENSE
45
+ - README.md
46
+ - TODO
37
47
  files:
38
- - LICENSE
39
- - README.md
40
- - Rakefile
41
- - TODO
42
- - lib/active_cmis.rb
43
- - lib/active_cmis/acl.rb
44
- - lib/active_cmis/acl_entry.rb
45
- - lib/active_cmis/active_cmis.rb
46
- - lib/active_cmis/atomic_types.rb
47
- - lib/active_cmis/attribute_prefix.rb
48
- - lib/active_cmis/collection.rb
49
- - lib/active_cmis/document.rb
50
- - lib/active_cmis/exceptions.rb
51
- - lib/active_cmis/folder.rb
52
- - lib/active_cmis/internal/caching.rb
53
- - lib/active_cmis/internal/connection.rb
54
- - lib/active_cmis/internal/utils.rb
55
- - lib/active_cmis/ns.rb
56
- - lib/active_cmis/object.rb
57
- - lib/active_cmis/policy.rb
58
- - lib/active_cmis/property_definition.rb
59
- - lib/active_cmis/rel.rb
60
- - lib/active_cmis/relationship.rb
61
- - lib/active_cmis/rendition.rb
62
- - lib/active_cmis/repository.rb
63
- - lib/active_cmis/server.rb
64
- - lib/active_cmis/type.rb
65
- - lib/active_cmis/version.rb
48
+ - LICENSE
49
+ - README.md
50
+ - Rakefile
51
+ - TODO
52
+ - lib/active_cmis.rb
53
+ - lib/active_cmis/acl.rb
54
+ - lib/active_cmis/acl_entry.rb
55
+ - lib/active_cmis/active_cmis.rb
56
+ - lib/active_cmis/atomic_types.rb
57
+ - lib/active_cmis/attribute_prefix.rb
58
+ - lib/active_cmis/collection.rb
59
+ - lib/active_cmis/document.rb
60
+ - lib/active_cmis/exceptions.rb
61
+ - lib/active_cmis/folder.rb
62
+ - lib/active_cmis/internal/caching.rb
63
+ - lib/active_cmis/internal/connection.rb
64
+ - lib/active_cmis/internal/utils.rb
65
+ - lib/active_cmis/ns.rb
66
+ - lib/active_cmis/object.rb
67
+ - lib/active_cmis/policy.rb
68
+ - lib/active_cmis/property_definition.rb
69
+ - lib/active_cmis/rel.rb
70
+ - lib/active_cmis/relationship.rb
71
+ - lib/active_cmis/rendition.rb
72
+ - lib/active_cmis/repository.rb
73
+ - lib/active_cmis/server.rb
74
+ - lib/active_cmis/type.rb
75
+ - lib/active_cmis/version.rb
66
76
  has_rdoc: true
67
77
  homepage: http://xaop.com/labs/activecmis/
68
78
  licenses: []
@@ -71,23 +81,31 @@ post_install_message:
71
81
  rdoc_options: []
72
82
 
73
83
  require_paths:
74
- - lib
84
+ - lib
75
85
  required_ruby_version: !ruby/object:Gem::Requirement
76
86
  none: false
77
87
  requirements:
78
- - - ">="
79
- - !ruby/object:Gem::Version
80
- version: 1.8.6
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ hash: 59
91
+ segments:
92
+ - 1
93
+ - 8
94
+ - 6
95
+ version: 1.8.6
81
96
  required_rubygems_version: !ruby/object:Gem::Requirement
82
97
  none: false
83
98
  requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- version: "0"
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ hash: 3
102
+ segments:
103
+ - 0
104
+ version: "0"
87
105
  requirements: []
88
106
 
89
107
  rubyforge_project:
90
- rubygems_version: 1.5.1
108
+ rubygems_version: 1.6.2
91
109
  signing_key:
92
110
  specification_version: 3
93
111
  summary: A library to interact with CMIS repositories through the AtomPub/REST binding