blogical 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,25 @@
1
+ source 'http://rubygems.org'
2
+
3
+ # Bundler. If you're on shared hosting where you don't get local gems (I'm
4
+ # looking at you, DreamHost), you'll have to unpack the first version manually.
5
+ gem 'bundler'
6
+
7
+ gem 'sinatra' # Sinatra itself
8
+ gem 'uuidtools' # Create UUIDs from various sources
9
+ gem 'chronic' # A date and time parser
10
+ gem 'ratom' # Builds ATOM files
11
+ gem 'rdiscount' # A Markdown processor
12
+
13
+ gem 'ruby-debug', :group => :development
14
+
15
+ #gem 'haml'
16
+ #gem 'less'
17
+
18
+ #gem 'json'
19
+ #gem 'mime-types', :require_as => 'mime/types'
20
+ #gem 'hoptoad_notifier', :group => :production
21
+
22
+ # Gems used with testing only
23
+ #gem 'cucumber', :group => :test
24
+ #gem 'webrat', :group => :test
25
+ #gem 'rspec', :group => :test, :require_as => 'spec'
data/README.markdown ADDED
@@ -0,0 +1,21 @@
1
+ Blogical
2
+ ========
3
+
4
+ http://github.com/cjheath/blogical
5
+
6
+ Blogical is a Sinatra-based micro-blogging engine that requires no database support.
7
+
8
+ It supports Markdown, and produces ATOM feeds from your metadata. It can run in various
9
+ limited hosted environments, including free Heroku server and on DreamHost.
10
+
11
+ Blogical does not support comments, and is built for only a single author.
12
+
13
+ Copyright
14
+ ---------
15
+
16
+ Blogical is available under the MIT license.
17
+
18
+ Credits
19
+ -------
20
+
21
+ Blogical is derived from Marcus Crafter's "jd" code.
data/app/blogical.rb ADDED
@@ -0,0 +1,32 @@
1
+ require 'rubygems'
2
+ require 'sinatra/base'
3
+
4
+ require 'uuidtools'
5
+ require 'chronic'
6
+ require 'atom'
7
+
8
+ require 'blogical/blog'
9
+ require 'blogical/atom'
10
+ require 'blogical/content'
11
+ require 'blogical/helpers'
12
+ require 'blogical/extensions'
13
+
14
+ module Blogical
15
+ class Application < Sinatra::Base
16
+ BLOGICAL_ROOT = File.dirname(File.dirname(File.expand_path(__FILE__))) unless defined?(BLOGICAL_ROOT)
17
+ BLOGICAL_CONTENT_ROOT = File.join(BLOGICAL_ROOT, 'content') unless defined?(BLOGICAL_CONTENT_ROOT)
18
+ set :content, BLOGICAL_CONTENT_ROOT
19
+ set :public, 'public'
20
+ enable :raise_errors
21
+ enable :logging
22
+
23
+ get '/blog/info' do
24
+ "Running Blogical " # + version number
25
+ end
26
+
27
+ include Blogical::Blog
28
+ include Blogical::Atom
29
+ include Blogical::Content
30
+ include Blogical::Helpers
31
+ end
32
+ end
data/config.ru ADDED
@@ -0,0 +1,64 @@
1
+ #
2
+ # A Sinatra startup file for using bundled gems and multiple applications
3
+ #
4
+ # The applications are expected to be under the apps directory.
5
+ #
6
+ begin
7
+ require 'rubygems'
8
+ require 'bundler'
9
+ rescue LoadError
10
+ # This is required on some shared hosting environments where local gems won't get picked up:
11
+ # Change it to the path of your unpacked bundler:
12
+ require 'gems/bundler-0.9.26/lib/bundler.rb'
13
+ end
14
+ Bundler.setup
15
+
16
+ # We don't want to use the traditional global style with Sinatra, so just require /base:
17
+ require 'sinatra/base'
18
+
19
+ # Again, some shared hosting doesn't allow us to create a file in the logs directory
20
+ log = File.new("sinatra.log", "a+")
21
+ STDOUT.reopen(log)
22
+ STDERR.reopen(log)
23
+
24
+ path = File.dirname(File.expand_path(__FILE__))
25
+ $:.unshift path+"/app"
26
+
27
+ # Set config settings for Blogical. You should edit things in here:
28
+ def configure(ba)
29
+ root = File.dirname(File.expand_path(__FILE__))
30
+ ba.set :views, root + '/views/blogical' # Tell Sinatra where to find the views
31
+ # Configure things for the ATOM feed:
32
+ ba.set :feed_title, "My Name or Domain - Blog"
33
+ ba.set :domain, "my.domain.name"
34
+ ba.set :url, "http://"+ba.domain+"/blog"
35
+ ba.set :full_name, "Your Name Here"
36
+ # Configure the name and email address for display:
37
+ ba.set :nickname, "nickname"
38
+ ba.set :email, "your_email@domain.com"
39
+ # Configure tags to appear on every page:
40
+ ba.set :description_tags, ["my blog", "please edit these"]
41
+ ba.set :keyword_tags, %w{Put your global relevance keywords here}
42
+ ba.set :title, "New Blogical Blog, please edit this"
43
+ ba.set :urchin_account_id, "UA-2825576-1";
44
+ end
45
+
46
+ # Load the applications, skipping them if a LoadError is raised
47
+ begin
48
+ require 'blogical'
49
+ configure(Blogical::Application)
50
+ puts Blogical::Application.content
51
+ use Blogical::Application
52
+ rescue LoadError
53
+ puts "Can't load blogical application"
54
+ end
55
+
56
+ # Modify, delete or duplicate this section to add additional Sinatra applications:
57
+ begin
58
+ require 'your_other_app'
59
+ use YourOther::Application
60
+ rescue LoadError
61
+ puts "Can't load your other application"
62
+ end
63
+
64
+ run Sinatra::Base
data/logs/access.log ADDED
File without changes
data/logs/error.log ADDED
File without changes
data/tmp/restart.txt ADDED
@@ -0,0 +1 @@
1
+ Wed 16 Jun 2010 00:00:00 EST
metadata ADDED
@@ -0,0 +1,75 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: blogical
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Clifford Heath
14
+ - Marcus Crafter
15
+ autorequire:
16
+ bindir: bin
17
+ cert_chain: []
18
+
19
+ date: 2010-07-01 00:00:00 +10:00
20
+ default_executable:
21
+ dependencies: []
22
+
23
+ description: Blogical is a Sinatra-based micro-blogging engine that requires no database support
24
+ email:
25
+ - clifford.heath@gmail.com
26
+ executables: []
27
+
28
+ extensions: []
29
+
30
+ extra_rdoc_files: []
31
+
32
+ files:
33
+ - Gemfile
34
+ - README.markdown
35
+ - config.ru
36
+ - app/blogical.rb
37
+ - logs/access.log
38
+ - logs/error.log
39
+ - tmp/restart.txt
40
+ has_rdoc: true
41
+ homepage: http://github.com/cjheath/blogical
42
+ licenses: []
43
+
44
+ post_install_message:
45
+ rdoc_options: []
46
+
47
+ require_paths:
48
+ - app
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ hash: 3
55
+ segments:
56
+ - 0
57
+ version: "0"
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ hash: 3
64
+ segments:
65
+ - 0
66
+ version: "0"
67
+ requirements: []
68
+
69
+ rubyforge_project:
70
+ rubygems_version: 1.3.7
71
+ signing_key:
72
+ specification_version: 3
73
+ summary: Blogical is a Sinatra-based micro-blogging engine that requires no database support
74
+ test_files: []
75
+