wcc-arena 0.3.0 → 0.4.0

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: 2f332ecdc7d123631926b3383fcdbf607989cdd3
4
- data.tar.gz: 790880e61fd1bfc3abf2bcf8c61c9ef3cfcb78db
3
+ metadata.gz: 1e29fcc958f30642c7e9fbf7f465620cab1e5806
4
+ data.tar.gz: 6316dcc30f5abe433bd8d6d11d0a0b891c22a1d9
5
5
  SHA512:
6
- metadata.gz: 438d6c6d9b334781bd583b382f069c1997413335d7ae4cee98f79821f605be9bf5e93dcf18af5a4777d723c8a1b9710b83afe4086be4e83c2b741095fb8a2a16
7
- data.tar.gz: a3ddac097befccaee154543f668e5445831428b60de3006cfe29a794ff9be1a590784ab4d5ffb0a2885a87f3a1978c82eca425c7b672dabb3d9b47f92f9a203b
6
+ metadata.gz: 1edd479615d7309c8e4e035baa65746760db7489387e345937a8701a0f9c4b4af3e7409a30b1cd314a015b43a80003fd986e321fa6782c98a56709e47e52eb20
7
+ data.tar.gz: 0fb29f14e52a839361fc6efbfed41d5df0e4fc4b86b70c678b80ffd79e4f44b5ecdf8c9587b768057af3adabaa917b54136f0077e6f84b0c67e0d034b4b8f32f
@@ -18,7 +18,7 @@ module WCC::Arena
18
18
  private
19
19
 
20
20
  def response_groups_xml
21
- query_response.xml.root.xpath("Groups/Group[not(LeaderID='-1')]")
21
+ query_response.xml.root.xpath("Groups/Group[Active='true']")
22
22
  end
23
23
 
24
24
  def query_response
@@ -1,5 +1,5 @@
1
1
  module WCC
2
2
  module Arena
3
- VERSION = "0.3.0"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
@@ -96,7 +96,6 @@
96
96
  <TopicValue>Unknown</TopicValue>
97
97
  </Group>
98
98
  <Group>
99
- <Active>true</Active>
100
99
  <AreaID>10</AreaID>
101
100
  <AreaName>North Dallas Area</AreaName>
102
101
  <AverageAge>27</AverageAge>
@@ -52,9 +52,9 @@ describe WCC::Arena::GroupQuery do
52
52
  end
53
53
  end
54
54
 
55
- it "excludes deleted groups" do
55
+ it "only includes active groups" do
56
56
  subject.session.stub(:get) { fixture_response }
57
- expect(list.map(&:leader_id)).to_not include(-1)
57
+ list.each { |l| expect(l).to be_active }
58
58
  end
59
59
 
60
60
  it "returns groups with unique IDs" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wcc-arena
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Petticrew
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-12-15 00:00:00.000000000 Z
12
+ date: 2015-12-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -187,35 +187,35 @@ rubyforge_project:
187
187
  rubygems_version: 2.4.2
188
188
  signing_key:
189
189
  specification_version: 4
190
- summary: '# WCC::Arena This gem provides wrappers to the Arena church management
191
- system''s API. This is an early version of the library, and has had limited testing
190
+ summary: "# WCC::Arena This gem provides wrappers to the Arena church management
191
+ system's API. This is an early version of the library, and has had limited testing
192
192
  in real world environments. Use at your own risk! There are also bound to be a
193
- few things that are specific to our configuration and version of Arena. This isn''t
193
+ few things that are specific to our configuration and version of Arena. This isn't
194
194
  intentional and we consider that a bug that we would like to fix. We would love
195
- for this to be a fully featured way to interact with Arena''s API. ## Installation Add
196
- this line to your application''s Gemfile: gem ''wcc-arena'' And then execute: $
197
- bundle Or install it yourself as: $ gem install wcc-arena ## Configuration You
198
- can configure the wcc-arena gem using the `WCC::Arena.configure` method. Here is
199
- an example configuration block: ```ruby WCC::Arena.configure do |arena| arena.username
200
- = ''username'' arena.password = ''password'' arena.api_key = ''api_key'' arena.api_secret
201
- = ''api_secret'' arena.api_url = ''https://arena-domain/api.svc/'' end ``` ## Usage The
202
- library is currently a very thin layer over the Arena API. We plan to add a higher
203
- level interface layer that provides a better experience for the most common use
204
- cases. The library consists of Query classes and Mapper classes. The Query classes
205
- handle calling the respective services and the Mapper classes handle binding the
206
- XML to Ruby objects. For full details on all available endpoints please see the
207
- code. Below are a few examples of some common queries. ```ruby person_query = WCC::Arena::PersonQuery.new.where(first_name:
208
- "Travis") people = person_query.call people.each do |person| puts person.full_name
209
- end ``` This will print the full names of all person records with the first name
210
- "Travis". There are a ton of other attributes that are available on a Person record.
211
- Check them out on the [Person](https://github.com/watermarkchurch/wcc-arena/blob/master/lib/wcc/arena/person.rb)
195
+ for this to be a fully featured way to interact with Arena's API. ## Installation
196
+ \ Add this line to your application's Gemfile: gem 'wcc-arena' And then execute:
197
+ \ $ bundle Or install it yourself as: $ gem install wcc-arena ## Configuration
198
+ \ You can configure the wcc-arena gem using the `WCC::Arena.configure` method. Here
199
+ is an example configuration block: ```ruby WCC::Arena.configure do |arena| arena.username
200
+ = 'username' arena.password = 'password' arena.api_key = 'api_key' arena.api_secret
201
+ = 'api_secret' arena.api_url = 'https://arena-domain/api.svc/' end ``` ## Usage
202
+ \ The library is currently a very thin layer over the Arena API. We plan to add
203
+ a higher level interface layer that provides a better experience for the most common
204
+ use cases. The library consists of Query classes and Mapper classes. The Query
205
+ classes handle calling the respective services and the Mapper classes handle binding
206
+ the XML to Ruby objects. For full details on all available endpoints please see
207
+ the code. Below are a few examples of some common queries. ```ruby person_query
208
+ = WCC::Arena::PersonQuery.new.where(first_name: \"Travis\") people = person_query.call
209
+ people.each do |person| puts person.full_name end ``` This will print the full names
210
+ of all person records with the first name \"Travis\". There are a ton of other attributes
211
+ that are available on a Person record. Check them out on the [Person](https://github.com/watermarkchurch/wcc-arena/blob/master/lib/wcc/arena/person.rb)
212
212
  model. You can also query tags (or Profiles as they are called under the hood).
213
213
  To pull all top level Ministry tags run the following: ```ruby # This assumes that
214
214
  your ministry tags have a type ID of 1. WCC::Arena::ProfileQuery.new(profile_type_id:
215
215
  1).call.each do |tag| puts tag.name end ``` ## Contributing 1. Fork it 2. Create
216
216
  your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git
217
- commit -am ''Add some feature''`) 4. Push to the branch (`git push origin my-new-feature`)
218
- 5. Create new Pull Request'
217
+ commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`)
218
+ 5. Create new Pull Request"
219
219
  test_files:
220
220
  - spec/fixtures/group_member_list.xml
221
221
  - spec/fixtures/modify_result_failure.xml