Skip to content

Commit

Permalink
Small improvements in sources
Browse files Browse the repository at this point in the history
  • Loading branch information
Hallison Batista authored and Hallison Batista committed Oct 8, 2010
1 parent 6493fe4 commit ac30a28
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 37 deletions.
1 change: 1 addition & 0 deletions lib/postview.rb
Expand Up @@ -41,6 +41,7 @@ module Postview
require 'optparse'
require 'pathname'
require 'ostruct'
require 'yaml'

# 3rd part libraries/projects.
require 'sinatra/base' unless defined? ::Sinatra::Base
Expand Down
10 changes: 3 additions & 7 deletions lib/postview/application.rb
@@ -1,10 +1,8 @@
module Postview

# Copyright (c) 2009 Hallison Batista
module Application
module Postview::Application

autoload :Blog, 'postview/application/blog'
autoload :Setup, 'postview/application/setup'
autoload :Build, 'postview/application/build'

def self.call(env)
puts <<-end_msg.gsub(/^[ ]{6}/,'')
Expand All @@ -20,7 +18,5 @@ def self.call(env)
Blog.call(env)
end

end # module Application

end # module Postview
end # module Postview::Application

6 changes: 1 addition & 5 deletions lib/postview/authentication.rb
@@ -1,7 +1,5 @@
module Postview

# Copyright (c) 2009 Hallison Batista
module Authentication
module Postview::Authentication

# Returns a HTTP Basic authentication.
def authentication
Expand Down Expand Up @@ -32,5 +30,3 @@ def authenticated?

end # module Authorization

end # module Postview

8 changes: 2 additions & 6 deletions lib/postview/cli.rb
@@ -1,7 +1,5 @@
module Postview

# Copyright (c) 2009 Hallison Batista
module CLI
module Postview::CLI

autoload :CreateCommand, 'postview/cli/create_command'
autoload :ServerCommand, 'postview/cli/server_command'
Expand Down Expand Up @@ -78,7 +76,5 @@ def step &block

end # module Command

end # module CLI

end # module Postview
end # module Postview::CLI

8 changes: 2 additions & 6 deletions lib/postview/helpers.rb
@@ -1,7 +1,5 @@
module Postview

# Copyright (c) 2009 Hallison Batista
module Helpers
module Postview::Helpers

# Site information.
attr_reader :site
Expand Down Expand Up @@ -79,7 +77,5 @@ def count_posts_by_tag(name)
@count_posts_by_tag[name]
end

end # module Helpers

end # module Postview
end # module Postview::Helpers

7 changes: 2 additions & 5 deletions lib/postview/settings.rb
@@ -1,7 +1,5 @@
module Postview

# Copyright (c) 2009 Hallison Batista
class Settings
class Postview::Settings

# Default values that will be used for valid attributes in settings file.
DEFAULTS = {
Expand Down Expand Up @@ -128,6 +126,5 @@ def to_hash
end
end

end # class Settings
end # class Postview::Settings

end # module Postview
8 changes: 2 additions & 6 deletions lib/postview/site.rb
@@ -1,7 +1,5 @@
module Postview

# Copyright (c) 2009 Hallison Batista
class Site
class Postview::Site

# Site title.
attr_accessor :title
Expand Down Expand Up @@ -73,7 +71,5 @@ def self.tokenize(username, password, domain)
Digest::SHA256.hexdigest("$#{username}?#{password}@#{domain}")
end

end # class Site

end #module Postview
end # class Postview::Site

Expand Up @@ -5,7 +5,7 @@
require 'rack/test'
require 'test/customizations'

class BlogApplicationTest < Test::Unit::TestCase
class ApplicationBlogTest < Test::Unit::TestCase

include Rack::Test::Methods

Expand Down
Expand Up @@ -5,7 +5,7 @@
require 'rack/test'
require 'test/customizations'

class SetupApplicationTest < Test::Unit::TestCase
class ApplicationBuildTest < Test::Unit::TestCase

include Rack::Test::Methods

Expand Down

0 comments on commit ac30a28

Please sign in to comment.