Permalink
Browse files

Switched from Jeweler to Bundler

  • Loading branch information...
1 parent 055808c commit 12f80d9409902790c48746be391896ff4d9bdf07 @azisaka committed Apr 4, 2012
Showing with 29 additions and 84 deletions.
  1. +4 −23 Rakefile
  2. +0 −1 VERSION
  3. +10 −0 lib/mongoid/i18n/version.rb
  4. +15 −60 mongoid_i18n.gemspec
View
@@ -1,38 +1,19 @@
# encoding: utf-8
-require 'rubygems'
-require 'rake'
+require 'bundler'
require 'rspec'
require 'rspec/core/rake_task'
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "mongoid_i18n"
- gem.summary = %Q{Mongoid plugin to deal with localizable fields}
- gem.description = %Q{This gem aims to be a transparent way to deal with localizable fields.
- Basically use localized_field() instead of field() and that's it.
- It will take care of locales for you when using find or criteria.
- }
- gem.email = "papipo@gmail.com"
- gem.homepage = "http://github.com/Papipo/mongoid_i18n"
- gem.authors = ["Rodrigo Álvarez"]
-
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
- end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
-end
-
+Bundler::GemHelper.install_tasks
desc "Run all examples"
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
require 'rdoc/task'
+require "#{File.dirname(__FILE__)}/lib/mongoid/i18n/version"
Rake::RDocTask.new do |rdoc|
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
+ version = Mongoid::I18n::Version::STRING
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "mongoid_i18n #{version}"
View
@@ -1 +0,0 @@
-0.5.1
@@ -0,0 +1,10 @@
+module Mongoid
+ module I18n
+ module Version
+ MAJOR = '0'
+ TINY = '5'
+ PATCH = '2'
+ STRING = [MAJOR, TINY, PATCH] * '.'
+ end
+ end
+end
View
@@ -1,73 +1,28 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
-# -*- encoding: utf-8 -*-
+# encoding: utf-8
+require "#{File.dirname(__FILE__)}/lib/mongoid/i18n/version"
Gem::Specification.new do |s|
- s.name = %q{mongoid_i18n}
- s.version = "0.5.1"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.name = 'mongoid_i18n'
+ s.version = Mongoid::I18n::Version::STRING
+ s.platform = Gem::Platform::RUBY
s.authors = [%q{Rodrigo Álvarez}]
s.date = %q{2011-10-17}
+ s.summary = %q{Mongoid plugin to deal with localizable fields}
s.description = %q{This gem aims to be a transparent way to deal with localizable fields.
Basically use localized_field() instead of field() and that's it.
It will take care of locales for you when using find or criteria.
}
s.email = %q{papipo@gmail.com}
- s.extra_rdoc_files = [
- "LICENSE",
- "README.rdoc"
- ]
- s.files = [
- ".document",
- ".rvmrc",
- "Gemfile",
- "Gemfile.lock",
- "LICENSE",
- "README.rdoc",
- "Rakefile",
- "VERSION",
- "config/locales/en.yml",
- "lib/mongoid/i18n.rb",
- "lib/mongoid/i18n/criterion/selector.rb",
- "lib/mongoid/i18n/localized_field.rb",
- "lib/mongoid/i18n/localized_validator.rb",
- "mongoid_i18n.gemspec",
- "spec/.rspec",
- "spec/integration/mongoid/i18n_spec.rb",
- "spec/spec_helper.rb"
- ]
+ s.extra_rdoc_files = %w(LICENSE README.rdoc)
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {spec}/*`.split("\n")
s.homepage = %q{http://github.com/Papipo/mongoid_i18n}
- s.require_paths = [%q{lib}]
- s.rubygems_version = %q{1.8.6}
- s.summary = %q{Mongoid plugin to deal with localizable fields}
-
- if s.respond_to? :specification_version then
- s.specification_version = 3
+ s.require_paths = %w(lib)
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_runtime_dependency(%q<mongoid>, [">= 2.1.0"])
- s.add_development_dependency(%q<bson_ext>, [">= 0"])
- s.add_development_dependency(%q<rspec>, [">= 0"])
- s.add_development_dependency(%q<mocha>, [">= 0"])
- s.add_development_dependency(%q<jeweler>, [">= 0"])
- s.add_development_dependency(%q<bundler>, [">= 0"])
- else
- s.add_dependency(%q<mongoid>, [">= 2.1.0"])
- s.add_dependency(%q<bson_ext>, [">= 0"])
- s.add_dependency(%q<rspec>, [">= 0"])
- s.add_dependency(%q<mocha>, [">= 0"])
- s.add_dependency(%q<jeweler>, [">= 0"])
- s.add_dependency(%q<bundler>, [">= 0"])
- end
- else
- s.add_dependency(%q<mongoid>, [">= 2.1.0"])
- s.add_dependency(%q<bson_ext>, [">= 0"])
- s.add_dependency(%q<rspec>, [">= 0"])
- s.add_dependency(%q<mocha>, [">= 0"])
- s.add_dependency(%q<jeweler>, [">= 0"])
- s.add_dependency(%q<bundler>, [">= 0"])
- end
+ s.add_runtime_dependency "mongoid", ">= 2.1.0"
+ s.add_development_dependency "bson_ext", ">= 0"
+ s.add_development_dependency "rspec", ">= 0"
+ s.add_development_dependency "mocha", ">= 0"
+ s.add_development_dependency "bundler", ">= 0"
end

0 comments on commit 12f80d9

Please sign in to comment.