Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added gem before require for more descriptive error message. Updated …

…version to 0.1.6.
  • Loading branch information...
commit b1809e43a39880d8df00a2f3a6e15d4dfb1c6a96 1 parent 4c2f016
@jnunemaker authored
View
8 lib/snitch.rb
@@ -1,4 +1,10 @@
-%w[uri yaml rubygems active_support mojombo-grit].each { |x| require x }
+%w[uri yaml rubygems].each { |x| require x }
+
+gem 'activesupport', '>= 1.3.1'
+require 'active_support'
+
+gem 'mojombo-grit', '>= 0.9.0'
+require 'grit'
$: << File.join(File.dirname(__FILE__))
View
2  lib/snitch/revisions/git.rb
@@ -4,8 +4,6 @@ class Git < Revision
attr_accessor :repository
include Message
- gem 'mojombo-grit'
- require 'mojombo-grit'
def initialize(repository_path, revision = nil)
super
View
2  lib/snitch/version.rb
@@ -2,7 +2,7 @@ class Snitch #:nodoc:
module VERSION #:nodoc:
MAJOR = 0
MINOR = 1
- TINY = 5
+ TINY = 6
STRING = [MAJOR, MINOR, TINY].join('.')
end
View
6 snitch.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = %q{snitch}
- s.version = "0.1.5"
+ s.version = "0.1.6"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["John Nunemaker"]
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
s.email = ["nunemaker@gmail.com"]
s.executables = ["snitch"]
s.extra_rdoc_files = ["CHANGELOG.txt", "History.txt", "Manifest.txt", "PostInstall.txt", "README.txt", "TODO.txt"]
- s.files = ["CHANGELOG.txt", "History.txt", "MIT-LICENSE", "Manifest.txt", "PostInstall.txt", "README.txt", "Rakefile", "TODO.txt", "bin/snitch", "config/hoe.rb", "config/requirements.rb", "lib/snitch.rb", "lib/snitch/base.rb", "lib/snitch/config.rb", "lib/snitch/exceptions.rb", "lib/snitch/gitcommit.rb", "lib/snitch/message.rb", "lib/snitch/patches/hash.rb", "lib/snitch/patches/tinder.rb", "lib/snitch/service.rb", "lib/snitch/services/campfire.rb", "lib/snitch/services/email.rb", "lib/snitch/services/twitter.rb", "lib/snitch/svnlook.rb", "lib/snitch/version.rb", "script/console", "script/destroy", "script/generate", "script/txt2html", "setup.rb", "tasks/deployment.rake", "tasks/environment.rake", "tasks/website.rake", "test/snitch_config", "test/test_helper.rb", "test/unit/base_test.rb", "test/unit/gitcommit_test.rb", "test/unit/service_test.rb", "test/unit/services/campfire_test.rb", "test/unit/services/email_test.rb", "test/unit/services/twitter_test.rb", "test/unit/svnlook_test.rb", "website/css/common.css", "website/images/campfire.gif", "website/images/twitter.gif", "website/index.html"]
+ s.files = ["CHANGELOG.txt", "History.txt", "MIT-LICENSE", "Manifest.txt", "PostInstall.txt", "README.txt", "Rakefile", "TODO.txt", "bin/snitch", "config/hoe.rb", "config/requirements.rb", "lib/snitch.rb", "lib/snitch/config.rb", "lib/snitch/gitcommit.rb", "lib/snitch/message.rb", "lib/snitch/revision.rb", "lib/snitch/revisions/git.rb", "lib/snitch/revisions/subversion.rb", "lib/snitch/service.rb", "lib/snitch/services/campfire.rb", "lib/snitch/services/echo.rb", "lib/snitch/services/email.rb", "lib/snitch/services/twitter.rb", "lib/snitch/version.rb", "script/console", "script/destroy", "script/generate", "script/txt2html", "setup.rb", "snitch.gemspec", "tasks/deployment.rake", "tasks/environment.rake", "tasks/website.rake", "test/snitch_config", "test/test_helper.rb", "test/unit/revisions/git_test.rb", "test/unit/revisions/subversion_test.rb", "test/unit/service_test.rb", "test/unit/services/campfire_test.rb", "test/unit/services/echo_test.rb", "test/unit/services/email_test.rb", "test/unit/services/twitter_test.rb", "test/unit/snitch_test.rb", "website/css/common.css", "website/images/campfire.gif", "website/images/twitter.gif", "website/index.html"]
s.has_rdoc = true
s.homepage = %q{http://snitch.rubyforge.org}
s.post_install_message = %q{}
@@ -39,4 +39,4 @@ Gem::Specification.new do |s|
s.add_dependency(%q<mojombo-grit>, [">= 0.9.0"])
s.add_dependency(%q<hoe>, [">= 1.8.0"])
end
-end
+end
View
9 tasks/deployment.rake
@@ -1,3 +1,12 @@
+desc 'Preps the gem for a new release'
+task :prep_for_release do
+ require 'rio'
+ Rake::Task['manifest:refresh'].invoke
+ gemspec = %x[rake debug_gem]
+ lines = gemspec.split("\n")
+ rio('snitch.gemspec') < lines[1, lines.length-1].join("\n")
+end
+
desc 'Release the website and new gem version'
task :deploy => [:check_version, :website, :release] do
puts "Remember to create SVN tag:"
View
2  test/test_helper.rb
@@ -17,7 +17,7 @@ def expect(expected_value, &block)
end
end
-Snitch::Config.config_file_path = File.expand_path(File.dirname(__FILE__) + '/snitch_config')
+Snitch::Config.config_file_path = File.expand_path(File.dirname(__FILE__) + '/unit/snitch_config')
CONFIG = Snitch::Config::load
def create_subversion_repository_and_checkout
View
22 test/unit/snitch_config
@@ -0,0 +1,22 @@
+# what services would you like to send commit messages to?
+services:
+ :campfire:
+ :subdomain:
+ :login:
+ :password:
+ :room: Development
+ :twitter:
+ :login:
+ :password:
+ :email:
+ # You mail server settings:
+ :host:
+ :server: localhost
+ :port: 25
+ # Your login creds:
+ :login:
+ :password:
+ :method: :login
+ # Our email addresses:
+ :from: Snitch <root@localhost>
+ :to:
Please sign in to comment.
Something went wrong with that request. Please try again.