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.
- checksums.yaml +4 -4
- data/.codeship/setup.sh +16 -0
- data/.codeship/tests.sh +3 -0
- data/.gitignore +1 -0
- data/.overcommit.yml +1 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +19 -2
- data/Dockerfile +3 -5
- data/Gemfile.lock +188 -205
- data/README.md +7 -2
- data/app/controllers/concerns/lcms/engine/reimportable.rb +9 -2
- data/app/javascript/components/admin/picker/pickerWindowWrapper.jsx +1 -0
- data/app/models/lcms/engine/resource.rb +2 -2
- data/app/models/lcms/engine/search/repository.rb +1 -1
- data/config/initializers/elasticsearch.rb +2 -1
- data/lcms-engine.gemspec +5 -4
- data/lib/lcms/engine/version.rb +1 -1
- data/yarn.lock +1816 -1716
- metadata +28 -25
- data/docker-compose.ror4.yml +0 -32
data/README.md
CHANGED
@@ -199,7 +199,7 @@ $ brew cask install chromedriver
|
|
199
199
|
#### Using Docker
|
200
200
|
|
201
201
|
Launch the containers
|
202
|
-
```
|
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
|
-
```
|
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(
|
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
|
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
|
|
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(
|
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-
|
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.
|
62
|
-
s.add_dependency 'lt-lcms', '~> 0.
|
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'
|