railjet 3.2.0 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dabef786fc068425030ba7491d155b468603cad7e60b87cba1279947675193bb
4
- data.tar.gz: e3bec2083b8df544538483cd4c31bb7450926075f9b214f70bf9797be52693d3
3
+ metadata.gz: 41742f6c2ecf4ea774dba15972029f7692a3c2377797a6194a7cec9d929d123a
4
+ data.tar.gz: 42ce252ca964ff2fe715f0c32295a254d8ae9dbd750c47dbcfd51c1acafeffc8
5
5
  SHA512:
6
- metadata.gz: c86ac300b35515fa2474f2f0da707ee42df17b98b586dcd74dd926c2459a3e2e6bf2d56412a88427bc82fcab0b60dde9cc190607e769ee771dffe825a71e1a3c
7
- data.tar.gz: 74dd2b89e62fc17ae6ae1f54358cea04156cbe446bbdec1bf738b04d6125f5394975b41204498ea55bd1aae7b3b8e2cfdd3143c7db6c47780b1483b60a0f02da
6
+ metadata.gz: 68025b280e2b29970c3184de6dd1dcdbffb9a4b50f35647f6fb3a17b7ecc06226a1a7f09941f4d83f1668b948c12d8636ba8431201936befe3607f59b99dc1a4
7
+ data.tar.gz: 36412988d11c8ac4ed10895605b2f6655b3a4e2985972ae287b37eb42e25201c86102fdd58af8cf41c7f37f59d92c83e3433ff94f29bd71fcaf182136d89f261
@@ -0,0 +1,19 @@
1
+ name: Test
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+
9
+ steps:
10
+ - name: Checkout
11
+ uses: actions/checkout@v2
12
+
13
+ - name: Setup Ruby
14
+ uses: ruby/setup-ruby@v1
15
+ with:
16
+ bundler-cache: true
17
+
18
+ - name: Run tests
19
+ run: bundle exec rspec spec
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.6
1
+ 2.7.6
data/README.md CHANGED
@@ -1,6 +1,5 @@
1
1
  # Railjet, architecture for high-speed railway
2
2
 
3
- [![Build Status](https://nedap-opensource.semaphoreci.com/badges/railjet/branches/master.svg?style=shields)](https://semaphoreci.com/nedap/railjet)
4
3
  [![Maintainability](https://api.codeclimate.com/v1/badges/457bb41a82546fd6e459/maintainability)](https://codeclimate.com/github/nedap/railjet/maintainability)
5
4
  [![Test Coverage](https://api.codeclimate.com/v1/badges/457bb41a82546fd6e459/test_coverage)](https://codeclimate.com/github/nedap/railjet/test_coverage)
6
5
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.0
1
+ 3.5.0
@@ -1,22 +1,6 @@
1
1
  ActiveModel::Errors.class_eval do
2
2
  def <<(other)
3
- copy_messages_from(other)
4
- copy_details_from(other) if respond_to?(:details)
5
-
3
+ self.merge!(other)
6
4
  self
7
5
  end
8
-
9
- private
10
-
11
- def copy_details_from(other)
12
- details.merge!(other.details) do |_, val_one, val_two|
13
- [*val_one] + [*val_two]
14
- end
15
- end
16
-
17
- def copy_messages_from(other)
18
- messages.merge!(other.messages) do |_, val_one, val_two|
19
- [*val_one] + [*val_two]
20
- end
21
- end
22
6
  end
@@ -25,7 +25,10 @@ module Railjet
25
25
 
26
26
  def define_dao_accessor(type, dao)
27
27
  define_method type do
28
- instance_variable_get("@#{type}") || instance_variable_set("@#{type}", (dao.constantize if dao.respond_to?(:constantize)))
28
+ @cached_dao_class ||= begin
29
+ dao_klass = instance_variable_get("@#{type}") || instance_variable_set("@#{type}", (dao.constantize if dao.respond_to?(:constantize)))
30
+ dao_klass.is_a?(String) ? dao_klass.safe_constantize : dao_klass
31
+ end
29
32
  end
30
33
  end
31
34
 
@@ -1,3 +1,3 @@
1
1
  module Railjet
2
- VERSION = "3.2.0"
2
+ VERSION = "3.5.0"
3
3
  end
data/railjet.gemspec CHANGED
@@ -26,8 +26,8 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency "rake-version", "~> 1.0"
27
27
  spec.add_development_dependency "simplecov", "~> 0.17.1"
28
28
 
29
- spec.add_dependency "activesupport", '> 4'
30
- spec.add_dependency "activemodel", '> 4'
29
+ spec.add_dependency "activesupport", '> 5.2'
30
+ spec.add_dependency "activemodel", '> 5.2'
31
31
  spec.add_dependency "virtus", "~> 1.0.2"
32
- spec.add_dependency "validates_timeliness", "~> 4.1"
32
+ spec.add_dependency "validates_timeliness", "6.0.0.beta2" # Update this to ~> 6.0 when an official release is made
33
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railjet
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Zalewski
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-14 00:00:00.000000000 Z
11
+ date: 2022-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -100,28 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - ">"
102
102
  - !ruby/object:Gem::Version
103
- version: '4'
103
+ version: '5.2'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - ">"
109
109
  - !ruby/object:Gem::Version
110
- version: '4'
110
+ version: '5.2'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: activemodel
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">"
116
116
  - !ruby/object:Gem::Version
117
- version: '4'
117
+ version: '5.2'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">"
123
123
  - !ruby/object:Gem::Version
124
- version: '4'
124
+ version: '5.2'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: virtus
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -140,16 +140,16 @@ dependencies:
140
140
  name: validates_timeliness
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - "~>"
143
+ - - '='
144
144
  - !ruby/object:Gem::Version
145
- version: '4.1'
145
+ version: 6.0.0.beta2
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - "~>"
150
+ - - '='
151
151
  - !ruby/object:Gem::Version
152
- version: '4.1'
152
+ version: 6.0.0.beta2
153
153
  description: Design patterns for Ruby on Rails
154
154
  email:
155
155
  - zlw.zalewski@gmail.com
@@ -157,12 +157,11 @@ executables: []
157
157
  extensions: []
158
158
  extra_rdoc_files: []
159
159
  files:
160
+ - ".github/workflows/test.yml"
160
161
  - ".gitignore"
161
162
  - ".rspec"
162
163
  - ".ruby-gemset"
163
164
  - ".ruby-version"
164
- - ".semaphore/semaphore.yml"
165
- - ".semaphore/setup_codeclimate_test_coverage.sh"
166
165
  - Gemfile
167
166
  - LICENSE.txt
168
167
  - README.md
@@ -219,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
218
  - !ruby/object:Gem::Version
220
219
  version: '0'
221
220
  requirements: []
222
- rubygems_version: 3.0.3
221
+ rubygems_version: 3.1.6
223
222
  signing_key:
224
223
  specification_version: 4
225
224
  summary: Better architecture for high-speed railway
@@ -1,30 +0,0 @@
1
- version: v1.0
2
- name: Railjet Pipeline
3
- agent:
4
- machine:
5
- type: e1-standard-2
6
- os_image: ubuntu1804
7
- auto_cancel:
8
- running:
9
- when: "branch != 'master'"
10
- blocks:
11
- - name: 'Rspec'
12
- task:
13
- env_vars:
14
- - name: CC_TEST_REPORTER_ID
15
- value: 9cfd93bf8178ecfe837889113add5d001b2110503d238294a56ac7dcb3286852
16
- jobs:
17
- - name: specs
18
- matrix:
19
- - env_var: RUBY_VERSION
20
- values: [ "2.4.10", "2.5.8", "2.6.6", "2.7.1" ]
21
- commands:
22
- - sem-version ruby $RUBY_VERSION
23
- - bundle install --path vendor/bundle
24
- - source ./.semaphore/setup_codeclimate_test_coverage.sh
25
- - bundle exec rake spec
26
- - ./cc-test-reporter format-coverage
27
- - ./cc-test-reporter upload-coverage
28
- prologue:
29
- commands:
30
- - checkout
@@ -1,11 +0,0 @@
1
- cache restore cc-test-reporter-$(date +%F)
2
-
3
- if [ -f 'cc-test-reporter' ]; then
4
- echo 'found test reporter in cache'
5
- else
6
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
7
- chmod +x ./cc-test-reporter
8
- cache store cc-test-reporter-$(date +%F) cc-test-reporter
9
- fi
10
-
11
- ./cc-test-reporter before-build