church_community_builder 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 461cfb32bfff9406db2e4d02f80a70251c62da2d
4
- data.tar.gz: 859ca100893d10d4b95285cc299f3d61d69b8a21
3
+ metadata.gz: fee51638a4c9d419d2641ea69cffe5db8868f12b
4
+ data.tar.gz: eaffae833d807c2303208351a23f9314a8389391
5
5
  SHA512:
6
- metadata.gz: 649968e5adb593b709e7940e57929b1e0cf6d8ce89b5aa2f9f04881c0c6bb3bd14f2dbfe6072f31158fb9fee2e0340d263e2d805158ae28d87da12fcf454c414
7
- data.tar.gz: 4d4e7cda0d37a9ae41cb6fca2be9f2b5bc444832b6239951e48139c995c53cf8f3198b108dbced22ab62b9da9d93772c9f17a3b73fb42a2ff72499463b09578b
6
+ metadata.gz: 108b18b35b5c026b0fa3488593c34ab720e9a4d96ac60af7caa4cb8cd0648f63a3e2c0843148b1060502159ed3e7f7298e9a3462edbf6e4b4ad83164e70efeb3
7
+ data.tar.gz: 90b8189fbf435b283480d2af3dd4b33f7a6fbd5b568d977345853d94498acfc8d3622077f60d7ea591cc08472b1d743aa5027724c901d97cce174d8c15f80057
@@ -3,7 +3,7 @@ require "base64"
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "church_community_builder"
6
- s.version = "0.0.9"
6
+ s.version = "0.0.10"
7
7
  s.authors = ['Taylor Brooks']
8
8
  s.email = ["dGJyb29rc0BnbWFpbC5jb20="].map{ |e| Base64.decode64(e) }
9
9
  s.homepage = "https://github.com/taylorbrooks/church_community_builder"
@@ -9,6 +9,7 @@ Dir[File.expand_path('../response/*.rb', __FILE__)].each{|f| require f}
9
9
 
10
10
  module ChurchCommunityBuilder
11
11
  class Client
12
+ include ChurchCommunityBuilder::Client::Campus
12
13
  include ChurchCommunityBuilder::Client::Contribution
13
14
  include ChurchCommunityBuilder::Client::Person
14
15
 
@@ -0,0 +1,12 @@
1
+ module ChurchCommunityBuilder
2
+ class Client
3
+ module Campus
4
+
5
+ def list_campuses
6
+ response = get("?srv=campus_list")
7
+ ::Campus.new(response).parse
8
+ end
9
+
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,18 @@
1
+ class Campus
2
+ attr_reader :response, :campuses
3
+
4
+ def initialize(response)
5
+ @response = response["ccb_api"]["response"]
6
+ @campuses = @response["campuses"]["campus"]
7
+ end
8
+
9
+ def parse
10
+ @campuses.map do |campus|
11
+ OpenStruct.new(
12
+ id: campus["id"],
13
+ name: campus["name"]
14
+ )
15
+ end
16
+ end
17
+
18
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: church_community_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taylor Brooks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-27 00:00:00.000000000 Z
11
+ date: 2015-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -152,8 +152,10 @@ files:
152
152
  - church_community_builder.gemspec
153
153
  - lib/church_community_builder.rb
154
154
  - lib/church_community_builder/client.rb
155
+ - lib/church_community_builder/resources/campus.rb
155
156
  - lib/church_community_builder/resources/contribution.rb
156
157
  - lib/church_community_builder/resources/person.rb
158
+ - lib/church_community_builder/response/campus.rb
157
159
  - lib/church_community_builder/response/contribution.rb
158
160
  - lib/church_community_builder/response/person.rb
159
161
  - test/person/person_test.rb
@@ -178,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
180
  version: '0'
179
181
  requirements: []
180
182
  rubyforge_project:
181
- rubygems_version: 2.4.5
183
+ rubygems_version: 2.4.8
182
184
  signing_key:
183
185
  specification_version: 4
184
186
  summary: Ruby gem/plugin to interact with the Church Community Builder API (https://support.churchcommunitybuilder.com/customer/portal/articles/640589-api-documentation).