peak_flow_utils 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/handlers/peak_flow_utils/devise_handler.rb +2 -2
- data/app/services/peak_flow_utils/database_initializer_service.rb +1 -1
- data/app/services/peak_flow_utils/handlers_finder_service.rb +1 -1
- data/app/services/peak_flow_utils/model_inspector.rb +1 -1
- data/app/services/peak_flow_utils/translations_parser_service.rb +1 -1
- data/lib/peak_flow_utils/rspec_helper.rb +6 -2
- data/lib/peak_flow_utils/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: def8657575651d82bd17a2a147cb6168e0f203d60b79baeb5a6174f0b2c5e7e9
|
4
|
+
data.tar.gz: a669cb340a9eb3a2d1258027214a12636248c06760f8db31736c37debb342fd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34025fc9eb4b72bd82bd94a23e239271aadf02364356a9c7cb9d8d14d354f0a7ad5534ab1fdcc7accb63a32635d15bd6f7fcd79e59b05be337390698cb0569aa
|
7
|
+
data.tar.gz: 13908a5163f27a93d77cdd3a6d596ac215ad3ecb6dca124afede8e737256849857ebd7fffd0c96e712c601bc3e03502538ae4ff5076ba37cf1d32a1d221fa59b
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# rubocop:disable
|
1
|
+
# rubocop:disable Layout/LineLength
|
2
2
|
class PeakFlowUtils::DeviseHandler < PeakFlowUtils::ApplicationHandler
|
3
3
|
def enabled?
|
4
4
|
::Object.const_defined?(:Devise)
|
@@ -123,4 +123,4 @@ private
|
|
123
123
|
}
|
124
124
|
end
|
125
125
|
end
|
126
|
-
# rubocop:enable
|
126
|
+
# rubocop:enable Layout/LineLength
|
@@ -122,7 +122,7 @@ class PeakFlowUtils::ModelInspector
|
|
122
122
|
|
123
123
|
# Loads models for the given app-directory (Rails-root or engine).
|
124
124
|
def self.load_models_for(root)
|
125
|
-
Dir.glob("#{root}/app/models/**/*.rb") do |model_path|
|
125
|
+
Dir.glob("#{root}/app/models/**/*.rb").sort.each do |model_path|
|
126
126
|
require model_path
|
127
127
|
rescue StandardError => e
|
128
128
|
warn "Could not load model in #{model_path}"
|
@@ -59,8 +59,6 @@ class PeakFlowUtils::RspecHelper
|
|
59
59
|
def group_files
|
60
60
|
return @group_files if @group_files
|
61
61
|
|
62
|
-
# Sort them so that they are sorted by file path in three groups so each group have an equal amount of controller specs, features specs and so on
|
63
|
-
|
64
62
|
sorted_files.each do |file|
|
65
63
|
file_path = file.fetch(:path)
|
66
64
|
file_data = example_file(file_path) if example_data_exists?
|
@@ -105,6 +103,7 @@ class PeakFlowUtils::RspecHelper
|
|
105
103
|
end
|
106
104
|
end
|
107
105
|
|
106
|
+
# Sort them so that they are sorted by file path in three groups so each group have an equal amount of controller specs, features specs and so on
|
108
107
|
def sorted_files
|
109
108
|
files.values.sort do |file1, file2|
|
110
109
|
file1_path = file1.fetch(:path)
|
@@ -125,6 +124,11 @@ class PeakFlowUtils::RspecHelper
|
|
125
124
|
value2 = file2.fetch(:points)
|
126
125
|
end
|
127
126
|
|
127
|
+
if value1 == value2
|
128
|
+
value2 = file1_path
|
129
|
+
value1 = file2_path
|
130
|
+
end
|
131
|
+
|
128
132
|
value2 <=> value1
|
129
133
|
end
|
130
134
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: peak_flow_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kaspernj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
189
|
- !ruby/object:Gem::Version
|
190
190
|
version: '0'
|
191
191
|
requirements: []
|
192
|
-
rubygems_version: 3.
|
192
|
+
rubygems_version: 3.0.6
|
193
193
|
signing_key:
|
194
194
|
specification_version: 4
|
195
195
|
summary: Utilities to be used with PeakFlow.
|