Skip to content
Browse files

use gemspec

  • Loading branch information...
1 parent a2939a9 commit 158ecd30d052bb1afe1fe9a6ce07b972f3dbba2c @blom committed
Showing with 8 additions and 18 deletions.
  1. +2 −8 Gemfile
  2. +1 −3 Rakefile
  3. +1 −0 VERSION
  4. +2 −4 haml-coderay.gemspec
  5. +2 −2 lib/haml-coderay.rb
  6. +0 −1 spec/haml-coderay_spec.rb
View
10 Gemfile
@@ -1,8 +1,2 @@
-source "http://rubygems.org/"
-
-gem "bluecloth"
-gem "coderay"
-gem "haml"
-gem "mg"
-gem "rspec"
-gem "yard"
+source :rubygems
+gemspec
View
4 Rakefile
@@ -1,7 +1,5 @@
require "rubygems"
-require "bundler"
-Bundler.setup(:default)
-
+require "bundler/setup"
require "mg"
require "rake/clean"
require "spec/rake/spectask"
View
1 VERSION
@@ -0,0 +1 @@
+0.1.1
View
6 haml-coderay.gemspec
@@ -1,11 +1,9 @@
-require File.expand_path("../lib/haml-coderay", __FILE__)
-
Gem::Specification.new do |spec|
spec.name = "haml-coderay"
- spec.version = Haml::Filters::CodeRay::VERSION.dup
+ spec.version = File.read(File.expand_path("../VERSION", __FILE__)).chomp
spec.summary = "CodeRay filter for Haml"
spec.description = "Adds a CodeRay syntax highlighting filter to Haml"
- spec.files = Dir.glob("lib/**/*.rb") + %w(LICENSE README.md)
+ spec.files = Dir["lib/*.rb", "[A-Z][A-Z]*"]
spec.author = "Ørjan Blom"
spec.email = "blom@blom.tv"
spec.homepage = "http://github.com/blom/haml-coderay"
View
4 lib/haml-coderay.rb
@@ -18,8 +18,8 @@ module Haml::Filters::CodeRay
include Haml::Filters::Base
lazy_require "coderay"
- defined?(self::VERSION) ||
- VERSION = "0.1.1".freeze
+ const_defined?(:VERSION) || VERSION =
+ File.read(File.expand_path("../../VERSION", __FILE__)).chomp
# Encoder (_default_: `:div`).
#
View
1 spec/haml-coderay_spec.rb
@@ -10,7 +10,6 @@
describe Haml::Filters::CodeRay, "::VERSION" do
let(:version) { Haml::Filters::CodeRay::VERSION }
specify { version.should match /\A\d+\.\d+\.\d+\z/ }
- it("should be frozen") { version.frozen?.should be true }
end
describe Haml::Filters::CodeRay do

0 comments on commit 158ecd3

Please sign in to comment.
Something went wrong with that request. Please try again.