Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
grosser committed Oct 4, 2011
0 parents commit 1b649f2
Show file tree
Hide file tree
Showing 10 changed files with 100 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
@@ -0,0 +1,5 @@
script: "bundle exec rake"
rvm:
- ree
- 1.9.2
- 1.9.3
7 changes: 7 additions & 0 deletions Gemfile
@@ -0,0 +1,7 @@
source :rubygems
gemspec

group :development do
gem 'rake'
gem 'rspec', '~>2'
end
26 changes: 26 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,26 @@
PATH
remote: .
specs:
rhr (0.0.0)

GEM
remote: http://rubygems.org/
specs:
diff-lcs (1.1.3)
rake (0.9.2)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
rspec-mocks (~> 2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)

PLATFORMS
ruby

DEPENDENCIES
rake
rhr!
rspec (~> 2)
17 changes: 17 additions & 0 deletions Rakefile
@@ -0,0 +1,17 @@
task :default do
sh "rspec spec/"
end

rule /^version:bump:.*/ do |t|
sh "git status | grep 'nothing to commit'" # ensure we are not dirty
index = ['major', 'minor','patch'].index(t.name.split(':').last)
file = 'lib/rhr/version.rb'

version_file = File.read(file)
old_version, *version_parts = version_file.match(/(\d+)\.(\d+)\.(\d+)/).to_a
version_parts[index] = version_parts[index].to_i + 1
new_version = version_parts * '.'
File.open(file,'w'){|f| f.write(version_file.sub(old_version, new_version)) }

sh "git add #{file} && git commit -m 'bump version to #{new_version}'"
end
20 changes: 20 additions & 0 deletions Readme.md
@@ -0,0 +1,20 @@
Ruby Hypertext Refinements -- the ease of PHP with the elegance of Ruby

Install
=======
sudo gem install rhr
Or

rails plugin install git://github.com/grosser/rhr.git


Usage
=====
CODE EXAMPLE

Author
======
[Michael Grosser](http://grosser.it)<br/>
michael@grosser.it<br/>
Hereby placed under public domain, do what you want, just do not hold me accountable...<br/>
[![Build Status](https://secure.travis-ci.org/grosser/rhr.png)](http://travis-ci.org/grosser/rhr)
2 changes: 2 additions & 0 deletions lib/rhr.rb
@@ -0,0 +1,2 @@
module RHR
end
3 changes: 3 additions & 0 deletions lib/rhr/version.rb
@@ -0,0 +1,3 @@
module RHR
VERSION = '0.0.0'
end
10 changes: 10 additions & 0 deletions rhr.gemspec
@@ -0,0 +1,10 @@
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
require 'rhr/version'

Gem::Specification.new "rhr", RHR::VERSION do |s|
s.summary = "Ruby Hypertext Refinements -- the ease of PHP with the elegance of Ruby"
s.authors = ["Michael Grosser"]
s.email = "michael@grosser.it"
s.homepage = "http://github.com/grosser/rhr"
s.files = `git ls-files`.split("\n")
end
7 changes: 7 additions & 0 deletions spec/rhr_spec.rb
@@ -0,0 +1,7 @@
require 'spec_helper'

describe RHR do
it "has a VERSION" do
RHR::VERSION.should =~ /^[\.\da-z]+$/
end
end
3 changes: 3 additions & 0 deletions spec/spec_helper.rb
@@ -0,0 +1,3 @@
$LOAD_PATH.unshift 'lib'
require 'rhr'
require 'rhr/version'

0 comments on commit 1b649f2

Please sign in to comment.