red_cap 0.10.1 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 548a2917880445961da395c7e6cb919742081d1546ad263a97b05370d245e367
4
- data.tar.gz: fc5af8c1d627df9a676c9601717c4762ce20ee11cead6537a65ea3281a01c809
3
+ metadata.gz: 1fdeb538ef1b6a15206fd4b8c5740d4d1fbf9783cba68127978c8755fe6a049d
4
+ data.tar.gz: f4432a421d801a88ec399c5cec3c7ef23841ece65ffa19455d1d81f697b2671a
5
5
  SHA512:
6
- metadata.gz: 4a5b068a672ce14f724ca8eda13342eae10c4644ca3bdaa0b94ac699e6beca0cd7763ea1f91d10cd43406d7bb00fc3bc3156563ebab7afa06c3e78e582fe73fe
7
- data.tar.gz: 197a12410f3266cece116ba14aaef2cdc4925863751367380a1430e59b6fd1a875d481d9727640d59885d8d763d8e5825f5d13413e325dfe9f2c9e567d8c7d80
6
+ metadata.gz: 1cabed5f7e14636dfec7fb57b5418447f8b4599456416d02ba00158e807fb7dd75daf54bdaff6632a4f259a62c85af155f7c5b70b7869fe47a1b8dd92e8ff3e0
7
+ data.tar.gz: da4e1817013cd5f857c29b2d591e84b9e1b9adbd604c25c42619031fdebe94058038d419d6cfb40ceaf5d71536fbfddd3f0bf6ea0f6d1787ad8a519800738284
data/.gitignore CHANGED
@@ -10,3 +10,5 @@
10
10
 
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
+ .ruby-version
14
+ .ruby-gemset
@@ -47,7 +47,7 @@ class REDCap
47
47
  record: record_id,
48
48
  field: file_id,
49
49
  })
50
- _, type, filename = *response.headers["content-type"].match(/\A(.+); name=\"(.+)\"\z/)
50
+ _, type, filename = *response.headers["content-type"].match(/\A(.+); name=\"(.+)\"/)
51
51
  File.new(response.body, type, filename)
52
52
  end
53
53
 
@@ -1,3 +1,3 @@
1
1
  class REDCap
2
- VERSION = "0.10.1"
2
+ VERSION = "0.11.0"
3
3
  end
data/lib/red_cap.rb CHANGED
@@ -15,6 +15,14 @@ class REDCap
15
15
  end
16
16
  end
17
17
 
18
+ def initialize url: REDCap.url, token: REDCap.token, per_page: REDCap.per_page
19
+ @url = url
20
+ @token = token
21
+ @per_page = per_page
22
+ end
23
+
24
+ attr_accessor :url, :token, :per_page
25
+
18
26
  def form
19
27
  @form ||= Form.new(client.metadata)
20
28
  end
@@ -46,7 +54,7 @@ class REDCap
46
54
  private
47
55
 
48
56
  def client
49
- @client ||= Client.new
57
+ @client ||= Client.new(url: url, token: token, per_page: per_page)
50
58
  end
51
59
  end
52
60
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: red_cap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-05 00:00:00.000000000 Z
11
+ date: 2023-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -89,8 +89,6 @@ extra_rdoc_files: []
89
89
  files:
90
90
  - ".gitignore"
91
91
  - ".rspec"
92
- - ".ruby-gemset"
93
- - ".ruby-version"
94
92
  - ".travis.yml"
95
93
  - Gemfile
96
94
  - LICENSE.txt
@@ -123,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
121
  - !ruby/object:Gem::Version
124
122
  version: '0'
125
123
  requirements: []
126
- rubygems_version: 3.0.4
124
+ rubygems_version: 3.3.26
127
125
  signing_key:
128
126
  specification_version: 4
129
127
  summary: Library for connecting to REDCap and parsing forms and data
data/.ruby-gemset DELETED
@@ -1 +0,0 @@
1
- red_cap
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- ruby-2.4.3