junebug 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/junebug.rb ADDED
@@ -0,0 +1,50 @@
1
+ $:.unshift File.dirname(__FILE__) # for running in foreground in dev
2
+
3
+ require 'rubygems'
4
+ require_gem 'camping', '>=1.5'
5
+ require 'camping/session'
6
+
7
+ Camping.goes :Junebug
8
+
9
+ require 'junebug/helpers'
10
+ require 'junebug/models'
11
+ require 'junebug/views'
12
+ require 'junebug/controllers'
13
+
14
+ require 'yaml'
15
+ require 'mongrel'
16
+ require 'fileutils'
17
+
18
+ module Junebug
19
+ include Camping::Session
20
+
21
+ def self.create
22
+ Junebug::Models.create_schema :assume => (Junebug::Models::Page.table_exists? ? 1.0 : 0.0)
23
+ Camping::Models::Session.create_schema
24
+ end
25
+
26
+ def self.config
27
+ @config ||= YAML.load(File.read('config.yml'))
28
+ end
29
+ end
30
+
31
+ # ENV.each do |key,value|
32
+ # puts "#{key}: #{value}"
33
+ # end
34
+
35
+ if __FILE__ == $0 || ENV['DAEMONS_ARGV']
36
+ # When using daemons, the current dir is /
37
+ # So we need to set it to the junebug root
38
+ FileUtils.cd ENV['JUNEBUG_ROOT'] if ENV['JUNEBUG_ROOT']
39
+
40
+ Junebug::Models::Base.establish_connection :adapter => 'sqlite3', :database => 'junebug.db'
41
+ Junebug::Models::Base.logger = Logger.new('junebug.log')
42
+ Junebug::Models::Base.threaded_connections=false
43
+ Junebug.create
44
+
45
+ server = Mongrel::Camping::start( Junebug.config['host'], Junebug.config['port'], Junebug.config['sitepath'], Junebug)
46
+
47
+ puts "** Junebug is running at http://#{Junebug.config['host']}:#{Junebug.config['port']}#{Junebug.config['sitepath']}"
48
+
49
+ server.run.join
50
+ end
metadata ADDED
@@ -0,0 +1,120 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.9.0
3
+ specification_version: 1
4
+ name: junebug
5
+ version: !ruby/object:Gem::Version
6
+ version: 0.0.3
7
+ date: 2006-11-01 00:00:00 -08:00
8
+ summary: Junebug is a minimalist ruby wiki.
9
+ require_paths:
10
+ - lib
11
+ email: tim.myrtle@gmail.com
12
+ homepage: http://www.junebugwiki.com/
13
+ rubyforge_project:
14
+ description: Junebug is a minimalist ruby wiki.
15
+ autorequire:
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: false
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
29
+ authors:
30
+ - Tim Myrtle
31
+ files:
32
+ - README
33
+ - LICENSE
34
+ - lib/acts_as_versioned.rb
35
+ - lib/junebug
36
+ - lib/junebug.rb
37
+ - lib/junebug/config.rb
38
+ - lib/junebug/controllers.rb
39
+ - lib/junebug/diff.rb
40
+ - lib/junebug/generator.rb
41
+ - lib/junebug/helpers.rb
42
+ - lib/junebug/models.rb
43
+ - lib/junebug/views.rb
44
+ - deploy/config.yml
45
+ - deploy/console
46
+ - deploy/static
47
+ - deploy/wiki
48
+ - deploy/static/base.css
49
+ - deploy/static/yui
50
+ - deploy/static/yui/fonts.css
51
+ - deploy/static/yui/grids.css
52
+ - deploy/static/yui/reset.css
53
+ - fixtures/junebug_pages.yml
54
+ test_files: []
55
+
56
+ rdoc_options: []
57
+
58
+ extra_rdoc_files: []
59
+
60
+ executables:
61
+ - junebug
62
+ extensions: []
63
+
64
+ requirements: []
65
+
66
+ dependencies:
67
+ - !ruby/object:Gem::Dependency
68
+ name: mongrel
69
+ version_requirement:
70
+ version_requirements: !ruby/object:Gem::Version::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 0.3.13.4
75
+ version:
76
+ - !ruby/object:Gem::Dependency
77
+ name: camping
78
+ version_requirement:
79
+ version_requirements: !ruby/object:Gem::Version::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: "1.5"
84
+ version:
85
+ - !ruby/object:Gem::Dependency
86
+ name: RedCloth
87
+ version_requirement:
88
+ version_requirements: !ruby/object:Gem::Version::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 3.0.4
93
+ version:
94
+ - !ruby/object:Gem::Dependency
95
+ name: daemons
96
+ version_requirement:
97
+ version_requirements: !ruby/object:Gem::Version::Requirement
98
+ requirements:
99
+ - - ">"
100
+ - !ruby/object:Gem::Version
101
+ version: 0.0.0
102
+ version:
103
+ - !ruby/object:Gem::Dependency
104
+ name: sqlite3-ruby
105
+ version_requirement:
106
+ version_requirements: !ruby/object:Gem::Version::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: 1.1.0.1
111
+ version:
112
+ - !ruby/object:Gem::Dependency
113
+ name: activerecord
114
+ version_requirement:
115
+ version_requirements: !ruby/object:Gem::Version::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: 1.14.4
120
+ version: