Permalink
Browse files

Initial commit to rails3_datamapper.

  • Loading branch information...
0 parents commit df3f689b86de796e96ea92896b03796cea130e56 @dkubb dkubb committed Dec 30, 2009
Showing with 226 additions and 0 deletions.
  1. +5 −0 .document
  2. +25 −0 .gitignore
  3. +20 −0 LICENSE
  4. +17 −0 README.rdoc
  5. +25 −0 Rakefile
  6. +1 −0 VERSION
  7. 0 lib/rails3_datamapper.rb
  8. +6 −0 spec/rcov.opts
  9. +4 −0 spec/spec.opts
  10. +9 −0 spec/spec_helper.rb
  11. +1 −0 tasks/ci.rake
  12. +6 −0 tasks/clean.rake
  13. +37 −0 tasks/metrics.rake
  14. +41 −0 tasks/spec.rake
  15. +9 −0 tasks/yard.rake
  16. +20 −0 tasks/yardstick.rake
@@ -0,0 +1,5 @@
+README.rdoc
+lib/**/*.rb
+bin/*
+features/**/*.feature
+LICENSE
@@ -0,0 +1,25 @@
+## MAC OS
+.DS_Store
+
+## TEXTMATE
+*.tmproj
+tmtags
+
+## EMACS
+*~
+\#*
+.\#*
+
+## VIM
+*.swp
+
+## PROJECT::GENERAL
+coverage
+rdoc
+doc
+pkg
+tmp
+log
+.yardoc
+
+## PROJECT::SPECIFIC
20 LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2009 Dan Kubb
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,17 @@
+= rails3_datamapper
+
+Integrate DataMapper with Rails 3.
+
+== Note on Patches/Pull Requests
+
+* Fork the project.
+* Make your feature addition or bug fix.
+* Add tests for it. This is important so I don't break it in a
+ future version unintentionally.
+* Commit, do not mess with rakefile, version, or history.
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
+* Send me a pull request. Bonus points for topic branches.
+
+== Copyright
+
+Copyright (c) 2009 Dan Kubb. See LICENSE for details.
@@ -0,0 +1,25 @@
+require 'rubygems'
+require 'rake'
+
+begin
+ gem 'jeweler', '~> 1.4'
+ require 'jeweler'
+
+ Jeweler::Tasks.new do |gem|
+ gem.name = 'rails3_datamapper'
+ gem.summary = 'Use DataMapper with Rails 3'
+ gem.description = 'Integrate DataMapper with Rails 3'
+ gem.email = 'dan.kubb@gmail.com'
+ gem.homepage = 'http://github.com/dkubb/rails3_datamapper'
+ gem.authors = [ 'Dan Kubb' ]
+
+ gem.add_development_dependency 'rspec', '~> 1.2.9'
+ gem.add_development_dependency 'yard', '~> 0.5'
+ end
+
+ Jeweler::GemcutterTasks.new
+
+ FileList['tasks/**/*.rake'].each { |task| import task }
+rescue LoadError
+ puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler'
+end
@@ -0,0 +1 @@
+0.10.2
No changes.
@@ -0,0 +1,6 @@
+--exclude-only "spec\/,^\/"
+--sort coverage
+--callsites
+--xrefs
+--profile
+--text-summary
@@ -0,0 +1,4 @@
+--color
+--loadby random
+--format profile
+--backtrace
@@ -0,0 +1,9 @@
+$LOAD_PATH.unshift(File.expand_path('../', __FILE__))
+$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
+
+require 'rails3_datamapper'
+require 'spec'
+require 'spec/autorun'
+
+Spec::Runner.configure do |config|
+end
@@ -0,0 +1 @@
+task :ci => [ 'metrics:all' ]
@@ -0,0 +1,6 @@
+require 'rake/clean'
+
+File.foreach('.gitignore') do |line|
+ line.strip!
+ CLOBBER << line unless line.empty? || line[0, 1] == '#'
+end
@@ -0,0 +1,37 @@
+begin
+ require 'metric_fu'
+rescue LoadError
+ namespace :metrics do
+ task :all do
+ abort 'metric_fu is not available. In order to run metrics:all, you must: gem install metric_fu'
+ end
+ end
+end
+
+begin
+ require 'reek/adapters/rake_task'
+
+ Reek::RakeTask.new do |t|
+ t.fail_on_error = true
+ t.verbose = false
+ t.source_files = 'lib/**/*.rb'
+ end
+rescue LoadError
+ task :reek do
+ abort 'Reek is not available. In order to run reek, you must: gem install reek'
+ end
+end
+
+begin
+ require 'roodi'
+ require 'rake/tasklib'
+ require 'roodi_task'
+
+ RoodiTask.new do |t|
+ t.verbose = false
+ end
+rescue LoadError
+ task :roodi do
+ abort 'Roodi is not available. In order to run roodi, you must: gem install roodi'
+ end
+end
@@ -0,0 +1,41 @@
+spec_defaults = lambda do |spec|
+ spec.pattern = 'spec/**/*_spec.rb'
+ spec.libs << 'lib' << 'spec'
+ spec.spec_opts << '--options' << 'spec/spec.opts'
+end
+
+begin
+ require 'spec/rake/spectask'
+
+ Spec::Rake::SpecTask.new(:spec, &spec_defaults)
+rescue LoadError
+ task :spec do
+ abort 'rspec is not available. In order to run spec, you must: gem install rspec'
+ end
+end
+
+begin
+ require 'rcov'
+ require 'spec/rake/verify_rcov'
+
+ Spec::Rake::SpecTask.new(:rcov) do |rcov|
+ spec_defaults.call(rcov)
+ rcov.rcov = true
+ rcov.rcov_opts = File.read('spec/rcov.opts').split(/\s+/)
+ end
+
+ RCov::VerifyTask.new(:verify_rcov => :rcov) do |rcov|
+ rcov.threshold = 100
+ end
+rescue LoadError
+ %w[ rcov verify_rcov ].each do |name|
+ task name do
+ abort "rcov is not available. In order to run #{name}, you must: gem install rcov"
+ end
+ end
+end
+
+task :spec => :check_dependencies
+task :rcov => :check_dependencies
+
+task :default => :spec
@@ -0,0 +1,9 @@
+begin
+ require 'yard'
+
+ YARD::Rake::YardocTask.new
+rescue LoadError
+ task :yard do
+ abort 'YARD is not available. In order to run yard, you must: gem install yard'
+ end
+end
@@ -0,0 +1,20 @@
+begin
+ require 'pathname'
+ require 'yardstick'
+ require 'yardstick/rake/measurement'
+ require 'yardstick/rake/verify'
+
+ # yardstick_measure task
+ Yardstick::Rake::Measurement.new
+
+ # verify_measurements task
+ Yardstick::Rake::Verify.new do |verify|
+ verify.threshold = 100
+ end
+rescue LoadError
+ %w[ yardstick_measure verify_measurements ].each do |name|
+ task name.to_s do
+ abort "Yardstick is not available. In order to run #{name}, you must: gem install yardstick"
+ end
+ end
+end

0 comments on commit df3f689

Please sign in to comment.