collectiveaccess 0.2.2 → 0.2.3

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: d00ccf45255fc0a19c4a7043b92a8e763176bf23
4
- data.tar.gz: 3cd38501963b88a784a19bd391465c5651481689
3
+ metadata.gz: f214fd67f1d846016cd6bd39b33bb94f10c2e0a7
4
+ data.tar.gz: 0dcce4f10c37c30d5007ab8c8fc92ef8ef12c7e5
5
5
  SHA512:
6
- metadata.gz: accc3a54849e185553cec9e58a534078140f88f33bbdb5cc6cadeae819e8c8de2e9e869f4188d625642dfa6aa04beaa4abb477e51b9349f5beef33b0b86de566
7
- data.tar.gz: 8aa9868368e1f745584abb700948d3a507417154d2acf3f611afe0e2b347f6a382bf2ba10733a170a62cd9b398ee010784ded39f32441d1374d49379d5569483
6
+ metadata.gz: ed30a0729c3c5fe35df3c160d53fbaacd7ddaffd3d756849fb8e03b882d275fe945e5c1009cb6c1189eaa403df5fd1e60afe75eef46f4bd5ac597c3dad35412f
7
+ data.tar.gz: 8a026a82c10da8b535b2d434e1b4da871e2eb98dae7e5d006e2252cf14c16db48757f8ae2897612fa5f0e32f22241b77e3d1bfc19e784d0ea1f4001e3c3ca9a0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: collectiveaccess 0.2.2 ruby lib
5
+ # stub: collectiveaccess 0.2.3 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "collectiveaccess"
9
- s.version = "0.2.2"
9
+ s.version = "0.2.3"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["CollectiveAccess", "Stefan"]
14
- s.date = "2015-09-01"
14
+ s.date = "2016-02-25"
15
15
  s.description = "This gem is a simple plain Ruby wrapper for the CollectiveAccess Web Service API. For more info see https://github.com/CollectiveAccessProject/collectiveaccess"
16
16
  s.email = "info@collectiveaccess.org"
17
17
  s.extra_rdoc_files = [
@@ -21,7 +21,8 @@ class CollectiveAccess
21
21
  request_body: {},
22
22
  get_params: {},
23
23
  url_string: '',
24
- verify: false
24
+ verify: false,
25
+ port: 80
25
26
  }
26
27
 
27
28
 
@@ -98,6 +99,7 @@ class CollectiveAccess
98
99
  def self.build_uri(opts)
99
100
 
100
101
  uri_opts = { :host => opts[:hostname],
102
+ :port => opts[:port],
101
103
  :path => opts[:url_root]+opts[:script_name]+'/'+opts[:endpoint]+'/'+opts[:table_name]+'/'+opts[:url_string],
102
104
  :query => URI.encode_www_form(opts[:get_params].merge(authToken: stored_auth_token)) }
103
105
 
@@ -116,6 +118,7 @@ class CollectiveAccess
116
118
  def self.build_simple_uri(opts)
117
119
  # URI available params: scheme, userinfo, host, port, registry, path, opaque, query and fragment
118
120
  uri_opts = { :host => opts[:hostname],
121
+ :port => opts[:port],
119
122
  :path => opts[:url_root]+opts[:script_name]+'/simple/'+opts[:endpoint],
120
123
  :query => URI.encode_www_form(opts[:get_params].merge(authToken: stored_auth_token)) }
121
124
 
@@ -137,6 +140,7 @@ class CollectiveAccess
137
140
  def self.authenticate(request_opts = {})
138
141
  opts = parse_options request_opts
139
142
  uri_opts = { :host => opts[:hostname],
143
+ :port => opts[:port],
140
144
  :path => opts[:url_root] + '/service.php/auth/login',
141
145
  :query => URI.encode_www_form(opts[:get_params]) }
142
146
 
@@ -191,6 +195,7 @@ class CollectiveAccess
191
195
  raise 'table_name should be a String' unless parsed_options[:table_name].is_a?(String)
192
196
  raise 'endpoint should be a String' unless parsed_options[:endpoint].is_a?(String)
193
197
  raise 'url_string should be a String' unless parsed_options[:url_string].is_a?(String)
198
+ raise 'port should be an Integer' unless parsed_options[:port].is_a?(Integer)
194
199
 
195
200
  raise 'request_body should be a Hash' unless parsed_options[:request_body].is_a?(Hash)
196
201
  raise 'get_params should be a Hash' unless parsed_options[:get_params].is_a?(Hash)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collectiveaccess
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - CollectiveAccess
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-09-01 00:00:00.000000000 Z
12
+ date: 2016-02-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty