activemodel 5.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +114 -0
  3. data/MIT-LICENSE +21 -0
  4. data/README.rdoc +264 -0
  5. data/lib/active_model.rb +77 -0
  6. data/lib/active_model/attribute.rb +248 -0
  7. data/lib/active_model/attribute/user_provided_default.rb +52 -0
  8. data/lib/active_model/attribute_assignment.rb +57 -0
  9. data/lib/active_model/attribute_methods.rb +478 -0
  10. data/lib/active_model/attribute_mutation_tracker.rb +124 -0
  11. data/lib/active_model/attribute_set.rb +114 -0
  12. data/lib/active_model/attribute_set/builder.rb +126 -0
  13. data/lib/active_model/attribute_set/yaml_encoder.rb +41 -0
  14. data/lib/active_model/attributes.rb +111 -0
  15. data/lib/active_model/callbacks.rb +153 -0
  16. data/lib/active_model/conversion.rb +111 -0
  17. data/lib/active_model/dirty.rb +343 -0
  18. data/lib/active_model/errors.rb +517 -0
  19. data/lib/active_model/forbidden_attributes_protection.rb +31 -0
  20. data/lib/active_model/gem_version.rb +17 -0
  21. data/lib/active_model/lint.rb +118 -0
  22. data/lib/active_model/locale/en.yml +36 -0
  23. data/lib/active_model/model.rb +99 -0
  24. data/lib/active_model/naming.rb +318 -0
  25. data/lib/active_model/railtie.rb +14 -0
  26. data/lib/active_model/secure_password.rb +129 -0
  27. data/lib/active_model/serialization.rb +192 -0
  28. data/lib/active_model/serializers/json.rb +146 -0
  29. data/lib/active_model/translation.rb +70 -0
  30. data/lib/active_model/type.rb +53 -0
  31. data/lib/active_model/type/big_integer.rb +15 -0
  32. data/lib/active_model/type/binary.rb +52 -0
  33. data/lib/active_model/type/boolean.rb +38 -0
  34. data/lib/active_model/type/date.rb +57 -0
  35. data/lib/active_model/type/date_time.rb +51 -0
  36. data/lib/active_model/type/decimal.rb +70 -0
  37. data/lib/active_model/type/float.rb +36 -0
  38. data/lib/active_model/type/helpers.rb +7 -0
  39. data/lib/active_model/type/helpers/accepts_multiparameter_time.rb +41 -0
  40. data/lib/active_model/type/helpers/mutable.rb +20 -0
  41. data/lib/active_model/type/helpers/numeric.rb +37 -0
  42. data/lib/active_model/type/helpers/time_value.rb +68 -0
  43. data/lib/active_model/type/helpers/timezone.rb +19 -0
  44. data/lib/active_model/type/immutable_string.rb +32 -0
  45. data/lib/active_model/type/integer.rb +70 -0
  46. data/lib/active_model/type/registry.rb +70 -0
  47. data/lib/active_model/type/string.rb +26 -0
  48. data/lib/active_model/type/time.rb +51 -0
  49. data/lib/active_model/type/value.rb +126 -0
  50. data/lib/active_model/validations.rb +439 -0
  51. data/lib/active_model/validations/absence.rb +33 -0
  52. data/lib/active_model/validations/acceptance.rb +106 -0
  53. data/lib/active_model/validations/callbacks.rb +122 -0
  54. data/lib/active_model/validations/clusivity.rb +54 -0
  55. data/lib/active_model/validations/confirmation.rb +80 -0
  56. data/lib/active_model/validations/exclusion.rb +49 -0
  57. data/lib/active_model/validations/format.rb +114 -0
  58. data/lib/active_model/validations/helper_methods.rb +15 -0
  59. data/lib/active_model/validations/inclusion.rb +47 -0
  60. data/lib/active_model/validations/length.rb +129 -0
  61. data/lib/active_model/validations/numericality.rb +189 -0
  62. data/lib/active_model/validations/presence.rb +39 -0
  63. data/lib/active_model/validations/validates.rb +174 -0
  64. data/lib/active_model/validations/with.rb +147 -0
  65. data/lib/active_model/validator.rb +183 -0
  66. data/lib/active_model/version.rb +10 -0
  67. metadata +125 -0
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "gem_version"
4
+
5
+ module ActiveModel
6
+ # Returns the version of the currently loaded \Active \Model as a <tt>Gem::Version</tt>
7
+ def self.version
8
+ gem_version
9
+ end
10
+ end
metadata ADDED
@@ -0,0 +1,125 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: activemodel
3
+ version: !ruby/object:Gem::Version
4
+ version: 5.2.3
5
+ platform: ruby
6
+ authors:
7
+ - David Heinemeier Hansson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-03-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 5.2.3
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 5.2.3
27
+ description: A toolkit for building modeling frameworks like Active Record. Rich support
28
+ for attributes, callbacks, validations, serialization, internationalization, and
29
+ testing.
30
+ email: david@loudthinking.com
31
+ executables: []
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - CHANGELOG.md
36
+ - MIT-LICENSE
37
+ - README.rdoc
38
+ - lib/active_model.rb
39
+ - lib/active_model/attribute.rb
40
+ - lib/active_model/attribute/user_provided_default.rb
41
+ - lib/active_model/attribute_assignment.rb
42
+ - lib/active_model/attribute_methods.rb
43
+ - lib/active_model/attribute_mutation_tracker.rb
44
+ - lib/active_model/attribute_set.rb
45
+ - lib/active_model/attribute_set/builder.rb
46
+ - lib/active_model/attribute_set/yaml_encoder.rb
47
+ - lib/active_model/attributes.rb
48
+ - lib/active_model/callbacks.rb
49
+ - lib/active_model/conversion.rb
50
+ - lib/active_model/dirty.rb
51
+ - lib/active_model/errors.rb
52
+ - lib/active_model/forbidden_attributes_protection.rb
53
+ - lib/active_model/gem_version.rb
54
+ - lib/active_model/lint.rb
55
+ - lib/active_model/locale/en.yml
56
+ - lib/active_model/model.rb
57
+ - lib/active_model/naming.rb
58
+ - lib/active_model/railtie.rb
59
+ - lib/active_model/secure_password.rb
60
+ - lib/active_model/serialization.rb
61
+ - lib/active_model/serializers/json.rb
62
+ - lib/active_model/translation.rb
63
+ - lib/active_model/type.rb
64
+ - lib/active_model/type/big_integer.rb
65
+ - lib/active_model/type/binary.rb
66
+ - lib/active_model/type/boolean.rb
67
+ - lib/active_model/type/date.rb
68
+ - lib/active_model/type/date_time.rb
69
+ - lib/active_model/type/decimal.rb
70
+ - lib/active_model/type/float.rb
71
+ - lib/active_model/type/helpers.rb
72
+ - lib/active_model/type/helpers/accepts_multiparameter_time.rb
73
+ - lib/active_model/type/helpers/mutable.rb
74
+ - lib/active_model/type/helpers/numeric.rb
75
+ - lib/active_model/type/helpers/time_value.rb
76
+ - lib/active_model/type/helpers/timezone.rb
77
+ - lib/active_model/type/immutable_string.rb
78
+ - lib/active_model/type/integer.rb
79
+ - lib/active_model/type/registry.rb
80
+ - lib/active_model/type/string.rb
81
+ - lib/active_model/type/time.rb
82
+ - lib/active_model/type/value.rb
83
+ - lib/active_model/validations.rb
84
+ - lib/active_model/validations/absence.rb
85
+ - lib/active_model/validations/acceptance.rb
86
+ - lib/active_model/validations/callbacks.rb
87
+ - lib/active_model/validations/clusivity.rb
88
+ - lib/active_model/validations/confirmation.rb
89
+ - lib/active_model/validations/exclusion.rb
90
+ - lib/active_model/validations/format.rb
91
+ - lib/active_model/validations/helper_methods.rb
92
+ - lib/active_model/validations/inclusion.rb
93
+ - lib/active_model/validations/length.rb
94
+ - lib/active_model/validations/numericality.rb
95
+ - lib/active_model/validations/presence.rb
96
+ - lib/active_model/validations/validates.rb
97
+ - lib/active_model/validations/with.rb
98
+ - lib/active_model/validator.rb
99
+ - lib/active_model/version.rb
100
+ homepage: http://rubyonrails.org
101
+ licenses:
102
+ - MIT
103
+ metadata:
104
+ source_code_uri: https://github.com/rails/rails/tree/v5.2.3/activemodel
105
+ changelog_uri: https://github.com/rails/rails/blob/v5.2.3/activemodel/CHANGELOG.md
106
+ post_install_message:
107
+ rdoc_options: []
108
+ require_paths:
109
+ - lib
110
+ required_ruby_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: 2.2.2
115
+ required_rubygems_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ requirements: []
121
+ rubygems_version: 3.0.1
122
+ signing_key:
123
+ specification_version: 4
124
+ summary: A toolkit for building modeling frameworks (part of Rails).
125
+ test_files: []