swish 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -14,6 +14,7 @@ Not playing in the Ruby league? Here are the others we know of so far:
14
14
  * C#/.NET: http://github.com/superlogical/dribbble-dotnet (I would have called it "Nothing but .NET")
15
15
  * ExpressionEngine 1.6.8+: http://ninefour.co.uk/labs/dribbble
16
16
  * ExpressionEngine 2: http://olivierbon.com/projects/dreebbble
17
+ * jQuery: https://github.com/tylergaw/jribbble
17
18
  * PHP: http://github.com/martinbean/dribbble-php
18
19
  * Python: http://bitbucket.org/sjl/python-dribbble/src
19
20
 
@@ -33,6 +34,9 @@ Not playing in the Ruby league? Here are the others we know of so far:
33
34
  shot.likes_count
34
35
  shot.comments_count
35
36
  shot.rebounds_count
37
+
38
+ # Or get a shot's rebounds
39
+ shot.rebounds
36
40
 
37
41
  # Find more shots
38
42
  inspiring = Dribbble::Shot.popular
@@ -58,7 +62,7 @@ Not playing in the Ruby league? Here are the others we know of so far:
58
62
 
59
63
  # List a player's shots
60
64
  player.shots
61
-
65
+
62
66
  # List shots by players that this player follows
63
67
  player.shots_following
64
68
 
@@ -87,13 +91,14 @@ The Dribbble API returns paginated lists, with a default page size of 15 items.
87
91
  # Try it with other lists
88
92
  Dribbble::Player.find('jeremy').shots(:per_page => 5)
89
93
  Dribbble::Player.find('jeremy').shots_following(:page => 10)
94
+ Dribbble::Shot.find(21603).rebounds(:page => 2, :per_page => 10)
90
95
 
91
96
  See http://dribbble.com/api#pagination for more information.
92
97
 
93
98
  == Who's using Swish?
94
99
 
95
- * http://liiikes.com/, "Using statistics to find the best content on Dribbble."
96
- * http://hooppps.com/, "A free open-source mobile dribbble browser"
100
+ * http://liiikes.com, "Using statistics to find the best content on Dribbble."
101
+ * http://hooppps.com, "A free open-source mobile dribbble browser"
97
102
 
98
103
  Email jeremy@weiskotten.com to have your project added to this list.
99
104
 
@@ -104,6 +109,7 @@ Thanks to Dan and Rich for creating Dribbble (and its API!), and to everyone tha
104
109
  * Jeffrey Chupp
105
110
  * Jon Distad
106
111
  * Michael Parenteau
112
+ * Adam Perfect
107
113
 
108
114
  Email jeremy@weiskotten.com if you should be on this list. Apologies and thanks in advance.
109
115
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.0
1
+ 0.8.0
data/lib/dribbble/shot.rb CHANGED
@@ -14,6 +14,10 @@ module Dribbble
14
14
  paginated_list(get("/shots/#{@id}/comments", :query => options))
15
15
  end
16
16
 
17
+ def rebounds(options={})
18
+ paginated_list(get("/shots/#{@id}/rebounds", :query => options))
19
+ end
20
+
17
21
  # Options: :page, :per_page
18
22
  def self.debuts(options={})
19
23
  paginated_list(get("/shots/debuts", :query => options))
data/swish.gemspec CHANGED
@@ -1,54 +1,52 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{swish}
8
- s.version = "0.7.0"
8
+ s.version = "0.8.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jeremy Weiskotten"]
12
- s.date = %q{2011-02-20}
12
+ s.date = %q{2011-03-06}
13
13
  s.description = %q{A Ruby wrapper for the Dribbble API}
14
14
  s.email = %q{jeremy@weiskotten.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.rdoc"
17
+ "README.rdoc"
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.rdoc",
24
- "Rakefile",
25
- "VERSION",
26
- "lib/dribbble/base.rb",
27
- "lib/dribbble/comment.rb",
28
- "lib/dribbble/paginated_list.rb",
29
- "lib/dribbble/player.rb",
30
- "lib/dribbble/shot.rb",
31
- "lib/swish.rb",
32
- "swish.gemspec",
33
- "test/base_test.rb",
34
- "test/comment_test.rb",
35
- "test/helper.rb",
36
- "test/paginated_list_test.rb",
37
- "test/player_test.rb",
38
- "test/shot_test.rb"
21
+ "LICENSE",
22
+ "README.rdoc",
23
+ "Rakefile",
24
+ "VERSION",
25
+ "lib/dribbble/base.rb",
26
+ "lib/dribbble/comment.rb",
27
+ "lib/dribbble/paginated_list.rb",
28
+ "lib/dribbble/player.rb",
29
+ "lib/dribbble/shot.rb",
30
+ "lib/swish.rb",
31
+ "swish.gemspec",
32
+ "test/base_test.rb",
33
+ "test/comment_test.rb",
34
+ "test/helper.rb",
35
+ "test/paginated_list_test.rb",
36
+ "test/player_test.rb",
37
+ "test/shot_test.rb"
39
38
  ]
40
39
  s.homepage = %q{http://github.com/jeremyw/swish}
41
- s.rdoc_options = ["--charset=UTF-8"]
42
40
  s.require_paths = ["lib"]
43
41
  s.rubygems_version = %q{1.3.7}
44
42
  s.summary = %q{A Ruby wrapper for the Dribbble API}
45
43
  s.test_files = [
46
44
  "test/base_test.rb",
47
- "test/comment_test.rb",
48
- "test/helper.rb",
49
- "test/paginated_list_test.rb",
50
- "test/player_test.rb",
51
- "test/shot_test.rb"
45
+ "test/comment_test.rb",
46
+ "test/helper.rb",
47
+ "test/paginated_list_test.rb",
48
+ "test/player_test.rb",
49
+ "test/shot_test.rb"
52
50
  ]
53
51
 
54
52
  if s.respond_to? :specification_version then
data/test/shot_test.rb CHANGED
@@ -48,6 +48,13 @@ class ShotTest < Test::Unit::TestCase
48
48
  comments.each { |c| assert c.is_a?(Dribbble::Comment), "#{c.inspect} is not a Dribbble::Comment." }
49
49
  end
50
50
 
51
+ def test_rebounds
52
+ shot = Dribbble::Shot.find(21595)
53
+ rebounds = shot.rebounds
54
+ assert rebounds.is_a?(Dribbble::PaginatedList), "#{rebounds.inspect} is not a Dribbble::PaginatedList."
55
+ rebounds.each { |r| assert r.is_a?(Dribbble::Shot), "#{r.inspect} is not a Dribbble::Shot." }
56
+ end
57
+
51
58
  def test_debuts
52
59
  shots = Dribbble::Shot.debuts
53
60
  assert_kind_of Array, shots
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swish
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 63
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 7
8
+ - 8
9
9
  - 0
10
- version: 0.7.0
10
+ version: 0.8.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeremy Weiskotten
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-20 00:00:00 -05:00
18
+ date: 2011-03-06 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -61,7 +61,6 @@ extra_rdoc_files:
61
61
  - README.rdoc
62
62
  files:
63
63
  - .document
64
- - .gitignore
65
64
  - LICENSE
66
65
  - README.rdoc
67
66
  - Rakefile
@@ -84,8 +83,8 @@ homepage: http://github.com/jeremyw/swish
84
83
  licenses: []
85
84
 
86
85
  post_install_message:
87
- rdoc_options:
88
- - --charset=UTF-8
86
+ rdoc_options: []
87
+
89
88
  require_paths:
90
89
  - lib
91
90
  required_ruby_version: !ruby/object:Gem::Requirement
data/.gitignore DELETED
@@ -1,23 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
- .rvmrc
21
-
22
- ## PROJECT::SPECIFIC
23
- swish*.gem