flutter 0.1.0.pre.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.overcommit.yml +8 -0
- data/.rubocop.yml +10 -0
- data/CHANGELOG.md +6 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +35 -0
- data/Guardfile +9 -0
- data/LICENSE.txt +21 -0
- data/README.md +134 -0
- data/Rakefile +24 -0
- data/TODO.md +30 -0
- data/integration_tests/minitest/grape_app/.gitignore +67 -0
- data/integration_tests/minitest/grape_app/.ruby-version +1 -0
- data/integration_tests/minitest/grape_app/Gemfile +17 -0
- data/integration_tests/minitest/grape_app/Gemfile.lock +89 -0
- data/integration_tests/minitest/grape_app/README.md +2 -0
- data/integration_tests/minitest/grape_app/Rakefile +9 -0
- data/integration_tests/minitest/grape_app/api/api.rb +34 -0
- data/integration_tests/minitest/grape_app/api/routes/api_helpers.rb +12 -0
- data/integration_tests/minitest/grape_app/api/routes/change_request/api.rb +69 -0
- data/integration_tests/minitest/grape_app/api/routes/change_request/response_entity.rb +18 -0
- data/integration_tests/minitest/grape_app/api/routes/event/api.rb +121 -0
- data/integration_tests/minitest/grape_app/api/routes/event/response_entity.rb +41 -0
- data/integration_tests/minitest/grape_app/api/routes/project/api.rb +59 -0
- data/integration_tests/minitest/grape_app/api/routes/project/response_entity.rb +13 -0
- data/integration_tests/minitest/grape_app/api/routes/property/api.rb +78 -0
- data/integration_tests/minitest/grape_app/api/routes/property/response_entity.rb +31 -0
- data/integration_tests/minitest/grape_app/api/routes/trackable_object/api.rb +64 -0
- data/integration_tests/minitest/grape_app/api/routes/trackable_object/response_entity.rb +24 -0
- data/integration_tests/minitest/grape_app/api/routes/tracking_spec/api.rb +88 -0
- data/integration_tests/minitest/grape_app/api/routes/tracking_spec/response_entity.rb +17 -0
- data/integration_tests/minitest/grape_app/api/routes/tracking_spec/spec_response.rb +19 -0
- data/integration_tests/minitest/grape_app/api/routes/user/api.rb +22 -0
- data/integration_tests/minitest/grape_app/api/routes/user/response_entity.rb +12 -0
- data/integration_tests/minitest/grape_app/app/app.rb +30 -0
- data/integration_tests/minitest/grape_app/app/change_request/endpoint.rb +24 -0
- data/integration_tests/minitest/grape_app/app/change_request/generate_system_changes.rb +25 -0
- data/integration_tests/minitest/grape_app/app/change_request/service.rb +79 -0
- data/integration_tests/minitest/grape_app/app/event/endpoint.rb +78 -0
- data/integration_tests/minitest/grape_app/app/event/service.rb +68 -0
- data/integration_tests/minitest/grape_app/app/event/validator.rb +108 -0
- data/integration_tests/minitest/grape_app/app/project/endpoint.rb +24 -0
- data/integration_tests/minitest/grape_app/app/project/service.rb +42 -0
- data/integration_tests/minitest/grape_app/app/property/endpoint.rb +39 -0
- data/integration_tests/minitest/grape_app/app/property/service.rb +56 -0
- data/integration_tests/minitest/grape_app/app/trackable_object/endpoint.rb +38 -0
- data/integration_tests/minitest/grape_app/app/trackable_object/service.rb +49 -0
- data/integration_tests/minitest/grape_app/app/trackable_object/validator.rb +40 -0
- data/integration_tests/minitest/grape_app/app/tracking_spec/endpoint.rb +58 -0
- data/integration_tests/minitest/grape_app/app/tracking_spec/expand_tracking_spec_events.rb +91 -0
- data/integration_tests/minitest/grape_app/app/tracking_spec/service.rb +51 -0
- data/integration_tests/minitest/grape_app/app/tracking_spec/validator.rb +61 -0
- data/integration_tests/minitest/grape_app/app/utils/errors/api_exceptions.rb +10 -0
- data/integration_tests/minitest/grape_app/app/utils/errors/service_exceptions.rb +12 -0
- data/integration_tests/minitest/grape_app/app/versioned_entity/entity.rb +110 -0
- data/integration_tests/minitest/grape_app/app/versioned_entity/service.rb +47 -0
- data/integration_tests/minitest/grape_app/app/versioned_entity/validator.rb +61 -0
- data/integration_tests/minitest/grape_app/app/versioned_entity_snapshot/entity.rb +32 -0
- data/integration_tests/minitest/grape_app/config/boot.rb +9 -0
- data/integration_tests/minitest/grape_app/config.ru +3 -0
- data/integration_tests/minitest/grape_app/db/proto/change_request.rb +10 -0
- data/integration_tests/minitest/grape_app/db/proto/common/doc.rb +86 -0
- data/integration_tests/minitest/grape_app/db/proto/event.rb +10 -0
- data/integration_tests/minitest/grape_app/db/proto/event_snapshot.rb +10 -0
- data/integration_tests/minitest/grape_app/db/proto/project.rb +21 -0
- data/integration_tests/minitest/grape_app/db/proto/property.rb +10 -0
- data/integration_tests/minitest/grape_app/db/proto/property_snapshot.rb +10 -0
- data/integration_tests/minitest/grape_app/db/proto/trackable_object.rb +10 -0
- data/integration_tests/minitest/grape_app/db/proto/trackable_object_snapshot.rb +10 -0
- data/integration_tests/minitest/grape_app/db/proto/tracking_spec.rb +10 -0
- data/integration_tests/minitest/grape_app/test/api/functional/event_test.rb +186 -0
- data/integration_tests/minitest/grape_app/test/api/functional/property_test.rb +197 -0
- data/integration_tests/minitest/grape_app/test/api/functional/trackable_object_test.rb +134 -0
- data/integration_tests/minitest/grape_app/test/api/functional/tracking_spec_test.rb +56 -0
- data/integration_tests/minitest/grape_app/test/api/functional/user_test.rb +24 -0
- data/integration_tests/minitest/grape_app/test/api/functional/versioned_entity_helper.rb +157 -0
- data/integration_tests/minitest/grape_app/test/fixtures/change_requests.rb +83 -0
- data/integration_tests/minitest/grape_app/test/fixtures/event_snapshots.rb +105 -0
- data/integration_tests/minitest/grape_app/test/fixtures/events.rb +58 -0
- data/integration_tests/minitest/grape_app/test/fixtures/properties.rb +66 -0
- data/integration_tests/minitest/grape_app/test/fixtures/property_snapshots.rb +124 -0
- data/integration_tests/minitest/grape_app/test/fixtures/sample_tracking_spec.json +125 -0
- data/integration_tests/minitest/grape_app/test/fixtures/trackable_objects.rb +58 -0
- data/integration_tests/minitest/grape_app/test/fixtures/trackable_objects_snapshots.rb +61 -0
- data/integration_tests/minitest/grape_app/test/fixtures/tracking_specs.rb +22 -0
- data/integration_tests/minitest/grape_app/test/test_helper.rb +15 -0
- data/lib/flutter/config.rb +24 -0
- data/lib/flutter/minitest.rb +83 -0
- data/lib/flutter/parser.rb +82 -0
- data/lib/flutter/persistence.rb +152 -0
- data/lib/flutter/rspec.rb +66 -0
- data/lib/flutter/tracker.rb +133 -0
- data/lib/flutter/version.rb +5 -0
- data/lib/flutter.rb +12 -0
- data/lib/minitest/flutter_plugin.rb +16 -0
- data/sig/flutter.rbs +4 -0
- metadata +187 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "fileutils"
|
|
4
|
+
require "set"
|
|
5
|
+
module Flutter
|
|
6
|
+
module Persistence
|
|
7
|
+
class AbstractStorage
|
|
8
|
+
def initialize
|
|
9
|
+
load!
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# :nocov:
|
|
13
|
+
def test_mapping
|
|
14
|
+
raise NotImplementedError
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def source_mapping
|
|
18
|
+
raise NotImplementedError
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def update_test_mapping!(mapping)
|
|
22
|
+
raise NotImplementedError
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def update_source_mapping!(mapping)
|
|
26
|
+
raise NotImplementedError
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def persist!(updates)
|
|
30
|
+
raise NotImplementedError
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def to_s
|
|
34
|
+
raise NotImplementedError
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def clear!
|
|
38
|
+
raise NotImplementedError
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def load!
|
|
42
|
+
raise NotImplementedError
|
|
43
|
+
end
|
|
44
|
+
# :nocov:
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
class Yaml < AbstractStorage
|
|
48
|
+
require "yaml"
|
|
49
|
+
# ruby >= 3.1 requires this
|
|
50
|
+
YAML_LOAD_OPTS = RUBY_VERSION > "3.1" ? { permitted_classes: [Hash, Set, Symbol] } : {}
|
|
51
|
+
def initialize(path:)
|
|
52
|
+
@path = File.absolute_path(path)
|
|
53
|
+
@full_path = File.join(@path, "state.yml")
|
|
54
|
+
@state = { test_mapping: {}, source_mapping: {} }
|
|
55
|
+
super()
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def load!
|
|
59
|
+
if File.exist?(@full_path)
|
|
60
|
+
persisted = YAML.load(File.read(@full_path), **YAML_LOAD_OPTS)
|
|
61
|
+
@state.update(persisted) if persisted
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def test_mapping
|
|
66
|
+
@state.fetch(:test_mapping) { @state[:test_mapping] = {} }
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def source_mapping
|
|
70
|
+
@state.fetch(:source_mapping) { @state[:source_mapping] = {} }
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def update_test_mapping!(mapping)
|
|
74
|
+
test_mapping.merge!(mapping)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def update_source_mapping!(mapping)
|
|
78
|
+
source_mapping.merge!(mapping)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def clear!
|
|
82
|
+
FileUtils.rm(@full_path) if File.exist?(@full_path)
|
|
83
|
+
@state.clear
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def persist!
|
|
87
|
+
FileUtils.mkdir_p(@path) unless File.exist?(@path)
|
|
88
|
+
File.open(@full_path, "w") { |file| file.write(@state.to_yaml) }
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def to_s
|
|
92
|
+
"state: #{@full_path}"
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
class Marshal < AbstractStorage
|
|
97
|
+
require "pstore"
|
|
98
|
+
def initialize(path:)
|
|
99
|
+
@path = File.absolute_path(path)
|
|
100
|
+
FileUtils.mkdir_p(@path) unless File.exist?(@path)
|
|
101
|
+
@full_path = File.join(@path, "state.pstore")
|
|
102
|
+
@state = nil
|
|
103
|
+
super()
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def load!
|
|
107
|
+
@state = PStore.new(@full_path)
|
|
108
|
+
@state.transaction do
|
|
109
|
+
@state[:test_mapping] ||= {}
|
|
110
|
+
@state[:source_mapping] ||= {}
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
def test_mapping
|
|
115
|
+
@state.transaction do
|
|
116
|
+
return @state[:test_mapping]
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
def source_mapping
|
|
121
|
+
@state.transaction do
|
|
122
|
+
return @state[:source_mapping]
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
def update_test_mapping!(mapping)
|
|
127
|
+
@state.transaction do
|
|
128
|
+
@state[:test_mapping] ||= {}
|
|
129
|
+
@state[:test_mapping].merge!(mapping)
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
def update_source_mapping!(mapping)
|
|
134
|
+
@state.transaction do
|
|
135
|
+
@state[:source_mapping] ||= {}
|
|
136
|
+
@state[:source_mapping].merge!(mapping)
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
def clear!
|
|
141
|
+
FileUtils.rm(@full_path) if File.exist?(@full_path)
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
def persist!
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
def to_s
|
|
148
|
+
"state: #{@full_path}"
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "tracker"
|
|
4
|
+
|
|
5
|
+
module Flutter
|
|
6
|
+
module RSpec
|
|
7
|
+
class << self
|
|
8
|
+
attr_accessor :filtered
|
|
9
|
+
|
|
10
|
+
def tracker
|
|
11
|
+
@tracker ||= Flutter::Tracker.new(
|
|
12
|
+
Flutter.config.sources, Flutter.config.exclusions,
|
|
13
|
+
Flutter.config.storage_class, Flutter.config.storage_options
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
module ClassMethods
|
|
19
|
+
def filtered_examples
|
|
20
|
+
Flutter::RSpec.filtered ||= 0
|
|
21
|
+
Flutter::RSpec.tracker.reset! if Flutter.enabled && Flutter.config.reset_storage
|
|
22
|
+
|
|
23
|
+
original = super
|
|
24
|
+
return original unless Flutter.enabled
|
|
25
|
+
|
|
26
|
+
original.select do |example|
|
|
27
|
+
skip = example.metadata[:block] && Flutter::RSpec.tracker.skip?(
|
|
28
|
+
example.full_description,
|
|
29
|
+
example.metadata[:absolute_file_path],
|
|
30
|
+
example.metadata[:block].source,
|
|
31
|
+
)
|
|
32
|
+
Flutter::RSpec.filtered += 1 if skip
|
|
33
|
+
!skip
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
module RSpec
|
|
41
|
+
module Core
|
|
42
|
+
class ExampleGroup
|
|
43
|
+
class << self
|
|
44
|
+
prepend Flutter::RSpec::ClassMethods
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
if defined?(RSpec.configure)
|
|
51
|
+
RSpec.configure do |config|
|
|
52
|
+
config.around(:each) do |example|
|
|
53
|
+
Flutter::RSpec.tracker.start(example.full_description) if Flutter.enabled
|
|
54
|
+
example.run
|
|
55
|
+
Flutter::RSpec.tracker.stop if Flutter.enabled
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
config.after(:suite) do
|
|
59
|
+
if Flutter.enabled
|
|
60
|
+
$stdout.puts
|
|
61
|
+
$stdout.puts "Flutter filtered out #{Flutter::RSpec.filtered} examples"
|
|
62
|
+
Flutter::RSpec.tracker.persist!
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "deep_merge"
|
|
4
|
+
require "set"
|
|
5
|
+
require_relative "persistence"
|
|
6
|
+
require_relative "parser"
|
|
7
|
+
require "pry"
|
|
8
|
+
|
|
9
|
+
module Flutter
|
|
10
|
+
class Tracker
|
|
11
|
+
attr_reader :test_mapping, :source_mapping
|
|
12
|
+
|
|
13
|
+
def initialize(sources, exclusions, storage_class, storage_options)
|
|
14
|
+
@sources = sources.map { |s| File.absolute_path(s) }
|
|
15
|
+
@exclusions = exclusions.map { |s| File.absolute_path(s) }
|
|
16
|
+
@storage = storage_class.new(**storage_options)
|
|
17
|
+
@test_mapping = @storage.test_mapping
|
|
18
|
+
@test_source_mapping = {}
|
|
19
|
+
@source_mapping = @storage.source_mapping
|
|
20
|
+
@current_source_mapping = {}
|
|
21
|
+
@path_mapping = {}
|
|
22
|
+
@method_prefixes = {}
|
|
23
|
+
@tracked_files = {}
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Resets the in-memory test_mapping for each test, and stores the methods that
|
|
27
|
+
# the test calls in the in-memory test_mapping
|
|
28
|
+
def start(test)
|
|
29
|
+
# Delete test from the in-memory mapping to allow each new test run
|
|
30
|
+
# to store all the functions that the test calls into
|
|
31
|
+
@test_mapping.delete(test)
|
|
32
|
+
@current_tracepoint = TracePoint.new(:call) do |tp|
|
|
33
|
+
hit!(test, tp)
|
|
34
|
+
end
|
|
35
|
+
@current_tracepoint&.enable
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def stop
|
|
39
|
+
@current_tracepoint&.disable
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def skip?(test, test_location, test_source)
|
|
43
|
+
test_location_rel = relative_path(test_location)
|
|
44
|
+
@test_source_mapping.fetch(test_location_rel) do
|
|
45
|
+
@test_source_mapping[test_location_rel] = {}
|
|
46
|
+
end[test] = Digest::SHA1.hexdigest(test_source)
|
|
47
|
+
return false unless
|
|
48
|
+
@test_mapping.key?(test) && @test_source_mapping[test_location_rel][test] == @source_mapping.dig(
|
|
49
|
+
test_location_rel, test
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
sources = @test_mapping[test]
|
|
53
|
+
sources.map do |file, methods|
|
|
54
|
+
@current_source_mapping[file] ||= Flutter::Parser.new(file).signatures
|
|
55
|
+
methods.map do |method|
|
|
56
|
+
@source_mapping.dig(file, method) == @current_source_mapping.dig(file, method)
|
|
57
|
+
end.all?
|
|
58
|
+
end.all?
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def persist!
|
|
62
|
+
@storage.update_test_mapping!(@test_mapping)
|
|
63
|
+
@storage.update_source_mapping!(generate_source_mapping)
|
|
64
|
+
@storage.persist!
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def reset!
|
|
68
|
+
@storage.clear!
|
|
69
|
+
@source_mapping.clear
|
|
70
|
+
@test_mapping.clear
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def to_s
|
|
74
|
+
@storage.to_s
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
attr_reader :mapping
|
|
78
|
+
|
|
79
|
+
private
|
|
80
|
+
|
|
81
|
+
def hit!(test, tracepoint)
|
|
82
|
+
return unless File.exist?(tracepoint.path)
|
|
83
|
+
|
|
84
|
+
if tracked?(tracepoint.path, tracepoint.callee_id)
|
|
85
|
+
rel_path = relative_path(tracepoint.path)
|
|
86
|
+
prefix = method_prefix(tracepoint.defined_class)
|
|
87
|
+
@test_mapping.fetch(test) do
|
|
88
|
+
@test_mapping[test] = {}
|
|
89
|
+
end.fetch(rel_path) { @test_mapping[test][rel_path] = Set.new } << (
|
|
90
|
+
prefix ? "#{prefix}#{tracepoint.callee_id}" : tracepoint.callee_id
|
|
91
|
+
)
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def relative_path(file)
|
|
96
|
+
@path_mapping[file] ||= Pathname.new(file).relative_path_from(Dir.pwd).to_s
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
##
|
|
100
|
+
# Returns a prefix based on Tracepoint.defined_class
|
|
101
|
+
#
|
|
102
|
+
# @param [Class] tracepoint_class
|
|
103
|
+
# @return [String]
|
|
104
|
+
#
|
|
105
|
+
def method_prefix(tracepoint_class)
|
|
106
|
+
return unless tracepoint_class
|
|
107
|
+
|
|
108
|
+
@method_prefixes[tracepoint_class] ||= if tracepoint_class.to_s.start_with?("#<Class")
|
|
109
|
+
if tracepoint_class.superclass.name && tracepoint_class.to_s.include?(tracepoint_class.superclass.name)
|
|
110
|
+
"#{tracepoint_class.superclass.name}::"
|
|
111
|
+
else
|
|
112
|
+
tracepoint_class.to_s.sub(/#<Class:(.*?)(\(.*?\))?>/, '\1::')
|
|
113
|
+
end
|
|
114
|
+
else
|
|
115
|
+
"#{tracepoint_class.name}:"
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
def tracked?(file, _method)
|
|
120
|
+
@tracked_files.fetch(file) do
|
|
121
|
+
@sources.any?(->(source) { File.fnmatch?(source, file) }) && !@exclusions.any?(->(exclusion) {
|
|
122
|
+
File.fnmatch?(exclusion, file)
|
|
123
|
+
})
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
def generate_source_mapping
|
|
128
|
+
@test_mapping.map { |_k, v| v.keys }.flatten.uniq.map do |file|
|
|
129
|
+
[file, @current_source_mapping.fetch(file) { Flutter::Parser.new(file).signatures }]
|
|
130
|
+
end.to_h.deep_merge(@test_source_mapping)
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
end
|
data/lib/flutter.rb
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "flutter/version"
|
|
4
|
+
require_relative "flutter/config"
|
|
5
|
+
require_relative "flutter/minitest"
|
|
6
|
+
require_relative "flutter/rspec"
|
|
7
|
+
require_relative "flutter/persistence"
|
|
8
|
+
|
|
9
|
+
module Flutter
|
|
10
|
+
class Error < StandardError; end
|
|
11
|
+
include Flutter::Config
|
|
12
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "flutter"
|
|
4
|
+
require "flutter/tracker"
|
|
5
|
+
require "flutter/minitest"
|
|
6
|
+
|
|
7
|
+
module Minitest
|
|
8
|
+
class << self
|
|
9
|
+
def plugin_flutter_init(options)
|
|
10
|
+
if Flutter.enabled
|
|
11
|
+
Flutter::Minitest.flutter_tracker.reset! if Flutter.config.reset_storage
|
|
12
|
+
reporter << Flutter::Minitest::Reporter.new(options)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
data/sig/flutter.rbs
ADDED
metadata
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: flutter
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0.pre.2
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Ali-Akber Saifee
|
|
8
|
+
- Ankita Gupta
|
|
9
|
+
autorequire:
|
|
10
|
+
bindir: bin
|
|
11
|
+
cert_chain: []
|
|
12
|
+
date: 2022-09-29 00:00:00.000000000 Z
|
|
13
|
+
dependencies:
|
|
14
|
+
- !ruby/object:Gem::Dependency
|
|
15
|
+
name: deep_merge
|
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
|
17
|
+
requirements:
|
|
18
|
+
- - ">="
|
|
19
|
+
- !ruby/object:Gem::Version
|
|
20
|
+
version: '0'
|
|
21
|
+
type: :runtime
|
|
22
|
+
prerelease: false
|
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
24
|
+
requirements:
|
|
25
|
+
- - ">="
|
|
26
|
+
- !ruby/object:Gem::Version
|
|
27
|
+
version: '0'
|
|
28
|
+
- !ruby/object:Gem::Dependency
|
|
29
|
+
name: dry-configurable
|
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
|
31
|
+
requirements:
|
|
32
|
+
- - ">="
|
|
33
|
+
- !ruby/object:Gem::Version
|
|
34
|
+
version: '0'
|
|
35
|
+
type: :runtime
|
|
36
|
+
prerelease: false
|
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
38
|
+
requirements:
|
|
39
|
+
- - ">="
|
|
40
|
+
- !ruby/object:Gem::Version
|
|
41
|
+
version: '0'
|
|
42
|
+
- !ruby/object:Gem::Dependency
|
|
43
|
+
name: parser
|
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
|
45
|
+
requirements:
|
|
46
|
+
- - ">="
|
|
47
|
+
- !ruby/object:Gem::Version
|
|
48
|
+
version: '0'
|
|
49
|
+
type: :runtime
|
|
50
|
+
prerelease: false
|
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
52
|
+
requirements:
|
|
53
|
+
- - ">="
|
|
54
|
+
- !ruby/object:Gem::Version
|
|
55
|
+
version: '0'
|
|
56
|
+
description: "Flutter plugs in to your RSpec or Minitest test suites\n and helps
|
|
57
|
+
you run only the tests that exercise the code you have changed since the last run\n
|
|
58
|
+
\ "
|
|
59
|
+
email:
|
|
60
|
+
- ali@indydevs.org
|
|
61
|
+
- ankita@indydevs.org
|
|
62
|
+
executables: []
|
|
63
|
+
extensions: []
|
|
64
|
+
extra_rdoc_files: []
|
|
65
|
+
files:
|
|
66
|
+
- ".overcommit.yml"
|
|
67
|
+
- ".rubocop.yml"
|
|
68
|
+
- CHANGELOG.md
|
|
69
|
+
- CODE_OF_CONDUCT.md
|
|
70
|
+
- Gemfile
|
|
71
|
+
- Guardfile
|
|
72
|
+
- LICENSE.txt
|
|
73
|
+
- README.md
|
|
74
|
+
- Rakefile
|
|
75
|
+
- TODO.md
|
|
76
|
+
- integration_tests/minitest/grape_app/.gitignore
|
|
77
|
+
- integration_tests/minitest/grape_app/.ruby-version
|
|
78
|
+
- integration_tests/minitest/grape_app/Gemfile
|
|
79
|
+
- integration_tests/minitest/grape_app/Gemfile.lock
|
|
80
|
+
- integration_tests/minitest/grape_app/README.md
|
|
81
|
+
- integration_tests/minitest/grape_app/Rakefile
|
|
82
|
+
- integration_tests/minitest/grape_app/api/api.rb
|
|
83
|
+
- integration_tests/minitest/grape_app/api/routes/api_helpers.rb
|
|
84
|
+
- integration_tests/minitest/grape_app/api/routes/change_request/api.rb
|
|
85
|
+
- integration_tests/minitest/grape_app/api/routes/change_request/response_entity.rb
|
|
86
|
+
- integration_tests/minitest/grape_app/api/routes/event/api.rb
|
|
87
|
+
- integration_tests/minitest/grape_app/api/routes/event/response_entity.rb
|
|
88
|
+
- integration_tests/minitest/grape_app/api/routes/project/api.rb
|
|
89
|
+
- integration_tests/minitest/grape_app/api/routes/project/response_entity.rb
|
|
90
|
+
- integration_tests/minitest/grape_app/api/routes/property/api.rb
|
|
91
|
+
- integration_tests/minitest/grape_app/api/routes/property/response_entity.rb
|
|
92
|
+
- integration_tests/minitest/grape_app/api/routes/trackable_object/api.rb
|
|
93
|
+
- integration_tests/minitest/grape_app/api/routes/trackable_object/response_entity.rb
|
|
94
|
+
- integration_tests/minitest/grape_app/api/routes/tracking_spec/api.rb
|
|
95
|
+
- integration_tests/minitest/grape_app/api/routes/tracking_spec/response_entity.rb
|
|
96
|
+
- integration_tests/minitest/grape_app/api/routes/tracking_spec/spec_response.rb
|
|
97
|
+
- integration_tests/minitest/grape_app/api/routes/user/api.rb
|
|
98
|
+
- integration_tests/minitest/grape_app/api/routes/user/response_entity.rb
|
|
99
|
+
- integration_tests/minitest/grape_app/app/app.rb
|
|
100
|
+
- integration_tests/minitest/grape_app/app/change_request/endpoint.rb
|
|
101
|
+
- integration_tests/minitest/grape_app/app/change_request/generate_system_changes.rb
|
|
102
|
+
- integration_tests/minitest/grape_app/app/change_request/service.rb
|
|
103
|
+
- integration_tests/minitest/grape_app/app/event/endpoint.rb
|
|
104
|
+
- integration_tests/minitest/grape_app/app/event/service.rb
|
|
105
|
+
- integration_tests/minitest/grape_app/app/event/validator.rb
|
|
106
|
+
- integration_tests/minitest/grape_app/app/project/endpoint.rb
|
|
107
|
+
- integration_tests/minitest/grape_app/app/project/service.rb
|
|
108
|
+
- integration_tests/minitest/grape_app/app/property/endpoint.rb
|
|
109
|
+
- integration_tests/minitest/grape_app/app/property/service.rb
|
|
110
|
+
- integration_tests/minitest/grape_app/app/trackable_object/endpoint.rb
|
|
111
|
+
- integration_tests/minitest/grape_app/app/trackable_object/service.rb
|
|
112
|
+
- integration_tests/minitest/grape_app/app/trackable_object/validator.rb
|
|
113
|
+
- integration_tests/minitest/grape_app/app/tracking_spec/endpoint.rb
|
|
114
|
+
- integration_tests/minitest/grape_app/app/tracking_spec/expand_tracking_spec_events.rb
|
|
115
|
+
- integration_tests/minitest/grape_app/app/tracking_spec/service.rb
|
|
116
|
+
- integration_tests/minitest/grape_app/app/tracking_spec/validator.rb
|
|
117
|
+
- integration_tests/minitest/grape_app/app/utils/errors/api_exceptions.rb
|
|
118
|
+
- integration_tests/minitest/grape_app/app/utils/errors/service_exceptions.rb
|
|
119
|
+
- integration_tests/minitest/grape_app/app/versioned_entity/entity.rb
|
|
120
|
+
- integration_tests/minitest/grape_app/app/versioned_entity/service.rb
|
|
121
|
+
- integration_tests/minitest/grape_app/app/versioned_entity/validator.rb
|
|
122
|
+
- integration_tests/minitest/grape_app/app/versioned_entity_snapshot/entity.rb
|
|
123
|
+
- integration_tests/minitest/grape_app/config.ru
|
|
124
|
+
- integration_tests/minitest/grape_app/config/boot.rb
|
|
125
|
+
- integration_tests/minitest/grape_app/db/proto/change_request.rb
|
|
126
|
+
- integration_tests/minitest/grape_app/db/proto/common/doc.rb
|
|
127
|
+
- integration_tests/minitest/grape_app/db/proto/event.rb
|
|
128
|
+
- integration_tests/minitest/grape_app/db/proto/event_snapshot.rb
|
|
129
|
+
- integration_tests/minitest/grape_app/db/proto/project.rb
|
|
130
|
+
- integration_tests/minitest/grape_app/db/proto/property.rb
|
|
131
|
+
- integration_tests/minitest/grape_app/db/proto/property_snapshot.rb
|
|
132
|
+
- integration_tests/minitest/grape_app/db/proto/trackable_object.rb
|
|
133
|
+
- integration_tests/minitest/grape_app/db/proto/trackable_object_snapshot.rb
|
|
134
|
+
- integration_tests/minitest/grape_app/db/proto/tracking_spec.rb
|
|
135
|
+
- integration_tests/minitest/grape_app/test/api/functional/event_test.rb
|
|
136
|
+
- integration_tests/minitest/grape_app/test/api/functional/property_test.rb
|
|
137
|
+
- integration_tests/minitest/grape_app/test/api/functional/trackable_object_test.rb
|
|
138
|
+
- integration_tests/minitest/grape_app/test/api/functional/tracking_spec_test.rb
|
|
139
|
+
- integration_tests/minitest/grape_app/test/api/functional/user_test.rb
|
|
140
|
+
- integration_tests/minitest/grape_app/test/api/functional/versioned_entity_helper.rb
|
|
141
|
+
- integration_tests/minitest/grape_app/test/fixtures/change_requests.rb
|
|
142
|
+
- integration_tests/minitest/grape_app/test/fixtures/event_snapshots.rb
|
|
143
|
+
- integration_tests/minitest/grape_app/test/fixtures/events.rb
|
|
144
|
+
- integration_tests/minitest/grape_app/test/fixtures/properties.rb
|
|
145
|
+
- integration_tests/minitest/grape_app/test/fixtures/property_snapshots.rb
|
|
146
|
+
- integration_tests/minitest/grape_app/test/fixtures/sample_tracking_spec.json
|
|
147
|
+
- integration_tests/minitest/grape_app/test/fixtures/trackable_objects.rb
|
|
148
|
+
- integration_tests/minitest/grape_app/test/fixtures/trackable_objects_snapshots.rb
|
|
149
|
+
- integration_tests/minitest/grape_app/test/fixtures/tracking_specs.rb
|
|
150
|
+
- integration_tests/minitest/grape_app/test/test_helper.rb
|
|
151
|
+
- lib/flutter.rb
|
|
152
|
+
- lib/flutter/config.rb
|
|
153
|
+
- lib/flutter/minitest.rb
|
|
154
|
+
- lib/flutter/parser.rb
|
|
155
|
+
- lib/flutter/persistence.rb
|
|
156
|
+
- lib/flutter/rspec.rb
|
|
157
|
+
- lib/flutter/tracker.rb
|
|
158
|
+
- lib/flutter/version.rb
|
|
159
|
+
- lib/minitest/flutter_plugin.rb
|
|
160
|
+
- sig/flutter.rbs
|
|
161
|
+
homepage: https://github.com/indydevs/flutter
|
|
162
|
+
licenses:
|
|
163
|
+
- MIT
|
|
164
|
+
metadata:
|
|
165
|
+
homepage_uri: https://github.com/indydevs/flutter
|
|
166
|
+
source_code_uri: https://github.com/indydevs/flutter
|
|
167
|
+
changelog_uri: https://github.com/indydevs/flutter/blob/master/CHANGELOG.md
|
|
168
|
+
post_install_message:
|
|
169
|
+
rdoc_options: []
|
|
170
|
+
require_paths:
|
|
171
|
+
- lib
|
|
172
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
173
|
+
requirements:
|
|
174
|
+
- - ">="
|
|
175
|
+
- !ruby/object:Gem::Version
|
|
176
|
+
version: 2.6.0
|
|
177
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
|
+
requirements:
|
|
179
|
+
- - ">"
|
|
180
|
+
- !ruby/object:Gem::Version
|
|
181
|
+
version: 1.3.1
|
|
182
|
+
requirements: []
|
|
183
|
+
rubygems_version: 3.3.7
|
|
184
|
+
signing_key:
|
|
185
|
+
specification_version: 4
|
|
186
|
+
summary: Intelligent test selection based on incremental code changes
|
|
187
|
+
test_files: []
|