lcms-engine 0.5.3 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -199,7 +199,7 @@ $ brew cask install chromedriver
199
199
  #### Using Docker
200
200
 
201
201
  Launch the containers
202
- ```sh
202
+ ```shell
203
203
  $ docker build -t lcms-engine .
204
204
  $ docker compose start
205
205
  $ docker compose exec app sh -c 'bin/rails db:create'
@@ -207,9 +207,14 @@ $ docker compose exec db sh -c "psql -U postgres -d template1 -c 'CREATE EXTENSI
207
207
  ```
208
208
 
209
209
  Start the specs
210
- ```sh
210
+ ```shell
211
211
  $ docker compose exec app sh -c 'bundle exec rspec'
212
212
  ```
213
213
 
214
+ In case you need to rebuild the image, use buildx command to create multi-arch image and push it to the registry
215
+ ```shell
216
+ docker buildx build --platform linux/arm64/v8,linux/amd64 -t learningtapestry/lcms-engine --push .
217
+ ```
218
+
214
219
  ## License
215
220
  The gem is available as open source under the terms of the [Apache License](https://github.com/learningtapestry/lcms-engine/blob/master/LICENSE).
@@ -26,11 +26,18 @@ module Lcms
26
26
 
27
27
  def prepare_result(job_class, jid)
28
28
  jid_res = job_class.fetch_result(jid)
29
- return jid_res if jid_res['ok']
29
+ return jid_res if jid_res&.[]('ok')
30
+
31
+ error =
32
+ if jid_res.present?
33
+ "<a href=\"#{jid_res['link']}\">Source</a>: #{jid_res['errors'].join(', ')}"
34
+ else
35
+ "Error fetching result for #{jid}"
36
+ end
30
37
 
31
38
  {
32
39
  ok: false,
33
- errors: Array.wrap("<a href=\"#{jid_res['link']}\">Source</a>: #{jid_res['errors'].join(', ')}")
40
+ errors: Array.wrap(error)
34
41
  }
35
42
  end
36
43
  end
@@ -3,6 +3,7 @@ import PaginationBoxView from '../../paginate/PaginationBoxView';
3
3
 
4
4
  // eslint-disable-next-line no-unused-vars
5
5
  function pickerWindowWrapper(WrappedComponent, path) {
6
+ // eslint-disable-next-line react/display-name
6
7
  return class extends React.Component {
7
8
  constructor(props) {
8
9
  super(props);
@@ -131,8 +131,8 @@ module Lcms
131
131
  end
132
132
 
133
133
  def where_metadata_in(key, arr)
134
- arr = Array.wrap arr
135
- clauses = Array.new(arr.count) { "metadata->>'#{key}' = ?" }.join(' OR ')
134
+ arr = Array.wrap(arr).compact.map(&:downcase)
135
+ clauses = Array.new(arr.count) { "lower(resources.metadata->>'#{key}') = ?" }.join(' OR ')
136
136
  where(clauses, *arr)
137
137
  end
138
138
  end
@@ -47,7 +47,7 @@ module Lcms
47
47
  include Elasticsearch::Persistence::Repository
48
48
  include Elasticsearch::Persistence::Repository::DSL
49
49
 
50
- client Elasticsearch::Client.new(host: ENV.fetch('ELASTICSEARCH_ADDRESS', nil))
50
+ client Elasticsearch::Client.new(host: ENV.fetch('ELASTICSEARCH_ADDRESS', nil), adapter: :net_http)
51
51
 
52
52
  index_name :"unbounded_documents_#{Rails.env}"
53
53
 
@@ -3,6 +3,7 @@
3
3
  require 'elasticsearch/model'
4
4
 
5
5
  Elasticsearch::Model.client = Elasticsearch::Client.new(
6
- host: ENV.fetch('ELASTICSEARCH_ADDRESS', nil)
6
+ host: ENV.fetch('ELASTICSEARCH_ADDRESS', nil),
7
+ adapter: :net_http
7
8
  )
8
9
  Hashie.logger = Logger.new('/dev/null')
data/lcms-engine.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.name = 'lcms-engine'
11
11
  s.version = Lcms::Engine::VERSION
12
12
  s.authors = ['Alexander Kuznetsov', 'Abraham Sánchez', 'Rômulo Saksida']
13
- s.email = %w(alexander@learningtapestry.com abraham@learningtapestry.com rm@learningtapestry.com)
13
+ s.email = %w(paranoic.san@gmail.com abraham@learningtapestry.com rm@learningtapestry.com)
14
14
  s.homepage = 'https://github.com/learningtapestry/lcms-engine'
15
15
  s.summary = 'Rails engine for LCMS applications'
16
16
  s.description = 'Implements common components and features for Rails-based LCMS systems'
@@ -52,14 +52,15 @@ Gem::Specification.new do |s|
52
52
  s.add_dependency 'fog-aws', '~> 3.5', '>= 3.5.2'
53
53
  s.add_dependency 'font-awesome-sass', '~> 5.12'
54
54
  s.add_dependency 'foundation-rails', '~> 6.6', '>= 6.6.1'
55
- s.add_dependency 'google-api-client', '< 1'
55
+ s.add_dependency 'google-apis-drive_v3', '~> 0.46'
56
+ s.add_dependency 'google-apis-script_v1', '~> 0.21'
56
57
  s.add_dependency 'hiredis', '~> 0.6.3'
57
58
  s.add_dependency 'httparty', '~> 0.18'
58
59
  s.add_dependency 'jbuilder', '~> 2.10'
59
60
  s.add_dependency 'jquery-rails', '~> 4.3', '>= 4.3.5'
60
61
  s.add_dependency 'js-routes', '~> 1.4', '>= 1.4.9'
61
- s.add_dependency 'lt-google-api', '~> 0.2', '>= 0.2.3'
62
- s.add_dependency 'lt-lcms', '~> 0.4', '>= 0.4.4'
62
+ s.add_dependency 'lt-google-api', '~> 0.3'
63
+ s.add_dependency 'lt-lcms', '~> 0.6'
63
64
  s.add_dependency 'migration_data', '~> 0.6'
64
65
  s.add_dependency 'mini_magick', '~> 4.10', '>= 4.10.1'
65
66
  s.add_dependency 'nested_form', '~> 0.3.2'
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Lcms
4
4
  module Engine
5
- VERSION = '0.5.3'
5
+ VERSION = '0.5.5'
6
6
  RAILS_5_VERSION = 5.2
7
7
  end
8
8
  end