rasti-app 7.0.1 → 7.0.2

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
- SHA1:
3
- metadata.gz: 142dc067d4a36842117ab120c8c562ff25b4cae8
4
- data.tar.gz: 1eac819553b800ba8fba24061e071d828c76b45e
2
+ SHA256:
3
+ metadata.gz: 98386715eb2b4ac8eaae5131385425f8bd3043d9b3316b05e38d8b58dd78f2c2
4
+ data.tar.gz: 18a7f78fef15b3ebba6a2ee3dd6f28b770f2c1434e51a92e813f304040bdeab6
5
5
  SHA512:
6
- metadata.gz: 432d5d28ac9496a0c02d9e68c99331879b0eb4ef97d7d3d2c56fa71ff3757d8209927ba98f4bfbabdfe5dbe066e02430c70dfdc14966bf619f7cd942853a4cd2
7
- data.tar.gz: ceaa848dd8eb180e6fa0c75f27244bce1f96b10086a162571ddabdfc3cdc85017cf9b2094e5e78ce4f4609db9f12932e2c2ecae3cf53a3011121d6dac157b265
6
+ metadata.gz: 1893dc1af67e97d0ed5c000f65bd1ea5574567899253ae05c58fdba9b5ea0c027e8a0188b33548840a6f64bb6ba9c849fcd2e9fc67dcbd030d6fbbfea8be3aa4
7
+ data.tar.gz: 70610755aaab8b4f247b19ad4a5f8bc4a62ebfa41fb9cf48de35c5521649157d506eceb962a0246726561fe1c7304e1548f6bd0a64f862abd662a1f3283b274d
@@ -1 +1 @@
1
- ruby-2.4.0
1
+ ruby-2.5.7
@@ -5,10 +5,12 @@ rvm:
5
5
  - 2.0
6
6
  - 2.1
7
7
  - 2.2
8
- - 2.3.0
9
- - 2.4.0
10
- - jruby-1.7.25
11
- - jruby-9.1.7.0
8
+ - 2.3
9
+ - 2.4
10
+ - 2.5
11
+ - 2.6
12
+ - 2.7
13
+ - jruby-9.2.9.0
12
14
  - ruby-head
13
15
  - jruby-head
14
16
 
@@ -16,7 +18,4 @@ matrix:
16
18
  fast_finish: true
17
19
  allow_failures:
18
20
  - rvm: ruby-head
19
- - rvm: jruby-head
20
-
21
- before_install:
22
- - gem install bundler
21
+ - rvm: jruby-head
@@ -70,13 +70,9 @@ module Rasti
70
70
  end
71
71
 
72
72
  def enqueue(name, permission, params={})
73
- options = {
74
- queue: params.delete(:queue),
75
- job_id: params.delete(:job_id),
76
- job_wrapper: params.delete(:job_wrapper)
77
- }
73
+ options, attributes = Utils.split_hash params, [:queue, :job_id, :job_wrapper]
78
74
 
79
- form = self.class.facade.build_form name, params
75
+ form = self.class.facade.build_form name, attributes
80
76
  authorize! permission, form
81
77
  result = self.class.facade.enqueue name, session, form, options
82
78
  after_call name, form.attributes, result
@@ -13,13 +13,15 @@ module Rasti
13
13
  end
14
14
 
15
15
  def enqueue(interaction, params)
16
- job.send :async, Job, queue: params.delete(:queue) || Asynchronic.default_queue,
17
- alias: params.delete(:alias) || interaction,
18
- dependency: params.delete(:dependency),
19
- dependencies: params.delete(:dependencies),
16
+ options, attributes = Utils.split_hash params, [:queue, :alias, :dependency, :dependencies]
17
+
18
+ job.send :async, Job, queue: options[:queue] || Asynchronic.default_queue,
19
+ alias: options[:alias] || interaction,
20
+ dependency: options[:dependency],
21
+ dependencies: options[:dependencies],
20
22
  interaction: interaction,
21
23
  session: session,
22
- params: params
24
+ params: attributes
23
25
  end
24
26
 
25
27
  def result_of(reference)
@@ -9,6 +9,7 @@ module Rasti
9
9
 
10
10
  define_method name do
11
11
  cache[name] ||= begin
12
+ raise "Undefined settings for service: #{name}" unless settings.key? name
12
13
  adapter_class = Consty.get(settings[name][:adapter], self.class.services[name])
13
14
  self.class.services[name].new adapter_class.new(environment, settings[name][:options])
14
15
  end
@@ -21,6 +21,10 @@ module Rasti
21
21
  namespace.empty? ? nil : Object.const_get(namespace)
22
22
  end
23
23
 
24
+ def split_hash(hash, keys)
25
+ [hash.slice(*keys), hash.slice(*(hash.keys - keys))]
26
+ end
27
+
24
28
  end
25
29
  end
26
30
  end
@@ -1,5 +1,5 @@
1
1
  module Rasti
2
2
  class App
3
- VERSION = '7.0.1'
3
+ VERSION = '7.0.2'
4
4
  end
5
5
  end
@@ -23,9 +23,8 @@ Gem::Specification.new do |spec|
23
23
  spec.add_runtime_dependency 'multi_require', '~> 1.0'
24
24
  spec.add_runtime_dependency 'hash_ext', '~> 0.5'
25
25
  spec.add_runtime_dependency 'consty', '~> 1.0'
26
- spec.add_runtime_dependency 'rasti-form', '~> 3.0'
26
+ spec.add_runtime_dependency 'rasti-form', '~> 3.1'
27
27
 
28
- spec.add_development_dependency 'bundler', '~> 1.12'
29
28
  spec.add_development_dependency 'rake', '~> 11.0'
30
29
  spec.add_development_dependency 'minitest', '~> 5.0'
31
30
  spec.add_development_dependency 'minitest-colorin', '~> 0.1'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rasti-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.1
4
+ version: 7.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Naiman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-04 00:00:00.000000000 Z
11
+ date: 2020-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inflecto
@@ -92,28 +92,14 @@ dependencies:
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '3.0'
95
+ version: '3.1'
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '3.0'
103
- - !ruby/object:Gem::Dependency
104
- name: bundler
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: '1.12'
110
- type: :development
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - "~>"
115
- - !ruby/object:Gem::Version
116
- version: '1.12'
102
+ version: '3.1'
117
103
  - !ruby/object:Gem::Dependency
118
104
  name: rake
119
105
  requirement: !ruby/object:Gem::Requirement
@@ -267,8 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
267
253
  - !ruby/object:Gem::Version
268
254
  version: '0'
269
255
  requirements: []
270
- rubyforge_project:
271
- rubygems_version: 2.6.8
256
+ rubygems_version: 3.0.6
272
257
  signing_key:
273
258
  specification_version: 4
274
259
  summary: ''