rails_datamapper 0.10.1 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2008 Tom Malone
1
+ Copyright (c) 2009 Tom Malone
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -1,24 +1,29 @@
1
- require 'pathname'
1
+ require 'rubygems'
2
+ require 'rake'
2
3
 
3
- ROOT = Pathname(__FILE__).dirname.expand_path
4
- JRUBY = RUBY_PLATFORM =~ /java/
5
- WINDOWS = Gem.win_platform?
6
- SUDO = (WINDOWS || JRUBY) ? '' : ('sudo' unless ENV['SUDOLESS'])
4
+ begin
5
+ gem 'jeweler', '~> 1.4'
6
+ require 'jeweler'
7
7
 
8
- require ROOT + 'lib/rails_datamapper/version'
8
+ Jeweler::Tasks.new do |gem|
9
+ gem.name = 'rails_datamapper'
10
+ gem.summary = 'Rails Plugin for DataMapper'
11
+ gem.description = gem.summary
12
+ gem.email = 'tomjmalone [a] gmail [d] com'
13
+ gem.homepage = 'http://github.com/datamapper/dm-more/tree/master/%s' % gem.name
14
+ gem.authors = [ 'Tom Malone' ]
9
15
 
10
- AUTHOR = 'Tom Malone'
11
- EMAIL = 'tomjmalone [a] gmail [d] com'
12
- GEM_NAME = 'rails_datamapper'
13
- GEM_VERSION = Rails::DataMapper::VERSION
14
- GEM_DEPENDENCIES = [['dm-core', GEM_VERSION]]
15
- GEM_CLEAN = %w[ pkg ]
16
- GEM_EXTRAS = { :has_rdoc => false, :extra_rdoc_files => %w[ README.rdoc LICENSE TODO History.rdoc ] }
16
+ gem.rubyforge_project = 'datamapper'
17
17
 
18
- PROJECT_NAME = 'datamapper'
19
- PROJECT_URL = "http://github.com/datamapper/dm-more/tree/master/#{GEM_NAME}"
20
- PROJECT_DESCRIPTION = PROJECT_SUMMARY = 'Rails Plugin for datamapper'
18
+ gem.add_dependency 'dm-core', '~> 0.10.2'
21
19
 
22
- [ ROOT, ROOT.parent ].each do |dir|
23
- Pathname.glob(dir.join('tasks/**/*.rb').to_s).sort.each { |filename| require filename }
20
+ gem.add_development_dependency 'rspec', '~> 1.2.9'
21
+ gem.add_development_dependency 'yard', '~> 0.4.0'
22
+ end
23
+
24
+ Jeweler::GemcutterTasks.new
25
+
26
+ FileList['tasks/**/*.rake'].each { |task| import task }
27
+ rescue LoadError
28
+ puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler'
24
29
  end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.10.2
data/datamapper.rake CHANGED
@@ -44,7 +44,7 @@ namespace :db do
44
44
 
45
45
  namespace :migrate do
46
46
  task :load => :environment do
47
- gem 'dm-migrations'
47
+ gem 'dm-migrations', '0.10.2'
48
48
  FileList['db/migrations/*.rb'].each do |migration|
49
49
  load migration
50
50
  end
@@ -18,7 +18,7 @@ namespace :db do
18
18
 
19
19
  namespace :migrate do
20
20
  task :load => :environment do
21
- gem 'dm-migrations'
21
+ gem 'dm-migrations', '0.10.2'
22
22
  FileList['db/migrations/*.rb'].each do |migration|
23
23
  load migration
24
24
  end
@@ -3,11 +3,11 @@ class <%= class_name %>
3
3
 
4
4
  property :id, Serial
5
5
  <% Array(attributes).each do |attribute| -%>
6
- property :<%= attribute.name %>, <%= attribute.type.to_s.capitalize %>, :nullable => false
6
+ property :<%= attribute.name %>, <%= attribute.type.to_s.capitalize %>, :required => true
7
7
  <% end -%>
8
8
  <% unless options[:skip_timestamps] -%>
9
- property :created_at, DateTime, :nullable => false
10
- property :updated_at, DateTime, :nullable => false
9
+ property :created_at, DateTime, :required => true
10
+ property :updated_at, DateTime, :required => true
11
11
  <% end -%>
12
12
 
13
13
  end
@@ -49,8 +49,8 @@ module DataMapperStore
49
49
 
50
50
  property :id, Serial
51
51
  property :session_id, String, :unique_index => true
52
- property :data, Text, :nullable => false, :default => ::Base64.encode64(Marshal.dump({}))
53
- property :updated_at, DateTime, :nullable => true, :index => true
52
+ property :data, Text, :required => true, :default => ::Base64.encode64(Marshal.dump({}))
53
+ property :updated_at, DateTime, :required => false, :index => true
54
54
 
55
55
  def data=(data)
56
56
  attribute_set(:data, ::Base64.encode64(Marshal.dump(data)))
@@ -0,0 +1,66 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{rails_datamapper}
8
+ s.version = "0.10.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Tom Malone"]
12
+ s.date = %q{2009-12-11}
13
+ s.description = %q{Rails Plugin for DataMapper}
14
+ s.email = %q{tomjmalone [a] gmail [d] com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ "LICENSE",
21
+ "README.rdoc",
22
+ "Rakefile",
23
+ "VERSION",
24
+ "datamapper.rake",
25
+ "generators/dm_install/dm_install_generator.rb",
26
+ "generators/dm_install/templates/datamapper.rake",
27
+ "generators/dm_migration/dm_migration_generator.rb",
28
+ "generators/dm_migration/templates/migration.rb",
29
+ "generators/dm_model/dm_model_generator.rb",
30
+ "generators/dm_model/templates/model.rb",
31
+ "generators/dm_model/templates/unit_test.rb",
32
+ "generators/rspec_dm_model/rspec_dm_model_generator.rb",
33
+ "generators/rspec_dm_model/templates/model_spec.rb",
34
+ "lib/rails_datamapper.rb",
35
+ "lib/rails_datamapper/session_store.rb",
36
+ "rails_datamapper.gemspec",
37
+ "tasks/yard.rake",
38
+ "tasks/yardstick.rake"
39
+ ]
40
+ s.homepage = %q{http://github.com/datamapper/dm-more/tree/master/rails_datamapper}
41
+ s.rdoc_options = ["--charset=UTF-8"]
42
+ s.require_paths = ["lib"]
43
+ s.rubyforge_project = %q{datamapper}
44
+ s.rubygems_version = %q{1.3.5}
45
+ s.summary = %q{Rails Plugin for DataMapper}
46
+
47
+ if s.respond_to? :specification_version then
48
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
49
+ s.specification_version = 3
50
+
51
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
52
+ s.add_runtime_dependency(%q<dm-core>, ["~> 0.10.2"])
53
+ s.add_development_dependency(%q<rspec>, ["~> 1.2.9"])
54
+ s.add_development_dependency(%q<yard>, ["~> 0.4.0"])
55
+ else
56
+ s.add_dependency(%q<dm-core>, ["~> 0.10.2"])
57
+ s.add_dependency(%q<rspec>, ["~> 1.2.9"])
58
+ s.add_dependency(%q<yard>, ["~> 0.4.0"])
59
+ end
60
+ else
61
+ s.add_dependency(%q<dm-core>, ["~> 0.10.2"])
62
+ s.add_dependency(%q<rspec>, ["~> 1.2.9"])
63
+ s.add_dependency(%q<yard>, ["~> 0.4.0"])
64
+ end
65
+ end
66
+
data/tasks/yard.rake ADDED
@@ -0,0 +1,9 @@
1
+ begin
2
+ require 'yard'
3
+
4
+ YARD::Rake::YardocTask.new
5
+ rescue LoadError
6
+ task :yard do
7
+ abort 'YARD is not available. In order to run yard, you must: gem install yard'
8
+ end
9
+ end
@@ -0,0 +1,19 @@
1
+ begin
2
+ require 'pathname'
3
+ require 'yardstick/rake/measurement'
4
+ require 'yardstick/rake/verify'
5
+
6
+ # yardstick_measure task
7
+ Yardstick::Rake::Measurement.new
8
+
9
+ # verify_measurements task
10
+ Yardstick::Rake::Verify.new do |verify|
11
+ verify.threshold = 100
12
+ end
13
+ rescue LoadError
14
+ %w[ yardstick_measure verify_measurements ].each do |name|
15
+ task name.to_s do
16
+ abort "Yardstick is not available. In order to run #{name}, you must: gem install yardstick"
17
+ end
18
+ end
19
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_datamapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Malone
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-30 00:00:00 -07:00
12
+ date: 2009-12-11 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -18,29 +18,44 @@ dependencies:
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement
20
20
  requirements:
21
- - - "="
21
+ - - ~>
22
22
  - !ruby/object:Gem::Version
23
- version: 0.10.1
23
+ version: 0.10.2
24
24
  version:
25
- description: Rails Plugin for datamapper
26
- email:
27
- - tomjmalone [a] gmail [d] com
25
+ - !ruby/object:Gem::Dependency
26
+ name: rspec
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 1.2.9
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: yard
37
+ type: :development
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 0.4.0
44
+ version:
45
+ description: Rails Plugin for DataMapper
46
+ email: tomjmalone [a] gmail [d] com
28
47
  executables: []
29
48
 
30
49
  extensions: []
31
50
 
32
51
  extra_rdoc_files:
33
- - README.rdoc
34
52
  - LICENSE
35
- - TODO
36
- - History.rdoc
53
+ - README.rdoc
37
54
  files:
38
- - History.rdoc
39
55
  - LICENSE
40
- - Manifest.txt
41
56
  - README.rdoc
42
57
  - Rakefile
43
- - TODO
58
+ - VERSION
44
59
  - datamapper.rake
45
60
  - generators/dm_install/dm_install_generator.rb
46
61
  - generators/dm_install/templates/datamapper.rake
@@ -53,16 +68,16 @@ files:
53
68
  - generators/rspec_dm_model/templates/model_spec.rb
54
69
  - lib/rails_datamapper.rb
55
70
  - lib/rails_datamapper/session_store.rb
56
- - lib/rails_datamapper/version.rb
57
- - tasks/install.rb
58
- has_rdoc: false
71
+ - rails_datamapper.gemspec
72
+ - tasks/yard.rake
73
+ - tasks/yardstick.rake
74
+ has_rdoc: true
59
75
  homepage: http://github.com/datamapper/dm-more/tree/master/rails_datamapper
60
76
  licenses: []
61
77
 
62
78
  post_install_message:
63
79
  rdoc_options:
64
- - --main
65
- - README.rdoc
80
+ - --charset=UTF-8
66
81
  require_paths:
67
82
  - lib
68
83
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -83,6 +98,6 @@ rubyforge_project: datamapper
83
98
  rubygems_version: 1.3.5
84
99
  signing_key:
85
100
  specification_version: 3
86
- summary: Rails Plugin for datamapper
101
+ summary: Rails Plugin for DataMapper
87
102
  test_files: []
88
103
 
data/History.rdoc DELETED
@@ -1,11 +0,0 @@
1
- === 0.10.1 / 2009-09-30
2
-
3
- * No changes this version
4
-
5
- === 0.10.0 / 2009-09-15
6
-
7
- * Updated to work with dm-core 0.10.0
8
-
9
- === 0.9.11 / 2009-03-29
10
-
11
- * Made a gem
data/Manifest.txt DELETED
@@ -1,20 +0,0 @@
1
- History.rdoc
2
- LICENSE
3
- Manifest.txt
4
- README.rdoc
5
- Rakefile
6
- TODO
7
- datamapper.rake
8
- generators/dm_install/dm_install_generator.rb
9
- generators/dm_install/templates/datamapper.rake
10
- generators/dm_migration/dm_migration_generator.rb
11
- generators/dm_migration/templates/migration.rb
12
- generators/dm_model/dm_model_generator.rb
13
- generators/dm_model/templates/model.rb
14
- generators/dm_model/templates/unit_test.rb
15
- generators/rspec_dm_model/rspec_dm_model_generator.rb
16
- generators/rspec_dm_model/templates/model_spec.rb
17
- lib/rails_datamapper.rb
18
- lib/rails_datamapper/session_store.rb
19
- lib/rails_datamapper/version.rb
20
- tasks/install.rb
data/TODO DELETED
File without changes
@@ -1,5 +0,0 @@
1
- module Rails
2
- module DataMapper
3
- VERSION = '0.10.1'.freeze
4
- end
5
- end
data/tasks/install.rb DELETED
@@ -1,13 +0,0 @@
1
- def sudo_gem(cmd)
2
- sh "#{SUDO} #{RUBY} -S gem #{cmd}", :verbose => false
3
- end
4
-
5
- desc "Install #{GEM_NAME} #{GEM_VERSION}"
6
- task :install => [ :package ] do
7
- sudo_gem "install pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources"
8
- end
9
-
10
- desc "Uninstall #{GEM_NAME} #{GEM_VERSION}"
11
- task :uninstall => [ :clobber ] do
12
- sudo_gem "uninstall #{GEM_NAME} -v#{GEM_VERSION} -Ix"
13
- end