insta 0.2.9 → 0.3.0
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 +4 -4
- data/LICENSE.txt +1 -1
- data/Rakefile +30 -3
- data/exe/insta +6 -0
- data/lib/insta/ansi.rb +30 -0
- data/lib/insta/ci.rb +21 -0
- data/lib/insta/cli.rb +714 -0
- data/lib/insta/config_manifest.rb +56 -0
- data/lib/insta/configuration.rb +86 -2
- data/lib/insta/diff.rb +134 -0
- data/lib/insta/inline/call_finder.rb +37 -0
- data/lib/insta/inline/edit.rb +21 -0
- data/lib/insta/inline/file_patcher.rb +269 -0
- data/lib/insta/inline/pending_registry.rb +57 -0
- data/lib/insta/inline/pending_store.rb +145 -0
- data/lib/insta/minitest/assertions.rb +254 -0
- data/lib/insta/minitest/lifecycle.rb +12 -0
- data/lib/insta/minitest.rb +8 -0
- data/lib/insta/pending_locations.rb +64 -0
- data/lib/insta/pending_reporter.rb +47 -0
- data/lib/insta/redaction/applicator.rb +89 -0
- data/lib/insta/redaction/selector.rb +193 -0
- data/lib/insta/rspec/hooks.rb +18 -0
- data/lib/insta/rspec/matchers.rb +248 -0
- data/lib/insta/rspec.rb +7 -0
- data/lib/insta/serializers/base.rb +31 -0
- data/lib/insta/serializers/inspect.rb +14 -0
- data/lib/insta/serializers/json.rb +16 -0
- data/lib/insta/serializers/string.rb +14 -0
- data/lib/insta/serializers/yaml.rb +16 -0
- data/lib/insta/snapshot.rb +74 -0
- data/lib/insta/snapshot_content.rb +44 -0
- data/lib/insta/snapshot_file.rb +64 -0
- data/lib/insta/snapshot_mismatch_handler.rb +34 -0
- data/lib/insta/snapshot_name.rb +51 -0
- data/lib/insta/syntax_highlight.rb +20 -0
- data/lib/insta/update_coordinator.rb +22 -0
- data/lib/insta/version.rb +3 -1
- data/lib/insta.rb +42 -8
- data/lib/minitest/insta_plugin.rb +17 -0
- data/sig/insta/ansi.rbs +28 -0
- data/sig/insta/ci.rbs +10 -0
- data/sig/insta/cli.rbs +150 -0
- data/sig/insta/config_manifest.rbs +27 -0
- data/sig/insta/configuration.rbs +48 -0
- data/sig/insta/diff.rbs +38 -0
- data/sig/insta/inline/call_finder.rbs +22 -0
- data/sig/insta/inline/edit.rbs +18 -0
- data/sig/insta/inline/file_patcher.rbs +55 -0
- data/sig/insta/inline/pending_registry.rbs +22 -0
- data/sig/insta/inline/pending_store.rbs +41 -0
- data/sig/insta/minitest/assertions.rbs +52 -0
- data/sig/insta/minitest/lifecycle.rbs +10 -0
- data/sig/insta/minitest.rbs +2 -0
- data/sig/insta/pending_locations.rbs +22 -0
- data/sig/insta/pending_reporter.rbs +14 -0
- data/sig/insta/redaction/applicator.rbs +22 -0
- data/sig/insta/redaction/selector.rbs +58 -0
- data/sig/insta/rspec/hooks.rbs +10 -0
- data/sig/insta/rspec/matchers.rbs +71 -0
- data/sig/insta/rspec.rbs +2 -0
- data/sig/insta/serializers/base.rbs +21 -0
- data/sig/insta/serializers/inspect.rbs +10 -0
- data/sig/insta/serializers/json.rbs +10 -0
- data/sig/insta/serializers/string.rbs +10 -0
- data/sig/insta/serializers/yaml.rbs +10 -0
- data/sig/insta/snapshot.rbs +37 -0
- data/sig/insta/snapshot_content.rbs +14 -0
- data/sig/insta/snapshot_file.rbs +27 -0
- data/sig/insta/snapshot_mismatch_handler.rbs +12 -0
- data/sig/insta/snapshot_name.rbs +17 -0
- data/sig/insta/syntax_highlight.rbs +8 -0
- data/sig/insta/update_coordinator.rbs +11 -0
- data/sig/insta/version.rbs +5 -0
- data/sig/insta.rbs +12 -0
- data/sig/minitest/insta_plugin.rbs +6 -0
- data/sig/vendor/difftastic.rbs +19 -0
- data/sig/vendor/irb.rbs +5 -0
- data/sig/vendor/psych.rbs +7 -0
- data/sig/vendor/rspec.rbs +9 -0
- data/sig/vendor/rubygems.rbs +3 -0
- metadata +109 -54
- data/.DS_Store +0 -0
- data/.gitignore +0 -11
- data/.rspec +0 -3
- data/.travis.yml +0 -5
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -6
- data/Gemfile.lock +0 -35
- data/README.md +0 -41
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/insta.gemspec +0 -36
- data/lib/.DS_Store +0 -0
- data/lib/insta/account.rb +0 -127
- data/lib/insta/api.rb +0 -88
- data/lib/insta/constants.rb +0 -21
- data/lib/insta/device.rb +0 -11852
- data/lib/insta/feed.rb +0 -89
- data/lib/insta/location.rb +0 -18
- data/lib/insta/proxy_manager.rb +0 -23
- data/lib/insta/tag.rb +0 -18
- data/lib/insta/user.rb +0 -103
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Generated from lib/insta/inline/pending_registry.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Insta
|
|
4
|
+
module Inline
|
|
5
|
+
module PendingRegistry
|
|
6
|
+
# : (file: String, line: Integer, content: String, type: Symbol) -> void
|
|
7
|
+
def self.add: (file: String, line: Integer, content: String, type: Symbol) -> void
|
|
8
|
+
|
|
9
|
+
# : () -> void
|
|
10
|
+
def self.flush!: () -> void
|
|
11
|
+
|
|
12
|
+
# : () -> bool
|
|
13
|
+
def self.any?: () -> bool
|
|
14
|
+
|
|
15
|
+
# : () -> Integer
|
|
16
|
+
def self.size: () -> Integer
|
|
17
|
+
|
|
18
|
+
# : () -> void
|
|
19
|
+
def self.clear!: () -> void
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Generated from lib/insta/inline/pending_store.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Insta
|
|
4
|
+
module Inline
|
|
5
|
+
type pending_store_entry = { file: String, line: Integer, content: String, old_content: String, type: String }
|
|
6
|
+
|
|
7
|
+
module PendingStore
|
|
8
|
+
FILENAME: ::String
|
|
9
|
+
|
|
10
|
+
# : (file: String, line: Integer, content: String, old_content: String, type: Symbol) -> void
|
|
11
|
+
def self.add: (file: String, line: Integer, content: String, old_content: String, type: Symbol) -> void
|
|
12
|
+
|
|
13
|
+
# : () -> void
|
|
14
|
+
def self.flush!: () -> void
|
|
15
|
+
|
|
16
|
+
# : () -> Array[Inline::pending_store_entry]
|
|
17
|
+
def self.load: () -> Array[Inline::pending_store_entry]
|
|
18
|
+
|
|
19
|
+
# : () -> void
|
|
20
|
+
def self.clean!: () -> void
|
|
21
|
+
|
|
22
|
+
# : (Array[Inline::pending_store_entry]) -> void
|
|
23
|
+
def self.apply!: (Array[Inline::pending_store_entry]) -> void
|
|
24
|
+
|
|
25
|
+
# : (Array[Inline::pending_store_entry]) -> void
|
|
26
|
+
def self.remove!: (Array[Inline::pending_store_entry]) -> void
|
|
27
|
+
|
|
28
|
+
# : () -> bool
|
|
29
|
+
def self.any?: () -> bool
|
|
30
|
+
|
|
31
|
+
# : () -> Integer
|
|
32
|
+
def self.size: () -> Integer
|
|
33
|
+
|
|
34
|
+
# : () -> void
|
|
35
|
+
def self.clear!: () -> void
|
|
36
|
+
|
|
37
|
+
# : (Array[Inline::pending_store_entry], Array[Inline::pending_store_entry]) -> Array[Inline::pending_store_entry]
|
|
38
|
+
def self.merge_entries: (Array[Inline::pending_store_entry], Array[Inline::pending_store_entry]) -> Array[Inline::pending_store_entry]
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Generated from lib/insta/minitest/assertions.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Insta
|
|
4
|
+
module Minitest
|
|
5
|
+
# @rbs module-self: Minitest::Test
|
|
6
|
+
module Assertions
|
|
7
|
+
# : (
|
|
8
|
+
# | untyped,
|
|
9
|
+
# | ?name: String?,
|
|
10
|
+
# | ?serializer: Symbol?,
|
|
11
|
+
# | ?redact: Hash[String, untyped]?,
|
|
12
|
+
# | ?input: String?,
|
|
13
|
+
# | ?description: String?,
|
|
14
|
+
# | ?info: Hash[String, untyped]?,
|
|
15
|
+
# | ?options: Hash[Symbol, untyped]?
|
|
16
|
+
# | ) -> void
|
|
17
|
+
def assert_snapshot: (untyped actual, ?name: untyped, ?serializer: untyped, ?redact: untyped, ?input: untyped, ?description: untyped, ?info: untyped, ?options: untyped) -> untyped
|
|
18
|
+
|
|
19
|
+
# : (
|
|
20
|
+
# | untyped,
|
|
21
|
+
# | ?String?,
|
|
22
|
+
# | ?serializer: Symbol?,
|
|
23
|
+
# | ?redact: Hash[String, untyped]?
|
|
24
|
+
# | ) -> void
|
|
25
|
+
def assert_inline_snapshot: (untyped actual, ?untyped expected, ?serializer: untyped, ?redact: untyped) -> untyped
|
|
26
|
+
|
|
27
|
+
private
|
|
28
|
+
|
|
29
|
+
# : () -> SnapshotFile
|
|
30
|
+
def _insta_snapshot_file: () -> SnapshotFile
|
|
31
|
+
|
|
32
|
+
# : () -> String
|
|
33
|
+
def find_test_caller: () -> String
|
|
34
|
+
|
|
35
|
+
# : (String, String, ?expression: String?, ?input: String?, ?description: String?,
|
|
36
|
+
# | ?info: Hash[String, untyped]?, ?options: Hash[Symbol, untyped]?) -> Snapshot::snapshot_metadata
|
|
37
|
+
def build_metadata: (untyped test_class, untyped test_method, ?expression: untyped, ?input: untyped, ?description: untyped, ?info: untyped, ?options: untyped) -> untyped
|
|
38
|
+
|
|
39
|
+
# : (SnapshotFile, Pathname, String, Snapshot::snapshot_metadata) -> void
|
|
40
|
+
def handle_missing_snapshot: (SnapshotFile, Pathname, String, Snapshot::snapshot_metadata) -> void
|
|
41
|
+
|
|
42
|
+
# : (SnapshotFile, Pathname, String, Snapshot::snapshot_metadata, Snapshot, String?, String) -> void
|
|
43
|
+
def handle_type_mismatch: (SnapshotFile, Pathname, String, Snapshot::snapshot_metadata, Snapshot, String?, String) -> void
|
|
44
|
+
|
|
45
|
+
# : (SnapshotFile, Pathname, String, Snapshot::snapshot_metadata, String, String, String, String) -> void
|
|
46
|
+
def handle_snapshot_mismatch: (SnapshotFile, Pathname, String, Snapshot::snapshot_metadata, String, String, String, String) -> void
|
|
47
|
+
|
|
48
|
+
# : (String, Integer, String, String) -> void
|
|
49
|
+
def handle_inline_mismatch: (String, Integer, String, String) -> void
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Generated from lib/insta/pending_locations.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Insta
|
|
4
|
+
module PendingLocations
|
|
5
|
+
FILENAME: ::String
|
|
6
|
+
|
|
7
|
+
# : (String, String) -> void
|
|
8
|
+
def self.add: (String, String) -> void
|
|
9
|
+
|
|
10
|
+
# : () -> void
|
|
11
|
+
def self.flush!: () -> void
|
|
12
|
+
|
|
13
|
+
# : () -> Hash[String, String]
|
|
14
|
+
def self.load: () -> Hash[String, String]
|
|
15
|
+
|
|
16
|
+
# : () -> void
|
|
17
|
+
def self.clean!: () -> void
|
|
18
|
+
|
|
19
|
+
# : () -> void
|
|
20
|
+
def self.clear!: () -> void
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Generated from lib/insta/pending_reporter.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Insta
|
|
4
|
+
module PendingReporter
|
|
5
|
+
# : () -> void
|
|
6
|
+
def self.flush_and_report!: () -> void
|
|
7
|
+
|
|
8
|
+
# : () -> void
|
|
9
|
+
def self.report_pending_files!: () -> void
|
|
10
|
+
|
|
11
|
+
# : () -> void
|
|
12
|
+
def self.report_pending_inline!: () -> void
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Generated from lib/insta/redaction/applicator.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Insta
|
|
4
|
+
module Redaction
|
|
5
|
+
class Applicator
|
|
6
|
+
# : (untyped, Hash[String, untyped]?) -> untyped
|
|
7
|
+
def self.apply: (untyped, Hash[String, untyped]?) -> untyped
|
|
8
|
+
|
|
9
|
+
# : (untyped) -> untyped
|
|
10
|
+
def self.deep_dup: (untyped) -> untyped
|
|
11
|
+
|
|
12
|
+
# : (untyped, untyped, Hash[Selector, untyped]) -> void
|
|
13
|
+
def self.walk: (untyped, untyped, Hash[Selector, untyped]) -> void
|
|
14
|
+
|
|
15
|
+
# : (untyped, Hash[Selector, untyped]) -> untyped
|
|
16
|
+
def self.find_match: (untyped, Hash[Selector, untyped]) -> untyped
|
|
17
|
+
|
|
18
|
+
# : (untyped, untyped) -> untyped
|
|
19
|
+
def self.apply_replacement: (untyped, untyped) -> untyped
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Generated from lib/insta/redaction/selector.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Insta
|
|
4
|
+
module Redaction
|
|
5
|
+
class Selector
|
|
6
|
+
class Segment < Struct[untyped]
|
|
7
|
+
attr_accessor type(): untyped
|
|
8
|
+
|
|
9
|
+
attr_accessor value(): untyped
|
|
10
|
+
|
|
11
|
+
def self.new: (?type: untyped, ?value: untyped) -> instance
|
|
12
|
+
| ({ ?type: untyped, ?value: untyped }) -> instance
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
SEGMENT_TYPES: Array[Symbol]
|
|
16
|
+
|
|
17
|
+
attr_reader segments: Array[Segment]
|
|
18
|
+
|
|
19
|
+
# : (String) -> void
|
|
20
|
+
def initialize: (String) -> void
|
|
21
|
+
|
|
22
|
+
# : (Array[{ type: Symbol, value: untyped }]) -> bool
|
|
23
|
+
def matches?: (Array[{ type: Symbol, value: untyped }]) -> bool
|
|
24
|
+
|
|
25
|
+
private
|
|
26
|
+
|
|
27
|
+
# : (String) -> Array[Segment]
|
|
28
|
+
def parse: (String) -> Array[Segment]
|
|
29
|
+
|
|
30
|
+
# : (String, Integer, Array[Segment]) -> Integer
|
|
31
|
+
def parse_dot_segment: (String, Integer, Array[Segment]) -> Integer
|
|
32
|
+
|
|
33
|
+
# : (String, Integer, Array[Segment]) -> Integer
|
|
34
|
+
def parse_wildcard_segment: (String, Integer, Array[Segment]) -> Integer
|
|
35
|
+
|
|
36
|
+
# : (String, Integer, Array[Segment]) -> Integer
|
|
37
|
+
def parse_key_segment: (String, Integer, Array[Segment]) -> Integer
|
|
38
|
+
|
|
39
|
+
# : (String, Integer, Array[Segment]) -> Integer
|
|
40
|
+
def parse_bracket_segment: (String, Integer, Array[Segment]) -> Integer
|
|
41
|
+
|
|
42
|
+
# : (String, Integer, Array[Segment]) -> Integer
|
|
43
|
+
def parse_quoted_key_segment: (String, Integer, Array[Segment]) -> Integer
|
|
44
|
+
|
|
45
|
+
# : (String, Integer, Array[Segment]) -> Integer
|
|
46
|
+
def parse_index_segment: (String, Integer, Array[Segment]) -> Integer
|
|
47
|
+
|
|
48
|
+
# : (Array[{ type: Symbol, value: untyped }], Integer) -> bool
|
|
49
|
+
def deep_wildcard_match?: (Array[{ type: Symbol, value: untyped }], Integer) -> bool
|
|
50
|
+
|
|
51
|
+
# : (Array[{ type: Symbol, value: untyped }], Array[Segment]) -> bool
|
|
52
|
+
def exact_match?: (Array[{ type: Symbol, value: untyped }], Array[Segment]) -> bool
|
|
53
|
+
|
|
54
|
+
# : (Segment, { type: Symbol, value: untyped }) -> bool
|
|
55
|
+
def segment_matches?: (Segment, { type: Symbol, value: untyped }) -> bool
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Generated from lib/insta/rspec/matchers.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Insta
|
|
4
|
+
module RSpec
|
|
5
|
+
module Matchers
|
|
6
|
+
class MatchSnapshot
|
|
7
|
+
include ::RSpec::Matchers::Composable
|
|
8
|
+
|
|
9
|
+
attr_reader failure_message: String?
|
|
10
|
+
|
|
11
|
+
# : (String?, ?serializer: Symbol?, ?redact: Hash[String, untyped]?) -> void
|
|
12
|
+
def initialize: (String?, ?serializer: Symbol?, ?redact: Hash[String, untyped]?) -> void
|
|
13
|
+
|
|
14
|
+
# : (untyped) -> bool
|
|
15
|
+
def matches?: (untyped) -> bool
|
|
16
|
+
|
|
17
|
+
# : () -> String
|
|
18
|
+
def description: () -> String
|
|
19
|
+
|
|
20
|
+
private
|
|
21
|
+
|
|
22
|
+
# : (untyped, String, String) -> SnapshotFile
|
|
23
|
+
def resolve_snapshot_file: (untyped, String, String) -> SnapshotFile
|
|
24
|
+
|
|
25
|
+
# : (SnapshotFile, Pathname, String, Snapshot::snapshot_metadata) -> bool
|
|
26
|
+
def handle_new_snapshot: (SnapshotFile, Pathname, String, Snapshot::snapshot_metadata) -> bool
|
|
27
|
+
|
|
28
|
+
# : (SnapshotFile, Pathname, String, Snapshot::snapshot_metadata, Snapshot, String?, untyped) -> bool
|
|
29
|
+
def handle_type_mismatch: (SnapshotFile, Pathname, String, Snapshot::snapshot_metadata, Snapshot, String?, untyped) -> bool
|
|
30
|
+
|
|
31
|
+
# : (SnapshotFile, Pathname, String, Snapshot::snapshot_metadata, String, String, String?) -> bool
|
|
32
|
+
def handle_mismatch: (SnapshotFile, Pathname, String, Snapshot::snapshot_metadata, String, String, String?) -> bool
|
|
33
|
+
|
|
34
|
+
# : (String) -> false
|
|
35
|
+
def record_failure: (String) -> false
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
class MatchInlineSnapshot
|
|
39
|
+
include ::RSpec::Matchers::Composable
|
|
40
|
+
|
|
41
|
+
attr_reader failure_message: String?
|
|
42
|
+
|
|
43
|
+
# : (String?, ?serializer: Symbol?, ?redact: Hash[String, untyped]?) -> void
|
|
44
|
+
def initialize: (String?, ?serializer: Symbol?, ?redact: Hash[String, untyped]?) -> void
|
|
45
|
+
|
|
46
|
+
# : (untyped) -> bool
|
|
47
|
+
def matches?: (untyped) -> bool
|
|
48
|
+
|
|
49
|
+
# : () -> String
|
|
50
|
+
def description: () -> String
|
|
51
|
+
|
|
52
|
+
private
|
|
53
|
+
|
|
54
|
+
# : (String, Integer, String) -> bool
|
|
55
|
+
def handle_new_inline_snapshot: (String, Integer, String) -> bool
|
|
56
|
+
|
|
57
|
+
# : (String, Integer, String, String) -> bool
|
|
58
|
+
def handle_inline_mismatch: (String, Integer, String, String) -> bool
|
|
59
|
+
|
|
60
|
+
# : (String) -> false
|
|
61
|
+
def record_failure: (String) -> false
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# : (?String?, ?serializer: Symbol?, ?redact: Hash[String, untyped]?) -> MatchSnapshot
|
|
65
|
+
def match_snapshot: (?String?, ?serializer: Symbol?, ?redact: Hash[String, untyped]?) -> MatchSnapshot
|
|
66
|
+
|
|
67
|
+
# : (?String?, ?serializer: Symbol?, ?redact: Hash[String, untyped]?) -> MatchInlineSnapshot
|
|
68
|
+
def match_inline_snapshot: (?String?, ?serializer: Symbol?, ?redact: Hash[String, untyped]?) -> MatchInlineSnapshot
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
data/sig/insta/rspec.rbs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Generated from lib/insta/serializers/base.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Insta
|
|
4
|
+
module Serializers
|
|
5
|
+
class Base
|
|
6
|
+
# : (untyped) -> String
|
|
7
|
+
def self.serialize: (untyped) -> String
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
REGISTRY: Hash[Symbol, singleton(Base)]
|
|
11
|
+
|
|
12
|
+
# : (Symbol, singleton(Base)) -> void
|
|
13
|
+
def self.register: (Symbol, singleton(Base)) -> void
|
|
14
|
+
|
|
15
|
+
# : (Symbol) -> singleton(Base)
|
|
16
|
+
def self.fetch: (Symbol) -> singleton(Base)
|
|
17
|
+
|
|
18
|
+
# : (Symbol, untyped) -> String
|
|
19
|
+
def self.serialize: (Symbol, untyped) -> String
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Generated from lib/insta/snapshot.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Insta
|
|
4
|
+
class Snapshot
|
|
5
|
+
type snapshot_metadata = Hash[String, untyped]
|
|
6
|
+
|
|
7
|
+
SEPARATOR: String
|
|
8
|
+
|
|
9
|
+
attr_reader content: String
|
|
10
|
+
|
|
11
|
+
attr_reader metadata: snapshot_metadata
|
|
12
|
+
|
|
13
|
+
# : (String, ?snapshot_metadata) -> void
|
|
14
|
+
def initialize: (String, ?snapshot_metadata) -> void
|
|
15
|
+
|
|
16
|
+
# : (String) -> Snapshot
|
|
17
|
+
def self.parse: (String) -> Snapshot
|
|
18
|
+
|
|
19
|
+
# : () -> String
|
|
20
|
+
def serialize: () -> String
|
|
21
|
+
|
|
22
|
+
# : () -> String?
|
|
23
|
+
def source: () -> String?
|
|
24
|
+
|
|
25
|
+
# : () -> String?
|
|
26
|
+
def input: () -> String?
|
|
27
|
+
|
|
28
|
+
# : () -> String?
|
|
29
|
+
def description: () -> String?
|
|
30
|
+
|
|
31
|
+
# : () -> String?
|
|
32
|
+
def expression: () -> String?
|
|
33
|
+
|
|
34
|
+
# : () -> Hash[String, untyped]?
|
|
35
|
+
def info: () -> Hash[String, untyped]?
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Generated from lib/insta/snapshot_content.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Insta
|
|
4
|
+
module SnapshotContent
|
|
5
|
+
# : (String) -> String
|
|
6
|
+
def self.normalize: (String) -> String
|
|
7
|
+
|
|
8
|
+
# : (String, Integer) -> String
|
|
9
|
+
def self.indent: (String, Integer) -> String
|
|
10
|
+
|
|
11
|
+
# : (String) -> String
|
|
12
|
+
def self.strip_indent: (String) -> String
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Generated from lib/insta/snapshot_file.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Insta
|
|
4
|
+
class SnapshotFile
|
|
5
|
+
attr_reader base_path: Pathname
|
|
6
|
+
|
|
7
|
+
attr_reader extension: String
|
|
8
|
+
|
|
9
|
+
# : (String, String, String, ?String?) -> void
|
|
10
|
+
def initialize: (String, String, String, ?String?) -> void
|
|
11
|
+
|
|
12
|
+
# : (?Hash[Symbol, untyped]) -> Pathname
|
|
13
|
+
def path_for: (?Hash[Symbol, untyped]) -> Pathname
|
|
14
|
+
|
|
15
|
+
# : (String) -> Pathname
|
|
16
|
+
def named_path: (String) -> Pathname
|
|
17
|
+
|
|
18
|
+
# : (Pathname) -> Pathname
|
|
19
|
+
def pending_path: (Pathname) -> Pathname
|
|
20
|
+
|
|
21
|
+
# : (Pathname, String, Snapshot::snapshot_metadata) -> void
|
|
22
|
+
def write: (Pathname, String, Snapshot::snapshot_metadata) -> void
|
|
23
|
+
|
|
24
|
+
# : (Pathname) -> Snapshot?
|
|
25
|
+
def read: (Pathname) -> Snapshot?
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Generated from lib/insta/snapshot_mismatch_handler.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Insta
|
|
4
|
+
module SnapshotMismatchHandler
|
|
5
|
+
# Returns :updated, :force_passed, or :failed
|
|
6
|
+
# : (SnapshotFile, Pathname, String, Snapshot::snapshot_metadata, String, ?caller_line: String?) -> Symbol
|
|
7
|
+
def self.handle: (SnapshotFile, Pathname, String, Snapshot::snapshot_metadata, String, ?caller_line: String?) -> Symbol
|
|
8
|
+
|
|
9
|
+
# : (String, String, String, Pathname, ?caller_line: String?) -> String
|
|
10
|
+
def self.failure_message: (String, String, String, Pathname, ?caller_line: String?) -> String
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Generated from lib/insta/snapshot_name.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Insta
|
|
4
|
+
module SnapshotName
|
|
5
|
+
# : (String) -> String
|
|
6
|
+
def self.sanitize: (String) -> String
|
|
7
|
+
|
|
8
|
+
# : (String) -> String
|
|
9
|
+
def self.underscore: (String) -> String
|
|
10
|
+
|
|
11
|
+
# : (String) -> String
|
|
12
|
+
def self.strip_test_prefix: (String) -> String
|
|
13
|
+
|
|
14
|
+
# : (String, ?counter: Integer, ?options: Hash[Symbol, untyped]) -> String
|
|
15
|
+
def self.derive: (String, ?counter: Integer, ?options: Hash[Symbol, untyped]) -> String
|
|
16
|
+
end
|
|
17
|
+
end
|
data/sig/insta.rbs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Generated from lib/insta.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Insta
|
|
4
|
+
# : () -> Configuration
|
|
5
|
+
def self.configuration: () -> Configuration
|
|
6
|
+
|
|
7
|
+
# : () { (Configuration) -> void } -> void
|
|
8
|
+
def self.configure: () { (Configuration) -> void } -> void
|
|
9
|
+
|
|
10
|
+
# : () -> void
|
|
11
|
+
def self.reset_configuration!: () -> void
|
|
12
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Difftastic
|
|
2
|
+
class Differ
|
|
3
|
+
def initialize: (
|
|
4
|
+
?background: Symbol?,
|
|
5
|
+
?color: Symbol?,
|
|
6
|
+
?syntax_highlight: Symbol?,
|
|
7
|
+
?context: Integer?,
|
|
8
|
+
?width: Integer?,
|
|
9
|
+
?tab_width: Integer?,
|
|
10
|
+
?parse_error_limit: Integer?,
|
|
11
|
+
?underline_highlights: bool,
|
|
12
|
+
?left_label: String?,
|
|
13
|
+
?right_label: String?,
|
|
14
|
+
?display: String
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def diff_strings: (String, String, ?file_extension: String?) -> String
|
|
18
|
+
end
|
|
19
|
+
end
|
data/sig/vendor/irb.rbs
ADDED