artirix_data_models-ams 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f500a3fd7139ce8d5253a4384b35235477094bcf
4
- data.tar.gz: a0b92fae2398ddad39d4606ba31073c0c3abf435
3
+ metadata.gz: ae01300ba747d46318bf8951995bdbb85e2d8274
4
+ data.tar.gz: 4a62ca14d8c8958200771cc6a5f875b23780d254
5
5
  SHA512:
6
- metadata.gz: af7e945740927d178e13a7f0ff1810a15242220f3a2a2c4a8634e66a7ddf57686d68072faf63b4e81404fd7f180f8a3978437271b7c122725e60853c1ebaa1dc
7
- data.tar.gz: 63d5c0da64dc9593196377caab047903659e15710eea09e0135d910a5186ea2fd45d6556386dece7c1d531b54c04254747d056eda04120feb9bf19ca76c49e12
6
+ metadata.gz: 88363b1648163fcbdfad115bbeefa9342e50b1bbcefcef02d1e16536e6943245e2af56485d8890b62fdfbfc733ce76ea38106cf8c31a31f1fabb5f8791eb13a9
7
+ data.tar.gz: 36b7154fe9ea9acbec7ccc03096e2869daad5f0912028b0b4133164053458200d0fc78a28c50cd6048ba3bc3fa5deb06ca41ffeb1e82f2f6dc08d8bedf0b527f
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'active_model_serializers', '~> 0.10.0.rc4'
3
+ gem 'active_model_serializers', '~> 0.10.3'
4
+ gem 'artirix_data_models', '1.0.0.beta1'
4
5
 
5
6
  # Specify your gem's dependencies in artirix_data_models_ams.gemspec
6
7
  gemspec
data/README.md CHANGED
@@ -36,6 +36,10 @@ In order to work properly, the model has to define:
36
36
 
37
37
  ## Changelog
38
38
 
39
+ ### 0.4.0
40
+
41
+ compatible with AMS 0.10.3, which is compatible with ActiveModel::Errors
42
+
39
43
  ### 0.3.0
40
44
 
41
45
  open ADM version to include 1.x
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'rake' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("rake", "rake")
@@ -1,5 +1,5 @@
1
1
  module ArtirixDataModels
2
2
  module Ams
3
- VERSION = "0.3.0"
3
+ VERSION = '0.4.0'
4
4
  end
5
5
  end
@@ -26,4 +26,28 @@ module ArtirixDataModels::Model::AMSCompliant
26
26
  end
27
27
  end
28
28
  end
29
+
30
+ module ClassMethods
31
+ def self.extended(klass)
32
+ unless klass.method_defined? :lookup_ancestors
33
+ klass.extend WithLookupAncestors
34
+ end
35
+
36
+ unless klass.method_defined? :human_attribute_name
37
+ klass.extend WithHumanAttributeName
38
+ end
39
+ end
40
+ end
41
+
42
+ module WithLookupAncestors
43
+ def lookup_ancestors
44
+ [self]
45
+ end
46
+ end
47
+
48
+ module WithHumanAttributeName
49
+ def human_attribute_name(attr, _options = {})
50
+ attr
51
+ end
52
+ end
29
53
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artirix_data_models-ams
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo Turiño
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-30 00:00:00.000000000 Z
11
+ date: 2016-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: artirix_data_models
@@ -87,6 +87,7 @@ files:
87
87
  - Rakefile
88
88
  - artirix_data_models-ams.gemspec
89
89
  - bin/console
90
+ - bin/rake
90
91
  - bin/setup
91
92
  - lib/artirix_data_models/ams.rb
92
93
  - lib/artirix_data_models/ams/version.rb