c80_shared 0.1.75 → 0.1.76

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
  SHA256:
3
- metadata.gz: a0d0fb5dea4c2d1ca888270d61c90de4229ea86eb3c0946e886da5ca7269c5e5
4
- data.tar.gz: 53725692b5a1f8c9a2b887420ca815c1c1a7a17b7a2d7c03441e8985106e3d9c
3
+ metadata.gz: e311a9f49c938b6bf11b840fa071f7d5c00ed81389ca5049eaeb9fc700f578e2
4
+ data.tar.gz: 62d8897cafb57b53d2f5a72fdbdba605abc96ba6977e205a2e9104537fb68541
5
5
  SHA512:
6
- metadata.gz: 0d1cc997a3824b8e86e5add609b58d7a0c0101417cd9b7a8666eac05f80ed95770a7e45f7de9700c87985706cb6b8287cc3d12dc3a53290df96d3a9311907c7d
7
- data.tar.gz: 233e0fb50dea5b61a80329f84cae62a7761f0b71f8681e660029ee19cd4de950aae2758630c02cd9cd56bc54dd558f1ddf02f4d35e77cb71f345494b78fdea04
6
+ metadata.gz: 0acef74dcaf9f36a692b3ecdd89ec1a1e4f836bc2ff05a857b57967c806dae664636c3ed4542a21de00e7433bb7a7d66c7911ae7f2d9e34040d86b9315fc12ac
7
+ data.tar.gz: d360eeb2a00d7fdcadee44d2f5f1b8bba1558202f8d8e7e1e7084dabeae595852ac524ad1887b6a38554d83d12b3b2a6ad4cf83e17e2e2584daac777134fc35c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- c80_shared (0.1.74)
4
+ c80_shared (0.1.75)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -18,6 +18,7 @@ module Accounts
18
18
  account.save
19
19
  central.save
20
20
  user.save
21
+ ::Accounts::CentralAgents::AddStatus.call account.id
21
22
  end
22
23
 
23
24
  central
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+ module Accounts
3
+ module CentralAgents
4
+ class AddStatus
5
+ SQL = 'INSERT INTO %{table}(agent_account_id, account_id, value, created_at) VALUES(%{caid}, %{aid}, \'%{val}\', NOW())'
6
+
7
+ def self.call(central_agent_account_id, account_id = 1, status_index = ::Dicts::Accounts::CentralAgentStatus::NONE.index)
8
+ sql = SQL % {
9
+ table: CentralAgentStatus.table_name,
10
+ caid: central_agent_account_id,
11
+ aid: account_id,
12
+ val: status_index
13
+ }
14
+ ActiveRecord::Base.connection.execute sql
15
+ end
16
+ end
17
+ end
18
+ end
@@ -1,3 +1,3 @@
1
1
  module C80Shared
2
- VERSION = "0.1.75"
2
+ VERSION = "0.1.76"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: c80_shared
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.75
4
+ version: 0.1.76
5
5
  platform: ruby
6
6
  authors:
7
7
  - C80609A
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-25 00:00:00.000000000 Z
11
+ date: 2020-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -82,6 +82,7 @@ files:
82
82
  - app/helpers/custom/select_helper.rb
83
83
  - app/helpers/site/time_helper.rb
84
84
  - app/repositories/accounts/central_agent_account_repository.rb
85
+ - app/repositories/accounts/central_agents/add_status.rb
85
86
  - app/repositories/accounts/client_account_repository.rb
86
87
  - app/repositories/events/rejects_repository.rb
87
88
  - app/serializers/account_serializer.rb