the-city-admin 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- 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,51 @@
|
|
1
|
+
module TheCity
|
2
|
+
FactoryGirl.define do
|
3
|
+
|
4
|
+
factory :user, :class => TheCity::User do
|
5
|
+
api_url "https://api.onthecity.org/users/946060874"
|
6
|
+
updated_at "05/15/2012 07:24 AM (UTC)"
|
7
|
+
last_logged_in "05/16/2012 04:52 AM (UTC)"
|
8
|
+
secondary_phone ""
|
9
|
+
last_engaged "05/16/2012 04:52 AM (UTC)"
|
10
|
+
title "Pastor"
|
11
|
+
internal_url "http://local.devthecity.org:3000/users/946060874"
|
12
|
+
id 946060874
|
13
|
+
first "Sam"
|
14
|
+
primary_campus_name nil
|
15
|
+
last "Shepherd"
|
16
|
+
head_of_household true
|
17
|
+
nickname "Sammy"
|
18
|
+
active true
|
19
|
+
primary_phone_type "home"
|
20
|
+
primary_phone ""
|
21
|
+
member_since "05/14/2012"
|
22
|
+
birthdate "1974-11-09"
|
23
|
+
email_bouncing false
|
24
|
+
secondary_phone_type "home"
|
25
|
+
primary_campus_id nil
|
26
|
+
marital_status nil
|
27
|
+
contact_updated_at "05/15/2012 12:24 AM (UTC)"
|
28
|
+
type "User"
|
29
|
+
staff true
|
30
|
+
admin_url "http://church.onthecity.org/admin/users/946060874"
|
31
|
+
created_at "05/14/2012 05:51 PM (UTC)"
|
32
|
+
gender "Male"
|
33
|
+
external_id_1 nil
|
34
|
+
external_id_2 nil
|
35
|
+
external_id_3 nil
|
36
|
+
middle ""
|
37
|
+
email "zack@church.org"
|
38
|
+
last_checkin_date "05/14/2012 05:51 PM (UTC)"
|
39
|
+
last_donation_date "05/14/2012 05:51 PM (UTC)"
|
40
|
+
last_attendance_date "05/14/2012 05:51 PM (UTC)"
|
41
|
+
in_community true
|
42
|
+
in_service true
|
43
|
+
in_welcome true
|
44
|
+
in_campus true
|
45
|
+
in_neighborhood true
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module TheCity
|
2
|
+
FactoryGirl.define do
|
3
|
+
|
4
|
+
factory :user_address, :class => TheCity::UserAddress do
|
5
|
+
city "Seattle"
|
6
|
+
created_at "04/30/2012 08:46 PM (UTC)"
|
7
|
+
latitude 47.64114
|
8
|
+
updated_at "04/30/2012 09:34 PM (UTC)"
|
9
|
+
zipcode "98109"
|
10
|
+
id 552561485
|
11
|
+
street "2547 32nd Ave W"
|
12
|
+
location_type "Home"
|
13
|
+
privacy "Private"
|
14
|
+
longitude -122.398326
|
15
|
+
state "WA"
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module TheCity
|
2
|
+
FactoryGirl.define do
|
3
|
+
|
4
|
+
factory :user_family_member, :class => TheCity::UserFamilyMember do
|
5
|
+
name "Pastor Sam Shepherd"
|
6
|
+
admin_url "http://local.devthecity.org:3000/admin/users/946060874"
|
7
|
+
external_id_1 nil
|
8
|
+
birthdate "1974-11-09"
|
9
|
+
user_id 946060874
|
10
|
+
barcodes [{
|
11
|
+
:created_at => "04/30/2012",
|
12
|
+
:barcode => "0987654321"
|
13
|
+
}]
|
14
|
+
family_role "Spouse"
|
15
|
+
api_url "https://api.onthecity.org/users/946060874"
|
16
|
+
active true
|
17
|
+
email "zack@onthecity.org"
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module TheCity
|
2
|
+
FactoryGirl.define do
|
3
|
+
|
4
|
+
factory :user_invitation, :class => TheCity::UserInvitation do
|
5
|
+
created_at "02/06/2012"
|
6
|
+
pending_approval false
|
7
|
+
group_id 17543
|
8
|
+
id 1696876
|
9
|
+
user_id 14347
|
10
|
+
custom_message nil
|
11
|
+
source "API Invite | Group A (17543) on 2012-02-06 at 16:54"
|
12
|
+
email "theusers@email.net"
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
|
2
|
+
module TheCity
|
3
|
+
FactoryGirl.define do
|
4
|
+
|
5
|
+
factory :user_note, :class => TheCity::UserNote do
|
6
|
+
created_at "05/08/2012"
|
7
|
+
body "Deaconship is complete"
|
8
|
+
author "Pastor Sam Shepherd"
|
9
|
+
updated_at "05/08/2012"
|
10
|
+
id 756434911
|
11
|
+
visible_to [
|
12
|
+
"Account Admin",
|
13
|
+
"User Admin"
|
14
|
+
]
|
15
|
+
author_id 946060874
|
16
|
+
file_attachments [
|
17
|
+
{
|
18
|
+
:authenticated_s3_url => "https://aws....",
|
19
|
+
:filename => "list_of_sins.pdf"
|
20
|
+
}]
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module TheCity
|
2
|
+
FactoryGirl.define do
|
3
|
+
|
4
|
+
factory :user_role, :class => TheCity::UserRole do
|
5
|
+
group_name "The Group"
|
6
|
+
created_at "05/11/2009"
|
7
|
+
group_api_url "https://api.onthecity.org/admin/groups/1245"
|
8
|
+
title "Participant"
|
9
|
+
group_type "Campus"
|
10
|
+
group_id 1245
|
11
|
+
id 75530
|
12
|
+
last_engaged "01/24/2012"
|
13
|
+
active true
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|