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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8331268ab7ca65fe644bc7c0cb9e883117c99b01fe6e3d34daf9dec4af27d06b
4
- data.tar.gz: 34e18fd3e3ce075b58bbc1c2fdec0609f129a66be36c56a6e8b1505440af24a4
3
+ metadata.gz: def8657575651d82bd17a2a147cb6168e0f203d60b79baeb5a6174f0b2c5e7e9
4
+ data.tar.gz: a669cb340a9eb3a2d1258027214a12636248c06760f8db31736c37debb342fd6
5
5
  SHA512:
6
- metadata.gz: 0edc2059a781d7ae3f826a798961b324a72dde0d82e509416b6088c4536b91d19fddfce6eeae9a7fd486db8a472941ac479d861ff34e1b97220ff7597fa9dd37
7
- data.tar.gz: 5178465585583b4c21cf76ab9c1cd7d928e08fcfe564df2a35a81543ec26a6650f8f5af10dd8987e00242bdacc63125bcf95f3d6afc74c7d94e30e5b0026a25e
6
+ metadata.gz: 34025fc9eb4b72bd82bd94a23e239271aadf02364356a9c7cb9d8d14d354f0a7ad5534ab1fdcc7accb63a32635d15bd6f7fcd79e59b05be337390698cb0569aa
7
+ data.tar.gz: 13908a5163f27a93d77cdd3a6d596ac215ad3ecb6dca124afede8e737256849857ebd7fffd0c96e712c601bc3e03502538ae4ff5076ba37cf1d32a1d221fa59b
@@ -1,4 +1,4 @@
1
- # rubocop:disable Metrics/LineLength
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 Metrics/LineLength
126
+ # rubocop:enable Layout/LineLength
@@ -16,7 +16,7 @@ class PeakFlowUtils::DatabaseInitializerService < PeakFlowUtils::ApplicationServ
16
16
  register_migration_migrated(version)
17
17
  end
18
18
 
19
- ServicePattern::Response.new(success: true)
19
+ succeed!
20
20
  end
21
21
 
22
22
  private
@@ -20,6 +20,6 @@ class PeakFlowUtils::HandlersFinderService < PeakFlowUtils::ApplicationService
20
20
  handlers << handler if handler.instance.enabled?
21
21
  end
22
22
 
23
- ServicePattern::Response.new(result: handlers)
23
+ succeed! handlers
24
24
  end
25
25
  end
@@ -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}"
@@ -9,7 +9,7 @@ class PeakFlowUtils::TranslationsParserService < PeakFlowUtils::ApplicationServi
9
9
 
10
10
  clean_up_not_found
11
11
 
12
- ServicePattern::Response.new(success: true)
12
+ succeed!
13
13
  end
14
14
 
15
15
  def with_transactioner
@@ -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
@@ -1,3 +1,3 @@
1
1
  module PeakFlowUtils
2
- VERSION = "0.1.6".freeze
2
+ VERSION = "0.1.7".freeze
3
3
  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.6
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: 2019-12-17 00:00:00.000000000 Z
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.1.1
192
+ rubygems_version: 3.0.6
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: Utilities to be used with PeakFlow.