cheaptoad 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt ADDED
@@ -0,0 +1,4 @@
1
+ === 0.0.1 2009-09-10
2
+
3
+ * 1 major enhancement:
4
+ * Initial release
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Noah Gibbs
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Manifest.txt ADDED
@@ -0,0 +1,20 @@
1
+ History.txt
2
+ MIT-LICENSE
3
+ Manifest.txt
4
+ PostInstall.txt
5
+ README.rdoc
6
+ Rakefile
7
+ app/controllers/notices_controller.rb
8
+ generators/cheaptoad_migration/USAGE
9
+ generators/cheaptoad_migration/cheaptoad_migration_generator.rb
10
+ generators/cheaptoad_migration/templates/20090914074933_ct_migrate.rb
11
+ init.rb
12
+ install.rb
13
+ lib/cheaptoad.rb
14
+ rails/init.rb
15
+ script/console
16
+ script/destroy
17
+ script/generate
18
+ test/test_cheaptoad.rb
19
+ test/test_helper.rb
20
+ uninstall.rb
data/PostInstall.txt ADDED
@@ -0,0 +1,7 @@
1
+
2
+ For more information on cheaptoad, see http://cheaptoad.rubyforge.org
3
+
4
+ NOTE: Change this information in PostInstall.txt
5
+ You can also delete it if you don't want it.
6
+
7
+
data/README.rdoc ADDED
@@ -0,0 +1,65 @@
1
+ = cheaptoad
2
+
3
+ * http://cheaptoad.rubyforge.org
4
+
5
+ == DESCRIPTION:
6
+
7
+ CheapToad is a simple server plugin for the HopToad notifier. Make your
8
+ app a HopToad server in just a couple of lines!
9
+
10
+ == FEATURES/PROBLEMS:
11
+
12
+ * Very simple installation
13
+ * Very simple configuration
14
+ * Keeps your exceptions around to browse later
15
+
16
+ == SYNOPSIS:
17
+
18
+ Make a Rails app, or choose an existing one. In config/environment.rb,
19
+ add the line "config.cheaptoad".
20
+
21
+ Then, create a file called config/initializers/hoptoad.rb:
22
+
23
+ HoptoadNotifier.configure do |config|
24
+ config.api_key = 'My Project Name'
25
+ config.host = 'myapp.host.com'
26
+ config.port = 3000
27
+
28
+ config.environment_filters << "MY_SECRET_KEY"
29
+
30
+ end
31
+
32
+ == REQUIREMENTS:
33
+
34
+ You'll need a Rails app, which will be your CheapToad server. It can do
35
+ whatever else you like, but its notices controller (by default
36
+ "/notices") will be used for CheapToad stuff.
37
+
38
+ == INSTALL:
39
+
40
+ sudo gem install cheaptoad
41
+
42
+ == LICENSE:
43
+
44
+ (The MIT License)
45
+
46
+ Copyright (c) 2009 Noah Gibbs
47
+
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of this software and associated documentation files (the
50
+ 'Software'), to deal in the Software without restriction, including
51
+ without limitation the rights to use, copy, modify, merge, publish,
52
+ distribute, sublicense, and/or sell copies of the Software, and to
53
+ permit persons to whom the Software is furnished to do so, subject to
54
+ the following conditions:
55
+
56
+ The above copyright notice and this permission notice shall be
57
+ included in all copies or substantial portions of the Software.
58
+
59
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
60
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
61
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
62
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
63
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
64
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
65
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,26 @@
1
+ require 'rubygems'
2
+ gem 'hoe', '>= 2.1.0'
3
+ require 'hoe'
4
+ require 'fileutils'
5
+ require './lib/cheaptoad'
6
+
7
+ Hoe.plugin :newgem
8
+ # Hoe.plugin :website
9
+ # Hoe.plugin :cucumberfeatures
10
+
11
+ # Generate all the Rake tasks
12
+ # Run 'rake -T' to see list of generated tasks (from gem root directory)
13
+ $hoe = Hoe.spec 'cheaptoad' do
14
+ self.developer 'Noah Gibbs', 'noah_gibbs@yahoo.com'
15
+ self.post_install_message = 'PostInstall.txt'
16
+ self.rubyforge_name = self.name # TODO this is default value
17
+ self.extra_deps = [['rails','>= 2.3.4']]
18
+
19
+ end
20
+
21
+ require 'newgem/tasks'
22
+ Dir['tasks/**/*.rake'].each { |t| load t }
23
+
24
+ # TODO - want other tests/tasks run by default? Add them to the list
25
+ # remove_task :default
26
+ # task :default => [:spec, :features]
@@ -0,0 +1,15 @@
1
+ class NoticesController < ApplicationController
2
+ def index
3
+ notice = YAML.load(request.raw_post)['notice']
4
+ logger.info "Received post: #{request.raw_post}"
5
+ logger.info "Received notice: #{notice.inspect}"
6
+ #error_class = notice['error_class']
7
+ #error_message = notice['error_message']
8
+ #backtrace = notice['back'].blank? : notice['backtrace'] : notice['back']
9
+ #sess = notice['session']
10
+ #envir = notice['environment']
11
+
12
+ render :nothing => true
13
+ end
14
+
15
+ end
@@ -0,0 +1,5 @@
1
+ Description:
2
+ This generator creates a migration for entries in the CheapToad database.
3
+
4
+ Example:
5
+ ./script/generate cheaptoad_generator
@@ -0,0 +1,11 @@
1
+ class CheaptoadMigrationGenerator < Rails::Generator::Base
2
+
3
+ def manifest
4
+ record do |m|
5
+ m.directory "db/migrate"
6
+ m.template '20090914074933_ct_migrate.rb',
7
+ "db/migrate/20090914074933_ct_migrate.rb"
8
+ end
9
+ end
10
+
11
+ end
@@ -0,0 +1,45 @@
1
+ class AddBasicRoom < ActiveRecord::Migration
2
+ def self.up
3
+ create_table "basic_objects", :force => true do |t|
4
+ t.string :name, :limit => 80
5
+ t.string :type, :limit => 80
6
+
7
+ t.string :base_description, :limit => 240
8
+
9
+ # These are used for serialized fields
10
+ t.text :tags
11
+ t.text :descriptions
12
+
13
+ t.timestamps
14
+ end
15
+
16
+ create_table "basic_exits", :force => true do |t|
17
+ t.integer :basic_object_id, :null => false
18
+ t.integer :destination_id, :null => false
19
+ t.string :type, :limit => 80
20
+ t.string :name, :limit => 80
21
+ t.string :description, :limit => 240
22
+ t.text :tags
23
+ t.timestamps
24
+ end
25
+
26
+ create_table "basic_mobiles", :force => true do |t|
27
+ t.integer :current_room_id
28
+ t.integer :current_body_id
29
+ t.string :name, :limit => 80
30
+ t.string :type, :limit => 80
31
+
32
+ # Serialized fields
33
+ t.text :tags
34
+ t.text :descriptions
35
+
36
+ t.timestamps
37
+ end
38
+ end
39
+
40
+ def self.down
41
+ drop_table "basic_objects"
42
+ drop_table "basic_exits"
43
+ drop_table "basic_mobiles"
44
+ end
45
+ end
data/init.rb ADDED
@@ -0,0 +1,2 @@
1
+ # Include hook code here
2
+ require File.join(File.dirname(__FILE__), "rails", "init.rb")
data/install.rb ADDED
@@ -0,0 +1 @@
1
+ # Install hook code here
data/lib/cheaptoad.rb ADDED
@@ -0,0 +1,6 @@
1
+ $:.unshift(File.dirname(__FILE__)) unless
2
+ $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
+
4
+ module Cheaptoad
5
+ VERSION = '0.0.1'
6
+ end
data/rails/init.rb ADDED
@@ -0,0 +1 @@
1
+ # Include hook code here
data/script/console ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+ # File: script/console
3
+ irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
4
+
5
+ libs = " -r irb/completion"
6
+ # Perhaps use a console_lib to store any extra methods I may want available in the cosole
7
+ # libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
8
+ libs << " -r #{File.dirname(__FILE__) + '/../lib/cheaptoad.rb'}"
9
+ puts "Loading cheaptoad gem"
10
+ exec "#{irb} #{libs} --simple-prompt"
data/script/destroy ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
3
+
4
+ begin
5
+ require 'rubigen'
6
+ rescue LoadError
7
+ require 'rubygems'
8
+ require 'rubigen'
9
+ end
10
+ require 'rubigen/scripts/destroy'
11
+
12
+ ARGV.shift if ['--help', '-h'].include?(ARGV[0])
13
+ RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
14
+ RubiGen::Scripts::Destroy.new.run(ARGV)
data/script/generate ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
3
+
4
+ begin
5
+ require 'rubigen'
6
+ rescue LoadError
7
+ require 'rubygems'
8
+ require 'rubigen'
9
+ end
10
+ require 'rubigen/scripts/generate'
11
+
12
+ ARGV.shift if ['--help', '-h'].include?(ARGV[0])
13
+ RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
14
+ RubiGen::Scripts::Generate.new.run(ARGV)
@@ -0,0 +1,11 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+
3
+ class TestCheaptoad < Test::Unit::TestCase
4
+
5
+ def setup
6
+ end
7
+
8
+ def test_truth
9
+ assert true
10
+ end
11
+ end
@@ -0,0 +1,3 @@
1
+ require 'stringio'
2
+ require 'test/unit'
3
+ require File.dirname(__FILE__) + '/../lib/cheaptoad'
data/uninstall.rb ADDED
@@ -0,0 +1 @@
1
+ # Uninstall hook code here
metadata ADDED
@@ -0,0 +1,100 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cheaptoad
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Noah Gibbs
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-09-15 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rails
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 2.3.4
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: hoe
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 2.3.3
34
+ version:
35
+ description: |-
36
+ CheapToad is a simple server plugin for the HopToad notifier. Make your
37
+ app a HopToad server in just a couple of lines!
38
+ email:
39
+ - noah_gibbs@yahoo.com
40
+ executables: []
41
+
42
+ extensions: []
43
+
44
+ extra_rdoc_files:
45
+ - History.txt
46
+ - Manifest.txt
47
+ - PostInstall.txt
48
+ files:
49
+ - History.txt
50
+ - MIT-LICENSE
51
+ - Manifest.txt
52
+ - PostInstall.txt
53
+ - README.rdoc
54
+ - Rakefile
55
+ - app/controllers/notices_controller.rb
56
+ - generators/cheaptoad_migration/USAGE
57
+ - generators/cheaptoad_migration/cheaptoad_migration_generator.rb
58
+ - generators/cheaptoad_migration/templates/20090914074933_ct_migrate.rb
59
+ - init.rb
60
+ - install.rb
61
+ - lib/cheaptoad.rb
62
+ - rails/init.rb
63
+ - script/console
64
+ - script/destroy
65
+ - script/generate
66
+ - test/test_cheaptoad.rb
67
+ - test/test_helper.rb
68
+ - uninstall.rb
69
+ has_rdoc: true
70
+ homepage: http://cheaptoad.rubyforge.org
71
+ licenses: []
72
+
73
+ post_install_message: PostInstall.txt
74
+ rdoc_options:
75
+ - --main
76
+ - README.rdoc
77
+ require_paths:
78
+ - lib
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: "0"
84
+ version:
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: "0"
90
+ version:
91
+ requirements: []
92
+
93
+ rubyforge_project: cheaptoad
94
+ rubygems_version: 1.3.5
95
+ signing_key:
96
+ specification_version: 3
97
+ summary: CheapToad is a simple server plugin for the HopToad notifier
98
+ test_files:
99
+ - test/test_cheaptoad.rb
100
+ - test/test_helper.rb