the-city-admin 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.gitignore +2 -0
- data/.pryrc +3 -0
- data/.rspec +1 -1
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +12 -0
- data/Gemfile +6 -3
- data/Gemfile.lock +58 -28
- data/README.rdoc +4 -1
- data/examples/barcodes_checkins.rb +37 -14
- data/lib/api/checkin.rb +1 -1
- data/lib/api/checkin_list.rb +0 -1
- data/lib/api/checkin_list_by_callboard_number.rb +61 -0
- data/lib/api/checkin_list_by_pager_number.rb +61 -0
- data/lib/api/group_checkin.rb +13 -2
- data/lib/api/group_checkin_event.rb +24 -0
- data/lib/api/group_checkin_events_list.rb +64 -0
- data/lib/api/group_checkin_list.rb +2 -2
- data/lib/readers/api_reader.rb +9 -2
- data/lib/readers/checkin_list_by_callboard_number_reader.rb +27 -0
- data/lib/readers/checkin_list_by_pager_number_reader.rb +27 -0
- data/lib/readers/checkin_list_reader.rb +2 -2
- data/lib/readers/group_checkin_events_list_reader.rb +28 -0
- data/lib/readers/group_checkin_reader.rb +32 -0
- data/lib/readers/group_list_reader.rb +0 -1
- data/spec/api/checkin_list_by_callboard_number_spec.rb +91 -0
- data/spec/api/checkin_list_by_pager_number_spec.rb +98 -0
- data/spec/api/checkin_list_spec.rb +91 -0
- data/spec/api/group_address_list_spec.rb +1 -1
- data/spec/api/group_address_spec.rb +2 -3
- data/spec/api/group_checkin_events_list_spec.rb +91 -0
- data/spec/api/group_checkin_list_spec.rb +1 -1
- data/spec/api/group_checkin_spec.rb +12 -0
- data/spec/api/group_event_attendance_list_spec.rb +1 -1
- data/spec/api/group_export_spec.rb +1 -5
- data/spec/api/group_invitation_list_spec.rb +6 -6
- data/spec/api/group_invitation_spec.rb +1 -5
- data/spec/api/group_list_spec.rb +72 -7
- data/spec/api/group_role_list_spec.rb +6 -6
- data/spec/api/group_role_spec.rb +1 -5
- data/spec/api/group_spec.rb +1 -5
- data/spec/api/group_tag_list_spec.rb +6 -6
- data/spec/api/group_tag_spec.rb +1 -5
- data/spec/api/metric_list_spec.rb +6 -6
- data/spec/api/metric_measurement_list_spec.rb +6 -6
- data/spec/api/metric_measurement_spec.rb +2 -2
- data/spec/api/metric_spec.rb +2 -2
- data/spec/api/role_list_spec.rb +1 -1
- data/spec/api/role_spec.rb +2 -2
- data/spec/api/skill_list_spec.rb +1 -1
- data/spec/api/skilled_user_id_list_spec.rb +1 -1
- data/spec/api/skilled_user_list_spec.rb +1 -1
- data/spec/api/tag_group_list_spec.rb +1 -1
- data/spec/api/tag_list_spec.rb +1 -1
- data/spec/api/tag_spec.rb +2 -2
- data/spec/api/terminology_list_spec.rb +1 -1
- data/spec/api/terminology_spec.rb +2 -2
- data/spec/api/user_address_list_spec.rb +1 -1
- data/spec/api/user_address_spec.rb +2 -2
- data/spec/api/user_admin_privilege_list_spec.rb +1 -1
- data/spec/api/user_admin_privilege_spec.rb +2 -2
- data/spec/api/user_barcode_spec.rb +2 -2
- data/spec/api/user_family_list_spec.rb +1 -1
- data/spec/api/user_family_member_spec.rb +2 -2
- data/spec/api/user_invitation_list_spec.rb +1 -1
- data/spec/api/user_invitation_spec.rb +2 -2
- data/spec/api/user_list_spec.rb +1 -1
- data/spec/api/user_note_list_spec.rb +1 -1
- data/spec/api/user_note_spec.rb +2 -2
- data/spec/api/user_process_answer_list_spec.rb +1 -1
- data/spec/api/user_process_list_spec.rb +1 -1
- data/spec/api/user_process_spec.rb +2 -2
- data/spec/api/user_role_list_spec.rb +1 -1
- data/spec/api/user_role_spec.rb +2 -2
- data/spec/api/user_skill_list_spec.rb +1 -1
- data/spec/api/user_skill_spec.rb +2 -2
- data/spec/api/user_spec.rb +1 -2
- data/spec/api/web_hook_list_spec.rb +1 -1
- data/spec/api/web_hook_spec.rb +2 -2
- data/spec/factories/group_checkin_event.rb +20 -0
- data/spec/factories/group_checkin_events_list.rb +14 -0
- data/spec/factories/group_list.rb +13 -0
- data/spec/functional/the_city_admin_spec.rb +5 -5
- data/spec/readers/api_reader_spec.rb +3 -5
- data/spec/readers/user_reader_spec.rb +1 -1
- data/spec/spec_helper.rb +9 -7
- data/thecity_admin_api.gemspec +6 -5
- metadata +51 -8
- data/.autotest +0 -9
- data/.rvmrc +0 -1
@@ -3,7 +3,7 @@ require File.join(Dir.pwd, 'spec', 'spec_helper')
|
|
3
3
|
describe 'UserProces' do
|
4
4
|
|
5
5
|
before do
|
6
|
-
simulate_connection_to_server
|
6
|
+
#simulate_connection_to_server
|
7
7
|
end
|
8
8
|
|
9
9
|
after do
|
@@ -11,7 +11,7 @@ describe 'UserProces' do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
|
14
|
-
|
14
|
+
|
15
15
|
|
16
16
|
|
17
17
|
end
|
data/spec/api/user_role_spec.rb
CHANGED
@@ -3,7 +3,7 @@ require File.join(Dir.pwd, 'spec', 'spec_helper')
|
|
3
3
|
describe 'UserRole' do
|
4
4
|
|
5
5
|
before do
|
6
|
-
simulate_connection_to_server
|
6
|
+
#simulate_connection_to_server
|
7
7
|
end
|
8
8
|
|
9
9
|
after do
|
@@ -11,7 +11,7 @@ describe 'UserRole' do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
|
14
|
-
|
14
|
+
|
15
15
|
|
16
16
|
end
|
17
17
|
|
data/spec/api/user_skill_spec.rb
CHANGED
@@ -3,7 +3,7 @@ require File.join(Dir.pwd, 'spec', 'spec_helper')
|
|
3
3
|
describe 'UserSkill' do
|
4
4
|
|
5
5
|
before do
|
6
|
-
simulate_connection_to_server
|
6
|
+
#simulate_connection_to_server
|
7
7
|
end
|
8
8
|
|
9
9
|
after do
|
@@ -11,7 +11,7 @@ describe 'UserSkill' do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
|
14
|
-
|
14
|
+
|
15
15
|
|
16
16
|
|
17
17
|
end
|
data/spec/api/user_spec.rb
CHANGED
@@ -3,7 +3,7 @@ require File.join(Dir.pwd, 'spec', 'spec_helper')
|
|
3
3
|
describe 'User' do
|
4
4
|
|
5
5
|
before do
|
6
|
-
simulate_connection_to_server
|
6
|
+
##simulate_connection_to_server
|
7
7
|
end
|
8
8
|
|
9
9
|
after do
|
@@ -19,7 +19,6 @@ describe 'User' do
|
|
19
19
|
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
20
20
|
|
21
21
|
user_list = TheCity::UserList.new
|
22
|
-
|
23
22
|
user = user_list[0]
|
24
23
|
user.full_name.should == "Sammy Shepherd"
|
25
24
|
end
|
data/spec/api/web_hook_spec.rb
CHANGED
@@ -3,7 +3,7 @@ require File.join(Dir.pwd, 'spec', 'spec_helper')
|
|
3
3
|
describe 'WebHook' do
|
4
4
|
|
5
5
|
before do
|
6
|
-
simulate_connection_to_server
|
6
|
+
#simulate_connection_to_server
|
7
7
|
end
|
8
8
|
|
9
9
|
after do
|
@@ -11,7 +11,7 @@ describe 'WebHook' do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
|
14
|
-
|
14
|
+
|
15
15
|
|
16
16
|
|
17
17
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module TheCity
|
2
|
+
FactoryGirl.define do
|
3
|
+
|
4
|
+
factory :group_checkin_event, :class => TheCity::GroupCheckinEvent do
|
5
|
+
id 123456789
|
6
|
+
group_id 587598132
|
7
|
+
group_name 'Ballard Childrens ministry'
|
8
|
+
title '5 PM Service'
|
9
|
+
starting_at '07/10/2012 12:00 AM (UTC)'
|
10
|
+
ending_at '07/10/2012 01:30 AM (UTC)'
|
11
|
+
shadow_event_ids []
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module TheCity
|
2
|
+
FactoryGirl.define do
|
3
|
+
|
4
|
+
factory :group_checkin_events_list, :class => TheCity::GroupCheckinEventsList do
|
5
|
+
total_entries 0
|
6
|
+
total_pages 0
|
7
|
+
per_page 15
|
8
|
+
current_page 1
|
9
|
+
target_date Date.today.strftime('%Y-%m-%d')
|
10
|
+
#checkin_events {}
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
@@ -3,17 +3,17 @@ require File.join(Dir.pwd, 'spec', 'spec_helper')
|
|
3
3
|
describe 'AdminApi' do
|
4
4
|
|
5
5
|
before do
|
6
|
-
simulate_connection_to_server
|
6
|
+
#simulate_connection_to_server
|
7
7
|
end
|
8
8
|
|
9
9
|
after do
|
10
10
|
|
11
11
|
end
|
12
12
|
|
13
|
-
it 'should get a list of users without any paramters'
|
14
|
-
it 'should get a list of users with parameters'
|
15
|
-
it 'should get a user count without any paramters'
|
16
|
-
it 'should get a user count with the specified paramters'
|
13
|
+
# it 'should get a list of users without any paramters'
|
14
|
+
# it 'should get a list of users with parameters'
|
15
|
+
# it 'should get a user count without any paramters'
|
16
|
+
# it 'should get a user count with the specified paramters'
|
17
17
|
|
18
18
|
end
|
19
19
|
|
@@ -3,7 +3,7 @@ require File.dirname(__FILE__) + '/../spec_helper'
|
|
3
3
|
describe TheCity::ApiReader do
|
4
4
|
|
5
5
|
it "should include City headers" do
|
6
|
-
headers =
|
6
|
+
headers = {'X-City-RateLimit-Limit-By-Ip' => '2200', 'X-City-RateLimit-Remaining-By-Ip' => '2199'}
|
7
7
|
TheCity.stub(:admin_request).and_return(TheCityResponse.new(200, {}.to_json, headers))
|
8
8
|
reader = TheCity::ApiReader.new
|
9
9
|
reader.load_feed.should == {}
|
@@ -12,10 +12,8 @@ describe TheCity::ApiReader do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should include convenience methods for reading rate limit data" do
|
15
|
-
headers =
|
16
|
-
|
17
|
-
"X-City-RateLimit-Limit-By-Account: 3000",
|
18
|
-
"X-City-RateLimit-Remaining-By-Account: 1561"].join("\r\n")
|
15
|
+
headers = {'X-City-RateLimit-Limit-By-Ip' => '2000', 'X-City-RateLimit-Remaining-By-Ip' => '1987',
|
16
|
+
'X-City-RateLimit-Limit-By-Account' => '3000', 'X-City-RateLimit-Remaining-By-Account' => '1561'}
|
19
17
|
TheCity.stub(:admin_request).and_return(TheCityResponse.new(200, {}.to_json, headers))
|
20
18
|
reader = TheCity::ApiReader.new
|
21
19
|
reader.load_feed.should == {}
|
data/spec/spec_helper.rb
CHANGED
@@ -1,17 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
# Author:: Wes Hays <weshays@gbdev.com>
|
5
|
-
# Link:: https://github.com/weshays/admin-api-ruby
|
6
|
-
# Package:: TheCity::Admin
|
1
|
+
require 'simplecov'
|
2
|
+
require 'coveralls'
|
3
|
+
Coveralls.wear!
|
7
4
|
|
5
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
6
|
+
SimpleCov::Formatter::HTMLFormatter,
|
7
|
+
Coveralls::SimpleCov::Formatter
|
8
|
+
]
|
9
|
+
SimpleCov.start
|
8
10
|
|
9
11
|
require File.expand_path( File.dirname(__FILE__) + '/../lib/the_city_admin.rb')
|
10
12
|
|
11
13
|
require 'rubygems'
|
12
14
|
require 'rspec'
|
13
|
-
require 'ruby-debug'
|
14
15
|
require 'date'
|
16
|
+
require 'pry'
|
15
17
|
|
16
18
|
require 'factory_girl'
|
17
19
|
Dir.glob(File.dirname(__FILE__) + "/factories/*").each { |f| require f }
|
data/thecity_admin_api.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
PROJECT_GEM = 'the-city-admin'
|
3
|
-
PROJECT_GEM_VERSION = '0.7.
|
3
|
+
PROJECT_GEM_VERSION = '0.7.1'
|
4
4
|
|
5
5
|
s.name = PROJECT_GEM
|
6
6
|
s.version = PROJECT_GEM_VERSION
|
@@ -9,13 +9,14 @@ Gem::Specification.new do |s|
|
|
9
9
|
|
10
10
|
s.homepage = 'https://github.com/thecity/thecity-admin-ruby'
|
11
11
|
s.rubyforge_project = 'Project on www.github.com'
|
12
|
-
s.authors = ['Wes Hays']
|
13
|
-
s.email = 'wes@onthecity.org'
|
12
|
+
s.authors = ['Wes Hays', 'Jason Hagglund']
|
13
|
+
s.email = ['wes@onthecity.org', 'jasonh@onthecity.org']
|
14
14
|
|
15
|
-
s.summary = 'Ruby gem/plugin to interact with The City Admin API (https://api.
|
16
|
-
s.description = 'Ruby gem/plugin to interact with The City Admin API (https://api.
|
15
|
+
s.summary = 'Ruby gem/plugin to interact with The City Admin API (https://api.onthecity.org).'
|
16
|
+
s.description = 'Ruby gem/plugin to interact with The City Admin API (https://api.onthecity.org). Check out the project on github for more detail.'
|
17
17
|
|
18
18
|
s.add_dependency('typhoeus', '0.6.6')
|
19
|
+
s.add_dependency('json')
|
19
20
|
|
20
21
|
|
21
22
|
s.files = `git ls-files`.split("\n")
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: the-city-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wes Hays
|
8
|
+
- Jason Hagglund
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2014-05-03 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: typhoeus
|
@@ -24,17 +25,35 @@ dependencies:
|
|
24
25
|
- - '='
|
25
26
|
- !ruby/object:Gem::Version
|
26
27
|
version: 0.6.6
|
27
|
-
|
28
|
-
|
29
|
-
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: json
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ! '>='
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ! '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
description: Ruby gem/plugin to interact with The City Admin API (https://api.onthecity.org).
|
43
|
+
Check out the project on github for more detail.
|
44
|
+
email:
|
45
|
+
- wes@onthecity.org
|
46
|
+
- jasonh@onthecity.org
|
30
47
|
executables: []
|
31
48
|
extensions: []
|
32
49
|
extra_rdoc_files: []
|
33
50
|
files:
|
34
|
-
- .autotest
|
35
51
|
- .gitignore
|
52
|
+
- .pryrc
|
36
53
|
- .rspec
|
37
|
-
- .
|
54
|
+
- .ruby-gemset
|
55
|
+
- .ruby-version
|
56
|
+
- .travis.yml
|
38
57
|
- .yardoc/checksums
|
39
58
|
- .yardoc/object_types
|
40
59
|
- .yardoc/objects/root.dat
|
@@ -69,6 +88,8 @@ files:
|
|
69
88
|
- lib/api/campus_list.rb
|
70
89
|
- lib/api/checkin.rb
|
71
90
|
- lib/api/checkin_list.rb
|
91
|
+
- lib/api/checkin_list_by_callboard_number.rb
|
92
|
+
- lib/api/checkin_list_by_pager_number.rb
|
72
93
|
- lib/api/church.rb
|
73
94
|
- lib/api/donation.rb
|
74
95
|
- lib/api/donation_export.rb
|
@@ -82,6 +103,8 @@ files:
|
|
82
103
|
- lib/api/group_address.rb
|
83
104
|
- lib/api/group_address_list.rb
|
84
105
|
- lib/api/group_checkin.rb
|
106
|
+
- lib/api/group_checkin_event.rb
|
107
|
+
- lib/api/group_checkin_events_list.rb
|
85
108
|
- lib/api/group_checkin_list.rb
|
86
109
|
- lib/api/group_event_attendance.rb
|
87
110
|
- lib/api/group_event_attendance_list.rb
|
@@ -147,6 +170,8 @@ files:
|
|
147
170
|
- lib/readers/address_reader.rb
|
148
171
|
- lib/readers/api_reader.rb
|
149
172
|
- lib/readers/campus_list_reader.rb
|
173
|
+
- lib/readers/checkin_list_by_callboard_number_reader.rb
|
174
|
+
- lib/readers/checkin_list_by_pager_number_reader.rb
|
150
175
|
- lib/readers/checkin_list_reader.rb
|
151
176
|
- lib/readers/checkin_reader.rb
|
152
177
|
- lib/readers/church_reader.rb
|
@@ -158,7 +183,9 @@ files:
|
|
158
183
|
- lib/readers/fund_list_reader.rb
|
159
184
|
- lib/readers/fund_reader.rb
|
160
185
|
- lib/readers/group_address_list_reader.rb
|
186
|
+
- lib/readers/group_checkin_events_list_reader.rb
|
161
187
|
- lib/readers/group_checkin_list_reader.rb
|
188
|
+
- lib/readers/group_checkin_reader.rb
|
162
189
|
- lib/readers/group_event_attendance_list_reader.rb
|
163
190
|
- lib/readers/group_export_list_reader.rb
|
164
191
|
- lib/readers/group_export_reader.rb
|
@@ -221,9 +248,14 @@ files:
|
|
221
248
|
- lib/writers/web_hook_writer.rb
|
222
249
|
- spec/api/address_list_spec.rb
|
223
250
|
- spec/api/address_spec.rb
|
251
|
+
- spec/api/checkin_list_by_callboard_number_spec.rb
|
252
|
+
- spec/api/checkin_list_by_pager_number_spec.rb
|
253
|
+
- spec/api/checkin_list_spec.rb
|
224
254
|
- spec/api/group_address_list_spec.rb
|
225
255
|
- spec/api/group_address_spec.rb
|
256
|
+
- spec/api/group_checkin_events_list_spec.rb
|
226
257
|
- spec/api/group_checkin_list_spec.rb
|
258
|
+
- spec/api/group_checkin_spec.rb
|
227
259
|
- spec/api/group_event_attendance_list_spec.rb
|
228
260
|
- spec/api/group_export_spec.rb
|
229
261
|
- spec/api/group_invitation_list_spec.rb
|
@@ -278,11 +310,14 @@ files:
|
|
278
310
|
- spec/factories/group_address.rb
|
279
311
|
- spec/factories/group_address_list.rb
|
280
312
|
- spec/factories/group_checkin.rb
|
313
|
+
- spec/factories/group_checkin_event.rb
|
314
|
+
- spec/factories/group_checkin_events_list.rb
|
281
315
|
- spec/factories/group_checkin_list.rb
|
282
316
|
- spec/factories/group_event_attendance.rb
|
283
317
|
- spec/factories/group_event_attendance_list.rb
|
284
318
|
- spec/factories/group_export.rb
|
285
319
|
- spec/factories/group_export_list.rb
|
320
|
+
- spec/factories/group_list.rb
|
286
321
|
- spec/factories/group_role.rb
|
287
322
|
- spec/factories/group_tag.rb
|
288
323
|
- spec/factories/role.rb
|
@@ -349,13 +384,18 @@ rubyforge_project: Project on www.github.com
|
|
349
384
|
rubygems_version: 2.1.10
|
350
385
|
signing_key:
|
351
386
|
specification_version: 4
|
352
|
-
summary: Ruby gem/plugin to interact with The City Admin API (https://api.
|
387
|
+
summary: Ruby gem/plugin to interact with The City Admin API (https://api.onthecity.org).
|
353
388
|
test_files:
|
354
389
|
- spec/api/address_list_spec.rb
|
355
390
|
- spec/api/address_spec.rb
|
391
|
+
- spec/api/checkin_list_by_callboard_number_spec.rb
|
392
|
+
- spec/api/checkin_list_by_pager_number_spec.rb
|
393
|
+
- spec/api/checkin_list_spec.rb
|
356
394
|
- spec/api/group_address_list_spec.rb
|
357
395
|
- spec/api/group_address_spec.rb
|
396
|
+
- spec/api/group_checkin_events_list_spec.rb
|
358
397
|
- spec/api/group_checkin_list_spec.rb
|
398
|
+
- spec/api/group_checkin_spec.rb
|
359
399
|
- spec/api/group_event_attendance_list_spec.rb
|
360
400
|
- spec/api/group_export_spec.rb
|
361
401
|
- spec/api/group_invitation_list_spec.rb
|
@@ -410,11 +450,14 @@ test_files:
|
|
410
450
|
- spec/factories/group_address.rb
|
411
451
|
- spec/factories/group_address_list.rb
|
412
452
|
- spec/factories/group_checkin.rb
|
453
|
+
- spec/factories/group_checkin_event.rb
|
454
|
+
- spec/factories/group_checkin_events_list.rb
|
413
455
|
- spec/factories/group_checkin_list.rb
|
414
456
|
- spec/factories/group_event_attendance.rb
|
415
457
|
- spec/factories/group_event_attendance_list.rb
|
416
458
|
- spec/factories/group_export.rb
|
417
459
|
- spec/factories/group_export_list.rb
|
460
|
+
- spec/factories/group_list.rb
|
418
461
|
- spec/factories/group_role.rb
|
419
462
|
- spec/factories/group_tag.rb
|
420
463
|
- spec/factories/role.rb
|