diff --git a/.gitignore b/.gitignore index 2288186..4bed96a 100644 --- a/.gitignore +++ b/.gitignore @@ -14,29 +14,8 @@ doc # jeweler generated pkg -# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore: -# -# * Create a file at ~/.gitignore -# * Include files you want ignored -# * Run: git config --global core.excludesfile ~/.gitignore -# -# After doing this, these files will be ignored in all your git projects, -# saving you from having to 'pollute' every project you touch with them -# -# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line) -# -# For MacOS: -# -#.DS_Store -# -# For TextMate -#*.tmproj -#tmtags -# -# For emacs: -#*~ -#\#* -#.\#* -# -# For vim: -#*.swp +# rvm +.rvmrc + +# rspec +.rspec diff --git a/.rspec b/.rspec deleted file mode 100644 index 4e1e0d2..0000000 --- a/.rspec +++ /dev/null @@ -1 +0,0 @@ ---color diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..435ce3d --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,2 @@ +0.1.0 +* Initial version; basic implementation diff --git a/Gemfile b/Gemfile index 9d9ab10..814b2d3 100644 --- a/Gemfile +++ b/Gemfile @@ -2,12 +2,14 @@ source "http://rubygems.org" # Add dependencies required to use your gem here. # Example: # gem "activesupport", ">= 2.3.5" +gem "nokogiri", "~> 1.4" +gem "pygments.rb", "~> 0" # Add dependencies to develop your gem here. # Include everything needed to run rake, tests, features, etc. group :development do - gem "rspec", "~> 2.3.0" + gem "rspec", "~> 2.5.0" gem "bundler", "~> 1.0.0" gem "jeweler", "~> 1.5.2" - gem "rcov", ">= 0" + gem "rcov" end diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..85c43ef --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,39 @@ +GEM + remote: http://rubygems.org/ + specs: + blankslate (2.1.2.4) + diff-lcs (1.1.2) + ffi (1.0.7) + rake (>= 0.8.7) + git (1.2.5) + jeweler (1.5.2) + bundler (~> 1.0.0) + git (>= 1.2.5) + rake + nokogiri (1.4.4) + pygments.rb (0.1.2) + rubypython (>= 0.5.1) + rake (0.8.7) + rcov (0.9.9) + rspec (2.5.0) + rspec-core (~> 2.5.0) + rspec-expectations (~> 2.5.0) + rspec-mocks (~> 2.5.0) + rspec-core (2.5.1) + rspec-expectations (2.5.0) + diff-lcs (~> 1.1.2) + rspec-mocks (2.5.0) + rubypython (0.5.1) + blankslate (>= 2.1.2.3) + ffi (~> 1.0.7) + +PLATFORMS + ruby + +DEPENDENCIES + bundler (~> 1.0.0) + jeweler (~> 1.5.2) + nokogiri (~> 1.4) + pygments.rb (~> 0) + rcov + rspec (~> 2.5.0) diff --git a/README.rdoc b/README.rdoc index 468e1af..e5ab787 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,19 +1,27 @@ = rack-pygmoku -Description goes here. +Rack::Pygmoku is a middleware for generating code syntax highlighting using the +Pygments library in an environment where you cannot install Pygments directly. + +In other words, it's ideal for use on Heroku. == Contributing to rack-pygmoku -* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet -* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it +* Check out the latest master to make sure the feature hasn't been implemented + or the bug hasn't been fixed yet +* Check out the issue tracker to make sure someone already hasn't requested it + and/or contributed it * Fork the project * Start a feature/bugfix branch * Commit and push until you are happy with your contribution -* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally. -* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it. +* Make sure to add tests for it. This is important so I don't break it in a + future version unintentionally. +* Please try not to mess with the Rakefile, version, or history. If you want to + have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it. == Copyright -Copyright (c) 2011 Kevin Rohrbaugh. See LICENSE.txt for -further details. +Copyright (c) 2011 Kevin Rohrbaugh. + +See LICENSE.txt for further details. diff --git a/Rakefile b/Rakefile index cfd5bf8..f17bafd 100644 --- a/Rakefile +++ b/Rakefile @@ -10,19 +10,22 @@ end require 'rake' require 'jeweler' +require './lib/rack/pygmoku/version.rb' Jeweler::Tasks.new do |gem| # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options gem.name = "rack-pygmoku" gem.homepage = "http://github.com/krohrbaugh/rack-pygmoku" gem.license = "MIT" - gem.summary = %Q{TODO: one-line summary of your gem} - gem.description = %Q{TODO: longer description of your gem} + gem.summary = "Rack middleware for Pygments-based syntax highlighting" + gem.description = %Q{Rack middleware for Pygments use in environments you cannot install Pygments directly (e.g., Heroku).} gem.email = "kevin@rohrbaugh.us" gem.authors = ["Kevin Rohrbaugh"] + gem.version = Rack::Pygmoku::Version::STRING # 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' + gem.add_runtime_dependency 'nokogiri', '~> 1.4' + gem.add_runtime_dependency 'pygments.rb', '~> 0' + gem.add_development_dependency 'rspec', '~> 2.5.0' end Jeweler::RubygemsDotOrgTasks.new diff --git a/VERSION b/VERSION deleted file mode 100644 index 6c6aa7c..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.1.0 \ No newline at end of file diff --git a/lib/rack-pygmoku.rb b/lib/rack-pygmoku.rb deleted file mode 100644 index e69de29..0000000 diff --git a/lib/rack/pygmoku.rb b/lib/rack/pygmoku.rb new file mode 100644 index 0000000..5fac146 --- /dev/null +++ b/lib/rack/pygmoku.rb @@ -0,0 +1,5 @@ +module Rack + class Pygmoku + + end +end diff --git a/lib/rack/pygmoku/version.rb b/lib/rack/pygmoku/version.rb new file mode 100644 index 0000000..d1f4af2 --- /dev/null +++ b/lib/rack/pygmoku/version.rb @@ -0,0 +1,10 @@ +module Rack + class Pygmoku + module Version + STRING = '0.1.0' + MAJOR = 0 + MINOR = 1 + FIX = 0 + end + end +end diff --git a/spec/lib/rack/pygmoku_spec.rb b/spec/lib/rack/pygmoku_spec.rb new file mode 100644 index 0000000..c2302c3 --- /dev/null +++ b/spec/lib/rack/pygmoku_spec.rb @@ -0,0 +1,9 @@ +require 'spec_helper' + +describe Rack::Pygmoku do + describe "#call" do + it "fails" do + fail "You should write some tests, pal" + end + end +end diff --git a/spec/rack-pygmoku_spec.rb b/spec/rack-pygmoku_spec.rb deleted file mode 100644 index dc5a86b..0000000 --- a/spec/rack-pygmoku_spec.rb +++ /dev/null @@ -1,7 +0,0 @@ -require File.expand_path(File.dirname(__FILE__) + '/spec_helper') - -describe "RackPygmoku" do - it "fails" do - fail "hey buddy, you should probably rename this file and start specing for real" - end -end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f1e7805..31ff2ef 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,12 +1,12 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rspec' -require 'rack-pygmoku' +require 'rack/pygmoku' # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} RSpec.configure do |config| - + end