simple_ams 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +28 -0
  3. data/.rubocop.yml +56 -0
  4. data/CHANGELOG.md +22 -0
  5. data/Gemfile +2 -2
  6. data/README.md +663 -116
  7. data/Rakefile +3 -3
  8. data/bin/console +3 -3
  9. data/lib/simple_ams.rb +34 -33
  10. data/lib/simple_ams/adapters/ams.rb +26 -32
  11. data/lib/simple_ams/adapters/jsonapi.rb +46 -65
  12. data/lib/simple_ams/document.rb +38 -28
  13. data/lib/simple_ams/document/fields.rb +36 -37
  14. data/lib/simple_ams/document/forms.rb +7 -9
  15. data/lib/simple_ams/document/generics.rb +35 -37
  16. data/lib/simple_ams/document/links.rb +7 -9
  17. data/lib/simple_ams/document/metas.rb +7 -11
  18. data/lib/simple_ams/document/primary_id.rb +14 -17
  19. data/lib/simple_ams/document/relations.rb +99 -109
  20. data/lib/simple_ams/dsl.rb +73 -71
  21. data/lib/simple_ams/methy.rb +2 -2
  22. data/lib/simple_ams/options.rb +268 -266
  23. data/lib/simple_ams/options/adapter.rb +2 -2
  24. data/lib/simple_ams/options/concerns/filterable.rb +29 -34
  25. data/lib/simple_ams/options/concerns/mod.rb +4 -0
  26. data/lib/simple_ams/options/concerns/name_value_hash.rb +25 -26
  27. data/lib/simple_ams/options/concerns/tracked_properties.rb +15 -17
  28. data/lib/simple_ams/options/concerns/value_hash.rb +25 -26
  29. data/lib/simple_ams/options/fields.rb +1 -1
  30. data/lib/simple_ams/options/forms.rb +1 -2
  31. data/lib/simple_ams/options/generics.rb +2 -4
  32. data/lib/simple_ams/options/includes.rb +1 -1
  33. data/lib/simple_ams/options/links.rb +1 -1
  34. data/lib/simple_ams/options/metas.rb +1 -1
  35. data/lib/simple_ams/options/primary_id.rb +1 -1
  36. data/lib/simple_ams/options/relations.rb +9 -7
  37. data/lib/simple_ams/options/type.rb +1 -2
  38. data/lib/simple_ams/renderer.rb +43 -41
  39. data/lib/simple_ams/version.rb +1 -1
  40. data/simple_ams.gemspec +17 -16
  41. metadata +38 -21
  42. data/.travis.yml +0 -15
@@ -1,3 +1,3 @@
1
1
  module SimpleAMS
2
- VERSION = "0.2.5"
2
+ VERSION = '0.2.6'.freeze
3
3
  end
data/simple_ams.gemspec CHANGED
@@ -1,28 +1,29 @@
1
- # coding: utf-8
2
- lib = File.expand_path("../lib", __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "simple_ams/version"
3
+ require 'simple_ams/version'
5
4
 
6
5
  Gem::Specification.new do |spec|
7
- spec.name = "simple_ams"
6
+ spec.name = 'simple_ams'
8
7
  spec.version = SimpleAMS::VERSION
9
- spec.authors = ["Filippos Vasilakis"]
10
- spec.email = ["vasilakisfil@gmail.com"]
8
+ spec.authors = ['Filippos Vasilakis']
9
+ spec.email = ['vasilakisfil@gmail.com']
11
10
 
12
- spec.summary = %q{ActiveModel Serializers, simplified.}
13
- spec.description = %q{ActiveModel Serializers, simplified.}
14
- spec.homepage = "https://github.com/vasilakisfil/SimpleAMS"
11
+ spec.summary = 'ActiveModel Serializers, simplified.'
12
+ spec.description = 'ActiveModel Serializers, simplified.'
13
+ spec.homepage = 'https://github.com/vasilakisfil/SimpleAMS'
15
14
 
16
15
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
16
  f.match(%r{^(test|spec|features)/})
18
17
  end
19
- spec.bindir = "exe"
18
+ spec.bindir = 'exe'
20
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
- spec.require_paths = ["lib"]
20
+ spec.require_paths = ['lib']
21
+ spec.required_ruby_version = '>= 2.4'
22
22
 
23
- spec.add_development_dependency "rake", "~> 10.0"
24
- spec.add_development_dependency "rspec", "~> 3.0"
25
- spec.add_development_dependency "faker", "~> 1.8.5"
26
- spec.add_development_dependency "pry", "~> 0.11.3"
27
- spec.add_development_dependency "simplecov"
23
+ spec.add_development_dependency 'faker', '~> 2.16'
24
+ spec.add_development_dependency 'pry', '~> 0.14.0'
25
+ spec.add_development_dependency 'rake', '>= 12.3.3'
26
+ spec.add_development_dependency 'rspec', '~> 3.0'
27
+ spec.add_development_dependency 'rubocop', '~> 0.93.1'
28
+ spec.add_development_dependency 'simplecov', '~> 0.21.2'
28
29
  end
metadata CHANGED
@@ -1,85 +1,99 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_ams
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Filippos Vasilakis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-31 00:00:00.000000000 Z
11
+ date: 2021-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rake
14
+ name: faker
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '10.0'
19
+ version: '2.16'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '10.0'
26
+ version: '2.16'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rspec
28
+ name: pry
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.0'
33
+ version: 0.14.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '3.0'
40
+ version: 0.14.0
41
41
  - !ruby/object:Gem::Dependency
42
- name: faker
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 12.3.3
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 12.3.3
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
59
  - - "~>"
46
60
  - !ruby/object:Gem::Version
47
- version: 1.8.5
61
+ version: '3.0'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
66
  - - "~>"
53
67
  - !ruby/object:Gem::Version
54
- version: 1.8.5
68
+ version: '3.0'
55
69
  - !ruby/object:Gem::Dependency
56
- name: pry
70
+ name: rubocop
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
73
  - - "~>"
60
74
  - !ruby/object:Gem::Version
61
- version: 0.11.3
75
+ version: 0.93.1
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
80
  - - "~>"
67
81
  - !ruby/object:Gem::Version
68
- version: 0.11.3
82
+ version: 0.93.1
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: simplecov
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
- - - ">="
87
+ - - "~>"
74
88
  - !ruby/object:Gem::Version
75
- version: '0'
89
+ version: 0.21.2
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
- - - ">="
94
+ - - "~>"
81
95
  - !ruby/object:Gem::Version
82
- version: '0'
96
+ version: 0.21.2
83
97
  description: ActiveModel Serializers, simplified.
84
98
  email:
85
99
  - vasilakisfil@gmail.com
@@ -87,9 +101,11 @@ executables: []
87
101
  extensions: []
88
102
  extra_rdoc_files: []
89
103
  files:
104
+ - ".github/workflows/ruby.yml"
90
105
  - ".gitignore"
91
106
  - ".rspec"
92
- - ".travis.yml"
107
+ - ".rubocop.yml"
108
+ - CHANGELOG.md
93
109
  - Gemfile
94
110
  - README.md
95
111
  - Rakefile
@@ -112,6 +128,7 @@ files:
112
128
  - lib/simple_ams/options.rb
113
129
  - lib/simple_ams/options/adapter.rb
114
130
  - lib/simple_ams/options/concerns/filterable.rb
131
+ - lib/simple_ams/options/concerns/mod.rb
115
132
  - lib/simple_ams/options/concerns/name_value_hash.rb
116
133
  - lib/simple_ams/options/concerns/tracked_properties.rb
117
134
  - lib/simple_ams/options/concerns/value_hash.rb
@@ -138,14 +155,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
155
  requirements:
139
156
  - - ">="
140
157
  - !ruby/object:Gem::Version
141
- version: '0'
158
+ version: '2.4'
142
159
  required_rubygems_version: !ruby/object:Gem::Requirement
143
160
  requirements:
144
161
  - - ">="
145
162
  - !ruby/object:Gem::Version
146
163
  version: '0'
147
164
  requirements: []
148
- rubygems_version: 3.0.3
165
+ rubygems_version: 3.2.3
149
166
  signing_key:
150
167
  specification_version: 4
151
168
  summary: ActiveModel Serializers, simplified.
data/.travis.yml DELETED
@@ -1,15 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- rvm:
4
- - 2.3.8
5
- - 2.4.5
6
- - 2.5.3
7
- - 2.6.1
8
- - 2.7.0
9
- - ruby-head
10
- before_install:
11
- - gem install bundler:2.1.1
12
- script: bundle exec rspec spec/
13
- matrix:
14
- allow_failures:
15
- - rvm: ruby-head