autumn 3.1.8 → 3.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +1 -1
- data/CHANGELOG +8 -0
- data/MANIFEST +8 -1
- data/README +2 -0
- data/README.textile +2 -0
- data/Rakefile +2 -0
- data/autumn.gemspec +8 -2
- data/lib/autumn/version.rb +1 -1
- data/lib/skel/Rakefile +10 -117
- data/lib/skel/log/testing.log +1 -0
- data/lib/skel/tasks/app.rake +29 -0
- data/lib/skel/tasks/db.rake +30 -0
- data/lib/skel/tasks/doc.rake +19 -0
- data/lib/skel/tasks/gem_installer.rake +76 -0
- data/lib/skel/tasks/log.rake +27 -0
- data/lib/skel/tasks/setup.rake +19 -0
- data/lib/skel/tasks/spec.rake +16 -0
- data/tasks/setup.rake +10 -15
- metadata +29 -2
- data/tasks/yard.rake +0 -4
data/AUTHORS
CHANGED
@@ -2,7 +2,7 @@ Following persons have contributed to autumn.
|
|
2
2
|
(Sorted by number of submitted patches, then alphabetically)
|
3
3
|
|
4
4
|
113 Tim Morgan <riscfuture@gmail.com>
|
5
|
-
|
5
|
+
29 TJ Vanderpoel <bougy.man@gmail.com>
|
6
6
|
3 Dale Campbell <dale@save-state.net>
|
7
7
|
1 bterlson <btthalion@gmail.com>
|
8
8
|
1 comboy <kacper.ciesla@gmail.com>
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
[6fa0854 | Sun May 03 20:04:59 UTC 2009] TJ Vanderpoel <bougy.man@gmail.com>
|
2
|
+
|
3
|
+
* Version 3.1.9 Separated skel/ rake tasks, got rake setup to install all deps for running initial app
|
4
|
+
|
5
|
+
[b3bb82c | Sun May 03 20:03:35 UTC 2009] TJ Vanderpoel <bougy.man@gmail.com>
|
6
|
+
|
7
|
+
* refactored skel/ specs for better separation. got rake setup to install all deps needed to run skel/ application
|
8
|
+
|
1
9
|
[17403cc | Sun May 03 17:01:31 UTC 2009] TJ Vanderpoel <bougy.man@gmail.com>
|
2
10
|
|
3
11
|
* added AUTHORS as std release file
|
data/MANIFEST
CHANGED
@@ -83,10 +83,18 @@ lib/skel/leaves/scorekeeper/views/history.txt.erb
|
|
83
83
|
lib/skel/leaves/scorekeeper/views/points.txt.erb
|
84
84
|
lib/skel/leaves/scorekeeper/views/usage.txt.erb
|
85
85
|
lib/skel/log/README
|
86
|
+
lib/skel/log/testing.log
|
86
87
|
lib/skel/script/console
|
87
88
|
lib/skel/script/destroy
|
88
89
|
lib/skel/script/generate
|
89
90
|
lib/skel/shared/README
|
91
|
+
lib/skel/tasks/app.rake
|
92
|
+
lib/skel/tasks/db.rake
|
93
|
+
lib/skel/tasks/doc.rake
|
94
|
+
lib/skel/tasks/gem_installer.rake
|
95
|
+
lib/skel/tasks/log.rake
|
96
|
+
lib/skel/tasks/setup.rake
|
97
|
+
lib/skel/tasks/spec.rake
|
90
98
|
lib/skel/tmp/README
|
91
99
|
spec/authentication_spec.rb
|
92
100
|
spec/channel_leaf_spec.rb
|
@@ -107,4 +115,3 @@ tasks/release.rake
|
|
107
115
|
tasks/reversion.rake
|
108
116
|
tasks/setup.rake
|
109
117
|
tasks/spec.rake
|
110
|
-
tasks/yard.rake
|
data/README
CHANGED
@@ -29,6 +29,8 @@ optionally use the Chronic gem to enhance its textual date parsing. The other
|
|
29
29
|
example bot, Insulter, is much simpler and can run under any Autumn
|
30
30
|
configuration.
|
31
31
|
|
32
|
+
If you wish to install all possible dependencies, use <tt>rake setup</tt>
|
33
|
+
|
32
34
|
== Directory Structure
|
33
35
|
|
34
36
|
An Autumn installation is like a Ruby on Rails installation: There is a
|
data/README.textile
CHANGED
@@ -27,6 +27,8 @@ optionally use the Chronic gem to enhance its textual date parsing. The other
|
|
27
27
|
example bot, Insulter, is much simpler and can run under any Autumn
|
28
28
|
configuration.
|
29
29
|
|
30
|
+
If you wish to install all possible dependencies, use @rake setup@
|
31
|
+
|
30
32
|
h2. Directory Structure
|
31
33
|
|
32
34
|
An Autumn installation is like a Ruby on Rails installation: There is a
|
data/Rakefile
CHANGED
@@ -45,6 +45,8 @@ GEMSPEC = Gem::Specification.new{|s|
|
|
45
45
|
|
46
46
|
s.add_dependency('facets')
|
47
47
|
s.add_dependency('anise')
|
48
|
+
s.add_dependency('english')
|
49
|
+
s.add_dependency('daemons')
|
48
50
|
|
49
51
|
s.post_install_message = <<MESSAGE.strip
|
50
52
|
============================================================
|
data/autumn.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{autumn}
|
5
|
-
s.version = "3.1.
|
5
|
+
s.version = "3.1.9"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Tim 'riscfuture' Morgan"]
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.description = %q{Autumn is a simple and modular irc framework}
|
12
12
|
s.email = %q{bougy.man@gmail.com}
|
13
13
|
s.executables = ["autumn"]
|
14
|
-
s.files = ["AUTHORS", "CHANGELOG", "MANIFEST", "README", "README.textile", "Rakefile", "autumn.gemspec", "bin/autumn", "lib/autumn.rb", "lib/autumn/authentication.rb", "lib/autumn/channel_leaf.rb", "lib/autumn/coder.rb", "lib/autumn/console_boot.rb", "lib/autumn/ctcp.rb", "lib/autumn/daemon.rb", "lib/autumn/datamapper_hacks.rb", "lib/autumn/foliater.rb", "lib/autumn/formatting.rb", "lib/autumn/generator.rb", "lib/autumn/genesis.rb", "lib/autumn/inheritable_attributes.rb", "lib/autumn/leaf.rb", "lib/autumn/log_facade.rb", "lib/autumn/misc.rb", "lib/autumn/resources/daemons/Anothernet.yml", "lib/autumn/resources/daemons/AustHex.yml", "lib/autumn/resources/daemons/Bahamut.yml", "lib/autumn/resources/daemons/Dancer.yml", "lib/autumn/resources/daemons/GameSurge.yml", "lib/autumn/resources/daemons/IRCnet.yml", "lib/autumn/resources/daemons/Ithildin.yml", "lib/autumn/resources/daemons/KineIRCd.yml", "lib/autumn/resources/daemons/PTlink.yml", "lib/autumn/resources/daemons/QuakeNet.yml", "lib/autumn/resources/daemons/RFC1459.yml", "lib/autumn/resources/daemons/RFC2811.yml", "lib/autumn/resources/daemons/RFC2812.yml", "lib/autumn/resources/daemons/RatBox.yml", "lib/autumn/resources/daemons/Ultimate.yml", "lib/autumn/resources/daemons/Undernet.yml", "lib/autumn/resources/daemons/Unreal.yml", "lib/autumn/resources/daemons/_Other.yml", "lib/autumn/resources/daemons/aircd.yml", "lib/autumn/resources/daemons/bdq-ircd.yml", "lib/autumn/resources/daemons/hybrid.yml", "lib/autumn/resources/daemons/ircu.yml", "lib/autumn/resources/daemons/tr-ircd.yml", "lib/autumn/script.rb", "lib/autumn/speciator.rb", "lib/autumn/stem.rb", "lib/autumn/stem_facade.rb", "lib/autumn/tool/bin.rb", "lib/autumn/tool/create.rb", "lib/autumn/tool/project_creator.rb", "lib/autumn/version.rb", "lib/skel/Rakefile", "lib/skel/config/global.yml", "lib/skel/config/seasons/testing/database.yml", "lib/skel/config/seasons/testing/leaves.yml", "lib/skel/config/seasons/testing/season.yml", "lib/skel/config/seasons/testing/stems.yml", "lib/skel/leaves/administrator/README", "lib/skel/leaves/administrator/controller.rb", "lib/skel/leaves/administrator/views/autumn.txt.erb", "lib/skel/leaves/administrator/views/reload.txt.erb", "lib/skel/leaves/insulter/README", "lib/skel/leaves/insulter/controller.rb", "lib/skel/leaves/insulter/views/about.txt.erb", "lib/skel/leaves/insulter/views/help.txt.erb", "lib/skel/leaves/insulter/views/insult.txt.erb", "lib/skel/leaves/scorekeeper/README", "lib/skel/leaves/scorekeeper/config.yml", "lib/skel/leaves/scorekeeper/controller.rb", "lib/skel/leaves/scorekeeper/helpers/general.rb", "lib/skel/leaves/scorekeeper/models/channel.rb", "lib/skel/leaves/scorekeeper/models/person.rb", "lib/skel/leaves/scorekeeper/models/pseudonym.rb", "lib/skel/leaves/scorekeeper/models/score.rb", "lib/skel/leaves/scorekeeper/tasks/stats.rake", "lib/skel/leaves/scorekeeper/views/about.txt.erb", "lib/skel/leaves/scorekeeper/views/change.txt.erb", "lib/skel/leaves/scorekeeper/views/history.txt.erb", "lib/skel/leaves/scorekeeper/views/points.txt.erb", "lib/skel/leaves/scorekeeper/views/usage.txt.erb", "lib/skel/log/README", "lib/skel/script/console", "lib/skel/script/destroy", "lib/skel/script/generate", "lib/skel/shared/README", "lib/skel/tmp/README", "spec/authentication_spec.rb", "spec/channel_leaf_spec.rb", "spec/coder_spec.rb", "spec/ctcp_spec.rb", "spec/daemon_spec.rb", "spec/datamapper_hacks_spec.rb", "tasks/authors.rake", "tasks/changelog.rake", "tasks/copyright.rake", "tasks/doc.rake", "tasks/gem.rake", "tasks/gem_installer.rake", "tasks/install_dependencies.rake", "tasks/manifest.rake", "tasks/rcov.rake", "tasks/release.rake", "tasks/reversion.rake", "tasks/setup.rake", "tasks/spec.rake"
|
14
|
+
s.files = ["AUTHORS", "CHANGELOG", "MANIFEST", "README", "README.textile", "Rakefile", "autumn.gemspec", "bin/autumn", "lib/autumn.rb", "lib/autumn/authentication.rb", "lib/autumn/channel_leaf.rb", "lib/autumn/coder.rb", "lib/autumn/console_boot.rb", "lib/autumn/ctcp.rb", "lib/autumn/daemon.rb", "lib/autumn/datamapper_hacks.rb", "lib/autumn/foliater.rb", "lib/autumn/formatting.rb", "lib/autumn/generator.rb", "lib/autumn/genesis.rb", "lib/autumn/inheritable_attributes.rb", "lib/autumn/leaf.rb", "lib/autumn/log_facade.rb", "lib/autumn/misc.rb", "lib/autumn/resources/daemons/Anothernet.yml", "lib/autumn/resources/daemons/AustHex.yml", "lib/autumn/resources/daemons/Bahamut.yml", "lib/autumn/resources/daemons/Dancer.yml", "lib/autumn/resources/daemons/GameSurge.yml", "lib/autumn/resources/daemons/IRCnet.yml", "lib/autumn/resources/daemons/Ithildin.yml", "lib/autumn/resources/daemons/KineIRCd.yml", "lib/autumn/resources/daemons/PTlink.yml", "lib/autumn/resources/daemons/QuakeNet.yml", "lib/autumn/resources/daemons/RFC1459.yml", "lib/autumn/resources/daemons/RFC2811.yml", "lib/autumn/resources/daemons/RFC2812.yml", "lib/autumn/resources/daemons/RatBox.yml", "lib/autumn/resources/daemons/Ultimate.yml", "lib/autumn/resources/daemons/Undernet.yml", "lib/autumn/resources/daemons/Unreal.yml", "lib/autumn/resources/daemons/_Other.yml", "lib/autumn/resources/daemons/aircd.yml", "lib/autumn/resources/daemons/bdq-ircd.yml", "lib/autumn/resources/daemons/hybrid.yml", "lib/autumn/resources/daemons/ircu.yml", "lib/autumn/resources/daemons/tr-ircd.yml", "lib/autumn/script.rb", "lib/autumn/speciator.rb", "lib/autumn/stem.rb", "lib/autumn/stem_facade.rb", "lib/autumn/tool/bin.rb", "lib/autumn/tool/create.rb", "lib/autumn/tool/project_creator.rb", "lib/autumn/version.rb", "lib/skel/Rakefile", "lib/skel/config/global.yml", "lib/skel/config/seasons/testing/database.yml", "lib/skel/config/seasons/testing/leaves.yml", "lib/skel/config/seasons/testing/season.yml", "lib/skel/config/seasons/testing/stems.yml", "lib/skel/leaves/administrator/README", "lib/skel/leaves/administrator/controller.rb", "lib/skel/leaves/administrator/views/autumn.txt.erb", "lib/skel/leaves/administrator/views/reload.txt.erb", "lib/skel/leaves/insulter/README", "lib/skel/leaves/insulter/controller.rb", "lib/skel/leaves/insulter/views/about.txt.erb", "lib/skel/leaves/insulter/views/help.txt.erb", "lib/skel/leaves/insulter/views/insult.txt.erb", "lib/skel/leaves/scorekeeper/README", "lib/skel/leaves/scorekeeper/config.yml", "lib/skel/leaves/scorekeeper/controller.rb", "lib/skel/leaves/scorekeeper/helpers/general.rb", "lib/skel/leaves/scorekeeper/models/channel.rb", "lib/skel/leaves/scorekeeper/models/person.rb", "lib/skel/leaves/scorekeeper/models/pseudonym.rb", "lib/skel/leaves/scorekeeper/models/score.rb", "lib/skel/leaves/scorekeeper/tasks/stats.rake", "lib/skel/leaves/scorekeeper/views/about.txt.erb", "lib/skel/leaves/scorekeeper/views/change.txt.erb", "lib/skel/leaves/scorekeeper/views/history.txt.erb", "lib/skel/leaves/scorekeeper/views/points.txt.erb", "lib/skel/leaves/scorekeeper/views/usage.txt.erb", "lib/skel/log/README", "lib/skel/log/testing.log", "lib/skel/script/console", "lib/skel/script/destroy", "lib/skel/script/generate", "lib/skel/shared/README", "lib/skel/tasks/app.rake", "lib/skel/tasks/db.rake", "lib/skel/tasks/doc.rake", "lib/skel/tasks/gem_installer.rake", "lib/skel/tasks/log.rake", "lib/skel/tasks/setup.rake", "lib/skel/tasks/spec.rake", "lib/skel/tmp/README", "spec/authentication_spec.rb", "spec/channel_leaf_spec.rb", "spec/coder_spec.rb", "spec/ctcp_spec.rb", "spec/daemon_spec.rb", "spec/datamapper_hacks_spec.rb", "tasks/authors.rake", "tasks/changelog.rake", "tasks/copyright.rake", "tasks/doc.rake", "tasks/gem.rake", "tasks/gem_installer.rake", "tasks/install_dependencies.rake", "tasks/manifest.rake", "tasks/rcov.rake", "tasks/release.rake", "tasks/reversion.rake", "tasks/setup.rake", "tasks/spec.rake"]
|
15
15
|
s.has_rdoc = true
|
16
16
|
s.homepage = %q{http://github.com/bougyman/autumn}
|
17
17
|
s.post_install_message = %q{============================================================
|
@@ -33,12 +33,18 @@ You can now create a new bot:
|
|
33
33
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
34
34
|
s.add_runtime_dependency(%q<facets>, [">= 0"])
|
35
35
|
s.add_runtime_dependency(%q<anise>, [">= 0"])
|
36
|
+
s.add_runtime_dependency(%q<english>, [">= 0"])
|
37
|
+
s.add_runtime_dependency(%q<daemons>, [">= 0"])
|
36
38
|
else
|
37
39
|
s.add_dependency(%q<facets>, [">= 0"])
|
38
40
|
s.add_dependency(%q<anise>, [">= 0"])
|
41
|
+
s.add_dependency(%q<english>, [">= 0"])
|
42
|
+
s.add_dependency(%q<daemons>, [">= 0"])
|
39
43
|
end
|
40
44
|
else
|
41
45
|
s.add_dependency(%q<facets>, [">= 0"])
|
42
46
|
s.add_dependency(%q<anise>, [">= 0"])
|
47
|
+
s.add_dependency(%q<english>, [">= 0"])
|
48
|
+
s.add_dependency(%q<daemons>, [">= 0"])
|
43
49
|
end
|
44
50
|
end
|
data/lib/autumn/version.rb
CHANGED
data/lib/skel/Rakefile
CHANGED
@@ -3,7 +3,14 @@ require 'spec/rake/spectask'
|
|
3
3
|
|
4
4
|
|
5
5
|
def include_autumn
|
6
|
+
require "pathname"
|
6
7
|
begin
|
8
|
+
# Dev-time paths, for checking gems and trees in-place (like skel)
|
9
|
+
if Pathname.new(__FILE__).dirname.join("lib","autumn.rb").file?
|
10
|
+
$LOAD_PATH.unshift Pathname.new(__FILE__).dirname.expand_path.join("lib")
|
11
|
+
elsif Pathname.new(__FILE__).dirname.join("..").expand_path.join("autumn.rb").file?
|
12
|
+
$LOAD_PATH.unshift Pathname.new(__FILE__).dirname.join("..").expand_path
|
13
|
+
end
|
7
14
|
require "autumn"
|
8
15
|
require "autumn/genesis"
|
9
16
|
rescue LoadError
|
@@ -33,123 +40,9 @@ task :boot do
|
|
33
40
|
@genesis.boot! false
|
34
41
|
end
|
35
42
|
|
36
|
-
|
37
|
-
|
38
|
-
task
|
39
|
-
system 'autumn start -D'
|
40
|
-
end
|
41
|
-
|
42
|
-
desc "Stop the Autumn daemon"
|
43
|
-
task :stop do
|
44
|
-
system 'autumn stop'
|
45
|
-
end
|
46
|
-
|
47
|
-
desc "Restart the Autumn daemon"
|
48
|
-
task :restart do
|
49
|
-
system 'autumn restart -D'
|
50
|
-
end
|
51
|
-
|
52
|
-
desc "Start Autumn but not as a daemon (stay on top)"
|
53
|
-
task :run do
|
54
|
-
system 'autumn start'
|
55
|
-
end
|
56
|
-
|
57
|
-
desc "Force the daemon to a stopped state (clears PID files)"
|
58
|
-
task :zap do
|
59
|
-
system 'autumn stop'
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
namespace :log do
|
64
|
-
desc "Remove all log files"
|
65
|
-
task :clear do
|
66
|
-
system 'rm -vf tmp/*.log tmp/*.output log/*.log*'
|
67
|
-
end
|
68
|
-
|
69
|
-
desc "Print all error messages in the log files"
|
70
|
-
task :errors => :environment do
|
71
|
-
season_log = "log/#{@genesis.config.global :season}.log"
|
72
|
-
system_log = 'tmp/autumn.log'
|
73
|
-
if File.exists? season_log then
|
74
|
-
puts "==== ERROR-LEVEL LOG MESSAGES ===="
|
75
|
-
File.open(season_log, 'r') do |log|
|
76
|
-
puts log.grep(/^[EF],/)
|
77
|
-
end
|
78
|
-
end
|
79
|
-
if File.exists? system_log then
|
80
|
-
puts "==== UNCAUGHT EXCEPTIONS ===="
|
81
|
-
File.open(system_log, 'r') do |log|
|
82
|
-
puts log.grep(/^[EF],/)
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
|
88
|
-
def local_db?(db)
|
89
|
-
db.host.nil? or db.host == 'localhost'
|
90
|
-
end
|
91
|
-
|
92
|
-
namespace :db do
|
93
|
-
desc "Recreate database tables according to the model objects"
|
94
|
-
task :migrate => :boot do
|
95
|
-
dname = ENV['DB']
|
96
|
-
raise "Usage: DB=[Database config name] rake db:migrate" unless dname
|
97
|
-
raise "Unknown database config #{dname}" unless database = repository(dname.to_sym)
|
98
|
-
puts "Migrating the #{dname} database..."
|
99
|
-
# Find models that have definitions for the selected database and migrate them
|
100
|
-
repository(dname.to_sym) do
|
101
|
-
repository(dname.to_sym).models.each { |mod| mod.auto_migrate! dname.to_sym }
|
102
|
-
end
|
103
|
-
end
|
104
|
-
desc "Nondestructively update database tables according to the model objects"
|
105
|
-
task :upgrade => :boot do
|
106
|
-
dname = ENV['DB']
|
107
|
-
raise "Usage: DB=[Database config name] rake db:upgrade" unless dname
|
108
|
-
raise "Unknown database config #{dname}" unless database = repository(dname.to_sym)
|
109
|
-
puts "Upgrading the #{dname} database..."
|
110
|
-
# Find models that have definitions for the selected database and upgrade them
|
111
|
-
repository(dname.to_sym) do
|
112
|
-
repository(dname.to_sym).models.each { |mod| mod.auto_upgrade! dname.to_sym }
|
113
|
-
end
|
114
|
-
end
|
115
|
-
end
|
116
|
-
|
117
|
-
namespace :doc do
|
118
|
-
desc "Generate documentation for all leaves"
|
119
|
-
task :leaves => :environment do
|
120
|
-
FileUtils.remove_dir 'doc/leaves' if File.directory? 'doc/leaves'
|
121
|
-
Dir.glob("leaves/*").each do |leaf_dir|
|
122
|
-
Dir.chdir leaf_dir do
|
123
|
-
system "rdoc --main README --title '#{File.basename(leaf_dir).camelcase} Documentation' -o ../../doc/leaves/#{File.basename leaf_dir} --line-numbers --inline-source controller.rb helpers models README"
|
124
|
-
end
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
desc "Remove all documentation"
|
129
|
-
task :clear => :environment do
|
130
|
-
FileUtils.remove_dir 'doc/api' if File.directory? 'doc/api'
|
131
|
-
FileUtils.remove_dir 'doc/leaves' if File.directory? 'doc/leaves'
|
132
|
-
end
|
133
|
-
end
|
134
|
-
|
135
|
-
desc "Verify leaf and API specs"
|
136
|
-
Spec::Rake::SpecTask.new do |t|
|
137
|
-
t.spec_files = FileList['spec/**/*.rb', 'leaves/*/spec/**/*.rb']
|
138
|
-
t.spec_opts = [ '-cfs' ]
|
139
|
-
end
|
140
|
-
|
141
|
-
namespace :spec do
|
142
|
-
desc "Verify API specs"
|
143
|
-
Spec::Rake::SpecTask.new('autumn') do |t|
|
144
|
-
t.spec_files = FileList['spec/**/*.rb']
|
145
|
-
t.spec_opts = [ '-cfs' ]
|
146
|
-
end
|
147
|
-
|
148
|
-
desc "Verify leaf specs"
|
149
|
-
Spec::Rake::SpecTask.new('leaves') do |t|
|
150
|
-
t.spec_files = FileList['leaves/*/spec/**/*.rb']
|
151
|
-
t.spec_opts = [ '-cfs' ]
|
152
|
-
end
|
43
|
+
# Load tasks from main tasks
|
44
|
+
Dir["tasks/**/*.rake"].each do |task|
|
45
|
+
load task
|
153
46
|
end
|
154
47
|
|
155
48
|
# Load any custom Rake tasks in the bot's tasks directory.
|
@@ -0,0 +1 @@
|
|
1
|
+
# Logfile created on Sun May 03 15:02:11 -0500 2009 by /
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# Application control
|
2
|
+
namespace :app do
|
3
|
+
desc "Launch the Autumn daemon"
|
4
|
+
task :start do
|
5
|
+
system 'autumn start -D'
|
6
|
+
end
|
7
|
+
|
8
|
+
desc "Stop the Autumn daemon"
|
9
|
+
task :stop do
|
10
|
+
system 'autumn stop'
|
11
|
+
end
|
12
|
+
|
13
|
+
desc "Restart the Autumn daemon"
|
14
|
+
task :restart do
|
15
|
+
system 'autumn restart -D'
|
16
|
+
end
|
17
|
+
|
18
|
+
desc "Start Autumn but not as a daemon (stay on top)"
|
19
|
+
task :run do
|
20
|
+
system 'autumn start'
|
21
|
+
end
|
22
|
+
|
23
|
+
desc "Force the daemon to a stopped state (clears PID files)"
|
24
|
+
task :zap do
|
25
|
+
system 'autumn stop'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
def local_db?(db)
|
2
|
+
db.host.nil? or db.host == 'localhost'
|
3
|
+
end
|
4
|
+
|
5
|
+
namespace :db do
|
6
|
+
desc "Recreate database tables according to the model objects"
|
7
|
+
task :migrate => :boot do
|
8
|
+
dname = ENV['DB']
|
9
|
+
raise "Usage: DB=[Database config name] rake db:migrate" unless dname
|
10
|
+
raise "Unknown database config #{dname}" unless database = repository(dname.to_sym)
|
11
|
+
puts "Migrating the #{dname} database..."
|
12
|
+
# Find models that have definitions for the selected database and migrate them
|
13
|
+
repository(dname.to_sym) do
|
14
|
+
repository(dname.to_sym).models.each { |mod| mod.auto_migrate! dname.to_sym }
|
15
|
+
end
|
16
|
+
end
|
17
|
+
desc "Nondestructively update database tables according to the model objects"
|
18
|
+
task :upgrade => :boot do
|
19
|
+
dname = ENV['DB']
|
20
|
+
raise "Usage: DB=[Database config name] rake db:upgrade" unless dname
|
21
|
+
raise "Unknown database config #{dname}" unless database = repository(dname.to_sym)
|
22
|
+
puts "Upgrading the #{dname} database..."
|
23
|
+
# Find models that have definitions for the selected database and upgrade them
|
24
|
+
repository(dname.to_sym) do
|
25
|
+
repository(dname.to_sym).models.each { |mod| mod.auto_upgrade! dname.to_sym }
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Document generation
|
2
|
+
namespace :doc do
|
3
|
+
desc "Generate documentation for all leaves"
|
4
|
+
task :leaves => :environment do
|
5
|
+
FileUtils.remove_dir 'doc/leaves' if File.directory? 'doc/leaves'
|
6
|
+
Dir.glob("leaves/*").each do |leaf_dir|
|
7
|
+
Dir.chdir leaf_dir do
|
8
|
+
system "rdoc --main README --title '#{File.basename(leaf_dir).camelcase} Documentation' -o ../../doc/leaves/#{File.basename leaf_dir} --line-numbers --inline-source controller.rb helpers models README"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
desc "Remove all documentation"
|
14
|
+
task :clear => :environment do
|
15
|
+
FileUtils.remove_dir 'doc/leaves' if File.directory? 'doc/leaves'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,76 @@
|
|
1
|
+
task :gem_installer do
|
2
|
+
class GemInstaller
|
3
|
+
def initialize(options = {}, &block)
|
4
|
+
@gems = []
|
5
|
+
@options = options
|
6
|
+
|
7
|
+
run(&block)
|
8
|
+
end
|
9
|
+
|
10
|
+
def run(&block)
|
11
|
+
instance_eval(&block) if block_given?
|
12
|
+
end
|
13
|
+
|
14
|
+
def gem(name, version = nil, options = {})
|
15
|
+
if version.respond_to?(:merge!)
|
16
|
+
options = version
|
17
|
+
else
|
18
|
+
options[:version] = version
|
19
|
+
end
|
20
|
+
|
21
|
+
@gems << [name, options]
|
22
|
+
end
|
23
|
+
|
24
|
+
def setup_gemspec(gemspec)
|
25
|
+
gemspec.dependencies.each do |dependency|
|
26
|
+
dependency.version_requirements.as_list.each do |version|
|
27
|
+
gem(dependency.name, version)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
setup
|
32
|
+
end
|
33
|
+
|
34
|
+
def setup
|
35
|
+
require 'rubygems'
|
36
|
+
require 'rubygems/dependency_installer'
|
37
|
+
|
38
|
+
@gems.each do |name, options|
|
39
|
+
setup_gem(name, options)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def setup_gem(name, options, try_install = true)
|
44
|
+
print "activating #{name} ... "
|
45
|
+
Gem.activate(name, *[options[:version]].compact)
|
46
|
+
require(options[:lib] || name)
|
47
|
+
puts "success."
|
48
|
+
rescue LoadError => error
|
49
|
+
puts error
|
50
|
+
install_gem(name, options) if try_install
|
51
|
+
setup_gem(name, options, try_install = false)
|
52
|
+
end
|
53
|
+
|
54
|
+
def install_gem(name, options)
|
55
|
+
installer = Gem::DependencyInstaller.new(options)
|
56
|
+
|
57
|
+
temp_argv(options[:extconf]) do
|
58
|
+
print "Installing #{name} ... "
|
59
|
+
installer.install(name, options[:version])
|
60
|
+
puts "done."
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def temp_argv(extconf)
|
65
|
+
if extconf ||= @options[:extconf]
|
66
|
+
old_argv = ARGV.clone
|
67
|
+
ARGV.replace(extconf.split(' '))
|
68
|
+
end
|
69
|
+
|
70
|
+
yield
|
71
|
+
|
72
|
+
ensure
|
73
|
+
ARGV.replace(old_argv) if extconf
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Logging related work
|
2
|
+
namespace :log do
|
3
|
+
desc "Remove all log files"
|
4
|
+
task :clear do
|
5
|
+
system 'rm -vf tmp/*.log tmp/*.output log/*.log*'
|
6
|
+
end
|
7
|
+
|
8
|
+
desc "Print all error messages in the log files"
|
9
|
+
task :errors => :environment do
|
10
|
+
season_log = "log/#{@genesis.config.global :season}.log"
|
11
|
+
system_log = 'tmp/autumn.log'
|
12
|
+
if File.exists? season_log then
|
13
|
+
puts "==== ERROR-LEVEL LOG MESSAGES ===="
|
14
|
+
File.open(season_log, 'r') do |log|
|
15
|
+
puts log.grep(/^[EF],/)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
if File.exists? system_log then
|
19
|
+
puts "==== UNCAUGHT EXCEPTIONS ===="
|
20
|
+
File.open(system_log, 'r') do |log|
|
21
|
+
puts log.grep(/^[EF],/)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
desc 'install all possible dependencies'
|
2
|
+
task :setup => :gem_installer do
|
3
|
+
GemInstaller.new do
|
4
|
+
# core
|
5
|
+
gem 'facets'
|
6
|
+
gem 'anise'
|
7
|
+
gem 'english', '> 0', :lib => "english/style"
|
8
|
+
gem 'daemons'
|
9
|
+
|
10
|
+
# spec
|
11
|
+
gem 'rspec', '> 1', :lib => "spec"
|
12
|
+
|
13
|
+
# database
|
14
|
+
gem 'dm-core'
|
15
|
+
gem 'do_sqlite3'
|
16
|
+
|
17
|
+
setup
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Speccing tasks
|
2
|
+
desc "Verify leaf and shared specs"
|
3
|
+
Spec::Rake::SpecTask.new do |t|
|
4
|
+
t.spec_files = FileList['spec/**/*.rb', 'leaves/*/spec/**/*.rb']
|
5
|
+
t.spec_opts = [ '-cfs' ]
|
6
|
+
end
|
7
|
+
|
8
|
+
namespace :spec do
|
9
|
+
desc "Verify leaf specs"
|
10
|
+
Spec::Rake::SpecTask.new('leaves') do |t|
|
11
|
+
t.spec_files = FileList['leaves/*/spec/**/*.rb']
|
12
|
+
t.spec_opts = [ '-cfs' ]
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
|
data/tasks/setup.rake
CHANGED
@@ -1,23 +1,18 @@
|
|
1
1
|
desc 'install all possible dependencies'
|
2
|
-
task :setup do
|
2
|
+
task :setup => :gem_installer do
|
3
3
|
GemInstaller.new do
|
4
4
|
# core
|
5
|
-
gem '
|
5
|
+
gem 'facets'
|
6
|
+
gem 'anise'
|
7
|
+
gem 'english', '> 0', :lib => "english/style"
|
8
|
+
gem 'daemons'
|
6
9
|
|
7
|
-
#
|
8
|
-
gem '
|
9
|
-
gem 'json', '>= 1.1.3'
|
10
|
-
gem 'memcache', '~> 1.7.0'
|
10
|
+
# spec
|
11
|
+
gem 'rspec', '> 1', :lib => "spec"
|
11
12
|
|
12
|
-
#
|
13
|
-
gem '
|
14
|
-
gem '
|
15
|
-
gem 'haml', '~> 2.0.9'
|
16
|
-
gem 'hpricot', '>= 0.7'
|
17
|
-
gem 'liquid', '~> 2.0.0'
|
18
|
-
gem 'sequel', '>= 2.11.0'
|
19
|
-
gem 'tagz', '>= 5.0.1'
|
20
|
-
gem 'tenjin', '~> 0.6.1'
|
13
|
+
# database
|
14
|
+
gem 'dm-core'
|
15
|
+
gem 'do_sqlite3'
|
21
16
|
|
22
17
|
setup
|
23
18
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autumn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim 'riscfuture' Morgan
|
@@ -32,6 +32,26 @@ dependencies:
|
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: "0"
|
34
34
|
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: english
|
37
|
+
type: :runtime
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: "0"
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: daemons
|
47
|
+
type: :runtime
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: "0"
|
54
|
+
version:
|
35
55
|
description: Autumn is a simple and modular irc framework
|
36
56
|
email: bougy.man@gmail.com
|
37
57
|
executables:
|
@@ -126,10 +146,18 @@ files:
|
|
126
146
|
- lib/skel/leaves/scorekeeper/views/points.txt.erb
|
127
147
|
- lib/skel/leaves/scorekeeper/views/usage.txt.erb
|
128
148
|
- lib/skel/log/README
|
149
|
+
- lib/skel/log/testing.log
|
129
150
|
- lib/skel/script/console
|
130
151
|
- lib/skel/script/destroy
|
131
152
|
- lib/skel/script/generate
|
132
153
|
- lib/skel/shared/README
|
154
|
+
- lib/skel/tasks/app.rake
|
155
|
+
- lib/skel/tasks/db.rake
|
156
|
+
- lib/skel/tasks/doc.rake
|
157
|
+
- lib/skel/tasks/gem_installer.rake
|
158
|
+
- lib/skel/tasks/log.rake
|
159
|
+
- lib/skel/tasks/setup.rake
|
160
|
+
- lib/skel/tasks/spec.rake
|
133
161
|
- lib/skel/tmp/README
|
134
162
|
- spec/authentication_spec.rb
|
135
163
|
- spec/channel_leaf_spec.rb
|
@@ -150,7 +178,6 @@ files:
|
|
150
178
|
- tasks/reversion.rake
|
151
179
|
- tasks/setup.rake
|
152
180
|
- tasks/spec.rake
|
153
|
-
- tasks/yard.rake
|
154
181
|
has_rdoc: true
|
155
182
|
homepage: http://github.com/bougyman/autumn
|
156
183
|
post_install_message: |-
|
data/tasks/yard.rake
DELETED