From 9f8cd831f8a40e80bbeb439403df2f5e4c4a2537 Mon Sep 17 00:00:00 2001 From: David Beck Date: Mon, 28 Oct 2013 18:03:40 -0700 Subject: [PATCH 1/3] Changed module name In order to not conflict the the user api gem, which also uses "TheCity", we use a different module name to make the classes unique. --- lib/api/address.rb | 2 +- lib/api/address_list.rb | 2 +- lib/api/api_list.rb | 2 +- lib/api/api_object.rb | 2 +- lib/api/barcode.rb | 2 +- lib/api/campus.rb | 2 +- lib/api/campus_list.rb | 2 +- lib/api/checkin.rb | 2 +- lib/api/checkin_list.rb | 2 +- lib/api/church.rb | 2 +- lib/api/donation.rb | 2 +- lib/api/donation_export.rb | 2 +- lib/api/donation_export_list.rb | 2 +- lib/api/donation_list.rb | 2 +- lib/api/family.rb | 2 +- lib/api/family_member.rb | 2 +- lib/api/fund.rb | 2 +- lib/api/fund_list.rb | 2 +- lib/api/group.rb | 2 +- lib/api/group_address.rb | 2 +- lib/api/group_address_list.rb | 2 +- lib/api/group_checkin.rb | 2 +- lib/api/group_checkin_list.rb | 2 +- lib/api/group_event_attendance.rb | 2 +- lib/api/group_event_attendance_list.rb | 2 +- lib/api/group_export.rb | 2 +- lib/api/group_export_list.rb | 2 +- lib/api/group_invitation.rb | 2 +- lib/api/group_invitation_list.rb | 2 +- lib/api/group_list.rb | 2 +- lib/api/group_role.rb | 2 +- lib/api/group_role_list.rb | 2 +- lib/api/group_tag.rb | 2 +- lib/api/group_tag_list.rb | 2 +- lib/api/invitation.rb | 2 +- lib/api/invitation_list.rb | 2 +- lib/api/metric.rb | 2 +- lib/api/metric_list.rb | 2 +- lib/api/metric_measurement.rb | 2 +- lib/api/metric_measurement_list.rb | 2 +- lib/api/metric_measurement_values.rb | 2 +- lib/api/pledge.rb | 2 +- lib/api/pledge_list.rb | 2 +- lib/api/role.rb | 2 +- lib/api/role_list.rb | 2 +- lib/api/skill.rb | 2 +- lib/api/skill_list.rb | 2 +- lib/api/skilled_user_id_list.rb | 2 +- lib/api/skilled_user_list.rb | 2 +- lib/api/tag.rb | 2 +- lib/api/tag_group_list.rb | 2 +- lib/api/tag_list.rb | 2 +- lib/api/terminology.rb | 2 +- lib/api/terminology_list.rb | 2 +- lib/api/user.rb | 2 +- lib/api/user_address.rb | 2 +- lib/api/user_address_list.rb | 2 +- lib/api/user_admin_privilege.rb | 2 +- lib/api/user_admin_privilege_list.rb | 2 +- lib/api/user_barcode.rb | 2 +- lib/api/user_count.rb | 2 +- lib/api/user_family_list.rb | 2 +- lib/api/user_family_member.rb | 2 +- lib/api/user_invitation.rb | 2 +- lib/api/user_invitation_list.rb | 2 +- lib/api/user_list.rb | 2 +- lib/api/user_note.rb | 2 +- lib/api/user_note_list.rb | 2 +- lib/api/user_process.rb | 2 +- lib/api/user_process_answer.rb | 2 +- lib/api/user_process_answer_list.rb | 2 +- lib/api/user_process_list.rb | 2 +- lib/api/user_role.rb | 2 +- lib/api/user_role_list.rb | 2 +- lib/api/user_skill.rb | 2 +- lib/api/user_skill_list.rb | 2 +- lib/api/web_hook.rb | 2 +- lib/api/web_hook_list.rb | 2 +- lib/auto_load.rb | 2 +- lib/cachers/cache_adapter.rb | 2 +- lib/cachers/file/json_cache.rb | 2 +- lib/common.rb | 2 +- lib/exceptions.rb | 2 +- lib/readers/address_list_reader.rb | 2 +- lib/readers/address_reader.rb | 2 +- lib/readers/api_reader.rb | 2 +- lib/readers/campus_list_reader.rb | 2 +- lib/readers/checkin_list_reader.rb | 2 +- lib/readers/checkin_reader.rb | 2 +- lib/readers/church_reader.rb | 2 +- lib/readers/donation_export_list_reader.rb | 2 +- lib/readers/donation_export_reader.rb | 2 +- lib/readers/donation_list_reader.rb | 2 +- lib/readers/donation_reader.rb | 2 +- lib/readers/family_reader.rb | 2 +- lib/readers/fund_list_reader.rb | 2 +- lib/readers/fund_reader.rb | 2 +- lib/readers/group_address_list_reader.rb | 2 +- lib/readers/group_checkin_list_reader.rb | 2 +- lib/readers/group_event_attendance_list_reader.rb | 2 +- lib/readers/group_export_list_reader.rb | 2 +- lib/readers/group_export_reader.rb | 2 +- lib/readers/group_invitation_list_reader.rb | 2 +- lib/readers/group_list_reader.rb | 2 +- lib/readers/group_reader.rb | 2 +- lib/readers/group_role_list_reader.rb | 2 +- lib/readers/group_tag_list_reader.rb | 2 +- lib/readers/invitation_list_reader.rb | 2 +- lib/readers/metric_list_reader.rb | 2 +- lib/readers/metric_measurement_list_reader.rb | 2 +- lib/readers/metric_measurement_reader.rb | 2 +- lib/readers/metric_measurement_values_reader.rb | 2 +- lib/readers/metric_reader.rb | 2 +- lib/readers/pledge_list_reader.rb | 2 +- lib/readers/pledge_reader.rb | 2 +- lib/readers/role_list_reader.rb | 2 +- lib/readers/skill_list_reader.rb | 2 +- lib/readers/skill_reader.rb | 2 +- lib/readers/skilled_user_id_list_reader.rb | 2 +- lib/readers/skilled_user_list_reader.rb | 2 +- lib/readers/tag_group_list_reader.rb | 2 +- lib/readers/tag_list_reader.rb | 2 +- lib/readers/tag_reader.rb | 2 +- lib/readers/terminology_list_reader.rb | 2 +- lib/readers/terminology_reader.rb | 2 +- lib/readers/user_address_list_reader.rb | 2 +- lib/readers/user_admin_privilege_list_reader.rb | 2 +- lib/readers/user_count_reader.rb | 2 +- lib/readers/user_family_list_reader.rb | 2 +- lib/readers/user_invitation_list_reader.rb | 2 +- lib/readers/user_list_reader.rb | 2 +- lib/readers/user_note_list_reader.rb | 2 +- lib/readers/user_process_answer_list_reader.rb | 2 +- lib/readers/user_process_list_reader.rb | 2 +- lib/readers/user_reader.rb | 2 +- lib/readers/user_role_list_reader.rb | 2 +- lib/readers/user_skill_list_reader.rb | 2 +- lib/readers/web_hook_list_reader.rb | 2 +- lib/the_city_admin.rb | 2 +- lib/writers/api_writer.rb | 2 +- lib/writers/donation_export_writer.rb | 2 +- lib/writers/family_writer.rb | 2 +- lib/writers/fund_writer.rb | 2 +- lib/writers/group_address_writer.rb | 2 +- lib/writers/group_export_writer.rb | 2 +- lib/writers/group_writer.rb | 2 +- lib/writers/metric_measurement_writer.rb | 2 +- lib/writers/metric_writer.rb | 2 +- lib/writers/skill_writer.rb | 2 +- lib/writers/tag_writer.rb | 2 +- lib/writers/terminology_writer.rb | 2 +- lib/writers/user_address_writer.rb | 2 +- lib/writers/user_admin_privilege_writer.rb | 2 +- lib/writers/user_invitation_writer.rb | 2 +- lib/writers/user_note_writer.rb | 2 +- lib/writers/user_role_writer.rb | 2 +- lib/writers/user_skill_writer.rb | 2 +- lib/writers/user_writer.rb | 2 +- lib/writers/web_hook_writer.rb | 2 +- spec/factories/address.rb | 2 +- spec/factories/address_list.rb | 2 +- spec/factories/checkin.rb | 2 +- spec/factories/checkin_list.rb | 2 +- spec/factories/group.rb | 2 +- spec/factories/group_address.rb | 2 +- spec/factories/group_address_list.rb | 2 +- spec/factories/group_checkin.rb | 2 +- spec/factories/group_checkin_list.rb | 2 +- spec/factories/group_event_attendance.rb | 2 +- spec/factories/group_event_attendance_list.rb | 2 +- spec/factories/group_export.rb | 2 +- spec/factories/group_export_list.rb | 2 +- spec/factories/group_role.rb | 2 +- spec/factories/group_tag.rb | 2 +- spec/factories/role.rb | 2 +- spec/factories/role_list.rb | 2 +- spec/factories/skill.rb | 2 +- spec/factories/skill_list.rb | 2 +- spec/factories/skilled_user_id_list.rb | 2 +- spec/factories/skilled_user_list.rb | 2 +- spec/factories/tag.rb | 2 +- spec/factories/tag_group_list.rb | 2 +- spec/factories/tag_list.rb | 2 +- spec/factories/terminology.rb | 2 +- spec/factories/terminology_list.rb | 2 +- spec/factories/user.rb | 2 +- spec/factories/user_address.rb | 2 +- spec/factories/user_address_list.rb | 2 +- spec/factories/user_admin_privilege.rb | 2 +- spec/factories/user_admin_privilege_list.rb | 2 +- spec/factories/user_barcode.rb | 2 +- spec/factories/user_family_list.rb | 2 +- spec/factories/user_family_member.rb | 2 +- spec/factories/user_invitation.rb | 2 +- spec/factories/user_invitation_list.rb | 2 +- spec/factories/user_list.rb | 2 +- spec/factories/user_note.rb | 2 +- spec/factories/user_note_list.rb | 2 +- spec/factories/user_process.rb | 2 +- spec/factories/user_process_answer.rb | 2 +- spec/factories/user_process_answer_list.rb | 2 +- spec/factories/user_process_list.rb | 2 +- spec/factories/user_role.rb | 2 +- spec/factories/user_role_list.rb | 2 +- spec/factories/user_skill.rb | 2 +- spec/factories/user_skill_list.rb | 2 +- spec/factories/web_hook.rb | 2 +- spec/factories/web_hook_list.rb | 2 +- 208 files changed, 208 insertions(+), 208 deletions(-) diff --git a/lib/api/address.rb b/lib/api/address.rb index 30b653e..4b45561 100644 --- a/lib/api/address.rb +++ b/lib/api/address.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class Address < ApiObject diff --git a/lib/api/address_list.rb b/lib/api/address_list.rb index 01a924b..e8ebe55 100644 --- a/lib/api/address_list.rb +++ b/lib/api/address_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class AddressList < ApiList diff --git a/lib/api/api_list.rb b/lib/api/api_list.rb index 0d0a065..ad6ba94 100644 --- a/lib/api/api_list.rb +++ b/lib/api/api_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin # This class is the base class for all TheCity objects and is meant to be inherited. # diff --git a/lib/api/api_object.rb b/lib/api/api_object.rb index 6cf3787..5eafc68 100644 --- a/lib/api/api_object.rb +++ b/lib/api/api_object.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin # This class is the base class for all TheCity objects and is meant to be inherited. # diff --git a/lib/api/barcode.rb b/lib/api/barcode.rb index 500fd1c..7b0dbea 100644 --- a/lib/api/barcode.rb +++ b/lib/api/barcode.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class Barcode < ApiObject diff --git a/lib/api/campus.rb b/lib/api/campus.rb index ad8f95f..2307270 100644 --- a/lib/api/campus.rb +++ b/lib/api/campus.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class Campus < ApiObject diff --git a/lib/api/campus_list.rb b/lib/api/campus_list.rb index e4f2075..5aabd25 100644 --- a/lib/api/campus_list.rb +++ b/lib/api/campus_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class CampusList < ApiList diff --git a/lib/api/checkin.rb b/lib/api/checkin.rb index bf6a8c8..66cbb5c 100644 --- a/lib/api/checkin.rb +++ b/lib/api/checkin.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class Checkin < ApiObject diff --git a/lib/api/checkin_list.rb b/lib/api/checkin_list.rb index dea8012..774ac13 100644 --- a/lib/api/checkin_list.rb +++ b/lib/api/checkin_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class CheckinList < ApiList diff --git a/lib/api/church.rb b/lib/api/church.rb index be46d30..109aff6 100644 --- a/lib/api/church.rb +++ b/lib/api/church.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class Church < ApiObject diff --git a/lib/api/donation.rb b/lib/api/donation.rb index 85ad764..3011757 100644 --- a/lib/api/donation.rb +++ b/lib/api/donation.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class Donation < ApiObject tc_attr_accessor :split_id, diff --git a/lib/api/donation_export.rb b/lib/api/donation_export.rb index c16faa6..72846a8 100644 --- a/lib/api/donation_export.rb +++ b/lib/api/donation_export.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class DonationExport < ApiObject diff --git a/lib/api/donation_export_list.rb b/lib/api/donation_export_list.rb index 1a4ac94..91760cc 100644 --- a/lib/api/donation_export_list.rb +++ b/lib/api/donation_export_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class DonationExportList < ApiList diff --git a/lib/api/donation_list.rb b/lib/api/donation_list.rb index a65884c..836e00a 100644 --- a/lib/api/donation_list.rb +++ b/lib/api/donation_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class DonationList < ApiList diff --git a/lib/api/family.rb b/lib/api/family.rb index 58e642a..bba51d1 100644 --- a/lib/api/family.rb +++ b/lib/api/family.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class Family < ApiObject diff --git a/lib/api/family_member.rb b/lib/api/family_member.rb index 2a4e96f..627ef97 100644 --- a/lib/api/family_member.rb +++ b/lib/api/family_member.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class FamilyMember < ApiObject diff --git a/lib/api/fund.rb b/lib/api/fund.rb index 1d7c9db..24a4b54 100644 --- a/lib/api/fund.rb +++ b/lib/api/fund.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class Fund < ApiObject tc_attr_accessor :id, diff --git a/lib/api/fund_list.rb b/lib/api/fund_list.rb index 42750bb..79d1a8d 100644 --- a/lib/api/fund_list.rb +++ b/lib/api/fund_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class FundList < ApiList diff --git a/lib/api/group.rb b/lib/api/group.rb index ed57941..2837299 100644 --- a/lib/api/group.rb +++ b/lib/api/group.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class Group < ApiObject tc_attr_accessor :campus_name, diff --git a/lib/api/group_address.rb b/lib/api/group_address.rb index a3ddcbe..d982cad 100644 --- a/lib/api/group_address.rb +++ b/lib/api/group_address.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupAddress < ApiObject diff --git a/lib/api/group_address_list.rb b/lib/api/group_address_list.rb index cd2a177..21da785 100644 --- a/lib/api/group_address_list.rb +++ b/lib/api/group_address_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupAddressList < ApiList diff --git a/lib/api/group_checkin.rb b/lib/api/group_checkin.rb index 7ecdeec..5ddf0b3 100644 --- a/lib/api/group_checkin.rb +++ b/lib/api/group_checkin.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupCheckin < ApiObject diff --git a/lib/api/group_checkin_list.rb b/lib/api/group_checkin_list.rb index 26462ee..95734e0 100644 --- a/lib/api/group_checkin_list.rb +++ b/lib/api/group_checkin_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupCheckinList < ApiList diff --git a/lib/api/group_event_attendance.rb b/lib/api/group_event_attendance.rb index c98253f..b24fc7b 100644 --- a/lib/api/group_event_attendance.rb +++ b/lib/api/group_event_attendance.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupEventAttendance < ApiObject diff --git a/lib/api/group_event_attendance_list.rb b/lib/api/group_event_attendance_list.rb index c75cc2c..7d03297 100644 --- a/lib/api/group_event_attendance_list.rb +++ b/lib/api/group_event_attendance_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupEventAttendanceList < ApiList diff --git a/lib/api/group_export.rb b/lib/api/group_export.rb index d331d88..412de2c 100644 --- a/lib/api/group_export.rb +++ b/lib/api/group_export.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupExport < ApiObject diff --git a/lib/api/group_export_list.rb b/lib/api/group_export_list.rb index 8137e79..a5fe14d 100644 --- a/lib/api/group_export_list.rb +++ b/lib/api/group_export_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupExportList < ApiList diff --git a/lib/api/group_invitation.rb b/lib/api/group_invitation.rb index bc651d8..bba8c17 100644 --- a/lib/api/group_invitation.rb +++ b/lib/api/group_invitation.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupInvitation < ApiObject diff --git a/lib/api/group_invitation_list.rb b/lib/api/group_invitation_list.rb index 9e47f08..89ace86 100644 --- a/lib/api/group_invitation_list.rb +++ b/lib/api/group_invitation_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupInvitationList < ApiList diff --git a/lib/api/group_list.rb b/lib/api/group_list.rb index 39fb1f3..79a7c16 100644 --- a/lib/api/group_list.rb +++ b/lib/api/group_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupList < ApiList diff --git a/lib/api/group_role.rb b/lib/api/group_role.rb index f8d5fd1..62c5920 100644 --- a/lib/api/group_role.rb +++ b/lib/api/group_role.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupRole < ApiObject diff --git a/lib/api/group_role_list.rb b/lib/api/group_role_list.rb index 718966c..dc4e425 100644 --- a/lib/api/group_role_list.rb +++ b/lib/api/group_role_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupRoleList < ApiList diff --git a/lib/api/group_tag.rb b/lib/api/group_tag.rb index 0dae87c..a33c034 100644 --- a/lib/api/group_tag.rb +++ b/lib/api/group_tag.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupTag < ApiObject diff --git a/lib/api/group_tag_list.rb b/lib/api/group_tag_list.rb index 4c4b429..3837884 100644 --- a/lib/api/group_tag_list.rb +++ b/lib/api/group_tag_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupTagList < ApiList diff --git a/lib/api/invitation.rb b/lib/api/invitation.rb index eb4cc89..4c0e795 100644 --- a/lib/api/invitation.rb +++ b/lib/api/invitation.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class Invitation < ApiObject diff --git a/lib/api/invitation_list.rb b/lib/api/invitation_list.rb index d1e311b..cb52581 100644 --- a/lib/api/invitation_list.rb +++ b/lib/api/invitation_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class InvitationList < ApiList diff --git a/lib/api/metric.rb b/lib/api/metric.rb index 9690632..5a9b152 100644 --- a/lib/api/metric.rb +++ b/lib/api/metric.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class Metric < ApiObject tc_attr_accessor :id, diff --git a/lib/api/metric_list.rb b/lib/api/metric_list.rb index d3eb842..51f4efd 100644 --- a/lib/api/metric_list.rb +++ b/lib/api/metric_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class MetricList < ApiList diff --git a/lib/api/metric_measurement.rb b/lib/api/metric_measurement.rb index f211516..da2f0e1 100644 --- a/lib/api/metric_measurement.rb +++ b/lib/api/metric_measurement.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class MetricMeasurement < ApiObject diff --git a/lib/api/metric_measurement_list.rb b/lib/api/metric_measurement_list.rb index 29f6897..e4741ad 100644 --- a/lib/api/metric_measurement_list.rb +++ b/lib/api/metric_measurement_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class MetricMeasurementList < ApiList diff --git a/lib/api/metric_measurement_values.rb b/lib/api/metric_measurement_values.rb index 59aab77..cd9d95f 100644 --- a/lib/api/metric_measurement_values.rb +++ b/lib/api/metric_measurement_values.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class MetricMeasurementValues < ApiObject diff --git a/lib/api/pledge.rb b/lib/api/pledge.rb index 6babc6f..290db94 100644 --- a/lib/api/pledge.rb +++ b/lib/api/pledge.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class Pledge < ApiObject tc_attr_accessor :id, diff --git a/lib/api/pledge_list.rb b/lib/api/pledge_list.rb index 904bf7e..e3a7a0a 100644 --- a/lib/api/pledge_list.rb +++ b/lib/api/pledge_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class PledgeList < ApiList diff --git a/lib/api/role.rb b/lib/api/role.rb index bc38ec5..99a3a96 100644 --- a/lib/api/role.rb +++ b/lib/api/role.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class Role < ApiObject diff --git a/lib/api/role_list.rb b/lib/api/role_list.rb index cf15c73..a75a840 100644 --- a/lib/api/role_list.rb +++ b/lib/api/role_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class RoleList < ApiList diff --git a/lib/api/skill.rb b/lib/api/skill.rb index af46098..6ac2561 100644 --- a/lib/api/skill.rb +++ b/lib/api/skill.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class Skill < ApiObject diff --git a/lib/api/skill_list.rb b/lib/api/skill_list.rb index a11ef1b..729e592 100644 --- a/lib/api/skill_list.rb +++ b/lib/api/skill_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class SkillList < ApiList diff --git a/lib/api/skilled_user_id_list.rb b/lib/api/skilled_user_id_list.rb index b230b91..42698ab 100644 --- a/lib/api/skilled_user_id_list.rb +++ b/lib/api/skilled_user_id_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class SkilledUserIdList < ApiList diff --git a/lib/api/skilled_user_list.rb b/lib/api/skilled_user_list.rb index 3231ca1..362015c 100644 --- a/lib/api/skilled_user_list.rb +++ b/lib/api/skilled_user_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class SkilledUserList < ApiList diff --git a/lib/api/tag.rb b/lib/api/tag.rb index 7e5154d..4cf88b3 100644 --- a/lib/api/tag.rb +++ b/lib/api/tag.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class Tag < ApiObject diff --git a/lib/api/tag_group_list.rb b/lib/api/tag_group_list.rb index ebd6c99..fed6782 100644 --- a/lib/api/tag_group_list.rb +++ b/lib/api/tag_group_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class TagGroupList < ApiList diff --git a/lib/api/tag_list.rb b/lib/api/tag_list.rb index 107decd..9611e7b 100644 --- a/lib/api/tag_list.rb +++ b/lib/api/tag_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class TagList < ApiList diff --git a/lib/api/terminology.rb b/lib/api/terminology.rb index 63b9118..d1bb9be 100644 --- a/lib/api/terminology.rb +++ b/lib/api/terminology.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class Terminology < ApiObject diff --git a/lib/api/terminology_list.rb b/lib/api/terminology_list.rb index fb9605d..c8905bc 100644 --- a/lib/api/terminology_list.rb +++ b/lib/api/terminology_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class TerminologyList < ApiList diff --git a/lib/api/user.rb b/lib/api/user.rb index 85ea578..463ccd2 100644 --- a/lib/api/user.rb +++ b/lib/api/user.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class User < ApiObject Gender = {:male => 'Male', :female => 'Female'} diff --git a/lib/api/user_address.rb b/lib/api/user_address.rb index b42d121..e0edaa9 100644 --- a/lib/api/user_address.rb +++ b/lib/api/user_address.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserAddress < ApiObject diff --git a/lib/api/user_address_list.rb b/lib/api/user_address_list.rb index e07a91f..a4c3d3a 100644 --- a/lib/api/user_address_list.rb +++ b/lib/api/user_address_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserAddressList < ApiList diff --git a/lib/api/user_admin_privilege.rb b/lib/api/user_admin_privilege.rb index b6e8a6c..931f4a0 100644 --- a/lib/api/user_admin_privilege.rb +++ b/lib/api/user_admin_privilege.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserAdminPrivilege < ApiObject diff --git a/lib/api/user_admin_privilege_list.rb b/lib/api/user_admin_privilege_list.rb index 858eee5..dec64df 100644 --- a/lib/api/user_admin_privilege_list.rb +++ b/lib/api/user_admin_privilege_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserAdminPrivilegeList < ApiList diff --git a/lib/api/user_barcode.rb b/lib/api/user_barcode.rb index 39e3d67..c28ac0b 100644 --- a/lib/api/user_barcode.rb +++ b/lib/api/user_barcode.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserBarcode < ApiObject diff --git a/lib/api/user_count.rb b/lib/api/user_count.rb index 39727e5..c2a2513 100644 --- a/lib/api/user_count.rb +++ b/lib/api/user_count.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserCount < ApiObject diff --git a/lib/api/user_family_list.rb b/lib/api/user_family_list.rb index a93a238..b8af260 100644 --- a/lib/api/user_family_list.rb +++ b/lib/api/user_family_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserFamilyList < ApiList diff --git a/lib/api/user_family_member.rb b/lib/api/user_family_member.rb index 0f1453c..01bc255 100644 --- a/lib/api/user_family_member.rb +++ b/lib/api/user_family_member.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserFamilyMember < ApiObject diff --git a/lib/api/user_invitation.rb b/lib/api/user_invitation.rb index ed5dfee..95fd434 100644 --- a/lib/api/user_invitation.rb +++ b/lib/api/user_invitation.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserInvitation < ApiObject diff --git a/lib/api/user_invitation_list.rb b/lib/api/user_invitation_list.rb index a70a7ea..85de83b 100644 --- a/lib/api/user_invitation_list.rb +++ b/lib/api/user_invitation_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserInvitationList < ApiList diff --git a/lib/api/user_list.rb b/lib/api/user_list.rb index 17749a2..30f2afc 100644 --- a/lib/api/user_list.rb +++ b/lib/api/user_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserList < ApiList diff --git a/lib/api/user_note.rb b/lib/api/user_note.rb index 55cb0c2..076605e 100644 --- a/lib/api/user_note.rb +++ b/lib/api/user_note.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserNote < ApiObject diff --git a/lib/api/user_note_list.rb b/lib/api/user_note_list.rb index 9d0f78a..a5faa30 100644 --- a/lib/api/user_note_list.rb +++ b/lib/api/user_note_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserNoteList < ApiList diff --git a/lib/api/user_process.rb b/lib/api/user_process.rb index 83f44f6..a991be8 100644 --- a/lib/api/user_process.rb +++ b/lib/api/user_process.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserProcess < ApiObject diff --git a/lib/api/user_process_answer.rb b/lib/api/user_process_answer.rb index 01d5f8c..f095409 100644 --- a/lib/api/user_process_answer.rb +++ b/lib/api/user_process_answer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserProcessAnswer < ApiObject diff --git a/lib/api/user_process_answer_list.rb b/lib/api/user_process_answer_list.rb index 14cfb0d..0b2f711 100644 --- a/lib/api/user_process_answer_list.rb +++ b/lib/api/user_process_answer_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserProcessAnswerList < ApiList diff --git a/lib/api/user_process_list.rb b/lib/api/user_process_list.rb index 4f5bd9b..b6a9626 100644 --- a/lib/api/user_process_list.rb +++ b/lib/api/user_process_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserProcessList < ApiList diff --git a/lib/api/user_role.rb b/lib/api/user_role.rb index 5a41454..045d35b 100644 --- a/lib/api/user_role.rb +++ b/lib/api/user_role.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserRole < ApiObject diff --git a/lib/api/user_role_list.rb b/lib/api/user_role_list.rb index 796edfc..471706a 100644 --- a/lib/api/user_role_list.rb +++ b/lib/api/user_role_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserRoleList < ApiList diff --git a/lib/api/user_skill.rb b/lib/api/user_skill.rb index d660c11..0b8fa64 100644 --- a/lib/api/user_skill.rb +++ b/lib/api/user_skill.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserSkill < ApiObject diff --git a/lib/api/user_skill_list.rb b/lib/api/user_skill_list.rb index 7d48fb0..276249a 100644 --- a/lib/api/user_skill_list.rb +++ b/lib/api/user_skill_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserSkillList < ApiList diff --git a/lib/api/web_hook.rb b/lib/api/web_hook.rb index 873fc8f..4752bc8 100644 --- a/lib/api/web_hook.rb +++ b/lib/api/web_hook.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class WebHook < ApiObject diff --git a/lib/api/web_hook_list.rb b/lib/api/web_hook_list.rb index d4cd1d4..1dd0570 100644 --- a/lib/api/web_hook_list.rb +++ b/lib/api/web_hook_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class WebHookList < ApiList diff --git a/lib/auto_load.rb b/lib/auto_load.rb index e943fdf..7dd9ca0 100644 --- a/lib/auto_load.rb +++ b/lib/auto_load.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin require THECITY_LIB_DIR + '/exceptions.rb' diff --git a/lib/cachers/cache_adapter.rb b/lib/cachers/cache_adapter.rb index 65145a2..32d9caf 100644 --- a/lib/cachers/cache_adapter.rb +++ b/lib/cachers/cache_adapter.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin # This adapter is the standard for all caching objects. class CacheAdapter diff --git a/lib/cachers/file/json_cache.rb b/lib/cachers/file/json_cache.rb index 75a77c2..7e22a27 100644 --- a/lib/cachers/file/json_cache.rb +++ b/lib/cachers/file/json_cache.rb @@ -4,7 +4,7 @@ require 'fileutils' -module TheCity +module TheCityAdmin # This class caches the data in a JSON file. class JsonCache < CacheAdapter diff --git a/lib/common.rb b/lib/common.rb index 148cc45..3fa14d5 100644 --- a/lib/common.rb +++ b/lib/common.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin require 'cgi' require 'json' diff --git a/lib/exceptions.rb b/lib/exceptions.rb index f064044..da25438 100644 --- a/lib/exceptions.rb +++ b/lib/exceptions.rb @@ -1,4 +1,4 @@ -module TheCityExceptions +module TheCityAdminExceptions class UnableToConnectToTheCity < StandardError; end class UnknownErrorConnectingToTheCity < StandardError; end class TheCityResponseError < StandardError; end diff --git a/lib/readers/address_list_reader.rb b/lib/readers/address_list_reader.rb index 432990c..97dbdab 100644 --- a/lib/readers/address_list_reader.rb +++ b/lib/readers/address_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class AddressListReader < ApiReader diff --git a/lib/readers/address_reader.rb b/lib/readers/address_reader.rb index a960405..666e00c 100644 --- a/lib/readers/address_reader.rb +++ b/lib/readers/address_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class AddressReader < ApiReader diff --git a/lib/readers/api_reader.rb b/lib/readers/api_reader.rb index da3782f..d36fa57 100644 --- a/lib/readers/api_reader.rb +++ b/lib/readers/api_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin # This adapter is the standard for all loading objects. class ApiReader diff --git a/lib/readers/campus_list_reader.rb b/lib/readers/campus_list_reader.rb index d347174..2edbf22 100644 --- a/lib/readers/campus_list_reader.rb +++ b/lib/readers/campus_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class CampusListReader < ApiReader diff --git a/lib/readers/checkin_list_reader.rb b/lib/readers/checkin_list_reader.rb index 80ee8db..683ea48 100644 --- a/lib/readers/checkin_list_reader.rb +++ b/lib/readers/checkin_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class CheckinListReader < ApiReader diff --git a/lib/readers/checkin_reader.rb b/lib/readers/checkin_reader.rb index b83b7c8..8f28887 100644 --- a/lib/readers/checkin_reader.rb +++ b/lib/readers/checkin_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class CheckinReader < ApiReader diff --git a/lib/readers/church_reader.rb b/lib/readers/church_reader.rb index 7e0b39d..c2a8b5f 100644 --- a/lib/readers/church_reader.rb +++ b/lib/readers/church_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class ChurchReader < ApiReader diff --git a/lib/readers/donation_export_list_reader.rb b/lib/readers/donation_export_list_reader.rb index 744352d..0551194 100644 --- a/lib/readers/donation_export_list_reader.rb +++ b/lib/readers/donation_export_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class DonationExportListReader < ApiReader diff --git a/lib/readers/donation_export_reader.rb b/lib/readers/donation_export_reader.rb index bc0553f..bd017fa 100644 --- a/lib/readers/donation_export_reader.rb +++ b/lib/readers/donation_export_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class DonationExportReader < ApiReader diff --git a/lib/readers/donation_list_reader.rb b/lib/readers/donation_list_reader.rb index a62f184..121723f 100644 --- a/lib/readers/donation_list_reader.rb +++ b/lib/readers/donation_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class DonationListReader < ApiReader diff --git a/lib/readers/donation_reader.rb b/lib/readers/donation_reader.rb index a118d56..e4ba7cf 100644 --- a/lib/readers/donation_reader.rb +++ b/lib/readers/donation_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class DonationReader < ApiReader diff --git a/lib/readers/family_reader.rb b/lib/readers/family_reader.rb index 964121c..05d070c 100644 --- a/lib/readers/family_reader.rb +++ b/lib/readers/family_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class FamilyReader < ApiReader diff --git a/lib/readers/fund_list_reader.rb b/lib/readers/fund_list_reader.rb index e28b72e..22a9573 100644 --- a/lib/readers/fund_list_reader.rb +++ b/lib/readers/fund_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class FundListReader < ApiReader diff --git a/lib/readers/fund_reader.rb b/lib/readers/fund_reader.rb index b7acf7f..dde51a4 100644 --- a/lib/readers/fund_reader.rb +++ b/lib/readers/fund_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class FundReader < ApiReader diff --git a/lib/readers/group_address_list_reader.rb b/lib/readers/group_address_list_reader.rb index 3763144..5b315b3 100644 --- a/lib/readers/group_address_list_reader.rb +++ b/lib/readers/group_address_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupAddressListReader < ApiReader diff --git a/lib/readers/group_checkin_list_reader.rb b/lib/readers/group_checkin_list_reader.rb index ba9faf1..fb6cd4c 100644 --- a/lib/readers/group_checkin_list_reader.rb +++ b/lib/readers/group_checkin_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupCheckinListReader < ApiReader diff --git a/lib/readers/group_event_attendance_list_reader.rb b/lib/readers/group_event_attendance_list_reader.rb index 02889f3..ce1dde4 100644 --- a/lib/readers/group_event_attendance_list_reader.rb +++ b/lib/readers/group_event_attendance_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupEventAttendanceListReader < ApiReader diff --git a/lib/readers/group_export_list_reader.rb b/lib/readers/group_export_list_reader.rb index 2039718..bc87abb 100644 --- a/lib/readers/group_export_list_reader.rb +++ b/lib/readers/group_export_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupExportListReader < ApiReader diff --git a/lib/readers/group_export_reader.rb b/lib/readers/group_export_reader.rb index 4c51d20..7afea39 100644 --- a/lib/readers/group_export_reader.rb +++ b/lib/readers/group_export_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupExportReader < ApiReader diff --git a/lib/readers/group_invitation_list_reader.rb b/lib/readers/group_invitation_list_reader.rb index f79b292..5f5ab05 100644 --- a/lib/readers/group_invitation_list_reader.rb +++ b/lib/readers/group_invitation_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupInvitationListReader < ApiReader diff --git a/lib/readers/group_list_reader.rb b/lib/readers/group_list_reader.rb index c4a8ef9..20b3483 100644 --- a/lib/readers/group_list_reader.rb +++ b/lib/readers/group_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupListReader < ApiReader diff --git a/lib/readers/group_reader.rb b/lib/readers/group_reader.rb index 7ae81b7..fdf6d0d 100644 --- a/lib/readers/group_reader.rb +++ b/lib/readers/group_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupReader < ApiReader diff --git a/lib/readers/group_role_list_reader.rb b/lib/readers/group_role_list_reader.rb index f4af784..52120e1 100644 --- a/lib/readers/group_role_list_reader.rb +++ b/lib/readers/group_role_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupRoleListReader < ApiReader diff --git a/lib/readers/group_tag_list_reader.rb b/lib/readers/group_tag_list_reader.rb index 14c0c03..683321d 100644 --- a/lib/readers/group_tag_list_reader.rb +++ b/lib/readers/group_tag_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupTagListReader < ApiReader diff --git a/lib/readers/invitation_list_reader.rb b/lib/readers/invitation_list_reader.rb index e4cedc5..2e57623 100644 --- a/lib/readers/invitation_list_reader.rb +++ b/lib/readers/invitation_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class InvitationListReader < ApiReader diff --git a/lib/readers/metric_list_reader.rb b/lib/readers/metric_list_reader.rb index 52a1aef..4ff361b 100644 --- a/lib/readers/metric_list_reader.rb +++ b/lib/readers/metric_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class MetricListReader < ApiReader diff --git a/lib/readers/metric_measurement_list_reader.rb b/lib/readers/metric_measurement_list_reader.rb index a00336d..42d8d08 100644 --- a/lib/readers/metric_measurement_list_reader.rb +++ b/lib/readers/metric_measurement_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class MetricMeasurementListReader < ApiReader diff --git a/lib/readers/metric_measurement_reader.rb b/lib/readers/metric_measurement_reader.rb index b6d9894..b97ee47 100644 --- a/lib/readers/metric_measurement_reader.rb +++ b/lib/readers/metric_measurement_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class MetricMeasurementReader < ApiReader diff --git a/lib/readers/metric_measurement_values_reader.rb b/lib/readers/metric_measurement_values_reader.rb index 6f7052c..45c0f63 100644 --- a/lib/readers/metric_measurement_values_reader.rb +++ b/lib/readers/metric_measurement_values_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class MetricMeasurementValuesReader < ApiReader diff --git a/lib/readers/metric_reader.rb b/lib/readers/metric_reader.rb index 2a5bbc8..599e5d2 100644 --- a/lib/readers/metric_reader.rb +++ b/lib/readers/metric_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class MetricReader < ApiReader diff --git a/lib/readers/pledge_list_reader.rb b/lib/readers/pledge_list_reader.rb index 8e68b45..376688d 100644 --- a/lib/readers/pledge_list_reader.rb +++ b/lib/readers/pledge_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class PledgeListReader < ApiReader diff --git a/lib/readers/pledge_reader.rb b/lib/readers/pledge_reader.rb index 815aec9..1cdeef0 100644 --- a/lib/readers/pledge_reader.rb +++ b/lib/readers/pledge_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class PledgeReader < ApiReader diff --git a/lib/readers/role_list_reader.rb b/lib/readers/role_list_reader.rb index 92283a7..948d1de 100644 --- a/lib/readers/role_list_reader.rb +++ b/lib/readers/role_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class RoleListReader < ApiReader diff --git a/lib/readers/skill_list_reader.rb b/lib/readers/skill_list_reader.rb index 2a701aa..7b48453 100644 --- a/lib/readers/skill_list_reader.rb +++ b/lib/readers/skill_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class SkillListReader < ApiReader diff --git a/lib/readers/skill_reader.rb b/lib/readers/skill_reader.rb index d4b1573..a09ee3a 100644 --- a/lib/readers/skill_reader.rb +++ b/lib/readers/skill_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class SkillReader < ApiReader diff --git a/lib/readers/skilled_user_id_list_reader.rb b/lib/readers/skilled_user_id_list_reader.rb index 6ad7110..5807207 100644 --- a/lib/readers/skilled_user_id_list_reader.rb +++ b/lib/readers/skilled_user_id_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class SkilledUserIdListReader < ApiReader diff --git a/lib/readers/skilled_user_list_reader.rb b/lib/readers/skilled_user_list_reader.rb index 6e23ddb..60212d9 100644 --- a/lib/readers/skilled_user_list_reader.rb +++ b/lib/readers/skilled_user_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class SkilledUserListReader < ApiReader diff --git a/lib/readers/tag_group_list_reader.rb b/lib/readers/tag_group_list_reader.rb index b848655..f948656 100644 --- a/lib/readers/tag_group_list_reader.rb +++ b/lib/readers/tag_group_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class TagGroupListReader < ApiReader diff --git a/lib/readers/tag_list_reader.rb b/lib/readers/tag_list_reader.rb index 2f9b058..707627b 100644 --- a/lib/readers/tag_list_reader.rb +++ b/lib/readers/tag_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class TagListReader < ApiReader diff --git a/lib/readers/tag_reader.rb b/lib/readers/tag_reader.rb index 21580e6..39e173b 100644 --- a/lib/readers/tag_reader.rb +++ b/lib/readers/tag_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class TagReader < ApiReader diff --git a/lib/readers/terminology_list_reader.rb b/lib/readers/terminology_list_reader.rb index fe2f98b..a7ca6a3 100644 --- a/lib/readers/terminology_list_reader.rb +++ b/lib/readers/terminology_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class TerminologyListReader < ApiReader diff --git a/lib/readers/terminology_reader.rb b/lib/readers/terminology_reader.rb index 67fc92c..472d4e1 100644 --- a/lib/readers/terminology_reader.rb +++ b/lib/readers/terminology_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class TerminologyReader < ApiReader diff --git a/lib/readers/user_address_list_reader.rb b/lib/readers/user_address_list_reader.rb index 858f87d..42602f4 100644 --- a/lib/readers/user_address_list_reader.rb +++ b/lib/readers/user_address_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserAddressListReader < ApiReader diff --git a/lib/readers/user_admin_privilege_list_reader.rb b/lib/readers/user_admin_privilege_list_reader.rb index db87cbd..42d4128 100644 --- a/lib/readers/user_admin_privilege_list_reader.rb +++ b/lib/readers/user_admin_privilege_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserAdminPrivilegeListReader < ApiReader diff --git a/lib/readers/user_count_reader.rb b/lib/readers/user_count_reader.rb index 54d389a..9afeb7a 100644 --- a/lib/readers/user_count_reader.rb +++ b/lib/readers/user_count_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserCountReader < ApiReader diff --git a/lib/readers/user_family_list_reader.rb b/lib/readers/user_family_list_reader.rb index bced061..d6eccd6 100644 --- a/lib/readers/user_family_list_reader.rb +++ b/lib/readers/user_family_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserFamilyListReader < ApiReader diff --git a/lib/readers/user_invitation_list_reader.rb b/lib/readers/user_invitation_list_reader.rb index 2025003..c1bf09e 100644 --- a/lib/readers/user_invitation_list_reader.rb +++ b/lib/readers/user_invitation_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserInvitationListReader < ApiReader diff --git a/lib/readers/user_list_reader.rb b/lib/readers/user_list_reader.rb index 25e0a4a..5675b00 100644 --- a/lib/readers/user_list_reader.rb +++ b/lib/readers/user_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserListReader < ApiReader diff --git a/lib/readers/user_note_list_reader.rb b/lib/readers/user_note_list_reader.rb index 2537f37..737607c 100644 --- a/lib/readers/user_note_list_reader.rb +++ b/lib/readers/user_note_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserNoteListReader < ApiReader diff --git a/lib/readers/user_process_answer_list_reader.rb b/lib/readers/user_process_answer_list_reader.rb index 131b941..af22f5e 100644 --- a/lib/readers/user_process_answer_list_reader.rb +++ b/lib/readers/user_process_answer_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserProcessAnswerListReader < ApiReader diff --git a/lib/readers/user_process_list_reader.rb b/lib/readers/user_process_list_reader.rb index bdba16d..60fc9ad 100644 --- a/lib/readers/user_process_list_reader.rb +++ b/lib/readers/user_process_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserProcessListReader < ApiReader diff --git a/lib/readers/user_reader.rb b/lib/readers/user_reader.rb index 1bc4881..03c6805 100644 --- a/lib/readers/user_reader.rb +++ b/lib/readers/user_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserReader < ApiReader diff --git a/lib/readers/user_role_list_reader.rb b/lib/readers/user_role_list_reader.rb index 659bc06..cf38fa3 100644 --- a/lib/readers/user_role_list_reader.rb +++ b/lib/readers/user_role_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserRoleListReader < ApiReader diff --git a/lib/readers/user_skill_list_reader.rb b/lib/readers/user_skill_list_reader.rb index a9e746f..6a63282 100644 --- a/lib/readers/user_skill_list_reader.rb +++ b/lib/readers/user_skill_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserSkillListReader < ApiReader diff --git a/lib/readers/web_hook_list_reader.rb b/lib/readers/web_hook_list_reader.rb index 4f8d26e..8beedb1 100644 --- a/lib/readers/web_hook_list_reader.rb +++ b/lib/readers/web_hook_list_reader.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class WebHookListReader < ApiReader diff --git a/lib/the_city_admin.rb b/lib/the_city_admin.rb index 75125ea..8a934e8 100644 --- a/lib/the_city_admin.rb +++ b/lib/the_city_admin.rb @@ -25,7 +25,7 @@ # This class is meant to be a wrapper TheCity Admin API (OnTheCity.org). -module TheCity +module TheCityAdmin class AdminApi class << self diff --git a/lib/writers/api_writer.rb b/lib/writers/api_writer.rb index 9b769d7..94e6236 100644 --- a/lib/writers/api_writer.rb +++ b/lib/writers/api_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin # This adapter is the standard for all saving objects. class ApiWriter diff --git a/lib/writers/donation_export_writer.rb b/lib/writers/donation_export_writer.rb index 234498c..4fa9bf4 100644 --- a/lib/writers/donation_export_writer.rb +++ b/lib/writers/donation_export_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class DonationExportWriter < ApiWriter diff --git a/lib/writers/family_writer.rb b/lib/writers/family_writer.rb index ee348ed..6d5b231 100644 --- a/lib/writers/family_writer.rb +++ b/lib/writers/family_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class FamilyWriter < ApiWriter diff --git a/lib/writers/fund_writer.rb b/lib/writers/fund_writer.rb index 2b77e42..5cdace0 100644 --- a/lib/writers/fund_writer.rb +++ b/lib/writers/fund_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class FundWriter < ApiWriter diff --git a/lib/writers/group_address_writer.rb b/lib/writers/group_address_writer.rb index 5e137c1..249fb83 100644 --- a/lib/writers/group_address_writer.rb +++ b/lib/writers/group_address_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupAddressWriter < ApiWriter diff --git a/lib/writers/group_export_writer.rb b/lib/writers/group_export_writer.rb index 12ae77d..6142a99 100644 --- a/lib/writers/group_export_writer.rb +++ b/lib/writers/group_export_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupExportWriter < ApiWriter diff --git a/lib/writers/group_writer.rb b/lib/writers/group_writer.rb index 9131ea3..9a72862 100644 --- a/lib/writers/group_writer.rb +++ b/lib/writers/group_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class GroupWriter < ApiWriter diff --git a/lib/writers/metric_measurement_writer.rb b/lib/writers/metric_measurement_writer.rb index 4f8e4bb..223587f 100644 --- a/lib/writers/metric_measurement_writer.rb +++ b/lib/writers/metric_measurement_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class MetricMeasurementWriter < ApiWriter diff --git a/lib/writers/metric_writer.rb b/lib/writers/metric_writer.rb index 0f49e3e..81e4165 100644 --- a/lib/writers/metric_writer.rb +++ b/lib/writers/metric_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class MetricWriter < ApiWriter diff --git a/lib/writers/skill_writer.rb b/lib/writers/skill_writer.rb index 1f2894d..be44d84 100644 --- a/lib/writers/skill_writer.rb +++ b/lib/writers/skill_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class SkillWriter < ApiWriter diff --git a/lib/writers/tag_writer.rb b/lib/writers/tag_writer.rb index 7af8cec..ded4a7a 100644 --- a/lib/writers/tag_writer.rb +++ b/lib/writers/tag_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class TagWriter < ApiWriter diff --git a/lib/writers/terminology_writer.rb b/lib/writers/terminology_writer.rb index 481db7b..cc0915c 100644 --- a/lib/writers/terminology_writer.rb +++ b/lib/writers/terminology_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class TerminologyWriter < ApiWriter diff --git a/lib/writers/user_address_writer.rb b/lib/writers/user_address_writer.rb index 9ce84b1..22213e4 100644 --- a/lib/writers/user_address_writer.rb +++ b/lib/writers/user_address_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserAddressWriter < ApiWriter diff --git a/lib/writers/user_admin_privilege_writer.rb b/lib/writers/user_admin_privilege_writer.rb index a2a13f5..05d5e6c 100644 --- a/lib/writers/user_admin_privilege_writer.rb +++ b/lib/writers/user_admin_privilege_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserAdminPrivilegeWriter < ApiWriter diff --git a/lib/writers/user_invitation_writer.rb b/lib/writers/user_invitation_writer.rb index 8373903..7422fa1 100644 --- a/lib/writers/user_invitation_writer.rb +++ b/lib/writers/user_invitation_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserInvitationWriter < ApiWriter diff --git a/lib/writers/user_note_writer.rb b/lib/writers/user_note_writer.rb index 75f59a6..54abc35 100644 --- a/lib/writers/user_note_writer.rb +++ b/lib/writers/user_note_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserNoteWriter < ApiWriter diff --git a/lib/writers/user_role_writer.rb b/lib/writers/user_role_writer.rb index 5ba68b5..6f2e926 100644 --- a/lib/writers/user_role_writer.rb +++ b/lib/writers/user_role_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserRoleWriter < ApiWriter diff --git a/lib/writers/user_skill_writer.rb b/lib/writers/user_skill_writer.rb index 2aa1268..3fe8fa4 100644 --- a/lib/writers/user_skill_writer.rb +++ b/lib/writers/user_skill_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserSkillWriter < ApiWriter diff --git a/lib/writers/user_writer.rb b/lib/writers/user_writer.rb index d6b90c6..116e766 100644 --- a/lib/writers/user_writer.rb +++ b/lib/writers/user_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class UserWriter < ApiWriter diff --git a/lib/writers/web_hook_writer.rb b/lib/writers/web_hook_writer.rb index 9423415..0bfcfa9 100644 --- a/lib/writers/web_hook_writer.rb +++ b/lib/writers/web_hook_writer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin class WebHookWriter < ApiWriter diff --git a/spec/factories/address.rb b/spec/factories/address.rb index c05cc9c..23248f1 100644 --- a/spec/factories/address.rb +++ b/spec/factories/address.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :address, :class => TheCity::Address do diff --git a/spec/factories/address_list.rb b/spec/factories/address_list.rb index d301ddd..c861e4a 100644 --- a/spec/factories/address_list.rb +++ b/spec/factories/address_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :address_list, :class => TheCity::AddressList do diff --git a/spec/factories/checkin.rb b/spec/factories/checkin.rb index 2dcddc6..21543d2 100644 --- a/spec/factories/checkin.rb +++ b/spec/factories/checkin.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :checkin, :class => TheCity::Checkin do diff --git a/spec/factories/checkin_list.rb b/spec/factories/checkin_list.rb index c21c484..09b1e08 100644 --- a/spec/factories/checkin_list.rb +++ b/spec/factories/checkin_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :checkin_list, :class => TheCity::CheckinList do diff --git a/spec/factories/group.rb b/spec/factories/group.rb index e105fab..ee9baf3 100644 --- a/spec/factories/group.rb +++ b/spec/factories/group.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :group, :class => TheCity::Group do diff --git a/spec/factories/group_address.rb b/spec/factories/group_address.rb index 29a0965..1b2515f 100644 --- a/spec/factories/group_address.rb +++ b/spec/factories/group_address.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :group_address, :class => TheCity::GroupAddress do diff --git a/spec/factories/group_address_list.rb b/spec/factories/group_address_list.rb index 358727e..4c76315 100644 --- a/spec/factories/group_address_list.rb +++ b/spec/factories/group_address_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :group_address_list, :class => TheCity::GroupAddressList do diff --git a/spec/factories/group_checkin.rb b/spec/factories/group_checkin.rb index f0a9f0a..5c5e5f7 100644 --- a/spec/factories/group_checkin.rb +++ b/spec/factories/group_checkin.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :group_checkin, :class => TheCity::GroupCheckin do diff --git a/spec/factories/group_checkin_list.rb b/spec/factories/group_checkin_list.rb index abfcc6d..42ad1dc 100644 --- a/spec/factories/group_checkin_list.rb +++ b/spec/factories/group_checkin_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :group_checkin_list, :class => TheCity::GroupCheckinList do diff --git a/spec/factories/group_event_attendance.rb b/spec/factories/group_event_attendance.rb index 975dd18..65f7cd0 100644 --- a/spec/factories/group_event_attendance.rb +++ b/spec/factories/group_event_attendance.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :group_event_attendance, :class => TheCity::GroupEventAttendance do diff --git a/spec/factories/group_event_attendance_list.rb b/spec/factories/group_event_attendance_list.rb index 86134d5..6b2a5f7 100644 --- a/spec/factories/group_event_attendance_list.rb +++ b/spec/factories/group_event_attendance_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :group_event_attendance_list, :class => TheCity::GroupEventAttendanceList do diff --git a/spec/factories/group_export.rb b/spec/factories/group_export.rb index 5be00f5..46452b1 100644 --- a/spec/factories/group_export.rb +++ b/spec/factories/group_export.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :group_export, :class => TheCity::GroupExport do diff --git a/spec/factories/group_export_list.rb b/spec/factories/group_export_list.rb index 0f10ab2..997f6ba 100644 --- a/spec/factories/group_export_list.rb +++ b/spec/factories/group_export_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :group_export_list, :class => TheCity::GroupExportList do diff --git a/spec/factories/group_role.rb b/spec/factories/group_role.rb index 1258eb7..90e6c00 100644 --- a/spec/factories/group_role.rb +++ b/spec/factories/group_role.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :group_role, :class => TheCity::GroupRole do diff --git a/spec/factories/group_tag.rb b/spec/factories/group_tag.rb index ce80d56..33ee196 100644 --- a/spec/factories/group_tag.rb +++ b/spec/factories/group_tag.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :group_tag, :class => TheCity::GroupTag do diff --git a/spec/factories/role.rb b/spec/factories/role.rb index 0403a73..9f1d746 100644 --- a/spec/factories/role.rb +++ b/spec/factories/role.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :role, :class => TheCity::Role do diff --git a/spec/factories/role_list.rb b/spec/factories/role_list.rb index 741380f..6d7b1e6 100644 --- a/spec/factories/role_list.rb +++ b/spec/factories/role_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :role_list, :class => TheCity::RoleList do diff --git a/spec/factories/skill.rb b/spec/factories/skill.rb index 5cea120..e1d9994 100644 --- a/spec/factories/skill.rb +++ b/spec/factories/skill.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :skill, :class => TheCity::Skill do diff --git a/spec/factories/skill_list.rb b/spec/factories/skill_list.rb index ac74ee5..a00beef 100644 --- a/spec/factories/skill_list.rb +++ b/spec/factories/skill_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :skill_list, :class => TheCity::SkillList do diff --git a/spec/factories/skilled_user_id_list.rb b/spec/factories/skilled_user_id_list.rb index 2d13515..cbeb0d5 100644 --- a/spec/factories/skilled_user_id_list.rb +++ b/spec/factories/skilled_user_id_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :skilled_user_id_list, :class => TheCity::SkilledUserIdList do diff --git a/spec/factories/skilled_user_list.rb b/spec/factories/skilled_user_list.rb index 2b12089..878cba4 100644 --- a/spec/factories/skilled_user_list.rb +++ b/spec/factories/skilled_user_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :skilled_user_list, :class => TheCity::SkilledUserList do diff --git a/spec/factories/tag.rb b/spec/factories/tag.rb index fe831a1..610617d 100644 --- a/spec/factories/tag.rb +++ b/spec/factories/tag.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :tag, :class => TheCity::Tag do diff --git a/spec/factories/tag_group_list.rb b/spec/factories/tag_group_list.rb index e2f564e..cba2aa3 100644 --- a/spec/factories/tag_group_list.rb +++ b/spec/factories/tag_group_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :tag_group_list, :class => TheCity::TagGroupList do diff --git a/spec/factories/tag_list.rb b/spec/factories/tag_list.rb index 2edaf00..412f845 100644 --- a/spec/factories/tag_list.rb +++ b/spec/factories/tag_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :tag_list, :class => TheCity::TagList do diff --git a/spec/factories/terminology.rb b/spec/factories/terminology.rb index ff0df1f..fef23eb 100644 --- a/spec/factories/terminology.rb +++ b/spec/factories/terminology.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :terminology, :class => TheCity::Terminology do diff --git a/spec/factories/terminology_list.rb b/spec/factories/terminology_list.rb index 0649a05..3e199f3 100644 --- a/spec/factories/terminology_list.rb +++ b/spec/factories/terminology_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :terminology_list, :class => TheCity::TerminologyList do diff --git a/spec/factories/user.rb b/spec/factories/user.rb index 3a24ee0..1c92504 100644 --- a/spec/factories/user.rb +++ b/spec/factories/user.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user, :class => TheCity::User do diff --git a/spec/factories/user_address.rb b/spec/factories/user_address.rb index bf59bdd..26d5c92 100644 --- a/spec/factories/user_address.rb +++ b/spec/factories/user_address.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_address, :class => TheCity::UserAddress do diff --git a/spec/factories/user_address_list.rb b/spec/factories/user_address_list.rb index bda6ffe..b2e8b1c 100644 --- a/spec/factories/user_address_list.rb +++ b/spec/factories/user_address_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_address_list, :class => TheCity::UserAddressList do diff --git a/spec/factories/user_admin_privilege.rb b/spec/factories/user_admin_privilege.rb index cc69199..d93ba21 100644 --- a/spec/factories/user_admin_privilege.rb +++ b/spec/factories/user_admin_privilege.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_admin_privilege, :class => TheCity::UserAdminPrivilege do diff --git a/spec/factories/user_admin_privilege_list.rb b/spec/factories/user_admin_privilege_list.rb index be16a59..cf67497 100644 --- a/spec/factories/user_admin_privilege_list.rb +++ b/spec/factories/user_admin_privilege_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_admin_privilege_list, :class => TheCity::UserAdminPrivilegeList do diff --git a/spec/factories/user_barcode.rb b/spec/factories/user_barcode.rb index d238484..f3d29b6 100644 --- a/spec/factories/user_barcode.rb +++ b/spec/factories/user_barcode.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_barcode, :class => TheCity::UserBarcode do diff --git a/spec/factories/user_family_list.rb b/spec/factories/user_family_list.rb index 160b069..eb90f75 100644 --- a/spec/factories/user_family_list.rb +++ b/spec/factories/user_family_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_family_list, :class => TheCity::UserFamilyList do diff --git a/spec/factories/user_family_member.rb b/spec/factories/user_family_member.rb index 421bc76..612e070 100644 --- a/spec/factories/user_family_member.rb +++ b/spec/factories/user_family_member.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_family_member, :class => TheCity::UserFamilyMember do diff --git a/spec/factories/user_invitation.rb b/spec/factories/user_invitation.rb index dfa9864..4275683 100644 --- a/spec/factories/user_invitation.rb +++ b/spec/factories/user_invitation.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_invitation, :class => TheCity::UserInvitation do diff --git a/spec/factories/user_invitation_list.rb b/spec/factories/user_invitation_list.rb index 640a82e..cd50a49 100644 --- a/spec/factories/user_invitation_list.rb +++ b/spec/factories/user_invitation_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_invitation_list, :class => TheCity::UserInvitationList do diff --git a/spec/factories/user_list.rb b/spec/factories/user_list.rb index c59124e..0a70623 100644 --- a/spec/factories/user_list.rb +++ b/spec/factories/user_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_list, :class => TheCity::UserList do diff --git a/spec/factories/user_note.rb b/spec/factories/user_note.rb index 40c7647..e502e71 100644 --- a/spec/factories/user_note.rb +++ b/spec/factories/user_note.rb @@ -1,5 +1,5 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_note, :class => TheCity::UserNote do diff --git a/spec/factories/user_note_list.rb b/spec/factories/user_note_list.rb index ceef4f3..4646d01 100644 --- a/spec/factories/user_note_list.rb +++ b/spec/factories/user_note_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_note_list, :class => TheCity::UserNoteList do diff --git a/spec/factories/user_process.rb b/spec/factories/user_process.rb index 1f9058c..bec2d33 100644 --- a/spec/factories/user_process.rb +++ b/spec/factories/user_process.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_process, :class => TheCity::UserProcess do diff --git a/spec/factories/user_process_answer.rb b/spec/factories/user_process_answer.rb index f2520d2..a82798e 100644 --- a/spec/factories/user_process_answer.rb +++ b/spec/factories/user_process_answer.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_process_answer, :class => TheCity::UserProcessAnswer do diff --git a/spec/factories/user_process_answer_list.rb b/spec/factories/user_process_answer_list.rb index 1010604..4c1727e 100644 --- a/spec/factories/user_process_answer_list.rb +++ b/spec/factories/user_process_answer_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_process_answer_list, :class => TheCity::UserProcessAnswerList do diff --git a/spec/factories/user_process_list.rb b/spec/factories/user_process_list.rb index 5daf477..91a82d6 100644 --- a/spec/factories/user_process_list.rb +++ b/spec/factories/user_process_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_process_list, :class => TheCity::UserProcessList do diff --git a/spec/factories/user_role.rb b/spec/factories/user_role.rb index 8db9bfc..8379b95 100644 --- a/spec/factories/user_role.rb +++ b/spec/factories/user_role.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_role, :class => TheCity::UserRole do diff --git a/spec/factories/user_role_list.rb b/spec/factories/user_role_list.rb index 4f83a38..0f5dfbd 100644 --- a/spec/factories/user_role_list.rb +++ b/spec/factories/user_role_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_role_list, :class => TheCity::UserRoleList do diff --git a/spec/factories/user_skill.rb b/spec/factories/user_skill.rb index b618467..09397df 100644 --- a/spec/factories/user_skill.rb +++ b/spec/factories/user_skill.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_skill, :class => TheCity::UserSkill do diff --git a/spec/factories/user_skill_list.rb b/spec/factories/user_skill_list.rb index ae2a7f9..9bb4417 100644 --- a/spec/factories/user_skill_list.rb +++ b/spec/factories/user_skill_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :user_skill_list, :class => TheCity::UserSkillList do diff --git a/spec/factories/web_hook.rb b/spec/factories/web_hook.rb index 430d740..508a252 100644 --- a/spec/factories/web_hook.rb +++ b/spec/factories/web_hook.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :web_hook, :class => TheCity::WebHook do diff --git a/spec/factories/web_hook_list.rb b/spec/factories/web_hook_list.rb index bc61f0d..3280d56 100644 --- a/spec/factories/web_hook_list.rb +++ b/spec/factories/web_hook_list.rb @@ -1,4 +1,4 @@ -module TheCity +module TheCityAdmin FactoryGirl.define do factory :web_hook_list, :class => TheCity::WebHookList do From 940fb2818849f0c1dd10a6cf80b2ea9a7f8e4a51 Mon Sep 17 00:00:00 2001 From: David Beck Date: Mon, 28 Oct 2013 18:37:21 -0700 Subject: [PATCH 2/3] Fixed module name change --- README.rdoc | 2 +- examples/addresses.rb | 8 ++-- examples/barcodes_checkins.rb | 10 ++--- examples/donation_export.rb | 14 +++---- examples/donations.rb | 6 +-- examples/familes.rb | 18 ++++---- examples/groups.rb | 8 ++-- examples/measurements.rb | 10 ++--- examples/metrics.rb | 14 +++---- examples/roles.rb | 16 +++---- examples/skills.rb | 12 +++--- examples/tags.rb | 12 +++--- examples/terminology.rb | 12 +++--- examples/users.rb | 42 +++++++++---------- examples/webhooks.rb | 16 +++---- lib/api/address_list.rb | 2 +- lib/api/campus_list.rb | 2 +- lib/api/checkin_list.rb | 2 +- lib/api/church.rb | 2 +- lib/api/donation_export_list.rb | 2 +- lib/api/donation_list.rb | 2 +- lib/api/fund_list.rb | 2 +- lib/api/group_address_list.rb | 2 +- lib/api/group_checkin_list.rb | 2 +- lib/api/group_event_attendance_list.rb | 2 +- lib/api/group_export_list.rb | 2 +- lib/api/group_invitation_list.rb | 2 +- lib/api/group_list.rb | 2 +- lib/api/group_role_list.rb | 2 +- lib/api/group_tag_list.rb | 2 +- lib/api/invitation_list.rb | 2 +- lib/api/metric_list.rb | 2 +- lib/api/metric_measurement_list.rb | 2 +- lib/api/metric_measurement_values.rb | 2 +- lib/api/pledge_list.rb | 2 +- lib/api/role_list.rb | 2 +- lib/api/skill_list.rb | 2 +- lib/api/skilled_user_id_list.rb | 2 +- lib/api/skilled_user_list.rb | 2 +- lib/api/tag_group_list.rb | 2 +- lib/api/tag_list.rb | 2 +- lib/api/terminology_list.rb | 2 +- lib/api/user_address_list.rb | 2 +- lib/api/user_admin_privilege_list.rb | 2 +- lib/api/user_count.rb | 2 +- lib/api/user_family_list.rb | 2 +- lib/api/user_invitation_list.rb | 2 +- lib/api/user_list.rb | 2 +- lib/api/user_note_list.rb | 2 +- lib/api/user_process_answer_list.rb | 2 +- lib/api/user_process_list.rb | 2 +- lib/api/user_role_list.rb | 2 +- lib/api/user_skill_list.rb | 2 +- lib/api/web_hook_list.rb | 2 +- lib/common.rb | 4 +- lib/readers/api_reader.rb | 2 +- lib/writers/api_writer.rb | 4 +- spec/api/group_address_list_spec.rb | 10 ++--- spec/api/group_checkin_list_spec.rb | 10 ++--- spec/api/group_event_attendance_list_spec.rb | 10 ++--- spec/api/role_list_spec.rb | 10 ++--- spec/api/skill_list_spec.rb | 10 ++--- spec/api/skilled_user_id_list_spec.rb | 10 ++--- spec/api/skilled_user_list_spec.rb | 10 ++--- spec/api/tag_group_list_spec.rb | 8 ++-- spec/api/tag_list_spec.rb | 10 ++--- spec/api/terminology_list_spec.rb | 10 ++--- spec/api/user_address_list_spec.rb | 10 ++--- spec/api/user_admin_privilege_list_spec.rb | 10 ++--- spec/api/user_family_list_spec.rb | 10 ++--- spec/api/user_invitation_list_spec.rb | 10 ++--- spec/api/user_list_spec.rb | 10 ++--- spec/api/user_note_list_spec.rb | 10 ++--- spec/api/user_process_answer_list_spec.rb | 8 ++-- spec/api/user_process_list_spec.rb | 10 ++--- spec/api/user_role_list_spec.rb | 10 ++--- spec/api/user_skill_list_spec.rb | 10 ++--- spec/api/user_spec.rb | 4 +- spec/api/web_hook_list_spec.rb | 10 ++--- spec/factories/address.rb | 2 +- spec/factories/address_list.rb | 2 +- spec/factories/checkin.rb | 2 +- spec/factories/checkin_list.rb | 2 +- spec/factories/group.rb | 2 +- spec/factories/group_address.rb | 2 +- spec/factories/group_address_list.rb | 2 +- spec/factories/group_checkin.rb | 2 +- spec/factories/group_checkin_list.rb | 2 +- spec/factories/group_event_attendance.rb | 2 +- spec/factories/group_event_attendance_list.rb | 2 +- spec/factories/group_export.rb | 2 +- spec/factories/group_export_list.rb | 2 +- spec/factories/group_role.rb | 2 +- spec/factories/group_tag.rb | 2 +- spec/factories/role.rb | 2 +- spec/factories/role_list.rb | 2 +- spec/factories/skill.rb | 2 +- spec/factories/skill_list.rb | 2 +- spec/factories/skilled_user_id_list.rb | 2 +- spec/factories/skilled_user_list.rb | 2 +- spec/factories/tag.rb | 2 +- spec/factories/tag_group_list.rb | 2 +- spec/factories/tag_list.rb | 2 +- spec/factories/terminology.rb | 2 +- spec/factories/terminology_list.rb | 2 +- spec/factories/user.rb | 2 +- spec/factories/user_address.rb | 2 +- spec/factories/user_address_list.rb | 2 +- spec/factories/user_admin_privilege.rb | 2 +- spec/factories/user_admin_privilege_list.rb | 2 +- spec/factories/user_barcode.rb | 2 +- spec/factories/user_family_list.rb | 2 +- spec/factories/user_family_member.rb | 2 +- spec/factories/user_invitation.rb | 2 +- spec/factories/user_invitation_list.rb | 2 +- spec/factories/user_list.rb | 2 +- spec/factories/user_note.rb | 2 +- spec/factories/user_note_list.rb | 2 +- spec/factories/user_process.rb | 2 +- spec/factories/user_process_answer.rb | 2 +- spec/factories/user_process_answer_list.rb | 2 +- spec/factories/user_process_list.rb | 2 +- spec/factories/user_role.rb | 2 +- spec/factories/user_role_list.rb | 2 +- spec/factories/user_skill.rb | 2 +- spec/factories/user_skill_list.rb | 2 +- spec/factories/web_hook.rb | 2 +- spec/factories/web_hook_list.rb | 2 +- spec/readers/api_reader_spec.rb | 6 +-- spec/spec_helper.rb | 4 +- spec/writers/tag_writer_spec.rb | 14 +++---- spec/writers/user_writer_spec.rb | 14 +++---- 132 files changed, 317 insertions(+), 317 deletions(-) diff --git a/README.rdoc b/README.rdoc index 6d81d38..768e006 100644 --- a/README.rdoc +++ b/README.rdoc @@ -23,7 +23,7 @@ Add your church's City API Token and API Key to [RAILS_ROOT]/config/initializers Next you will need to initialize a connection - TheCity::AdminApi.connect(THECITY_KEY, THECITY_TOKEN) + TheCityAdmin::AdminApi.connect(THECITY_KEY, THECITY_TOKEN) diff --git a/examples/addresses.rb b/examples/addresses.rb index 0ed3bda..17ddb0c 100644 --- a/examples/addresses.rb +++ b/examples/addresses.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,12 +11,12 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" -address_list = TheCity::AddressList.new +address_list = TheCityAdmin::AddressList.new if address_list.empty? puts "No addresses in list" else @@ -25,7 +25,7 @@ address = address_list[0] -address2 = TheCity::Address.load_by_id(address.id) +address2 = TheCityAdmin::Address.load_by_id(address.id) if address2.street == address.street puts "Address found (#{address.street})" diff --git a/examples/barcodes_checkins.rb b/examples/barcodes_checkins.rb index bcec2f5..f8968aa 100644 --- a/examples/barcodes_checkins.rb +++ b/examples/barcodes_checkins.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,12 +11,12 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" -barcode = TheCity::Barcode.load_by_id(12345) +barcode = TheCityAdmin::Barcode.load_by_id(12345) if barcode.nil? puts 'Barcode not found' else @@ -26,7 +26,7 @@ puts "------------------------------------" -checkin_list = TheCity::CheckinList.new +checkin_list = TheCityAdmin::CheckinList.new # if checkin_list.empty? # puts "No checkins in list" # else @@ -35,7 +35,7 @@ # checkin = checkin_list[0] -# checkin2 = TheCity::Checkin.load_by_id(checkin.id) +# checkin2 = TheCityAdmin::Checkin.load_by_id(checkin.id) # if checkin2.nil? # puts 'Checkin not found' # else diff --git a/examples/donation_export.rb b/examples/donation_export.rb index 3ef1800..4b00368 100644 --- a/examples/donation_export.rb +++ b/examples/donation_export.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,15 +11,15 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) -de_list = TheCity::DonationExportList.new +de_list = TheCityAdmin::DonationExportList.new de_list.each do |item| puts "DonationExport: #{item.inspect}" end -# de_list = TheCity::DonationExportList.new +# de_list = TheCityAdmin::DonationExportList.new # de_list.each do |item| # if item.delete # puts "DonationExport #{item.id} deleted" @@ -28,14 +28,14 @@ # end # end -# de_list = TheCity::DonationExportList.new +# de_list = TheCityAdmin::DonationExportList.new # if de_list.empty? # puts "No donation exports found" # else # puts "Donation exports found" # end -# donation_export = TheCity::DonationExport.new +# donation_export = TheCityAdmin::DonationExport.new # if donation_export.save # puts "Donation export created" # else @@ -43,7 +43,7 @@ # end -# de_list = TheCity::DonationExportList.new +# de_list = TheCityAdmin::DonationExportList.new # if de_list.empty? # puts "No donation exports found" # else diff --git a/examples/donations.rb b/examples/donations.rb index b9d82ea..6e650a4 100644 --- a/examples/donations.rb +++ b/examples/donations.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,10 +11,10 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) -de_list = TheCity::DonationList.new +de_list = TheCityAdmin::DonationList.new de_list.each do |item| puts "DonationExport: #{item.inspect}" end diff --git a/examples/familes.rb b/examples/familes.rb index af6a62e..6a4ccc4 100644 --- a/examples/familes.rb +++ b/examples/familes.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,34 +11,34 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" -user_list = TheCity::UserList.new +user_list = TheCityAdmin::UserList.new user1 = user_list[0] # user2 = user_list[1] -family = TheCity::Family.new +family = TheCityAdmin::Family.new family.external_id = 'family123' -member1 = TheCity::FamilyMember.new +member1 = TheCityAdmin::FamilyMember.new member1.user_id = user1.id member1.name = user1.full_name member1.email = user1.email member1.external_id_1 = 'weshays123' member1.birthdate = user1.birthdate -member1.family_role = TheCity::FamilyMember::Roles[:spouse] +member1.family_role = TheCityAdmin::FamilyMember::Roles[:spouse] family.add_family_member(member1) -# member2 = TheCity::FamilyMember.new +# member2 = TheCityAdmin::FamilyMember.new # member2.user_id = user2.id # member2.name = user2.full_name # member2.email = user2.email # member2.external_id_1 = 'annahays123' # member2.birthdate = user1.birthdate -# member2.family_role = TheCity::FamilyMember::Roles[:spouse] +# member2.family_role = TheCityAdmin::FamilyMember::Roles[:spouse] # family.add_family_member(member2) if family.save @@ -49,7 +49,7 @@ end -#family2 = TheCity::Family.load_by_id(398768686) +#family2 = TheCityAdmin::Family.load_by_id(398768686) # if family.nil? # puts "Family found with #{family.members.size} members" diff --git a/examples/groups.rb b/examples/groups.rb index f0e9a5b..c3f36dd 100644 --- a/examples/groups.rb +++ b/examples/groups.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,9 +11,9 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) -group_list = TheCity::GroupList.new +group_list = TheCityAdmin::GroupList.new group = group_list.first puts group.name @@ -26,7 +26,7 @@ puts "Addresses: #{group.addresses.size}" end -address = TheCity::GroupAddress.new +address = TheCityAdmin::GroupAddress.new address.group_id = group.id address.location_type = 'Work' address.street = '445 S. Virginia St' diff --git a/examples/measurements.rb b/examples/measurements.rb index c8fe369..9f4ce72 100644 --- a/examples/measurements.rb +++ b/examples/measurements.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,12 +11,12 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" -metric_list = TheCity::MetricList.new +metric_list = TheCityAdmin::MetricList.new if metric_list.empty? puts "No metrics in list" else @@ -24,7 +24,7 @@ end -# The next line is the same as: TheCity::MetricMeasurementList.new({:metric_id => metric_list[0].id}) +# The next line is the same as: TheCityAdmin::MetricMeasurementList.new({:metric_id => metric_list[0].id}) measurement_list = metric_list[0].measurements if metric_list.empty? puts "No measurements in list" @@ -33,7 +33,7 @@ end -# The next line is the same as: TheCity::MetricMeasurementValues.new({:metric_id => metric_list[0].id}) +# The next line is the same as: TheCityAdmin::MetricMeasurementValues.new({:metric_id => metric_list[0].id}) values = metric_list[0].measurement_values if values.empty? puts "No values returned" diff --git a/examples/metrics.rb b/examples/metrics.rb index 0b499e5..aa29fb3 100644 --- a/examples/metrics.rb +++ b/examples/metrics.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,12 +11,12 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" -metric_list = TheCity::MetricList.new +metric_list = TheCityAdmin::MetricList.new if metric_list.empty? puts "No metrics in list" else @@ -24,7 +24,7 @@ end -metric = TheCity::Metric.new +metric = TheCityAdmin::Metric.new metric.name = "CoolThing#{Time.now.to_i}" if metric.save puts "Metric created (#{metric.id})" @@ -33,14 +33,14 @@ end -metric_list2 = TheCity::MetricList.new +metric_list2 = TheCityAdmin::MetricList.new if metric_list2.empty? puts "No metrics in list" else puts "Metrics: #{metric_list2.count}" end -metric2 = TheCity::Metric.load_by_id(metric.id) +metric2 = TheCityAdmin::Metric.load_by_id(metric.id) if metric2.nil? puts "Metric not found" else @@ -62,7 +62,7 @@ puts "Unable to delete metric #{metric2.id}: #{metric2.error_messages.join(', ')}" end -metric_list3 = TheCity::MetricList.new +metric_list3 = TheCityAdmin::MetricList.new if metric_list3.empty? puts "No metrics in list" else diff --git a/examples/roles.rb b/examples/roles.rb index 2e22764..e13123e 100644 --- a/examples/roles.rb +++ b/examples/roles.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,16 +11,16 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" puts '--- USER ROLE SETUP ---' -group_list = TheCity::GroupList.new +group_list = TheCityAdmin::GroupList.new group = group_list.first -offline_user = TheCity::User.new +offline_user = TheCityAdmin::User.new offline_user.first = 'Wes' offline_user.last = 'Hays' offline_user.email = 'someguy@someplace.org' @@ -36,9 +36,9 @@ puts "Roles: #{offline_user.roles.size}" end -role = TheCity::UserRole.new -role.group_type = TheCity::UserRole::GroupTypes[:campus] -role.title = TheCity::UserRole::Titles[:leader] +role = TheCityAdmin::UserRole.new +role.group_type = TheCityAdmin::UserRole::GroupTypes[:campus] +role.title = TheCityAdmin::UserRole::Titles[:leader] role.user_id = offline_user.id role.group_id = group.id @@ -52,7 +52,7 @@ -role_list = TheCity::RoleList.new +role_list = TheCityAdmin::RoleList.new if role_list.empty? puts "No roles in list" else diff --git a/examples/skills.rb b/examples/skills.rb index fefa6a2..4d4da34 100644 --- a/examples/skills.rb +++ b/examples/skills.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,19 +11,19 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" -skill_list = TheCity::SkillList.new +skill_list = TheCityAdmin::SkillList.new if skill_list.empty? puts "No skils in list" else puts "Skills: #{skill_list.count}" end -skill = TheCity::Skill.new +skill = TheCityAdmin::Skill.new skill.name = 'ZProgrammer' if skill.save puts "Skill created (#{skill.id})" @@ -32,7 +32,7 @@ end -skill_list2 = TheCity::SkillList.new +skill_list2 = TheCityAdmin::SkillList.new if skill_list2.empty? puts "No skills in list" else @@ -45,7 +45,7 @@ puts "Unable to delete skill #{skill.id}: #{skill.error_messages.join(', ')}" end -skill_list3 = TheCity::SkillList.new +skill_list3 = TheCityAdmin::SkillList.new if skill_list3.empty? puts "No skills in list" else diff --git a/examples/tags.rb b/examples/tags.rb index 3eac1ad..da12de4 100644 --- a/examples/tags.rb +++ b/examples/tags.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,17 +11,17 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" -tag_list = TheCity::TagList.new +tag_list = TheCityAdmin::TagList.new puts "Tags: #{tag_list.total_entries}" puts "*******************" -tag = TheCity::Tag.new +tag = TheCityAdmin::Tag.new tag.name = 'zProgrammer' if tag.save @@ -31,7 +31,7 @@ end puts "*******************" -tag_list = TheCity::TagList.new +tag_list = TheCityAdmin::TagList.new puts "Tags: #{tag_list.total_entries}" puts "*******************" @@ -54,7 +54,7 @@ puts "*******************" -tag_list = TheCity::TagList.new +tag_list = TheCityAdmin::TagList.new puts "Tags: #{tag_list.total_entries}" diff --git a/examples/terminology.rb b/examples/terminology.rb index 92b0d6f..8faa67f 100644 --- a/examples/terminology.rb +++ b/examples/terminology.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,12 +11,12 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" -term_list = TheCity::TerminologyList.new +term_list = TheCityAdmin::TerminologyList.new if term_list.empty? puts "No terms in list" else @@ -24,7 +24,7 @@ end -term = TheCity::Terminology.load_by_term('CG') +term = TheCityAdmin::Terminology.load_by_term('CG') if term.nil? puts "Terminology not found" else @@ -38,7 +38,7 @@ puts "Failed to create term: #{term.error_messages.join(', ')}" end -term2 = TheCity::Terminology.load_by_term('CG') +term2 = TheCityAdmin::Terminology.load_by_term('CG') if term2.nil? puts "Terminology not found" else @@ -52,7 +52,7 @@ puts "Failed to create term: #{term2.error_messages.join(', ')}" end -term3 = TheCity::Terminology.load_by_term('CG') +term3 = TheCityAdmin::Terminology.load_by_term('CG') if term3.nil? puts "Terminology not found" else diff --git a/examples/users.rb b/examples/users.rb index e50210b..255f090 100644 --- a/examples/users.rb +++ b/examples/users.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,24 +11,24 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) -user_list = TheCity::UserList.new +user_list = TheCityAdmin::UserList.new user = user_list.first puts user.full_name -# user_count = TheCity::UserCount.new +# user_count = TheCityAdmin::UserCount.new # puts user_count.count # puts user_count.filter -# user_count = TheCity::UserCount.new({:filter => :created_in_the_last_7_Days}) +# user_count = TheCityAdmin::UserCount.new({:filter => :created_in_the_last_7_Days}) # puts user_count.count # puts user_count.filter -offline_user = TheCity::User.new +offline_user = TheCityAdmin::User.new offline_user.first = 'Wes' offline_user.last = 'Hays' offline_user.email = 'someguy@someplace.org' @@ -49,7 +49,7 @@ puts "Failed to create offline user: #{offline_user.error_messages.join(', ')}" end -offline_user2 = TheCity::User.load_by_id(offline_user.id) +offline_user2 = TheCityAdmin::User.load_by_id(offline_user.id) puts "Loaded user first name: #{offline_user2.first}::#{offline_user2.email}" if offline_user.delete @@ -67,7 +67,7 @@ # puts "Addresses: #{user.addresses.size}" # end -# address = TheCity::UserAddress.new +# address = TheCityAdmin::UserAddress.new # address.user_id = user.id # address.location_type = 'Work' # address.street = '445 S. Virginia St' @@ -119,8 +119,8 @@ # puts "Admin privileges: #{user.admin_privileges.count}" # end -# privilege = TheCity::UserAdminPrivilege.new -# privilege.title = TheCity::UserAdminPrivilege::Permissions[:resource_admin] +# privilege = TheCityAdmin::UserAdminPrivilege.new +# privilege.title = TheCityAdmin::UserAdminPrivilege::Permissions[:resource_admin] # privilege.user_id = user.id # if privilege.save @@ -152,10 +152,10 @@ # puts "Invitations: #{user.invitations.count}" # end -# group_list = TheCity::GroupList.new +# group_list = TheCityAdmin::GroupList.new # group = group_list.first -# invitation = TheCity::UserInvitation.new +# invitation = TheCityAdmin::UserInvitation.new # invitation.user_id = user.id # invitation.email = user.email # invitation.group_id = group.id @@ -182,10 +182,10 @@ # end -# note = TheCity::UserNote.new +# note = TheCityAdmin::UserNote.new # note.author_id = user.id # note.body = "Hello World" -# note.visible_to = [TheCity::UserNote::VisibleTo[:process_user], TheCity::UserNote::VisibleTo[:resource_admin]] +# note.visible_to = [TheCityAdmin::UserNote::VisibleTo[:process_user], TheCityAdmin::UserNote::VisibleTo[:resource_admin]] # if note.save # puts "Note saved" @@ -224,10 +224,10 @@ # puts "------------------------------------" -# group_list = TheCity::GroupList.new +# group_list = TheCityAdmin::GroupList.new # group = group_list.first -# offline_user = TheCity::User.new +# offline_user = TheCityAdmin::User.new # offline_user.first = 'Wes' # offline_user.last = 'Hays' # offline_user.email = 'someguy@someplace.org' @@ -243,9 +243,9 @@ # puts "Roles: #{offline_user.roles.size}" # end -# role = TheCity::UserRole.new -# role.group_type = TheCity::UserRole::GroupTypes[:campus] -# role.title = TheCity::UserRole::Titles[:leader] +# role = TheCityAdmin::UserRole.new +# role.group_type = TheCityAdmin::UserRole::GroupTypes[:campus] +# role.title = TheCityAdmin::UserRole::Titles[:leader] # role.user_id = offline_user.id # role.group_id = group.id @@ -289,10 +289,10 @@ # puts "Skills: #{user.skills.size}" # end -# skill_list = TheCity::SkillList.new +# skill_list = TheCityAdmin::SkillList.new # skill = skill_list.first -# user_skill = TheCity::UserSkill.new +# user_skill = TheCityAdmin::UserSkill.new # user_skill.user_id = user.id # user_skill.skill_id = skill.id diff --git a/examples/webhooks.rb b/examples/webhooks.rb index a1ff932..7e09d88 100644 --- a/examples/webhooks.rb +++ b/examples/webhooks.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,21 +11,21 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" -webhook_list = TheCity::WebHookList.new +webhook_list = TheCityAdmin::WebHookList.new if webhook_list.empty? puts "No web hooks in list" else puts "Web hooks: #{webhook_list.count}" end -webhook = TheCity::WebHook.new -webhook.object = TheCity::WebHook::Objects[:group] -webhook.event = TheCity::WebHook::Events[:create] +webhook = TheCityAdmin::WebHook.new +webhook.object = TheCityAdmin::WebHook::Objects[:group] +webhook.event = TheCityAdmin::WebHook::Events[:create] webhook.callback_uri = 'https://www.example.com/mycallback_url' if webhook.save @@ -34,7 +34,7 @@ puts "Failed to create web hook: #{webhook.error_messages.join(', ')}" end -webhook_list2 = TheCity::WebHookList.new +webhook_list2 = TheCityAdmin::WebHookList.new if webhook_list2.empty? puts "No web hooks in list" else @@ -47,7 +47,7 @@ puts "Unable to delete web hook #{webhook.id}: #{webhook.error_messages.join(', ')}" end -webhook_list3 = TheCity::WebHookList.new +webhook_list3 = TheCityAdmin::WebHookList.new if webhook_list3.empty? puts "No web hooks in list" else diff --git a/lib/api/address_list.rb b/lib/api/address_list.rb index e8ebe55..3d820fe 100644 --- a/lib/api/address_list.rb +++ b/lib/api/address_list.rb @@ -20,7 +20,7 @@ class AddressList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::AddressListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::AddressListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/campus_list.rb b/lib/api/campus_list.rb index 5aabd25..97bf028 100644 --- a/lib/api/campus_list.rb +++ b/lib/api/campus_list.rb @@ -22,7 +22,7 @@ class CampusList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::CampusListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::CampusListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/checkin_list.rb b/lib/api/checkin_list.rb index 774ac13..c70861e 100644 --- a/lib/api/checkin_list.rb +++ b/lib/api/checkin_list.rb @@ -20,7 +20,7 @@ class CheckinList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::CheckinListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::CheckinListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/church.rb b/lib/api/church.rb index 109aff6..90b2de5 100644 --- a/lib/api/church.rb +++ b/lib/api/church.rb @@ -7,7 +7,7 @@ class Church < ApiObject # Constructor. def initialize - reader = TheCity::ChurchReader.new + reader = TheCityAdmin::ChurchReader.new json_data = reader.load_feed initialize_from_json_object(json_data) end diff --git a/lib/api/donation_export_list.rb b/lib/api/donation_export_list.rb index 91760cc..8812dc5 100644 --- a/lib/api/donation_export_list.rb +++ b/lib/api/donation_export_list.rb @@ -21,7 +21,7 @@ class DonationExportList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::DonationExportListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::DonationExportListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/donation_list.rb b/lib/api/donation_list.rb index 836e00a..ac5e3f4 100644 --- a/lib/api/donation_list.rb +++ b/lib/api/donation_list.rb @@ -23,7 +23,7 @@ def initialize(options = {}) @options = options @options[:page] ||= 1 @options[:per_page] ||= 50 - @options[:reader] = TheCity::DonationListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::DonationListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/fund_list.rb b/lib/api/fund_list.rb index 79d1a8d..d7d2d7f 100644 --- a/lib/api/fund_list.rb +++ b/lib/api/fund_list.rb @@ -22,7 +22,7 @@ class FundList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::FundListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::FundListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/group_address_list.rb b/lib/api/group_address_list.rb index 21da785..dfcebdf 100644 --- a/lib/api/group_address_list.rb +++ b/lib/api/group_address_list.rb @@ -21,7 +21,7 @@ class GroupAddressList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::GroupAddressListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::GroupAddressListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/group_checkin_list.rb b/lib/api/group_checkin_list.rb index 95734e0..eb00b21 100644 --- a/lib/api/group_checkin_list.rb +++ b/lib/api/group_checkin_list.rb @@ -21,7 +21,7 @@ class GroupCheckinList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::GroupCheckinListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::GroupCheckinListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/group_event_attendance_list.rb b/lib/api/group_event_attendance_list.rb index 7d03297..40e4732 100644 --- a/lib/api/group_event_attendance_list.rb +++ b/lib/api/group_event_attendance_list.rb @@ -21,7 +21,7 @@ class GroupEventAttendanceList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::GroupEventAttendanceListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::GroupEventAttendanceListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/group_export_list.rb b/lib/api/group_export_list.rb index a5fe14d..2e57fb6 100644 --- a/lib/api/group_export_list.rb +++ b/lib/api/group_export_list.rb @@ -21,7 +21,7 @@ class GroupExportList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::GroupExportListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::GroupExportListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/group_invitation_list.rb b/lib/api/group_invitation_list.rb index 89ace86..69fb11c 100644 --- a/lib/api/group_invitation_list.rb +++ b/lib/api/group_invitation_list.rb @@ -21,7 +21,7 @@ class GroupInvitationList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::GroupInvitationListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::GroupInvitationListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/group_list.rb b/lib/api/group_list.rb index 79a7c16..0af060d 100644 --- a/lib/api/group_list.rb +++ b/lib/api/group_list.rb @@ -22,7 +22,7 @@ class GroupList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::GroupListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::GroupListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/group_role_list.rb b/lib/api/group_role_list.rb index dc4e425..53295cb 100644 --- a/lib/api/group_role_list.rb +++ b/lib/api/group_role_list.rb @@ -21,7 +21,7 @@ class GroupRoleList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::GroupRoleListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::GroupRoleListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/group_tag_list.rb b/lib/api/group_tag_list.rb index 3837884..15b221b 100644 --- a/lib/api/group_tag_list.rb +++ b/lib/api/group_tag_list.rb @@ -21,7 +21,7 @@ class GroupTagList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::GroupTagListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::GroupTagListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/invitation_list.rb b/lib/api/invitation_list.rb index cb52581..a4ca805 100644 --- a/lib/api/invitation_list.rb +++ b/lib/api/invitation_list.rb @@ -21,7 +21,7 @@ class InvitationList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::InvitationListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::InvitationListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/metric_list.rb b/lib/api/metric_list.rb index 51f4efd..d970235 100644 --- a/lib/api/metric_list.rb +++ b/lib/api/metric_list.rb @@ -31,7 +31,7 @@ class MetricList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::MetricListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::MetricListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/metric_measurement_list.rb b/lib/api/metric_measurement_list.rb index e4741ad..48c19ec 100644 --- a/lib/api/metric_measurement_list.rb +++ b/lib/api/metric_measurement_list.rb @@ -22,7 +22,7 @@ class MetricMeasurementList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::MetricMeasurementListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::MetricMeasurementListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/metric_measurement_values.rb b/lib/api/metric_measurement_values.rb index cd9d95f..ac63766 100644 --- a/lib/api/metric_measurement_values.rb +++ b/lib/api/metric_measurement_values.rb @@ -30,7 +30,7 @@ def self.load_by_id(metric_id) # MetricMeasurementValues.new({:metric_id => 12345}) # def initialize(options = {}) - options[:reader] = TheCity::MetricMeasurementValuesReader.new(options) if options[:reader].nil? + options[:reader] = TheCityAdmin::MetricMeasurementValuesReader.new(options) if options[:reader].nil? @json_data = options[:reader].load_feed end diff --git a/lib/api/pledge_list.rb b/lib/api/pledge_list.rb index e3a7a0a..f5bb056 100644 --- a/lib/api/pledge_list.rb +++ b/lib/api/pledge_list.rb @@ -22,7 +22,7 @@ class PledgeList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::PledgeListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::PledgeListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/role_list.rb b/lib/api/role_list.rb index a75a840..843d2b6 100644 --- a/lib/api/role_list.rb +++ b/lib/api/role_list.rb @@ -21,7 +21,7 @@ class RoleList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::RoleListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::RoleListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/skill_list.rb b/lib/api/skill_list.rb index 729e592..79ef505 100644 --- a/lib/api/skill_list.rb +++ b/lib/api/skill_list.rb @@ -21,7 +21,7 @@ class SkillList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::SkillListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::SkillListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/skilled_user_id_list.rb b/lib/api/skilled_user_id_list.rb index 42698ab..b3df921 100644 --- a/lib/api/skilled_user_id_list.rb +++ b/lib/api/skilled_user_id_list.rb @@ -21,7 +21,7 @@ class SkilledUserIdList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::SkilledUserIdListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::SkilledUserIdListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/skilled_user_list.rb b/lib/api/skilled_user_list.rb index 362015c..1a57d57 100644 --- a/lib/api/skilled_user_list.rb +++ b/lib/api/skilled_user_list.rb @@ -21,7 +21,7 @@ class SkilledUserList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::SkilledUserListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::SkilledUserListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/tag_group_list.rb b/lib/api/tag_group_list.rb index fed6782..71085c5 100644 --- a/lib/api/tag_group_list.rb +++ b/lib/api/tag_group_list.rb @@ -21,7 +21,7 @@ class TagGroupList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::TagGroupListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::TagGroupListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/tag_list.rb b/lib/api/tag_list.rb index 9611e7b..9592718 100644 --- a/lib/api/tag_list.rb +++ b/lib/api/tag_list.rb @@ -21,7 +21,7 @@ class TagList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::TagListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::TagListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/terminology_list.rb b/lib/api/terminology_list.rb index c8905bc..4975fb4 100644 --- a/lib/api/terminology_list.rb +++ b/lib/api/terminology_list.rb @@ -21,7 +21,7 @@ class TerminologyList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::TerminologyListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::TerminologyListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/user_address_list.rb b/lib/api/user_address_list.rb index a4c3d3a..48a3632 100644 --- a/lib/api/user_address_list.rb +++ b/lib/api/user_address_list.rb @@ -21,7 +21,7 @@ class UserAddressList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::UserAddressListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserAddressListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/user_admin_privilege_list.rb b/lib/api/user_admin_privilege_list.rb index dec64df..bcc2edf 100644 --- a/lib/api/user_admin_privilege_list.rb +++ b/lib/api/user_admin_privilege_list.rb @@ -22,7 +22,7 @@ class UserAdminPrivilegeList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::UserAdminPrivilegeListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserAdminPrivilegeListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/user_count.rb b/lib/api/user_count.rb index c2a2513..6202b5f 100644 --- a/lib/api/user_count.rb +++ b/lib/api/user_count.rb @@ -20,7 +20,7 @@ class UserCount < ApiObject # UserCount.new({:filter => :created_in_the_last_7_Days}) # def initialize(options = {}) - reader = options[:reader] || TheCity::UserCountReader.new(options) + reader = options[:reader] || TheCityAdmin::UserCountReader.new(options) @json_data = reader.load_feed self.count = @json_data['count'] self.filter = @json_data['filter'] diff --git a/lib/api/user_family_list.rb b/lib/api/user_family_list.rb index b8af260..e37c9ef 100644 --- a/lib/api/user_family_list.rb +++ b/lib/api/user_family_list.rb @@ -24,7 +24,7 @@ class UserFamilyList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::UserFamilyListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserFamilyListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @id = @json_data['id'] diff --git a/lib/api/user_invitation_list.rb b/lib/api/user_invitation_list.rb index 85de83b..0bf395c 100644 --- a/lib/api/user_invitation_list.rb +++ b/lib/api/user_invitation_list.rb @@ -22,7 +22,7 @@ class UserInvitationList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::UserInvitationListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserInvitationListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/user_list.rb b/lib/api/user_list.rb index 30f2afc..f82651a 100644 --- a/lib/api/user_list.rb +++ b/lib/api/user_list.rb @@ -22,7 +22,7 @@ def initialize(options = {}) @options = options.clone @options[:page] ||= 1 @options[:per_page] ||= 200 - @options[:reader] = TheCity::UserListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/user_note_list.rb b/lib/api/user_note_list.rb index a5faa30..c891947 100644 --- a/lib/api/user_note_list.rb +++ b/lib/api/user_note_list.rb @@ -22,7 +22,7 @@ class UserNoteList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::UserNoteListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserNoteListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/user_process_answer_list.rb b/lib/api/user_process_answer_list.rb index 0b2f711..81e4b20 100644 --- a/lib/api/user_process_answer_list.rb +++ b/lib/api/user_process_answer_list.rb @@ -23,7 +23,7 @@ class UserProcessAnswerList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::UserProcessAnswerListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserProcessAnswerListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/user_process_list.rb b/lib/api/user_process_list.rb index b6a9626..eeec09a 100644 --- a/lib/api/user_process_list.rb +++ b/lib/api/user_process_list.rb @@ -22,7 +22,7 @@ class UserProcessList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::UserProcessListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserProcessListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/user_role_list.rb b/lib/api/user_role_list.rb index 471706a..16413ae 100644 --- a/lib/api/user_role_list.rb +++ b/lib/api/user_role_list.rb @@ -22,7 +22,7 @@ class UserRoleList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::UserRoleListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserRoleListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @user_id = options[:user_id] || nil diff --git a/lib/api/user_skill_list.rb b/lib/api/user_skill_list.rb index 276249a..4b8715d 100644 --- a/lib/api/user_skill_list.rb +++ b/lib/api/user_skill_list.rb @@ -22,7 +22,7 @@ class UserSkillList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::UserSkillListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserSkillListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @user_id = options[:user_id] || nil diff --git a/lib/api/web_hook_list.rb b/lib/api/web_hook_list.rb index 1dd0570..5c3d5b7 100644 --- a/lib/api/web_hook_list.rb +++ b/lib/api/web_hook_list.rb @@ -21,7 +21,7 @@ class WebHookList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::WebHookListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::WebHookListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/common.rb b/lib/common.rb index 3fa14d5..bce82b2 100644 --- a/lib/common.rb +++ b/lib/common.rb @@ -50,12 +50,12 @@ def self._build_admin_headers(method, path, params, body) current_time = Time.now.to_i.to_s string_to_sign = current_time.to_s + method_request + url - unencoded_hmac = OpenSSL::HMAC.digest('sha256', TheCity::AdminApi.api_key, string_to_sign) + unencoded_hmac = OpenSSL::HMAC.digest('sha256', TheCityAdmin::AdminApi.api_key, string_to_sign) unescaped_hmac = Base64.encode64(unencoded_hmac).chomp hmac_signature = CGI.escape(unescaped_hmac) {'X-City-Sig' => hmac_signature, - 'X-City-User-Token' => TheCity::AdminApi.api_token, + 'X-City-User-Token' => TheCityAdmin::AdminApi.api_token, 'X-City-Time' => current_time, 'Accept' => 'application/vnd.thecity.admin.v1+json', 'Content-Type' => 'application/json', diff --git a/lib/readers/api_reader.rb b/lib/readers/api_reader.rb index d36fa57..70d83db 100644 --- a/lib/readers/api_reader.rb +++ b/lib/readers/api_reader.rb @@ -16,7 +16,7 @@ def load_feed # data = @cacher.get_data( @class_key ) # else @url_data_params ||= {} - response = TheCity::admin_request(:get, @url_data_path, @url_data_params) + response = TheCityAdmin::admin_request(:get, @url_data_path, @url_data_params) data = JSON.parse(response.body) @headers = response.headers @cacher.save_data(@class_key, data) unless @cacher.nil? diff --git a/lib/writers/api_writer.rb b/lib/writers/api_writer.rb index 94e6236..47ab53f 100644 --- a/lib/writers/api_writer.rb +++ b/lib/writers/api_writer.rb @@ -22,7 +22,7 @@ def save_object end begin - response = TheCity::admin_request(@url_action, @url_data_path, nil, @url_data_params.to_json) + response = TheCityAdmin::admin_request(@url_action, @url_data_path, nil, @url_data_params.to_json) @response_code = response.code # No content but is a success success = response.code == 204 ? {'success' => true} : JSON.parse(response.body) @@ -49,7 +49,7 @@ def delete_object begin # @url_data_path should be the same as :put if this object is already # setup and mapped to an object that exists - response = TheCity::admin_request(:delete, @url_data_delete_path) + response = TheCityAdmin::admin_request(:delete, @url_data_delete_path) success = response.code == 204 ? true : false # No content but is a success rescue Exception => e @error_messages = e.message.split(',') diff --git a/spec/api/group_address_list_spec.rb b/spec/api/group_address_list_spec.rb index 8aaae4b..5e0ba09 100644 --- a/spec/api/group_address_list_spec.rb +++ b/spec/api/group_address_list_spec.rb @@ -19,7 +19,7 @@ :addresses => [FactoryGirl.attributes_for(:group_address)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::GroupAddressList.new({:group_id => group_id}) + address_list = TheCityAdmin::GroupAddressList.new({:group_id => group_id}) address = address_list[0] address.city.should == "Sammamish" @@ -35,7 +35,7 @@ :addresses => [] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::GroupAddressList.new({:group_id => group_id}) + address_list = TheCityAdmin::GroupAddressList.new({:group_id => group_id}) address_list.empty?.should be_true end @@ -50,7 +50,7 @@ :addresses => [FactoryGirl.attributes_for(:group_address)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::GroupAddressList.new({:group_id => group_id, :page => 2}) + address_list = TheCityAdmin::GroupAddressList.new({:group_id => group_id, :page => 2}) address = address_list[0] address.city.should == "Sammamish" @@ -65,7 +65,7 @@ :addresses => [FactoryGirl.attributes_for(:group_address)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::GroupAddressList.new({:group_id => group_id}) + address_list = TheCityAdmin::GroupAddressList.new({:group_id => group_id}) addresses = [] address_list.each { |address| addresses << address.city } @@ -81,7 +81,7 @@ :addresses => [FactoryGirl.attributes_for(:group_address)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::GroupAddressList.new({:group_id => group_id}) + address_list = TheCityAdmin::GroupAddressList.new({:group_id => group_id}) addresses = address_list.collect { |address| address.city } addresses.should == ["Sammamish"] diff --git a/spec/api/group_checkin_list_spec.rb b/spec/api/group_checkin_list_spec.rb index f87396b..966c223 100644 --- a/spec/api/group_checkin_list_spec.rb +++ b/spec/api/group_checkin_list_spec.rb @@ -19,7 +19,7 @@ :checkins => [FactoryGirl.attributes_for(:group_checkin)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - checkin_list = TheCity::GroupCheckinList.new({:group_id => group_id}) + checkin_list = TheCityAdmin::GroupCheckinList.new({:group_id => group_id}) checkin = checkin_list[0] checkin.parent_group_name.should == "Ballard Childrens ministry" @@ -35,7 +35,7 @@ :checkins => [] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - checkin_list = TheCity::GroupCheckinList.new({:group_id => group_id}) + checkin_list = TheCityAdmin::GroupCheckinList.new({:group_id => group_id}) checkin_list.empty?.should be_true end @@ -50,7 +50,7 @@ :checkins => [FactoryGirl.attributes_for(:group_checkin)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - checkin_list = TheCity::GroupCheckinList.new({:group_id => group_id, :page => 2}) + checkin_list = TheCityAdmin::GroupCheckinList.new({:group_id => group_id, :page => 2}) checkin = checkin_list[0] checkin.parent_group_name.should == "Ballard Childrens ministry" @@ -65,7 +65,7 @@ :checkins => [FactoryGirl.attributes_for(:group_checkin)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - checkin_list = TheCity::GroupCheckinList.new({:group_id => group_id}) + checkin_list = TheCityAdmin::GroupCheckinList.new({:group_id => group_id}) checkins = [] checkin_list.each { |checkin| checkins << checkin.parent_group_name } @@ -81,7 +81,7 @@ :checkins => [FactoryGirl.attributes_for(:group_checkin)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - checkin_list = TheCity::GroupCheckinList.new({:group_id => group_id}) + checkin_list = TheCityAdmin::GroupCheckinList.new({:group_id => group_id}) checkins = checkin_list.collect { |checkin| checkin.parent_group_name } checkins.should == ["Ballard Childrens ministry"] diff --git a/spec/api/group_event_attendance_list_spec.rb b/spec/api/group_event_attendance_list_spec.rb index 348e2d2..6bc9bc0 100644 --- a/spec/api/group_event_attendance_list_spec.rb +++ b/spec/api/group_event_attendance_list_spec.rb @@ -19,7 +19,7 @@ :event_attendances => [FactoryGirl.attributes_for(:group_event_attendance)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - attendance_list = TheCity::GroupEventAttendanceList.new({:group_id => group_id}) + attendance_list = TheCityAdmin::GroupEventAttendanceList.new({:group_id => group_id}) attendance = attendance_list[0] attendance.user.should == "Johnny Smith" @@ -35,7 +35,7 @@ :event_attendances => [] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - attendance_list = TheCity::GroupEventAttendanceList.new({:group_id => group_id}) + attendance_list = TheCityAdmin::GroupEventAttendanceList.new({:group_id => group_id}) attendance_list.empty?.should be_true end @@ -50,7 +50,7 @@ :event_attendances => [FactoryGirl.attributes_for(:group_event_attendance)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - attendance_list = TheCity::GroupEventAttendanceList.new({:group_id => group_id, :page => 2}) + attendance_list = TheCityAdmin::GroupEventAttendanceList.new({:group_id => group_id, :page => 2}) attendance = attendance_list[0] attendance.user.should == "Johnny Smith" @@ -65,7 +65,7 @@ :event_attendances => [FactoryGirl.attributes_for(:group_event_attendance)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - attendance_list = TheCity::GroupEventAttendanceList.new({:group_id => group_id}) + attendance_list = TheCityAdmin::GroupEventAttendanceList.new({:group_id => group_id}) attendances = [] attendance_list.each { |attendance| attendances << attendance.user } @@ -81,7 +81,7 @@ :event_attendances => [FactoryGirl.attributes_for(:group_event_attendance)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - attendance_list = TheCity::GroupEventAttendanceList.new({:group_id => group_id}) + attendance_list = TheCityAdmin::GroupEventAttendanceList.new({:group_id => group_id}) attendances = attendance_list.collect { |attendance| attendance.user } attendances.should == ["Johnny Smith"] diff --git a/spec/api/role_list_spec.rb b/spec/api/role_list_spec.rb index eacf38f..0314499 100644 --- a/spec/api/role_list_spec.rb +++ b/spec/api/role_list_spec.rb @@ -14,7 +14,7 @@ it 'should pass if role list attribute is not specifed' do request_data = FactoryGirl.attributes_for(:role_list).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::RoleList.new + role_list = TheCityAdmin::RoleList.new role_list.roles.should == [] end @@ -23,7 +23,7 @@ it 'should pass if role list is empty' do request_data = FactoryGirl.attributes_for(:role_list, :roles => []).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::RoleList.new + role_list = TheCityAdmin::RoleList.new role_list.roles.should == [] end @@ -36,7 +36,7 @@ :roles => [FactoryGirl.attributes_for(:role)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::RoleList.new({:page => 2}) + role_list = TheCityAdmin::RoleList.new({:page => 2}) role_list.roles.should == ["Leader"] end @@ -48,7 +48,7 @@ :roles => [FactoryGirl.attributes_for(:role)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::RoleList.new + role_list = TheCityAdmin::RoleList.new roles = [] role_list.each { |role| roles << role.title } @@ -63,7 +63,7 @@ :roles => [FactoryGirl.attributes_for(:role)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::RoleList.new + role_list = TheCityAdmin::RoleList.new roles = role_list.collect { |role| role.title } role_list.roles.should == ["Leader"] diff --git a/spec/api/skill_list_spec.rb b/spec/api/skill_list_spec.rb index daf321e..c9c4bfb 100644 --- a/spec/api/skill_list_spec.rb +++ b/spec/api/skill_list_spec.rb @@ -14,7 +14,7 @@ it 'should pass if skill list attribute is not specifed' do request_data = FactoryGirl.attributes_for(:skill_list).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::SkillList.new + skill_list = TheCityAdmin::SkillList.new skill_list.skills.should == [] end @@ -23,7 +23,7 @@ it 'should pass if skill list is empty' do request_data = FactoryGirl.attributes_for(:skill_list, :skills => []).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::SkillList.new + skill_list = TheCityAdmin::SkillList.new skill_list.skills.should == [] end @@ -36,7 +36,7 @@ :skills => [FactoryGirl.attributes_for(:skill)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::SkillList.new({:page => 2}) + skill_list = TheCityAdmin::SkillList.new({:page => 2}) skill_list.skills.should == ["Welding"] end @@ -49,7 +49,7 @@ :skills => [FactoryGirl.attributes_for(:skill)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::SkillList.new + skill_list = TheCityAdmin::SkillList.new skills = [] skill_list.each { |skill| skills << skill.name } @@ -64,7 +64,7 @@ :skills => [FactoryGirl.attributes_for(:skill)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::SkillList.new + skill_list = TheCityAdmin::SkillList.new skills = skill_list.collect { |skill| skill.name } skill_list.skills.should == ["Welding"] diff --git a/spec/api/skilled_user_id_list_spec.rb b/spec/api/skilled_user_id_list_spec.rb index 4aff456..d934cd1 100644 --- a/spec/api/skilled_user_id_list_spec.rb +++ b/spec/api/skilled_user_id_list_spec.rb @@ -15,7 +15,7 @@ skill_id = 123 request_data = FactoryGirl.attributes_for(:skilled_user_id_list).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_id_list = TheCity::SkilledUserIdList.new({:skill_id => skill_id}) + skilled_user_id_list = TheCityAdmin::SkilledUserIdList.new({:skill_id => skill_id}) skilled_user_id_list.user_ids.should == [] end @@ -25,7 +25,7 @@ skill_id = 123 request_data = FactoryGirl.attributes_for(:skilled_user_id_list, :users => []).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_id_list = TheCity::SkilledUserIdList.new({:skill_id => skill_id}) + skilled_user_id_list = TheCityAdmin::SkilledUserIdList.new({:skill_id => skill_id}) skilled_user_id_list.user_ids.should == [] end @@ -40,7 +40,7 @@ :user_ids => [FactoryGirl.attributes_for(:user)[:id]] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_id_list = TheCity::SkilledUserIdList.new({:skill_id => skill_id, :page => page}) + skilled_user_id_list = TheCityAdmin::SkilledUserIdList.new({:skill_id => skill_id, :page => page}) skilled_user_id_list.user_ids.should == [946060874] end @@ -54,7 +54,7 @@ :user_ids => [FactoryGirl.attributes_for(:user)[:id]] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_id_list = TheCity::SkilledUserIdList.new({:skill_id => skill_id}) + skilled_user_id_list = TheCityAdmin::SkilledUserIdList.new({:skill_id => skill_id}) users = [] skilled_user_id_list.each { |user_id| users << user_id} @@ -70,7 +70,7 @@ :user_ids => [FactoryGirl.attributes_for(:user)[:id]] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_id_list = TheCity::SkilledUserIdList.new({:skill_id => skill_id}) + skilled_user_id_list = TheCityAdmin::SkilledUserIdList.new({:skill_id => skill_id}) users = skilled_user_id_list.collect { |user_id| user_id } skilled_user_id_list.user_ids.should == [946060874] diff --git a/spec/api/skilled_user_list_spec.rb b/spec/api/skilled_user_list_spec.rb index 0a438e0..4e4872d 100644 --- a/spec/api/skilled_user_list_spec.rb +++ b/spec/api/skilled_user_list_spec.rb @@ -15,7 +15,7 @@ skill_id = 123 request_data = FactoryGirl.attributes_for(:skilled_user_list).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_list = TheCity::SkilledUserList.new({:skill_id => skill_id}) + skilled_user_list = TheCityAdmin::SkilledUserList.new({:skill_id => skill_id}) skilled_user_list.users.should == [] end @@ -25,7 +25,7 @@ skill_id = 123 request_data = FactoryGirl.attributes_for(:skilled_user_list, :users => []).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_list = TheCity::SkilledUserList.new({:skill_id => skill_id}) + skilled_user_list = TheCityAdmin::SkilledUserList.new({:skill_id => skill_id}) skilled_user_list.users.should == [] end @@ -40,7 +40,7 @@ :users => [FactoryGirl.attributes_for(:user)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_list = TheCity::SkilledUserList.new({:skill_id => skill_id, :page => page}) + skilled_user_list = TheCityAdmin::SkilledUserList.new({:skill_id => skill_id, :page => page}) skilled_user_list.users.should == ["Sam Shepherd"] end @@ -54,7 +54,7 @@ :users => [FactoryGirl.attributes_for(:user)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_list = TheCity::SkilledUserList.new({:skill_id => skill_id}) + skilled_user_list = TheCityAdmin::SkilledUserList.new({:skill_id => skill_id}) users = [] skilled_user_list.each { |user| users << user.full_name } @@ -70,7 +70,7 @@ :users => [FactoryGirl.attributes_for(:user)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_list = TheCity::SkilledUserList.new({:skill_id => skill_id}) + skilled_user_list = TheCityAdmin::SkilledUserList.new({:skill_id => skill_id}) users = skilled_user_list.collect { |user| user.full_name } skilled_user_list.users.should == ["Sam Shepherd"] diff --git a/spec/api/tag_group_list_spec.rb b/spec/api/tag_group_list_spec.rb index 1207a69..190c65a 100644 --- a/spec/api/tag_group_list_spec.rb +++ b/spec/api/tag_group_list_spec.rb @@ -15,7 +15,7 @@ tag_id = 123 request_data = FactoryGirl.attributes_for(:tag_group_list, :groups => []).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - tag_group_list = TheCity::TagGroupList.new({:tag_id => tag_id}) + tag_group_list = TheCityAdmin::TagGroupList.new({:tag_id => tag_id}) tag_group_list.groups.should == [] end @@ -30,7 +30,7 @@ :groups => [FactoryGirl.attributes_for(:group)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - tag_group_list = TheCity::TagGroupList.new({:tag_id => tag_id, :page => page}) + tag_group_list = TheCityAdmin::TagGroupList.new({:tag_id => tag_id, :page => page}) tag_group_list.groups.should == ["The Group"] end @@ -44,7 +44,7 @@ :groups => [FactoryGirl.attributes_for(:group)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - tag_group_list = TheCity::TagGroupList.new({:tag_id => tag_id}) + tag_group_list = TheCityAdmin::TagGroupList.new({:tag_id => tag_id}) groups = [] tag_group_list.each { |group| groups << group.name } @@ -60,7 +60,7 @@ :groups => [FactoryGirl.attributes_for(:group)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - tag_group_list = TheCity::TagGroupList.new({:tag_id => tag_id}) + tag_group_list = TheCityAdmin::TagGroupList.new({:tag_id => tag_id}) groups = tag_group_list.collect { |group| group.name } tag_group_list.groups.should == ["The Group"] diff --git a/spec/api/tag_list_spec.rb b/spec/api/tag_list_spec.rb index b0cc19c..ea6595e 100644 --- a/spec/api/tag_list_spec.rb +++ b/spec/api/tag_list_spec.rb @@ -14,7 +14,7 @@ it 'should pass if tag list attribute is not specifed' do request_data = FactoryGirl.attributes_for(:tag_list).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - tag_list = TheCity::TagList.new + tag_list = TheCityAdmin::TagList.new tag_list.tags.should == [] end @@ -23,7 +23,7 @@ it 'should pass if tag list is empty' do request_data = FactoryGirl.attributes_for(:tag_list, :tags => []).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - tag_list = TheCity::TagList.new + tag_list = TheCityAdmin::TagList.new tag_list.tags.should == [] end @@ -37,7 +37,7 @@ :tags => [FactoryGirl.attributes_for(:tag)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - tag_list = TheCity::TagList.new({:page => page}) + tag_list = TheCityAdmin::TagList.new({:page => page}) tag_list.tags.should == ["Evening"] end @@ -50,7 +50,7 @@ :tags => [FactoryGirl.attributes_for(:tag)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - tag_list = TheCity::TagList.new + tag_list = TheCityAdmin::TagList.new tags = [] tag_list.each { |tag| tags << tag.name } @@ -65,7 +65,7 @@ :tags => [FactoryGirl.attributes_for(:tag)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - tag_list = TheCity::TagList.new + tag_list = TheCityAdmin::TagList.new tags = tag_list.collect { |tag| tag.name } tag_list.tags.should == ["Evening"] diff --git a/spec/api/terminology_list_spec.rb b/spec/api/terminology_list_spec.rb index 3581f36..7b4bf9b 100644 --- a/spec/api/terminology_list_spec.rb +++ b/spec/api/terminology_list_spec.rb @@ -14,7 +14,7 @@ it 'should pass if terminology list attribute is not specifed' do request_data = FactoryGirl.attributes_for(:terminology_list).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - terminology_list = TheCity::TerminologyList.new + terminology_list = TheCityAdmin::TerminologyList.new terminology_list.labels.should == [] end @@ -23,7 +23,7 @@ it 'should pass if terminology list is empty' do request_data = FactoryGirl.attributes_for(:terminology_list, :terminologies => []).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - terminology_list = TheCity::TerminologyList.new + terminology_list = TheCityAdmin::TerminologyList.new terminology_list.labels.should == [] end @@ -36,7 +36,7 @@ :labels => [FactoryGirl.attributes_for(:terminology)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - terminology_list = TheCity::TerminologyList.new({:page => 2}) + terminology_list = TheCityAdmin::TerminologyList.new({:page => 2}) terminology_list.labels.should == ['CG'] end @@ -48,7 +48,7 @@ :labels => [FactoryGirl.attributes_for(:terminology)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - terminology_list = TheCity::TerminologyList.new + terminology_list = TheCityAdmin::TerminologyList.new terminologies = [] terminology_list.each { |terminology| terminologies << terminology.label } @@ -63,7 +63,7 @@ :labels => [FactoryGirl.attributes_for(:terminology)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - terminology_list = TheCity::TerminologyList.new + terminology_list = TheCityAdmin::TerminologyList.new terminologies = terminology_list.collect { |terminology| terminology.label } terminology_list.labels.should == ['CG'] diff --git a/spec/api/user_address_list_spec.rb b/spec/api/user_address_list_spec.rb index 25363d8..ae21bd0 100644 --- a/spec/api/user_address_list_spec.rb +++ b/spec/api/user_address_list_spec.rb @@ -19,7 +19,7 @@ :addresses => [FactoryGirl.attributes_for(:user_address)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::UserAddressList.new({:user_id => user_id}) + address_list = TheCityAdmin::UserAddressList.new({:user_id => user_id}) address = address_list[0] address.city.should == "Seattle" @@ -34,7 +34,7 @@ :addresses => [] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::UserAddressList.new({:user_id => user_id}) + address_list = TheCityAdmin::UserAddressList.new({:user_id => user_id}) address_list.empty?.should be_true end @@ -49,7 +49,7 @@ :addresses => [FactoryGirl.attributes_for(:user_address)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::UserAddressList.new({:user_id => user_id, :page => page}) + address_list = TheCityAdmin::UserAddressList.new({:user_id => user_id, :page => page}) address = address_list[0] address.city.should == "Seattle" @@ -64,7 +64,7 @@ :addresses => [FactoryGirl.attributes_for(:user_address)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::UserAddressList.new({:user_id => user_id}) + address_list = TheCityAdmin::UserAddressList.new({:user_id => user_id}) addresses = [] address_list.each { |address| addresses << address.city } @@ -80,7 +80,7 @@ :addresses => [FactoryGirl.attributes_for(:user_address)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::UserAddressList.new({:user_id => user_id}) + address_list = TheCityAdmin::UserAddressList.new({:user_id => user_id}) addresses = address_list.collect { |address| address.city } addresses.should == ["Seattle"] diff --git a/spec/api/user_admin_privilege_list_spec.rb b/spec/api/user_admin_privilege_list_spec.rb index f6a78a9..64a8242 100644 --- a/spec/api/user_admin_privilege_list_spec.rb +++ b/spec/api/user_admin_privilege_list_spec.rb @@ -19,7 +19,7 @@ :account_roles => [FactoryGirl.attributes_for(:user_admin_privilege)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - admin_privilege_list = TheCity::UserAdminPrivilegeList.new({:user_id => user_id}) + admin_privilege_list = TheCityAdmin::UserAdminPrivilegeList.new({:user_id => user_id}) admin_privilege = admin_privilege_list[0] admin_privilege.title.should == "Designer" @@ -34,7 +34,7 @@ :account_roles => [] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - admin_privilege_list = TheCity::UserAdminPrivilegeList.new({:user_id => user_id}) + admin_privilege_list = TheCityAdmin::UserAdminPrivilegeList.new({:user_id => user_id}) admin_privilege_list.empty?.should be_true end @@ -49,7 +49,7 @@ :account_roles => [FactoryGirl.attributes_for(:user_admin_privilege)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - admin_privilege_list = TheCity::UserAdminPrivilegeList.new({:user_id => user_id, :page => page}) + admin_privilege_list = TheCityAdmin::UserAdminPrivilegeList.new({:user_id => user_id, :page => page}) admin_privilege = admin_privilege_list[0] admin_privilege.title.should == "Designer" @@ -64,7 +64,7 @@ :account_roles => [FactoryGirl.attributes_for(:user_admin_privilege)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - admin_privilege_list = TheCity::UserAdminPrivilegeList.new({:user_id => user_id}) + admin_privilege_list = TheCityAdmin::UserAdminPrivilegeList.new({:user_id => user_id}) admin_privileges = [] admin_privilege_list.each { |admin_privilege| admin_privileges << admin_privilege.title } @@ -80,7 +80,7 @@ :account_roles => [FactoryGirl.attributes_for(:user_admin_privilege)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - admin_privilege_list = TheCity::UserAdminPrivilegeList.new({:user_id => user_id}) + admin_privilege_list = TheCityAdmin::UserAdminPrivilegeList.new({:user_id => user_id}) admin_privileges = admin_privilege_list.collect { |admin_privilege| admin_privilege.title } admin_privileges.should == ["Designer"] diff --git a/spec/api/user_family_list_spec.rb b/spec/api/user_family_list_spec.rb index 4e39980..4bd3ebc 100644 --- a/spec/api/user_family_list_spec.rb +++ b/spec/api/user_family_list_spec.rb @@ -19,7 +19,7 @@ :family_members => [FactoryGirl.attributes_for(:user_family_member)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - family_list = TheCity::UserFamilyList.new({:user_id => user_id}) + family_list = TheCityAdmin::UserFamilyList.new({:user_id => user_id}) family = family_list[0] family.name.should == "Pastor Sam Shepherd" @@ -34,7 +34,7 @@ :family_members => [] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - family_list = TheCity::UserFamilyList.new({:user_id => user_id}) + family_list = TheCityAdmin::UserFamilyList.new({:user_id => user_id}) family_list.empty?.should be_true end @@ -49,7 +49,7 @@ :family_members => [FactoryGirl.attributes_for(:user_family_member)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - family_list = TheCity::UserFamilyList.new({:user_id => user_id, :page => page}) + family_list = TheCityAdmin::UserFamilyList.new({:user_id => user_id, :page => page}) family = family_list[0] family.name.should == "Pastor Sam Shepherd" @@ -64,7 +64,7 @@ :family_members => [FactoryGirl.attributes_for(:user_family_member)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - family_list = TheCity::UserFamilyList.new({:user_id => user_id}) + family_list = TheCityAdmin::UserFamilyList.new({:user_id => user_id}) family_members = [] family_list.each { |family| family_members << family.name } @@ -80,7 +80,7 @@ :family_members => [FactoryGirl.attributes_for(:user_family_member)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - family_list = TheCity::UserFamilyList.new({:user_id => user_id}) + family_list = TheCityAdmin::UserFamilyList.new({:user_id => user_id}) family_members = family_list.collect { |family| family.name } family_members.should == ["Pastor Sam Shepherd"] diff --git a/spec/api/user_invitation_list_spec.rb b/spec/api/user_invitation_list_spec.rb index 808deb4..ebfac0f 100644 --- a/spec/api/user_invitation_list_spec.rb +++ b/spec/api/user_invitation_list_spec.rb @@ -19,7 +19,7 @@ :invitations => [FactoryGirl.attributes_for(:user_invitation)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - invitation_list = TheCity::UserInvitationList.new({:user_id => user_id}) + invitation_list = TheCityAdmin::UserInvitationList.new({:user_id => user_id}) invitation = invitation_list[0] invitation.source.should == "API Invite | Group A (17543) on 2012-02-06 at 16:54" @@ -34,7 +34,7 @@ :invitations => [] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - invitation_list = TheCity::UserInvitationList.new({:user_id => user_id}) + invitation_list = TheCityAdmin::UserInvitationList.new({:user_id => user_id}) invitation_list.empty?.should be_true end @@ -49,7 +49,7 @@ :invitations => [FactoryGirl.attributes_for(:user_invitation)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - invitation_list = TheCity::UserInvitationList.new({:user_id => user_id, :page => 2}) + invitation_list = TheCityAdmin::UserInvitationList.new({:user_id => user_id, :page => 2}) invitation = invitation_list[0] invitation.source.should == "API Invite | Group A (17543) on 2012-02-06 at 16:54" @@ -64,7 +64,7 @@ :invitations => [FactoryGirl.attributes_for(:user_invitation)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - invitation_list = TheCity::UserInvitationList.new({:user_id => user_id}) + invitation_list = TheCityAdmin::UserInvitationList.new({:user_id => user_id}) invitations = [] invitation_list.each { |invitation| invitations << invitation.source } @@ -80,7 +80,7 @@ :invitations => [FactoryGirl.attributes_for(:user_invitation)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - invitation_list = TheCity::UserInvitationList.new({:user_id => user_id}) + invitation_list = TheCityAdmin::UserInvitationList.new({:user_id => user_id}) invitations = invitation_list.collect { |invitation| invitation.source } invitations.should == ["API Invite | Group A (17543) on 2012-02-06 at 16:54"] diff --git a/spec/api/user_list_spec.rb b/spec/api/user_list_spec.rb index a9d4438..f0639b2 100644 --- a/spec/api/user_list_spec.rb +++ b/spec/api/user_list_spec.rb @@ -14,7 +14,7 @@ it 'should pass if user list attribute is not specifed' do request_data = FactoryGirl.attributes_for(:user_list).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - user_list = TheCity::UserList.new + user_list = TheCityAdmin::UserList.new user_list.names.should == [] end @@ -23,7 +23,7 @@ it 'should pass if user list is empty' do request_data = FactoryGirl.attributes_for(:user_list, :users => []).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - user_list = TheCity::UserList.new + user_list = TheCityAdmin::UserList.new user_list.names.should == [] end @@ -36,7 +36,7 @@ :users => [FactoryGirl.attributes_for(:user)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - user_list = TheCity::UserList.new({:page => 2}) + user_list = TheCityAdmin::UserList.new({:page => 2}) user_list.names.should == ["Sam Shepherd"] end @@ -49,7 +49,7 @@ :users => [FactoryGirl.attributes_for(:user)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - user_list = TheCity::UserList.new + user_list = TheCityAdmin::UserList.new users = [] user_list.each { |user| users << user.full_name } @@ -64,7 +64,7 @@ :users => [FactoryGirl.attributes_for(:user)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - user_list = TheCity::UserList.new + user_list = TheCityAdmin::UserList.new users = user_list.collect { |user| user.full_name } user_list.names.should == ["Sam Shepherd"] diff --git a/spec/api/user_note_list_spec.rb b/spec/api/user_note_list_spec.rb index b1a7517..40a808c 100644 --- a/spec/api/user_note_list_spec.rb +++ b/spec/api/user_note_list_spec.rb @@ -19,7 +19,7 @@ :notes => [FactoryGirl.attributes_for(:user_note)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - note_list = TheCity::UserNoteList.new({:user_id => user_id}) + note_list = TheCityAdmin::UserNoteList.new({:user_id => user_id}) note = note_list[0] note.body.should == "Deaconship is complete" @@ -34,7 +34,7 @@ :notes => [] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - note_list = TheCity::UserNoteList.new({:user_id => user_id}) + note_list = TheCityAdmin::UserNoteList.new({:user_id => user_id}) note_list.empty?.should be_true end @@ -49,7 +49,7 @@ :notes => [FactoryGirl.attributes_for(:user_note)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - note_list = TheCity::UserNoteList.new({:user_id => user_id, :page => page}) + note_list = TheCityAdmin::UserNoteList.new({:user_id => user_id, :page => page}) note = note_list[0] note.body.should == "Deaconship is complete" @@ -64,7 +64,7 @@ :notes => [FactoryGirl.attributes_for(:user_note)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - note_list = TheCity::UserNoteList.new({:user_id => user_id}) + note_list = TheCityAdmin::UserNoteList.new({:user_id => user_id}) notes = [] note_list.each { |note| notes << note.body } @@ -80,7 +80,7 @@ :notes => [FactoryGirl.attributes_for(:user_note)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - note_list = TheCity::UserNoteList.new({:user_id => user_id}) + note_list = TheCityAdmin::UserNoteList.new({:user_id => user_id}) notes = note_list.collect { |note| note.body } notes.should == ["Deaconship is complete"] diff --git a/spec/api/user_process_answer_list_spec.rb b/spec/api/user_process_answer_list_spec.rb index 0ea9849..b226619 100644 --- a/spec/api/user_process_answer_list_spec.rb +++ b/spec/api/user_process_answer_list_spec.rb @@ -17,7 +17,7 @@ :answers => [FactoryGirl.attributes_for(:user_process_answer)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - answer_list = TheCity::UserProcessAnswerList.new({:user_id => user_id, :process_id => process_id}) + answer_list = TheCityAdmin::UserProcessAnswerList.new({:user_id => user_id, :process_id => process_id}) answer = answer_list[0] answer.question_id.should == 316 @@ -35,7 +35,7 @@ :answers => [] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - answer_list = TheCity::UserProcessAnswerList.new({:user_id => user_id, :process_id => process_id}) + answer_list = TheCityAdmin::UserProcessAnswerList.new({:user_id => user_id, :process_id => process_id}) answer_list.empty?.should be_true end @@ -51,7 +51,7 @@ :answers => [FactoryGirl.attributes_for(:user_process_answer)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - answer_list = TheCity::UserProcessAnswerList.new({:user_id => user_id, :page => page}) + answer_list = TheCityAdmin::UserProcessAnswerList.new({:user_id => user_id, :page => page}) answer_list.current_page.should == 2 answer_list.empty?.should be_false @@ -68,7 +68,7 @@ :answers => [FactoryGirl.attributes_for(:user_process_answer)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - answer_list = TheCity::UserProcessAnswerList.new({:user_id => user_id}) + answer_list = TheCityAdmin::UserProcessAnswerList.new({:user_id => user_id}) answers = answer_list.map(&:answer) answers.should == %w(bar) diff --git a/spec/api/user_process_list_spec.rb b/spec/api/user_process_list_spec.rb index 54cdaf9..e9e6de0 100644 --- a/spec/api/user_process_list_spec.rb +++ b/spec/api/user_process_list_spec.rb @@ -18,7 +18,7 @@ :processes => [FactoryGirl.attributes_for(:user_process)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - process_list = TheCity::UserProcessList.new({:user_id => user_id}) + process_list = TheCityAdmin::UserProcessList.new({:user_id => user_id}) process = process_list[0] process.name.should == "Member Process" @@ -33,7 +33,7 @@ :processes => [] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - process_list = TheCity::UserProcessList.new({:user_id => user_id}) + process_list = TheCityAdmin::UserProcessList.new({:user_id => user_id}) process_list.empty?.should be_true end @@ -48,7 +48,7 @@ :processes => [FactoryGirl.attributes_for(:user_process)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - process_list = TheCity::UserProcessList.new({:user_id => user_id, :page => page}) + process_list = TheCityAdmin::UserProcessList.new({:user_id => user_id, :page => page}) process = process_list[0] process.name.should == "Member Process" @@ -63,7 +63,7 @@ :processes => [FactoryGirl.attributes_for(:user_process)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - process_list = TheCity::UserProcessList.new({:user_id => user_id}) + process_list = TheCityAdmin::UserProcessList.new({:user_id => user_id}) processes = [] process_list.each { |process| processes << process.name } @@ -79,7 +79,7 @@ :processes => [FactoryGirl.attributes_for(:user_process)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - process_list = TheCity::UserProcessList.new({:user_id => user_id}) + process_list = TheCityAdmin::UserProcessList.new({:user_id => user_id}) processes = process_list.collect { |process| process.name } processes.should == ["Member Process"] diff --git a/spec/api/user_role_list_spec.rb b/spec/api/user_role_list_spec.rb index e6872e5..9e2b169 100644 --- a/spec/api/user_role_list_spec.rb +++ b/spec/api/user_role_list_spec.rb @@ -19,7 +19,7 @@ :roles => [FactoryGirl.attributes_for(:user_role)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::UserRoleList.new({:user_id => user_id}) + role_list = TheCityAdmin::UserRoleList.new({:user_id => user_id}) role = role_list[0] role.group_name.should == "The Group" @@ -34,7 +34,7 @@ :roles => [] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::UserRoleList.new({:user_id => user_id}) + role_list = TheCityAdmin::UserRoleList.new({:user_id => user_id}) role_list.empty?.should be_true end @@ -49,7 +49,7 @@ :roles => [FactoryGirl.attributes_for(:user_role)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::UserRoleList.new({:user_id => user_id, :page => page}) + role_list = TheCityAdmin::UserRoleList.new({:user_id => user_id, :page => page}) role = role_list[0] role.group_name.should == "The Group" @@ -64,7 +64,7 @@ :roles => [FactoryGirl.attributes_for(:user_role)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::UserRoleList.new({:user_id => user_id}) + role_list = TheCityAdmin::UserRoleList.new({:user_id => user_id}) roles = [] role_list.each { |role| roles << role.group_name } @@ -80,7 +80,7 @@ :roles => [FactoryGirl.attributes_for(:user_role)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::UserRoleList.new({:user_id => user_id}) + role_list = TheCityAdmin::UserRoleList.new({:user_id => user_id}) roles = role_list.collect { |role| role.group_name } roles.should == ["The Group"] diff --git a/spec/api/user_skill_list_spec.rb b/spec/api/user_skill_list_spec.rb index 35af058..0a4e547 100644 --- a/spec/api/user_skill_list_spec.rb +++ b/spec/api/user_skill_list_spec.rb @@ -19,7 +19,7 @@ :skills => [FactoryGirl.attributes_for(:user_skill)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::UserSkillList.new({:user_id => user_id}) + skill_list = TheCityAdmin::UserSkillList.new({:user_id => user_id}) skill = skill_list[0] skill.name.should == "Teaching-Curriculum" @@ -34,7 +34,7 @@ :skills => [] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::UserSkillList.new({:user_id => user_id}) + skill_list = TheCityAdmin::UserSkillList.new({:user_id => user_id}) skill_list.empty?.should be_true end @@ -49,7 +49,7 @@ :skills => [FactoryGirl.attributes_for(:user_skill)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::UserSkillList.new({:user_id => user_id, :page => page}) + skill_list = TheCityAdmin::UserSkillList.new({:user_id => user_id, :page => page}) skill = skill_list[0] skill.name.should == "Teaching-Curriculum" @@ -64,7 +64,7 @@ :skills => [FactoryGirl.attributes_for(:user_skill)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::UserSkillList.new({:user_id => user_id}) + skill_list = TheCityAdmin::UserSkillList.new({:user_id => user_id}) skills = [] skill_list.each { |skill| skills << skill.name } @@ -80,7 +80,7 @@ :skills => [FactoryGirl.attributes_for(:user_skill)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::UserSkillList.new({:user_id => user_id}) + skill_list = TheCityAdmin::UserSkillList.new({:user_id => user_id}) skills = skill_list.collect { |skill| skill.name } skills.should == ["Teaching-Curriculum"] diff --git a/spec/api/user_spec.rb b/spec/api/user_spec.rb index 2ec647f..ab71e88 100644 --- a/spec/api/user_spec.rb +++ b/spec/api/user_spec.rb @@ -18,7 +18,7 @@ }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - user_list = TheCity::UserList.new + user_list = TheCityAdmin::UserList.new user = user_list[0] user.full_name.should == "Sammy Shepherd" @@ -28,7 +28,7 @@ it 'should pass retrieving a user' do request_data = FactoryGirl.attributes_for(:user).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - user = TheCity::User.load_by_id(123) + user = TheCityAdmin::User.load_by_id(123) user.full_name.should == "Sammy Shepherd" end diff --git a/spec/api/web_hook_list_spec.rb b/spec/api/web_hook_list_spec.rb index 9169741..a1b4f3f 100644 --- a/spec/api/web_hook_list_spec.rb +++ b/spec/api/web_hook_list_spec.rb @@ -14,7 +14,7 @@ it 'should pass if web_hook list attribute is not specifed' do request_data = FactoryGirl.attributes_for(:web_hook_list).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - web_hook_list = TheCity::WebHookList.new + web_hook_list = TheCityAdmin::WebHookList.new web_hook_list.web_hooks.should == [] end @@ -23,7 +23,7 @@ it 'should pass if web_hook list is empty' do request_data = FactoryGirl.attributes_for(:web_hook_list, :web_hooks => []).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - web_hook_list = TheCity::WebHookList.new + web_hook_list = TheCityAdmin::WebHookList.new web_hook_list.web_hooks.should == [] end @@ -36,7 +36,7 @@ :web_hooks => [FactoryGirl.attributes_for(:web_hook)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - web_hook_list = TheCity::WebHookList.new({:page => 2}) + web_hook_list = TheCityAdmin::WebHookList.new({:page => 2}) web_hook_list.web_hooks.should == ["User::create"] end @@ -48,7 +48,7 @@ :web_hooks => [FactoryGirl.attributes_for(:web_hook)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - web_hook_list = TheCity::WebHookList.new + web_hook_list = TheCityAdmin::WebHookList.new web_hooks = [] web_hook_list.each { |web_hook| web_hooks << web_hook.name } @@ -63,7 +63,7 @@ :web_hooks => [FactoryGirl.attributes_for(:web_hook)] }).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - web_hook_list = TheCity::WebHookList.new + web_hook_list = TheCityAdmin::WebHookList.new web_hooks = web_hook_list.collect { |web_hook| web_hook.name } web_hook_list.web_hooks.should == ["User::create"] diff --git a/spec/factories/address.rb b/spec/factories/address.rb index 23248f1..b2157cf 100644 --- a/spec/factories/address.rb +++ b/spec/factories/address.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :address, :class => TheCity::Address do + factory :address, :class => TheCityAdmin::Address do city "Sammamish" created_at "04/30/2012 11:54 PM (UTC)" latitude 47.60918 diff --git a/spec/factories/address_list.rb b/spec/factories/address_list.rb index c861e4a..1397dd8 100644 --- a/spec/factories/address_list.rb +++ b/spec/factories/address_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :address_list, :class => TheCity::AddressList do + factory :address_list, :class => TheCityAdmin::AddressList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/checkin.rb b/spec/factories/checkin.rb index 21543d2..b5b60eb 100644 --- a/spec/factories/checkin.rb +++ b/spec/factories/checkin.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :checkin, :class => TheCity::Checkin do + factory :checkin, :class => TheCityAdmin::Checkin do #group {"name" => "Third Grade", "external_id" => nil, "id" => 494538351} checked_out_by_user nil special_instructions "No snacks!" diff --git a/spec/factories/checkin_list.rb b/spec/factories/checkin_list.rb index 09b1e08..fe9a2ca 100644 --- a/spec/factories/checkin_list.rb +++ b/spec/factories/checkin_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :checkin_list, :class => TheCity::CheckinList do + factory :checkin_list, :class => TheCityAdmin::CheckinList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/group.rb b/spec/factories/group.rb index ee9baf3..8d35065 100644 --- a/spec/factories/group.rb +++ b/spec/factories/group.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group, :class => TheCity::Group do + factory :group, :class => TheCityAdmin::Group do name "The Group" admin_url "http://church.onthecity.org/admin/groups/1445" created_at "2009-03-16T03:39:05-07:00" diff --git a/spec/factories/group_address.rb b/spec/factories/group_address.rb index 1b2515f..308631b 100644 --- a/spec/factories/group_address.rb +++ b/spec/factories/group_address.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_address, :class => TheCity::GroupAddress do + factory :group_address, :class => TheCityAdmin::GroupAddress do city "Sammamish" created_at "04/30/2012 11:54 PM (UTC)" latitude 47.60918 diff --git a/spec/factories/group_address_list.rb b/spec/factories/group_address_list.rb index 4c76315..cbf1350 100644 --- a/spec/factories/group_address_list.rb +++ b/spec/factories/group_address_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_address_list, :class => TheCity::GroupAddressList do + factory :group_address_list, :class => TheCityAdmin::GroupAddressList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/group_checkin.rb b/spec/factories/group_checkin.rb index 5c5e5f7..aa0b8bb 100644 --- a/spec/factories/group_checkin.rb +++ b/spec/factories/group_checkin.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_checkin, :class => TheCity::GroupCheckin do + factory :group_checkin, :class => TheCityAdmin::GroupCheckin do #group {"name" => "Third Grade", "external_id" => nil, "id" => 494538351} checked_out_by_user nil special_instructions "No snacks!" diff --git a/spec/factories/group_checkin_list.rb b/spec/factories/group_checkin_list.rb index 42ad1dc..eaf97ed 100644 --- a/spec/factories/group_checkin_list.rb +++ b/spec/factories/group_checkin_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_checkin_list, :class => TheCity::GroupCheckinList do + factory :group_checkin_list, :class => TheCityAdmin::GroupCheckinList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/group_event_attendance.rb b/spec/factories/group_event_attendance.rb index 65f7cd0..8fbf2e9 100644 --- a/spec/factories/group_event_attendance.rb +++ b/spec/factories/group_event_attendance.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_event_attendance, :class => TheCity::GroupEventAttendance do + factory :group_event_attendance, :class => TheCityAdmin::GroupEventAttendance do user "Johnny Smith" created_at "07/29/2012" event_title "9 AM Service" diff --git a/spec/factories/group_event_attendance_list.rb b/spec/factories/group_event_attendance_list.rb index 6b2a5f7..8b7d1d7 100644 --- a/spec/factories/group_event_attendance_list.rb +++ b/spec/factories/group_event_attendance_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_event_attendance_list, :class => TheCity::GroupEventAttendanceList do + factory :group_event_attendance_list, :class => TheCityAdmin::GroupEventAttendanceList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/group_export.rb b/spec/factories/group_export.rb index 46452b1..9174481 100644 --- a/spec/factories/group_export.rb +++ b/spec/factories/group_export.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_export, :class => TheCity::GroupExport do + factory :group_export, :class => TheCityAdmin::GroupExport do created_at "02/06/2012 11:36 PM (EST)" authenticated_s3_url "" id 62706 diff --git a/spec/factories/group_export_list.rb b/spec/factories/group_export_list.rb index 997f6ba..74a440f 100644 --- a/spec/factories/group_export_list.rb +++ b/spec/factories/group_export_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_export_list, :class => TheCity::GroupExportList do + factory :group_export_list, :class => TheCityAdmin::GroupExportList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/group_role.rb b/spec/factories/group_role.rb index 90e6c00..036808b 100644 --- a/spec/factories/group_role.rb +++ b/spec/factories/group_role.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_role, :class => TheCity::GroupRole do + factory :group_role, :class => TheCityAdmin::GroupRole do created_at "04/30/2012" title nil user_api_url "https://api.onthecity.org/users/494335566" diff --git a/spec/factories/group_tag.rb b/spec/factories/group_tag.rb index 33ee196..7e05747 100644 --- a/spec/factories/group_tag.rb +++ b/spec/factories/group_tag.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_tag, :class => TheCity::GroupTag do + factory :group_tag, :class => TheCityAdmin::GroupTag do name "Evening" tag_id 130003696 end diff --git a/spec/factories/role.rb b/spec/factories/role.rb index 9f1d746..ad32df7 100644 --- a/spec/factories/role.rb +++ b/spec/factories/role.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :role, :class => TheCity::Role do + factory :role, :class => TheCityAdmin::Role do group_name "Small Group" created_at "06/15/2009" group_api_url "https://api.onthecity.org/groups/1933" diff --git a/spec/factories/role_list.rb b/spec/factories/role_list.rb index 6d7b1e6..839491e 100644 --- a/spec/factories/role_list.rb +++ b/spec/factories/role_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :role_list, :class => TheCity::RoleList do + factory :role_list, :class => TheCityAdmin::RoleList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/skill.rb b/spec/factories/skill.rb index e1d9994..81089a7 100644 --- a/spec/factories/skill.rb +++ b/spec/factories/skill.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :skill, :class => TheCity::Skill do + factory :skill, :class => TheCityAdmin::Skill do id 17166901 name "Welding" created_at "07/03/2012" diff --git a/spec/factories/skill_list.rb b/spec/factories/skill_list.rb index a00beef..2f21527 100644 --- a/spec/factories/skill_list.rb +++ b/spec/factories/skill_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :skill_list, :class => TheCity::SkillList do + factory :skill_list, :class => TheCityAdmin::SkillList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/skilled_user_id_list.rb b/spec/factories/skilled_user_id_list.rb index cbeb0d5..682b8ed 100644 --- a/spec/factories/skilled_user_id_list.rb +++ b/spec/factories/skilled_user_id_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :skilled_user_id_list, :class => TheCity::SkilledUserIdList do + factory :skilled_user_id_list, :class => TheCityAdmin::SkilledUserIdList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/skilled_user_list.rb b/spec/factories/skilled_user_list.rb index 878cba4..7434a81 100644 --- a/spec/factories/skilled_user_list.rb +++ b/spec/factories/skilled_user_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :skilled_user_list, :class => TheCity::SkilledUserList do + factory :skilled_user_list, :class => TheCityAdmin::SkilledUserList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/tag.rb b/spec/factories/tag.rb index 610617d..86d2af0 100644 --- a/spec/factories/tag.rb +++ b/spec/factories/tag.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :tag, :class => TheCity::Tag do + factory :tag, :class => TheCityAdmin::Tag do id 17166901 name "Evening" created_at "07/03/2012" diff --git a/spec/factories/tag_group_list.rb b/spec/factories/tag_group_list.rb index cba2aa3..668e231 100644 --- a/spec/factories/tag_group_list.rb +++ b/spec/factories/tag_group_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :tag_group_list, :class => TheCity::TagGroupList do + factory :tag_group_list, :class => TheCityAdmin::TagGroupList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/tag_list.rb b/spec/factories/tag_list.rb index 412f845..e200451 100644 --- a/spec/factories/tag_list.rb +++ b/spec/factories/tag_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :tag_list, :class => TheCity::TagList do + factory :tag_list, :class => TheCityAdmin::TagList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/terminology.rb b/spec/factories/terminology.rb index fef23eb..4182477 100644 --- a/spec/factories/terminology.rb +++ b/spec/factories/terminology.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :terminology, :class => TheCity::Terminology do + factory :terminology, :class => TheCityAdmin::Terminology do term 'CG' label 'Life' end diff --git a/spec/factories/terminology_list.rb b/spec/factories/terminology_list.rb index 3e199f3..d5a7ebc 100644 --- a/spec/factories/terminology_list.rb +++ b/spec/factories/terminology_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :terminology_list, :class => TheCity::TerminologyList do + factory :terminology_list, :class => TheCityAdmin::TerminologyList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user.rb b/spec/factories/user.rb index 1c92504..4d453ed 100644 --- a/spec/factories/user.rb +++ b/spec/factories/user.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user, :class => TheCity::User do + factory :user, :class => TheCityAdmin::User do api_url "https://api.onthecity.org/users/946060874" updated_at "05/15/2012 07:24 AM (UTC)" last_logged_in "05/16/2012 04:52 AM (UTC)" diff --git a/spec/factories/user_address.rb b/spec/factories/user_address.rb index 26d5c92..2778cb2 100644 --- a/spec/factories/user_address.rb +++ b/spec/factories/user_address.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_address, :class => TheCity::UserAddress do + factory :user_address, :class => TheCityAdmin::UserAddress do city "Seattle" created_at "04/30/2012 08:46 PM (UTC)" latitude 47.64114 diff --git a/spec/factories/user_address_list.rb b/spec/factories/user_address_list.rb index b2e8b1c..efa3008 100644 --- a/spec/factories/user_address_list.rb +++ b/spec/factories/user_address_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_address_list, :class => TheCity::UserAddressList do + factory :user_address_list, :class => TheCityAdmin::UserAddressList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user_admin_privilege.rb b/spec/factories/user_admin_privilege.rb index d93ba21..a726c2c 100644 --- a/spec/factories/user_admin_privilege.rb +++ b/spec/factories/user_admin_privilege.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_admin_privilege, :class => TheCity::UserAdminPrivilege do + factory :user_admin_privilege, :class => TheCityAdmin::UserAdminPrivilege do title "Designer" user_id 452617 user "Dr. Third Eagle" diff --git a/spec/factories/user_admin_privilege_list.rb b/spec/factories/user_admin_privilege_list.rb index cf67497..6573779 100644 --- a/spec/factories/user_admin_privilege_list.rb +++ b/spec/factories/user_admin_privilege_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_admin_privilege_list, :class => TheCity::UserAdminPrivilegeList do + factory :user_admin_privilege_list, :class => TheCityAdmin::UserAdminPrivilegeList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user_barcode.rb b/spec/factories/user_barcode.rb index f3d29b6..f8a0996 100644 --- a/spec/factories/user_barcode.rb +++ b/spec/factories/user_barcode.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_barcode, :class => TheCity::UserBarcode do + factory :user_barcode, :class => TheCityAdmin::UserBarcode do barcode "234234234" id 1012338309 created_at "05/16/2012" diff --git a/spec/factories/user_family_list.rb b/spec/factories/user_family_list.rb index eb90f75..544e4af 100644 --- a/spec/factories/user_family_list.rb +++ b/spec/factories/user_family_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_family_list, :class => TheCity::UserFamilyList do + factory :user_family_list, :class => TheCityAdmin::UserFamilyList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user_family_member.rb b/spec/factories/user_family_member.rb index 612e070..1a1fb90 100644 --- a/spec/factories/user_family_member.rb +++ b/spec/factories/user_family_member.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_family_member, :class => TheCity::UserFamilyMember do + factory :user_family_member, :class => TheCityAdmin::UserFamilyMember do name "Pastor Sam Shepherd" admin_url "http://local.devthecity.org:3000/admin/users/946060874" external_id_1 nil diff --git a/spec/factories/user_invitation.rb b/spec/factories/user_invitation.rb index 4275683..6659364 100644 --- a/spec/factories/user_invitation.rb +++ b/spec/factories/user_invitation.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_invitation, :class => TheCity::UserInvitation do + factory :user_invitation, :class => TheCityAdmin::UserInvitation do created_at "02/06/2012" pending_approval false group_id 17543 diff --git a/spec/factories/user_invitation_list.rb b/spec/factories/user_invitation_list.rb index cd50a49..ddda3af 100644 --- a/spec/factories/user_invitation_list.rb +++ b/spec/factories/user_invitation_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_invitation_list, :class => TheCity::UserInvitationList do + factory :user_invitation_list, :class => TheCityAdmin::UserInvitationList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user_list.rb b/spec/factories/user_list.rb index 0a70623..c604d1d 100644 --- a/spec/factories/user_list.rb +++ b/spec/factories/user_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_list, :class => TheCity::UserList do + factory :user_list, :class => TheCityAdmin::UserList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user_note.rb b/spec/factories/user_note.rb index e502e71..beeeea6 100644 --- a/spec/factories/user_note.rb +++ b/spec/factories/user_note.rb @@ -2,7 +2,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_note, :class => TheCity::UserNote do + factory :user_note, :class => TheCityAdmin::UserNote do created_at "05/08/2012" body "Deaconship is complete" author "Pastor Sam Shepherd" diff --git a/spec/factories/user_note_list.rb b/spec/factories/user_note_list.rb index 4646d01..99a7191 100644 --- a/spec/factories/user_note_list.rb +++ b/spec/factories/user_note_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_note_list, :class => TheCity::UserNoteList do + factory :user_note_list, :class => TheCityAdmin::UserNoteList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user_process.rb b/spec/factories/user_process.rb index bec2d33..a556fa0 100644 --- a/spec/factories/user_process.rb +++ b/spec/factories/user_process.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_process, :class => TheCity::UserProcess do + factory :user_process, :class => TheCityAdmin::UserProcess do name "Member Process" id 241832976 state "complete" diff --git a/spec/factories/user_process_answer.rb b/spec/factories/user_process_answer.rb index a82798e..e03e4d4 100644 --- a/spec/factories/user_process_answer.rb +++ b/spec/factories/user_process_answer.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_process_answer, :class => TheCity::UserProcessAnswer do + factory :user_process_answer, :class => TheCityAdmin::UserProcessAnswer do question_id 316 question "Do you like foo?" answer "bar" diff --git a/spec/factories/user_process_answer_list.rb b/spec/factories/user_process_answer_list.rb index 4c1727e..ed06fa4 100644 --- a/spec/factories/user_process_answer_list.rb +++ b/spec/factories/user_process_answer_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_process_answer_list, :class => TheCity::UserProcessAnswerList do + factory :user_process_answer_list, :class => TheCityAdmin::UserProcessAnswerList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user_process_list.rb b/spec/factories/user_process_list.rb index 91a82d6..58249cd 100644 --- a/spec/factories/user_process_list.rb +++ b/spec/factories/user_process_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_process_list, :class => TheCity::UserProcessList do + factory :user_process_list, :class => TheCityAdmin::UserProcessList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user_role.rb b/spec/factories/user_role.rb index 8379b95..cd98caa 100644 --- a/spec/factories/user_role.rb +++ b/spec/factories/user_role.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_role, :class => TheCity::UserRole do + factory :user_role, :class => TheCityAdmin::UserRole do group_name "The Group" created_at "05/11/2009" group_api_url "https://api.onthecity.org/admin/groups/1245" diff --git a/spec/factories/user_role_list.rb b/spec/factories/user_role_list.rb index 0f5dfbd..a8732db 100644 --- a/spec/factories/user_role_list.rb +++ b/spec/factories/user_role_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_role_list, :class => TheCity::UserRoleList do + factory :user_role_list, :class => TheCityAdmin::UserRoleList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user_skill.rb b/spec/factories/user_skill.rb index 09397df..f42caac 100644 --- a/spec/factories/user_skill.rb +++ b/spec/factories/user_skill.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_skill, :class => TheCity::UserSkill do + factory :user_skill, :class => TheCityAdmin::UserSkill do name "Teaching-Curriculum" skill_id 1046429013 end diff --git a/spec/factories/user_skill_list.rb b/spec/factories/user_skill_list.rb index 9bb4417..f5d699f 100644 --- a/spec/factories/user_skill_list.rb +++ b/spec/factories/user_skill_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_skill_list, :class => TheCity::UserSkillList do + factory :user_skill_list, :class => TheCityAdmin::UserSkillList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/web_hook.rb b/spec/factories/web_hook.rb index 508a252..561c55b 100644 --- a/spec/factories/web_hook.rb +++ b/spec/factories/web_hook.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :web_hook, :class => TheCity::WebHook do + factory :web_hook, :class => TheCityAdmin::WebHook do id 1 event 'create' object 'User' diff --git a/spec/factories/web_hook_list.rb b/spec/factories/web_hook_list.rb index 3280d56..41f939f 100644 --- a/spec/factories/web_hook_list.rb +++ b/spec/factories/web_hook_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :web_hook_list, :class => TheCity::WebHookList do + factory :web_hook_list, :class => TheCityAdmin::WebHookList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/readers/api_reader_spec.rb b/spec/readers/api_reader_spec.rb index 6f0fb4e..b6ec96c 100644 --- a/spec/readers/api_reader_spec.rb +++ b/spec/readers/api_reader_spec.rb @@ -1,11 +1,11 @@ require File.dirname(__FILE__) + '/../spec_helper' -describe TheCity::ApiReader do +describe TheCityAdmin::ApiReader do it "should include City headers" do headers = "X-City-RateLimit-Limit-By-Ip: 2200\r\nX-City-RateLimit-Remaining-By-Ip: 2199\r\n" TheCity.stub(:admin_request).and_return(TheCityResponse.new(200, {}.to_json, headers)) - reader = TheCity::ApiReader.new + reader = TheCityAdmin::ApiReader.new reader.load_feed.should == {} reader.headers['X-City-RateLimit-Limit-By-Ip'].should == '2200' reader.headers['X-City-RateLimit-Remaining-By-Ip'].should == '2199' @@ -17,7 +17,7 @@ "X-City-RateLimit-Limit-By-Account: 3000", "X-City-RateLimit-Remaining-By-Account: 1561"].join("\r\n") TheCity.stub(:admin_request).and_return(TheCityResponse.new(200, {}.to_json, headers)) - reader = TheCity::ApiReader.new + reader = TheCityAdmin::ApiReader.new reader.load_feed.should == {} reader.rate_limit.should == 2000 reader.rate_limit_remaining.should == 1561 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 1464483..56539a4 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,7 +3,7 @@ # # Author:: Wes Hays # Link:: https://github.com/weshays/admin-api-ruby -# Package:: TheCity::Admin +# Package:: TheCityAdmin::Admin require File.expand_path( File.dirname(__FILE__) + '/../lib/the_city_admin.rb') @@ -27,5 +27,5 @@ def simulate_connection_to_server - @the_city = TheCity::AdminApi.new('cf2903151e3213e66fd8080c7d8b65b1d6ccdd31', '5c88b32edda7653c') + @the_city = TheCityAdmin::AdminApi.new('cf2903151e3213e66fd8080c7d8b65b1d6ccdd31', '5c88b32edda7653c') end \ No newline at end of file diff --git a/spec/writers/tag_writer_spec.rb b/spec/writers/tag_writer_spec.rb index cbb47ee..22c2e8f 100644 --- a/spec/writers/tag_writer_spec.rb +++ b/spec/writers/tag_writer_spec.rb @@ -5,7 +5,7 @@ it 'should show connection error messages if server cannot be reached' do TheCity.stub(:admin_request) { raise TheCityExceptions::UnableToConnectToTheCity.new('Unable to connect to server') } tag_data = {:name => 'Cool People'} - tag = TheCity::Tag.new(tag_data) + tag = TheCityAdmin::Tag.new(tag_data) tag.id.should be_nil tag.save.should === false tag.id.should be_nil @@ -17,7 +17,7 @@ request_data = FactoryGirl.attributes_for(:tag, {:id => 12345}).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) tag_data = {:name => 'Cool People'} - tag = TheCity::Tag.new(tag_data) + tag = TheCityAdmin::Tag.new(tag_data) tag.id.should be_nil tag.save.should === true tag.id.should == 12345 @@ -27,7 +27,7 @@ it 'should show error messages if save fails for new tag' do TheCity.stub(:admin_request) { raise TheCityExceptions::TheCityResponseError.new('tag already exists') } tag_data = {:name => 'Cool People'} - tag = TheCity::Tag.new(tag_data) + tag = TheCityAdmin::Tag.new(tag_data) tag.id.should be_nil tag.save.should === false tag.id.should be_nil @@ -39,7 +39,7 @@ request_data = FactoryGirl.attributes_for(:tag, {:id => 12345}).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) tag_data = FactoryGirl.attributes_for(:tag, {:id => 12345}) - tag = TheCity::Tag.new(tag_data) + tag = TheCityAdmin::Tag.new(tag_data) tag.id.should == 12345 tag.save.should === true tag.id.should == 12345 @@ -49,7 +49,7 @@ it 'should show error messages if save fails for existing tag' do TheCity.stub(:admin_request) { raise TheCityExceptions::TheCityResponseError.new('something bad happened') } tag_data = FactoryGirl.attributes_for(:tag, {:id => 12345}) - tag = TheCity::Tag.new(tag_data) + tag = TheCityAdmin::Tag.new(tag_data) tag.id.should == 12345 tag.save.should === false tag.id.should == 12345 @@ -60,7 +60,7 @@ it 'should delete if data ID exists for the existing tag' do TheCity.stub(:admin_request).and_return( TheCityResponse.new(204, '{}') ) tag_data = FactoryGirl.attributes_for(:tag, {:id => 12345}) - tag = TheCity::Tag.new(tag_data) + tag = TheCityAdmin::Tag.new(tag_data) tag.is_deleted?.should === false tag.delete tag.is_deleted?.should === true @@ -70,7 +70,7 @@ it 'should show error messages if data fails to be deleted' do TheCity.stub(:admin_request) { raise TheCityExceptions::TheCityResponseError.new('something bad happened') } tag_data = FactoryGirl.attributes_for(:tag, {:id => 12345}) - tag = TheCity::Tag.new(tag_data) + tag = TheCityAdmin::Tag.new(tag_data) tag.is_deleted?.should === false tag.delete tag.is_deleted?.should === false diff --git a/spec/writers/user_writer_spec.rb b/spec/writers/user_writer_spec.rb index 7399438..c9b89a4 100644 --- a/spec/writers/user_writer_spec.rb +++ b/spec/writers/user_writer_spec.rb @@ -5,7 +5,7 @@ it 'should show connection error messages if server cannot be reached' do TheCity.stub(:admin_request) { raise TheCityExceptions::UnableToConnectToTheCity.new('Unable to connect to server') } user_data = FactoryGirl.attributes_for(:user, {:id => nil}) - user = TheCity::User.new(user_data) + user = TheCityAdmin::User.new(user_data) user.id.should be_nil user.save.should === false user.id.should be_nil @@ -17,7 +17,7 @@ request_data = FactoryGirl.attributes_for(:user, {:id => 12345}).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) user_data = FactoryGirl.attributes_for(:user, {:id => nil}) - user = TheCity::User.new(user_data) + user = TheCityAdmin::User.new(user_data) user.id.should be_nil user.save.should === true user.id.should == 12345 @@ -27,7 +27,7 @@ it 'should show error messages if save fails for new user' do TheCity.stub(:admin_request) { raise TheCityExceptions::TheCityResponseError.new('email address already exists') } user_data = FactoryGirl.attributes_for(:user, {:id => nil}) - user = TheCity::User.new(user_data) + user = TheCityAdmin::User.new(user_data) user.id.should be_nil user.save.should === false user.id.should be_nil @@ -39,7 +39,7 @@ request_data = FactoryGirl.attributes_for(:user, {:id => 12345}).to_json TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) user_data = FactoryGirl.attributes_for(:user, {:id => 12345}) - user = TheCity::User.new(user_data) + user = TheCityAdmin::User.new(user_data) user.id.should == 12345 user.save.should === true user.id.should == 12345 @@ -49,7 +49,7 @@ it 'should show error messages if save fails for existing user' do TheCity.stub(:admin_request) { raise TheCityExceptions::TheCityResponseError.new('something bad happened') } user_data = FactoryGirl.attributes_for(:user, {:id => 12345}) - user = TheCity::User.new(user_data) + user = TheCityAdmin::User.new(user_data) user.id.should == 12345 user.save.should === false user.id.should == 12345 @@ -60,7 +60,7 @@ it 'should delete if data ID exists for the existing user' do TheCity.stub(:admin_request).and_return( TheCityResponse.new(204, '{}') ) user_data = FactoryGirl.attributes_for(:user, {:id => 12345}) - user = TheCity::User.new(user_data) + user = TheCityAdmin::User.new(user_data) user.is_deleted?.should === false user.delete user.is_deleted?.should === true @@ -70,7 +70,7 @@ it 'should show error messages if data fails to be deleted' do TheCity.stub(:admin_request) { raise TheCityExceptions::TheCityResponseError.new('something bad happened') } user_data = FactoryGirl.attributes_for(:user, {:id => 12345}) - user = TheCity::User.new(user_data) + user = TheCityAdmin::User.new(user_data) user.is_deleted?.should === false user.delete user.is_deleted?.should === false From bdf1260c8f02e8cbb0155e82e6b3708f84b7cf66 Mon Sep 17 00:00:00 2001 From: David Beck Date: Mon, 28 Oct 2013 18:37:21 -0700 Subject: [PATCH 3/3] Fixed module name change --- README.rdoc | 2 +- examples/addresses.rb | 8 ++-- examples/barcodes_checkins.rb | 10 ++--- examples/donation_export.rb | 14 +++---- examples/donations.rb | 6 +-- examples/familes.rb | 18 ++++---- examples/groups.rb | 8 ++-- examples/measurements.rb | 10 ++--- examples/metrics.rb | 14 +++---- examples/roles.rb | 16 +++---- examples/skills.rb | 12 +++--- examples/tags.rb | 12 +++--- examples/terminology.rb | 12 +++--- examples/users.rb | 42 +++++++++---------- examples/webhooks.rb | 16 +++---- lib/api/address_list.rb | 2 +- lib/api/campus_list.rb | 2 +- lib/api/checkin_list.rb | 2 +- lib/api/church.rb | 2 +- lib/api/donation_export_list.rb | 2 +- lib/api/donation_list.rb | 2 +- lib/api/fund_list.rb | 2 +- lib/api/group_address_list.rb | 2 +- lib/api/group_checkin_list.rb | 2 +- lib/api/group_event_attendance_list.rb | 2 +- lib/api/group_export_list.rb | 2 +- lib/api/group_invitation_list.rb | 2 +- lib/api/group_list.rb | 2 +- lib/api/group_role_list.rb | 2 +- lib/api/group_tag_list.rb | 2 +- lib/api/invitation_list.rb | 2 +- lib/api/metric_list.rb | 2 +- lib/api/metric_measurement_list.rb | 2 +- lib/api/metric_measurement_values.rb | 2 +- lib/api/pledge_list.rb | 2 +- lib/api/role_list.rb | 2 +- lib/api/skill_list.rb | 2 +- lib/api/skilled_user_id_list.rb | 2 +- lib/api/skilled_user_list.rb | 2 +- lib/api/tag_group_list.rb | 2 +- lib/api/tag_list.rb | 2 +- lib/api/terminology_list.rb | 2 +- lib/api/user_address_list.rb | 2 +- lib/api/user_admin_privilege_list.rb | 2 +- lib/api/user_count.rb | 2 +- lib/api/user_family_list.rb | 2 +- lib/api/user_invitation_list.rb | 2 +- lib/api/user_list.rb | 2 +- lib/api/user_note_list.rb | 2 +- lib/api/user_process_answer_list.rb | 2 +- lib/api/user_process_list.rb | 2 +- lib/api/user_role_list.rb | 2 +- lib/api/user_skill_list.rb | 2 +- lib/api/web_hook_list.rb | 2 +- lib/common.rb | 4 +- lib/readers/api_reader.rb | 2 +- lib/writers/api_writer.rb | 4 +- spec/api/group_address_list_spec.rb | 20 ++++----- spec/api/group_checkin_list_spec.rb | 20 ++++----- spec/api/group_event_attendance_list_spec.rb | 20 ++++----- spec/api/role_list_spec.rb | 20 ++++----- spec/api/skill_list_spec.rb | 20 ++++----- spec/api/skilled_user_id_list_spec.rb | 20 ++++----- spec/api/skilled_user_list_spec.rb | 20 ++++----- spec/api/tag_group_list_spec.rb | 16 +++---- spec/api/tag_list_spec.rb | 20 ++++----- spec/api/terminology_list_spec.rb | 20 ++++----- spec/api/user_address_list_spec.rb | 20 ++++----- spec/api/user_admin_privilege_list_spec.rb | 20 ++++----- spec/api/user_family_list_spec.rb | 20 ++++----- spec/api/user_invitation_list_spec.rb | 20 ++++----- spec/api/user_list_spec.rb | 20 ++++----- spec/api/user_note_list_spec.rb | 20 ++++----- spec/api/user_process_answer_list_spec.rb | 16 +++---- spec/api/user_process_list_spec.rb | 20 ++++----- spec/api/user_role_list_spec.rb | 20 ++++----- spec/api/user_skill_list_spec.rb | 20 ++++----- spec/api/user_spec.rb | 8 ++-- spec/api/web_hook_list_spec.rb | 20 ++++----- spec/factories/address.rb | 2 +- spec/factories/address_list.rb | 2 +- spec/factories/checkin.rb | 2 +- spec/factories/checkin_list.rb | 2 +- spec/factories/group.rb | 2 +- spec/factories/group_address.rb | 2 +- spec/factories/group_address_list.rb | 2 +- spec/factories/group_checkin.rb | 2 +- spec/factories/group_checkin_list.rb | 2 +- spec/factories/group_event_attendance.rb | 2 +- spec/factories/group_event_attendance_list.rb | 2 +- spec/factories/group_export.rb | 2 +- spec/factories/group_export_list.rb | 2 +- spec/factories/group_role.rb | 2 +- spec/factories/group_tag.rb | 2 +- spec/factories/role.rb | 2 +- spec/factories/role_list.rb | 2 +- spec/factories/skill.rb | 2 +- spec/factories/skill_list.rb | 2 +- spec/factories/skilled_user_id_list.rb | 2 +- spec/factories/skilled_user_list.rb | 2 +- spec/factories/tag.rb | 2 +- spec/factories/tag_group_list.rb | 2 +- spec/factories/tag_list.rb | 2 +- spec/factories/terminology.rb | 2 +- spec/factories/terminology_list.rb | 2 +- spec/factories/user.rb | 2 +- spec/factories/user_address.rb | 2 +- spec/factories/user_address_list.rb | 2 +- spec/factories/user_admin_privilege.rb | 2 +- spec/factories/user_admin_privilege_list.rb | 2 +- spec/factories/user_barcode.rb | 2 +- spec/factories/user_family_list.rb | 2 +- spec/factories/user_family_member.rb | 2 +- spec/factories/user_invitation.rb | 2 +- spec/factories/user_invitation_list.rb | 2 +- spec/factories/user_list.rb | 2 +- spec/factories/user_note.rb | 2 +- spec/factories/user_note_list.rb | 2 +- spec/factories/user_process.rb | 2 +- spec/factories/user_process_answer.rb | 2 +- spec/factories/user_process_answer_list.rb | 2 +- spec/factories/user_process_list.rb | 2 +- spec/factories/user_role.rb | 2 +- spec/factories/user_role_list.rb | 2 +- spec/factories/user_skill.rb | 2 +- spec/factories/user_skill_list.rb | 2 +- spec/factories/web_hook.rb | 2 +- spec/factories/web_hook_list.rb | 2 +- spec/readers/api_reader_spec.rb | 10 ++--- spec/spec_helper.rb | 4 +- spec/writers/tag_writer_spec.rb | 28 ++++++------- spec/writers/user_writer_spec.rb | 28 ++++++------- 132 files changed, 438 insertions(+), 438 deletions(-) diff --git a/README.rdoc b/README.rdoc index 6d81d38..768e006 100644 --- a/README.rdoc +++ b/README.rdoc @@ -23,7 +23,7 @@ Add your church's City API Token and API Key to [RAILS_ROOT]/config/initializers Next you will need to initialize a connection - TheCity::AdminApi.connect(THECITY_KEY, THECITY_TOKEN) + TheCityAdmin::AdminApi.connect(THECITY_KEY, THECITY_TOKEN) diff --git a/examples/addresses.rb b/examples/addresses.rb index 0ed3bda..17ddb0c 100644 --- a/examples/addresses.rb +++ b/examples/addresses.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,12 +11,12 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" -address_list = TheCity::AddressList.new +address_list = TheCityAdmin::AddressList.new if address_list.empty? puts "No addresses in list" else @@ -25,7 +25,7 @@ address = address_list[0] -address2 = TheCity::Address.load_by_id(address.id) +address2 = TheCityAdmin::Address.load_by_id(address.id) if address2.street == address.street puts "Address found (#{address.street})" diff --git a/examples/barcodes_checkins.rb b/examples/barcodes_checkins.rb index bcec2f5..f8968aa 100644 --- a/examples/barcodes_checkins.rb +++ b/examples/barcodes_checkins.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,12 +11,12 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" -barcode = TheCity::Barcode.load_by_id(12345) +barcode = TheCityAdmin::Barcode.load_by_id(12345) if barcode.nil? puts 'Barcode not found' else @@ -26,7 +26,7 @@ puts "------------------------------------" -checkin_list = TheCity::CheckinList.new +checkin_list = TheCityAdmin::CheckinList.new # if checkin_list.empty? # puts "No checkins in list" # else @@ -35,7 +35,7 @@ # checkin = checkin_list[0] -# checkin2 = TheCity::Checkin.load_by_id(checkin.id) +# checkin2 = TheCityAdmin::Checkin.load_by_id(checkin.id) # if checkin2.nil? # puts 'Checkin not found' # else diff --git a/examples/donation_export.rb b/examples/donation_export.rb index 3ef1800..4b00368 100644 --- a/examples/donation_export.rb +++ b/examples/donation_export.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,15 +11,15 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) -de_list = TheCity::DonationExportList.new +de_list = TheCityAdmin::DonationExportList.new de_list.each do |item| puts "DonationExport: #{item.inspect}" end -# de_list = TheCity::DonationExportList.new +# de_list = TheCityAdmin::DonationExportList.new # de_list.each do |item| # if item.delete # puts "DonationExport #{item.id} deleted" @@ -28,14 +28,14 @@ # end # end -# de_list = TheCity::DonationExportList.new +# de_list = TheCityAdmin::DonationExportList.new # if de_list.empty? # puts "No donation exports found" # else # puts "Donation exports found" # end -# donation_export = TheCity::DonationExport.new +# donation_export = TheCityAdmin::DonationExport.new # if donation_export.save # puts "Donation export created" # else @@ -43,7 +43,7 @@ # end -# de_list = TheCity::DonationExportList.new +# de_list = TheCityAdmin::DonationExportList.new # if de_list.empty? # puts "No donation exports found" # else diff --git a/examples/donations.rb b/examples/donations.rb index b9d82ea..6e650a4 100644 --- a/examples/donations.rb +++ b/examples/donations.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,10 +11,10 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) -de_list = TheCity::DonationList.new +de_list = TheCityAdmin::DonationList.new de_list.each do |item| puts "DonationExport: #{item.inspect}" end diff --git a/examples/familes.rb b/examples/familes.rb index af6a62e..6a4ccc4 100644 --- a/examples/familes.rb +++ b/examples/familes.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,34 +11,34 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" -user_list = TheCity::UserList.new +user_list = TheCityAdmin::UserList.new user1 = user_list[0] # user2 = user_list[1] -family = TheCity::Family.new +family = TheCityAdmin::Family.new family.external_id = 'family123' -member1 = TheCity::FamilyMember.new +member1 = TheCityAdmin::FamilyMember.new member1.user_id = user1.id member1.name = user1.full_name member1.email = user1.email member1.external_id_1 = 'weshays123' member1.birthdate = user1.birthdate -member1.family_role = TheCity::FamilyMember::Roles[:spouse] +member1.family_role = TheCityAdmin::FamilyMember::Roles[:spouse] family.add_family_member(member1) -# member2 = TheCity::FamilyMember.new +# member2 = TheCityAdmin::FamilyMember.new # member2.user_id = user2.id # member2.name = user2.full_name # member2.email = user2.email # member2.external_id_1 = 'annahays123' # member2.birthdate = user1.birthdate -# member2.family_role = TheCity::FamilyMember::Roles[:spouse] +# member2.family_role = TheCityAdmin::FamilyMember::Roles[:spouse] # family.add_family_member(member2) if family.save @@ -49,7 +49,7 @@ end -#family2 = TheCity::Family.load_by_id(398768686) +#family2 = TheCityAdmin::Family.load_by_id(398768686) # if family.nil? # puts "Family found with #{family.members.size} members" diff --git a/examples/groups.rb b/examples/groups.rb index f0e9a5b..c3f36dd 100644 --- a/examples/groups.rb +++ b/examples/groups.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,9 +11,9 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) -group_list = TheCity::GroupList.new +group_list = TheCityAdmin::GroupList.new group = group_list.first puts group.name @@ -26,7 +26,7 @@ puts "Addresses: #{group.addresses.size}" end -address = TheCity::GroupAddress.new +address = TheCityAdmin::GroupAddress.new address.group_id = group.id address.location_type = 'Work' address.street = '445 S. Virginia St' diff --git a/examples/measurements.rb b/examples/measurements.rb index c8fe369..9f4ce72 100644 --- a/examples/measurements.rb +++ b/examples/measurements.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,12 +11,12 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" -metric_list = TheCity::MetricList.new +metric_list = TheCityAdmin::MetricList.new if metric_list.empty? puts "No metrics in list" else @@ -24,7 +24,7 @@ end -# The next line is the same as: TheCity::MetricMeasurementList.new({:metric_id => metric_list[0].id}) +# The next line is the same as: TheCityAdmin::MetricMeasurementList.new({:metric_id => metric_list[0].id}) measurement_list = metric_list[0].measurements if metric_list.empty? puts "No measurements in list" @@ -33,7 +33,7 @@ end -# The next line is the same as: TheCity::MetricMeasurementValues.new({:metric_id => metric_list[0].id}) +# The next line is the same as: TheCityAdmin::MetricMeasurementValues.new({:metric_id => metric_list[0].id}) values = metric_list[0].measurement_values if values.empty? puts "No values returned" diff --git a/examples/metrics.rb b/examples/metrics.rb index 0b499e5..aa29fb3 100644 --- a/examples/metrics.rb +++ b/examples/metrics.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,12 +11,12 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" -metric_list = TheCity::MetricList.new +metric_list = TheCityAdmin::MetricList.new if metric_list.empty? puts "No metrics in list" else @@ -24,7 +24,7 @@ end -metric = TheCity::Metric.new +metric = TheCityAdmin::Metric.new metric.name = "CoolThing#{Time.now.to_i}" if metric.save puts "Metric created (#{metric.id})" @@ -33,14 +33,14 @@ end -metric_list2 = TheCity::MetricList.new +metric_list2 = TheCityAdmin::MetricList.new if metric_list2.empty? puts "No metrics in list" else puts "Metrics: #{metric_list2.count}" end -metric2 = TheCity::Metric.load_by_id(metric.id) +metric2 = TheCityAdmin::Metric.load_by_id(metric.id) if metric2.nil? puts "Metric not found" else @@ -62,7 +62,7 @@ puts "Unable to delete metric #{metric2.id}: #{metric2.error_messages.join(', ')}" end -metric_list3 = TheCity::MetricList.new +metric_list3 = TheCityAdmin::MetricList.new if metric_list3.empty? puts "No metrics in list" else diff --git a/examples/roles.rb b/examples/roles.rb index 2e22764..e13123e 100644 --- a/examples/roles.rb +++ b/examples/roles.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,16 +11,16 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" puts '--- USER ROLE SETUP ---' -group_list = TheCity::GroupList.new +group_list = TheCityAdmin::GroupList.new group = group_list.first -offline_user = TheCity::User.new +offline_user = TheCityAdmin::User.new offline_user.first = 'Wes' offline_user.last = 'Hays' offline_user.email = 'someguy@someplace.org' @@ -36,9 +36,9 @@ puts "Roles: #{offline_user.roles.size}" end -role = TheCity::UserRole.new -role.group_type = TheCity::UserRole::GroupTypes[:campus] -role.title = TheCity::UserRole::Titles[:leader] +role = TheCityAdmin::UserRole.new +role.group_type = TheCityAdmin::UserRole::GroupTypes[:campus] +role.title = TheCityAdmin::UserRole::Titles[:leader] role.user_id = offline_user.id role.group_id = group.id @@ -52,7 +52,7 @@ -role_list = TheCity::RoleList.new +role_list = TheCityAdmin::RoleList.new if role_list.empty? puts "No roles in list" else diff --git a/examples/skills.rb b/examples/skills.rb index fefa6a2..4d4da34 100644 --- a/examples/skills.rb +++ b/examples/skills.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,19 +11,19 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" -skill_list = TheCity::SkillList.new +skill_list = TheCityAdmin::SkillList.new if skill_list.empty? puts "No skils in list" else puts "Skills: #{skill_list.count}" end -skill = TheCity::Skill.new +skill = TheCityAdmin::Skill.new skill.name = 'ZProgrammer' if skill.save puts "Skill created (#{skill.id})" @@ -32,7 +32,7 @@ end -skill_list2 = TheCity::SkillList.new +skill_list2 = TheCityAdmin::SkillList.new if skill_list2.empty? puts "No skills in list" else @@ -45,7 +45,7 @@ puts "Unable to delete skill #{skill.id}: #{skill.error_messages.join(', ')}" end -skill_list3 = TheCity::SkillList.new +skill_list3 = TheCityAdmin::SkillList.new if skill_list3.empty? puts "No skills in list" else diff --git a/examples/tags.rb b/examples/tags.rb index 3eac1ad..da12de4 100644 --- a/examples/tags.rb +++ b/examples/tags.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,17 +11,17 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" -tag_list = TheCity::TagList.new +tag_list = TheCityAdmin::TagList.new puts "Tags: #{tag_list.total_entries}" puts "*******************" -tag = TheCity::Tag.new +tag = TheCityAdmin::Tag.new tag.name = 'zProgrammer' if tag.save @@ -31,7 +31,7 @@ end puts "*******************" -tag_list = TheCity::TagList.new +tag_list = TheCityAdmin::TagList.new puts "Tags: #{tag_list.total_entries}" puts "*******************" @@ -54,7 +54,7 @@ puts "*******************" -tag_list = TheCity::TagList.new +tag_list = TheCityAdmin::TagList.new puts "Tags: #{tag_list.total_entries}" diff --git a/examples/terminology.rb b/examples/terminology.rb index 92b0d6f..8faa67f 100644 --- a/examples/terminology.rb +++ b/examples/terminology.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,12 +11,12 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" -term_list = TheCity::TerminologyList.new +term_list = TheCityAdmin::TerminologyList.new if term_list.empty? puts "No terms in list" else @@ -24,7 +24,7 @@ end -term = TheCity::Terminology.load_by_term('CG') +term = TheCityAdmin::Terminology.load_by_term('CG') if term.nil? puts "Terminology not found" else @@ -38,7 +38,7 @@ puts "Failed to create term: #{term.error_messages.join(', ')}" end -term2 = TheCity::Terminology.load_by_term('CG') +term2 = TheCityAdmin::Terminology.load_by_term('CG') if term2.nil? puts "Terminology not found" else @@ -52,7 +52,7 @@ puts "Failed to create term: #{term2.error_messages.join(', ')}" end -term3 = TheCity::Terminology.load_by_term('CG') +term3 = TheCityAdmin::Terminology.load_by_term('CG') if term3.nil? puts "Terminology not found" else diff --git a/examples/users.rb b/examples/users.rb index e50210b..255f090 100644 --- a/examples/users.rb +++ b/examples/users.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,24 +11,24 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) -user_list = TheCity::UserList.new +user_list = TheCityAdmin::UserList.new user = user_list.first puts user.full_name -# user_count = TheCity::UserCount.new +# user_count = TheCityAdmin::UserCount.new # puts user_count.count # puts user_count.filter -# user_count = TheCity::UserCount.new({:filter => :created_in_the_last_7_Days}) +# user_count = TheCityAdmin::UserCount.new({:filter => :created_in_the_last_7_Days}) # puts user_count.count # puts user_count.filter -offline_user = TheCity::User.new +offline_user = TheCityAdmin::User.new offline_user.first = 'Wes' offline_user.last = 'Hays' offline_user.email = 'someguy@someplace.org' @@ -49,7 +49,7 @@ puts "Failed to create offline user: #{offline_user.error_messages.join(', ')}" end -offline_user2 = TheCity::User.load_by_id(offline_user.id) +offline_user2 = TheCityAdmin::User.load_by_id(offline_user.id) puts "Loaded user first name: #{offline_user2.first}::#{offline_user2.email}" if offline_user.delete @@ -67,7 +67,7 @@ # puts "Addresses: #{user.addresses.size}" # end -# address = TheCity::UserAddress.new +# address = TheCityAdmin::UserAddress.new # address.user_id = user.id # address.location_type = 'Work' # address.street = '445 S. Virginia St' @@ -119,8 +119,8 @@ # puts "Admin privileges: #{user.admin_privileges.count}" # end -# privilege = TheCity::UserAdminPrivilege.new -# privilege.title = TheCity::UserAdminPrivilege::Permissions[:resource_admin] +# privilege = TheCityAdmin::UserAdminPrivilege.new +# privilege.title = TheCityAdmin::UserAdminPrivilege::Permissions[:resource_admin] # privilege.user_id = user.id # if privilege.save @@ -152,10 +152,10 @@ # puts "Invitations: #{user.invitations.count}" # end -# group_list = TheCity::GroupList.new +# group_list = TheCityAdmin::GroupList.new # group = group_list.first -# invitation = TheCity::UserInvitation.new +# invitation = TheCityAdmin::UserInvitation.new # invitation.user_id = user.id # invitation.email = user.email # invitation.group_id = group.id @@ -182,10 +182,10 @@ # end -# note = TheCity::UserNote.new +# note = TheCityAdmin::UserNote.new # note.author_id = user.id # note.body = "Hello World" -# note.visible_to = [TheCity::UserNote::VisibleTo[:process_user], TheCity::UserNote::VisibleTo[:resource_admin]] +# note.visible_to = [TheCityAdmin::UserNote::VisibleTo[:process_user], TheCityAdmin::UserNote::VisibleTo[:resource_admin]] # if note.save # puts "Note saved" @@ -224,10 +224,10 @@ # puts "------------------------------------" -# group_list = TheCity::GroupList.new +# group_list = TheCityAdmin::GroupList.new # group = group_list.first -# offline_user = TheCity::User.new +# offline_user = TheCityAdmin::User.new # offline_user.first = 'Wes' # offline_user.last = 'Hays' # offline_user.email = 'someguy@someplace.org' @@ -243,9 +243,9 @@ # puts "Roles: #{offline_user.roles.size}" # end -# role = TheCity::UserRole.new -# role.group_type = TheCity::UserRole::GroupTypes[:campus] -# role.title = TheCity::UserRole::Titles[:leader] +# role = TheCityAdmin::UserRole.new +# role.group_type = TheCityAdmin::UserRole::GroupTypes[:campus] +# role.title = TheCityAdmin::UserRole::Titles[:leader] # role.user_id = offline_user.id # role.group_id = group.id @@ -289,10 +289,10 @@ # puts "Skills: #{user.skills.size}" # end -# skill_list = TheCity::SkillList.new +# skill_list = TheCityAdmin::SkillList.new # skill = skill_list.first -# user_skill = TheCity::UserSkill.new +# user_skill = TheCityAdmin::UserSkill.new # user_skill.user_id = user.id # user_skill.skill_id = skill.id diff --git a/examples/webhooks.rb b/examples/webhooks.rb index a1ff932..7e09d88 100644 --- a/examples/webhooks.rb +++ b/examples/webhooks.rb @@ -1,7 +1,7 @@ # ******************************************* # This is a demo file to show usage. # -# @package TheCity::Admin +# @package TheCityAdmin::Admin # @authors Robbie Lieb , Wes Hays # ******************************************* @@ -11,21 +11,21 @@ require File.dirname(__FILE__) + '/city_keys.rb' include CityKeys -TheCity::AdminApi.connect(KEY, TOKEN) +TheCityAdmin::AdminApi.connect(KEY, TOKEN) puts "------------------------------------" -webhook_list = TheCity::WebHookList.new +webhook_list = TheCityAdmin::WebHookList.new if webhook_list.empty? puts "No web hooks in list" else puts "Web hooks: #{webhook_list.count}" end -webhook = TheCity::WebHook.new -webhook.object = TheCity::WebHook::Objects[:group] -webhook.event = TheCity::WebHook::Events[:create] +webhook = TheCityAdmin::WebHook.new +webhook.object = TheCityAdmin::WebHook::Objects[:group] +webhook.event = TheCityAdmin::WebHook::Events[:create] webhook.callback_uri = 'https://www.example.com/mycallback_url' if webhook.save @@ -34,7 +34,7 @@ puts "Failed to create web hook: #{webhook.error_messages.join(', ')}" end -webhook_list2 = TheCity::WebHookList.new +webhook_list2 = TheCityAdmin::WebHookList.new if webhook_list2.empty? puts "No web hooks in list" else @@ -47,7 +47,7 @@ puts "Unable to delete web hook #{webhook.id}: #{webhook.error_messages.join(', ')}" end -webhook_list3 = TheCity::WebHookList.new +webhook_list3 = TheCityAdmin::WebHookList.new if webhook_list3.empty? puts "No web hooks in list" else diff --git a/lib/api/address_list.rb b/lib/api/address_list.rb index e8ebe55..3d820fe 100644 --- a/lib/api/address_list.rb +++ b/lib/api/address_list.rb @@ -20,7 +20,7 @@ class AddressList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::AddressListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::AddressListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/campus_list.rb b/lib/api/campus_list.rb index 5aabd25..97bf028 100644 --- a/lib/api/campus_list.rb +++ b/lib/api/campus_list.rb @@ -22,7 +22,7 @@ class CampusList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::CampusListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::CampusListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/checkin_list.rb b/lib/api/checkin_list.rb index 774ac13..c70861e 100644 --- a/lib/api/checkin_list.rb +++ b/lib/api/checkin_list.rb @@ -20,7 +20,7 @@ class CheckinList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::CheckinListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::CheckinListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/church.rb b/lib/api/church.rb index 109aff6..90b2de5 100644 --- a/lib/api/church.rb +++ b/lib/api/church.rb @@ -7,7 +7,7 @@ class Church < ApiObject # Constructor. def initialize - reader = TheCity::ChurchReader.new + reader = TheCityAdmin::ChurchReader.new json_data = reader.load_feed initialize_from_json_object(json_data) end diff --git a/lib/api/donation_export_list.rb b/lib/api/donation_export_list.rb index 91760cc..8812dc5 100644 --- a/lib/api/donation_export_list.rb +++ b/lib/api/donation_export_list.rb @@ -21,7 +21,7 @@ class DonationExportList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::DonationExportListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::DonationExportListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/donation_list.rb b/lib/api/donation_list.rb index 836e00a..ac5e3f4 100644 --- a/lib/api/donation_list.rb +++ b/lib/api/donation_list.rb @@ -23,7 +23,7 @@ def initialize(options = {}) @options = options @options[:page] ||= 1 @options[:per_page] ||= 50 - @options[:reader] = TheCity::DonationListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::DonationListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/fund_list.rb b/lib/api/fund_list.rb index 79d1a8d..d7d2d7f 100644 --- a/lib/api/fund_list.rb +++ b/lib/api/fund_list.rb @@ -22,7 +22,7 @@ class FundList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::FundListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::FundListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/group_address_list.rb b/lib/api/group_address_list.rb index 21da785..dfcebdf 100644 --- a/lib/api/group_address_list.rb +++ b/lib/api/group_address_list.rb @@ -21,7 +21,7 @@ class GroupAddressList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::GroupAddressListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::GroupAddressListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/group_checkin_list.rb b/lib/api/group_checkin_list.rb index 95734e0..eb00b21 100644 --- a/lib/api/group_checkin_list.rb +++ b/lib/api/group_checkin_list.rb @@ -21,7 +21,7 @@ class GroupCheckinList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::GroupCheckinListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::GroupCheckinListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/group_event_attendance_list.rb b/lib/api/group_event_attendance_list.rb index 7d03297..40e4732 100644 --- a/lib/api/group_event_attendance_list.rb +++ b/lib/api/group_event_attendance_list.rb @@ -21,7 +21,7 @@ class GroupEventAttendanceList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::GroupEventAttendanceListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::GroupEventAttendanceListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/group_export_list.rb b/lib/api/group_export_list.rb index a5fe14d..2e57fb6 100644 --- a/lib/api/group_export_list.rb +++ b/lib/api/group_export_list.rb @@ -21,7 +21,7 @@ class GroupExportList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::GroupExportListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::GroupExportListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/group_invitation_list.rb b/lib/api/group_invitation_list.rb index 89ace86..69fb11c 100644 --- a/lib/api/group_invitation_list.rb +++ b/lib/api/group_invitation_list.rb @@ -21,7 +21,7 @@ class GroupInvitationList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::GroupInvitationListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::GroupInvitationListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/group_list.rb b/lib/api/group_list.rb index 79a7c16..0af060d 100644 --- a/lib/api/group_list.rb +++ b/lib/api/group_list.rb @@ -22,7 +22,7 @@ class GroupList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::GroupListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::GroupListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/group_role_list.rb b/lib/api/group_role_list.rb index dc4e425..53295cb 100644 --- a/lib/api/group_role_list.rb +++ b/lib/api/group_role_list.rb @@ -21,7 +21,7 @@ class GroupRoleList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::GroupRoleListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::GroupRoleListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/group_tag_list.rb b/lib/api/group_tag_list.rb index 3837884..15b221b 100644 --- a/lib/api/group_tag_list.rb +++ b/lib/api/group_tag_list.rb @@ -21,7 +21,7 @@ class GroupTagList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::GroupTagListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::GroupTagListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/invitation_list.rb b/lib/api/invitation_list.rb index cb52581..a4ca805 100644 --- a/lib/api/invitation_list.rb +++ b/lib/api/invitation_list.rb @@ -21,7 +21,7 @@ class InvitationList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::InvitationListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::InvitationListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/metric_list.rb b/lib/api/metric_list.rb index 51f4efd..d970235 100644 --- a/lib/api/metric_list.rb +++ b/lib/api/metric_list.rb @@ -31,7 +31,7 @@ class MetricList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::MetricListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::MetricListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/metric_measurement_list.rb b/lib/api/metric_measurement_list.rb index e4741ad..48c19ec 100644 --- a/lib/api/metric_measurement_list.rb +++ b/lib/api/metric_measurement_list.rb @@ -22,7 +22,7 @@ class MetricMeasurementList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::MetricMeasurementListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::MetricMeasurementListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/metric_measurement_values.rb b/lib/api/metric_measurement_values.rb index cd9d95f..ac63766 100644 --- a/lib/api/metric_measurement_values.rb +++ b/lib/api/metric_measurement_values.rb @@ -30,7 +30,7 @@ def self.load_by_id(metric_id) # MetricMeasurementValues.new({:metric_id => 12345}) # def initialize(options = {}) - options[:reader] = TheCity::MetricMeasurementValuesReader.new(options) if options[:reader].nil? + options[:reader] = TheCityAdmin::MetricMeasurementValuesReader.new(options) if options[:reader].nil? @json_data = options[:reader].load_feed end diff --git a/lib/api/pledge_list.rb b/lib/api/pledge_list.rb index e3a7a0a..f5bb056 100644 --- a/lib/api/pledge_list.rb +++ b/lib/api/pledge_list.rb @@ -22,7 +22,7 @@ class PledgeList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::PledgeListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::PledgeListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/role_list.rb b/lib/api/role_list.rb index a75a840..843d2b6 100644 --- a/lib/api/role_list.rb +++ b/lib/api/role_list.rb @@ -21,7 +21,7 @@ class RoleList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::RoleListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::RoleListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/skill_list.rb b/lib/api/skill_list.rb index 729e592..79ef505 100644 --- a/lib/api/skill_list.rb +++ b/lib/api/skill_list.rb @@ -21,7 +21,7 @@ class SkillList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::SkillListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::SkillListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/skilled_user_id_list.rb b/lib/api/skilled_user_id_list.rb index 42698ab..b3df921 100644 --- a/lib/api/skilled_user_id_list.rb +++ b/lib/api/skilled_user_id_list.rb @@ -21,7 +21,7 @@ class SkilledUserIdList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::SkilledUserIdListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::SkilledUserIdListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/skilled_user_list.rb b/lib/api/skilled_user_list.rb index 362015c..1a57d57 100644 --- a/lib/api/skilled_user_list.rb +++ b/lib/api/skilled_user_list.rb @@ -21,7 +21,7 @@ class SkilledUserList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::SkilledUserListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::SkilledUserListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/tag_group_list.rb b/lib/api/tag_group_list.rb index fed6782..71085c5 100644 --- a/lib/api/tag_group_list.rb +++ b/lib/api/tag_group_list.rb @@ -21,7 +21,7 @@ class TagGroupList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::TagGroupListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::TagGroupListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/tag_list.rb b/lib/api/tag_list.rb index 9611e7b..9592718 100644 --- a/lib/api/tag_list.rb +++ b/lib/api/tag_list.rb @@ -21,7 +21,7 @@ class TagList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::TagListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::TagListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/terminology_list.rb b/lib/api/terminology_list.rb index c8905bc..4975fb4 100644 --- a/lib/api/terminology_list.rb +++ b/lib/api/terminology_list.rb @@ -21,7 +21,7 @@ class TerminologyList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::TerminologyListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::TerminologyListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/user_address_list.rb b/lib/api/user_address_list.rb index a4c3d3a..48a3632 100644 --- a/lib/api/user_address_list.rb +++ b/lib/api/user_address_list.rb @@ -21,7 +21,7 @@ class UserAddressList < ApiList # def initialize(options = {}) @options = options - @options[:reader] = TheCity::UserAddressListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserAddressListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/user_admin_privilege_list.rb b/lib/api/user_admin_privilege_list.rb index dec64df..bcc2edf 100644 --- a/lib/api/user_admin_privilege_list.rb +++ b/lib/api/user_admin_privilege_list.rb @@ -22,7 +22,7 @@ class UserAdminPrivilegeList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::UserAdminPrivilegeListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserAdminPrivilegeListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/user_count.rb b/lib/api/user_count.rb index c2a2513..6202b5f 100644 --- a/lib/api/user_count.rb +++ b/lib/api/user_count.rb @@ -20,7 +20,7 @@ class UserCount < ApiObject # UserCount.new({:filter => :created_in_the_last_7_Days}) # def initialize(options = {}) - reader = options[:reader] || TheCity::UserCountReader.new(options) + reader = options[:reader] || TheCityAdmin::UserCountReader.new(options) @json_data = reader.load_feed self.count = @json_data['count'] self.filter = @json_data['filter'] diff --git a/lib/api/user_family_list.rb b/lib/api/user_family_list.rb index b8af260..e37c9ef 100644 --- a/lib/api/user_family_list.rb +++ b/lib/api/user_family_list.rb @@ -24,7 +24,7 @@ class UserFamilyList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::UserFamilyListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserFamilyListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @id = @json_data['id'] diff --git a/lib/api/user_invitation_list.rb b/lib/api/user_invitation_list.rb index 85de83b..0bf395c 100644 --- a/lib/api/user_invitation_list.rb +++ b/lib/api/user_invitation_list.rb @@ -22,7 +22,7 @@ class UserInvitationList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::UserInvitationListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserInvitationListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/user_list.rb b/lib/api/user_list.rb index 30f2afc..f82651a 100644 --- a/lib/api/user_list.rb +++ b/lib/api/user_list.rb @@ -22,7 +22,7 @@ def initialize(options = {}) @options = options.clone @options[:page] ||= 1 @options[:per_page] ||= 200 - @options[:reader] = TheCity::UserListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/user_note_list.rb b/lib/api/user_note_list.rb index a5faa30..c891947 100644 --- a/lib/api/user_note_list.rb +++ b/lib/api/user_note_list.rb @@ -22,7 +22,7 @@ class UserNoteList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::UserNoteListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserNoteListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/user_process_answer_list.rb b/lib/api/user_process_answer_list.rb index 0b2f711..81e4b20 100644 --- a/lib/api/user_process_answer_list.rb +++ b/lib/api/user_process_answer_list.rb @@ -23,7 +23,7 @@ class UserProcessAnswerList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::UserProcessAnswerListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserProcessAnswerListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/user_process_list.rb b/lib/api/user_process_list.rb index b6a9626..eeec09a 100644 --- a/lib/api/user_process_list.rb +++ b/lib/api/user_process_list.rb @@ -22,7 +22,7 @@ class UserProcessList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::UserProcessListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserProcessListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/api/user_role_list.rb b/lib/api/user_role_list.rb index 471706a..16413ae 100644 --- a/lib/api/user_role_list.rb +++ b/lib/api/user_role_list.rb @@ -22,7 +22,7 @@ class UserRoleList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::UserRoleListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserRoleListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @user_id = options[:user_id] || nil diff --git a/lib/api/user_skill_list.rb b/lib/api/user_skill_list.rb index 276249a..4b8715d 100644 --- a/lib/api/user_skill_list.rb +++ b/lib/api/user_skill_list.rb @@ -22,7 +22,7 @@ class UserSkillList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::UserSkillListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::UserSkillListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @user_id = options[:user_id] || nil diff --git a/lib/api/web_hook_list.rb b/lib/api/web_hook_list.rb index 1dd0570..5c3d5b7 100644 --- a/lib/api/web_hook_list.rb +++ b/lib/api/web_hook_list.rb @@ -21,7 +21,7 @@ class WebHookList < ApiList def initialize(options = {}) @options = options @options[:page] ||= 1 - @options[:reader] = TheCity::WebHookListReader.new(@options) if @options[:reader].nil? + @options[:reader] = TheCityAdmin::WebHookListReader.new(@options) if @options[:reader].nil? @json_data = @options[:reader].load_feed @total_entries = @json_data['total_entries'] diff --git a/lib/common.rb b/lib/common.rb index 3fa14d5..bce82b2 100644 --- a/lib/common.rb +++ b/lib/common.rb @@ -50,12 +50,12 @@ def self._build_admin_headers(method, path, params, body) current_time = Time.now.to_i.to_s string_to_sign = current_time.to_s + method_request + url - unencoded_hmac = OpenSSL::HMAC.digest('sha256', TheCity::AdminApi.api_key, string_to_sign) + unencoded_hmac = OpenSSL::HMAC.digest('sha256', TheCityAdmin::AdminApi.api_key, string_to_sign) unescaped_hmac = Base64.encode64(unencoded_hmac).chomp hmac_signature = CGI.escape(unescaped_hmac) {'X-City-Sig' => hmac_signature, - 'X-City-User-Token' => TheCity::AdminApi.api_token, + 'X-City-User-Token' => TheCityAdmin::AdminApi.api_token, 'X-City-Time' => current_time, 'Accept' => 'application/vnd.thecity.admin.v1+json', 'Content-Type' => 'application/json', diff --git a/lib/readers/api_reader.rb b/lib/readers/api_reader.rb index d36fa57..70d83db 100644 --- a/lib/readers/api_reader.rb +++ b/lib/readers/api_reader.rb @@ -16,7 +16,7 @@ def load_feed # data = @cacher.get_data( @class_key ) # else @url_data_params ||= {} - response = TheCity::admin_request(:get, @url_data_path, @url_data_params) + response = TheCityAdmin::admin_request(:get, @url_data_path, @url_data_params) data = JSON.parse(response.body) @headers = response.headers @cacher.save_data(@class_key, data) unless @cacher.nil? diff --git a/lib/writers/api_writer.rb b/lib/writers/api_writer.rb index 94e6236..47ab53f 100644 --- a/lib/writers/api_writer.rb +++ b/lib/writers/api_writer.rb @@ -22,7 +22,7 @@ def save_object end begin - response = TheCity::admin_request(@url_action, @url_data_path, nil, @url_data_params.to_json) + response = TheCityAdmin::admin_request(@url_action, @url_data_path, nil, @url_data_params.to_json) @response_code = response.code # No content but is a success success = response.code == 204 ? {'success' => true} : JSON.parse(response.body) @@ -49,7 +49,7 @@ def delete_object begin # @url_data_path should be the same as :put if this object is already # setup and mapped to an object that exists - response = TheCity::admin_request(:delete, @url_data_delete_path) + response = TheCityAdmin::admin_request(:delete, @url_data_delete_path) success = response.code == 204 ? true : false # No content but is a success rescue Exception => e @error_messages = e.message.split(',') diff --git a/spec/api/group_address_list_spec.rb b/spec/api/group_address_list_spec.rb index 8aaae4b..a2cd5d8 100644 --- a/spec/api/group_address_list_spec.rb +++ b/spec/api/group_address_list_spec.rb @@ -18,8 +18,8 @@ :total_pages => 1, :addresses => [FactoryGirl.attributes_for(:group_address)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::GroupAddressList.new({:group_id => group_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + address_list = TheCityAdmin::GroupAddressList.new({:group_id => group_id}) address = address_list[0] address.city.should == "Sammamish" @@ -34,8 +34,8 @@ :total_pages => 1, :addresses => [] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::GroupAddressList.new({:group_id => group_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + address_list = TheCityAdmin::GroupAddressList.new({:group_id => group_id}) address_list.empty?.should be_true end @@ -49,8 +49,8 @@ :total_pages => 1, :addresses => [FactoryGirl.attributes_for(:group_address)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::GroupAddressList.new({:group_id => group_id, :page => 2}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + address_list = TheCityAdmin::GroupAddressList.new({:group_id => group_id, :page => 2}) address = address_list[0] address.city.should == "Sammamish" @@ -64,8 +64,8 @@ :total_pages => 1, :addresses => [FactoryGirl.attributes_for(:group_address)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::GroupAddressList.new({:group_id => group_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + address_list = TheCityAdmin::GroupAddressList.new({:group_id => group_id}) addresses = [] address_list.each { |address| addresses << address.city } @@ -80,8 +80,8 @@ :total_pages => 1, :addresses => [FactoryGirl.attributes_for(:group_address)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::GroupAddressList.new({:group_id => group_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + address_list = TheCityAdmin::GroupAddressList.new({:group_id => group_id}) addresses = address_list.collect { |address| address.city } addresses.should == ["Sammamish"] diff --git a/spec/api/group_checkin_list_spec.rb b/spec/api/group_checkin_list_spec.rb index f87396b..2125c98 100644 --- a/spec/api/group_checkin_list_spec.rb +++ b/spec/api/group_checkin_list_spec.rb @@ -18,8 +18,8 @@ :total_pages => 1, :checkins => [FactoryGirl.attributes_for(:group_checkin)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - checkin_list = TheCity::GroupCheckinList.new({:group_id => group_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + checkin_list = TheCityAdmin::GroupCheckinList.new({:group_id => group_id}) checkin = checkin_list[0] checkin.parent_group_name.should == "Ballard Childrens ministry" @@ -34,8 +34,8 @@ :total_pages => 1, :checkins => [] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - checkin_list = TheCity::GroupCheckinList.new({:group_id => group_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + checkin_list = TheCityAdmin::GroupCheckinList.new({:group_id => group_id}) checkin_list.empty?.should be_true end @@ -49,8 +49,8 @@ :total_pages => 1, :checkins => [FactoryGirl.attributes_for(:group_checkin)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - checkin_list = TheCity::GroupCheckinList.new({:group_id => group_id, :page => 2}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + checkin_list = TheCityAdmin::GroupCheckinList.new({:group_id => group_id, :page => 2}) checkin = checkin_list[0] checkin.parent_group_name.should == "Ballard Childrens ministry" @@ -64,8 +64,8 @@ :total_pages => 1, :checkins => [FactoryGirl.attributes_for(:group_checkin)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - checkin_list = TheCity::GroupCheckinList.new({:group_id => group_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + checkin_list = TheCityAdmin::GroupCheckinList.new({:group_id => group_id}) checkins = [] checkin_list.each { |checkin| checkins << checkin.parent_group_name } @@ -80,8 +80,8 @@ :total_pages => 1, :checkins => [FactoryGirl.attributes_for(:group_checkin)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - checkin_list = TheCity::GroupCheckinList.new({:group_id => group_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + checkin_list = TheCityAdmin::GroupCheckinList.new({:group_id => group_id}) checkins = checkin_list.collect { |checkin| checkin.parent_group_name } checkins.should == ["Ballard Childrens ministry"] diff --git a/spec/api/group_event_attendance_list_spec.rb b/spec/api/group_event_attendance_list_spec.rb index 348e2d2..7ea01f3 100644 --- a/spec/api/group_event_attendance_list_spec.rb +++ b/spec/api/group_event_attendance_list_spec.rb @@ -18,8 +18,8 @@ :total_pages => 1, :event_attendances => [FactoryGirl.attributes_for(:group_event_attendance)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - attendance_list = TheCity::GroupEventAttendanceList.new({:group_id => group_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + attendance_list = TheCityAdmin::GroupEventAttendanceList.new({:group_id => group_id}) attendance = attendance_list[0] attendance.user.should == "Johnny Smith" @@ -34,8 +34,8 @@ :total_pages => 1, :event_attendances => [] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - attendance_list = TheCity::GroupEventAttendanceList.new({:group_id => group_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + attendance_list = TheCityAdmin::GroupEventAttendanceList.new({:group_id => group_id}) attendance_list.empty?.should be_true end @@ -49,8 +49,8 @@ :total_pages => 1, :event_attendances => [FactoryGirl.attributes_for(:group_event_attendance)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - attendance_list = TheCity::GroupEventAttendanceList.new({:group_id => group_id, :page => 2}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + attendance_list = TheCityAdmin::GroupEventAttendanceList.new({:group_id => group_id, :page => 2}) attendance = attendance_list[0] attendance.user.should == "Johnny Smith" @@ -64,8 +64,8 @@ :total_pages => 1, :event_attendances => [FactoryGirl.attributes_for(:group_event_attendance)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - attendance_list = TheCity::GroupEventAttendanceList.new({:group_id => group_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + attendance_list = TheCityAdmin::GroupEventAttendanceList.new({:group_id => group_id}) attendances = [] attendance_list.each { |attendance| attendances << attendance.user } @@ -80,8 +80,8 @@ :total_pages => 1, :event_attendances => [FactoryGirl.attributes_for(:group_event_attendance)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - attendance_list = TheCity::GroupEventAttendanceList.new({:group_id => group_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + attendance_list = TheCityAdmin::GroupEventAttendanceList.new({:group_id => group_id}) attendances = attendance_list.collect { |attendance| attendance.user } attendances.should == ["Johnny Smith"] diff --git a/spec/api/role_list_spec.rb b/spec/api/role_list_spec.rb index eacf38f..f184173 100644 --- a/spec/api/role_list_spec.rb +++ b/spec/api/role_list_spec.rb @@ -13,8 +13,8 @@ it 'should pass if role list attribute is not specifed' do request_data = FactoryGirl.attributes_for(:role_list).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::RoleList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + role_list = TheCityAdmin::RoleList.new role_list.roles.should == [] end @@ -22,8 +22,8 @@ it 'should pass if role list is empty' do request_data = FactoryGirl.attributes_for(:role_list, :roles => []).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::RoleList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + role_list = TheCityAdmin::RoleList.new role_list.roles.should == [] end @@ -35,8 +35,8 @@ :total_pages => 1, :roles => [FactoryGirl.attributes_for(:role)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::RoleList.new({:page => 2}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + role_list = TheCityAdmin::RoleList.new({:page => 2}) role_list.roles.should == ["Leader"] end @@ -47,8 +47,8 @@ :total_pages => 1, :roles => [FactoryGirl.attributes_for(:role)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::RoleList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + role_list = TheCityAdmin::RoleList.new roles = [] role_list.each { |role| roles << role.title } @@ -62,8 +62,8 @@ :total_pages => 1, :roles => [FactoryGirl.attributes_for(:role)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::RoleList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + role_list = TheCityAdmin::RoleList.new roles = role_list.collect { |role| role.title } role_list.roles.should == ["Leader"] diff --git a/spec/api/skill_list_spec.rb b/spec/api/skill_list_spec.rb index daf321e..96c9f42 100644 --- a/spec/api/skill_list_spec.rb +++ b/spec/api/skill_list_spec.rb @@ -13,8 +13,8 @@ it 'should pass if skill list attribute is not specifed' do request_data = FactoryGirl.attributes_for(:skill_list).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::SkillList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skill_list = TheCityAdmin::SkillList.new skill_list.skills.should == [] end @@ -22,8 +22,8 @@ it 'should pass if skill list is empty' do request_data = FactoryGirl.attributes_for(:skill_list, :skills => []).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::SkillList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skill_list = TheCityAdmin::SkillList.new skill_list.skills.should == [] end @@ -35,8 +35,8 @@ :total_pages => 1, :skills => [FactoryGirl.attributes_for(:skill)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::SkillList.new({:page => 2}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skill_list = TheCityAdmin::SkillList.new({:page => 2}) skill_list.skills.should == ["Welding"] end @@ -48,8 +48,8 @@ :total_pages => 1, :skills => [FactoryGirl.attributes_for(:skill)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::SkillList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skill_list = TheCityAdmin::SkillList.new skills = [] skill_list.each { |skill| skills << skill.name } @@ -63,8 +63,8 @@ :total_pages => 1, :skills => [FactoryGirl.attributes_for(:skill)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::SkillList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skill_list = TheCityAdmin::SkillList.new skills = skill_list.collect { |skill| skill.name } skill_list.skills.should == ["Welding"] diff --git a/spec/api/skilled_user_id_list_spec.rb b/spec/api/skilled_user_id_list_spec.rb index 4aff456..2a8d734 100644 --- a/spec/api/skilled_user_id_list_spec.rb +++ b/spec/api/skilled_user_id_list_spec.rb @@ -14,8 +14,8 @@ it 'should pass if skilled user list attribute is not specifed' do skill_id = 123 request_data = FactoryGirl.attributes_for(:skilled_user_id_list).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_id_list = TheCity::SkilledUserIdList.new({:skill_id => skill_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skilled_user_id_list = TheCityAdmin::SkilledUserIdList.new({:skill_id => skill_id}) skilled_user_id_list.user_ids.should == [] end @@ -24,8 +24,8 @@ it 'should pass if skilled user list is empty' do skill_id = 123 request_data = FactoryGirl.attributes_for(:skilled_user_id_list, :users => []).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_id_list = TheCity::SkilledUserIdList.new({:skill_id => skill_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skilled_user_id_list = TheCityAdmin::SkilledUserIdList.new({:skill_id => skill_id}) skilled_user_id_list.user_ids.should == [] end @@ -39,8 +39,8 @@ :total_pages => 1, :user_ids => [FactoryGirl.attributes_for(:user)[:id]] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_id_list = TheCity::SkilledUserIdList.new({:skill_id => skill_id, :page => page}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skilled_user_id_list = TheCityAdmin::SkilledUserIdList.new({:skill_id => skill_id, :page => page}) skilled_user_id_list.user_ids.should == [946060874] end @@ -53,8 +53,8 @@ :total_pages => 1, :user_ids => [FactoryGirl.attributes_for(:user)[:id]] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_id_list = TheCity::SkilledUserIdList.new({:skill_id => skill_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skilled_user_id_list = TheCityAdmin::SkilledUserIdList.new({:skill_id => skill_id}) users = [] skilled_user_id_list.each { |user_id| users << user_id} @@ -69,8 +69,8 @@ :total_pages => 1, :user_ids => [FactoryGirl.attributes_for(:user)[:id]] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_id_list = TheCity::SkilledUserIdList.new({:skill_id => skill_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skilled_user_id_list = TheCityAdmin::SkilledUserIdList.new({:skill_id => skill_id}) users = skilled_user_id_list.collect { |user_id| user_id } skilled_user_id_list.user_ids.should == [946060874] diff --git a/spec/api/skilled_user_list_spec.rb b/spec/api/skilled_user_list_spec.rb index 0a438e0..4a8ef58 100644 --- a/spec/api/skilled_user_list_spec.rb +++ b/spec/api/skilled_user_list_spec.rb @@ -14,8 +14,8 @@ it 'should pass if skilled user list attribute is not specifed' do skill_id = 123 request_data = FactoryGirl.attributes_for(:skilled_user_list).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_list = TheCity::SkilledUserList.new({:skill_id => skill_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skilled_user_list = TheCityAdmin::SkilledUserList.new({:skill_id => skill_id}) skilled_user_list.users.should == [] end @@ -24,8 +24,8 @@ it 'should pass if skilled user list is empty' do skill_id = 123 request_data = FactoryGirl.attributes_for(:skilled_user_list, :users => []).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_list = TheCity::SkilledUserList.new({:skill_id => skill_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skilled_user_list = TheCityAdmin::SkilledUserList.new({:skill_id => skill_id}) skilled_user_list.users.should == [] end @@ -39,8 +39,8 @@ :total_pages => 1, :users => [FactoryGirl.attributes_for(:user)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_list = TheCity::SkilledUserList.new({:skill_id => skill_id, :page => page}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skilled_user_list = TheCityAdmin::SkilledUserList.new({:skill_id => skill_id, :page => page}) skilled_user_list.users.should == ["Sam Shepherd"] end @@ -53,8 +53,8 @@ :total_pages => 1, :users => [FactoryGirl.attributes_for(:user)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_list = TheCity::SkilledUserList.new({:skill_id => skill_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skilled_user_list = TheCityAdmin::SkilledUserList.new({:skill_id => skill_id}) users = [] skilled_user_list.each { |user| users << user.full_name } @@ -69,8 +69,8 @@ :total_pages => 1, :users => [FactoryGirl.attributes_for(:user)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skilled_user_list = TheCity::SkilledUserList.new({:skill_id => skill_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skilled_user_list = TheCityAdmin::SkilledUserList.new({:skill_id => skill_id}) users = skilled_user_list.collect { |user| user.full_name } skilled_user_list.users.should == ["Sam Shepherd"] diff --git a/spec/api/tag_group_list_spec.rb b/spec/api/tag_group_list_spec.rb index 1207a69..67ef568 100644 --- a/spec/api/tag_group_list_spec.rb +++ b/spec/api/tag_group_list_spec.rb @@ -14,8 +14,8 @@ it 'should pass if tag group list is empty' do tag_id = 123 request_data = FactoryGirl.attributes_for(:tag_group_list, :groups => []).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - tag_group_list = TheCity::TagGroupList.new({:tag_id => tag_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + tag_group_list = TheCityAdmin::TagGroupList.new({:tag_id => tag_id}) tag_group_list.groups.should == [] end @@ -29,8 +29,8 @@ :total_pages => 1, :groups => [FactoryGirl.attributes_for(:group)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - tag_group_list = TheCity::TagGroupList.new({:tag_id => tag_id, :page => page}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + tag_group_list = TheCityAdmin::TagGroupList.new({:tag_id => tag_id, :page => page}) tag_group_list.groups.should == ["The Group"] end @@ -43,8 +43,8 @@ :total_pages => 1, :groups => [FactoryGirl.attributes_for(:group)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - tag_group_list = TheCity::TagGroupList.new({:tag_id => tag_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + tag_group_list = TheCityAdmin::TagGroupList.new({:tag_id => tag_id}) groups = [] tag_group_list.each { |group| groups << group.name } @@ -59,8 +59,8 @@ :total_pages => 1, :groups => [FactoryGirl.attributes_for(:group)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - tag_group_list = TheCity::TagGroupList.new({:tag_id => tag_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + tag_group_list = TheCityAdmin::TagGroupList.new({:tag_id => tag_id}) groups = tag_group_list.collect { |group| group.name } tag_group_list.groups.should == ["The Group"] diff --git a/spec/api/tag_list_spec.rb b/spec/api/tag_list_spec.rb index b0cc19c..74815b3 100644 --- a/spec/api/tag_list_spec.rb +++ b/spec/api/tag_list_spec.rb @@ -13,8 +13,8 @@ it 'should pass if tag list attribute is not specifed' do request_data = FactoryGirl.attributes_for(:tag_list).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - tag_list = TheCity::TagList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + tag_list = TheCityAdmin::TagList.new tag_list.tags.should == [] end @@ -22,8 +22,8 @@ it 'should pass if tag list is empty' do request_data = FactoryGirl.attributes_for(:tag_list, :tags => []).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - tag_list = TheCity::TagList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + tag_list = TheCityAdmin::TagList.new tag_list.tags.should == [] end @@ -36,8 +36,8 @@ :total_pages => 1, :tags => [FactoryGirl.attributes_for(:tag)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - tag_list = TheCity::TagList.new({:page => page}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + tag_list = TheCityAdmin::TagList.new({:page => page}) tag_list.tags.should == ["Evening"] end @@ -49,8 +49,8 @@ :total_pages => 1, :tags => [FactoryGirl.attributes_for(:tag)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - tag_list = TheCity::TagList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + tag_list = TheCityAdmin::TagList.new tags = [] tag_list.each { |tag| tags << tag.name } @@ -64,8 +64,8 @@ :total_pages => 1, :tags => [FactoryGirl.attributes_for(:tag)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - tag_list = TheCity::TagList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + tag_list = TheCityAdmin::TagList.new tags = tag_list.collect { |tag| tag.name } tag_list.tags.should == ["Evening"] diff --git a/spec/api/terminology_list_spec.rb b/spec/api/terminology_list_spec.rb index 3581f36..4180b1d 100644 --- a/spec/api/terminology_list_spec.rb +++ b/spec/api/terminology_list_spec.rb @@ -13,8 +13,8 @@ it 'should pass if terminology list attribute is not specifed' do request_data = FactoryGirl.attributes_for(:terminology_list).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - terminology_list = TheCity::TerminologyList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + terminology_list = TheCityAdmin::TerminologyList.new terminology_list.labels.should == [] end @@ -22,8 +22,8 @@ it 'should pass if terminology list is empty' do request_data = FactoryGirl.attributes_for(:terminology_list, :terminologies => []).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - terminology_list = TheCity::TerminologyList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + terminology_list = TheCityAdmin::TerminologyList.new terminology_list.labels.should == [] end @@ -35,8 +35,8 @@ :total_pages => 1, :labels => [FactoryGirl.attributes_for(:terminology)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - terminology_list = TheCity::TerminologyList.new({:page => 2}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + terminology_list = TheCityAdmin::TerminologyList.new({:page => 2}) terminology_list.labels.should == ['CG'] end @@ -47,8 +47,8 @@ :total_pages => 1, :labels => [FactoryGirl.attributes_for(:terminology)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - terminology_list = TheCity::TerminologyList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + terminology_list = TheCityAdmin::TerminologyList.new terminologies = [] terminology_list.each { |terminology| terminologies << terminology.label } @@ -62,8 +62,8 @@ :total_pages => 1, :labels => [FactoryGirl.attributes_for(:terminology)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - terminology_list = TheCity::TerminologyList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + terminology_list = TheCityAdmin::TerminologyList.new terminologies = terminology_list.collect { |terminology| terminology.label } terminology_list.labels.should == ['CG'] diff --git a/spec/api/user_address_list_spec.rb b/spec/api/user_address_list_spec.rb index 25363d8..ab4c762 100644 --- a/spec/api/user_address_list_spec.rb +++ b/spec/api/user_address_list_spec.rb @@ -18,8 +18,8 @@ :total_pages => 1, :addresses => [FactoryGirl.attributes_for(:user_address)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::UserAddressList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + address_list = TheCityAdmin::UserAddressList.new({:user_id => user_id}) address = address_list[0] address.city.should == "Seattle" @@ -33,8 +33,8 @@ :total_pages => 1, :addresses => [] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::UserAddressList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + address_list = TheCityAdmin::UserAddressList.new({:user_id => user_id}) address_list.empty?.should be_true end @@ -48,8 +48,8 @@ :total_pages => 1, :addresses => [FactoryGirl.attributes_for(:user_address)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::UserAddressList.new({:user_id => user_id, :page => page}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + address_list = TheCityAdmin::UserAddressList.new({:user_id => user_id, :page => page}) address = address_list[0] address.city.should == "Seattle" @@ -63,8 +63,8 @@ :total_pages => 1, :addresses => [FactoryGirl.attributes_for(:user_address)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::UserAddressList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + address_list = TheCityAdmin::UserAddressList.new({:user_id => user_id}) addresses = [] address_list.each { |address| addresses << address.city } @@ -79,8 +79,8 @@ :total_pages => 1, :addresses => [FactoryGirl.attributes_for(:user_address)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - address_list = TheCity::UserAddressList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + address_list = TheCityAdmin::UserAddressList.new({:user_id => user_id}) addresses = address_list.collect { |address| address.city } addresses.should == ["Seattle"] diff --git a/spec/api/user_admin_privilege_list_spec.rb b/spec/api/user_admin_privilege_list_spec.rb index f6a78a9..47eb5b8 100644 --- a/spec/api/user_admin_privilege_list_spec.rb +++ b/spec/api/user_admin_privilege_list_spec.rb @@ -18,8 +18,8 @@ :total_pages => 1, :account_roles => [FactoryGirl.attributes_for(:user_admin_privilege)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - admin_privilege_list = TheCity::UserAdminPrivilegeList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + admin_privilege_list = TheCityAdmin::UserAdminPrivilegeList.new({:user_id => user_id}) admin_privilege = admin_privilege_list[0] admin_privilege.title.should == "Designer" @@ -33,8 +33,8 @@ :total_pages => 1, :account_roles => [] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - admin_privilege_list = TheCity::UserAdminPrivilegeList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + admin_privilege_list = TheCityAdmin::UserAdminPrivilegeList.new({:user_id => user_id}) admin_privilege_list.empty?.should be_true end @@ -48,8 +48,8 @@ :total_pages => 1, :account_roles => [FactoryGirl.attributes_for(:user_admin_privilege)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - admin_privilege_list = TheCity::UserAdminPrivilegeList.new({:user_id => user_id, :page => page}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + admin_privilege_list = TheCityAdmin::UserAdminPrivilegeList.new({:user_id => user_id, :page => page}) admin_privilege = admin_privilege_list[0] admin_privilege.title.should == "Designer" @@ -63,8 +63,8 @@ :total_pages => 1, :account_roles => [FactoryGirl.attributes_for(:user_admin_privilege)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - admin_privilege_list = TheCity::UserAdminPrivilegeList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + admin_privilege_list = TheCityAdmin::UserAdminPrivilegeList.new({:user_id => user_id}) admin_privileges = [] admin_privilege_list.each { |admin_privilege| admin_privileges << admin_privilege.title } @@ -79,8 +79,8 @@ :total_pages => 1, :account_roles => [FactoryGirl.attributes_for(:user_admin_privilege)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - admin_privilege_list = TheCity::UserAdminPrivilegeList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + admin_privilege_list = TheCityAdmin::UserAdminPrivilegeList.new({:user_id => user_id}) admin_privileges = admin_privilege_list.collect { |admin_privilege| admin_privilege.title } admin_privileges.should == ["Designer"] diff --git a/spec/api/user_family_list_spec.rb b/spec/api/user_family_list_spec.rb index 4e39980..5f4ee8c 100644 --- a/spec/api/user_family_list_spec.rb +++ b/spec/api/user_family_list_spec.rb @@ -18,8 +18,8 @@ :total_pages => 1, :family_members => [FactoryGirl.attributes_for(:user_family_member)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - family_list = TheCity::UserFamilyList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + family_list = TheCityAdmin::UserFamilyList.new({:user_id => user_id}) family = family_list[0] family.name.should == "Pastor Sam Shepherd" @@ -33,8 +33,8 @@ :total_pages => 1, :family_members => [] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - family_list = TheCity::UserFamilyList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + family_list = TheCityAdmin::UserFamilyList.new({:user_id => user_id}) family_list.empty?.should be_true end @@ -48,8 +48,8 @@ :total_pages => 1, :family_members => [FactoryGirl.attributes_for(:user_family_member)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - family_list = TheCity::UserFamilyList.new({:user_id => user_id, :page => page}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + family_list = TheCityAdmin::UserFamilyList.new({:user_id => user_id, :page => page}) family = family_list[0] family.name.should == "Pastor Sam Shepherd" @@ -63,8 +63,8 @@ :total_pages => 1, :family_members => [FactoryGirl.attributes_for(:user_family_member)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - family_list = TheCity::UserFamilyList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + family_list = TheCityAdmin::UserFamilyList.new({:user_id => user_id}) family_members = [] family_list.each { |family| family_members << family.name } @@ -79,8 +79,8 @@ :total_pages => 1, :family_members => [FactoryGirl.attributes_for(:user_family_member)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - family_list = TheCity::UserFamilyList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + family_list = TheCityAdmin::UserFamilyList.new({:user_id => user_id}) family_members = family_list.collect { |family| family.name } family_members.should == ["Pastor Sam Shepherd"] diff --git a/spec/api/user_invitation_list_spec.rb b/spec/api/user_invitation_list_spec.rb index 808deb4..849f44f 100644 --- a/spec/api/user_invitation_list_spec.rb +++ b/spec/api/user_invitation_list_spec.rb @@ -18,8 +18,8 @@ :total_pages => 1, :invitations => [FactoryGirl.attributes_for(:user_invitation)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - invitation_list = TheCity::UserInvitationList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + invitation_list = TheCityAdmin::UserInvitationList.new({:user_id => user_id}) invitation = invitation_list[0] invitation.source.should == "API Invite | Group A (17543) on 2012-02-06 at 16:54" @@ -33,8 +33,8 @@ :total_pages => 1, :invitations => [] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - invitation_list = TheCity::UserInvitationList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + invitation_list = TheCityAdmin::UserInvitationList.new({:user_id => user_id}) invitation_list.empty?.should be_true end @@ -48,8 +48,8 @@ :total_pages => 1, :invitations => [FactoryGirl.attributes_for(:user_invitation)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - invitation_list = TheCity::UserInvitationList.new({:user_id => user_id, :page => 2}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + invitation_list = TheCityAdmin::UserInvitationList.new({:user_id => user_id, :page => 2}) invitation = invitation_list[0] invitation.source.should == "API Invite | Group A (17543) on 2012-02-06 at 16:54" @@ -63,8 +63,8 @@ :total_pages => 1, :invitations => [FactoryGirl.attributes_for(:user_invitation)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - invitation_list = TheCity::UserInvitationList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + invitation_list = TheCityAdmin::UserInvitationList.new({:user_id => user_id}) invitations = [] invitation_list.each { |invitation| invitations << invitation.source } @@ -79,8 +79,8 @@ :total_pages => 1, :invitations => [FactoryGirl.attributes_for(:user_invitation)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - invitation_list = TheCity::UserInvitationList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + invitation_list = TheCityAdmin::UserInvitationList.new({:user_id => user_id}) invitations = invitation_list.collect { |invitation| invitation.source } invitations.should == ["API Invite | Group A (17543) on 2012-02-06 at 16:54"] diff --git a/spec/api/user_list_spec.rb b/spec/api/user_list_spec.rb index a9d4438..50614a9 100644 --- a/spec/api/user_list_spec.rb +++ b/spec/api/user_list_spec.rb @@ -13,8 +13,8 @@ it 'should pass if user list attribute is not specifed' do request_data = FactoryGirl.attributes_for(:user_list).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - user_list = TheCity::UserList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + user_list = TheCityAdmin::UserList.new user_list.names.should == [] end @@ -22,8 +22,8 @@ it 'should pass if user list is empty' do request_data = FactoryGirl.attributes_for(:user_list, :users => []).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - user_list = TheCity::UserList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + user_list = TheCityAdmin::UserList.new user_list.names.should == [] end @@ -35,8 +35,8 @@ :total_pages => 1, :users => [FactoryGirl.attributes_for(:user)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - user_list = TheCity::UserList.new({:page => 2}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + user_list = TheCityAdmin::UserList.new({:page => 2}) user_list.names.should == ["Sam Shepherd"] end @@ -48,8 +48,8 @@ :total_pages => 1, :users => [FactoryGirl.attributes_for(:user)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - user_list = TheCity::UserList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + user_list = TheCityAdmin::UserList.new users = [] user_list.each { |user| users << user.full_name } @@ -63,8 +63,8 @@ :total_pages => 1, :users => [FactoryGirl.attributes_for(:user)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - user_list = TheCity::UserList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + user_list = TheCityAdmin::UserList.new users = user_list.collect { |user| user.full_name } user_list.names.should == ["Sam Shepherd"] diff --git a/spec/api/user_note_list_spec.rb b/spec/api/user_note_list_spec.rb index b1a7517..1162d91 100644 --- a/spec/api/user_note_list_spec.rb +++ b/spec/api/user_note_list_spec.rb @@ -18,8 +18,8 @@ :total_pages => 1, :notes => [FactoryGirl.attributes_for(:user_note)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - note_list = TheCity::UserNoteList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + note_list = TheCityAdmin::UserNoteList.new({:user_id => user_id}) note = note_list[0] note.body.should == "Deaconship is complete" @@ -33,8 +33,8 @@ :total_pages => 1, :notes => [] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - note_list = TheCity::UserNoteList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + note_list = TheCityAdmin::UserNoteList.new({:user_id => user_id}) note_list.empty?.should be_true end @@ -48,8 +48,8 @@ :total_pages => 1, :notes => [FactoryGirl.attributes_for(:user_note)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - note_list = TheCity::UserNoteList.new({:user_id => user_id, :page => page}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + note_list = TheCityAdmin::UserNoteList.new({:user_id => user_id, :page => page}) note = note_list[0] note.body.should == "Deaconship is complete" @@ -63,8 +63,8 @@ :total_pages => 1, :notes => [FactoryGirl.attributes_for(:user_note)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - note_list = TheCity::UserNoteList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + note_list = TheCityAdmin::UserNoteList.new({:user_id => user_id}) notes = [] note_list.each { |note| notes << note.body } @@ -79,8 +79,8 @@ :total_pages => 1, :notes => [FactoryGirl.attributes_for(:user_note)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - note_list = TheCity::UserNoteList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + note_list = TheCityAdmin::UserNoteList.new({:user_id => user_id}) notes = note_list.collect { |note| note.body } notes.should == ["Deaconship is complete"] diff --git a/spec/api/user_process_answer_list_spec.rb b/spec/api/user_process_answer_list_spec.rb index 0ea9849..8a91eea 100644 --- a/spec/api/user_process_answer_list_spec.rb +++ b/spec/api/user_process_answer_list_spec.rb @@ -16,8 +16,8 @@ :total_pages => 1, :answers => [FactoryGirl.attributes_for(:user_process_answer)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - answer_list = TheCity::UserProcessAnswerList.new({:user_id => user_id, :process_id => process_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + answer_list = TheCityAdmin::UserProcessAnswerList.new({:user_id => user_id, :process_id => process_id}) answer = answer_list[0] answer.question_id.should == 316 @@ -34,8 +34,8 @@ :total_pages => 1, :answers => [] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - answer_list = TheCity::UserProcessAnswerList.new({:user_id => user_id, :process_id => process_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + answer_list = TheCityAdmin::UserProcessAnswerList.new({:user_id => user_id, :process_id => process_id}) answer_list.empty?.should be_true end @@ -50,8 +50,8 @@ :current_page => 2, :answers => [FactoryGirl.attributes_for(:user_process_answer)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - answer_list = TheCity::UserProcessAnswerList.new({:user_id => user_id, :page => page}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + answer_list = TheCityAdmin::UserProcessAnswerList.new({:user_id => user_id, :page => page}) answer_list.current_page.should == 2 answer_list.empty?.should be_false @@ -67,8 +67,8 @@ :total_pages => 1, :answers => [FactoryGirl.attributes_for(:user_process_answer)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - answer_list = TheCity::UserProcessAnswerList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + answer_list = TheCityAdmin::UserProcessAnswerList.new({:user_id => user_id}) answers = answer_list.map(&:answer) answers.should == %w(bar) diff --git a/spec/api/user_process_list_spec.rb b/spec/api/user_process_list_spec.rb index 54cdaf9..39ddbb7 100644 --- a/spec/api/user_process_list_spec.rb +++ b/spec/api/user_process_list_spec.rb @@ -17,8 +17,8 @@ :total_pages => 1, :processes => [FactoryGirl.attributes_for(:user_process)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - process_list = TheCity::UserProcessList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + process_list = TheCityAdmin::UserProcessList.new({:user_id => user_id}) process = process_list[0] process.name.should == "Member Process" @@ -32,8 +32,8 @@ :total_pages => 1, :processes => [] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - process_list = TheCity::UserProcessList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + process_list = TheCityAdmin::UserProcessList.new({:user_id => user_id}) process_list.empty?.should be_true end @@ -47,8 +47,8 @@ :total_pages => 1, :processes => [FactoryGirl.attributes_for(:user_process)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - process_list = TheCity::UserProcessList.new({:user_id => user_id, :page => page}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + process_list = TheCityAdmin::UserProcessList.new({:user_id => user_id, :page => page}) process = process_list[0] process.name.should == "Member Process" @@ -62,8 +62,8 @@ :total_pages => 1, :processes => [FactoryGirl.attributes_for(:user_process)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - process_list = TheCity::UserProcessList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + process_list = TheCityAdmin::UserProcessList.new({:user_id => user_id}) processes = [] process_list.each { |process| processes << process.name } @@ -78,8 +78,8 @@ :total_pages => 1, :processes => [FactoryGirl.attributes_for(:user_process)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - process_list = TheCity::UserProcessList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + process_list = TheCityAdmin::UserProcessList.new({:user_id => user_id}) processes = process_list.collect { |process| process.name } processes.should == ["Member Process"] diff --git a/spec/api/user_role_list_spec.rb b/spec/api/user_role_list_spec.rb index e6872e5..004ae4a 100644 --- a/spec/api/user_role_list_spec.rb +++ b/spec/api/user_role_list_spec.rb @@ -18,8 +18,8 @@ :total_pages => 1, :roles => [FactoryGirl.attributes_for(:user_role)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::UserRoleList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + role_list = TheCityAdmin::UserRoleList.new({:user_id => user_id}) role = role_list[0] role.group_name.should == "The Group" @@ -33,8 +33,8 @@ :total_pages => 1, :roles => [] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::UserRoleList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + role_list = TheCityAdmin::UserRoleList.new({:user_id => user_id}) role_list.empty?.should be_true end @@ -48,8 +48,8 @@ :total_pages => 1, :roles => [FactoryGirl.attributes_for(:user_role)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::UserRoleList.new({:user_id => user_id, :page => page}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + role_list = TheCityAdmin::UserRoleList.new({:user_id => user_id, :page => page}) role = role_list[0] role.group_name.should == "The Group" @@ -63,8 +63,8 @@ :total_pages => 1, :roles => [FactoryGirl.attributes_for(:user_role)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::UserRoleList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + role_list = TheCityAdmin::UserRoleList.new({:user_id => user_id}) roles = [] role_list.each { |role| roles << role.group_name } @@ -79,8 +79,8 @@ :total_pages => 1, :roles => [FactoryGirl.attributes_for(:user_role)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - role_list = TheCity::UserRoleList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + role_list = TheCityAdmin::UserRoleList.new({:user_id => user_id}) roles = role_list.collect { |role| role.group_name } roles.should == ["The Group"] diff --git a/spec/api/user_skill_list_spec.rb b/spec/api/user_skill_list_spec.rb index 35af058..881d111 100644 --- a/spec/api/user_skill_list_spec.rb +++ b/spec/api/user_skill_list_spec.rb @@ -18,8 +18,8 @@ :total_pages => 1, :skills => [FactoryGirl.attributes_for(:user_skill)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::UserSkillList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skill_list = TheCityAdmin::UserSkillList.new({:user_id => user_id}) skill = skill_list[0] skill.name.should == "Teaching-Curriculum" @@ -33,8 +33,8 @@ :total_pages => 1, :skills => [] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::UserSkillList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skill_list = TheCityAdmin::UserSkillList.new({:user_id => user_id}) skill_list.empty?.should be_true end @@ -48,8 +48,8 @@ :total_pages => 1, :skills => [FactoryGirl.attributes_for(:user_skill)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::UserSkillList.new({:user_id => user_id, :page => page}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skill_list = TheCityAdmin::UserSkillList.new({:user_id => user_id, :page => page}) skill = skill_list[0] skill.name.should == "Teaching-Curriculum" @@ -63,8 +63,8 @@ :total_pages => 1, :skills => [FactoryGirl.attributes_for(:user_skill)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::UserSkillList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skill_list = TheCityAdmin::UserSkillList.new({:user_id => user_id}) skills = [] skill_list.each { |skill| skills << skill.name } @@ -79,8 +79,8 @@ :total_pages => 1, :skills => [FactoryGirl.attributes_for(:user_skill)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - skill_list = TheCity::UserSkillList.new({:user_id => user_id}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + skill_list = TheCityAdmin::UserSkillList.new({:user_id => user_id}) skills = skill_list.collect { |skill| skill.name } skills.should == ["Teaching-Curriculum"] diff --git a/spec/api/user_spec.rb b/spec/api/user_spec.rb index 2ec647f..1c40f5b 100644 --- a/spec/api/user_spec.rb +++ b/spec/api/user_spec.rb @@ -16,9 +16,9 @@ :total_pages => 1, :users => [FactoryGirl.attributes_for(:user)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - user_list = TheCity::UserList.new + user_list = TheCityAdmin::UserList.new user = user_list[0] user.full_name.should == "Sammy Shepherd" @@ -27,8 +27,8 @@ it 'should pass retrieving a user' do request_data = FactoryGirl.attributes_for(:user).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - user = TheCity::User.load_by_id(123) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + user = TheCityAdmin::User.load_by_id(123) user.full_name.should == "Sammy Shepherd" end diff --git a/spec/api/web_hook_list_spec.rb b/spec/api/web_hook_list_spec.rb index 9169741..bda591b 100644 --- a/spec/api/web_hook_list_spec.rb +++ b/spec/api/web_hook_list_spec.rb @@ -13,8 +13,8 @@ it 'should pass if web_hook list attribute is not specifed' do request_data = FactoryGirl.attributes_for(:web_hook_list).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - web_hook_list = TheCity::WebHookList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + web_hook_list = TheCityAdmin::WebHookList.new web_hook_list.web_hooks.should == [] end @@ -22,8 +22,8 @@ it 'should pass if web_hook list is empty' do request_data = FactoryGirl.attributes_for(:web_hook_list, :web_hooks => []).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - web_hook_list = TheCity::WebHookList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + web_hook_list = TheCityAdmin::WebHookList.new web_hook_list.web_hooks.should == [] end @@ -35,8 +35,8 @@ :total_pages => 1, :web_hooks => [FactoryGirl.attributes_for(:web_hook)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - web_hook_list = TheCity::WebHookList.new({:page => 2}) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + web_hook_list = TheCityAdmin::WebHookList.new({:page => 2}) web_hook_list.web_hooks.should == ["User::create"] end @@ -47,8 +47,8 @@ :total_pages => 1, :web_hooks => [FactoryGirl.attributes_for(:web_hook)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - web_hook_list = TheCity::WebHookList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + web_hook_list = TheCityAdmin::WebHookList.new web_hooks = [] web_hook_list.each { |web_hook| web_hooks << web_hook.name } @@ -62,8 +62,8 @@ :total_pages => 1, :web_hooks => [FactoryGirl.attributes_for(:web_hook)] }).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) - web_hook_list = TheCity::WebHookList.new + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + web_hook_list = TheCityAdmin::WebHookList.new web_hooks = web_hook_list.collect { |web_hook| web_hook.name } web_hook_list.web_hooks.should == ["User::create"] diff --git a/spec/factories/address.rb b/spec/factories/address.rb index 23248f1..b2157cf 100644 --- a/spec/factories/address.rb +++ b/spec/factories/address.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :address, :class => TheCity::Address do + factory :address, :class => TheCityAdmin::Address do city "Sammamish" created_at "04/30/2012 11:54 PM (UTC)" latitude 47.60918 diff --git a/spec/factories/address_list.rb b/spec/factories/address_list.rb index c861e4a..1397dd8 100644 --- a/spec/factories/address_list.rb +++ b/spec/factories/address_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :address_list, :class => TheCity::AddressList do + factory :address_list, :class => TheCityAdmin::AddressList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/checkin.rb b/spec/factories/checkin.rb index 21543d2..b5b60eb 100644 --- a/spec/factories/checkin.rb +++ b/spec/factories/checkin.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :checkin, :class => TheCity::Checkin do + factory :checkin, :class => TheCityAdmin::Checkin do #group {"name" => "Third Grade", "external_id" => nil, "id" => 494538351} checked_out_by_user nil special_instructions "No snacks!" diff --git a/spec/factories/checkin_list.rb b/spec/factories/checkin_list.rb index 09b1e08..fe9a2ca 100644 --- a/spec/factories/checkin_list.rb +++ b/spec/factories/checkin_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :checkin_list, :class => TheCity::CheckinList do + factory :checkin_list, :class => TheCityAdmin::CheckinList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/group.rb b/spec/factories/group.rb index ee9baf3..8d35065 100644 --- a/spec/factories/group.rb +++ b/spec/factories/group.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group, :class => TheCity::Group do + factory :group, :class => TheCityAdmin::Group do name "The Group" admin_url "http://church.onthecity.org/admin/groups/1445" created_at "2009-03-16T03:39:05-07:00" diff --git a/spec/factories/group_address.rb b/spec/factories/group_address.rb index 1b2515f..308631b 100644 --- a/spec/factories/group_address.rb +++ b/spec/factories/group_address.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_address, :class => TheCity::GroupAddress do + factory :group_address, :class => TheCityAdmin::GroupAddress do city "Sammamish" created_at "04/30/2012 11:54 PM (UTC)" latitude 47.60918 diff --git a/spec/factories/group_address_list.rb b/spec/factories/group_address_list.rb index 4c76315..cbf1350 100644 --- a/spec/factories/group_address_list.rb +++ b/spec/factories/group_address_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_address_list, :class => TheCity::GroupAddressList do + factory :group_address_list, :class => TheCityAdmin::GroupAddressList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/group_checkin.rb b/spec/factories/group_checkin.rb index 5c5e5f7..aa0b8bb 100644 --- a/spec/factories/group_checkin.rb +++ b/spec/factories/group_checkin.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_checkin, :class => TheCity::GroupCheckin do + factory :group_checkin, :class => TheCityAdmin::GroupCheckin do #group {"name" => "Third Grade", "external_id" => nil, "id" => 494538351} checked_out_by_user nil special_instructions "No snacks!" diff --git a/spec/factories/group_checkin_list.rb b/spec/factories/group_checkin_list.rb index 42ad1dc..eaf97ed 100644 --- a/spec/factories/group_checkin_list.rb +++ b/spec/factories/group_checkin_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_checkin_list, :class => TheCity::GroupCheckinList do + factory :group_checkin_list, :class => TheCityAdmin::GroupCheckinList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/group_event_attendance.rb b/spec/factories/group_event_attendance.rb index 65f7cd0..8fbf2e9 100644 --- a/spec/factories/group_event_attendance.rb +++ b/spec/factories/group_event_attendance.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_event_attendance, :class => TheCity::GroupEventAttendance do + factory :group_event_attendance, :class => TheCityAdmin::GroupEventAttendance do user "Johnny Smith" created_at "07/29/2012" event_title "9 AM Service" diff --git a/spec/factories/group_event_attendance_list.rb b/spec/factories/group_event_attendance_list.rb index 6b2a5f7..8b7d1d7 100644 --- a/spec/factories/group_event_attendance_list.rb +++ b/spec/factories/group_event_attendance_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_event_attendance_list, :class => TheCity::GroupEventAttendanceList do + factory :group_event_attendance_list, :class => TheCityAdmin::GroupEventAttendanceList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/group_export.rb b/spec/factories/group_export.rb index 46452b1..9174481 100644 --- a/spec/factories/group_export.rb +++ b/spec/factories/group_export.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_export, :class => TheCity::GroupExport do + factory :group_export, :class => TheCityAdmin::GroupExport do created_at "02/06/2012 11:36 PM (EST)" authenticated_s3_url "" id 62706 diff --git a/spec/factories/group_export_list.rb b/spec/factories/group_export_list.rb index 997f6ba..74a440f 100644 --- a/spec/factories/group_export_list.rb +++ b/spec/factories/group_export_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_export_list, :class => TheCity::GroupExportList do + factory :group_export_list, :class => TheCityAdmin::GroupExportList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/group_role.rb b/spec/factories/group_role.rb index 90e6c00..036808b 100644 --- a/spec/factories/group_role.rb +++ b/spec/factories/group_role.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_role, :class => TheCity::GroupRole do + factory :group_role, :class => TheCityAdmin::GroupRole do created_at "04/30/2012" title nil user_api_url "https://api.onthecity.org/users/494335566" diff --git a/spec/factories/group_tag.rb b/spec/factories/group_tag.rb index 33ee196..7e05747 100644 --- a/spec/factories/group_tag.rb +++ b/spec/factories/group_tag.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :group_tag, :class => TheCity::GroupTag do + factory :group_tag, :class => TheCityAdmin::GroupTag do name "Evening" tag_id 130003696 end diff --git a/spec/factories/role.rb b/spec/factories/role.rb index 9f1d746..ad32df7 100644 --- a/spec/factories/role.rb +++ b/spec/factories/role.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :role, :class => TheCity::Role do + factory :role, :class => TheCityAdmin::Role do group_name "Small Group" created_at "06/15/2009" group_api_url "https://api.onthecity.org/groups/1933" diff --git a/spec/factories/role_list.rb b/spec/factories/role_list.rb index 6d7b1e6..839491e 100644 --- a/spec/factories/role_list.rb +++ b/spec/factories/role_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :role_list, :class => TheCity::RoleList do + factory :role_list, :class => TheCityAdmin::RoleList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/skill.rb b/spec/factories/skill.rb index e1d9994..81089a7 100644 --- a/spec/factories/skill.rb +++ b/spec/factories/skill.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :skill, :class => TheCity::Skill do + factory :skill, :class => TheCityAdmin::Skill do id 17166901 name "Welding" created_at "07/03/2012" diff --git a/spec/factories/skill_list.rb b/spec/factories/skill_list.rb index a00beef..2f21527 100644 --- a/spec/factories/skill_list.rb +++ b/spec/factories/skill_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :skill_list, :class => TheCity::SkillList do + factory :skill_list, :class => TheCityAdmin::SkillList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/skilled_user_id_list.rb b/spec/factories/skilled_user_id_list.rb index cbeb0d5..682b8ed 100644 --- a/spec/factories/skilled_user_id_list.rb +++ b/spec/factories/skilled_user_id_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :skilled_user_id_list, :class => TheCity::SkilledUserIdList do + factory :skilled_user_id_list, :class => TheCityAdmin::SkilledUserIdList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/skilled_user_list.rb b/spec/factories/skilled_user_list.rb index 878cba4..7434a81 100644 --- a/spec/factories/skilled_user_list.rb +++ b/spec/factories/skilled_user_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :skilled_user_list, :class => TheCity::SkilledUserList do + factory :skilled_user_list, :class => TheCityAdmin::SkilledUserList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/tag.rb b/spec/factories/tag.rb index 610617d..86d2af0 100644 --- a/spec/factories/tag.rb +++ b/spec/factories/tag.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :tag, :class => TheCity::Tag do + factory :tag, :class => TheCityAdmin::Tag do id 17166901 name "Evening" created_at "07/03/2012" diff --git a/spec/factories/tag_group_list.rb b/spec/factories/tag_group_list.rb index cba2aa3..668e231 100644 --- a/spec/factories/tag_group_list.rb +++ b/spec/factories/tag_group_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :tag_group_list, :class => TheCity::TagGroupList do + factory :tag_group_list, :class => TheCityAdmin::TagGroupList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/tag_list.rb b/spec/factories/tag_list.rb index 412f845..e200451 100644 --- a/spec/factories/tag_list.rb +++ b/spec/factories/tag_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :tag_list, :class => TheCity::TagList do + factory :tag_list, :class => TheCityAdmin::TagList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/terminology.rb b/spec/factories/terminology.rb index fef23eb..4182477 100644 --- a/spec/factories/terminology.rb +++ b/spec/factories/terminology.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :terminology, :class => TheCity::Terminology do + factory :terminology, :class => TheCityAdmin::Terminology do term 'CG' label 'Life' end diff --git a/spec/factories/terminology_list.rb b/spec/factories/terminology_list.rb index 3e199f3..d5a7ebc 100644 --- a/spec/factories/terminology_list.rb +++ b/spec/factories/terminology_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :terminology_list, :class => TheCity::TerminologyList do + factory :terminology_list, :class => TheCityAdmin::TerminologyList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user.rb b/spec/factories/user.rb index 1c92504..4d453ed 100644 --- a/spec/factories/user.rb +++ b/spec/factories/user.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user, :class => TheCity::User do + factory :user, :class => TheCityAdmin::User do api_url "https://api.onthecity.org/users/946060874" updated_at "05/15/2012 07:24 AM (UTC)" last_logged_in "05/16/2012 04:52 AM (UTC)" diff --git a/spec/factories/user_address.rb b/spec/factories/user_address.rb index 26d5c92..2778cb2 100644 --- a/spec/factories/user_address.rb +++ b/spec/factories/user_address.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_address, :class => TheCity::UserAddress do + factory :user_address, :class => TheCityAdmin::UserAddress do city "Seattle" created_at "04/30/2012 08:46 PM (UTC)" latitude 47.64114 diff --git a/spec/factories/user_address_list.rb b/spec/factories/user_address_list.rb index b2e8b1c..efa3008 100644 --- a/spec/factories/user_address_list.rb +++ b/spec/factories/user_address_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_address_list, :class => TheCity::UserAddressList do + factory :user_address_list, :class => TheCityAdmin::UserAddressList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user_admin_privilege.rb b/spec/factories/user_admin_privilege.rb index d93ba21..a726c2c 100644 --- a/spec/factories/user_admin_privilege.rb +++ b/spec/factories/user_admin_privilege.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_admin_privilege, :class => TheCity::UserAdminPrivilege do + factory :user_admin_privilege, :class => TheCityAdmin::UserAdminPrivilege do title "Designer" user_id 452617 user "Dr. Third Eagle" diff --git a/spec/factories/user_admin_privilege_list.rb b/spec/factories/user_admin_privilege_list.rb index cf67497..6573779 100644 --- a/spec/factories/user_admin_privilege_list.rb +++ b/spec/factories/user_admin_privilege_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_admin_privilege_list, :class => TheCity::UserAdminPrivilegeList do + factory :user_admin_privilege_list, :class => TheCityAdmin::UserAdminPrivilegeList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user_barcode.rb b/spec/factories/user_barcode.rb index f3d29b6..f8a0996 100644 --- a/spec/factories/user_barcode.rb +++ b/spec/factories/user_barcode.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_barcode, :class => TheCity::UserBarcode do + factory :user_barcode, :class => TheCityAdmin::UserBarcode do barcode "234234234" id 1012338309 created_at "05/16/2012" diff --git a/spec/factories/user_family_list.rb b/spec/factories/user_family_list.rb index eb90f75..544e4af 100644 --- a/spec/factories/user_family_list.rb +++ b/spec/factories/user_family_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_family_list, :class => TheCity::UserFamilyList do + factory :user_family_list, :class => TheCityAdmin::UserFamilyList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user_family_member.rb b/spec/factories/user_family_member.rb index 612e070..1a1fb90 100644 --- a/spec/factories/user_family_member.rb +++ b/spec/factories/user_family_member.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_family_member, :class => TheCity::UserFamilyMember do + factory :user_family_member, :class => TheCityAdmin::UserFamilyMember do name "Pastor Sam Shepherd" admin_url "http://local.devthecity.org:3000/admin/users/946060874" external_id_1 nil diff --git a/spec/factories/user_invitation.rb b/spec/factories/user_invitation.rb index 4275683..6659364 100644 --- a/spec/factories/user_invitation.rb +++ b/spec/factories/user_invitation.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_invitation, :class => TheCity::UserInvitation do + factory :user_invitation, :class => TheCityAdmin::UserInvitation do created_at "02/06/2012" pending_approval false group_id 17543 diff --git a/spec/factories/user_invitation_list.rb b/spec/factories/user_invitation_list.rb index cd50a49..ddda3af 100644 --- a/spec/factories/user_invitation_list.rb +++ b/spec/factories/user_invitation_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_invitation_list, :class => TheCity::UserInvitationList do + factory :user_invitation_list, :class => TheCityAdmin::UserInvitationList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user_list.rb b/spec/factories/user_list.rb index 0a70623..c604d1d 100644 --- a/spec/factories/user_list.rb +++ b/spec/factories/user_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_list, :class => TheCity::UserList do + factory :user_list, :class => TheCityAdmin::UserList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user_note.rb b/spec/factories/user_note.rb index e502e71..beeeea6 100644 --- a/spec/factories/user_note.rb +++ b/spec/factories/user_note.rb @@ -2,7 +2,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_note, :class => TheCity::UserNote do + factory :user_note, :class => TheCityAdmin::UserNote do created_at "05/08/2012" body "Deaconship is complete" author "Pastor Sam Shepherd" diff --git a/spec/factories/user_note_list.rb b/spec/factories/user_note_list.rb index 4646d01..99a7191 100644 --- a/spec/factories/user_note_list.rb +++ b/spec/factories/user_note_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_note_list, :class => TheCity::UserNoteList do + factory :user_note_list, :class => TheCityAdmin::UserNoteList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user_process.rb b/spec/factories/user_process.rb index bec2d33..a556fa0 100644 --- a/spec/factories/user_process.rb +++ b/spec/factories/user_process.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_process, :class => TheCity::UserProcess do + factory :user_process, :class => TheCityAdmin::UserProcess do name "Member Process" id 241832976 state "complete" diff --git a/spec/factories/user_process_answer.rb b/spec/factories/user_process_answer.rb index a82798e..e03e4d4 100644 --- a/spec/factories/user_process_answer.rb +++ b/spec/factories/user_process_answer.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_process_answer, :class => TheCity::UserProcessAnswer do + factory :user_process_answer, :class => TheCityAdmin::UserProcessAnswer do question_id 316 question "Do you like foo?" answer "bar" diff --git a/spec/factories/user_process_answer_list.rb b/spec/factories/user_process_answer_list.rb index 4c1727e..ed06fa4 100644 --- a/spec/factories/user_process_answer_list.rb +++ b/spec/factories/user_process_answer_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_process_answer_list, :class => TheCity::UserProcessAnswerList do + factory :user_process_answer_list, :class => TheCityAdmin::UserProcessAnswerList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user_process_list.rb b/spec/factories/user_process_list.rb index 91a82d6..58249cd 100644 --- a/spec/factories/user_process_list.rb +++ b/spec/factories/user_process_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_process_list, :class => TheCity::UserProcessList do + factory :user_process_list, :class => TheCityAdmin::UserProcessList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user_role.rb b/spec/factories/user_role.rb index 8379b95..cd98caa 100644 --- a/spec/factories/user_role.rb +++ b/spec/factories/user_role.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_role, :class => TheCity::UserRole do + factory :user_role, :class => TheCityAdmin::UserRole do group_name "The Group" created_at "05/11/2009" group_api_url "https://api.onthecity.org/admin/groups/1245" diff --git a/spec/factories/user_role_list.rb b/spec/factories/user_role_list.rb index 0f5dfbd..a8732db 100644 --- a/spec/factories/user_role_list.rb +++ b/spec/factories/user_role_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_role_list, :class => TheCity::UserRoleList do + factory :user_role_list, :class => TheCityAdmin::UserRoleList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/user_skill.rb b/spec/factories/user_skill.rb index 09397df..f42caac 100644 --- a/spec/factories/user_skill.rb +++ b/spec/factories/user_skill.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_skill, :class => TheCity::UserSkill do + factory :user_skill, :class => TheCityAdmin::UserSkill do name "Teaching-Curriculum" skill_id 1046429013 end diff --git a/spec/factories/user_skill_list.rb b/spec/factories/user_skill_list.rb index 9bb4417..f5d699f 100644 --- a/spec/factories/user_skill_list.rb +++ b/spec/factories/user_skill_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :user_skill_list, :class => TheCity::UserSkillList do + factory :user_skill_list, :class => TheCityAdmin::UserSkillList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/factories/web_hook.rb b/spec/factories/web_hook.rb index 508a252..561c55b 100644 --- a/spec/factories/web_hook.rb +++ b/spec/factories/web_hook.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :web_hook, :class => TheCity::WebHook do + factory :web_hook, :class => TheCityAdmin::WebHook do id 1 event 'create' object 'User' diff --git a/spec/factories/web_hook_list.rb b/spec/factories/web_hook_list.rb index 3280d56..41f939f 100644 --- a/spec/factories/web_hook_list.rb +++ b/spec/factories/web_hook_list.rb @@ -1,7 +1,7 @@ module TheCityAdmin FactoryGirl.define do - factory :web_hook_list, :class => TheCity::WebHookList do + factory :web_hook_list, :class => TheCityAdmin::WebHookList do total_entries 0 total_pages 0 per_page 15 diff --git a/spec/readers/api_reader_spec.rb b/spec/readers/api_reader_spec.rb index 6f0fb4e..83014bd 100644 --- a/spec/readers/api_reader_spec.rb +++ b/spec/readers/api_reader_spec.rb @@ -1,11 +1,11 @@ require File.dirname(__FILE__) + '/../spec_helper' -describe TheCity::ApiReader do +describe TheCityAdmin::ApiReader do it "should include City headers" do headers = "X-City-RateLimit-Limit-By-Ip: 2200\r\nX-City-RateLimit-Remaining-By-Ip: 2199\r\n" - TheCity.stub(:admin_request).and_return(TheCityResponse.new(200, {}.to_json, headers)) - reader = TheCity::ApiReader.new + TheCityAdmin.stub(:admin_request).and_return(TheCityResponse.new(200, {}.to_json, headers)) + reader = TheCityAdmin::ApiReader.new reader.load_feed.should == {} reader.headers['X-City-RateLimit-Limit-By-Ip'].should == '2200' reader.headers['X-City-RateLimit-Remaining-By-Ip'].should == '2199' @@ -16,8 +16,8 @@ "X-City-RateLimit-Remaining-By-Ip: 1987", "X-City-RateLimit-Limit-By-Account: 3000", "X-City-RateLimit-Remaining-By-Account: 1561"].join("\r\n") - TheCity.stub(:admin_request).and_return(TheCityResponse.new(200, {}.to_json, headers)) - reader = TheCity::ApiReader.new + TheCityAdmin.stub(:admin_request).and_return(TheCityResponse.new(200, {}.to_json, headers)) + reader = TheCityAdmin::ApiReader.new reader.load_feed.should == {} reader.rate_limit.should == 2000 reader.rate_limit_remaining.should == 1561 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 1464483..56539a4 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,7 +3,7 @@ # # Author:: Wes Hays # Link:: https://github.com/weshays/admin-api-ruby -# Package:: TheCity::Admin +# Package:: TheCityAdmin::Admin require File.expand_path( File.dirname(__FILE__) + '/../lib/the_city_admin.rb') @@ -27,5 +27,5 @@ def simulate_connection_to_server - @the_city = TheCity::AdminApi.new('cf2903151e3213e66fd8080c7d8b65b1d6ccdd31', '5c88b32edda7653c') + @the_city = TheCityAdmin::AdminApi.new('cf2903151e3213e66fd8080c7d8b65b1d6ccdd31', '5c88b32edda7653c') end \ No newline at end of file diff --git a/spec/writers/tag_writer_spec.rb b/spec/writers/tag_writer_spec.rb index cbb47ee..cf4b823 100644 --- a/spec/writers/tag_writer_spec.rb +++ b/spec/writers/tag_writer_spec.rb @@ -3,9 +3,9 @@ describe 'TagWriter' do it 'should show connection error messages if server cannot be reached' do - TheCity.stub(:admin_request) { raise TheCityExceptions::UnableToConnectToTheCity.new('Unable to connect to server') } + TheCityAdmin.stub(:admin_request) { raise TheCityExceptions::UnableToConnectToTheCity.new('Unable to connect to server') } tag_data = {:name => 'Cool People'} - tag = TheCity::Tag.new(tag_data) + tag = TheCityAdmin::Tag.new(tag_data) tag.id.should be_nil tag.save.should === false tag.id.should be_nil @@ -15,9 +15,9 @@ it 'should save if all data is valid for new tag' do request_data = FactoryGirl.attributes_for(:tag, {:id => 12345}).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) tag_data = {:name => 'Cool People'} - tag = TheCity::Tag.new(tag_data) + tag = TheCityAdmin::Tag.new(tag_data) tag.id.should be_nil tag.save.should === true tag.id.should == 12345 @@ -25,9 +25,9 @@ it 'should show error messages if save fails for new tag' do - TheCity.stub(:admin_request) { raise TheCityExceptions::TheCityResponseError.new('tag already exists') } + TheCityAdmin.stub(:admin_request) { raise TheCityExceptions::TheCityResponseError.new('tag already exists') } tag_data = {:name => 'Cool People'} - tag = TheCity::Tag.new(tag_data) + tag = TheCityAdmin::Tag.new(tag_data) tag.id.should be_nil tag.save.should === false tag.id.should be_nil @@ -37,9 +37,9 @@ it 'should save if all data is valid for existing tag' do request_data = FactoryGirl.attributes_for(:tag, {:id => 12345}).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) tag_data = FactoryGirl.attributes_for(:tag, {:id => 12345}) - tag = TheCity::Tag.new(tag_data) + tag = TheCityAdmin::Tag.new(tag_data) tag.id.should == 12345 tag.save.should === true tag.id.should == 12345 @@ -47,9 +47,9 @@ it 'should show error messages if save fails for existing tag' do - TheCity.stub(:admin_request) { raise TheCityExceptions::TheCityResponseError.new('something bad happened') } + TheCityAdmin.stub(:admin_request) { raise TheCityExceptions::TheCityResponseError.new('something bad happened') } tag_data = FactoryGirl.attributes_for(:tag, {:id => 12345}) - tag = TheCity::Tag.new(tag_data) + tag = TheCityAdmin::Tag.new(tag_data) tag.id.should == 12345 tag.save.should === false tag.id.should == 12345 @@ -58,9 +58,9 @@ it 'should delete if data ID exists for the existing tag' do - TheCity.stub(:admin_request).and_return( TheCityResponse.new(204, '{}') ) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(204, '{}') ) tag_data = FactoryGirl.attributes_for(:tag, {:id => 12345}) - tag = TheCity::Tag.new(tag_data) + tag = TheCityAdmin::Tag.new(tag_data) tag.is_deleted?.should === false tag.delete tag.is_deleted?.should === true @@ -68,9 +68,9 @@ it 'should show error messages if data fails to be deleted' do - TheCity.stub(:admin_request) { raise TheCityExceptions::TheCityResponseError.new('something bad happened') } + TheCityAdmin.stub(:admin_request) { raise TheCityExceptions::TheCityResponseError.new('something bad happened') } tag_data = FactoryGirl.attributes_for(:tag, {:id => 12345}) - tag = TheCity::Tag.new(tag_data) + tag = TheCityAdmin::Tag.new(tag_data) tag.is_deleted?.should === false tag.delete tag.is_deleted?.should === false diff --git a/spec/writers/user_writer_spec.rb b/spec/writers/user_writer_spec.rb index 7399438..c8bb1f9 100644 --- a/spec/writers/user_writer_spec.rb +++ b/spec/writers/user_writer_spec.rb @@ -3,9 +3,9 @@ describe 'UserWriter' do it 'should show connection error messages if server cannot be reached' do - TheCity.stub(:admin_request) { raise TheCityExceptions::UnableToConnectToTheCity.new('Unable to connect to server') } + TheCityAdmin.stub(:admin_request) { raise TheCityExceptions::UnableToConnectToTheCity.new('Unable to connect to server') } user_data = FactoryGirl.attributes_for(:user, {:id => nil}) - user = TheCity::User.new(user_data) + user = TheCityAdmin::User.new(user_data) user.id.should be_nil user.save.should === false user.id.should be_nil @@ -15,9 +15,9 @@ it 'should save if all data is valid for new user' do request_data = FactoryGirl.attributes_for(:user, {:id => 12345}).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) user_data = FactoryGirl.attributes_for(:user, {:id => nil}) - user = TheCity::User.new(user_data) + user = TheCityAdmin::User.new(user_data) user.id.should be_nil user.save.should === true user.id.should == 12345 @@ -25,9 +25,9 @@ it 'should show error messages if save fails for new user' do - TheCity.stub(:admin_request) { raise TheCityExceptions::TheCityResponseError.new('email address already exists') } + TheCityAdmin.stub(:admin_request) { raise TheCityExceptions::TheCityResponseError.new('email address already exists') } user_data = FactoryGirl.attributes_for(:user, {:id => nil}) - user = TheCity::User.new(user_data) + user = TheCityAdmin::User.new(user_data) user.id.should be_nil user.save.should === false user.id.should be_nil @@ -37,9 +37,9 @@ it 'should save if all data is valid for existing user' do request_data = FactoryGirl.attributes_for(:user, {:id => 12345}).to_json - TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) ) user_data = FactoryGirl.attributes_for(:user, {:id => 12345}) - user = TheCity::User.new(user_data) + user = TheCityAdmin::User.new(user_data) user.id.should == 12345 user.save.should === true user.id.should == 12345 @@ -47,9 +47,9 @@ it 'should show error messages if save fails for existing user' do - TheCity.stub(:admin_request) { raise TheCityExceptions::TheCityResponseError.new('something bad happened') } + TheCityAdmin.stub(:admin_request) { raise TheCityExceptions::TheCityResponseError.new('something bad happened') } user_data = FactoryGirl.attributes_for(:user, {:id => 12345}) - user = TheCity::User.new(user_data) + user = TheCityAdmin::User.new(user_data) user.id.should == 12345 user.save.should === false user.id.should == 12345 @@ -58,9 +58,9 @@ it 'should delete if data ID exists for the existing user' do - TheCity.stub(:admin_request).and_return( TheCityResponse.new(204, '{}') ) + TheCityAdmin.stub(:admin_request).and_return( TheCityResponse.new(204, '{}') ) user_data = FactoryGirl.attributes_for(:user, {:id => 12345}) - user = TheCity::User.new(user_data) + user = TheCityAdmin::User.new(user_data) user.is_deleted?.should === false user.delete user.is_deleted?.should === true @@ -68,9 +68,9 @@ it 'should show error messages if data fails to be deleted' do - TheCity.stub(:admin_request) { raise TheCityExceptions::TheCityResponseError.new('something bad happened') } + TheCityAdmin.stub(:admin_request) { raise TheCityExceptions::TheCityResponseError.new('something bad happened') } user_data = FactoryGirl.attributes_for(:user, {:id => 12345}) - user = TheCity::User.new(user_data) + user = TheCityAdmin::User.new(user_data) user.is_deleted?.should === false user.delete user.is_deleted?.should === false