Commits

Michael Granger  committed afd0f23

Checkpoint after work on release regexes.

  • Participants
  • Parent commits cef95ed

Comments (0)

Files changed (21)

+--- 
+exclude: !ruby/regexp /tmp$|\.(hg|hoerc|env|DS_Store|rvm(rc|\.gems)|pryrc|tm_.*|keep)|(logs|coverage|benchmarks|experiments|\w+-\d+\.\d+\.\d+)\/|config\.yml$|\.sqlite$|newznab_api_specification\.txt|requests\.json/

File History.rdoc

-## 0.0.1 [2013-04-06] Michael Granger <ged@FaerieMUD.org>
+== v0.0.1 [2013-07-22] Michael Granger <ged@FaerieMUD.org>
 
 Initial release.
 

File Manifest.txt

+ChangeLog
 History.rdoc
+Manifest.txt
+Procfile
 README.rdoc
-Rakefile
-data/newznabr/apps/newznabr_app
+Rakefile.rb
+bin/newznabr
+data/newznabr/apps/newznab-service
+data/newznabr/apps/newznabr-rest-service
+data/newznabr/apps/newznabr-webui
+data/newznabr/defaultcategories.yml
+data/newznabr/defaultgroups.yml
+data/newznabr/defaultregexes.yml
+data/newznabr/static/css/app.css
+data/newznabr/static/css/foundation.css
+data/newznabr/static/css/foundation.min.css
+data/newznabr/static/css/loading.gif
+data/newznabr/static/css/normalize.css
+data/newznabr/static/humans.txt
+data/newznabr/static/index.html
+data/newznabr/static/js/newznabr.js
+data/newznabr/static/js/vendor/angular-cookies.min.js
+data/newznabr/static/js/vendor/angular-loader.min.js
+data/newznabr/static/js/vendor/angular-mobile.min.js
+data/newznabr/static/js/vendor/angular-mocks.js
+data/newznabr/static/js/vendor/angular-resource.min.js
+data/newznabr/static/js/vendor/angular-sanitize.min.js
+data/newznabr/static/js/vendor/angular-scenario.js
+data/newznabr/static/js/vendor/angular.min.js
+data/newznabr/static/js/vendor/custom.modernizr.js
+data/newznabr/static/js/vendor/foundation.min.js
+data/newznabr/static/js/vendor/foundation/foundation.alerts.js
+data/newznabr/static/js/vendor/foundation/foundation.clearing.js
+data/newznabr/static/js/vendor/foundation/foundation.cookie.js
+data/newznabr/static/js/vendor/foundation/foundation.dropdown.js
+data/newznabr/static/js/vendor/foundation/foundation.forms.js
+data/newznabr/static/js/vendor/foundation/foundation.joyride.js
+data/newznabr/static/js/vendor/foundation/foundation.js
+data/newznabr/static/js/vendor/foundation/foundation.magellan.js
+data/newznabr/static/js/vendor/foundation/foundation.orbit.js
+data/newznabr/static/js/vendor/foundation/foundation.placeholder.js
+data/newznabr/static/js/vendor/foundation/foundation.reveal.js
+data/newznabr/static/js/vendor/foundation/foundation.section.js
+data/newznabr/static/js/vendor/foundation/foundation.tooltips.js
+data/newznabr/static/js/vendor/foundation/foundation.topbar.js
+data/newznabr/static/js/vendor/jquery-1.9.1.js
+data/newznabr/static/js/vendor/jquery-2.0.0.js
+data/newznabr/static/js/vendor/zepto.js
+data/newznabr/static/robots.txt
+data/newznabr/static/views/dashboard.html
+data/newznabr/static/views/navmenu.html
+data/newznabr/static/views/settings.html
 data/newznabr/templates/layout.tmpl
 data/newznabr/templates/top.tmpl
+etc/config.yml.sample
+etc/mongrel.rb
 lib/newznabr.rb
+lib/newznabr/binary.rb
+lib/newznabr/category.rb
+lib/newznabr/command.rb
+lib/newznabr/db.rb
+lib/newznabr/exceptions.rb
+lib/newznabr/group.rb
+lib/newznabr/mixins.rb
+lib/newznabr/model.rb
+lib/newznabr/nntpclient.rb
+lib/newznabr/nntpclient/group.rb
+lib/newznabr/nntpclient/response.rb
+lib/newznabr/part.rb
+lib/newznabr/partrepair.rb
+lib/newznabr/release.rb
+lib/newznabr/releasenfo.rb
+lib/newznabr/releaseregex.rb
+lib/sequel/plugins/inline_migrations.rb
+spec/data/caps.json
+spec/data/caps.xml
+spec/data/search.json
+spec/helpers.rb
+spec/newznabr/binary_spec.rb
+spec/newznabr/group_spec.rb
+spec/newznabr/nntpclient/group_spec.rb
+spec/newznabr/nntpclient_spec.rb
 spec/newznabr_spec.rb
+spec/sequel/plugins/inline_migrations_spec.rb
+spec/test-config.yml.example

File data/newznabr/apps/newznab-service

 	ID = 'newznab-service'
 
 	# The version of the Newznab API this service implements
-	API_VERSION = '0.1'
+	API_VERSION_NUM = '0.1'
 
 	# The supported Newznab functions
 	SUPPORTED_FUNCTIONS = %i[
 
 		return {
 			appversion: NewzNabr::VERSION,
-			version:    API_VERSION,
+			version:    API_VERSION_NUM,
 			title:      self.config[:name],
 			strapline:  self.config[:strapline],
 			email:      self.config[:admin_email],

File data/newznabr/defaultcategories.yml

+1000: 'Console'
+1010: 'NDS'
+1020: 'PSP'
+1030: 'Wii'
+1040: 'Xbox'
+1050: 'Xbox 360'
+1060: 'WiiWare/VC'
+1070: 'XBOX 360 DLC'
+1080: 'PS3'
+
+2000: 'Movies'
+2010: 'Foreign'
+2020: 'Other'
+2030: 'SD'
+2040: 'HD'
+
+3000: 'Audio'
+3010: 'MP3'
+3020: 'Video'
+3030: 'Audiobook'
+3040: 'Lossless'
+
+4000: 'PC'
+4010: '0day'
+4020: 'ISO'
+4030: 'Mac'
+4040: 'Phone'
+4050: 'Games'
+
+5000: 'TV'
+5020: 'Foreign'
+5030: 'SD'
+5040: 'HD'
+5050: 'Other'
+5060: 'Sport'
+
+6000: 'XXX'
+6010: 'DVD'
+6020: 'WMV'
+6030: 'XviD'
+6040: 'x264'
+
+7000: 'Other'
+7010: 'Misc'
+7020: 'Ebook'
+7030: 'Comics'
+7040: 'Anime'
+

File data/newznabr/defaultgroups.yml

+alt.binaries.dvdr: "This group contains DVD Movies."
+alt.binaries.boneless: "This group contains XVID and X264 Movies. Some Foreign."
+alt.binaries.multimedia: "This group contains TV, Movies, and Music."
+alt.binaries.movies.divx: "This group contains XVID Movies"
+alt.binaries.games.xbox: "This group contains original XBOX Games."
+alt.binaries.movies.xvid: "This group contains XVID Movies."
+alt.binaries.sony.psp: "This group contains PSP Games."
+alt.binaries.nintendo.ds: "This group contains Nintendo DS Games"
+alt.binaries.games.nintendods: "This group contains Nintendo DS Games "
+alt.binaries.hdtv.x264: "This group contains X264 Movies and HDTV."
+alt.binaries.games.xbox360: "This group contains XBOX 360 Games and DLC."
+alt.binaries.games.wii: "This group contains Nintendo WII Games, WII-Ware, and VC."
+alt.binaries.wmvhd: "This group contains WMVHD Movies."
+alt.binaries.x264: "This group contains X264 Movies and TV."
+alt.binaries.wii: "This group contains Nintendo WII Games, WII-Ware, and VC."
+alt.binaries.moovee: "This group contains XVID and X264 Movies."
+alt.binaries.inner-sanctum: "This group contains PC and Music."
+alt.binaries.warez.smartphone: "This group contains Mobile Phone Apps."
+alt.binaries.teevee: "This group contains X264 and XVID TV."
+alt.binaries.warez: "This group contains PC 0DAY, PC ISO, and PC PHONE."
+alt.binaries.sounds.mp3.complete_cd: "This group contains a variety of Music."
+alt.binaries.mpeg.video.music: "This group contains a variety of Music Videos."
+alt.binaries.mp3: "This group contains a variety of Music."
+alt.binaries.mma: "This group contains MMA/TNA Sport TV."
+alt.binaries.sounds.mp3.classical: "This group contains Classical Music."
+alt.binaries.mac: "This group contains MAC/OSX Software."
+alt.binaries.e-book: "This group contains E-Books."
+alt.binaries.warez.ibm-pc.0-day: "This group contains PC-0Day."
+alt.binaries.tvseries: "This group contains X264 and XVID TV."
+alt.binaries.ath: "This group contains a variety of Music. Some Foreign."
+alt.binaries.ftn: "This group contains a variety of Music and TV."
+alt.binaries.erotica: "This group contains XXX."
+alt.binaries.games: "This group contains PC and Console Games."
+alt.binaries.cores: "This group contains a variety including Nintendo DS. Lots of Foreign."
+alt.binaries.country.mp3: "This group contains Country Music."
+alt.binaries.sounds.mp3.1990s: "This group contains Music from the 1990s."
+alt.binaries.console.ps3: "This group contains PS3 Games."
+alt.binaries.scary.exe.files: "This group contains XVID and X264 Movies."
+alt.binaries.cd.image: "This group contains PC-ISO."
+alt.binaries.e-book.technical: "This group contains E-Books."
+alt.binaries.erotica.divx: "This group contains XXX."
+alt.binaries.test: "This group contains a variety of content."
+alt.binaries.x: "This group contains a variety of content. Some Foreign."
+alt.binaries.hou: "This group contains a variety of content. Mostly Foreign."
+alt.binaries.pro-wrestling: "This group contains WWE Sport TV."
+alt.binaries.sounds.lossless: "This group contains a variety of Lossless Music."
+alt.binaries.comp: "This group contains Warez. Mostly Foreign."
+alt.binaries.warez.quebec-hackers: "This group contains PC-0day. Some Foreign."
+alt.binaries.sounds.mp3.bluegrass: "This group contains Bluegrass Music."
+alt.binaries.sounds.radio.bbc: "This group contains BBC Radio Music"
+alt.binaries.e-book.flood: "This group contains E-Books."
+alt.binaries.movies.erotica: "This group contains XXX"
+alt.binaries.multimedia.documentaries: "This group contains Documentary Movies and TV."
+alt.binaries.sounds.mp3.jazz: "This group contains Jazz Music."
+alt.binaries.multimedia.erotica.amateur: "This group contains XXX."
+alt.binaries.sounds.1960s.mp3: "This group contains Music from the 1960's."
+alt.binaries.sounds.1970s.mp3: "This group contains Music from the 1970's."
+alt.binaries.sounds.mp3.comedy: "This group contains Comedy Audio."
+alt.binaries.sounds.mp3.2000s: "This group contains Music from the 2000's."
+alt.binaries.sounds.mp3.christian: "This group contains Christian Music."
+alt.binaries.sounds.mp3.1950s: "This group contains Music from the 1950's."
+alt.binaries.sounds.mp3.1970s: "This group contains Music from the 1970's."
+alt.binaries.sounds.mp3.1980s: "This group contains Music from the 1980's."
+alt.binaries.mp3.bootlegs: "This group contains Bootleg Music."
+alt.binaries.sounds.mp3: "This group contains a variety of Music."
+alt.binaries.mp3.audiobooks: "This group contains Audio Books."
+alt.binaries.sounds.mp3.rap-hiphop.full-albums: "This group contains Rap and Hip-Hop Music."
+alt.binaries.sounds.mp3.full_albums: "This group contains a variety of Music."
+alt.binaries.multimedia.teen-idols: "This group contains Music from Teen Idols"
+alt.binaries.sounds.mp3.dance: "This group contains Dance Music."
+alt.binaries.warez.uk.mp3: "This group contains a variety of Music."
+alt.binaries.sounds.mp3.heavy-metal: "This group contains Heavy Metal Music."
+alt.binaries.multimedia.cartoons: "This group contains Cartoon TV and Movies."
+alt.binaries.multimedia.sports: "This group contains Sports TV and Movies."
+alt.binaries.multimedia.anime: "This group contains Anime TV and Movies."
+alt.binaries.sounds.lossless.classical: "This group contains lossless Classical Music."
+alt.binaries.multimedia.disney: "This group contains Disney TV and Movies."
+alt.binaries.sounds.mp3.nospam: "This group contains a variety of Music."
+alt.binaries.multimedia.sitcoms: "This group contains Sitcom TV."
+alt.binaries.sounds.radio.british: "This group contains British Radio Music."
+alt.binaries.multimedia.comedy.british: "This group contains British Comedy TV and Movies."
+alt.binaries.etc: "This group contains a variety of items."
+alt.binaries.misc: "This group contains a variety of items."
+alt.binaries.sounds.mp3.rock: "This group contains Rock Music."
+alt.binaries.dc: "This group contains XVID and X264 Movies and TV. Mostly Foreign."
+alt.binaries.documentaries: "This group contains Documentaries TV and Movies."
+alt.binaries.cd.lossless: "This group contains a variety of lossless Music."
+alt.binaries.sounds.audiobooks.repost: "This group contains Audiobooks."
+alt.binaries.highspeed: "This group contains XVID Movies. Mostly Foreign."
+alt.binaries.bloaf: "This group contains a variety. Mostly Foreign."
+alt.binaries.big: "This group contains XVID Movies. Mostly Foreign."
+alt.binaries.sounds.mp3.musicals: "This group contains Musicals Music."
+alt.binaries.sound.mp3: "This group contains a variety of Music."
+alt.binaries.sounds.mp3.jazz.vocals: "This group contains Jazz Vocal Music."
+alt.binaries.dvd.movies: "This group contains DVDR Movies."
+alt.binaries.ebook: "This group contains Ebook\'s."
+alt.binaries.sounds.mp3.disco: "This group contains Disco Music."
+alt.binaries.mp3.full_albums: "This group contains a variety of Music."
+alt.binaries.tv: "This group contains XVID TV."
+alt.binaries.sounds.lossless.country: "This group contains lossless Country Music."
+alt.binaries.uzenet: "This group contains XXX. Some Foreign."
+alt.binaries.mom: "This group contains a variety. Mostly Foreign."
+alt.binaries.ijsklontje: "This group contains XXX."
+alt.binaries.sounds.lossless.1960s: "This group contains lossless 1960\'s Music."
+alt.binaries.sounds.mp3.emo: "This group contains Emo Music."
+alt.binaries.classic.tv.shows: "This group contains Classic TV and Movies."
+alt.binaries.dgma: "This group contains XVID Movies. Mostly Foreign."
+alt.binaries.sounds.mp3.opera: "This group contains Opera Music."
+alt.binaries.ipod.videos: "This group contains Mobile TV and Movies."
+alt.binaries.music.opera: "This group contains Opera Music."
+alt.binaries.sounds.flac.jazz: "This group contains lossless Jazz Music."
+alt.binaries.multimedia.tv: "This group contains XVID and X264 TV."
+alt.binaries.sounds.whitburn.pop: "This group contains Pop Music."
+alt.binaries.sound.audiobooks: "This group contains Audiobooks."
+alt.binaries.sounds.mp3.acoustic: "This group contains Accoustic Music."
+alt.binaries.u-4all: "This group contains XVID TV and Movies. Mostly Foreign."
+alt.binaries.sounds.mp3.progressive-country: "This group contains Country Music."
+alt.binaries.multimedia.classic-films: "This group contains Classic TV and Movies."
+alt.binaries.music.flac: "This group contains a variety of lossless Music"
+alt.binaries.ghosts: "This group contains XVID TV and Movies. Mostly Foreign."
+alt.binaries.town: "This group contains XVID TV and Movies. Mostly Foreign."

File data/newznabr/defaultregexes.yml

+---
+1:
+  groupname: alt.binaries.*
+  regex: ^(?<name>[[:alnum:]]+(?:\.|_)[[:alnum:]\(\)\.\-_\\']+-[[:alnum:]&\)]+)\s"?[a-z0-9\.\-_\+]+"?$
+  ordinal: 15
+  active: true
+  description: ''
+  category_id: 
+2:
+  groupname: alt.binaries.*
+  regex: ^\[ (?<name>[^\]]*?) \]\-\[(?<parts>\d{1,3}\/\d{1,3})\]
+  ordinal: 3
+  active: true
+  description: ''
+  category_id: 

File data/newznabr/static/img/.keep

+

File lib/newznabr/binary.rb

 
 
 	### Create or fetch a Binary for the given +group+ from the data in the given
-	### +overview+, which should match be of the same form as the Hash returned from 
+	### +overview+, which should match be of the same form as the Hash returned from
 	### NewzNabr::NNTPClient#overview. The message the +overview+ is from will be
 	### aded as a Part if it isn't already.
 	def self::from_overview( overview, group )

File lib/newznabr/category.rb

 		children: { name: :direct_subcategories },
 		descendants: { name: :subcategories }
 
-	# Allow primary key assignment, since some IDs are fixed
-	unrestrict_primary_key
-
 	# Define the schema. If you're changing this, you should also be defining
 	# a migration.
 	set_schema do
 	subset :toplevel, :parent_id => nil
 
 
-	### Return a string describing the category in relation to its 
+	### Return a string describing the category in relation to its
 	### parents (if it has any); the +separator+ will be used between
 	### the levels of the hierarchy.
 	def hierarchical_name( separator=' > ' )

File lib/newznabr/command.rb

 	command :init do |c|
 		c.action do |global_options, options, args|
 			NewzNabr::DB.migrate
-			NewzNabr::DB.preload_groups
-			NewzNabr::DB.preload_categories
+			NewzNabr::DB.preload_tables
 		end
 	end
 

File lib/newznabr/db.rb

 	end
 
 
+	### Load all of the default data from the YAML files in the data dir.
+	def self::preload_tables
+		self.connection.transaction do
+			self.preload_groups
+			self.preload_categories
+			self.preload_regexes
+		end
+	end
+
+
 	### Load the default group list into the database.
 	def self::preload_groups
 		datadir = NewzNabr::DATA_DIR
 		categories = YAML.load_file( categorylist ) or
 			raise "Failed to load default category list."
 
+		# Allow primary key assignment, since some IDs are fixed
+		NewzNabr::Category.unrestrict_primary_key
 		NewzNabr::Category.db.transaction do
 			self.log.info "Adding %d categories:" % [ categories.length ]
 			categories.each do |id, name|
 	end
 
 
+	### Load the default release regexp list into the database.
+	def self::preload_regexes
+		datadir = NewzNabr::DATA_DIR
+		regexlist = datadir + 'defaultregexes.yml'
+		regexes = YAML.load_file( regexlist ) or
+			raise "Failed to load default regex list."
+
+		NewzNabr::ReleaseRegex.unrestrict_primary_key
+		NewzNabr::ReleaseRegex.db.transaction do
+			self.log.info "Adding %d regexes:" % [ regexes.length ]
+			regexes.each do |id, fields|
+				self.log.debug "  #{id}: #{fields['regex']}..."
+				NewzNabr::ReleaseRegex.create( fields.merge(id: id) )
+			end
+			self.log.info "done. Committing..."
+		end
+	end
+
+
 	### Drop the 'newznabr' schema.
 	def self::drop_schema
 		self.with_admin_role do

File lib/newznabr/group.rb

 	end
 
 
-	### Set up a group that doesn't have a 'last_article_read' based on the +earliest_date+ 
+	### Set up a group that doesn't have a 'last_article_read' based on the +earliest_date+
 	### specified.
 	def setup_new_group( nntpclient, earliest_date )
 		self.log.debug "Setting up new group."

File lib/newznabr/mixins.rb

 	end # module MethodUtilities
 
 
-	### A collection of methods to add to Numeric for convenience (stolen from 
+	### A collection of methods to add to Numeric for convenience (stolen from
 	### ActiveSupport)
 	module NumericConstantMethods
 
 			alias_method :year, :years
 
 
-			### Returns the Time <receiver> number of seconds before the 
+			### Returns the Time <receiver> number of seconds before the
 			### specified +time+. E.g., 2.hours.before( header.expiration )
 			def before( time )
 				return time - self
 			end
 
 
-			### Returns the Time <receiver> number of seconds ago. (e.g., 
+			### Returns the Time <receiver> number of seconds ago. (e.g.,
 			### expiration > 2.hours.ago )
 			def ago
 				return self.before( ::Time.now )
 			end
 
 
-			### Return a string describing approximately the amount of time in 
+			### Return a string describing approximately the amount of time in
 			### <receiver> number of seconds.
 			def timeperiod
 				return case

File lib/newznabr/model.rb

 		end
 
 
-		### TSort API -- yield each model class. 
+		### TSort API -- yield each model class.
 		def self::tsort_each_node( &block )
 			self.descendents.select {|model| model.name }.each( &block )
 		end

File lib/newznabr/nntpclient.rb

 #   # Iterators
 #   nc.articles.each {|article| ... }
 #   nc.headers.each {|header| ... }
-#   
+#
 class NewzNabr::NNTPClient
 	extend Loggability,
 	       Configurability,
 	### select. The values of the Hash are of the form:
 	###
 	###   {
-	###   	:lwm    => <low-water mark>,
-	###   	:hwm    => <high-water mark>,
+	###     :lwm    => <low-water mark>,
+	###     :hwm    => <high-water mark>,
 	###     :status => <status>
 	###   }
 	###
 			# self.log.debug "  got group line: %p" % [ line ]
 			name, hwm, lwm, status = line.chomp.split( /\s+/, 4 )
 			# self.log.debug "  split into: name=%p, hwm=%p, lwm=%p, status=%p" %
-			# 	[ name, hwm, lwm, status ]
+			#    [ name, hwm, lwm, status ]
 			hash[ name ] = {
 				lwm:    Integer( lwm ),
 				hwm:    Integer( hwm ),
 
 
 	### Fetch the header of the specified +article+; defaults to whatever
-	### the server considers as the "current" article.	
+	### the server considers as the "current" article.
 	def head( article=nil )
 		res = self.send_command( :head, article )
 		return Mail::Header.new( res.body )
 	alias_method :header, :head
 
 
-	### Fetch the order in which header information is stored in the overview 
-	### databases for each news group. Returns an Array of the names of 
+	### Fetch the order in which header information is stored in the overview
+	### databases for each news group. Returns an Array of the names of
 	### headers, as Strings.
 	def list_overview_format
 		return self.cached( :overview_format ) do
 	end
 
 
-	### Return an Enumerator that will read overview records in the specified +format+ from the 
+	### Return an Enumerator that will read overview records in the specified +format+ from the
 	### specified +response+ and yield each one as it's read.
 	def parse_overviews( format, response )
 		response.expect_status( 224 )

File lib/newznabr/nntpclient/response.rb

 require 'newznabr/nntpclient' unless defined?( NewzNabr::NNTPClient )
 
 
-# An NNTP server response.	
+# An NNTP server response.
 class NewzNabr::NNTPClient::Response
 	extend Loggability
 	include Enumerable
 
 	# The first digit of the response broadly indicates the success,
 	#    failure, or progress of the previous command:
-	# 
+	#
 	#       1xx - Informative message
 	#       2xx - Command completed OK
 	#       3xx - Command OK so far; send the rest of it
 	#       4xx - Command was syntactically correct but failed for some reason
 	#       5xx - Command unknown, unsupported, unavailable, or syntax error
-	# 
+	#
 	#    The next digit in the code indicates the function response category:
-	# 
+	#
 	#       x0x - Connection, setup, and miscellaneous messages
 	#       x1x - Newsgroup selection
 	#       x2x - Article selection

File lib/newznabr/releaseregex.rb

 
 class NewzNabr::ReleaseRegex < NewzNabr::Model( :newznabr__release_regexes )
 
+
 	# Define the schema. If you're changing this, you should also be defining
 	# a migration.
 	set_schema do
 
 end # class NewzNabr::ReleaseRegex
 
-

File lib/sequel/plugins/inline_migrations.rb

 		}
 
 
-		### Migrates the supplied +db+ (a Sequel::Database) using the migrations declared in the 
-		### given +baseclass+. The +baseclass+ is the class to gather migrations from; it and all 
+		### Migrates the supplied +db+ (a Sequel::Database) using the migrations declared in the
+		### given +baseclass+. The +baseclass+ is the class to gather migrations from; it and all
 		### of its concrete descendents will be considered.
 		###
 		### The +options+ this method understands:
 		###
 		### [:column]
-		###   The column in the table that stores the migration version. Defaults to 
+		###   The column in the table that stores the migration version. Defaults to
 		###   ':version'.
 		### [:current]
-		###   The current version of the database.  If not given, it is retrieved from the 
+		###   The current version of the database.  If not given, it is retrieved from the
 		###   database using the :table and :column options.
 		### [:table]
 		###   The name of the migrations table. Defaults to :schema_migrations.
 
 
 		### Returns any migration objects found in the migrating subclass or any of its
-		### descendents as an Array of Sequel::SimpleMigration objects, sorted by the migration 
+		### descendents as an Array of Sequel::SimpleMigration objects, sorted by the migration
 		### name and the name of its migrating class.
 		def all_migrations
 			migrations = self.all_migrating_model_classes.

File spec/helpers.rb

 		Strelka.load_config( 'spec/test-config.yml' )
 		NewzNabr::DB.create_schema
 		NewzNabr::DB.migrate
-		NewzNabr::DB.preload_categories
-		NewzNabr::DB.preload_groups
+		NewzNabr::DB.preload_tables
 	end
 
 
 		NewzNabr::DB.drop_schema
 	end
 
-
-	### Load 
-	def load_fixtured_event_data( event_type )
-		headfile = DATA_DIR + Pathname.glob( "#{DATADIR + event_type.to_s}.*.head" ).first
-		bodyfile = DATA_DIR + Pathname.glob( "#{DATADIR + event_type.to_s}.*.body" ).first
-
-		timestamp = headfile.basename.to_s.split('.')[1]
-		time = Time.strptime( timestamp, '%Y%m%d_%H%M%S' )
-
-		return NewzNabr::Event.parse( time, headfile.read, bodyfile.read )
-	end
-
 end # module NewzNabr::DBSpecHelpers
 
 

File spec/newznabr/nntpclient_spec.rb

 		end
 
 
-		it 'can fetch the list of ' 
+		it 'can fetch the list of groups'
 
 		it "automatically sets the SSL version to :TLSv1.1 if connecting on the default port" do
 			ctx = stub( "SSL context" )