Permalink
Browse files

switch to datamapper version 1.0.x

  • Loading branch information...
1 parent c2e7a52 commit f6243dd96bcccf8d9a7b389e68c6a8c315e96071 @mkristian committed Jun 14, 2010
View
@@ -1,2 +1,3 @@
/pkg
-*~
+*~
+target
View
@@ -1,19 +0,0 @@
-History.txt
-Manifest.txt
-README.txt
-Rakefile
-lib/rack-datamapper.rb
-lib/rack_datamapper.rb
-lib/softhashmap.jar
-lib/rack_datamapper/identity_maps.rb
-lib/rack_datamapper/restful_transactions.rb
-lib/rack_datamapper/session/abstract/store.rb
-lib/rack_datamapper/session/datamapper.rb
-lib/rack_datamapper/transaction_boundaries.rb
-lib/rack_datamapper/version.rb
-spec/datamapper_session_spec.rb
-spec/identity_maps_spec.rb
-spec/restful_transactions_spec.rb
-spec/spec.opts
-spec/spec_helper.rb
-spec/transaction_boundaries_spec.rb
View
@@ -1,19 +1,14 @@
# -*- ruby -*-
require 'rubygems'
-require 'hoe'
-require './lib/rack_datamapper/version.rb'
require 'spec'
require 'spec/rake/spectask'
require 'pathname'
require 'yard'
-Hoe.spec('rack-datamapper') do |p|
- p.developer('mkristian', 'm.kristian@web.de')
- p.extra_deps = [['dm-core', '>0.9.10']]
- p.rspec_options << '--options' << 'spec/spec.opts'
-end
+desc "Run specs"
+Spec::Rake::SpecTask.new('spec')
desc 'Install the package as a gem.'
task :install => [:clean, :package] do
View
@@ -0,0 +1,9 @@
+#!/bin/ruby
+require 'rubygems'
+
+raise "needs rubygems version >=1.3.6" if Gem::VERSION < "1.3.6"
+load '../jruby-maven-plugins/gem-proxy/src/main/resources/gem_artifacts.rb'
+m = Maven::LocalRepository.new
+File.open("pom.xml", "w") do |f|
+ f << m.to_pomxml('rack_datamapper.gemspec')
+end
@@ -6,11 +6,9 @@ def initialize(app, name = :default)
end
def call(env)
- status, headers, response = nil, nil, nil
DataMapper.repository(@name) do
- status, headers, response = @app.call(env)
+ @app.call(env)
end
- [status, headers, response]
end
end
end
@@ -101,9 +101,9 @@ def self.default_storage_name
property :session_id, String, :key => true
- property :data, Text, :nullable => false, :default => ::Base64.encode64(Marshal.dump({}))
+ property :data, Text, :required => true, :default => ::Base64.encode64(Marshal.dump({}))
- property :updated_at, DateTime, :nullable => true, :index => true
+ property :updated_at, DateTime, :required => false, :index => true
def data=(data)
attribute_set(:data, ::Base64.encode64(Marshal.dump(data)))
@@ -1,5 +1,5 @@
module Rack
module DataMapper
- VERSION = '0.2.5'.freeze
+ VERSION = '0.3.0'.freeze
end
end
View
91 pom.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>rubygems</groupId>
+ <artifactId>rack-datamapper</artifactId>
+ <version>0.3.0</version>
+ <packaging>gem</packaging>
+ <name><![CDATA[this collection of plugins helps to add datamapper functionality to Rack]]></name>
+ <description><![CDATA[this collection of plugins helps to add datamapper functionality to Rack. there is a IdentityMaps plugin which wrappes the request and with it all database actions are using that identity map. the transaction related plugin TransactionBoundaries and RestfulTransactions wrappes the request into a transaction. for using datamapper to store session data there is the DatamapperStore.]]></description>
+ <url>http://github.com/mkristian/rack_datamapper</url>
+ <dependencies>
+ <dependency>
+ <groupId>rubygems</groupId>
+ <artifactId>dm-core</artifactId>
+ <version>[1.0.0,1.0.99999.99999)</version>
+ <type>gem</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>rubygems</groupId>
+ <artifactId>rack</artifactId>
+ <version>[1.0.0,1.99999.99999)</version>
+ <type>gem</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>rubygems</groupId>
+ <artifactId>dm-migrations</artifactId>
+ <version>[1.0.0,1.0.99999.99999)</version>
+ <type>gem</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>rubygems</groupId>
+ <artifactId>dm-transactions</artifactId>
+ <version>[1.0.0,1.0.99999.99999)</version>
+ <type>gem</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>rubygems</groupId>
+ <artifactId>dm-sqlite-adapter</artifactId>
+ <version>[1.0.0,1.0.99999.99999)</version>
+ <type>gem</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>rubygems</groupId>
+ <artifactId>rspec</artifactId>
+ <version>[1.3.0,1.3.99999.99999)</version>
+ <type>gem</type>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <repositories>
+ <repository>
+ <id>rubygems</id>
+ <url>http://gems.saumya.de/releases</url>
+ </repository>
+ </repositories>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <jruby.plugins.version>0.12.1-SNAPSHOT</jruby.plugins.version>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>de.saumya.mojo</groupId>
+ <artifactId>rspec-maven-plugin</artifactId>
+ <version>${jruby.plugins.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>de.saumya.mojo</groupId>
+ <artifactId>gem-maven-plugin</artifactId>
+ <version>${jruby.plugins.version}</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
View
@@ -0,0 +1,33 @@
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = %q{rack-datamapper}
+ s.version = "0.3.0"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["mkristian"]
+ s.date = %q{2010-06-13}
+ s.description = %q{this collection of plugins helps to add datamapper functionality to Rack. there is a IdentityMaps plugin which wrappes the request and with it all database actions are using that identity map. the transaction related plugin TransactionBoundaries and RestfulTransactions wrappes the request into a transaction. for using datamapper to store session data there is the DatamapperStore.}
+ s.email = ["m.kristian@web.de"]
+ s.extra_rdoc_files = ["History.txt", "README.txt"]
+ s.files = ["History.txt", "MIT-LICENSE", "README.txt", "Rakefile"]
+ s.files = s.files +
+ Dir.glob("lib/*jar") +
+ Dir.glob("lib/**/*rb")
+ s.test_files = Dir.glob("spec/**/*.rb")
+ s.homepage = %q{http://github.com/mkristian/rack_datamapper}
+ s.rdoc_options = ["--main", "README.txt"]
+ s.require_paths = ["lib"]
+ s.rubyforge_project = %q{rack-datamapper}
+ s.rubygems_version = %q{1.3.5}
+ s.summary = %q{this collection of plugins helps to add datamapper functionality to Rack}
+
+ s.add_runtime_dependency(%q<dm-core>, ["~> 1.0.0"])
+ s.add_runtime_dependency(%q<rack>, ["~> 1.0"])
+
+ s.add_development_dependency(%q<dm-migrations>, ["~> 1.0.0"])
+ s.add_development_dependency(%q<dm-transactions>, ["~> 1.0.0"])
+ s.add_development_dependency(%q<dm-sqlite-adapter>, ["~> 1.0.0"])
+ s.add_development_dependency(%q<rspec>, ["~> 1.3.0"])
+end
+
View
@@ -1,9 +1,10 @@
require 'pathname'
require 'rubygems'
-#gem 'dm-core', '0.9.10'
$LOAD_PATH << Pathname(__FILE__).dirname.parent.expand_path + 'lib'
require 'rack_datamapper'
require 'dm-core/version'
+require 'dm-migrations'
+require 'dm-transactions'
p DataMapper::VERSION
def load_driver(name, default_uri)
return false if ENV['ADAPTER'] != name.to_s

0 comments on commit f6243dd

Please sign in to comment.