Skip to content

Commit

Permalink
Merge pull request #12 from AndyObtiva/development
Browse files Browse the repository at this point in the history
Upgrade to glimmer-dsl-libui 0.11.5 / Remove inverse-translation hack
  • Loading branch information
mperham authored Nov 29, 2023
2 parents dde44d4 + c56e0e5 commit ffd166d
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "glimmer-dsl-libui", "= 0.11.4"
gem "glimmer-dsl-libui", "= 0.11.5"
gem "sidekiq"
gem "chronic_duration", ">= 0.10.6", "< 2.0.0"

Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ GEM
glimmer (2.7.3)
array_include_methods (~> 1.4.0)
facets (>= 3.1.0, < 4.0.0)
glimmer-dsl-libui (0.11.4)
glimmer-dsl-libui (0.11.5)
chunky_png (~> 1.4.0)
color (~> 1.8)
equalizer (= 0.0.11)
Expand Down Expand Up @@ -118,7 +118,7 @@ PLATFORMS

DEPENDENCIES
chronic_duration (>= 0.10.6, < 2.0.0)
glimmer-dsl-libui (= 0.11.4)
glimmer-dsl-libui (= 0.11.5)
minitest
rake
sidekiq
Expand Down
2 changes: 1 addition & 1 deletion kuiq.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]

# Uncomment to register a new dependency of your gem
spec.add_dependency "glimmer-dsl-libui", "= 0.11.4"
spec.add_dependency "glimmer-dsl-libui", "= 0.11.5"
spec.add_dependency "sidekiq", "~> 7.2"
spec.add_dependency "chronic_duration", ">= 0.10.6", "< 2.0.0"
end
6 changes: 0 additions & 6 deletions lib/kuiq/model/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,12 @@ def sorted_entry

def respond_to_missing?(method_name, include_private = false)
super ||
redis_hash.include?(it(method_name.to_s.capitalize).downcase) ||
redis_hash.include?(method_name.to_s)
end

def method_missing(method_name, *args, &block)
inverse_translated_method_name = it(method_name.to_s.capitalize).underscore
if redis_hash.include?(method_name.to_s)
redis_hash[method_name.to_s].to_s
elsif respond_to?(inverse_translated_method_name) && !redis_hash.include?(inverse_translated_method_name)
send(inverse_translated_method_name)
elsif redis_hash.include?(inverse_translated_method_name)
redis_hash[inverse_translated_method_name].to_s
else
super
end
Expand Down
10 changes: 9 additions & 1 deletion lib/kuiq/view/morgue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ class Morgue
text_column(t("Arguments"))
text_column(t("Error"))

cell_rows job_manager.dead_jobs
cell_rows <= [job_manager, :dead_jobs,
column_attributes: {
t("When") => :when,
t("Queue") => :queue,
t("Job") => :job,
t("Arguments") => :arguments,
t("Error") => :error,
}
]
}

horizontal_separator {
Expand Down
11 changes: 10 additions & 1 deletion lib/kuiq/view/retries_table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@ class RetriesTable
text_column(t("Arguments"))
text_column(t("Error"))

cell_rows job_manager.retried_jobs
cell_rows <= [job_manager, :retried_jobs,
column_attributes: {
t("NextRetry") => :next_retry,
t("RetryCount") => :retry_count,
t("Queue") => :queue,
t("Job") => :job,
t("Arguments") => :arguments,
t("Error") => :error,
}
]
}
}
end
Expand Down
10 changes: 9 additions & 1 deletion lib/kuiq/view/scheduled_table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ class ScheduledTable
text_column(t("Job"))
text_column(t("Arguments"))

cell_rows job_manager.scheduled_jobs
cell_rows <= [job_manager, :scheduled_jobs,
column_attributes: {
t("When") => :when,
t("Queue") => :queue,
t("Job") => :job,
t("Arguments") => :arguments,
}
]

}
}
end
Expand Down

0 comments on commit ffd166d

Please sign in to comment.