teamsnap_rb 1.0.3 → 1.1.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: 235c0f2ef597b6659d210d4100a42cba129155e9
4
- data.tar.gz: 7b34f2aaabec2b09412996910bde4bca69352a90
3
+ metadata.gz: 6f9511231be3d578db265dfe57fef9b8144fba8f
4
+ data.tar.gz: 75edb7b7469b24e1e58211e2489a45aba6039317
5
5
  SHA512:
6
- metadata.gz: 3382553ff1be861589c7ec981e78ca25a884f7458d13d5c36a4c693d20700bcdb3783998ba68cd0725e193696c7184215a713255214a638f777f33d8dad7b47a
7
- data.tar.gz: 9674fa52acac5c654b4b2b3df2063025a2a77744a2644bca3d251fc960d73bac64178eaf73ee62bd53b67aa54c7752e92fc3e065f0a8c619e4ccfdf1de99492d
6
+ metadata.gz: bcecd865a782c7f3925cea7ffc0ac533476e7f545727a434d540c5b467663a4df3feebfcdf92c52a4de947299cf960b939b976d6b917788e9eaac4d035c96cb1
7
+ data.tar.gz: 889f6cd95ee3257a8164787852bf63e36f19d2ebf07e6e75a98513ad041e7dd091bb536da13fa2dd8481904cd00fabb30481801c38b914c91902d20c20952477
data/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ MASTER
2
+ ------
3
+
4
+ -
5
+
6
+ v1.1.0
7
+ ------
8
+
9
+ - Fixed a namespacing issue that would try and user classes already defined by
10
+ the user if they shared a name with TeamSnap classes.
data/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # teamsnap_rb
2
2
 
3
- [![Dependencies](http://img.shields.io/gemnasium/teamsnap/teamsnap_rb.svg)](https://gemnasium.com/teamsnap/teamsnap_rb)
4
- [![Quality](http://img.shields.io/codeclimate/github/teamsnap/teamsnap_rb.svg)](https://codeclimate.com/github/teamsnap/teamsnap_rb)
5
- [![Coverage](http://img.shields.io/coveralls/teamsnap/teamsnap_rb.svg)](https://https://coveralls.io/r/teamsnap/teamsnap_rb)
6
- [![Build](http://img.shields.io/travis-ci/teamsnap/teamsnap_rb.svg)](https://travis-ci.org/teamsnap/teamsnap_rb)
7
- [![Version](http://img.shields.io/gem/v/teamsnap_rb.svg)](https://rubygems.org/gems/teamsnap_rb)
8
- [![License](http://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)
3
+ [![Dependencies](http://img.shields.io/gemnasium/teamsnap/teamsnap_rb.svg)](https://gemnasium.com/teamsnap/teamsnap_rb)
4
+ [![Quality](http://img.shields.io/codeclimate/github/teamsnap/teamsnap_rb.svg)](https://codeclimate.com/github/teamsnap/teamsnap_rb)
5
+ [![Coverage](http://img.shields.io/coveralls/teamsnap/teamsnap_rb.svg)](https://https://coveralls.io/r/teamsnap/teamsnap_rb)
6
+ [![Build](http://img.shields.io/travis-ci/teamsnap/teamsnap_rb.svg)](https://travis-ci.org/teamsnap/teamsnap_rb)
7
+ [![Version](http://img.shields.io/gem/v/teamsnap_rb.svg)](https://rubygems.org/gems/teamsnap_rb)
8
+ [![License](http://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)
9
9
 
10
10
  ## Usage
11
11
 
@@ -13,23 +13,19 @@ _Note: You'll need an OAuth2 Token from TeamSnap. Checkout our API docs
13
13
  [here](http://developer.teamsnap.com/documentation/apiv3/)_
14
14
 
15
15
  ```
16
- λ bundle install
17
- Fetching gem metadata from https://rubygems.org/..........
18
- ...
19
- Your bundle is complete!
20
- Use `bundle show [gemname]` to see where a bundled gem is installed.
21
- λ bundle exec rake console
22
- [1] pry(main)> TeamSnap.init("abc123...", :url => "https://apiv3.teamsnap.com")
23
- [2] pry(main)> t = TeamSnap::Team.find(1)
16
+ λ gem install teamsnap_rb
17
+ λ irb
18
+ > TeamSnap.init(:token => "abc123...", :url => "https://apiv3.teamsnap.com")
19
+ > t = TeamSnap::Team.find(1)
24
20
  => #<TeamSnap::Team::...>
25
- [3] pry(main)> t.name
21
+ > t.name
26
22
  => "TeamSnap"
27
- [4] pry(main)> rs = client.bulk_load(:team_id => 1, :types => "team,member")
23
+ > rs = client.bulk_load(:team_id => 1, :types => "team,member")
28
24
  => [#<TeamSnap::Team:...>,
29
25
  #<TeamSnap::Member:...>,
30
26
  # ...
31
27
  #<TeamSnap::Member:...>]
32
- [5] pry(main)> rs[1].first_name
28
+ > rs[1].first_name
33
29
  => "Andrew"
34
30
  ```
35
31
 
data/lib/teamsnap.rb CHANGED
@@ -188,7 +188,7 @@ module TeamSnap
188
188
 
189
189
  TeamSnap.const_set(
190
190
  name, Class.new { include TeamSnap.collection(href, resp) }
191
- ) unless TeamSnap.const_defined?(name)
191
+ ) unless TeamSnap.const_defined?(name, false)
192
192
  end
193
193
 
194
194
  def register_endpoint(obj, endpoint, opts)
@@ -236,7 +236,7 @@ module TeamSnap
236
236
  end
237
237
 
238
238
  def load_class(type, data)
239
- TeamSnap.const_get(Inflecto.camelize(type)).tap { |cls|
239
+ TeamSnap.const_get(Inflecto.camelize(type), false).tap { |cls|
240
240
  unless cls.include?(Virtus::Model::Core)
241
241
  cls.class_eval do
242
242
  include Virtus.value_object
@@ -1,3 +1,3 @@
1
1
  module TeamSnap
2
- VERSION = "1.0.3"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teamsnap_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Emmons
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-05-07 00:00:00.000000000 Z
12
+ date: 2015-05-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -146,6 +146,7 @@ extra_rdoc_files: []
146
146
  files:
147
147
  - ".gitignore"
148
148
  - ".travis.yml"
149
+ - CHANGELOG.md
149
150
  - Gemfile
150
151
  - LICENSE
151
152
  - README.md
@@ -193,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
194
  version: '0'
194
195
  requirements: []
195
196
  rubyforge_project:
196
- rubygems_version: 2.2.2
197
+ rubygems_version: 2.4.5
197
198
  signing_key:
198
199
  specification_version: 4
199
200
  summary: A gem to interact with TeamSnap's API