Skip to content

Commit

Permalink
working on pastebin.com version
Browse files Browse the repository at this point in the history
  • Loading branch information
dougsko committed Dec 2, 2010
1 parent 5c49f1b commit d337b87
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 37 deletions.
13 changes: 13 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
source "http://rubygems.org"
# Add dependencies required to use your gem here.
# Example:
# gem "activesupport", ">= 2.3.5"

# Add dependencies to develop your gem here.
# Include everything needed to run rake, tests, features, etc.
group :development do
gem "rspec", "~> 2.1.0"
gem "bundler", "~> 1.0.0"
gem "jeweler", "~> 1.5.1"
gem "rcov", ">= 0"
end
20 changes: 20 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2010 dougsko

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
66 changes: 29 additions & 37 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,58 +1,50 @@
require 'rubygems'
require 'rake'

require 'bundler'
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "pastebin"
gem.summary = %Q{Command line interface to http://pastebin.ca}
gem.email = "dougtko@gmail.com"
gem.homepage = "http://github.com/dougsko/pastebin"
gem.authors = ["dougsko"]
gem.description = 'Command line interface to http://pastebin.ca'
gem.add_dependency 'httpclient'
gem.require_paths = ['/bin', '/lib']
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
$stderr.puts e.message
$stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code
end
require 'rake'

rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
require 'jeweler'
Jeweler::Tasks.new do |gem|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
gem.name = "pastebin"
gem.homepage = "http://github.com/dougsko/pastebin"
gem.license = "MIT"
gem.summary = %Q{TODO: one-line summary of your gem}
gem.description = %Q{TODO: longer description of your gem}
gem.email = "dougtko@gmail.com"
gem.authors = ["dougsko"]
# Include your dependencies below. Runtime dependencies are required when using your gem,
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
# gem.add_runtime_dependency 'jabber4r', '> 0.1'
# gem.add_development_dependency 'rspec', '> 1.2.3'
end
Jeweler::RubygemsDotOrgTasks.new

require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:spec) do |spec|
spec.libs << 'lib' << 'spec'
spec.spec_files = FileList['spec/**/*_spec.rb']
spec.spec_opts = ['--color']
require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb']
end

Spec::Rake::SpecTask.new(:rcov) do |spec|
spec.libs << 'lib' << 'spec'
RSpec::Core::RakeTask.new(:rcov) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
spec.spec_opts = ['--color']
end


task :default => :spec

require 'rake/rdoctask'
#require 'darkfish-rdoc'
Rake::RDocTask.new do |rdoc|
if File.exist?('VERSION.yml')
config = YAML.load(File.read('VERSION.yml'))
version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
else
version = ""
end
version = File.exist?('VERSION') ? File.read('VERSION') : ""

rdoc.rdoc_dir = 'rdoc'
rdoc.title = "pastebin #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
rdoc.options += [
'-N',
# '-f', 'darkfish',
]
end

0 comments on commit d337b87

Please sign in to comment.