dm-serializer 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) 2007 Guy van den Berg
1
+ Copyright (c) 2009 Guy van den Berg
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,33 @@
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/dm-serializer/version'
8
+ Jeweler::Tasks.new do |gem|
9
+ gem.name = 'dm-serializer'
10
+ gem.summary = 'DataMapper plugin for serializing Resources and Collections'
11
+ gem.description = gem.summary
12
+ gem.email = 'vandenberg.guy [a] gmail [d] com'
13
+ gem.homepage = 'http://github.com/datamapper/dm-more/tree/master/%s' % gem.name
14
+ gem.authors = [ 'Guy van den Berg' ]
9
15
 
10
- AUTHOR = 'Guy van den Berg'
11
- EMAIL = 'vandenberg.guy [a] gmail [d] com'
12
- GEM_NAME = 'dm-serializer'
13
- GEM_VERSION = DataMapper::Serializer::VERSION
14
- GEM_DEPENDENCIES = [['dm-core', GEM_VERSION]]
15
- GEM_CLEAN = %w[ log pkg coverage ]
16
- GEM_EXTRAS = { :has_rdoc => true, :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 = 'DataMapper plugin for serializing DataMapper objects'
18
+ gem.add_dependency 'dm-core', '~> 0.10.2'
19
+ gem.add_dependency 'fastercsv', '~> 1.5.0'
20
+ gem.add_dependency 'json_pure', '~> 1.2.0'
21
21
 
22
- [ ROOT, ROOT.parent ].each do |dir|
23
- Pathname.glob(dir.join('tasks/**/*.rb').to_s).each { |f| require f }
22
+ #gem.add_development_dependency 'libxml-ruby', '~> 1.1.3' # not available on JRuby
23
+ gem.add_development_dependency 'nokogiri', '~> 1.4.1'
24
+ gem.add_development_dependency 'rspec', '~> 1.2.9'
25
+ gem.add_development_dependency 'yard', '~> 0.4.0'
26
+ end
27
+
28
+ Jeweler::GemcutterTasks.new
29
+
30
+ FileList['tasks/**/*.rake'].each { |task| import task }
31
+ rescue LoadError
32
+ puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler'
24
33
  end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.10.2
@@ -2,7 +2,7 @@ require "rubygems"
2
2
  require 'pathname'
3
3
  require 'better-benchmark'
4
4
 
5
- gem 'dm-core', '0.10.1'
5
+ gem 'dm-core', '0.10.2'
6
6
  require 'dm-core'
7
7
 
8
8
  spec_dir_path = Pathname(__FILE__).dirname.expand_path
@@ -82,7 +82,7 @@ class Cow
82
82
  property :breed, String
83
83
 
84
84
  has n, :baby_cows, :model => 'Cow'
85
- belongs_to :mother_cow, :model => 'Cow', :nullable => true
85
+ belongs_to :mother_cow, :model => 'Cow', :required => false
86
86
  end
87
87
 
88
88
  DataMapper.auto_migrate!
@@ -1,7 +1,7 @@
1
1
  require "rubygems"
2
2
  require 'pathname'
3
3
 
4
- gem 'dm-core', '0.10.1'
4
+ gem 'dm-core', '0.10.2'
5
5
  require 'dm-core'
6
6
 
7
7
  spec_dir_path = Pathname(__FILE__).dirname.expand_path
@@ -0,0 +1,92 @@
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{dm-serializer}
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 = ["Guy van den Berg"]
12
+ s.date = %q{2009-12-11}
13
+ s.description = %q{DataMapper plugin for serializing Resources and Collections}
14
+ s.email = %q{vandenberg.guy [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
+ "autotest/discover.rb",
25
+ "autotest/dmserializer_rspec.rb",
26
+ "benchmarks/to_json.rb",
27
+ "benchmarks/to_xml.rb",
28
+ "dm-serializer.gemspec",
29
+ "lib/dm-serializer.rb",
30
+ "lib/dm-serializer/common.rb",
31
+ "lib/dm-serializer/to_csv.rb",
32
+ "lib/dm-serializer/to_json.rb",
33
+ "lib/dm-serializer/to_xml.rb",
34
+ "lib/dm-serializer/to_yaml.rb",
35
+ "lib/dm-serializer/xml_serializers.rb",
36
+ "lib/dm-serializer/xml_serializers/libxml.rb",
37
+ "lib/dm-serializer/xml_serializers/nokogiri.rb",
38
+ "lib/dm-serializer/xml_serializers/rexml.rb",
39
+ "spec/fixtures/cow.rb",
40
+ "spec/fixtures/planet.rb",
41
+ "spec/fixtures/quan_tum_cat.rb",
42
+ "spec/lib/serialization_method_shared_spec.rb",
43
+ "spec/public/serializer_spec.rb",
44
+ "spec/public/to_csv_spec.rb",
45
+ "spec/public/to_json_spec.rb",
46
+ "spec/public/to_xml_spec.rb",
47
+ "spec/public/to_yaml_spec.rb",
48
+ "spec/rcov.opts",
49
+ "spec/spec.opts",
50
+ "spec/spec_helper.rb",
51
+ "tasks/ci.rake",
52
+ "tasks/metrics.rake",
53
+ "tasks/spec.rake",
54
+ "tasks/yard.rake",
55
+ "tasks/yardstick.rake"
56
+ ]
57
+ s.homepage = %q{http://github.com/datamapper/dm-more/tree/master/dm-serializer}
58
+ s.rdoc_options = ["--charset=UTF-8"]
59
+ s.require_paths = ["lib"]
60
+ s.rubyforge_project = %q{datamapper}
61
+ s.rubygems_version = %q{1.3.5}
62
+ s.summary = %q{DataMapper plugin for serializing Resources and Collections}
63
+
64
+ if s.respond_to? :specification_version then
65
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
66
+ s.specification_version = 3
67
+
68
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
69
+ s.add_runtime_dependency(%q<dm-core>, ["~> 0.10.2"])
70
+ s.add_runtime_dependency(%q<fastercsv>, ["~> 1.5.0"])
71
+ s.add_runtime_dependency(%q<json_pure>, ["~> 1.2.0"])
72
+ s.add_development_dependency(%q<nokogiri>, ["~> 1.4.1"])
73
+ s.add_development_dependency(%q<rspec>, ["~> 1.2.9"])
74
+ s.add_development_dependency(%q<yard>, ["~> 0.4.0"])
75
+ else
76
+ s.add_dependency(%q<dm-core>, ["~> 0.10.2"])
77
+ s.add_dependency(%q<fastercsv>, ["~> 1.5.0"])
78
+ s.add_dependency(%q<json_pure>, ["~> 1.2.0"])
79
+ s.add_dependency(%q<nokogiri>, ["~> 1.4.1"])
80
+ s.add_dependency(%q<rspec>, ["~> 1.2.9"])
81
+ s.add_dependency(%q<yard>, ["~> 0.4.0"])
82
+ end
83
+ else
84
+ s.add_dependency(%q<dm-core>, ["~> 0.10.2"])
85
+ s.add_dependency(%q<fastercsv>, ["~> 1.5.0"])
86
+ s.add_dependency(%q<json_pure>, ["~> 1.2.0"])
87
+ s.add_dependency(%q<nokogiri>, ["~> 1.4.1"])
88
+ s.add_dependency(%q<rspec>, ["~> 1.2.9"])
89
+ s.add_dependency(%q<yard>, ["~> 0.4.0"])
90
+ end
91
+ end
92
+
@@ -20,7 +20,7 @@ module DataMapper
20
20
  def to_csv(writer = '')
21
21
  CSV.generate(writer) do |csv|
22
22
  row = model.properties(repository.name).map do |property|
23
- send(property.name).to_s
23
+ __send__(property.name).to_s
24
24
  end
25
25
  csv << row
26
26
  end
@@ -15,13 +15,13 @@ module DataMapper
15
15
  propset = properties_to_serialize(options)
16
16
 
17
17
  propset.each do |property|
18
- result[property.name] = send(property.name)
18
+ result[property.name] = __send__(property.name)
19
19
  end
20
20
 
21
21
  # add methods
22
22
  (options[:methods] || []).each do |meth|
23
23
  if self.respond_to?(meth)
24
- result[meth] = send(meth)
24
+ result[meth] = __send__(meth)
25
25
  end
26
26
  end
27
27
 
@@ -12,7 +12,6 @@ module DataMapper
12
12
  xml.output(to_xml_document(opts)).to_s
13
13
  end
14
14
 
15
- protected
16
15
  # This method requires certain methods to be implemented in the individual
17
16
  # serializer library subclasses:
18
17
  # new_document
@@ -25,7 +24,7 @@ module DataMapper
25
24
  default_xml_element_name = lambda { Extlib::Inflection.underscore(model.name).tr("/", "-") }
26
25
  root = xml.root_node(doc, opts[:element_name] || default_xml_element_name[])
27
26
  properties_to_serialize(opts).each do |property|
28
- value = send(property.name)
27
+ value = __send__(property.name)
29
28
  attrs = (property.type == String) ? {} : {'type' => property.type.to_s.downcase}
30
29
  xml.add_node(root, property.name.to_s, value, attrs)
31
30
  end
@@ -33,10 +32,10 @@ module DataMapper
33
32
  (opts[:methods] || []).each do |meth|
34
33
  if self.respond_to?(meth)
35
34
  xml_name = meth.to_s.gsub(/[^a-z0-9_]/, '')
36
- value = send(meth)
35
+ value = __send__(meth)
37
36
  unless value.nil?
38
37
  if value.respond_to?(:to_xml_document)
39
- xml.add_xml(root, value.send(:to_xml_document))
38
+ xml.add_xml(root, value.to_xml_document)
40
39
  else
41
40
  xml.add_node(root, xml_name, value.to_s)
42
41
  end
@@ -52,15 +51,13 @@ module DataMapper
52
51
  to_xml_document(opts).to_s
53
52
  end
54
53
 
55
- protected
56
-
57
54
  def to_xml_document(opts = {})
58
55
  xml = DataMapper::Serialize::XMLSerializers::SERIALIZER
59
56
  doc = xml.new_document
60
57
  default_collection_element_name = lambda {Extlib::Inflection.pluralize(Extlib::Inflection.underscore(self.model.to_s)).tr("/", "-")}
61
58
  root = xml.root_node(doc, opts[:collection_element_name] || default_collection_element_name[], {'type' => 'array'})
62
59
  self.each do |item|
63
- item.send(:to_xml_document, opts, doc)
60
+ item.to_xml_document(opts, doc)
64
61
  end
65
62
  doc
66
63
  end
@@ -74,8 +71,6 @@ module DataMapper
74
71
  to_xml_document(opts).to_s
75
72
  end
76
73
 
77
- protected
78
-
79
74
  def to_xml_document(opts = {})
80
75
  xml = DataMapper::Serialize::XMLSerializers::SERIALIZER
81
76
  doc = xml.new_document
@@ -17,13 +17,13 @@ module DataMapper
17
17
  YAML::quick_emit(object_id,emitter) do |out|
18
18
  out.map(nil,to_yaml_style) do |map|
19
19
  properties_to_serialize(opts).each do |property|
20
- value = send(property.name.to_sym)
20
+ value = __send__(property.name.to_sym)
21
21
  map.add(property.name, value.is_a?(Class) ? value.to_s : value)
22
22
  end
23
23
  # add methods
24
24
  (opts[:methods] || []).each do |meth|
25
- if self.respond_to?(meth)
26
- map.add(meth.to_sym, send(meth))
25
+ if respond_to?(meth)
26
+ map.add(meth.to_sym, __send__(meth))
27
27
  end
28
28
  end
29
29
  (instance_variable_get("@yaml_addes") || []).each do |k,v|
@@ -6,6 +6,6 @@ class Cow
6
6
  property :name, String
7
7
  property :breed, String
8
8
 
9
- belongs_to :mother_cow, :model => self, :nullable => true
9
+ belongs_to :mother_cow, :model => self, :required => false
10
10
  has n, :baby_cows, :model => self, :child_key => [ :mother_cow_id, :mother_cow_composite ]
11
11
  end
@@ -1,14 +1,14 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  {
4
- 'REXML' => nil,
5
- 'LibXML' => 'libxml',
6
- 'Nokogiri' => 'nokogiri'
7
- }.each do |lib, file_to_require|
4
+ 'REXML' => [],
5
+ 'LibXML' => [ 'libxml-ruby', 'libxml' ],
6
+ 'Nokogiri' => [ 'nokogiri', 'nokogiri' ],
7
+ }.each do |lib, (gem_name, file_to_require)|
8
8
  begin
9
9
  require file_to_require if file_to_require
10
10
  rescue LoadError
11
- warn "[WARNING] Cannot require '#{file_to_require}', not running #to_xml specs for #{lib}"
11
+ warn "[WARNING] Cannot find gem '#{gem_name}', not running #to_xml specs for #{lib}"
12
12
  next
13
13
  end
14
14
 
@@ -0,0 +1,6 @@
1
+ --exclude "spec"
2
+ --sort coverage
3
+ --callsites
4
+ --xrefs
5
+ --profile
6
+ --text-summary
@@ -1,2 +1,4 @@
1
1
  --colour
2
2
  --loadby random
3
+ --format profile
4
+ --backtrace
@@ -41,9 +41,9 @@ class SerializerTestHarness
41
41
  end
42
42
  end
43
43
 
44
- require 'spec/lib/serialization_method_shared_spec'
44
+ require './spec/lib/serialization_method_shared_spec'
45
45
 
46
46
  # require fixture resources
47
- Dir.glob("spec/fixtures/*.rb").each do |fixture_file|
47
+ Dir.glob('./spec/fixtures/*.rb').each do |fixture_file|
48
48
  require fixture_file
49
49
  end
@@ -0,0 +1 @@
1
+ task :ci => [ :verify_measurements, 'metrics:all' ]
@@ -0,0 +1,36 @@
1
+ begin
2
+ require 'metric_fu'
3
+ rescue LoadError
4
+ namespace :metrics do
5
+ task :all do
6
+ abort 'metric_fu is not available. In order to run metrics:all, you must: gem install metric_fu'
7
+ end
8
+ end
9
+ end
10
+
11
+ begin
12
+ require 'reek/adapters/rake_task'
13
+
14
+ Reek::RakeTask.new do |t|
15
+ t.fail_on_error = true
16
+ t.verbose = false
17
+ t.source_files = 'lib/**/*.rb'
18
+ end
19
+ rescue LoadError
20
+ task :reek do
21
+ abort 'Reek is not available. In order to run reek, you must: gem install reek'
22
+ end
23
+ end
24
+
25
+ begin
26
+ require 'roodi'
27
+ require 'roodi_task'
28
+
29
+ RoodiTask.new do |t|
30
+ t.verbose = false
31
+ end
32
+ rescue LoadError
33
+ task :roodi do
34
+ abort 'Roodi is not available. In order to run roodi, you must: gem install roodi'
35
+ end
36
+ end
@@ -0,0 +1,41 @@
1
+ spec_defaults = lambda do |spec|
2
+ spec.pattern = 'spec/**/*_spec.rb'
3
+ spec.libs << 'lib' << 'spec'
4
+ spec.spec_opts << '--options' << 'spec/spec.opts'
5
+ end
6
+
7
+ begin
8
+ require 'spec/rake/spectask'
9
+
10
+ Spec::Rake::SpecTask.new(:spec, &spec_defaults)
11
+ rescue LoadError
12
+ task :spec do
13
+ abort 'rspec is not available. In order to run spec, you must: gem install rspec'
14
+ end
15
+ end
16
+
17
+ begin
18
+ require 'rcov'
19
+ require 'spec/rake/verify_rcov'
20
+
21
+ Spec::Rake::SpecTask.new(:rcov) do |rcov|
22
+ spec_defaults.call(rcov)
23
+ rcov.rcov = true
24
+ rcov.rcov_opts = File.read('spec/rcov.opts').split(/\s+/)
25
+ end
26
+
27
+ RCov::VerifyTask.new(:verify_rcov => :rcov) do |rcov|
28
+ rcov.threshold = 100
29
+ end
30
+ rescue LoadError
31
+ %w[ rcov verify_rcov ].each do |name|
32
+ task name do
33
+ abort "rcov is not available. In order to run #{name}, you must: gem install rcov"
34
+ end
35
+ end
36
+ end
37
+
38
+ task :spec => :check_dependencies
39
+ task :rcov => :check_dependencies
40
+
41
+ task :default => :spec
@@ -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: dm-serializer
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
  - Guy van den Berg
@@ -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,40 +18,85 @@ 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: DataMapper plugin for serializing DataMapper objects
26
- email:
27
- - vandenberg.guy [a] gmail [d] com
25
+ - !ruby/object:Gem::Dependency
26
+ name: fastercsv
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 1.5.0
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: json_pure
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 1.2.0
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: nokogiri
47
+ type: :development
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 1.4.1
54
+ version:
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ type: :development
58
+ version_requirement:
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ~>
62
+ - !ruby/object:Gem::Version
63
+ version: 1.2.9
64
+ version:
65
+ - !ruby/object:Gem::Dependency
66
+ name: yard
67
+ type: :development
68
+ version_requirement:
69
+ version_requirements: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ~>
72
+ - !ruby/object:Gem::Version
73
+ version: 0.4.0
74
+ version:
75
+ description: DataMapper plugin for serializing Resources and Collections
76
+ email: vandenberg.guy [a] gmail [d] com
28
77
  executables: []
29
78
 
30
79
  extensions: []
31
80
 
32
81
  extra_rdoc_files:
33
- - README.rdoc
34
82
  - LICENSE
35
- - TODO
36
- - History.rdoc
83
+ - README.rdoc
37
84
  files:
38
- - History.rdoc
39
85
  - LICENSE
40
- - Manifest.txt
41
86
  - README.rdoc
42
87
  - Rakefile
43
- - TODO
88
+ - VERSION
44
89
  - autotest/discover.rb
45
90
  - autotest/dmserializer_rspec.rb
46
91
  - benchmarks/to_json.rb
47
92
  - benchmarks/to_xml.rb
93
+ - dm-serializer.gemspec
48
94
  - lib/dm-serializer.rb
49
95
  - lib/dm-serializer/common.rb
50
96
  - lib/dm-serializer/to_csv.rb
51
97
  - lib/dm-serializer/to_json.rb
52
98
  - lib/dm-serializer/to_xml.rb
53
99
  - lib/dm-serializer/to_yaml.rb
54
- - lib/dm-serializer/version.rb
55
100
  - lib/dm-serializer/xml_serializers.rb
56
101
  - lib/dm-serializer/xml_serializers/libxml.rb
57
102
  - lib/dm-serializer/xml_serializers/nokogiri.rb
@@ -65,18 +110,21 @@ files:
65
110
  - spec/public/to_json_spec.rb
66
111
  - spec/public/to_xml_spec.rb
67
112
  - spec/public/to_yaml_spec.rb
113
+ - spec/rcov.opts
68
114
  - spec/spec.opts
69
115
  - spec/spec_helper.rb
70
- - tasks/install.rb
71
- - tasks/spec.rb
116
+ - tasks/ci.rake
117
+ - tasks/metrics.rake
118
+ - tasks/spec.rake
119
+ - tasks/yard.rake
120
+ - tasks/yardstick.rake
72
121
  has_rdoc: true
73
122
  homepage: http://github.com/datamapper/dm-more/tree/master/dm-serializer
74
123
  licenses: []
75
124
 
76
125
  post_install_message:
77
126
  rdoc_options:
78
- - --main
79
- - README.rdoc
127
+ - --charset=UTF-8
80
128
  require_paths:
81
129
  - lib
82
130
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -97,6 +145,6 @@ rubyforge_project: datamapper
97
145
  rubygems_version: 1.3.5
98
146
  signing_key:
99
147
  specification_version: 3
100
- summary: DataMapper plugin for serializing DataMapper objects
148
+ summary: DataMapper plugin for serializing Resources and Collections
101
149
  test_files: []
102
150
 
@@ -1,49 +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
- * Support serialization of dm-validation errors collection (#718)
8
- * Don't require json gem on ruby 1.9 (#776)
9
- * Allow YAML.dump(dm_object) (#792)
10
- * Correctly serialize child objects (#829)
11
-
12
- === 0.9.11
13
-
14
- * No changes this version
15
-
16
- === 0.9.10 / 2009-01-19
17
-
18
- * 1 minor enhancement:
19
-
20
- * Don't emit XML prologue when using libxml or nokogiri
21
-
22
- * 1 bug fix:
23
-
24
- * libxml and nokogiri no longer output an xml prologue
25
-
26
- === 0.9.9 / 2009-01-04
27
-
28
- * 1 major enhancement:
29
-
30
- * Uses LibXML or Nokogiri if available for a ~6x improvement in
31
- serialization performance.
32
-
33
- * 4 minor enhancements:
34
-
35
- * Added :element_name and :collection_element_name options to #to_xml
36
- * Removed #xml_element_name override in #to_xml
37
- * Removed :read_only_attributes option from #to_json
38
- * Removed #serialized_properties override in #to_json
39
-
40
- === 0.9.8 / 2008-12-07
41
-
42
- * 2 minor enhancements:
43
-
44
- * to_yaml and to_xml now support :only and :exclude options
45
- * to_yaml and to_xml now support serializing methods
46
-
47
- * 1 bug fix:
48
-
49
- * gem requires now preceded by gem() call
@@ -1,34 +0,0 @@
1
- History.rdoc
2
- LICENSE
3
- Manifest.txt
4
- README.rdoc
5
- Rakefile
6
- TODO
7
- autotest/discover.rb
8
- autotest/dmserializer_rspec.rb
9
- benchmarks/to_json.rb
10
- benchmarks/to_xml.rb
11
- lib/dm-serializer.rb
12
- lib/dm-serializer/common.rb
13
- lib/dm-serializer/to_csv.rb
14
- lib/dm-serializer/to_json.rb
15
- lib/dm-serializer/to_xml.rb
16
- lib/dm-serializer/to_yaml.rb
17
- lib/dm-serializer/version.rb
18
- lib/dm-serializer/xml_serializers.rb
19
- lib/dm-serializer/xml_serializers/libxml.rb
20
- lib/dm-serializer/xml_serializers/nokogiri.rb
21
- lib/dm-serializer/xml_serializers/rexml.rb
22
- spec/fixtures/cow.rb
23
- spec/fixtures/planet.rb
24
- spec/fixtures/quan_tum_cat.rb
25
- spec/lib/serialization_method_shared_spec.rb
26
- spec/public/serializer_spec.rb
27
- spec/public/to_csv_spec.rb
28
- spec/public/to_json_spec.rb
29
- spec/public/to_xml_spec.rb
30
- spec/public/to_yaml_spec.rb
31
- spec/spec.opts
32
- spec/spec_helper.rb
33
- tasks/install.rb
34
- tasks/spec.rb
data/TODO DELETED
File without changes
@@ -1,5 +0,0 @@
1
- module DataMapper
2
- module Serializer
3
- VERSION = '0.10.1'.freeze
4
- end
5
- end
@@ -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
@@ -1,25 +0,0 @@
1
- begin
2
- require 'spec/rake/spectask'
3
-
4
- task :default => [ :spec ]
5
-
6
- desc 'Run specifications'
7
- Spec::Rake::SpecTask.new(:spec) do |t|
8
- t.spec_opts << '--options' << 'spec/spec.opts' if File.exists?('spec/spec.opts')
9
- t.libs << 'lib' << 'spec' # needed for CI rake spec task, duplicated in spec_helper
10
-
11
- begin
12
- require 'rcov'
13
- t.rcov = JRUBY ? false : (ENV.has_key?('NO_RCOV') ? ENV['NO_RCOV'] != 'true' : true)
14
- t.rcov_opts << '--exclude' << 'spec'
15
- t.rcov_opts << '--text-summary'
16
- t.rcov_opts << '--sort' << 'coverage' << '--sort-reverse'
17
- rescue LoadError
18
- # rcov not installed
19
- rescue SyntaxError
20
- # rcov syntax invalid
21
- end
22
- end
23
- rescue LoadError
24
- # rspec not installed
25
- end