neeto-commons-backend 1.0.107 → 1.0.109

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: ce5cf3f3cb79016d886ed4328ede57e3e99839ba31bcac71415df1ebdc851284
4
- data.tar.gz: c06c955085d5d6698380ff7ed957a98225b9425e1572fe5a8d5fdc83e9aa5e35
3
+ metadata.gz: fd7352b3f3f0177ac9284d8e5ee6048499d223a91abe484ce7eb0aec7de2e01d
4
+ data.tar.gz: 1cd5a44a254214877540c0b344409aa40ea05f6dd1dc7c86b5c1d7fc2115e5c2
5
5
  SHA512:
6
- metadata.gz: b7e0d78c9f709da5611e24c5b7c43f8ad656bc1112b2a755bb3319f9e3e921d5e70f4424c047e6d172e723e5fba8f054e036024cadea0faaf052bab0358e203d
7
- data.tar.gz: 2045203ae2931e3a9950d218d5c6c67df4d585ee3b13fd367745b2e30870705ea33398db8352f17bd28636ce36ce28478a14e0b32e3061a0c1cbb283f0997ecf
6
+ metadata.gz: 7510f362e7b76ac4f35422e2c2bdba60eb72401842803841796c6ff62c37176514baf56eeba7c5e479f3062687f570ac450cb7a8b8d0fb09efe338406720b08a
7
+ data.tar.gz: bde249517dc70f8b4f5ca79fed0cdcd5cbbdcfcb4770c2b24f76c1e34af5ddff7bb4559d00f79908276ef4b4a5583fce04986b903d9ca2ea051cb6a1cb99aa48
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- neeto-commons-backend (1.0.107)
4
+ neeto-commons-backend (1.0.109)
5
5
  actionview
6
6
  bullet
7
7
  database_cleaner
@@ -25,14 +25,14 @@ PATH
25
25
  GEM
26
26
  remote: https://O6Ts9-SVDaUZpHMRs2CpJp22RwbETDE@gems.neeto.com/
27
27
  specs:
28
- neeto-compliance (1.0.61)
28
+ neeto-compliance (1.0.62)
29
29
  colorize
30
30
  deep_merge
31
31
  hashdiff
32
32
  json (~> 2.6.2)
33
- neeto-email-prefixer (1.0.9)
33
+ neeto-email-prefixer (1.0.10)
34
34
  rails (>= 4.0)
35
- neeto-mail-interceptor (1.0.50)
35
+ neeto-mail-interceptor (1.0.52)
36
36
  activesupport (>= 7)
37
37
  aws-sdk-dynamodb (= 1.80)
38
38
  zerobounce (~> 0.2.2)
@@ -40,67 +40,67 @@ GEM
40
40
  GEM
41
41
  remote: https://rubygems.org/
42
42
  specs:
43
- actioncable (7.0.4.3)
44
- actionpack (= 7.0.4.3)
45
- activesupport (= 7.0.4.3)
43
+ actioncable (7.0.5)
44
+ actionpack (= 7.0.5)
45
+ activesupport (= 7.0.5)
46
46
  nio4r (~> 2.0)
47
47
  websocket-driver (>= 0.6.1)
48
- actionmailbox (7.0.4.3)
49
- actionpack (= 7.0.4.3)
50
- activejob (= 7.0.4.3)
51
- activerecord (= 7.0.4.3)
52
- activestorage (= 7.0.4.3)
53
- activesupport (= 7.0.4.3)
48
+ actionmailbox (7.0.5)
49
+ actionpack (= 7.0.5)
50
+ activejob (= 7.0.5)
51
+ activerecord (= 7.0.5)
52
+ activestorage (= 7.0.5)
53
+ activesupport (= 7.0.5)
54
54
  mail (>= 2.7.1)
55
55
  net-imap
56
56
  net-pop
57
57
  net-smtp
58
- actionmailer (7.0.4.3)
59
- actionpack (= 7.0.4.3)
60
- actionview (= 7.0.4.3)
61
- activejob (= 7.0.4.3)
62
- activesupport (= 7.0.4.3)
58
+ actionmailer (7.0.5)
59
+ actionpack (= 7.0.5)
60
+ actionview (= 7.0.5)
61
+ activejob (= 7.0.5)
62
+ activesupport (= 7.0.5)
63
63
  mail (~> 2.5, >= 2.5.4)
64
64
  net-imap
65
65
  net-pop
66
66
  net-smtp
67
67
  rails-dom-testing (~> 2.0)
68
- actionpack (7.0.4.3)
69
- actionview (= 7.0.4.3)
70
- activesupport (= 7.0.4.3)
71
- rack (~> 2.0, >= 2.2.0)
68
+ actionpack (7.0.5)
69
+ actionview (= 7.0.5)
70
+ activesupport (= 7.0.5)
71
+ rack (~> 2.0, >= 2.2.4)
72
72
  rack-test (>= 0.6.3)
73
73
  rails-dom-testing (~> 2.0)
74
74
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
75
- actiontext (7.0.4.3)
76
- actionpack (= 7.0.4.3)
77
- activerecord (= 7.0.4.3)
78
- activestorage (= 7.0.4.3)
79
- activesupport (= 7.0.4.3)
75
+ actiontext (7.0.5)
76
+ actionpack (= 7.0.5)
77
+ activerecord (= 7.0.5)
78
+ activestorage (= 7.0.5)
79
+ activesupport (= 7.0.5)
80
80
  globalid (>= 0.6.0)
81
81
  nokogiri (>= 1.8.5)
82
- actionview (7.0.4.3)
83
- activesupport (= 7.0.4.3)
82
+ actionview (7.0.5)
83
+ activesupport (= 7.0.5)
84
84
  builder (~> 3.1)
85
85
  erubi (~> 1.4)
86
86
  rails-dom-testing (~> 2.0)
87
87
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
88
- activejob (7.0.4.3)
89
- activesupport (= 7.0.4.3)
88
+ activejob (7.0.5)
89
+ activesupport (= 7.0.5)
90
90
  globalid (>= 0.3.6)
91
- activemodel (7.0.4.3)
92
- activesupport (= 7.0.4.3)
93
- activerecord (7.0.4.3)
94
- activemodel (= 7.0.4.3)
95
- activesupport (= 7.0.4.3)
96
- activestorage (7.0.4.3)
97
- actionpack (= 7.0.4.3)
98
- activejob (= 7.0.4.3)
99
- activerecord (= 7.0.4.3)
100
- activesupport (= 7.0.4.3)
91
+ activemodel (7.0.5)
92
+ activesupport (= 7.0.5)
93
+ activerecord (7.0.5)
94
+ activemodel (= 7.0.5)
95
+ activesupport (= 7.0.5)
96
+ activestorage (7.0.5)
97
+ actionpack (= 7.0.5)
98
+ activejob (= 7.0.5)
99
+ activerecord (= 7.0.5)
100
+ activesupport (= 7.0.5)
101
101
  marcel (~> 1.0)
102
102
  mini_mime (>= 1.1.0)
103
- activesupport (7.0.4.3)
103
+ activesupport (7.0.5)
104
104
  concurrent-ruby (~> 1.0, >= 1.0.2)
105
105
  i18n (>= 1.6, < 2)
106
106
  minitest (>= 5.1)
@@ -110,7 +110,7 @@ GEM
110
110
  ansi (1.5.0)
111
111
  ast (2.4.2)
112
112
  aws-eventstream (1.2.0)
113
- aws-partitions (1.771.0)
113
+ aws-partitions (1.772.0)
114
114
  aws-sdk-core (3.173.1)
115
115
  aws-eventstream (~> 1, >= 1.0.2)
116
116
  aws-partitions (~> 1, >= 1.651.0)
@@ -238,11 +238,11 @@ GEM
238
238
  net-smtp (0.3.3)
239
239
  net-protocol
240
240
  nio4r (2.5.9)
241
- nokogiri (1.15.1-arm64-darwin)
241
+ nokogiri (1.15.2-arm64-darwin)
242
242
  racc (~> 1.4)
243
- nokogiri (1.15.1-x86_64-darwin)
243
+ nokogiri (1.15.2-x86_64-darwin)
244
244
  racc (~> 1.4)
245
- nokogiri (1.15.1-x86_64-linux)
245
+ nokogiri (1.15.2-x86_64-linux)
246
246
  racc (~> 1.4)
247
247
  oauth2 (2.0.9)
248
248
  faraday (>= 0.17.3, < 3.0)
@@ -293,33 +293,34 @@ GEM
293
293
  rack-test (2.1.0)
294
294
  rack (>= 1.3)
295
295
  rack-timeout (0.6.3)
296
- rails (7.0.4.3)
297
- actioncable (= 7.0.4.3)
298
- actionmailbox (= 7.0.4.3)
299
- actionmailer (= 7.0.4.3)
300
- actionpack (= 7.0.4.3)
301
- actiontext (= 7.0.4.3)
302
- actionview (= 7.0.4.3)
303
- activejob (= 7.0.4.3)
304
- activemodel (= 7.0.4.3)
305
- activerecord (= 7.0.4.3)
306
- activestorage (= 7.0.4.3)
307
- activesupport (= 7.0.4.3)
296
+ rails (7.0.5)
297
+ actioncable (= 7.0.5)
298
+ actionmailbox (= 7.0.5)
299
+ actionmailer (= 7.0.5)
300
+ actionpack (= 7.0.5)
301
+ actiontext (= 7.0.5)
302
+ actionview (= 7.0.5)
303
+ activejob (= 7.0.5)
304
+ activemodel (= 7.0.5)
305
+ activerecord (= 7.0.5)
306
+ activestorage (= 7.0.5)
307
+ activesupport (= 7.0.5)
308
308
  bundler (>= 1.15.0)
309
- railties (= 7.0.4.3)
309
+ railties (= 7.0.5)
310
310
  rails-dom-testing (2.0.3)
311
311
  activesupport (>= 4.2.0)
312
312
  nokogiri (>= 1.6)
313
- rails-html-sanitizer (1.5.0)
314
- loofah (~> 2.19, >= 2.19.1)
313
+ rails-html-sanitizer (1.6.0)
314
+ loofah (~> 2.21)
315
+ nokogiri (~> 1.14)
315
316
  rails_email_preview (2.2.3)
316
317
  rails (>= 4.2)
317
318
  request_store
318
319
  sassc-rails (>= 2.0.0)
319
320
  turbolinks
320
- railties (7.0.4.3)
321
- actionpack (= 7.0.4.3)
322
- activesupport (= 7.0.4.3)
321
+ railties (7.0.5)
322
+ actionpack (= 7.0.5)
323
+ activesupport (= 7.0.5)
323
324
  method_source
324
325
  rake (>= 12.2)
325
326
  thor (~> 1.0)
@@ -7,9 +7,9 @@ module NeetoCommonsBackend
7
7
  before_action :load_blob!, only: %i[update destroy]
8
8
 
9
9
  def create
10
- blob = ActiveStorage::Blob.create_before_direct_upload!(**blob_args)
11
- blob_url = url_for(blob)
12
- render json: direct_upload_json(blob).merge(blob_url:)
10
+ @blob = ActiveStorage::Blob.create_before_direct_upload!(**blob_args)
11
+ blob_url = url_for(@blob)
12
+ render json: direct_upload_json(@blob).merge(blob_url:)
13
13
  end
14
14
 
15
15
  def update
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ class NeetoEditor::Api::V1::DirectUploadsController < NeetoCommonsBackend::Api::DirectUploadsController
4
+ before_action :destroy_editor_asset!, only: :destroy
5
+
6
+ def attach
7
+ blob = ActiveStorage::Blob.find(params[:id])
8
+ @organization.neeto_editor_assets.create!(blob_id: blob.id, file: blob)
9
+ render_success
10
+ end
11
+
12
+ private
13
+
14
+ def destroy_editor_asset!
15
+ @organization.neeto_editor_assets.find_by_blob_id(@blob.id)&.destroy!
16
+ end
17
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module NeetoEditor
4
+ class Asset < ApplicationRecord
5
+ belongs_to :organization
6
+ belongs_to :blob, class_name: "ActiveStorage::Blob"
7
+
8
+ has_one_attached :file
9
+ end
10
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module NeetoEditor
4
+ def self.table_name_prefix
5
+ "neeto_editor_"
6
+ end
7
+ end
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "devDependencies": {
30
30
  "@babel/eslint-parser": "7.17.0",
31
- "@bigbinary/eslint-plugin-neeto": "1.0.49",
31
+ "@bigbinary/eslint-plugin-neeto": "1.0.50",
32
32
  "eslint": "8.14.0",
33
33
  "eslint-config-prettier": "8.5.0",
34
34
  "eslint-plugin-cypress": "2.12.1",
@@ -54,7 +54,6 @@
54
54
  "@bigbinary/babel-preset-neeto": "^1.0.3",
55
55
  "@babel/preset-typescript": "^7.18.6",
56
56
  "@babel/runtime": "^7.19.0",
57
- "@bigbinary/neeto-editor": "1.26.13",
58
57
  "@bigbinary/neeto-filters-frontend": "2.11.6",
59
58
  "@bigbinary/neeto-icons": "1.11.0",
60
59
  "@bigbinary/neeto-commons-frontend": "2.0.74",
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ Rails.application.routes.draw do
4
+ namespace :neeto_editor do
5
+ namespace :api do
6
+ namespace :v1 do
7
+ resources :direct_uploads, only: %i[create update destroy] do
8
+ post :attach, on: :collection
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NeetoCommonsBackend
4
- VERSION = "1.0.107"
4
+ VERSION = "1.0.109"
5
5
  end
data/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "@babel/plugin-transform-runtime": "7.17.10",
9
9
  "@babel/preset-env": "7.17.10",
10
10
  "@babel/preset-react": "7.16.7",
11
- "@bigbinary/eslint-plugin-neeto": "1.0.49",
11
+ "@bigbinary/eslint-plugin-neeto": "1.0.50",
12
12
  "@bigbinary/neeto-commons-frontend": "2.0.74",
13
13
  "eslint": "8.14.0",
14
14
  "eslint-config-prettier": "8.5.0",
data/yarn.lock CHANGED
@@ -967,10 +967,10 @@
967
967
  "@babel/helper-validator-identifier" "^7.18.6"
968
968
  to-fast-properties "^2.0.0"
969
969
 
970
- "@bigbinary/eslint-plugin-neeto@1.0.49":
971
- version "1.0.49"
972
- resolved "https://registry.yarnpkg.com/@bigbinary/eslint-plugin-neeto/-/eslint-plugin-neeto-1.0.49.tgz#ffccd9d4eeba149a75678443a2b9a61261cbf377"
973
- integrity sha512-wfw29eDjijitPLZrbIuap6tffwT3ZnZKgQ1ZHJdUIkEiftcpI2DmIMwSqj4tpsoyDdn1KzGzwUpJSKF2q25brw==
970
+ "@bigbinary/eslint-plugin-neeto@1.0.50":
971
+ version "1.0.50"
972
+ resolved "https://registry.yarnpkg.com/@bigbinary/eslint-plugin-neeto/-/eslint-plugin-neeto-1.0.50.tgz#d5a518ef958d35f78a00ee7e6cf85cb679593e57"
973
+ integrity sha512-xQmLyj/QQ7EXtPHv51BGpHwUIgnbQmGZHJuvFQX5lOdOYAroRebnMzXXNwusY0Bs/aaWSJybrZjjvrE1G/Ldjg==
974
974
 
975
975
  "@bigbinary/neeto-commons-frontend@2.0.74":
976
976
  version "2.0.74"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neeto-commons-backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.107
4
+ version: 1.0.109
5
5
  platform: ruby
6
6
  authors:
7
7
  - Prasanth Chaduvula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-31 00:00:00.000000000 Z
11
+ date: 2023-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -302,9 +302,12 @@ files:
302
302
  - app/controllers/neeto_commons_backend/failures_controller.rb
303
303
  - app/controllers/neeto_commons_backend/health_check_controller.rb
304
304
  - app/controllers/neeto_commons_backend/well_knowns_controller.rb
305
+ - app/controllers/neeto_editor/api/v1/direct_uploads_controller.rb
305
306
  - app/mailers/neeto_commons_backend/application_mailer.rb
306
307
  - app/models/concerns/neeto_commons_backend/sluggable.rb
307
308
  - app/models/concerns/neeto_commons_backend/soft_deletable.rb
309
+ - app/models/neeto_editor.rb
310
+ - app/models/neeto_editor/asset.rb
308
311
  - app/services/neeto_commons_backend/sample_data/common/admin_service.rb
309
312
  - app/services/neeto_commons_backend/sample_data/common/app_organization_service.rb
310
313
  - app/services/neeto_commons_backend/sample_data/common/base.rb
@@ -457,6 +460,7 @@ files:
457
460
  - lib/neeto_commons_backend/routes/errors.rb
458
461
  - lib/neeto_commons_backend/routes/health.rb
459
462
  - lib/neeto_commons_backend/routes/letter_opener.rb
463
+ - lib/neeto_commons_backend/routes/neeto_editor.rb
460
464
  - lib/neeto_commons_backend/routes/sidekiq.rb
461
465
  - lib/neeto_commons_backend/routes/well_knowns.rb
462
466
  - lib/neeto_commons_backend/scripts/sync_with_wheel.sh