rest-ftp-daemon 0.247.0 → 0.247.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -69
- data/Gemfile.lock +1 -1
- data/lib/rest-ftp-daemon/api/jobs.rb +3 -11
- data/lib/rest-ftp-daemon/constants.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09ad0a98b4d033900852d99282cf2e8e259a25df
|
4
|
+
data.tar.gz: 9e10478bbf7e263fcbbeeb1720d5d9ea54a9518a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8282173e27456be64a164bc83d58f157dd6351b227121d4f4a53ae1e59bc36e875e52d9404d078a04e14697e1bc320eae23c28679e0706c969dd23f5d6b16b64
|
7
|
+
data.tar.gz: cda917f1dfd9e26260aee4679f708399dc9088e7e36fb4c873dfc3ff1c7c9a742d78df5893b95fe2641fbfef6fdab4d9583a745b8c2eec8954707b222177c599
|
data/.rubocop.yml
CHANGED
@@ -28,9 +28,6 @@ AllCops:
|
|
28
28
|
- 'vendor/**/*'
|
29
29
|
- 'DOC/**/*'
|
30
30
|
- '**/actors/*'
|
31
|
-
# By default, the rails cops are not run. Override in project or home
|
32
|
-
# directory .rubocop.yml files, or by giving the -R/--rails option.
|
33
|
-
RunRailsCops: false
|
34
31
|
# Cop names are not displayed in offense messages by default. Change behavior
|
35
32
|
# by overriding DisplayCopNames, or by giving the -D/--display-cop-names
|
36
33
|
# option.
|
@@ -618,7 +615,7 @@ Style/SpaceAroundEqualsInParameterDefault:
|
|
618
615
|
- no_space
|
619
616
|
|
620
617
|
Style/SpaceAroundOperators:
|
621
|
-
|
618
|
+
AllowForAlignment:
|
622
619
|
- '='
|
623
620
|
- '=>'
|
624
621
|
|
@@ -657,7 +654,7 @@ Style/TrailingBlankLines:
|
|
657
654
|
- final_newline
|
658
655
|
- final_blank_line
|
659
656
|
|
660
|
-
Style/
|
657
|
+
Style/TrailingCommaInLiteral:
|
661
658
|
# If EnforcedStyleForMultiline is comma, the cop requires a comma after the
|
662
659
|
# last item of a list, but only for lists where each item is on its own line.
|
663
660
|
# If EnforcedStyleForMultiline is consistent_comma, the cop requires a comma
|
@@ -795,67 +792,3 @@ Lint/DefEndAlignment:
|
|
795
792
|
- start_of_line
|
796
793
|
- def
|
797
794
|
AutoCorrect: false
|
798
|
-
|
799
|
-
##################### Rails ##################################
|
800
|
-
|
801
|
-
Rails/ActionFilter:
|
802
|
-
EnforcedStyle: action
|
803
|
-
SupportedStyles:
|
804
|
-
- action
|
805
|
-
- filter
|
806
|
-
Include:
|
807
|
-
- app/controllers/**/*.rb
|
808
|
-
|
809
|
-
Rails/Date:
|
810
|
-
# The value `always` disallows usage of `Date.today`, `Date.current`,
|
811
|
-
# `Date#to_time` etc.
|
812
|
-
# The value `acceptable` allows usage of `Date.current`, `Date.yesterday`, etc
|
813
|
-
# (but not `Date.today`) which are overriden by ActiveSupport to handle current
|
814
|
-
# time zone.
|
815
|
-
EnforcedStyle: always
|
816
|
-
SupportedStyles:
|
817
|
-
- always
|
818
|
-
- acceptable
|
819
|
-
|
820
|
-
Rails/DefaultScope:
|
821
|
-
Include:
|
822
|
-
- app/models/**/*.rb
|
823
|
-
|
824
|
-
Rails/FindBy:
|
825
|
-
Include:
|
826
|
-
- app/models/**/*.rb
|
827
|
-
|
828
|
-
Rails/FindEach:
|
829
|
-
Include:
|
830
|
-
- app/models/**/*.rb
|
831
|
-
|
832
|
-
Rails/HasAndBelongsToMany:
|
833
|
-
Include:
|
834
|
-
- app/models/**/*.rb
|
835
|
-
|
836
|
-
Rails/Output:
|
837
|
-
Include:
|
838
|
-
- app/**/*.rb
|
839
|
-
- config/**/*.rb
|
840
|
-
- db/**/*.rb
|
841
|
-
- lib/**/*.rb
|
842
|
-
|
843
|
-
Rails/ReadWriteAttribute:
|
844
|
-
Include:
|
845
|
-
- app/models/**/*.rb
|
846
|
-
|
847
|
-
Rails/ScopeArgs:
|
848
|
-
Include:
|
849
|
-
- app/models/**/*.rb
|
850
|
-
|
851
|
-
Rails/TimeZone:
|
852
|
-
# The value `always` means that `Time` should be used with `zone`.
|
853
|
-
# The value `acceptable` allows usage of `in_time_zone` instead of `zone`.
|
854
|
-
EnforcedStyle: always
|
855
|
-
SupportedStyles:
|
856
|
-
- always
|
857
|
-
- acceptable
|
858
|
-
|
859
|
-
Rails/Validation:
|
860
|
-
Include:
|
861
|
-
- app/models/**/*.rb
|
data/Gemfile.lock
CHANGED
@@ -23,21 +23,13 @@ module RestFtpDaemon
|
|
23
23
|
|
24
24
|
desc "Read job with ID"
|
25
25
|
params do
|
26
|
-
requires :id, type: String, desc: "ID of the Job to read"
|
26
|
+
requires :id, type: String, desc: "ID of the Job to read"
|
27
27
|
end
|
28
|
-
get "
|
28
|
+
get "/:id", requirements: { id: /.*/ } do
|
29
29
|
begin
|
30
30
|
# Get job to display
|
31
31
|
raise RestFtpDaemon::JobNotFound if params[:id].nil?
|
32
|
-
|
33
|
-
# Find using matched parts
|
34
|
-
if params[:format]
|
35
|
-
job = $queue.find_by_id("#{params[:id]}.#{params[:format]}", false)
|
36
|
-
else
|
37
|
-
job = $queue.find_by_id(params[:id], true)
|
38
|
-
end
|
39
|
-
|
40
|
-
# Fail if none found
|
32
|
+
job = $queue.find_by_id(params[:id]) || $queue.find_by_id(params[:id], true)
|
41
33
|
raise RestFtpDaemon::JobNotFound if job.nil?
|
42
34
|
|
43
35
|
rescue RestFtpDaemon::JobNotFound => exception
|