Permalink
Browse files

switched to jeweler for managing the gem

  • Loading branch information...
1 parent 76221d4 commit ca834dbc77aa43bc5c52b3a17c47e5f6b9442b5f @langalex langalex committed Feb 15, 2009
Showing with 44 additions and 120 deletions.
  1. +13 −51 Rakefile
  2. +4 −0 VERSION.yml
  3. +27 −69 couch_potato.gemspec
View
@@ -1,5 +1,5 @@
+require 'rake'
require 'spec/rake/spectask'
-require 'rake/gempackagetask'
task :default => :spec
@@ -17,56 +17,18 @@ end
desc "Run all specs"
task :spec => [:spec_unit, :spec_functional] do
-
end
-spec = Gem::Specification.new do |s|
- s.name = "couch_potato"
- s.version = "0.1.1"
- s.author = "Alexander Lang"
- s.email = "alex@upstream-berlin.com"
- s.homepage = 'http://github.com/langalex/couch_potato'
- s.summary = "a couchdb persistence layer in ruby"
- s.files = ['init.rb', 'Readme.textile', 'MIT-LICENSE.txt', 'CREDITS'] + Dir["{lib,spec}/**/*"]
- s.require_paths << "lib"
- s.add_dependency 'json'
- s.add_dependency 'validatable'
- s.add_dependency 'activesupport'
- s.add_dependency 'jchris-couchrest', '>=0.9.12'
-end
-
-::Rake::GemPackageTask.new(spec) { |p| p.gem_spec = spec }
-
-desc "Update Github Gemspec"
-task :gemspec do
- skip_fields = %w(new_platform original_platform)
- integer_fields = %w(specification_version)
-
- result = "Gem::Specification.new do |s|\n"
- spec.instance_variables.each do |ivar|
- value = spec.instance_variable_get(ivar)
- name = ivar.split("@").last
- next if skip_fields.include?(name) || value.nil? || value == "" || (value.respond_to?(:empty?) && value.empty?)
- if name == "dependencies"
- value.each do |d|
- dep, *ver = d.to_s.split(" ")
- result << " s.add_dependency #{dep.inspect}, [#{ /\(([^\,]*)/ . match(ver.join(" "))[1].inspect}]\n"
- end
- else
- case value
- when Array
- value = name != "files" ? value.inspect : value.inspect.split(",").join(",\n")
- when Fixnum
- # leave as-is
- when String
- value = value.to_i if integer_fields.include?(name)
- value = value.inspect
- else
- value = value.to_s.inspect
- end
- result << " s.#{name} = #{value}\n"
- end
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |s|
+ s.name = "couch_potato"
+ s.summary = %Q{Ruby persistence layer for CouchDB}
+ s.email = "alex@upstream-berlin.com"
+ s.homepage = "http://github.com/langalex/couch_potato"
+ s.description = "Ruby persistence layer for CouchDB"
+ s.authors = ["Alexander Lang"]
end
- result << "end"
- File.open(File.join(File.dirname(__FILE__), "#{spec.name}.gemspec"), "w"){|f| f << result}
-end
+rescue LoadError
+ puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
+end
View
@@ -0,0 +1,4 @@
+---
+:patch: 1
+:major: 0
+:minor: 1
View
@@ -1,71 +1,29 @@
+# -*- encoding: utf-8 -*-
+
Gem::Specification.new do |s|
- s.add_dependency "json", [">= 0"]
- s.add_dependency "validatable", [">= 0"]
- s.add_dependency "activesupport", [">= 0"]
- s.add_dependency "jchris-couchrest", [">= 0.9.12"]
- s.require_paths = ["lib", "lib"]
- s.date = "Sat Nov 15 00:00:00 +0100 2008"
- s.authors = ["Alexander Lang"]
- s.name = "couch_potato"
- s.required_rubygems_version = ">= 0"
- s.files = ["init.rb",
- "Readme.textile",
- "MIT-LICENSE.txt",
- "CREDITS",
- "lib/core_ext",
- "lib/core_ext/object.rb",
- "lib/core_ext/time.rb",
- "lib/couch_potato",
- "lib/couch_potato/active_record",
- "lib/couch_potato/active_record/compatibility.rb",
- "lib/couch_potato/ordering.rb",
- "lib/couch_potato/persistence",
- "lib/couch_potato/persistence/belongs_to_property.rb",
- "lib/couch_potato/persistence/bulk_save_queue.rb",
- "lib/couch_potato/persistence/callbacks.rb",
- "lib/couch_potato/persistence/collection.rb",
- "lib/couch_potato/persistence/dirty_attributes.rb",
- "lib/couch_potato/persistence/external_collection.rb",
- "lib/couch_potato/persistence/external_has_many_property.rb",
- "lib/couch_potato/persistence/find.rb",
- "lib/couch_potato/persistence/finder.rb",
- "lib/couch_potato/persistence/inline_collection.rb",
- "lib/couch_potato/persistence/inline_has_many_property.rb",
- "lib/couch_potato/persistence/json.rb",
- "lib/couch_potato/persistence/properties.rb",
- "lib/couch_potato/persistence/simple_property.rb",
- "lib/couch_potato/persistence.rb",
- "lib/couch_potato/versioning.rb",
- "lib/couch_potato.rb",
- "spec/attributes_spec.rb",
- "spec/belongs_to_spec.rb",
- "spec/callbacks_spec.rb",
- "spec/create_spec.rb",
- "spec/destroy_spec.rb",
- "spec/dirty_attributes_spec.rb",
- "spec/find_spec.rb",
- "spec/finder_spec.rb",
- "spec/has_many_spec.rb",
- "spec/inline_collection_spec.rb",
- "spec/ordering_spec.rb",
- "spec/property_spec.rb",
- "spec/reload_spec.rb",
- "spec/spec.opts",
- "spec/spec_helper.rb",
- "spec/unit",
- "spec/unit/external_collection_spec.rb",
- "spec/unit/finder_spec.rb",
- "spec/update_spec.rb",
- "spec/versioning_spec.rb"]
- s.has_rdoc = "false"
- s.specification_version = 2
- s.loaded = "false"
- s.email = "alex@upstream-berlin.com"
- s.required_ruby_version = ">= 0"
- s.bindir = "bin"
- s.rubygems_version = "1.2.0"
- s.homepage = "http://github.com/langalex/couch_potato"
- s.platform = "ruby"
- s.summary = "a couchdb persistence layer in ruby"
+ s.name = %q{couch_potato}
s.version = "0.1.1"
-end
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Alexander Lang"]
+ s.date = %q{2009-02-15}
+ s.description = %q{Ruby persistence layer for CouchDB}
+ s.email = %q{alex@upstream-berlin.com}
+ s.files = ["MIT-LICENSE.txt", "README.textile", "VERSION.yml", "lib/core_ext", "lib/core_ext/object.rb", "lib/core_ext/time.rb", "lib/couch_potato", "lib/couch_potato/active_record", "lib/couch_potato/active_record/compatibility.rb", "lib/couch_potato/ordering.rb", "lib/couch_potato/persistence", "lib/couch_potato/persistence/belongs_to_property.rb", "lib/couch_potato/persistence/bulk_save_queue.rb", "lib/couch_potato/persistence/callbacks.rb", "lib/couch_potato/persistence/collection.rb", "lib/couch_potato/persistence/custom_view.rb", "lib/couch_potato/persistence/dirty_attributes.rb", "lib/couch_potato/persistence/external_collection.rb", "lib/couch_potato/persistence/external_has_many_property.rb", "lib/couch_potato/persistence/find.rb", "lib/couch_potato/persistence/finder.rb", "lib/couch_potato/persistence/inline_collection.rb", "lib/couch_potato/persistence/inline_has_many_property.rb", "lib/couch_potato/persistence/json.rb", "lib/couch_potato/persistence/properties.rb", "lib/couch_potato/persistence/simple_property.rb", "lib/couch_potato/persistence/view_query.rb", "lib/couch_potato/persistence.rb", "lib/couch_potato/versioning.rb", "lib/couch_potato.rb", "spec/attributes_spec.rb", "spec/belongs_to_spec.rb", "spec/callbacks_spec.rb", "spec/create_spec.rb", "spec/custom_view_spec.rb", "spec/destroy_spec.rb", "spec/dirty_attributes_spec.rb", "spec/find_spec.rb", "spec/finder_spec.rb", "spec/has_many_spec.rb", "spec/inline_collection_spec.rb", "spec/ordering_spec.rb", "spec/property_spec.rb", "spec/reload_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "spec/unit", "spec/unit/external_collection_spec.rb", "spec/unit/finder_spec.rb", "spec/unit/view_query_spec.rb", "spec/update_spec.rb", "spec/versioning_spec.rb"]
+ s.has_rdoc = true
+ s.homepage = %q{http://github.com/langalex/couch_potato}
+ s.rdoc_options = ["--inline-source", "--charset=UTF-8"]
+ s.require_paths = ["lib"]
+ s.rubygems_version = %q{1.3.1}
+ s.summary = %q{Ruby persistence layer for CouchDB}
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 2
+
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
+ else
+ end
+ else
+ end
+end

0 comments on commit ca834db

Please sign in to comment.