forked from jffjs/mongoid_auto_inc
-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from proton/rubocop
Rubocop-generated syntax changes
- Loading branch information
Showing
9 changed files
with
76 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# encoding: utf-8 | ||
|
||
require 'rubygems' | ||
require 'rake' | ||
require 'bundler' | ||
|
@@ -8,21 +6,21 @@ Bundler::GemHelper.install_tasks | |
begin | ||
Bundler.setup(:default, :development) | ||
rescue Bundler::BundlerError => e | ||
$stderr.puts e.message | ||
$stderr.puts "Run `bundle install` to install missing gems" | ||
warn e.message | ||
warn 'Run `bundle install` to install missing gems' | ||
exit e.status_code | ||
end | ||
|
||
require 'jeweler' | ||
Jeweler::Tasks.new do |gem| | ||
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options | ||
gem.name = "mongoid_auto_increment" | ||
gem.homepage = "http://github.com/proton/mongoid_auto_increment" | ||
gem.license = "MIT" | ||
gem.summary = %q{Auto-incrementing fields for Mongoid documents} | ||
gem.description = %q{Add SQL like auto-incrementing fields to your Mongoid documents.} | ||
gem.email = "[email protected]" | ||
gem.authors = ["Peter Savichev (proton)"] | ||
gem.name = 'mongoid_auto_increment' | ||
gem.homepage = 'http://github.com/proton/mongoid_auto_increment' | ||
gem.license = 'MIT' | ||
gem.summary = 'Auto-incrementing fields for Mongoid documents' | ||
gem.description = 'Add SQL like auto-incrementing fields to your Mongoid documents.' | ||
gem.email = '[email protected]' | ||
gem.authors = ['Peter Savichev (proton)'] | ||
# dependencies defined in Gemfile | ||
end | ||
Jeweler::RubygemsDotOrgTasks.new | ||
|
@@ -33,27 +31,27 @@ RSpec::Core::RakeTask.new(:spec) do |spec| | |
spec.pattern = 'spec/**/*_spec.rb' | ||
end | ||
|
||
task :default => :spec | ||
task default: :spec | ||
|
||
require 'rdoc/task' | ||
RDoc::Task.new do |rdoc| | ||
version = File.exist?('VERSION') ? File.read('VERSION') : "" | ||
version = File.exist?('VERSION') ? File.read('VERSION') : '' | ||
|
||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = "mongoid_auto_increment #{version}" | ||
rdoc.rdoc_files.include('README*') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
end | ||
|
||
desc "Build gem" | ||
desc 'Build gem' | ||
task :build do | ||
puts "Regenerating gemspec" | ||
system "rake gemspec" | ||
puts "Building" | ||
system "gem build mongoid_auto_increment.gemspec" | ||
puts 'Regenerating gemspec' | ||
system 'rake gemspec' | ||
puts 'Building' | ||
system 'gem build mongoid_auto_increment.gemspec' | ||
end | ||
|
||
desc "Release gem" | ||
task :release => :build do | ||
version = File.exist?('VERSION') ? File.read('VERSION') : "" | ||
desc 'Release gem' | ||
task release: :build do | ||
version = File.exist?('VERSION') ? File.read('VERSION') : '' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,5 @@ class Order | |
|
||
field :title | ||
|
||
auto_increment :num, :seed => 1000 | ||
auto_increment :num, seed: 1000 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters