Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Switch to jewler from hoe

  • Loading branch information...
commit 2c806c1408dbf94c1f16394f6b680acc9f3e1fb8 1 parent 598d70a
@binarylogic authored
View
0  MIT-LICENSE → LICENSE
File renamed without changes
View
15 Manifest.txt
@@ -1,15 +0,0 @@
-CHANGELOG.rdoc
-MIT-LICENSE
-Manifest.txt
-README.rdoc
-Rakefile
-init.rb
-lib/settingslogic.rb
-lib/settingslogic/config.rb
-lib/settingslogic/settings.rb
-lib/settingslogic/version.rb
-test/application.yml
-test/application2.yml
-test/test_config.rb
-test/test_helper.rb
-test/test_setting.rb
View
65 Rakefile
@@ -1,20 +1,49 @@
-ENV['RDOCOPT'] = "-S -f html -T hanna"
+require 'rubygems'
+require 'rake'
-require "rubygems"
-require "hoe"
-require File.dirname(__FILE__) << "/lib/settingslogic/version"
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |gem|
+ gem.name = "settingslogic"
+ gem.summary = "A simple and straightforward settings solution that uses an ERB enabled YAML file and a singleton design pattern."
+ gem.email = "bjohnson@binarylogic.com"
+ gem.homepage = "http://github.com/binarylogic/settingslogic"
+ gem.authors = ["Ben Johnson of Binary Logic"]
+ gem.rubyforge_project = "settingslogic"
+ gem.add_dependency "activesupport"
+ end
+rescue LoadError
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
+end
-Hoe.new("Settingslogic", Settingslogic::Version::STRING) do |p|
- p.name = "settingslogic"
- p.author = "Ben Johnson of Binary Logic"
- p.email = 'bjohnson@binarylogic.com'
- p.summary = "A simple and straightforward settings solution that uses an ERB enabled YAML file and a singleton design pattern."
- p.description = "A simple and straightforward settings solution that uses an ERB enabled YAML file and a singleton design pattern."
- p.url = "http://github.com/binarylogic/settingslogic"
- p.history_file = "CHANGELOG.rdoc"
- p.readme_file = "README.rdoc"
- p.extra_rdoc_files = ["CHANGELOG.rdoc", "README.rdoc"]
- p.remote_rdoc_dir = ''
- p.test_globs = ["test/*/test_*.rb", "test/*_test.rb", "test/*/*_test.rb"]
- p.extra_deps = %w(activesupport)
-end
+require 'rake/testtask'
+Rake::TestTask.new(:test) do |test|
+ test.libs << 'lib' << 'test'
+ test.pattern = 'test/**/*_test.rb'
+ test.verbose = true
+end
+
+begin
+ require 'rcov/rcovtask'
+ Rcov::RcovTask.new do |test|
+ test.libs << 'test'
+ test.pattern = 'test/**/*_test.rb'
+ test.verbose = true
+ end
+rescue LoadError
+ task :rcov do
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
+ end
+end
+
+task :default => :test
+
+begin
+ require 'rake/contrib/sshpublisher'
+ namespace :rubyforge do
+ desc "Release gem to RubyForge"
+ task :release => ["rubyforge:release:gem"]
+ end
+rescue LoadError
+ puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
+end
View
1  VERSION
@@ -1 +0,0 @@
-0.0.0
View
2  init.rb
@@ -1 +1 @@
-require "settingslogic"
+require File.dirname(__FILE__) + "/rails/init.rb"
View
54 lib/settingslogic/version.rb
@@ -1,54 +0,0 @@
-module Settingslogic
- # A class for describing the current version of a library. The version
- # consists of three parts: the +major+ number, the +minor+ number, and the
- # +tiny+ (or +patch+) number.
- class Version
-
- include Comparable
-
- # A convenience method for instantiating a new Version instance with the
- # given +major+, +minor+, and +tiny+ components.
- def self.[](major, minor, tiny)
- new(major, minor, tiny)
- end
-
- attr_reader :major, :minor, :tiny
-
- # Create a new Version object with the given components.
- def initialize(major, minor, tiny)
- @major, @minor, @tiny = major, minor, tiny
- end
-
- # Compare this version to the given +version+ object.
- def <=>(version)
- to_i <=> version.to_i
- end
-
- # Converts this version object to a string, where each of the three
- # version components are joined by the '.' character. E.g., 2.0.0.
- def to_s
- @to_s ||= [@major, @minor, @tiny].join(".")
- end
-
- # Converts this version to a canonical integer that may be compared
- # against other version objects.
- def to_i
- @to_i ||= @major * 1_000_000 + @minor * 1_000 + @tiny
- end
-
- def to_a
- [@major, @minor, @tiny]
- end
-
- MAJOR = 1
- MINOR = 0
- TINY = 3
-
- # The current version as a Version instance
- CURRENT = new(MAJOR, MINOR, TINY)
- # The current version as a String
- STRING = CURRENT.to_s
-
- end
-
-end
View
1  rails/init.rb
@@ -0,0 +1 @@
+require "settingslogic"
View
0  test/test_config.rb → test/config_test.rb
File renamed without changes
View
0  test/test_setting.rb → test/setting_test.rb
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.