the-city-admin 0.1.0 → 0.1.1
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.
- data/.autotest +9 -0
- data/.gitignore +4 -0
- data/.rspec +2 -0
- data/.rvmrc +1 -0
- data/.yardoc/checksums +50 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +51 -0
- data/README +1 -0
- data/Rakefile +32 -0
- data/index.rb +123 -0
- data/lib/common.rb +163 -72
- data/lib/the_city_admin.rb +2 -2
- data/notes.txt +21 -0
- data/spec/api/address_list_spec.rb +0 -0
- data/spec/api/address_spec.rb +0 -0
- data/spec/api/group_address_list_spec.rb +93 -0
- data/spec/api/group_address_spec.rb +19 -0
- data/spec/api/group_checkin_list_spec.rb +93 -0
- data/spec/api/group_event_attendance_list_spec.rb +93 -0
- data/spec/api/group_export_spec.rb +19 -0
- data/spec/api/group_invitation_list_spec.rb +23 -0
- data/spec/api/group_invitation_spec.rb +19 -0
- data/spec/api/group_list_spec.rb +23 -0
- data/spec/api/group_role_list_spec.rb +23 -0
- data/spec/api/group_role_spec.rb +19 -0
- data/spec/api/group_spec.rb +19 -0
- data/spec/api/group_tag_list_spec.rb +23 -0
- data/spec/api/group_tag_spec.rb +19 -0
- data/spec/api/metric_list_spec.rb +22 -0
- data/spec/api/metric_measurement_list_spec.rb +23 -0
- data/spec/api/metric_measurement_spec.rb +19 -0
- data/spec/api/metric_spec.rb +19 -0
- data/spec/api/role_list_spec.rb +75 -0
- data/spec/api/role_spec.rb +19 -0
- data/spec/api/skill_list_spec.rb +76 -0
- data/spec/api/skilled_user_id_list_spec.rb +82 -0
- data/spec/api/skilled_user_list_spec.rb +82 -0
- data/spec/api/tag_group_list_spec.rb +72 -0
- data/spec/api/tag_list_spec.rb +77 -0
- data/spec/api/tag_spec.rb +19 -0
- data/spec/api/terminology_list_spec.rb +75 -0
- data/spec/api/terminology_spec.rb +19 -0
- data/spec/api/user_address_list_spec.rb +92 -0
- data/spec/api/user_address_spec.rb +19 -0
- data/spec/api/user_admin_privilege_list_spec.rb +94 -0
- data/spec/api/user_admin_privilege_spec.rb +19 -0
- data/spec/api/user_barcode_spec.rb +19 -0
- data/spec/api/user_family_list_spec.rb +91 -0
- data/spec/api/user_family_member_spec.rb +19 -0
- data/spec/api/user_invitation_list_spec.rb +91 -0
- data/spec/api/user_invitation_spec.rb +19 -0
- data/spec/api/user_list_spec.rb +76 -0
- data/spec/api/user_note_list_spec.rb +91 -0
- data/spec/api/user_note_spec.rb +19 -0
- data/spec/api/user_process_list_spec.rb +90 -0
- data/spec/api/user_process_spec.rb +19 -0
- data/spec/api/user_role_list_spec.rb +92 -0
- data/spec/api/user_role_spec.rb +18 -0
- data/spec/api/user_skill_list_spec.rb +91 -0
- data/spec/api/user_skill_spec.rb +19 -0
- data/spec/api/user_spec.rb +37 -0
- data/spec/api/web_hook_list_spec.rb +75 -0
- data/spec/api/web_hook_spec.rb +19 -0
- data/spec/factories/address.rb +21 -0
- data/spec/factories/address_list.rb +13 -0
- data/spec/factories/checkin.rb +35 -0
- data/spec/factories/checkin_list.rb +13 -0
- data/spec/factories/group.rb +30 -0
- data/spec/factories/group_address.rb +21 -0
- data/spec/factories/group_address_list.rb +13 -0
- data/spec/factories/group_checkin.rb +35 -0
- data/spec/factories/group_checkin_list.rb +13 -0
- data/spec/factories/group_event_attendance.rb +19 -0
- data/spec/factories/group_event_attendance_list.rb +13 -0
- data/spec/factories/group_export.rb +16 -0
- data/spec/factories/group_export_list.rb +13 -0
- data/spec/factories/group_role.rb +19 -0
- data/spec/factories/group_tag.rb +12 -0
- data/spec/factories/role.rb +22 -0
- data/spec/factories/role_list.rb +13 -0
- data/spec/factories/skill.rb +13 -0
- data/spec/factories/skill_list.rb +13 -0
- data/spec/factories/skilled_user_id_list.rb +13 -0
- data/spec/factories/skilled_user_list.rb +13 -0
- data/spec/factories/tag.rb +13 -0
- data/spec/factories/tag_group_list.rb +13 -0
- data/spec/factories/tag_list.rb +13 -0
- data/spec/factories/terminology.rb +10 -0
- data/spec/factories/terminology_list.rb +13 -0
- data/spec/factories/user.rb +51 -0
- data/spec/factories/user_address.rb +19 -0
- data/spec/factories/user_address_list.rb +13 -0
- data/spec/factories/user_admin_privilege.rb +11 -0
- data/spec/factories/user_admin_privilege_list.rb +13 -0
- data/spec/factories/user_barcode.rb +15 -0
- data/spec/factories/user_family_list.rb +13 -0
- data/spec/factories/user_family_member.rb +28 -0
- data/spec/factories/user_invitation.rb +16 -0
- data/spec/factories/user_invitation_list.rb +13 -0
- data/spec/factories/user_list.rb +13 -0
- data/spec/factories/user_note.rb +28 -0
- data/spec/factories/user_note_list.rb +13 -0
- data/spec/factories/user_process.rb +11 -0
- data/spec/factories/user_process_list.rb +13 -0
- data/spec/factories/user_role.rb +17 -0
- data/spec/factories/user_role_list.rb +13 -0
- data/spec/factories/user_skill.rb +10 -0
- data/spec/factories/user_skill_list.rb +13 -0
- data/spec/factories/web_hook.rb +12 -0
- data/spec/factories/web_hook_list.rb +13 -0
- data/spec/functional/the_city_admin_spec.rb +20 -0
- data/spec/readers/user_reader_spec.rb +7 -0
- data/spec/spec_helper.rb +31 -0
- data/spec/writers/skill_writer_spec.rb +0 -0
- data/spec/writers/tag_writer_spec.rb +80 -0
- data/spec/writers/user_writer_spec.rb +80 -0
- data/status.txt +187 -0
- data/test_scripts/addresses.rb +36 -0
- data/test_scripts/barcodes_checkins.rb +45 -0
- data/test_scripts/city_keys.rb +6 -0
- data/test_scripts/familes.rb +83 -0
- data/test_scripts/groups.rb +124 -0
- data/test_scripts/metrics.rb +72 -0
- data/test_scripts/roles.rb +94 -0
- data/test_scripts/skills.rb +55 -0
- data/test_scripts/tags.rb +71 -0
- data/test_scripts/terminology.rb +62 -0
- data/test_scripts/users.rb +325 -0
- data/test_scripts/webhooks.rb +57 -0
- data/thecity_admin_api.gemspec +39 -0
- data/thecity_headers.rb +27 -0
- metadata +238 -3
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module TheCity
|
|
2
|
+
FactoryGirl.define do
|
|
3
|
+
|
|
4
|
+
factory :address, :class => TheCity::Address do
|
|
5
|
+
city "Sammamish"
|
|
6
|
+
created_at "04/30/2012 11:54 PM (UTC)"
|
|
7
|
+
latitude 47.60918
|
|
8
|
+
updated_at "05/01/2012 12:00 AM (UTC)"
|
|
9
|
+
zipcode nil
|
|
10
|
+
id 1027473241
|
|
11
|
+
street "12345 Main"
|
|
12
|
+
location_type "Host"
|
|
13
|
+
privacy "Private"
|
|
14
|
+
longitude -122.059499
|
|
15
|
+
state nil
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module TheCity
|
|
2
|
+
FactoryGirl.define do
|
|
3
|
+
|
|
4
|
+
factory :checkin, :class => TheCity::Checkin do
|
|
5
|
+
#group {"name" => "Third Grade", "external_id" => nil, "id" => 494538351}
|
|
6
|
+
checked_out_by_user nil
|
|
7
|
+
special_instructions "No snacks!"
|
|
8
|
+
parent_group_name "Ballard Childrens ministry"
|
|
9
|
+
callboard_number "102"
|
|
10
|
+
checked_in_at "07/16/2012 07:59 PM (UTC)"
|
|
11
|
+
barcode "12BB97E001"
|
|
12
|
+
checked_in_user "Johnny Shepherd"
|
|
13
|
+
checked_in_user_id 282384270
|
|
14
|
+
id 3
|
|
15
|
+
checked_in_by_user "Pastor Sam Shepherd"
|
|
16
|
+
checked_in_by_user_id 946060874
|
|
17
|
+
parent_receipt_barcode "BC6C285ACE5"
|
|
18
|
+
# event {"id" => 587598132,
|
|
19
|
+
# "title" => "5 PM Service",
|
|
20
|
+
# "starting_at" => "07/10/2012 12:00 AM (UTC)",
|
|
21
|
+
# "ending_at" => "07/10/2012 01:30 AM (UTC)"}
|
|
22
|
+
checked_in_user_notes "Gluten-Free"
|
|
23
|
+
checked_out_at nil
|
|
24
|
+
parent_group_id 49861013
|
|
25
|
+
pager_number 45
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module TheCity
|
|
2
|
+
FactoryGirl.define do
|
|
3
|
+
|
|
4
|
+
factory :group, :class => TheCity::Group do
|
|
5
|
+
name "The Group"
|
|
6
|
+
admin_url "http://church.onthecity.org/admin/groups/1445"
|
|
7
|
+
created_at "2009-03-16T03:39:05-07:00"
|
|
8
|
+
started_as_seed false
|
|
9
|
+
offline_user_ids [ 94769, 48583 ]
|
|
10
|
+
campus_name "The Campus"
|
|
11
|
+
nearest_neighborhood_id nil
|
|
12
|
+
nickname ""
|
|
13
|
+
group_type "Service"
|
|
14
|
+
internal_url "http://church.onthecity.org/groups/1445"
|
|
15
|
+
id 1445
|
|
16
|
+
nearest_neighborhood_name nil
|
|
17
|
+
plaza_url "http://church.onthecity.org/plaza?group_id=1445"
|
|
18
|
+
smart_large_profile_pic "http://church.onthecity.org/image_service/10/1445/false/group_large_profile"
|
|
19
|
+
campus_id 1245
|
|
20
|
+
parent_id 1245
|
|
21
|
+
external_description ""
|
|
22
|
+
api_url "https://api.onthecity.org/groups/1445"
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module TheCity
|
|
2
|
+
FactoryGirl.define do
|
|
3
|
+
|
|
4
|
+
factory :group_address, :class => TheCity::GroupAddress do
|
|
5
|
+
city "Sammamish"
|
|
6
|
+
created_at "04/30/2012 11:54 PM (UTC)"
|
|
7
|
+
latitude 47.60918
|
|
8
|
+
updated_at "05/01/2012 12:00 AM (UTC)"
|
|
9
|
+
zipcode nil
|
|
10
|
+
id 1027473241
|
|
11
|
+
street "12345 Main"
|
|
12
|
+
location_type "Host"
|
|
13
|
+
privacy "Private"
|
|
14
|
+
longitude -122.059499
|
|
15
|
+
state nil
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module TheCity
|
|
2
|
+
FactoryGirl.define do
|
|
3
|
+
|
|
4
|
+
factory :group_checkin, :class => TheCity::GroupCheckin do
|
|
5
|
+
#group {"name" => "Third Grade", "external_id" => nil, "id" => 494538351}
|
|
6
|
+
checked_out_by_user nil
|
|
7
|
+
special_instructions "No snacks!"
|
|
8
|
+
parent_group_name "Ballard Childrens ministry"
|
|
9
|
+
callboard_number "102"
|
|
10
|
+
checked_in_at "07/16/2012 07:59 PM (UTC)"
|
|
11
|
+
barcode "12BB97E001"
|
|
12
|
+
checked_in_user "Johnny Shepherd"
|
|
13
|
+
checked_in_user_id 282384270
|
|
14
|
+
id 3
|
|
15
|
+
checked_in_by_user "Pastor Sam Shepherd"
|
|
16
|
+
checked_in_by_user_id 946060874
|
|
17
|
+
parent_receipt_barcode "BC6C285ACE5"
|
|
18
|
+
# event {"id" => 587598132,
|
|
19
|
+
# "title" => "5 PM Service",
|
|
20
|
+
# "starting_at" => "07/10/2012 12:00 AM (UTC)",
|
|
21
|
+
# "ending_at" => "07/10/2012 01:30 AM (UTC)"}
|
|
22
|
+
checked_in_user_notes "Gluten-Free"
|
|
23
|
+
checked_out_at nil
|
|
24
|
+
parent_group_id 49861013
|
|
25
|
+
pager_number 45
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module TheCity
|
|
2
|
+
FactoryGirl.define do
|
|
3
|
+
|
|
4
|
+
factory :group_event_attendance, :class => TheCity::GroupEventAttendance do
|
|
5
|
+
user "Johnny Smith"
|
|
6
|
+
created_at "07/29/2012"
|
|
7
|
+
event_title "9 AM Service"
|
|
8
|
+
event_id 84326420
|
|
9
|
+
updated_at "08/01/2012"
|
|
10
|
+
tracked_by "Pastor Sam Shepherd"
|
|
11
|
+
id 980190964
|
|
12
|
+
user_id 1023606148
|
|
13
|
+
attended_on "07/29/2012 04:00 PM (UTC)"
|
|
14
|
+
tracked_by_user_id 946060874
|
|
15
|
+
checkin_id 235323
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module TheCity
|
|
2
|
+
FactoryGirl.define do
|
|
3
|
+
|
|
4
|
+
factory :group_role, :class => TheCity::GroupRole do
|
|
5
|
+
created_at "04/30/2012"
|
|
6
|
+
title nil
|
|
7
|
+
user_api_url "https://api.onthecity.org/users/494335566"
|
|
8
|
+
id 265005445
|
|
9
|
+
user_type "Offline User"
|
|
10
|
+
user_id 494335566
|
|
11
|
+
last_engaged nil
|
|
12
|
+
user_name "Joe Offline"
|
|
13
|
+
active true
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module TheCity
|
|
2
|
+
FactoryGirl.define do
|
|
3
|
+
|
|
4
|
+
factory :role, :class => TheCity::Role do
|
|
5
|
+
group_name "Small Group"
|
|
6
|
+
created_at "06/15/2009"
|
|
7
|
+
group_api_url "https://api.onthecity.org/groups/1933"
|
|
8
|
+
title "Leader"
|
|
9
|
+
group_type "CG"
|
|
10
|
+
user_api_url "https://api.onthecity.org/users/14158"
|
|
11
|
+
id 80245
|
|
12
|
+
user_type "User"
|
|
13
|
+
group_id 1933
|
|
14
|
+
user_id 14158
|
|
15
|
+
last_engaged "03/12/2010"
|
|
16
|
+
user_name "Joe Johnson"
|
|
17
|
+
active true
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|