Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Major maintenance and dumping new version.

Adding Merb::Parts::VERSION, CHANGELOG, and dumping 0.9.14 version.
Also switching to Jeweler for the gem management.
  • Loading branch information...
commit 4c1c17895e069f2fc079215cef053d93dbd6f12e 1 parent 4d3f18d
@pk pk authored
View
1  .gitignore
@@ -0,0 +1 @@
+pkg/*
View
4 CHANGELOG
@@ -0,0 +1,4 @@
+== 0.9.14
+* Fix multiple parameter bug for part() method [#192 status:resolved]
+* Added /lib/merb_parts/version.rb
+* Added CHANGELOG
View
109 Rakefile
@@ -1,76 +1,55 @@
require 'rubygems'
-require 'rake/gempackagetask'
-require "extlib"
-require 'merb-core/tasks/merb_rake_helper'
-require "spec/rake/spectask"
-
-##############################################################################
-# Package && release
-##############################################################################
-RUBY_FORGE_PROJECT = "merb"
-PROJECT_URL = "http://merbivore.com"
-PROJECT_SUMMARY = "Merb plugin that provides Part Controllers."
-PROJECT_DESCRIPTION = PROJECT_SUMMARY
-
-GEM_AUTHOR = "Daniel Neighman"
-GEM_EMAIL = "has.sox@gmail.com"
-
-GEM_NAME = "merb_parts"
-PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
-GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.9") + PKG_BUILD
-
-RELEASE_NAME = "REL #{GEM_VERSION}"
-
-require "extlib/tasks/release"
-
-spec = Gem::Specification.new do |s|
- s.rubyforge_project = RUBY_FORGE_PROJECT
- s.name = GEM_NAME
- s.version = GEM_VERSION
- s.platform = Gem::Platform::RUBY
- s.has_rdoc = true
- s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
- s.summary = PROJECT_SUMMARY
- s.description = PROJECT_DESCRIPTION
- s.author = GEM_AUTHOR
- s.email = GEM_EMAIL
- s.homepage = PROJECT_URL
- s.add_dependency('merb-core', '>= 0.9.9')
- s.require_path = 'lib'
- s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib}/**/*")
-end
+require 'rake'
-Rake::GemPackageTask.new(spec) do |pkg|
- pkg.gem_spec = spec
-end
+# Assume a typical dev checkout to fetch the current merb-core version
+require File.expand_path('../../merb/merb-core/lib/merb-core/version', __FILE__)
-desc "Install the gem"
-task :install do
- Merb::RakeHelper.install(GEM_NAME, :version => GEM_VERSION)
-end
+# Load this library's version information
+require File.expand_path('../lib/merb_parts/version', __FILE__)
-desc "Uninstall the gem"
-task :uninstall do
- Merb::RakeHelper.uninstall(GEM_NAME, :version => GEM_VERSION)
-end
+begin
+
+ require 'jeweler'
+
+ Jeweler::Tasks.new do |gemspec|
+
+ gemspec.version = Merb::Parts::VERSION
+
+ gemspec.name = "merb_parts"
+ gemspec.description = "Merb plugin that provides Part Controllers."
+ gemspec.summary = "Merb plugin that provides Part Controllers."
+
+ gemspec.authors = [ "Daniel Neighman" ]
+ gemspec.email = "has.sox@gmail.com"
+ gemspec.homepage = "http://github.com/merb/merb_parts"
+
+ gemspec.files = %w(CHANGELOG LICENSE Rakefile README TODO) + Dir['{lib,spec}/**/*']
+
+ # Runtime dependencies
+ gemspec.add_dependency 'merb-core', ">= 0.9.9"
+
+ # Development dependencies
+ gemspec.add_development_dependency 'rspec', '>= 1.2.9'
-desc "Create a gemspec file"
-task :gemspec do
- File.open("#{GEM_NAME}.gemspec", "w") do |file|
- file.puts spec.to_ruby
end
+
+ Jeweler::GemcutterTasks.new
+
+rescue LoadError
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
-desc "Run all examples (or a specific spec with TASK=xxxx)"
-Spec::Rake::SpecTask.new('spec') do |t|
- t.spec_opts = ["-cfs"]
- t.spec_files = begin
- if ENV["TASK"]
- ENV["TASK"].split(',').map { |task| "spec/**/#{task}_spec.rb" }
- else
- FileList['spec/**/*_spec.rb']
- end
- end
+require 'spec/rake/spectask'
+Spec::Rake::SpecTask.new(:spec) do |spec|
+ spec.spec_opts << '--options' << 'spec/spec.opts' if File.exists?('spec/spec.opts')
+ spec.libs << 'lib' << 'spec'
+ spec.spec_files = FileList['spec/**/*_spec.rb']
+end
+
+Spec::Rake::SpecTask.new(:rcov) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.pattern = 'spec/**/*_spec.rb'
+ spec.rcov = true
end
desc 'Default: run spec examples'
View
5 lib/merb_parts/version.rb
@@ -0,0 +1,5 @@
+module Merb
+ module Parts
+ VERSION = '0.9.14'.freeze
+ end
+end
View
75 merb_parts.gemspec
@@ -0,0 +1,75 @@
+# Generated by jeweler
+# DO NOT EDIT THIS FILE DIRECTLY
+# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = %q{merb_parts}
+ s.version = "0.9.14"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Daniel Neighman"]
+ s.date = %q{2009-11-07}
+ s.description = %q{Merb plugin that provides Part Controllers.}
+ s.email = %q{has.sox@gmail.com}
+ s.extra_rdoc_files = [
+ "LICENSE",
+ "README"
+ ]
+ s.files = [
+ "CHANGELOG",
+ "LICENSE",
+ "README",
+ "Rakefile",
+ "TODO",
+ "lib/merb_parts.rb",
+ "lib/merb_parts/merbtasks.rb",
+ "lib/merb_parts/mixins/parts_mixin.rb",
+ "lib/merb_parts/mixins/web_controller.rb",
+ "lib/merb_parts/part_controller.rb",
+ "lib/merb_parts/version.rb",
+ "spec/fixtures/controllers/main.rb",
+ "spec/fixtures/parts/done_part.rb",
+ "spec/fixtures/parts/todo_part.rb",
+ "spec/fixtures/parts/views/layout/todo_part.html.erb",
+ "spec/fixtures/parts/views/layout/todo_part.xml.erb",
+ "spec/fixtures/parts/views/todo_part/formatted_output.html.erb",
+ "spec/fixtures/parts/views/todo_part/formatted_output.js.erb",
+ "spec/fixtures/parts/views/todo_part/formatted_output.xml.erb",
+ "spec/fixtures/parts/views/todo_part/list.html.erb",
+ "spec/fixtures/parts/views/todo_part/part_with_params.html.erb",
+ "spec/fixtures/views/main/part_within_view.html.erb",
+ "spec/merb-parts_spec.rb",
+ "spec/spec.opts",
+ "spec/spec_helper.rb"
+ ]
+ s.homepage = %q{http://github.com/merb/merb_parts}
+ s.rdoc_options = ["--charset=UTF-8"]
+ s.require_paths = ["lib"]
+ s.rubygems_version = %q{1.3.5}
+ s.summary = %q{Merb plugin that provides Part Controllers.}
+ s.test_files = [
+ "spec/fixtures/controllers/main.rb",
+ "spec/fixtures/parts/done_part.rb",
+ "spec/fixtures/parts/todo_part.rb",
+ "spec/merb-parts_spec.rb",
+ "spec/spec_helper.rb"
+ ]
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<merb-core>, [">= 0.9.9"])
+ s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
+ else
+ s.add_dependency(%q<merb-core>, [">= 0.9.9"])
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
+ end
+ else
+ s.add_dependency(%q<merb-core>, [">= 0.9.9"])
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
+ end
+end
+
View
2  spec/merb-parts_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/spec_helper'
+require 'spec_helper'
describe "A Merb PartController" do
View
2  spec/spec.opts
@@ -0,0 +1,2 @@
+--format specdoc
+--colour
View
18 spec/spec_helper.rb
@@ -1,14 +1,22 @@
require 'rubygems'
+
+# Use current merb-core sources if running from a typical dev checkout.
+lib = File.expand_path('../../../merb/merb-core/lib', __FILE__)
+$LOAD_PATH.unshift(lib) if File.directory?(lib)
require "merb-core"
-require File.join( File.dirname(__FILE__), "..", "lib", "merb_parts" )
+
+# The lib under test
+require 'merb_parts'
# Require the fixtures
Dir[File.join(File.dirname(__FILE__), "fixtures", "*/**.rb")].each{|f| require f }
-Merb.start :environment => 'test',
- :adapter => 'runner',
- :log_level => :error,
- :disabled_components => [:json]
+Merb.start(
+ :environment => 'test',
+ :adapter => 'runner',
+ :log_level => :error,
+ :disabled_components => [:json]
+)
Spec::Runner.configure do |config|
config.include Merb::Test::RequestHelper
Please sign in to comment.
Something went wrong with that request. Please try again.