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 +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +13 -17
- data/lib/teamsnap.rb +2 -2
- data/lib/teamsnap/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f9511231be3d578db265dfe57fef9b8144fba8f
|
4
|
+
data.tar.gz: 75edb7b7469b24e1e58211e2489a45aba6039317
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bcecd865a782c7f3925cea7ffc0ac533476e7f545727a434d540c5b467663a4df3feebfcdf92c52a4de947299cf960b939b976d6b917788e9eaac4d035c96cb1
|
7
|
+
data.tar.gz: 889f6cd95ee3257a8164787852bf63e36f19d2ebf07e6e75a98513ad041e7dd091bb536da13fa2dd8481904cd00fabb30481801c38b914c91902d20c20952477
|
data/CHANGELOG.md
ADDED
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
|
-
λ
|
17
|
-
|
18
|
-
...
|
19
|
-
|
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
|
-
|
21
|
+
> t.name
|
26
22
|
=> "TeamSnap"
|
27
|
-
|
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
|
-
|
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
|
data/lib/teamsnap/version.rb
CHANGED
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
|
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-
|
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.
|
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
|