wakoopa 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +6 -0
- data/LICENSE +20 -0
- data/README.textile +12 -0
- data/Rakefile +51 -0
- data/TODO +0 -0
- data/VERSION +1 -0
- data/lib/wakoopa.rb +96 -0
- data/spec/fixtures/jkreeftmeijer_software.xml +280 -0
- data/spec/spec_helper.rb +5 -0
- data/spec/wakoopa_spec.rb +159 -0
- data/wakoopa.gemspec +58 -0
- metadata +87 -0
data/.document
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Jeff Kreeftmeijer
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.textile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
h1. Wakoopa
|
2
|
+
|
3
|
+
A simple Ruby "Wakoopa":http://wakoopa.com API wrapper, built to give you an ActiveRecord-like way to fetch your software usage data.
|
4
|
+
|
5
|
+
h2. Usage
|
6
|
+
|
7
|
+
Check out the "Installation":http://wiki.github.com/jeffkreeftmeijer/wakoopa/installation and "Usage":http://wiki.github.com/jeffkreeftmeijer/wakoopa/usage guides. Any questions? Don't hesitate to "ask":http://github.com/inbox/new/jeffkreeftmeijer.
|
8
|
+
|
9
|
+
h2. Contributing
|
10
|
+
|
11
|
+
Found an issue? Have a great idea? Want to help? Great! Please "report":http://github.com/jeffkreeftmeijer/wakoopa/issues issues and "fork":http://github.com/jeffkreeftmeijer/wakoopa/fork the project if you have any great ideas. Pull requests are always welcome.
|
12
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
require 'metric_fu'
|
4
|
+
|
5
|
+
begin
|
6
|
+
require 'jeweler'
|
7
|
+
Jeweler::Tasks.new do |gem|
|
8
|
+
gem.name = "wakoopa"
|
9
|
+
gem.summary = %Q{the Ruby Wakoopa API wrapper}
|
10
|
+
gem.description = %Q{A simple Ruby Wakoopa API wrapper, built to give you an ActiveRecord-like way to fetch your software usage data.}
|
11
|
+
gem.email = "jeff@kreeftmeijer.nl"
|
12
|
+
gem.homepage = "http://github.com/jeffkreeftmeijer/wakoopa"
|
13
|
+
gem.authors = ["Jeff Kreeftmeijer"]
|
14
|
+
gem.add_development_dependency "rspec", ">=1.2.8"
|
15
|
+
gem.add_dependency 'httparty', ">= 0.4.5"
|
16
|
+
end
|
17
|
+
rescue LoadError
|
18
|
+
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
19
|
+
end
|
20
|
+
|
21
|
+
require 'spec/rake/spectask'
|
22
|
+
Spec::Rake::SpecTask.new(:spec) do |spec|
|
23
|
+
spec.libs << 'lib' << 'spec'
|
24
|
+
spec.spec_files = FileList['spec/**/*_spec.rb']
|
25
|
+
end
|
26
|
+
|
27
|
+
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
28
|
+
spec.libs << 'lib' << 'spec'
|
29
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
30
|
+
spec.rcov = true
|
31
|
+
end
|
32
|
+
|
33
|
+
task :spec => :check_dependencies
|
34
|
+
|
35
|
+
task :default => :spec
|
36
|
+
|
37
|
+
require 'rake/rdoctask'
|
38
|
+
Rake::RDocTask.new do |rdoc|
|
39
|
+
if File.exist?('VERSION')
|
40
|
+
version = File.read('VERSION')
|
41
|
+
else
|
42
|
+
version = ""
|
43
|
+
end
|
44
|
+
|
45
|
+
rdoc.rdoc_dir = 'rdoc'
|
46
|
+
rdoc.title = "wakoopa #{version}"
|
47
|
+
rdoc.rdoc_files.include('README*')
|
48
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
49
|
+
end
|
50
|
+
|
51
|
+
Jeweler::GemcutterTasks.new
|
data/TODO
ADDED
File without changes
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
data/lib/wakoopa.rb
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'httparty'
|
3
|
+
|
4
|
+
module Wakoopa
|
5
|
+
class << self
|
6
|
+
attr_accessor :username, :feedkey
|
7
|
+
end
|
8
|
+
|
9
|
+
class Base
|
10
|
+
attr_accessor :data
|
11
|
+
|
12
|
+
def initialize(item)
|
13
|
+
@data = item
|
14
|
+
end
|
15
|
+
|
16
|
+
def method_missing(method_id, *args)
|
17
|
+
@data[method_id.to_s]
|
18
|
+
end
|
19
|
+
|
20
|
+
class << self
|
21
|
+
attr_accessor :section
|
22
|
+
|
23
|
+
def find(*args)
|
24
|
+
options = args.last.is_a?(Hash) ? args.pop : {}
|
25
|
+
warn "The Wakoopa API doesn\'t support finding single rows. \n Please use \".all()\" or \"s.find(:all)\" instead of \".find()\"." unless args.first == :all
|
26
|
+
find_every(options)
|
27
|
+
end
|
28
|
+
|
29
|
+
def find_every(options = {})
|
30
|
+
query = {:limit => 100}.merge(options)
|
31
|
+
|
32
|
+
feedkey = Wakoopa.feedkey
|
33
|
+
if feedkey
|
34
|
+
query.merge!(:key => feedkey)
|
35
|
+
end
|
36
|
+
|
37
|
+
Wakoopa::Request.get(@section, :query => query)
|
38
|
+
end
|
39
|
+
|
40
|
+
def all(*args)
|
41
|
+
find(:all, *args)
|
42
|
+
end
|
43
|
+
|
44
|
+
def method_missing(method_id, *args)
|
45
|
+
options = args.last.is_a?(Hash) ? args.pop : {}
|
46
|
+
|
47
|
+
method_id.to_s.match(/^find_all_by_([_a-zA-Z]\w*)$/)
|
48
|
+
attributes = {}
|
49
|
+
|
50
|
+
$1.split('_and_').each do |key|
|
51
|
+
attributes.merge!({key.intern => args.shift})
|
52
|
+
end
|
53
|
+
|
54
|
+
find(:all, attributes.merge(options))
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
class Request
|
60
|
+
class << self
|
61
|
+
def get(section, options={})
|
62
|
+
response = HTTParty.get("http://api.wakoopa.com/#{Wakoopa.username}/#{section}.xml", options)
|
63
|
+
|
64
|
+
result = []
|
65
|
+
response[section].each do |item|
|
66
|
+
result << (Software.new(item))
|
67
|
+
end
|
68
|
+
result
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
class Software < Base
|
74
|
+
@section = 'software'
|
75
|
+
end
|
76
|
+
|
77
|
+
class Comment < Base
|
78
|
+
@section = 'comments'
|
79
|
+
end
|
80
|
+
|
81
|
+
class PlacedComment < Base
|
82
|
+
@section = 'placed_comments'
|
83
|
+
end
|
84
|
+
|
85
|
+
class Review < Base
|
86
|
+
@section = 'reviews'
|
87
|
+
end
|
88
|
+
|
89
|
+
class Relation < Base
|
90
|
+
@section = 'relations'
|
91
|
+
end
|
92
|
+
|
93
|
+
class Team < Base
|
94
|
+
@section = 'teams'
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,280 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<software type="array">
|
3
|
+
<software>
|
4
|
+
<active-seconds type="integer">13</active-seconds>
|
5
|
+
<created-at type="datetime">2009-11-24T15:33:54Z</created-at>
|
6
|
+
<id type="integer">151108</id>
|
7
|
+
<last-active-at type="datetime">2009-11-24T16:57:37Z</last-active-at>
|
8
|
+
<name>Woot</name>
|
9
|
+
<num-users type="integer">3098</num-users>
|
10
|
+
<updated-at type="datetime">2009-10-23T18:46:56Z</updated-at>
|
11
|
+
<url>http://woot.com</url>
|
12
|
+
<complete-url>http://wakoopa.com/software/woot</complete-url>
|
13
|
+
<complete-icon-url>http://mallow.wakoopa.com/avatars/000/087/793/normal.png?1245671470</complete-icon-url>
|
14
|
+
<complete-thumb-url>http://mallow.wakoopa.com/avatars/000/087/793/thumb.png?1245671470</complete-thumb-url>
|
15
|
+
<developer>
|
16
|
+
<id type="integer">38360</id>
|
17
|
+
<name>Woot, Inc.</name>
|
18
|
+
<complete-url>http://wakoopa.com/developers/woot-inc</complete-url>
|
19
|
+
</developer>
|
20
|
+
<os-types>
|
21
|
+
<os>web</os>
|
22
|
+
</os-types>
|
23
|
+
<description>Woot is an Internet retailer based in the Dallas suburb of Carrollton, Texas. Woot was the pioneer of the "one deal a day" business model on the internet. Woot's main website generally offers only one discounted product each day, often a piece of computer hardware or an electronic gadget. Other Woot sites offer one original t-shirt per day, two selections of wine per week, and one closeout deal per day. </description>
|
24
|
+
</software>
|
25
|
+
<software>
|
26
|
+
<active-seconds type="integer">158</active-seconds>
|
27
|
+
<created-at type="datetime">2009-11-24T13:18:45Z</created-at>
|
28
|
+
<id type="integer">151219</id>
|
29
|
+
<last-active-at type="datetime">2009-11-24T14:57:37Z</last-active-at>
|
30
|
+
<name>Picnik</name>
|
31
|
+
<num-users type="integer">1701</num-users>
|
32
|
+
<updated-at type="datetime">2009-11-15T06:28:22Z</updated-at>
|
33
|
+
<url>http://picnik.com</url>
|
34
|
+
<complete-url>http://wakoopa.com/software/picnik</complete-url>
|
35
|
+
<complete-icon-url>http://mallow.wakoopa.com/avatars/000/016/338/normal.png?1238833261</complete-icon-url>
|
36
|
+
<complete-thumb-url>http://mallow.wakoopa.com/avatars/000/016/338/thumb.png?1238833261</complete-thumb-url>
|
37
|
+
<developer>
|
38
|
+
<id type="integer">38983</id>
|
39
|
+
<name>Picnik, Inc.</name>
|
40
|
+
<complete-url>http://wakoopa.com/developers/picnik-inc</complete-url>
|
41
|
+
</developer>
|
42
|
+
<category>
|
43
|
+
<description></description>
|
44
|
+
<id type="integer">31</id>
|
45
|
+
<name>Image Editing</name>
|
46
|
+
<complete-url>http://wakoopa.com/categories/design/image-editing</complete-url>
|
47
|
+
</category>
|
48
|
+
<os-types>
|
49
|
+
<os>web</os>
|
50
|
+
</os-types>
|
51
|
+
<description>Picnik is an online photo editing service. Currently it can import photos natively from Facebook, Myspace, Picasa Web Albums, Flickr, Yahoo Image search and also offers options to upload from a computer or to upload from a website.
|
52
|
+
Many of Picnik's basic photo editing tools are free to use. Picnik Premium includes additional photo editing features and is offered for an annual subscription cost.
|
53
|
+
Picnik has a partnership with Flickr that includes a less feature-rich version of Picnik built into Flickr as a default photo editor. They have also signed up to do photo editing with free website creator FreeWebs.</description>
|
54
|
+
</software>
|
55
|
+
<software>
|
56
|
+
<active-seconds type="integer">33</active-seconds>
|
57
|
+
<created-at type="datetime">2009-11-24T13:01:00Z</created-at>
|
58
|
+
<id type="integer">280656</id>
|
59
|
+
<last-active-at type="datetime">2009-11-24T14:57:37Z</last-active-at>
|
60
|
+
<name>W3C Markup Validation Service</name>
|
61
|
+
<num-users type="integer">1844</num-users>
|
62
|
+
<updated-at type="datetime">2009-11-10T15:36:38Z</updated-at>
|
63
|
+
<url>http://validator.w3.org</url>
|
64
|
+
<complete-url>http://wakoopa.com/software/w3c-markup-validation-service</complete-url>
|
65
|
+
<complete-icon-url>http://mallow.wakoopa.com/avatars/000/135/721/normal.png?1250669698</complete-icon-url>
|
66
|
+
<complete-thumb-url>http://mallow.wakoopa.com/avatars/000/135/721/thumb.png?1250669698</complete-thumb-url>
|
67
|
+
<developer>
|
68
|
+
<id type="integer">91671</id>
|
69
|
+
<name>World Wide Web Consortium</name>
|
70
|
+
<complete-url>http://wakoopa.com/developers/world-wide-web-consortium</complete-url>
|
71
|
+
</developer>
|
72
|
+
<category>
|
73
|
+
<description></description>
|
74
|
+
<id type="integer">53</id>
|
75
|
+
<name>Languages & Frameworks</name>
|
76
|
+
<complete-url>http://wakoopa.com/categories/development/languages-frameworks</complete-url>
|
77
|
+
</category>
|
78
|
+
<os-types>
|
79
|
+
<os>web</os>
|
80
|
+
</os-types>
|
81
|
+
<description>The W3C Validator checks the markup validity of Web documents in HTML, XHTML, SMIL, MathML, etc.</description>
|
82
|
+
</software>
|
83
|
+
<software>
|
84
|
+
<active-seconds type="integer">5</active-seconds>
|
85
|
+
<created-at type="datetime">2009-11-23T18:19:03Z</created-at>
|
86
|
+
<id type="integer">162126</id>
|
87
|
+
<last-active-at type="datetime">2009-11-23T17:57:37Z</last-active-at>
|
88
|
+
<name>FAROO</name>
|
89
|
+
<num-users type="integer">63</num-users>
|
90
|
+
<updated-at type="datetime">2009-05-10T00:03:49Z</updated-at>
|
91
|
+
<url>http://faroo.com/</url>
|
92
|
+
<complete-url>http://wakoopa.com/software/faroo-web</complete-url>
|
93
|
+
<complete-icon-url>http://mallow.wakoopa.com/avatars/000/053/994/normal.gif?1241913826</complete-icon-url>
|
94
|
+
<complete-thumb-url>http://mallow.wakoopa.com/avatars/000/053/994/thumb.gif?1241913826</complete-thumb-url>
|
95
|
+
<developer>
|
96
|
+
<id type="integer">39322</id>
|
97
|
+
<name>FAROO</name>
|
98
|
+
<complete-url>http://wakoopa.com/developers/faroo</complete-url>
|
99
|
+
</developer>
|
100
|
+
<os-types>
|
101
|
+
<os>web</os>
|
102
|
+
</os-types>
|
103
|
+
<description></description>
|
104
|
+
</software>
|
105
|
+
<software>
|
106
|
+
<active-seconds type="integer">13</active-seconds>
|
107
|
+
<created-at type="datetime">2009-11-23T13:03:10Z</created-at>
|
108
|
+
<id type="integer">301263</id>
|
109
|
+
<last-active-at type="datetime">2009-11-23T13:57:37Z</last-active-at>
|
110
|
+
<name>OnePage</name>
|
111
|
+
<num-users type="integer">52</num-users>
|
112
|
+
<updated-at type="datetime">2009-10-13T02:24:50Z</updated-at>
|
113
|
+
<url>http://myonepage.com</url>
|
114
|
+
<complete-url>http://wakoopa.com/software/onepage</complete-url>
|
115
|
+
<complete-icon-url>http://mallow.wakoopa.com/avatars/000/145/485/normal.jpg?1253179342</complete-icon-url>
|
116
|
+
<complete-thumb-url>http://mallow.wakoopa.com/avatars/000/145/485/thumb.jpg?1253179342</complete-thumb-url>
|
117
|
+
<developer>
|
118
|
+
<id type="integer">100672</id>
|
119
|
+
<name>OnePage</name>
|
120
|
+
<complete-url>http://wakoopa.com/developers/onepage</complete-url>
|
121
|
+
</developer>
|
122
|
+
<category>
|
123
|
+
<description></description>
|
124
|
+
<id type="integer">23</id>
|
125
|
+
<name>Social networks</name>
|
126
|
+
<complete-url>http://wakoopa.com/categories/internet/social-networks</complete-url>
|
127
|
+
</category>
|
128
|
+
<os-types>
|
129
|
+
<os>web</os>
|
130
|
+
</os-types>
|
131
|
+
<description>OnePage is the one place to see everything you do on the web. The service assembles all your online activity and contact details to give you a perfect real-time contact card to share with your network in any way you wish.</description>
|
132
|
+
</software>
|
133
|
+
<software>
|
134
|
+
<active-seconds type="integer">0</active-seconds>
|
135
|
+
<created-at type="datetime">2009-11-23T06:19:08Z</created-at>
|
136
|
+
<id type="integer">152116</id>
|
137
|
+
<last-active-at type="datetime">2009-11-15T04:32:52Z</last-active-at>
|
138
|
+
<name>Simply Hired</name>
|
139
|
+
<num-users type="integer">1122</num-users>
|
140
|
+
<updated-at type="datetime">2009-04-01T13:33:01Z</updated-at>
|
141
|
+
<url>http://simplyhired.com</url>
|
142
|
+
<complete-url>http://wakoopa.com/software/simply-hired</complete-url>
|
143
|
+
<complete-icon-url>http://mallow.wakoopa.com/avatars/000/012/184/normal.png?1238592779</complete-icon-url>
|
144
|
+
<complete-thumb-url>http://mallow.wakoopa.com/avatars/000/012/184/thumb.png?1238592779</complete-thumb-url>
|
145
|
+
<developer>
|
146
|
+
<id type="integer">38501</id>
|
147
|
+
<name>Simply Hired, Inc.</name>
|
148
|
+
<complete-url>http://wakoopa.com/developers/simply-hired-inc</complete-url>
|
149
|
+
</developer>
|
150
|
+
<os-types>
|
151
|
+
<os>web</os>
|
152
|
+
</os-types>
|
153
|
+
<description>Simply Hired is a job search website that seeks to consolidate job listings from major and minor job sites such as Monster, Careerbuilder, the WSJ and many other newspapers, content websites, organizations and company career pages. Jobs from these sites are categorized by their components (location, work experience, education, company size, etc.) for which users can search and filter their results. Searches can be narrowed further through specialty filters such as “Fortune 500”, “Dog Friendly” and “Mom Friendly” jobs. Simply Hired also had a “Who Do You Know” tool which enables job seekers to see who they know at companies of interest within their LinkedIn contacts.</description>
|
154
|
+
</software>
|
155
|
+
<software>
|
156
|
+
<active-seconds type="integer">0</active-seconds>
|
157
|
+
<created-at type="datetime">2009-11-22T14:59:51Z</created-at>
|
158
|
+
<id type="integer">151320</id>
|
159
|
+
<last-active-at type="datetime">2009-11-14T19:32:52Z</last-active-at>
|
160
|
+
<name>12seconds</name>
|
161
|
+
<num-users type="integer">1649</num-users>
|
162
|
+
<updated-at type="datetime">2009-09-04T11:28:55Z</updated-at>
|
163
|
+
<url>http://12seconds.tv</url>
|
164
|
+
<complete-url>http://wakoopa.com/software/12seconds</complete-url>
|
165
|
+
<complete-icon-url>http://mallow.wakoopa.com/avatars/000/011/928/normal.png?1238592138</complete-icon-url>
|
166
|
+
<complete-thumb-url>http://mallow.wakoopa.com/avatars/000/011/928/thumb.png?1238592138</complete-thumb-url>
|
167
|
+
<developer>
|
168
|
+
<id type="integer">36578</id>
|
169
|
+
<name>12seconds, Inc</name>
|
170
|
+
<complete-url>http://wakoopa.com/developers/12seconds-inc</complete-url>
|
171
|
+
</developer>
|
172
|
+
<category>
|
173
|
+
<description></description>
|
174
|
+
<id type="integer">23</id>
|
175
|
+
<name>Social networks</name>
|
176
|
+
<complete-url>http://wakoopa.com/categories/internet/social-networks</complete-url>
|
177
|
+
</category>
|
178
|
+
<os-types>
|
179
|
+
<os>web</os>
|
180
|
+
</os-types>
|
181
|
+
<description>12seconds is the place online for video status updates. It's a way to share what you're doing with your friends and family using short video clips. You can use your web cam or mobile phone. Show your friends where you are, share your thoughts, or tell them how you're doing.
|
182
|
+
The length is only 12 seconds because anything longer is boring. The scientists here at the 12seconds dodecaplex have conducted countless hours of research to determine the precise amount of time it takes for boredom or apathy to set in during typical Internet video viewing. Our patent pending Electro-Tear-Duct Prongers have determined that exactly 12 seconds of video is the ideal amount of time to keep anything interesting.</description>
|
183
|
+
</software>
|
184
|
+
<software>
|
185
|
+
<active-seconds type="integer">272</active-seconds>
|
186
|
+
<created-at type="datetime">2009-11-21T21:17:26Z</created-at>
|
187
|
+
<id type="integer">96401</id>
|
188
|
+
<last-active-at type="datetime">2009-11-22T13:45:40Z</last-active-at>
|
189
|
+
<name>simulator.Main</name>
|
190
|
+
<num-users type="integer">563</num-users>
|
191
|
+
<updated-at type="datetime">2009-11-22T17:59:07Z</updated-at>
|
192
|
+
<url></url>
|
193
|
+
<complete-url>http://wakoopa.com/software/simulatormain</complete-url>
|
194
|
+
<complete-icon-url>http://wakoopa.com/images/avatar_software.gif</complete-icon-url>
|
195
|
+
<complete-thumb-url>http://wakoopa.com/images/avatar_software_thumb.gif</complete-thumb-url>
|
196
|
+
<developer>
|
197
|
+
<id type="integer">15</id>
|
198
|
+
<name>Unknown developer</name>
|
199
|
+
<complete-url>http://wakoopa.com/developers/unknown</complete-url>
|
200
|
+
</developer>
|
201
|
+
<category>
|
202
|
+
<description></description>
|
203
|
+
<id type="integer">51</id>
|
204
|
+
<name>Text Editors & IDEs</name>
|
205
|
+
<complete-url>http://wakoopa.com/categories/development/text-editors-ides</complete-url>
|
206
|
+
</category>
|
207
|
+
<os-types>
|
208
|
+
<os>mac</os>
|
209
|
+
</os-types>
|
210
|
+
<description>A 'catch all' listing for Java applications that do not specify a process name. The 'Main' refers to the Main class that is the static instance called when launching a Java application. 'simulator' would be the class/package name.
|
211
|
+
|
212
|
+
I write quite a lot of Java applications and so quite often am running tests through the IDE.
|
213
|
+
I presume simulator.Main was an application run by someone and the first tagged at Wakoopa. Subsequent Java applications that people have run must have the same signature.</description>
|
214
|
+
</software>
|
215
|
+
<software>
|
216
|
+
<active-seconds type="integer">251</active-seconds>
|
217
|
+
<created-at type="datetime">2009-11-20T15:59:00Z</created-at>
|
218
|
+
<id type="integer">154084</id>
|
219
|
+
<last-active-at type="datetime">2009-11-25T12:57:37Z</last-active-at>
|
220
|
+
<name>FFFFOUND!</name>
|
221
|
+
<num-users type="integer">3477</num-users>
|
222
|
+
<updated-at type="datetime">2009-10-21T17:27:34Z</updated-at>
|
223
|
+
<url>http://ffffound.com</url>
|
224
|
+
<complete-url>http://wakoopa.com/software/ffffound</complete-url>
|
225
|
+
<complete-icon-url>http://mallow.wakoopa.com/avatars/000/012/511/normal.png?1238593714</complete-icon-url>
|
226
|
+
<complete-thumb-url>http://mallow.wakoopa.com/avatars/000/012/511/thumb.png?1238593714</complete-thumb-url>
|
227
|
+
<developer>
|
228
|
+
<id type="integer">36719</id>
|
229
|
+
<name>FFFFOUND!</name>
|
230
|
+
<complete-url>http://wakoopa.com/developers/ffffound</complete-url>
|
231
|
+
</developer>
|
232
|
+
<category>
|
233
|
+
<description></description>
|
234
|
+
<id type="integer">23</id>
|
235
|
+
<name>Social networks</name>
|
236
|
+
<complete-url>http://wakoopa.com/categories/internet/social-networks</complete-url>
|
237
|
+
</category>
|
238
|
+
<os-types>
|
239
|
+
<os>web</os>
|
240
|
+
</os-types>
|
241
|
+
<description>FFFFOUND! is a web service that not only allows the users to post and share their favorite images found on the web, but also dynamically recommends each user's tastes and interests for an inspirational image-bookmarking experience.</description>
|
242
|
+
</software>
|
243
|
+
<software>
|
244
|
+
<active-seconds type="integer">60</active-seconds>
|
245
|
+
<created-at type="datetime">2009-11-20T15:29:12Z</created-at>
|
246
|
+
<id type="integer">309674</id>
|
247
|
+
<last-active-at type="datetime">2009-11-20T16:04:14Z</last-active-at>
|
248
|
+
<name>Echofon for Mac</name>
|
249
|
+
<num-users type="integer">201</num-users>
|
250
|
+
<updated-at type="datetime">2009-11-10T02:43:12Z</updated-at>
|
251
|
+
<url>http://echofon.com/twitter/mac</url>
|
252
|
+
<complete-url>http://wakoopa.com/software/echofon-for-mac</complete-url>
|
253
|
+
<complete-icon-url>http://mallow.wakoopa.com/avatars/000/151/083/normal.png?1254398988</complete-icon-url>
|
254
|
+
<complete-thumb-url>http://mallow.wakoopa.com/avatars/000/151/083/thumb.png?1254398988</complete-thumb-url>
|
255
|
+
<developer>
|
256
|
+
<id type="integer">104178</id>
|
257
|
+
<name>Echofon</name>
|
258
|
+
<complete-url>http://wakoopa.com/developers/echofon</complete-url>
|
259
|
+
</developer>
|
260
|
+
<category>
|
261
|
+
<description></description>
|
262
|
+
<id type="integer">23</id>
|
263
|
+
<name>Social networks</name>
|
264
|
+
<complete-url>http://wakoopa.com/categories/internet/social-networks</complete-url>
|
265
|
+
</category>
|
266
|
+
<os-types>
|
267
|
+
<os>mac</os>
|
268
|
+
</os-types>
|
269
|
+
<description>Stay on top of your Twitter timeline with Echofon for Mac. The beautiful, subtle interface will be a welcome addition to your Mac’s desktop.
|
270
|
+
Flexible Interface
|
271
|
+
Echofon for mac suits those who do intense Twittering, and those who want to something that stays out of their way until they need it. The interface contracts and expands to your ideal size, and the drawer will show you details only when you need it.
|
272
|
+
Browser Drawer
|
273
|
+
Echofon’s unique browser-like drawer lets you view information about specific users, or read conversations without losing access to your timeline.
|
274
|
+
Open the drawer!
|
275
|
+
Drag-and-Drop Photo Posting
|
276
|
+
Posting photos to Twitter couldn't be easier. Just drag a photo onto the Echofon window to attach it to your tweet.
|
277
|
+
Syncs with your iPhone
|
278
|
+
Echofon for Mac syncs unread tweets with Echofon pro on your iPhone.</description>
|
279
|
+
</software>
|
280
|
+
</software>
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,159 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe 'Wakoopa' do
|
4
|
+
before do
|
5
|
+
Wakoopa.username = 'jkreeftmeijer'
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'should set the feedkey' do
|
9
|
+
Wakoopa.feedkey = '12345'
|
10
|
+
Wakoopa.feedkey.should eql('12345')
|
11
|
+
end
|
12
|
+
|
13
|
+
describe 'Base' do
|
14
|
+
describe '.new' do
|
15
|
+
before do
|
16
|
+
@item = Wakoopa::Base.new({'woo' => 'grr'})
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should have a data array' do
|
20
|
+
@item.data['woo'].should eql('grr')
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'should be able to use magic attrubutes' do
|
24
|
+
@item.woo.should eql('grr')
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe '.find' do
|
29
|
+
it 'should always call ".find_every()"' do
|
30
|
+
Wakoopa::Base.should_receive(:find_every)
|
31
|
+
Wakoopa::Base.find
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'should pass the given options' do
|
35
|
+
Wakoopa::Base.should_receive(:find_every).with({:woo => 'bleh'})
|
36
|
+
Wakoopa::Base.find(:all, {:woo => 'bleh'})
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe '.all' do
|
41
|
+
it 'should call ".find(:all)"' do
|
42
|
+
Wakoopa::Base.should_receive(:find).with(:all)
|
43
|
+
Wakoopa::Base.all
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'should pass the given options' do
|
47
|
+
Wakoopa::Base.should_receive(:find).with(:all, {:woo => 'bleh'})
|
48
|
+
Wakoopa::Base.all({:woo => 'bleh'})
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
describe '.find_every' do
|
53
|
+
before do
|
54
|
+
Wakoopa::Base.section = 'test'
|
55
|
+
Wakoopa.feedkey = nil
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'should create a request without any arguments' do
|
59
|
+
Wakoopa::Request.should_receive(:get).with('test', :query => {:limit => 100})
|
60
|
+
Wakoopa::Base.find_every
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'should create a request with the feedkey provided' do
|
64
|
+
Wakoopa::Request.should_receive(:get).with('test', :query => {:key => '12345', :limit => 100})
|
65
|
+
Wakoopa.feedkey = '12345'
|
66
|
+
Wakoopa::Base.find_every
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'should create a request with the category condition' do
|
70
|
+
Wakoopa::Request.should_receive(:get).with('test', :query => {:category => 'browsers', :limit => 100})
|
71
|
+
Wakoopa::Base.find_every(:category => 'browsers')
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
describe '.find_all_by_magic' do
|
76
|
+
it 'should create a request with the category condition' do
|
77
|
+
Wakoopa::Request.should_receive(:get).with('test', :query => {:category => 'browsers', :limit => 100})
|
78
|
+
Wakoopa::Base.find_all_by_category('browsers')
|
79
|
+
end
|
80
|
+
|
81
|
+
it 'should create a request with the category and os condition' do
|
82
|
+
Wakoopa::Request.should_receive(:get).with('test', :query => {:category => 'browsers', :os => 'osx', :limit => 100})
|
83
|
+
Wakoopa::Base.find_all_by_category_and_os('browsers', 'osx')
|
84
|
+
end
|
85
|
+
|
86
|
+
it 'should create a request with the category condition, sorted by active_seconds' do
|
87
|
+
Wakoopa::Request.should_receive(:get).with('test', :query => {:category => 'browsers', :sort => 'active_seconds', :limit => 100})
|
88
|
+
Wakoopa::Base.find_all_by_category('browsers', :sort => 'active_seconds')
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
describe 'Request', '.get' do
|
94
|
+
before do
|
95
|
+
HTTParty.should_receive(:get).
|
96
|
+
with('http://api.wakoopa.com/jkreeftmeijer/software.xml', {}).
|
97
|
+
and_return(
|
98
|
+
Crack::XML.parse(
|
99
|
+
File.read('spec/fixtures/jkreeftmeijer_software.xml')
|
100
|
+
)
|
101
|
+
)
|
102
|
+
end
|
103
|
+
|
104
|
+
it 'should return an array of software objects' do
|
105
|
+
result = Wakoopa::Request.get('software')
|
106
|
+
result.should be_instance_of Array
|
107
|
+
result.each do |object|
|
108
|
+
object.should be_instance_of Wakoopa::Software
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
it 'should return 10 software objects' do
|
113
|
+
result = Wakoopa::Request.get('software')
|
114
|
+
result.length.should eql 10
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
describe 'Software', '.find' do
|
119
|
+
it 'create a "software" request' do
|
120
|
+
Wakoopa::Request.should_receive(:get).with('software', {:query => { :limit => 100 }})
|
121
|
+
Wakoopa::Software.find(:all)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
describe 'Comment', '.find' do
|
126
|
+
it 'create a "comments" request' do
|
127
|
+
Wakoopa::Request.should_receive(:get).with('comments', {:query => { :limit => 100 }})
|
128
|
+
Wakoopa::Comment.find(:all)
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
describe 'PlacedComment', '.find' do
|
133
|
+
it 'create a "placed_comments" request' do
|
134
|
+
Wakoopa::Request.should_receive(:get).with('placed_comments', {:query => { :limit => 100 }})
|
135
|
+
Wakoopa::PlacedComment.find(:all)
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
describe 'Review', '.find' do
|
140
|
+
it 'create a "reviews" request' do
|
141
|
+
Wakoopa::Request.should_receive(:get).with('reviews', {:query => { :limit => 100 }})
|
142
|
+
Wakoopa::Review.find(:all)
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
describe 'Relation', '.find' do
|
147
|
+
it 'create a "relations" request' do
|
148
|
+
Wakoopa::Request.should_receive(:get).with('relations', {:query => { :limit => 100 }})
|
149
|
+
Wakoopa::Relation.find(:all)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
describe 'Team', '.find' do
|
154
|
+
it 'create a "teams" request' do
|
155
|
+
Wakoopa::Request.should_receive(:get).with('teams', {:query => { :limit => 100 }})
|
156
|
+
Wakoopa::Team.find(:all)
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
data/wakoopa.gemspec
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{wakoopa}
|
8
|
+
s.version = "0.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Jeff Kreeftmeijer"]
|
12
|
+
s.date = %q{2009-11-29}
|
13
|
+
s.description = %q{A simple Ruby Wakoopa API wrapper, built to give you an ActiveRecord-like way to fetch your software usage data.}
|
14
|
+
s.email = %q{jeff@kreeftmeijer.nl}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.textile"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"LICENSE",
|
23
|
+
"README.textile",
|
24
|
+
"Rakefile",
|
25
|
+
"TODO",
|
26
|
+
"VERSION",
|
27
|
+
"lib/wakoopa.rb",
|
28
|
+
"spec/fixtures/jkreeftmeijer_software.xml",
|
29
|
+
"spec/spec_helper.rb",
|
30
|
+
"spec/wakoopa_spec.rb",
|
31
|
+
"wakoopa.gemspec"
|
32
|
+
]
|
33
|
+
s.homepage = %q{http://github.com/jeffkreeftmeijer/wakoopa}
|
34
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
35
|
+
s.require_paths = ["lib"]
|
36
|
+
s.rubygems_version = %q{1.3.5}
|
37
|
+
s.summary = %q{the Ruby Wakoopa API wrapper}
|
38
|
+
s.test_files = [
|
39
|
+
"spec/spec_helper.rb",
|
40
|
+
"spec/wakoopa_spec.rb"
|
41
|
+
]
|
42
|
+
|
43
|
+
if s.respond_to? :specification_version then
|
44
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
45
|
+
s.specification_version = 3
|
46
|
+
|
47
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
48
|
+
s.add_development_dependency(%q<rspec>, [">= 1.2.8"])
|
49
|
+
s.add_runtime_dependency(%q<httparty>, [">= 0.4.5"])
|
50
|
+
else
|
51
|
+
s.add_dependency(%q<rspec>, [">= 1.2.8"])
|
52
|
+
s.add_dependency(%q<httparty>, [">= 0.4.5"])
|
53
|
+
end
|
54
|
+
else
|
55
|
+
s.add_dependency(%q<rspec>, [">= 1.2.8"])
|
56
|
+
s.add_dependency(%q<httparty>, [">= 0.4.5"])
|
57
|
+
end
|
58
|
+
end
|
metadata
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: wakoopa
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jeff Kreeftmeijer
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-11-29 00:00:00 +01:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rspec
|
17
|
+
type: :development
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.2.8
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: httparty
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.4.5
|
34
|
+
version:
|
35
|
+
description: A simple Ruby Wakoopa API wrapper, built to give you an ActiveRecord-like way to fetch your software usage data.
|
36
|
+
email: jeff@kreeftmeijer.nl
|
37
|
+
executables: []
|
38
|
+
|
39
|
+
extensions: []
|
40
|
+
|
41
|
+
extra_rdoc_files:
|
42
|
+
- LICENSE
|
43
|
+
- README.textile
|
44
|
+
files:
|
45
|
+
- .document
|
46
|
+
- .gitignore
|
47
|
+
- LICENSE
|
48
|
+
- README.textile
|
49
|
+
- Rakefile
|
50
|
+
- TODO
|
51
|
+
- VERSION
|
52
|
+
- lib/wakoopa.rb
|
53
|
+
- spec/fixtures/jkreeftmeijer_software.xml
|
54
|
+
- spec/spec_helper.rb
|
55
|
+
- spec/wakoopa_spec.rb
|
56
|
+
- wakoopa.gemspec
|
57
|
+
has_rdoc: true
|
58
|
+
homepage: http://github.com/jeffkreeftmeijer/wakoopa
|
59
|
+
licenses: []
|
60
|
+
|
61
|
+
post_install_message:
|
62
|
+
rdoc_options:
|
63
|
+
- --charset=UTF-8
|
64
|
+
require_paths:
|
65
|
+
- lib
|
66
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: "0"
|
71
|
+
version:
|
72
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: "0"
|
77
|
+
version:
|
78
|
+
requirements: []
|
79
|
+
|
80
|
+
rubyforge_project:
|
81
|
+
rubygems_version: 1.3.5
|
82
|
+
signing_key:
|
83
|
+
specification_version: 3
|
84
|
+
summary: the Ruby Wakoopa API wrapper
|
85
|
+
test_files:
|
86
|
+
- spec/spec_helper.rb
|
87
|
+
- spec/wakoopa_spec.rb
|