teamsnap_rb 1.0.0.beta1 → 1.0.0.beta2

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: 2ec7ccaac56d2dbb9377c7d191c93f1e95f72787
4
- data.tar.gz: 3e99f2b6972f7a893678697b4f7e140040f39860
3
+ metadata.gz: fd74863f759d0dbeed525ab6d73b70a1eebc372d
4
+ data.tar.gz: e2ef76059638a0152567a22b4cce4e1c1d340667
5
5
  SHA512:
6
- metadata.gz: c6e8e9529786679bc1b332e8cc652156bb4455260c9236fdbcc6190a1f7bc5a9596ca5d829121ad6274b7778ac539a5b6c7ebc55b14470c883067f75654de711
7
- data.tar.gz: c3d57d806335350eb1cd2d98bf3e491cdb2a6dd8b298fe0f3b8de48f1fb91689ccadc08d281e1b0c9a2682e3412ae5ffb29df284bb5dace4a8d6a444d90cf7ad
6
+ metadata.gz: aca3de8593196f9ef886cece82cee051e7a39f1dfb28737a980201cc2e28dbb977f9d2b9093d0612670457904dd329ddaa0e39bee6e97b025176cc2d645df037
7
+ data.tar.gz: 506988af7072945baead7ccbc09fc83f3026f721cb9033dbc8bb7e07df91c6de1f9cdc298f774c640f87448a3a38737f493cea252200593c38fb77f8f210a1c3
@@ -1,3 +1,3 @@
1
1
  module TeamSnap
2
- VERSION = "1.0.0.beta1"
2
+ VERSION = "1.0.0.beta2"
3
3
  end
data/lib/teamsnap.rb CHANGED
@@ -19,9 +19,13 @@ Faraday::Request.register_middleware(
19
19
  )
20
20
 
21
21
  Inflecto.inflections do |inflect|
22
+ inflect.irregular "member_preferences", "member_preferences"
22
23
  inflect.irregular "member_preferences", "members_preferences"
24
+ inflect.irregular "opponent_results", "opponent_results"
23
25
  inflect.irregular "opponent_results", "opponents_results"
26
+ inflect.irregular "team_preferences", "team_preferences"
24
27
  inflect.irregular "team_preferences", "teams_preferences"
28
+ inflect.irregular "team_results", "team_results"
25
29
  inflect.irregular "team_results", "teams_results"
26
30
  end
27
31
 
@@ -224,10 +228,14 @@ module TeamSnap
224
228
  is_singular = rel == Inflecto.singularize(rel)
225
229
 
226
230
  define_singleton_method(rel) {
227
- coll = TeamSnap.load_items(
228
- TeamSnap.run(:get, href)
231
+ instance_variable_get("@#{rel}") || instance_variable_set(
232
+ "@#{rel}", -> {
233
+ coll = TeamSnap.load_items(
234
+ TeamSnap.run(:get, href)
235
+ )
236
+ coll.size == 1 && is_singular ? coll.first : coll
237
+ }.call
229
238
  )
230
- coll.size == 1 && is_singular ? coll.first : coll
231
239
  }
232
240
  end
233
241
  end
@@ -268,3 +276,8 @@ module TeamSnap
268
276
  end
269
277
  end
270
278
  end
279
+
280
+ if __FILE__ == $0
281
+ TeamSnap.init(:token => "")
282
+ require"pry";binding.pry
283
+ end
data/teamsnap_rb.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.name = "teamsnap_rb"
8
8
  spec.version = TeamSnap::VERSION
9
9
  spec.authors = ["Shane Emmons", "Kyle Ries"]
10
- spec.email = ["api@teamsnap.com"]
10
+ spec.email = ["oss@teamsnap.com"]
11
11
  spec.summary = %q{A gem to interact with TeamSnap's API}
12
12
  spec.description = %q{A gem to interact with TeamSnap's API}
13
13
  spec.homepage = "http://developer.teamsnap.com/"
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.0.beta1
4
+ version: 1.0.0.beta2
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-02-16 00:00:00.000000000 Z
12
+ date: 2015-02-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -139,7 +139,7 @@ dependencies:
139
139
  version: 1.0.4
140
140
  description: A gem to interact with TeamSnap's API
141
141
  email:
142
- - api@teamsnap.com
142
+ - oss@teamsnap.com
143
143
  executables: []
144
144
  extensions: []
145
145
  extra_rdoc_files: []