freshmeat 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ [{"tag":{"permalink":"xhtml-2","name":"(X)HTML","taggings_count":3,"id":4961}},{"tag":{"permalink":"bsd-2","name":"*BSD","taggings_count":23,"id":5165}},{"tag":{"permalink":"nix","name":"*nix","taggings_count":35,"id":6125}},{"tag":{"permalink":"5e886eaf42431addbaa20bd2b16ecc90255eb478","name":"-","taggings_count":1,"id":12173}},{"tag":{"permalink":"jrxml-specifications-support","name":".jrxml specifications support","taggings_count":1,"id":21230}},{"tag":{"permalink":"dot-net","name":".NET","taggings_count":115,"id":724}},{"tag":{"permalink":"net-4","name":".Net 4","taggings_count":4,"id":20684}},{"tag":{"permalink":"net-c","name":".net C#","taggings_count":7,"id":13878}},{"tag":{"permalink":"net-client-profile-compatibility","name":".NET Client Profile Compatibility","taggings_count":2,"id":18114}},{"tag":{"permalink":"net-components","name":".NET Components","taggings_count":1,"id":16073}},{"tag":{"permalink":"net-framework-40-2","name":".NET Framework 4.0","taggings_count":2,"id":17639}},{"tag":{"permalink":"01","name":"0.1","taggings_count":18,"id":11731}},{"tag":{"permalink":"1337","name":"1337","taggings_count":1,"id":11103}},{"tag":{"permalink":"1750-hz","name":"1750 hz","taggings_count":1,"id":15220}},{"tag":{"permalink":"2250","name":"2250","taggings_count":1,"id":14425}},{"tag":{"permalink":"2d","name":"2d","taggings_count":23,"id":3191}},{"tag":{"permalink":"2d-barcode-symbologies","name":"2D barcode symbologies","taggings_count":2,"id":18153}},{"tag":{"permalink":"2d-graphic","name":"2d Graphic","taggings_count":6,"id":3219}},{"tag":{"permalink":"2fa","name":"2FA","taggings_count":2,"id":16273}},{"tag":{"permalink":"3-way","name":"3-way","taggings_count":1,"id":19099}},{"tag":{"permalink":"3com","name":"3com","taggings_count":1,"id":14209}},{"tag":{"permalink":"3d","name":"3D","taggings_count":36,"id":825}},{"tag":{"permalink":"3d-chat","name":"3D Chat","taggings_count":1,"id":5245}},{"tag":{"permalink":"3d-effects","name":"3D effects","taggings_count":3,"id":16467}},{"tag":{"permalink":"3d-effects-on-charts","name":"3D effects on charts","taggings_count":3,"id":16469}},{"tag":{"permalink":"3d-engine","name":"3d engine","taggings_count":5,"id":6788}},{"tag":{"permalink":"3d-model","name":"3D model","taggings_count":3,"id":4669}},{"tag":{"permalink":"3d-modeling","name":"3D Modeling","taggings_count":169,"id":2961}},{"tag":{"permalink":"3d-modelling","name":"3D Modelling","taggings_count":4,"id":4314}},{"tag":{"permalink":"3d-rendering","name":"3D Rendering","taggings_count":294,"id":2988}},{"tag":{"permalink":"3ds","name":"3ds","taggings_count":2,"id":4639}},{"tag":{"permalink":"4chan","name":"4chan","taggings_count":2,"id":9530}},{"tag":{"permalink":"4d","name":"4D","taggings_count":1,"id":6118}},{"tag":{"permalink":"4e","name":"4E","taggings_count":1,"id":9379}},{"tag":{"permalink":"4gl","name":"4GL","taggings_count":2,"id":13204}},{"tag":{"permalink":"5mincom","name":"5min.com","taggings_count":1,"id":12744}},{"tag":{"permalink":"68000","name":"68000","taggings_count":1,"id":12016}},{"tag":{"permalink":"7-zip","name":"7-zip","taggings_count":1,"id":19000}},{"tag":{"permalink":"701g","name":"701G","taggings_count":1,"id":11405}},{"tag":{"permalink":"8021ab","name":"802.1ab","taggings_count":1,"id":3434}},{"tag":{"permalink":"8021x","name":"802.1x","taggings_count":2,"id":12591}},{"tag":{"permalink":"8023ad","name":"802.3ad","taggings_count":1,"id":21885}},{"tag":{"permalink":"960gs","name":"960.gs","taggings_count":6,"id":9091}},{"tag":{"permalink":"9p","name":"9p","taggings_count":4,"id":4300}},{"tag":{"permalink":"9p2000","name":"9P2000","taggings_count":4,"id":4301}},{"tag":{"permalink":"aa-lib","name":"AA-lib","taggings_count":1,"id":8705}},{"tag":{"permalink":"aadl","name":"AADL","taggings_count":1,"id":9173}},{"tag":{"permalink":"abap","name":"ABAP","taggings_count":1,"id":20772}},{"tag":{"permalink":"abbyy-finereader","name":"abbyy finereader","taggings_count":1,"id":7410}},{"tag":{"permalink":"abcl","name":"ABCL","taggings_count":1,"id":19829}},{"tag":{"permalink":"abkhazian","name":"Abkhazian","taggings_count":3,"id":13947}},{"tag":{"permalink":"abstraction","name":"abstraction","taggings_count":3,"id":7855}},{"tag":{"permalink":"academic-software","name":"academic software","taggings_count":1,"id":11706}},{"tag":{"permalink":"academicearth","name":"academicearth","taggings_count":1,"id":20625}},{"tag":{"permalink":"acceleo","name":"Acceleo","taggings_count":1,"id":6913}},{"tag":{"permalink":"acceptance-testing","name":"acceptance testing","taggings_count":1,"id":6707}},{"tag":{"permalink":"access","name":"Access","taggings_count":12,"id":6606}},{"tag":{"permalink":"access-control","name":"access control","taggings_count":7,"id":5484}},{"tag":{"permalink":"accessibility","name":"Accessibility","taggings_count":5,"id":6768}},{"tag":{"permalink":"accompaniment","name":"accompaniment","taggings_count":1,"id":10280}},{"tag":{"permalink":"accordion","name":"accordion","taggings_count":1,"id":19049}},{"tag":{"permalink":"accounting","name":"Accounting","taggings_count":245,"id":2793}},{"tag":{"permalink":"acegi","name":"Acegi","taggings_count":3,"id":10470}},{"tag":{"permalink":"acetech","name":"Acetech","taggings_count":1,"id":7511}},{"tag":{"permalink":"achartengine","name":"achartengine","taggings_count":2,"id":19295}},{"tag":{"permalink":"aciqra-license","name":"Aciqra License","taggings_count":2,"id":17875}},{"tag":{"permalink":"acl","name":"acl","taggings_count":2,"id":9704}},{"tag":{"permalink":"acoustics","name":"acoustics","taggings_count":1,"id":5108}},{"tag":{"permalink":"action","name":"action","taggings_count":8,"id":9412}},{"tag":{"permalink":"action-games","name":"action games","taggings_count":5,"id":3263}},{"tag":{"permalink":"action-puzzle","name":"Action Puzzle","taggings_count":1,"id":14957}},{"tag":{"permalink":"actionscript","name":"actionscript","taggings_count":12,"id":6526}},{"tag":{"permalink":"actionscript-3","name":"Actionscript 3","taggings_count":11,"id":3972}},{"tag":{"permalink":"active-directory","name":"active directory","taggings_count":10,"id":3892}},{"tag":{"permalink":"active-record","name":"Active Record","taggings_count":3,"id":8583}},{"tag":{"permalink":"activemq","name":"ActiveMQ","taggings_count":5,"id":10882}},{"tag":{"permalink":"activerecord","name":"ActiveRecord","taggings_count":10,"id":6129}},{"tag":{"permalink":"activesync","name":"ActiveSync","taggings_count":6,"id":9664}},{"tag":{"permalink":"activesync-mac","name":"Activesync Mac","taggings_count":1,"id":9258}},{"tag":{"permalink":"activex","name":"Activex","taggings_count":3,"id":10466}},{"tag":{"permalink":"activity","name":"activity","taggings_count":2,"id":13381}},{"tag":{"permalink":"activity-booking","name":"Activity Booking","taggings_count":1,"id":4318}},{"tag":{"permalink":"actor","name":"Actor","taggings_count":2,"id":10917}},{"tag":{"permalink":"actors","name":"actors","taggings_count":1,"id":9380}},{"tag":{"permalink":"ad","name":"ad","taggings_count":1,"id":21779}},{"tag":{"permalink":"ad-server","name":"ad server","taggings_count":3,"id":8214}},{"tag":{"permalink":"ad-server-software","name":"ad server software","taggings_count":2,"id":8215}},{"tag":{"permalink":"ad-hoc","name":"Ad-Hoc","taggings_count":2,"id":18328}},{"tag":{"permalink":"ada","name":"Ada","taggings_count":81,"id":2880}},{"tag":{"permalink":"ada-2005","name":"Ada 2005","taggings_count":2,"id":20014}},{"tag":{"permalink":"adapter","name":"adapter","taggings_count":5,"id":6971}},{"tag":{"permalink":"adaptive-qos-control","name":"Adaptive QoS Control","taggings_count":1,"id":11594}},{"tag":{"permalink":"adaptive-technologies","name":"Adaptive Technologies","taggings_count":68,"id":2951}},{"tag":{"permalink":"adblock","name":"Adblock","taggings_count":2,"id":15595}},{"tag":{"permalink":"adc","name":"ADC","taggings_count":1,"id":13865}},{"tag":{"permalink":"add-on","name":"add-on","taggings_count":1,"id":9594}},{"tag":{"permalink":"addicts","name":"addicts","taggings_count":1,"id":3519}},{"tag":{"permalink":"address","name":"address","taggings_count":3,"id":9741}},{"tag":{"permalink":"address-book","name":"Address Book","taggings_count":111,"id":3004}},{"tag":{"permalink":"addressbook","name":"addressbook","taggings_count":3,"id":4396}}]
@@ -0,0 +1 @@
1
+ {"tag":{"permalink":"960gs","name":"960.gs","taggings_count":6,"id":9091},"projects":[{"programming_language_list":["PHP","JavaScript","MySQL","Dojo","CodeIgniter","960.gs","jQuery"],"permalink":"vunsy","name":"VUNSY","popularity":29.39,"created_at":"2009-07-30T15:17:34Z","user":{"url":"http://blazeeboy.wordpress.com","id":458682,"display_name":"Blaze Boy","login":"blazeeboy"},"translation_list":["English"],"updated_at":"2011-02-03T22:07:27Z","recent_releases":[],"vitality":24.38,"oneliner":"A very easy content management system and a dynamic Web site designer.","id":74397,"approved_urls":[{"permalink":"4167e6b7ea4291bd9c0998a4c9b1d28e","label":"Blog","host":"vunsy.wordpress.com","id":136138,"redirector":"http://freshmeat.net/urls/4167e6b7ea4291bd9c0998a4c9b1d28e"},{"permalink":"e81185638350b5845e45c35e086b1f46","label":"Google page","host":"code.google.com","id":136140,"redirector":"http://freshmeat.net/urls/e81185638350b5845e45c35e086b1f46"},{"permalink":"f6f934075ccd4607310dabd7bd9e24b4","label":"Documentation","host":"github.com","id":136260,"redirector":"http://freshmeat.net/urls/f6f934075ccd4607310dabd7bd9e24b4"},{"permalink":"477e1c06d35687fd0dd16b8140bb50d9","label":"Wiki","host":"vunsy.pbworks.com","id":136409,"redirector":"http://freshmeat.net/urls/477e1c06d35687fd0dd16b8140bb50d9"},{"permalink":"82e115086dd4686d15033f4026125472","label":"CI directory","host":"codeigniterdirectory.com","id":136762,"redirector":"http://freshmeat.net/urls/82e115086dd4686d15033f4026125472"},{"permalink":"f356940bad2e8140ba78f8a9fca2d7ca","label":"Google group","host":"groups.google.com","id":137116,"redirector":"http://freshmeat.net/urls/f356940bad2e8140ba78f8a9fca2d7ca"},{"permalink":"bae6eacffed481fecc51c18d8f8a4a5d","label":"SourceForge Project","host":"sourceforge.net","id":137300,"redirector":"http://freshmeat.net/urls/bae6eacffed481fecc51c18d8f8a4a5d"},{"permalink":"98552f5db3a9ad1ebda6d67c5000bb54","label":"Download","host":"github.com","id":137694,"redirector":"http://freshmeat.net/urls/98552f5db3a9ad1ebda6d67c5000bb54"}],"direct_download":{"permalink":"98552f5db3a9ad1ebda6d67c5000bb54","label":"Download","host":"github.com","id":137694,"redirector":"http://freshmeat.net/urls/98552f5db3a9ad1ebda6d67c5000bb54"},"project_filters_count":2,"tag_list":["CMS"],"approved_screenshots":[{"created_at":"2009-07-30T15:21:22Z","title":"Default Content","id":24911,"absolute_url":"http://freshmeat.net/screenshots/f4/c6/f4c61e97a8a43abb9071fd0057097b1e_thumb.png?1248967281"}],"subscriptions_count":0,"license_list":["GPL","BSD Revised","AFL","LGPL","PHP","MIT/X"],"description":"Vunsy is a very easy content management system and a dynamic Web site designer that entirely removes the need for a Web design program. Its purpose is to enable the user to make a site quickly by using widgets and layouts. It allows you to assign permissions to every piece of content. These permissions can control such things as viewing and deleting the content.","vote_score":1,"operating_system_list":["Windows","Linux","Unix","Mac OS X"]},{"programming_language_list":["PHP","MySQL","Zend Framework","jQuery","960.gs"],"permalink":"tomatocms","name":"TomatoCMS","popularity":82.1,"created_at":"2010-03-02T16:35:34Z","user":{"url":"http://www.tomatocms.com","id":482908,"display_name":null,"login":"tomatocms"},"translation_list":["English","Vietnamese"],"updated_at":"2010-04-02T12:08:29Z","recent_releases":[{"changelog":"The Install Wizard now allows the user to import sample data. In the backend, the user is allowed to upload a language package in the zip format. The user is allowed to browse uploaded files and insert them to articles. The user is allowed to preview articles. Article revisions can be created and restored. The user is allowed to add notes for an article. The user is allowed to insert a watermark when uploading an image. The image editor provides basic tasks such as crop, rotate, and flip.","id":314805,"tag_list":["Stable"],"version":"2.0.4","approved_at":"2010-04-02T12:08:29Z"},{"changelog":"Session lifetime is now supported. Debug mode was added. Many bugs were fixed.","id":313843,"tag_list":["Minor"],"version":"2.0.3.1622","approved_at":"2010-03-15T10:56:14Z"},{"changelog":"Some bugs were fixed.","id":313220,"tag_list":["Minor","Stable"],"version":"2.0.3.1430","approved_at":"2010-03-03T07:40:51Z"},{"changelog":"More Zend Framework components are used, such as Zend_Paginator, Zend_View_Helper_PaginationControl, and Zend_Application. The code was fixed to work with Zend Framework 1.10.0. The core module was improved to support a database prefix. It's now easier to translate language data in modules and widgets without caring about current module or widget. Hooks are supported at the module level. A SEO module was added. RTL languages such as Arabic and Iranian are supported for both front-end and back-end sections. Flickr, TextResizer, and googler widgets were added. This version allows you to set a Web site in offline mode.","id":313219,"tag_list":["Stable","Major"],"version":"2.0.3","approved_at":"2010-03-03T07:40:51Z"}],"vitality":2.09,"oneliner":"A CMS that lets you compose Web pages by dragging and dropping widgets.","id":76925,"approved_urls":[{"permalink":"202e1e998b4a8aadfc558d6326a129e9","label":"Website","host":"tomatocms.com","id":142329,"redirector":"http://freshmeat.net/urls/202e1e998b4a8aadfc558d6326a129e9"},{"permalink":"01b2e4c2354555652fd01285219c1850","label":"Download","host":"tomatocms.com","id":142330,"redirector":"http://freshmeat.net/urls/01b2e4c2354555652fd01285219c1850"},{"permalink":"081bb0b56ac5f0f8210cc29631368f2f","label":"Live Demo","host":"demo.tomatocms.com","id":142347,"redirector":"http://freshmeat.net/urls/081bb0b56ac5f0f8210cc29631368f2f"},{"permalink":"2040129b3158ab36bcbf7ba161b6354f","label":"Forum","host":"forum.tomatocms.com","id":142348,"redirector":"http://freshmeat.net/urls/2040129b3158ab36bcbf7ba161b6354f"},{"permalink":"0352e927da280a20870ee0c7c685f550","label":"Wiki","host":"docs.tomatocms.com","id":142349,"redirector":"http://freshmeat.net/urls/0352e927da280a20870ee0c7c685f550"},{"permalink":"cf470f15a6d713663e0267f8a98d1268","label":"Twitter","host":"twitter.com","id":142350,"redirector":"http://freshmeat.net/urls/cf470f15a6d713663e0267f8a98d1268"}],"direct_download":{"permalink":"01b2e4c2354555652fd01285219c1850","label":"Download","host":"tomatocms.com","id":142330,"redirector":"http://freshmeat.net/urls/01b2e4c2354555652fd01285219c1850"},"project_filters_count":27,"tag_list":["CMS","Content Management System","Internet","Web"],"approved_screenshots":[{"created_at":"2010-03-02T16:37:26Z","title":"TomatoCMS Cover","id":26948,"absolute_url":"http://freshmeat.net/screenshots/24/e0/24e07cdee9c37ee009b8e994597e8c72_thumb.png?1267547846"}],"subscriptions_count":8,"license_list":["GPLv2"],"description":"TomatoCMS is a powerful content management system. Its key feature is its Layout Editor and widget concepts. TomatoCMS also supports plugins/hooks, templates/skins, multiple languages, and has high performance. It supports a modular architecture with more than 10 built-in modules, such as ad, category, comment, menu, multimedia, news, poll, tag, and upload.","vote_score":1,"operating_system_list":["Windows","Linux","Mac OS X"]}]}
@@ -0,0 +1 @@
1
+ [{"url":{"redirector":"http://freshmeat.net/urls/4402895302714daf0c6789ea0c3b2d78","permalink":"4402895302714daf0c6789ea0c3b2d78","label":"Mailinglist","id":34218,"host":"gimp.org"}},{"url":{"redirector":"http://freshmeat.net/urls/297aea3edd8b0a5bd7a0cf4910c725b5","permalink":"297aea3edd8b0a5bd7a0cf4910c725b5","label":"Mailinglist (Development)","id":34928,"host":"gimp.org"}},{"url":{"redirector":"http://freshmeat.net/urls/1be78f3e360075045537b9cd7d1c333e","permalink":"1be78f3e360075045537b9cd7d1c333e","label":"Changelog","id":42229,"host":"developer.gimp.org"}},{"url":{"redirector":"http://freshmeat.net/urls/71df3f7538356c231cd436373af1834c","permalink":"71df3f7538356c231cd436373af1834c","label":"Bug Tracker","id":58886,"host":"bugzilla.gnome.org"}},{"url":{"redirector":"http://freshmeat.net/urls/d666f1a0cec1b7fa6e9eec2b036b3786","permalink":"d666f1a0cec1b7fa6e9eec2b036b3786","label":"Debian Package","id":68630,"host":"packages.debian.org"}},{"url":{"redirector":"http://freshmeat.net/urls/c09f79415c2d09be1eba57d80aba3259","permalink":"c09f79415c2d09be1eba57d80aba3259","label":"Mirror site","id":71187,"host":"ftp.gwdg.de"}},{"url":{"redirector":"http://freshmeat.net/urls/c18fbc1c24dc3cf78cd270e44b75759a","permalink":"c18fbc1c24dc3cf78cd270e44b75759a","label":"Mirror site","id":71389,"host":"gimp.org"}},{"url":{"redirector":"http://freshmeat.net/urls/cdc7534a3346334eb0475e5cce942380","permalink":"cdc7534a3346334eb0475e5cce942380","label":"Tar/BZ2","id":73883,"host":"ftp.gimp.org"}},{"url":{"redirector":"http://freshmeat.net/urls/a21df0fd379f13d1c0ee3bac7110746e","permalink":"a21df0fd379f13d1c0ee3bac7110746e","label":"Website","id":92856,"host":"gimp.org"}},{"url":{"redirector":"http://freshmeat.net/urls/412f8521ffb44622fad73404c2f07a09","permalink":"412f8521ffb44622fad73404c2f07a09","label":"Git repository","id":124691,"host":"git.gnome.org"}},{"url":{"redirector":"http://freshmeat.net/urls/2953bbbdb430a26ac1af1d918e289440","permalink":"2953bbbdb430a26ac1af1d918e289440","label":"Mac OS X Download","id":148222,"host":"gimp.org"}}]
@@ -0,0 +1,162 @@
1
+ =begin
2
+
3
+ Copyright (c) 2011 Matthew Stump
4
+ freshmeat_spec.rb
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+
18
+ =end
19
+
20
+ require 'rspec'
21
+ require 'spec_helper'
22
+
23
+ describe Freshmeat do
24
+
25
+ def test_project(p)
26
+ p.fid.is_a?(Integer).should == true
27
+ p.permalink.is_a?(String).should == true
28
+ p.name.is_a?(String).should == true
29
+ p.popularity.is_a?(Numeric).should == true
30
+ p.vitality.is_a?(Numeric).should == true
31
+ p.created_at.is_a?(Time).should == true
32
+ p.description.is_a?(String).should == true
33
+ p.user.is_a?(Freshmeat::User).should == true
34
+ p.oneliner.is_a?(String).should == true
35
+ p.project_filters_count.is_a?(Integer).should == true
36
+ p.subscriptions_count.is_a?(Integer).should == true
37
+ p.vote_score.is_a?(Integer).should == true
38
+
39
+ p.license_list.is_a?(Array).should == true
40
+ p.programming_language_list.is_a?(Array).should == true
41
+ p.operating_system_list.is_a?(Array).should == true
42
+ p.tag_list.is_a?(Array).should == true
43
+
44
+ p.license_list.map { |t| t.is_a?(String).should == true }
45
+ p.programming_language_list.map { |t| t.is_a?(String).should == true }
46
+ p.operating_system_list.map { |t| t.is_a?(String).should == true }
47
+ p.tag_list.map { |t| t.is_a?(String).should == true }
48
+
49
+ p.approved_urls.is_a?(Array).should == true
50
+ p.approved_screenshots.is_a?(Array).should == true
51
+ p.recent_releases.is_a?(Array).should == true
52
+
53
+ p.approved_urls.map { |t| t.is_a?(Freshmeat::URL).should == true }
54
+ p.approved_screenshots.map { |t| t.is_a?(Freshmeat::Screenshot).should == true }
55
+ p.recent_releases.map { |t| t.is_a?(Freshmeat::Release).should == true }
56
+ end
57
+
58
+ describe "authcode" do
59
+ it "should require an auth code" do
60
+ lambda { Freshmeat.new }.should raise_error(ArgumentError, "wrong number of arguments (0 for 1)")
61
+ end
62
+
63
+ it "passing auth_code via new should set auth_code" do
64
+ Freshmeat.new("AAA").auth_code.should == "AAA"
65
+ end
66
+ end
67
+
68
+ describe "attributes of a single project: " do
69
+
70
+ FakeWeb.register_uri(:get, "http://freshmeat.net/projects/samba.json?auth_code=AAA", :body => File.read("spec/fixtures/samba.json"))
71
+ FakeWeb.register_uri(:get, "http://freshmeat.net/projects/samba/comments.json?auth_code=AAA", :body => File.read("spec/fixtures/comments.json"))
72
+ FakeWeb.register_uri(:get, "http://freshmeat.net/projects/samba/releases.json?auth_code=AAA", :body => File.read("spec/fixtures/releases.json"))
73
+ FakeWeb.register_uri(:get, "http://freshmeat.net/projects/samba/urls.json?auth_code=AAA", :body => File.read("spec/fixtures/urls.json"))
74
+ FakeWeb.register_uri(:get, "http://freshmeat.net/projects/gimp/screenshots.json?auth_code=AAA", :body => File.read("spec/fixtures/screenshots.json"))
75
+
76
+ it "overview" do
77
+ f = Freshmeat.new("AAA")
78
+ r = f.project("samba")
79
+ r.name.should == "Samba"
80
+ test_project(r)
81
+ end
82
+
83
+ it "comments" do
84
+ f = Freshmeat.new("AAA")
85
+ f.comments("samba").length.should == 4
86
+ f.comments("samba")[0].user_id.should == 33614
87
+ end
88
+
89
+ it "releases" do
90
+ f = Freshmeat.new("AAA")
91
+ r = f.releases("samba")
92
+ r.map { |t| t.fid.is_a?(Integer).should == true }
93
+ r.map { |t| t.changelog.is_a?(String).should == true }
94
+ r.map { |t| (!! t.hidden_from_frontpage == t.hidden_from_frontpage).should == true }
95
+ r.map { |t| t.version.is_a?(String).should == true }
96
+ r.map { |t| t.tag_list.is_a?(Array).should == true }
97
+ r.map { |t| t.approved_at.is_a?(Time).should == true }
98
+ r.map { |t| t.created_at.is_a?(Time).should == true }
99
+ r.length.should == 100
100
+ end
101
+
102
+ it "screenshots" do
103
+ f = Freshmeat.new("AAA")
104
+ r = f.screenshots("gimp")
105
+ r.map { |t| t.fid.is_a?(Integer).should == true }
106
+ r.map { |t| t.created_at.is_a?(Time).should == true }
107
+ r.map { |t| t.absolute_url.is_a?(String).should == true }
108
+ r.map { |t| (t.title == nil || t.title.is_a?(String)).should == true }
109
+ r.length.should == 1
110
+ end
111
+
112
+ it "urls" do
113
+ f = Freshmeat.new("AAA")
114
+ r = f.urls("samba")
115
+ r.length.should == 11
116
+ r.map { |t| t.fid.is_a?(Integer).should == true }
117
+ r.map { |t| t.redirector.is_a?(String).should == true }
118
+ r.map { |t| t.permalink.is_a?(String).should == true }
119
+ r.map { |t| t.label.is_a?(String).should == true }
120
+ r.map { |t| t.host.is_a?(String).should == true }
121
+ end
122
+ end
123
+
124
+ describe "Fetching many projects and tags:" do
125
+ FakeWeb.register_uri(:get, "http://freshmeat.net/search.json?q=foo&page=1&auth_code=AAA", :body => File.read("spec/fixtures/search.json"))
126
+ FakeWeb.register_uri(:get, "http://freshmeat.net/tags/all.json?auth_code=AAA", :body => File.read("spec/fixtures/tags.json"))
127
+ FakeWeb.register_uri(:get, "http://freshmeat.net/tags/960gs.json?auth_code=AAA", :body => File.read("spec/fixtures/tags_960gs.json"))
128
+
129
+ it "all tags" do
130
+ f = Freshmeat.new("AAA")
131
+ r = f.tags()
132
+ r.length.should == 100
133
+ r.map { |t| t.fid.is_a?(Integer).should == true }
134
+ r.map { |t| t.taggings_count.is_a?(Integer).should == true }
135
+ r.map { |t| t.name.is_a?(String).should == true }
136
+ r.map { |t| t.permalink.is_a?(String).should == true }
137
+ r.map { |t| t.projects.is_a?(Array).should == true }
138
+ end
139
+
140
+ it "a particular tag" do
141
+ f = Freshmeat.new("AAA")
142
+ t = f.tag("960gs")
143
+ t.fid.is_a?(Integer).should == true
144
+ t.taggings_count.is_a?(Integer).should == true
145
+ t.name.is_a?(String).should == true
146
+ t.permalink.is_a?(String).should == true
147
+ t.projects.is_a?(Array).should == true
148
+ t.projects.length.should == 2
149
+
150
+ t.projects.map { |p| p.is_a?(Freshmeat::Project).should == true }
151
+ t.projects.map { |p| test_project(p) }
152
+ end
153
+
154
+ it "search" do
155
+ f = Freshmeat.new("AAA")
156
+ r = f.search("foo")
157
+ r.length.should == 10
158
+ r.map { |t| t.is_a?(Freshmeat::Project).should == true }
159
+ r.map { |t| test_project(t) }
160
+ end
161
+ end
162
+ end
@@ -0,0 +1,27 @@
1
+ =begin
2
+
3
+ Copyright (c) 2011 Matthew Stump
4
+ freshmeat_spec.rb
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+
18
+ =end
19
+
20
+ require 'rubygems'
21
+ require 'fakeweb'
22
+
23
+ FakeWeb.allow_net_connect = false
24
+
25
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
26
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
27
+ require 'freshmeat'
metadata ADDED
@@ -0,0 +1,230 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: freshmeat
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
+ prerelease:
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 0
10
+ version: 1.0.0
11
+ platform: ruby
12
+ authors:
13
+ - Matthew Stump
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-03-18 00:00:00 -07:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ hash: 11
28
+ segments:
29
+ - 0
30
+ - 4
31
+ - 2
32
+ version: 0.4.2
33
+ version_requirements: *id001
34
+ name: httparty
35
+ prerelease: false
36
+ type: :runtime
37
+ - !ruby/object:Gem::Dependency
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ hash: 23
44
+ segments:
45
+ - 1
46
+ - 0
47
+ - 0
48
+ version: 1.0.0
49
+ version_requirements: *id002
50
+ name: bundler
51
+ prerelease: false
52
+ type: :development
53
+ - !ruby/object:Gem::Dependency
54
+ requirement: &id003 !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ~>
58
+ - !ruby/object:Gem::Version
59
+ hash: 7
60
+ segments:
61
+ - 1
62
+ - 5
63
+ - 2
64
+ version: 1.5.2
65
+ version_requirements: *id003
66
+ name: jeweler
67
+ prerelease: false
68
+ type: :development
69
+ - !ruby/object:Gem::Dependency
70
+ requirement: &id004 !ruby/object:Gem::Requirement
71
+ none: false
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ hash: 3
76
+ segments:
77
+ - 0
78
+ version: "0"
79
+ version_requirements: *id004
80
+ name: rcov
81
+ prerelease: false
82
+ type: :development
83
+ - !ruby/object:Gem::Dependency
84
+ requirement: &id005 !ruby/object:Gem::Requirement
85
+ none: false
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ hash: 11
90
+ segments:
91
+ - 0
92
+ - 4
93
+ - 2
94
+ version: 0.4.2
95
+ version_requirements: *id005
96
+ name: httparty
97
+ prerelease: false
98
+ type: :runtime
99
+ - !ruby/object:Gem::Dependency
100
+ requirement: &id006 !ruby/object:Gem::Requirement
101
+ none: false
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ hash: 27
106
+ segments:
107
+ - 2
108
+ - 5
109
+ - 0
110
+ version: 2.5.0
111
+ version_requirements: *id006
112
+ name: rspec
113
+ prerelease: false
114
+ type: :development
115
+ - !ruby/object:Gem::Dependency
116
+ requirement: &id007 !ruby/object:Gem::Requirement
117
+ none: false
118
+ requirements:
119
+ - - ~>
120
+ - !ruby/object:Gem::Version
121
+ hash: 7
122
+ segments:
123
+ - 1
124
+ - 5
125
+ - 2
126
+ version: 1.5.2
127
+ version_requirements: *id007
128
+ name: jeweler
129
+ prerelease: false
130
+ type: :development
131
+ - !ruby/object:Gem::Dependency
132
+ requirement: &id008 !ruby/object:Gem::Requirement
133
+ none: false
134
+ requirements:
135
+ - - ~>
136
+ - !ruby/object:Gem::Version
137
+ hash: 23
138
+ segments:
139
+ - 1
140
+ - 0
141
+ - 0
142
+ version: 1.0.0
143
+ version_requirements: *id008
144
+ name: bundler
145
+ prerelease: false
146
+ type: :development
147
+ - !ruby/object:Gem::Dependency
148
+ requirement: &id009 !ruby/object:Gem::Requirement
149
+ none: false
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ hash: 27
154
+ segments:
155
+ - 1
156
+ - 3
157
+ - 0
158
+ version: 1.3.0
159
+ version_requirements: *id009
160
+ name: fakeweb
161
+ prerelease: false
162
+ type: :development
163
+ description: A simple wrapper around the Freshmeat.net API
164
+ email: mstump@matthewstump.com
165
+ executables: []
166
+
167
+ extensions: []
168
+
169
+ extra_rdoc_files:
170
+ - LICENSE.txt
171
+ - README.rdoc
172
+ files:
173
+ - .document
174
+ - Gemfile
175
+ - LICENSE.txt
176
+ - README.rdoc
177
+ - Rakefile
178
+ - VERSION
179
+ - freshmeat.gemspec
180
+ - lib/freshmeat.rb
181
+ - lib/freshmeat/data.rb
182
+ - spec/fixtures/comments.json
183
+ - spec/fixtures/dependencies.json
184
+ - spec/fixtures/localhost.json
185
+ - spec/fixtures/releases.json
186
+ - spec/fixtures/samba.json
187
+ - spec/fixtures/screenshots.json
188
+ - spec/fixtures/search.json
189
+ - spec/fixtures/tags.json
190
+ - spec/fixtures/tags_960gs.json
191
+ - spec/fixtures/urls.json
192
+ - spec/freshmeat_spec.rb
193
+ - spec/spec_helper.rb
194
+ has_rdoc: true
195
+ homepage: http://github.com/mrevil/freshmeat
196
+ licenses:
197
+ - Apache
198
+ post_install_message:
199
+ rdoc_options: []
200
+
201
+ require_paths:
202
+ - lib
203
+ required_ruby_version: !ruby/object:Gem::Requirement
204
+ none: false
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ hash: 3
209
+ segments:
210
+ - 0
211
+ version: "0"
212
+ required_rubygems_version: !ruby/object:Gem::Requirement
213
+ none: false
214
+ requirements:
215
+ - - ">="
216
+ - !ruby/object:Gem::Version
217
+ hash: 3
218
+ segments:
219
+ - 0
220
+ version: "0"
221
+ requirements: []
222
+
223
+ rubyforge_project:
224
+ rubygems_version: 1.6.1
225
+ signing_key:
226
+ specification_version: 3
227
+ summary: A simple wrapper around the Freshmeat.net API
228
+ test_files:
229
+ - spec/freshmeat_spec.rb
230
+ - spec/spec_helper.rb