ardm-active_model 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.gitignore +34 -0
- data/.travis.yml +11 -0
- data/CHANGELOG +76 -0
- data/Gemfile +41 -0
- data/LICENSE +20 -0
- data/README.rdoc +18 -0
- data/Rakefile +4 -0
- data/TODO +0 -0
- data/VERSION +1 -0
- data/ardm-active_model.gemspec +27 -0
- data/lib/ardm-active_model.rb +1 -0
- data/lib/dm-active_model.rb +55 -0
- data/lib/dm-active_model/version.rb +5 -0
- data/spec/amo_interface_compliance_spec.rb +40 -0
- data/spec/amo_validation_compliance_spec.rb +14 -0
- data/spec/dm-active_model_spec.rb +37 -0
- data/spec/lib/amo_lint_extensions.rb +30 -0
- data/spec/rcov.opts +6 -0
- data/spec/spec.opts +2 -0
- data/tasks/changelog.rake +20 -0
- data/tasks/spec.rake +38 -0
- data/tasks/yard.rake +9 -0
- data/tasks/yardstick.rake +19 -0
- metadata +163 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 914b0870e37e4d5287c192bdea00965b86f83ac8
|
4
|
+
data.tar.gz: 23b3a36468ab60b8a468a88f701a8e8731bbcf48
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d9e90d018c2691c64e3a3b9d03cd36c2a7a9341230df8d8acf3f67f2741d243ae5716af0169819a11738221af170a037066d555cfedfb80958386a42e5342c4c
|
7
|
+
data.tar.gz: 13bc8f8ebe38ce8e87ecbfc25441138a83f3b793cd6141b163ab58454888832665df9f44572a5343415b9e15f37cc31068f5f4f02512aabce8a951ca874fec9d
|
data/.document
ADDED
data/.gitignore
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
## MAC OS
|
2
|
+
.DS_Store
|
3
|
+
|
4
|
+
## TEXTMATE
|
5
|
+
*.tmproj
|
6
|
+
tmtags
|
7
|
+
|
8
|
+
## EMACS
|
9
|
+
*~
|
10
|
+
\#*
|
11
|
+
.\#*
|
12
|
+
|
13
|
+
## VIM
|
14
|
+
*.swp
|
15
|
+
|
16
|
+
## Rubinius
|
17
|
+
*.rbc
|
18
|
+
|
19
|
+
## PROJECT::GENERAL
|
20
|
+
*.gem
|
21
|
+
coverage
|
22
|
+
rdoc
|
23
|
+
pkg
|
24
|
+
tmp
|
25
|
+
doc
|
26
|
+
log
|
27
|
+
.yardoc
|
28
|
+
measurements
|
29
|
+
|
30
|
+
## BUNDLER
|
31
|
+
.bundle
|
32
|
+
Gemfile.*
|
33
|
+
|
34
|
+
## PROJECT::SPECIFIC
|
data/.travis.yml
ADDED
data/CHANGELOG
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
[fb2fe87 | Sun Dec 20 19:59:22 UTC 2009] snusnu <gamsnjaga@gmail.com>
|
2
|
+
|
3
|
+
* Thx to jeweler this is now a gem
|
4
|
+
|
5
|
+
[53df775 | Thu Sep 24 03:06:19 UTC 2009] snusnu <gamsnjaga@gmail.com>
|
6
|
+
|
7
|
+
* All lint and rails_compliance specs pass.
|
8
|
+
|
9
|
+
[64c47dc | Thu Sep 24 02:53:17 UTC 2009] snusnu <gamsnjaga@gmail.com>
|
10
|
+
|
11
|
+
* Simplified #errors default implementation
|
12
|
+
|
13
|
+
[03beebe | Thu Sep 24 02:29:53 UTC 2009] snusnu <gamsnjaga@gmail.com>
|
14
|
+
|
15
|
+
* Only rely on active_model/lint for amo compliance specs
|
16
|
+
|
17
|
+
[f45713a | Thu Sep 24 02:29:33 UTC 2009] snusnu <gamsnjaga@gmail.com>
|
18
|
+
|
19
|
+
* Refactored rails_compliance_spec a bit
|
20
|
+
|
21
|
+
[755a48c | Thu Sep 24 02:20:57 UTC 2009] snusnu <gamsnjaga@gmail.com>
|
22
|
+
|
23
|
+
* Make it easy to move rails compliance specs to rails_datamapper
|
24
|
+
|
25
|
+
active_model/lint itself isn't really strict about what exact
|
26
|
+
String it gets back from either of the following methods that
|
27
|
+
are supported by the object returned from #class.model_name
|
28
|
+
|
29
|
+
#singular
|
30
|
+
#plural
|
31
|
+
#element
|
32
|
+
#human
|
33
|
+
#collection
|
34
|
+
#partial_path
|
35
|
+
|
36
|
+
All lint cares about, is that these methods return Strings
|
37
|
+
|
38
|
+
Therefore it's probably best to push specs that test for
|
39
|
+
rails's own implementation of those active_model strings
|
40
|
+
down to something like rails_datamapper.
|
41
|
+
|
42
|
+
Currently the rails compliance specs for #collection and
|
43
|
+
#partial_path fail. Need to investigate this.
|
44
|
+
|
45
|
+
[31d28fd | Thu Sep 24 00:23:40 UTC 2009] snusnu <gamsnjaga@gmail.com>
|
46
|
+
|
47
|
+
* All specs pass, changed dm-core dependency to '~>0.10'
|
48
|
+
|
49
|
+
[5cb1320 | Wed Sep 23 23:27:42 UTC 2009] snusnu <gamsnjaga@gmail.com>
|
50
|
+
|
51
|
+
* Also run active_model/lint when running the specsuite
|
52
|
+
|
53
|
+
Currently, if dm-validations are not required, all specs
|
54
|
+
pass. If dm-validations are required, 1 spec fails because
|
55
|
+
DataMapper::Validate::ValidationErrors seems to implement
|
56
|
+
#[](field) in an incompatible way. This will need more
|
57
|
+
investigation.
|
58
|
+
|
59
|
+
If this can be fixed upstream, all specs should pass
|
60
|
+
|
61
|
+
[4b1ccd0 | Wed Sep 23 22:37:59 UTC 2009] snusnu <gamsnjaga@gmail.com>
|
62
|
+
|
63
|
+
* Added implementation and initial specs
|
64
|
+
|
65
|
+
The final goal is to rely solely on active_model/lint.rb
|
66
|
+
to perform the compliance tests. However, lint.rb still
|
67
|
+
needs to be updated to cover the intended behavior more
|
68
|
+
precisely.
|
69
|
+
|
70
|
+
Nevertheless, next step is to include active_model as a
|
71
|
+
development dependency and run both lint.rb and our own
|
72
|
+
specs for the time being.
|
73
|
+
|
74
|
+
[2eb914c | Wed Sep 23 18:23:27 UTC 2009] snusnu <gamsnjaga@gmail.com>
|
75
|
+
|
76
|
+
* Initial commit to dm-active_model.
|
data/Gemfile
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
gemspec
|
6
|
+
|
7
|
+
SOURCE = ENV.fetch('SOURCE', :git).to_sym
|
8
|
+
REPO_POSTFIX = SOURCE == :path ? '' : '.git'
|
9
|
+
DATAMAPPER = SOURCE == :path ? Pathname(__FILE__).dirname.parent : 'https://github.com/ar-dm'
|
10
|
+
DM_VERSION = '~> 1.2.0'
|
11
|
+
CURRENT_BRANCH = ENV.fetch('GIT_BRANCH', 'master')
|
12
|
+
RAILS_VERSION = '~> 3.1.0'
|
13
|
+
|
14
|
+
gem 'ardm-core', DM_VERSION, SOURCE => "#{DATAMAPPER}/ardm-core#{REPO_POSTFIX}", :branch => CURRENT_BRANCH
|
15
|
+
|
16
|
+
gem 'activemodel', RAILS_VERSION, :require => nil
|
17
|
+
|
18
|
+
group :development do
|
19
|
+
gem 'ardm-validations', DM_VERSION, SOURCE => "#{DATAMAPPER}/ardm-validations#{REPO_POSTFIX}", :branch => CURRENT_BRANCH
|
20
|
+
end
|
21
|
+
|
22
|
+
platforms :mri_18 do
|
23
|
+
group :quality do
|
24
|
+
|
25
|
+
gem 'rcov', '~> 0.9.10'
|
26
|
+
gem 'yard', '~> 0.7.2'
|
27
|
+
gem 'yardstick', '~> 0.4'
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
group :datamapper do
|
33
|
+
|
34
|
+
plugins = ENV['PLUGINS'] || ENV['PLUGIN']
|
35
|
+
plugins = plugins.to_s.tr(',', ' ').split.uniq
|
36
|
+
|
37
|
+
plugins.each do |plugin|
|
38
|
+
gem plugin, DM_VERSION, SOURCE => "#{DATAMAPPER}/#{plugin}#{REPO_POSTFIX}", :branch => CURRENT_BRANCH
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 Martin Gamsjaeger (snusnu)
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
= dm-active_model
|
2
|
+
|
3
|
+
This plugin makes datamapper compliant with active_model conventions and thus compatible with rails3.
|
4
|
+
|
5
|
+
== Note on Patches/Pull Requests
|
6
|
+
|
7
|
+
* Fork the project.
|
8
|
+
* Make your feature addition or bug fix.
|
9
|
+
* Add tests for it. This is important so I don't break it in a
|
10
|
+
future version unintentionally.
|
11
|
+
* Commit, do not mess with rakefile, version, or history.
|
12
|
+
(if you want to have your own version, that is fine but
|
13
|
+
bump version in a commit by itself I can ignore when I pull)
|
14
|
+
* Send me a pull request. Bonus points for topic branches.
|
15
|
+
|
16
|
+
== Copyright
|
17
|
+
|
18
|
+
Copyright (c) 2011 Martin Gamsjaeger (snusnu). See LICENSE for details.
|
data/Rakefile
ADDED
data/TODO
ADDED
File without changes
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.2.0
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/dm-active_model/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.name = "ardm-active_model"
|
6
|
+
gem.version = DataMapper::ActiveModel::VERSION
|
7
|
+
|
8
|
+
gem.authors = [ "Martin Emde", "Martin Gamsjaeger (snusnu)" ]
|
9
|
+
gem.email = [ "me@martinemde.com", "gamsnjaga [a] gmail [d] com" ]
|
10
|
+
gem.summary = "Ardm fork of dm-active_model"
|
11
|
+
gem.description = 'A datamapper plugin for active_model compliance'
|
12
|
+
gem.homepage = "https://github.com/ar-dm/dm-active_model"
|
13
|
+
gem.license = 'MIT'
|
14
|
+
|
15
|
+
gem.files = `git ls-files`.split("\n")
|
16
|
+
gem.test_files = `git ls-files -- {spec}/*`.split("\n")
|
17
|
+
gem.extra_rdoc_files = %w[LICENSE README.rdoc]
|
18
|
+
gem.require_paths = [ "lib" ]
|
19
|
+
|
20
|
+
gem.add_runtime_dependency 'ardm-core', '~> 1.2'
|
21
|
+
gem.add_runtime_dependency 'activemodel', '>= 3.0', '< 5.0'
|
22
|
+
|
23
|
+
gem.add_development_dependency 'ardm-validations', '~> 1.2'
|
24
|
+
gem.add_development_dependency 'rake', '~> 0.9'
|
25
|
+
gem.add_development_dependency 'rspec', '~> 1.3'
|
26
|
+
gem.add_development_dependency 'test-unit', '= 1.2.3'
|
27
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'dm-active_model'
|
@@ -0,0 +1,55 @@
|
|
1
|
+
require 'dm-core'
|
2
|
+
require 'active_model/naming'
|
3
|
+
|
4
|
+
module DataMapper
|
5
|
+
module ActiveModel
|
6
|
+
|
7
|
+
module InstanceMethods
|
8
|
+
|
9
|
+
def to_model
|
10
|
+
self
|
11
|
+
end
|
12
|
+
|
13
|
+
def persisted?
|
14
|
+
saved?
|
15
|
+
end
|
16
|
+
|
17
|
+
def to_key
|
18
|
+
key
|
19
|
+
end
|
20
|
+
|
21
|
+
def to_param
|
22
|
+
return nil if key.nil?
|
23
|
+
if key.length > 1
|
24
|
+
raise "You need to implement #to_param yourself to support this key: #{self.class.key.inspect}"
|
25
|
+
else
|
26
|
+
self.key.first.to_s
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
# Define the minimum requirements if the resource
|
31
|
+
# has no concept of validation baked in, which
|
32
|
+
# happens if dm-validations is not required.
|
33
|
+
unless respond_to?(:validatable?)
|
34
|
+
|
35
|
+
def valid?
|
36
|
+
true
|
37
|
+
end
|
38
|
+
|
39
|
+
def errors
|
40
|
+
obj = Object.new
|
41
|
+
def obj.[](key) [] end
|
42
|
+
def obj.full_messages() [] end
|
43
|
+
obj
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
Model.append_extensions(::ActiveModel::Naming)
|
53
|
+
Model.append_inclusions(ActiveModel::InstanceMethods)
|
54
|
+
|
55
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'spec/test/unit'
|
2
|
+
require 'active_model/lint'
|
3
|
+
|
4
|
+
# This must be kept in sync with active_model/lint tests
|
5
|
+
# at least for as long as
|
6
|
+
#
|
7
|
+
# http://rspec.lighthouseapp.com/projects/5645/tickets/900
|
8
|
+
#
|
9
|
+
# isn't resolved in some way (probably with rspec2)
|
10
|
+
|
11
|
+
share_examples_for 'an active_model compliant object' do
|
12
|
+
|
13
|
+
include ActiveModel::Lint::Tests
|
14
|
+
|
15
|
+
it 'must implement the #to_key interface' do
|
16
|
+
test_to_key
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'must implement the #to_param interface' do
|
20
|
+
test_to_param
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'must implement the #valid? interface' do
|
24
|
+
test_valid?
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'must implement the #persisted? interface' do
|
28
|
+
test_persisted?
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'must implement the #model_naming interface' do
|
32
|
+
test_model_naming
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'must implement the #errors interface' do
|
36
|
+
test_errors_aref
|
37
|
+
test_errors_full_messages
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'spec/test/unit'
|
2
|
+
require 'lib/amo_lint_extensions'
|
3
|
+
|
4
|
+
share_examples_for 'an active_model/validations compliant object' do
|
5
|
+
|
6
|
+
include ActiveModel::Lint::Tests::Validations
|
7
|
+
|
8
|
+
ActiveModel::Lint::Tests::Validations::VALIDATION_METHODS.each do |validation_method|
|
9
|
+
it "must implement the .#{validation_method} interface" do
|
10
|
+
send("test_#{validation_method}")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'dm-core'
|
2
|
+
require 'dm-active_model'
|
3
|
+
|
4
|
+
require 'amo_interface_compliance_spec'
|
5
|
+
|
6
|
+
if ENV['DM_VALIDATIONS'] || ENV['AMO_VALIDATIONS']
|
7
|
+
require 'dm-validations'
|
8
|
+
require 'amo_validation_compliance_spec'
|
9
|
+
end
|
10
|
+
|
11
|
+
describe 'An active_model compliant DataMapper::Resource' do
|
12
|
+
|
13
|
+
before :all do
|
14
|
+
|
15
|
+
module ::ComplianceTest
|
16
|
+
class ProfileInfo
|
17
|
+
include DataMapper::Resource
|
18
|
+
extend ActiveModel::Naming
|
19
|
+
property :id, Serial
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
DataMapper.setup(:default, { :adapter => :in_memory })
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
before :each do
|
28
|
+
@model = ComplianceTest::ProfileInfo.new.to_model
|
29
|
+
end
|
30
|
+
|
31
|
+
it_should_behave_like 'an active_model compliant object'
|
32
|
+
|
33
|
+
if ENV['AMO_VALIDATIONS'] == 'true'
|
34
|
+
it_should_behave_like 'an active_model/validations compliant object'
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module ActiveModel
|
2
|
+
module Lint
|
3
|
+
module Tests
|
4
|
+
module Validations
|
5
|
+
|
6
|
+
VALIDATION_METHODS = %w[
|
7
|
+
validate
|
8
|
+
validates
|
9
|
+
validates_each
|
10
|
+
validates_with
|
11
|
+
validates_acceptance_of
|
12
|
+
validates_confirmation_of
|
13
|
+
validates_exclusion_of
|
14
|
+
validates_format_of
|
15
|
+
validates_inclusion_of
|
16
|
+
validates_length_of
|
17
|
+
validates_numericality_of
|
18
|
+
validates_presence_of
|
19
|
+
]
|
20
|
+
|
21
|
+
VALIDATION_METHODS.each do |validation_method|
|
22
|
+
define_method "test_#{validation_method}" do
|
23
|
+
assert model.class.respond_to?(validation_method)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/spec/rcov.opts
ADDED
data/spec/spec.opts
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'time'
|
2
|
+
|
3
|
+
desc 'update changelog'
|
4
|
+
task :changelog do
|
5
|
+
File.open('CHANGELOG', 'w+') do |changelog|
|
6
|
+
`git log -z --abbrev-commit`.split("\0").each do |commit|
|
7
|
+
next if commit =~ /^Merge: \d*/
|
8
|
+
ref, author, time, _, title, _, message = commit.split("\n", 7)
|
9
|
+
ref = ref[/commit ([0-9a-f]+)/, 1]
|
10
|
+
author = author[/Author: (.*)/, 1].strip
|
11
|
+
time = Time.parse(time[/Date: (.*)/, 1]).utc
|
12
|
+
title.strip!
|
13
|
+
|
14
|
+
changelog.puts "[#{ref} | #{time}] #{author}"
|
15
|
+
changelog.puts '', " * #{title}"
|
16
|
+
changelog.puts '', message.rstrip if message
|
17
|
+
changelog.puts
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/tasks/spec.rake
ADDED
@@ -0,0 +1,38 @@
|
|
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 :default => :spec
|
data/tasks/yard.rake
ADDED
@@ -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
ADDED
@@ -0,0 +1,163 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ardm-active_model
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Martin Emde
|
8
|
+
- Martin Gamsjaeger (snusnu)
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-01-30 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: ardm-core
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '1.2'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '1.2'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: activemodel
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '3.0'
|
35
|
+
- - "<"
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '5.0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '3.0'
|
45
|
+
- - "<"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.0'
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: ardm-validations
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.2'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.2'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rake
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.9'
|
69
|
+
type: :development
|
70
|
+
prerelease: false
|
71
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.9'
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: rspec
|
78
|
+
requirement: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.3'
|
83
|
+
type: :development
|
84
|
+
prerelease: false
|
85
|
+
version_requirements: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.3'
|
90
|
+
- !ruby/object:Gem::Dependency
|
91
|
+
name: test-unit
|
92
|
+
requirement: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.2.3
|
97
|
+
type: :development
|
98
|
+
prerelease: false
|
99
|
+
version_requirements: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.2.3
|
104
|
+
description: A datamapper plugin for active_model compliance
|
105
|
+
email:
|
106
|
+
- me@martinemde.com
|
107
|
+
- gamsnjaga [a] gmail [d] com
|
108
|
+
executables: []
|
109
|
+
extensions: []
|
110
|
+
extra_rdoc_files:
|
111
|
+
- LICENSE
|
112
|
+
- README.rdoc
|
113
|
+
files:
|
114
|
+
- ".document"
|
115
|
+
- ".gitignore"
|
116
|
+
- ".travis.yml"
|
117
|
+
- CHANGELOG
|
118
|
+
- Gemfile
|
119
|
+
- LICENSE
|
120
|
+
- README.rdoc
|
121
|
+
- Rakefile
|
122
|
+
- TODO
|
123
|
+
- VERSION
|
124
|
+
- ardm-active_model.gemspec
|
125
|
+
- lib/ardm-active_model.rb
|
126
|
+
- lib/dm-active_model.rb
|
127
|
+
- lib/dm-active_model/version.rb
|
128
|
+
- spec/amo_interface_compliance_spec.rb
|
129
|
+
- spec/amo_validation_compliance_spec.rb
|
130
|
+
- spec/dm-active_model_spec.rb
|
131
|
+
- spec/lib/amo_lint_extensions.rb
|
132
|
+
- spec/rcov.opts
|
133
|
+
- spec/spec.opts
|
134
|
+
- tasks/changelog.rake
|
135
|
+
- tasks/spec.rake
|
136
|
+
- tasks/yard.rake
|
137
|
+
- tasks/yardstick.rake
|
138
|
+
homepage: https://github.com/ar-dm/dm-active_model
|
139
|
+
licenses:
|
140
|
+
- MIT
|
141
|
+
metadata: {}
|
142
|
+
post_install_message:
|
143
|
+
rdoc_options: []
|
144
|
+
require_paths:
|
145
|
+
- lib
|
146
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - ">="
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - ">="
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '0'
|
156
|
+
requirements: []
|
157
|
+
rubyforge_project:
|
158
|
+
rubygems_version: 2.2.2
|
159
|
+
signing_key:
|
160
|
+
specification_version: 4
|
161
|
+
summary: Ardm fork of dm-active_model
|
162
|
+
test_files: []
|
163
|
+
has_rdoc:
|