osm 1.2.18.dev.11 → 1.2.18.dev.12
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 +8 -8
- data/lib/osm/member.rb +6 -7
- data/spec/osm/member_spec.rb +3 -3
- data/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzIwZmViMGJkNTFjNzg0MjA4N2IxYmNmMGQyYTExMDEyYzU4YTUwYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzBlYjljYTQ5YTU0NDJlNjU2ZTJmNzFkNTYxZTI3NzMxMTJkYzgzNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2Q2OTgwNmM1ZmVjZTNlODMyZTU1NjkxMmM1NmI5MmY4MWQ4ZWJlMGIxMTNk
|
10
|
+
MGJmMjUxNmI3NWM2MjY0NzMyZGQ0NzNmN2ZlMmVlNmY3YTRkODZhYTRiZjNl
|
11
|
+
MDA1NTBlMGU0MmQ5NDBiNjM2MDk2OTk5ZDRiMjYyMDNlNWVmNjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDQ4ZTgyYWViYjdmNzJjYzg4YjA0ZmNmYmJiYjNkYWU3MTMxYzBhNGU5YTU0
|
14
|
+
MDhlMmQ2NTE3NzVjZDUwOTg4ZmQ0MDEwMDY1NDJhMDNhOTBiZTYzZWVlMDNh
|
15
|
+
MzdjODAzODIyYmM1Yjg2ZWJlNjE1NDQwOGQ0MGEyMjg2ZWE1OGM=
|
data/lib/osm/member.rb
CHANGED
@@ -217,7 +217,7 @@ module Osm
|
|
217
217
|
receive_phone_2: member_contact[CID_RECIEVE_PHONE_2],
|
218
218
|
receive_email_1: member_contact[CID_RECIEVE_EMAIL_1],
|
219
219
|
receive_email_2: member_contact[CID_RECIEVE_EMAIL_2],
|
220
|
-
additional_information: member_custom.select{ |k,v| !['title'].include?(k) },
|
220
|
+
additional_information: DirtyHashy[ member_custom.select{ |k,v| !['title'].include?(k) } ],
|
221
221
|
additional_information_labels: custom_labels[GID_MEMBER_CONTACT],
|
222
222
|
),
|
223
223
|
:primary_contact => primary_contact.nil? ? nil : PrimaryContact.new(
|
@@ -291,8 +291,8 @@ module Osm
|
|
291
291
|
additional_information: doctor_custom,
|
292
292
|
additional_information_labels: custom_labels[GID_DOCTOR_CONTACT],
|
293
293
|
),
|
294
|
-
additional_information: custom_data.select{ |k,v| !
|
295
|
-
additional_information_labels: custom_labels[GID_CUSTOM].select{ |k,v| !
|
294
|
+
additional_information: DirtyHashy[ custom_data.select{ |k,v| !['title'].include?(k) } ],
|
295
|
+
additional_information_labels: custom_labels[GID_CUSTOM].select{ |k,v| !['title'].include?(k) },
|
296
296
|
)
|
297
297
|
end
|
298
298
|
|
@@ -372,7 +372,7 @@ module Osm
|
|
372
372
|
|
373
373
|
# Do title attribute
|
374
374
|
if force || changed_attributes.include?('title')
|
375
|
-
data = api.perform_query("ext/
|
375
|
+
data = api.perform_query("ext/customdata/?action=updateColumn§ion_id=#{section_id}", {
|
376
376
|
'associated_id' => self.id,
|
377
377
|
'associated_type' => 'member',
|
378
378
|
'value' => title,
|
@@ -383,11 +383,10 @@ module Osm
|
|
383
383
|
updated = updated && data.is_a?(Hash) && data['data'].is_a?(Hash) && data['data']['value'].eql?(title)
|
384
384
|
end
|
385
385
|
|
386
|
-
|
387
386
|
# Do 'floating' attributes
|
388
387
|
if force || changed_attributes.include?('gender')
|
389
388
|
new_value = {male: 'Male', female: 'Female', other: 'Other'}[gender] || 'Unspecified'
|
390
|
-
data = api.perform_query("ext/
|
389
|
+
data = api.perform_query("ext/customdata/?action=updateColumn§ion_id=#{section_id}", {
|
391
390
|
'associated_id' => self.id,
|
392
391
|
'associated_type' => 'member',
|
393
392
|
'value' => new_value,
|
@@ -737,7 +736,7 @@ module Osm
|
|
737
736
|
data["data[#{attr}]"] = additional_information[attr]
|
738
737
|
end
|
739
738
|
|
740
|
-
updated =
|
739
|
+
updated = true
|
741
740
|
unless data.empty?
|
742
741
|
result = api.perform_query("ext/customdata/?action=update§ion_id=#{member.section_id}", {
|
743
742
|
'associated_id' => member.id,
|
data/spec/osm/member_spec.rb
CHANGED
@@ -670,7 +670,7 @@ describe "Member" do
|
|
670
670
|
"value" => "John",
|
671
671
|
}}) { OsmTest::DummyHttpResult.new(:response=>{:code=>'200', :body=>'{"ok":true}'}) }
|
672
672
|
|
673
|
-
HTTParty.should_receive(:post).with('https://www.onlinescoutmanager.co.uk/ext/
|
673
|
+
HTTParty.should_receive(:post).with('https://www.onlinescoutmanager.co.uk/ext/customdata/?action=updateColumn§ion_id=2', {:body => {
|
674
674
|
"apiid" => "1",
|
675
675
|
"token" => "API TOKEN",
|
676
676
|
"userid" => "user_id",
|
@@ -785,7 +785,7 @@ describe "Member" do
|
|
785
785
|
}}) { OsmTest::DummyHttpResult.new(:response=>{:code=>'200', :body=>'{"ok":true}'}) }
|
786
786
|
end
|
787
787
|
|
788
|
-
HTTParty.should_receive(:post).with('https://www.onlinescoutmanager.co.uk/ext/
|
788
|
+
HTTParty.should_receive(:post).with('https://www.onlinescoutmanager.co.uk/ext/customdata/?action=updateColumn§ion_id=2', {:body => {
|
789
789
|
"apiid" => "1",
|
790
790
|
"token" => "API TOKEN",
|
791
791
|
"userid" => "user_id",
|
@@ -886,7 +886,7 @@ describe "Member" do
|
|
886
886
|
"data[test_var]" => "This is a test",
|
887
887
|
}}) { OsmTest::DummyHttpResult.new(:response=>{:code=>'200', :body=>'{"status":true}'}) }
|
888
888
|
|
889
|
-
HTTParty.should_receive(:post).with('https://www.onlinescoutmanager.co.uk/ext/
|
889
|
+
HTTParty.should_receive(:post).with('https://www.onlinescoutmanager.co.uk/ext/customdata/?action=updateColumn§ion_id=2', {:body => {
|
890
890
|
"apiid" => "1",
|
891
891
|
"token" => "API TOKEN",
|
892
892
|
"userid" => "user_id",
|
data/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: osm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.18.dev.
|
4
|
+
version: 1.2.18.dev.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Gauld
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -287,9 +287,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
287
287
|
version: 1.3.1
|
288
288
|
requirements: []
|
289
289
|
rubyforge_project: osm
|
290
|
-
rubygems_version: 2.
|
290
|
+
rubygems_version: 2.4.3
|
291
291
|
signing_key:
|
292
292
|
specification_version: 4
|
293
293
|
summary: Use the Online Scout Manager API
|
294
294
|
test_files: []
|
295
|
-
has_rdoc:
|