shotgrid_api_ruby 0.2.0.5 → 0.2.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test_and_publish.yml +3 -3
  3. data/.github/workflows/test_only.yml +7 -5
  4. data/.ruby-version +1 -1
  5. data/CHANGELOG.md +6 -0
  6. data/Gemfile +12 -0
  7. data/Gemfile.lock +101 -85
  8. data/bin/prettirun +1 -1
  9. data/docs/ShotgridApiRuby/Auth/Validator.html +4 -4
  10. data/docs/ShotgridApiRuby/Auth.html +4 -4
  11. data/docs/ShotgridApiRuby/Client.html +4 -4
  12. data/docs/ShotgridApiRuby/Entities/Params/TooComplexFiltersError.html +4 -4
  13. data/docs/ShotgridApiRuby/Entities/Params.html +4 -4
  14. data/docs/ShotgridApiRuby/Entities/Schema.html +4 -4
  15. data/docs/ShotgridApiRuby/Entities/Summarize/Summary.html +8 -8
  16. data/docs/ShotgridApiRuby/Entities/Summarize.html +4 -4
  17. data/docs/ShotgridApiRuby/Entities.html +4 -4
  18. data/docs/ShotgridApiRuby/Entity.html +12 -12
  19. data/docs/ShotgridApiRuby/Preferences.html +4 -4
  20. data/docs/ShotgridApiRuby/ServerInfo.html +4 -4
  21. data/docs/ShotgridApiRuby/ShotgridCallError.html +4 -4
  22. data/docs/ShotgridApiRuby/Types.html +4 -4
  23. data/docs/ShotgridApiRuby.html +5 -5
  24. data/docs/_index.html +5 -5
  25. data/docs/file.README.html +4 -4
  26. data/docs/frames.html +1 -1
  27. data/docs/index.html +4 -4
  28. data/docs/top-level-namespace.html +4 -4
  29. data/lib/shotgrid_api_ruby/version.rb +1 -1
  30. data/shotgrid_api_ruby.gemspec +0 -9
  31. data/sorbet/rbi/gems/activesupport@7.0.4.2.rbi +18676 -0
  32. data/sorbet/rbi/gems/ast@2.4.2.rbi +533 -3
  33. data/sorbet/rbi/gems/backport@1.2.0.rbi +518 -4
  34. data/sorbet/rbi/gems/benchmark@0.2.1.rbi +588 -0
  35. data/sorbet/rbi/gems/bundler-audit@0.9.1.rbi +308 -0
  36. data/sorbet/rbi/gems/byebug@11.1.3.rbi +2065 -28
  37. data/sorbet/rbi/gems/childprocess@4.1.0.rbi +397 -4
  38. data/sorbet/rbi/gems/coderay@1.1.3.rbi +2425 -4
  39. data/sorbet/rbi/gems/concurrent-ruby@1.2.0.rbi +11570 -0
  40. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1083 -0
  41. data/sorbet/rbi/gems/docile@1.4.0.rbi +335 -13
  42. data/sorbet/rbi/gems/dotenv@2.8.1.rbi +234 -0
  43. data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +4 -4
  44. data/sorbet/rbi/gems/faker@3.1.0.rbi +13380 -0
  45. data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +167 -11
  46. data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +94 -11
  47. data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +105 -11
  48. data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +118 -11
  49. data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +273 -0
  50. data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +106 -11
  51. data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +92 -11
  52. data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +97 -11
  53. data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +106 -11
  54. data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +227 -0
  55. data/sorbet/rbi/gems/faraday@1.10.3.rbi +2743 -0
  56. data/sorbet/rbi/gems/ffi@1.15.5.rbi +8 -0
  57. data/sorbet/rbi/gems/formatador@1.1.0.rbi +8 -0
  58. data/sorbet/rbi/gems/guard-compat@1.2.1.rbi +62 -4
  59. data/sorbet/rbi/gems/guard-rspec@4.7.3.rbi +558 -4
  60. data/sorbet/rbi/gems/guard@2.18.0.rbi +4 -4
  61. data/sorbet/rbi/gems/haml@6.1.1.rbi +1588 -0
  62. data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
  63. data/sorbet/rbi/gems/iniparse@1.5.0.rbi +893 -4
  64. data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +15 -4
  65. data/sorbet/rbi/gems/json@2.6.3.rbi +1533 -0
  66. data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +129 -4
  67. data/sorbet/rbi/gems/kramdown@2.4.0.rbi +3271 -0
  68. data/sorbet/rbi/gems/listen@3.8.0.rbi +1181 -0
  69. data/sorbet/rbi/gems/lumberjack@1.2.8.rbi +4 -4
  70. data/sorbet/rbi/gems/method_source@1.0.0.rbi +202 -2
  71. data/sorbet/rbi/gems/minitest@5.17.0.rbi +1457 -0
  72. data/sorbet/rbi/gems/multipart-post@2.3.0.rbi +233 -0
  73. data/sorbet/rbi/gems/nenv@0.3.0.rbi +4 -4
  74. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  75. data/sorbet/rbi/gems/nokogiri@1.14.0.rbi +7250 -0
  76. data/sorbet/rbi/gems/notiffany@0.1.3.rbi +4 -4
  77. data/sorbet/rbi/gems/overcommit@0.60.0.rbi +2399 -0
  78. data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
  79. data/sorbet/rbi/gems/parser@3.2.0.0.rbi +6964 -0
  80. data/sorbet/rbi/gems/prettier@3.2.2.rbi +22 -0
  81. data/sorbet/rbi/gems/prettier_print@1.2.0.rbi +8 -0
  82. data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +1171 -0
  83. data/sorbet/rbi/gems/pry@0.14.2.rbi +10081 -0
  84. data/sorbet/rbi/gems/racc@1.6.2.rbi +154 -0
  85. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +408 -0
  86. data/sorbet/rbi/gems/rake@13.0.6.rbi +2248 -13
  87. data/sorbet/rbi/gems/rb-fsevent@0.11.2.rbi +8 -0
  88. data/sorbet/rbi/gems/rb-inotify@0.10.1.rbi +4 -4
  89. data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
  90. data/sorbet/rbi/gems/rbs@2.8.4.rbi +8 -0
  91. data/sorbet/rbi/gems/regexp_parser@2.6.2.rbi +3481 -0
  92. data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +389 -0
  93. data/sorbet/rbi/gems/rexml@3.2.5.rbi +4048 -3
  94. data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10809 -0
  95. data/sorbet/rbi/gems/rspec-expectations@3.12.2.rbi +8109 -0
  96. data/sorbet/rbi/gems/rspec-mocks@3.12.3.rbi +5308 -0
  97. data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1620 -0
  98. data/sorbet/rbi/gems/rspec@3.12.0.rbi +91 -0
  99. data/sorbet/rbi/gems/rspec_in_context@1.1.0.3.rbi +387 -15
  100. data/sorbet/rbi/gems/rubocop-ast@1.24.1.rbi +7019 -0
  101. data/sorbet/rbi/gems/rubocop-faker@1.1.0.rbi +102 -4
  102. data/sorbet/rbi/gems/rubocop-performance@1.15.2.rbi +3021 -0
  103. data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +990 -0
  104. data/sorbet/rbi/gems/rubocop@1.44.1.rbi +54394 -0
  105. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +1235 -4
  106. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +4 -4
  107. data/sorbet/rbi/gems/shellany@0.0.1.rbi +4 -4
  108. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +135 -5
  109. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2148 -0
  110. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
  111. data/sorbet/rbi/gems/solargraph@0.48.0.rbi +9146 -0
  112. data/sorbet/rbi/gems/spoom@1.1.15.rbi +2383 -0
  113. data/sorbet/rbi/gems/syntax_tree-haml@3.0.0.rbi +8 -0
  114. data/sorbet/rbi/gems/syntax_tree-rbs@0.5.1.rbi +8 -0
  115. data/sorbet/rbi/gems/syntax_tree@5.2.0.rbi +8 -0
  116. data/sorbet/rbi/gems/tapioca@0.10.5.rbi +3226 -0
  117. data/sorbet/rbi/gems/temple@0.10.0.rbi +1722 -0
  118. data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
  119. data/sorbet/rbi/gems/tilt@2.0.11.rbi +745 -0
  120. data/sorbet/rbi/gems/timecop@0.9.6.rbi +368 -0
  121. data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +5914 -0
  122. data/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +65 -0
  123. data/sorbet/rbi/gems/unparser@0.6.7.rbi +4524 -0
  124. data/sorbet/rbi/gems/vcr@6.1.0.rbi +3020 -0
  125. data/sorbet/rbi/gems/webrick@1.7.0.rbi +2555 -0
  126. data/sorbet/rbi/gems/yard-sorbet@0.8.0.rbi +441 -0
  127. data/sorbet/rbi/gems/yard@0.9.28.rbi +17863 -0
  128. data/sorbet/rbi/gems/zeitwerk@2.6.6.rbi +950 -0
  129. data/yarn.lock +3 -3
  130. metadata +67 -186
  131. data/sorbet/rbi/gems/activesupport@6.1.4.1.rbi +0 -3770
  132. data/sorbet/rbi/gems/benchmark@0.1.1.rbi +0 -65
  133. data/sorbet/rbi/gems/bundler-audit@0.8.0.rbi +0 -8
  134. data/sorbet/rbi/gems/colorize@0.8.1.rbi +0 -39
  135. data/sorbet/rbi/gems/commander@4.6.0.rbi +0 -8
  136. data/sorbet/rbi/gems/concurrent-ruby@1.1.9.rbi +0 -2403
  137. data/sorbet/rbi/gems/diff-lcs@1.4.4.rbi +0 -8
  138. data/sorbet/rbi/gems/dotenv@2.7.6.rbi +0 -88
  139. data/sorbet/rbi/gems/faker@2.19.0.rbi +0 -2513
  140. data/sorbet/rbi/gems/faraday@1.7.0.rbi +0 -783
  141. data/sorbet/rbi/gems/ffi@1.15.3.rbi +0 -8
  142. data/sorbet/rbi/gems/formatador@0.3.0.rbi +0 -8
  143. data/sorbet/rbi/gems/haml@5.2.2.rbi +0 -8
  144. data/sorbet/rbi/gems/highline@2.0.3.rbi +0 -8
  145. data/sorbet/rbi/gems/i18n@1.8.10.rbi +0 -584
  146. data/sorbet/rbi/gems/kramdown@2.3.1.rbi +0 -8
  147. data/sorbet/rbi/gems/listen@3.7.0.rbi +0 -476
  148. data/sorbet/rbi/gems/minitest@5.14.4.rbi +0 -344
  149. data/sorbet/rbi/gems/multipart-post@2.1.1.rbi +0 -69
  150. data/sorbet/rbi/gems/nokogiri@1.12.3.rbi +0 -8
  151. data/sorbet/rbi/gems/overcommit@0.58.0.rbi +0 -8
  152. data/sorbet/rbi/gems/parallel@1.20.1.rbi +0 -8
  153. data/sorbet/rbi/gems/parlour@6.0.1.rbi +0 -1610
  154. data/sorbet/rbi/gems/parser@3.0.2.0.rbi +0 -1731
  155. data/sorbet/rbi/gems/prettier@1.6.1.rbi +0 -8
  156. data/sorbet/rbi/gems/pry-byebug@3.9.0.rbi +0 -461
  157. data/sorbet/rbi/gems/pry@0.13.1.rbi +0 -2553
  158. data/sorbet/rbi/gems/racc@1.5.2.rbi +0 -47
  159. data/sorbet/rbi/gems/rainbow@3.0.0.rbi +0 -153
  160. data/sorbet/rbi/gems/rb-fsevent@0.11.0.rbi +0 -8
  161. data/sorbet/rbi/gems/regexp_parser@2.1.1.rbi +0 -8
  162. data/sorbet/rbi/gems/reverse_markdown@2.0.0.rbi +0 -8
  163. data/sorbet/rbi/gems/rspec-core@3.10.1.rbi +0 -2500
  164. data/sorbet/rbi/gems/rspec-expectations@3.10.1.rbi +0 -1574
  165. data/sorbet/rbi/gems/rspec-mocks@3.10.2.rbi +0 -1462
  166. data/sorbet/rbi/gems/rspec-support@3.10.2.rbi +0 -510
  167. data/sorbet/rbi/gems/rspec@3.10.0.rbi +0 -39
  168. data/sorbet/rbi/gems/rubocop-ast@1.11.0.rbi +0 -8
  169. data/sorbet/rbi/gems/rubocop-performance@1.11.5.rbi +0 -8
  170. data/sorbet/rbi/gems/rubocop-sorbet@0.6.2.rbi +0 -8
  171. data/sorbet/rbi/gems/rubocop@1.20.0.rbi +0 -8
  172. data/sorbet/rbi/gems/simplecov@0.21.2.rbi +0 -577
  173. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.3.rbi +0 -8
  174. data/sorbet/rbi/gems/solargraph@0.43.0.rbi +0 -8
  175. data/sorbet/rbi/gems/spoom@1.1.2.rbi +0 -1204
  176. data/sorbet/rbi/gems/tapioca@0.4.25.rbi +0 -1239
  177. data/sorbet/rbi/gems/temple@0.8.2.rbi +0 -8
  178. data/sorbet/rbi/gems/thor@1.1.0.rbi +0 -838
  179. data/sorbet/rbi/gems/tilt@2.0.10.rbi +0 -8
  180. data/sorbet/rbi/gems/timecop@0.9.4.rbi +0 -82
  181. data/sorbet/rbi/gems/tzinfo@2.0.4.rbi +0 -857
  182. data/sorbet/rbi/gems/unicode-display_width@2.0.0.rbi +0 -8
  183. data/sorbet/rbi/gems/unparser@0.6.0.rbi +0 -8
  184. data/sorbet/rbi/gems/vcr@6.0.0.rbi +0 -782
  185. data/sorbet/rbi/gems/yard-sorbet@0.5.3.rbi +0 -8
  186. data/sorbet/rbi/gems/yard@0.9.26.rbi +0 -8
  187. data/sorbet/rbi/gems/zeitwerk@2.4.2.rbi +0 -173
@@ -1,8 +1,897 @@
1
+ # typed: true
2
+
1
3
  # DO NOT EDIT MANUALLY
2
4
  # This is an autogenerated file for types exported from the `iniparse` gem.
3
- # Please instead update this file by running `bin/tapioca sync`.
5
+ # Please instead update this file by running `bin/tapioca gem iniparse`.
4
6
 
5
- # typed: true
7
+ # source://iniparse//lib/iniparse/document.rb#1
8
+ module IniParse
9
+ private
10
+
11
+ # Creates a new IniParse::Document using the specification you provide.
12
+ #
13
+ # See IniParse::Generator.
14
+ #
15
+ # ==== Returns
16
+ # IniParse::Document
17
+ #
18
+ # source://iniparse//lib/iniparse.rb#63
19
+ def gen(&blk); end
20
+
21
+ # Opens the file at +path+, reads and parses it's contents.
22
+ #
23
+ # ==== Parameters
24
+ # path<String>:: The path to the INI document.
25
+ #
26
+ # ==== Returns
27
+ # IniParse::Document
28
+ #
29
+ # source://iniparse//lib/iniparse.rb#50
30
+ def open(path); end
31
+
32
+ # Parse given given INI document source +source+.
33
+ #
34
+ # See IniParse::Parser.parse
35
+ #
36
+ # ==== Parameters
37
+ # source<String>:: The source from the INI document.
38
+ #
39
+ # ==== Returns
40
+ # IniParse::Document
41
+ #
42
+ # source://iniparse//lib/iniparse.rb#38
43
+ def parse(source); end
44
+
45
+ class << self
46
+ # Creates a new IniParse::Document using the specification you provide.
47
+ #
48
+ # See IniParse::Generator.
49
+ #
50
+ # ==== Returns
51
+ # IniParse::Document
52
+ #
53
+ # source://iniparse//lib/iniparse.rb#63
54
+ def gen(&blk); end
55
+
56
+ # Opens the file at +path+, reads and parses it's contents.
57
+ #
58
+ # ==== Parameters
59
+ # path<String>:: The path to the INI document.
60
+ #
61
+ # ==== Returns
62
+ # IniParse::Document
63
+ #
64
+ # source://iniparse//lib/iniparse.rb#50
65
+ def open(path); end
66
+
67
+ # Parse given given INI document source +source+.
68
+ #
69
+ # See IniParse::Parser.parse
70
+ #
71
+ # ==== Parameters
72
+ # source<String>:: The source from the INI document.
73
+ #
74
+ # ==== Returns
75
+ # IniParse::Document
76
+ #
77
+ # source://iniparse//lib/iniparse.rb#38
78
+ def parse(source); end
79
+ end
80
+ end
81
+
82
+ # Represents an INI document.
83
+ #
84
+ # source://iniparse//lib/iniparse/document.rb#3
85
+ class IniParse::Document
86
+ include ::Enumerable
87
+
88
+ # Creates a new Document instance.
89
+ #
90
+ # @return [Document] a new instance of Document
91
+ #
92
+ # source://iniparse//lib/iniparse/document.rb#10
93
+ def initialize(path = T.unsafe(nil)); end
94
+
95
+ # Returns the section identified by +key+.
96
+ #
97
+ # Returns nil if there is no Section with the given key.
98
+ #
99
+ # source://iniparse//lib/iniparse/document.rb#31
100
+ def [](key); end
101
+
102
+ # Deletes the section whose name matches the given +key+.
103
+ #
104
+ # Returns the document.
105
+ #
106
+ # source://iniparse//lib/iniparse/document.rb#47
107
+ def delete(*args); end
108
+
109
+ # Enumerates through each Section in this document.
110
+ #
111
+ # Does not yield blank and comment lines by default; if you want _all_
112
+ # lines to be yielded, pass true.
113
+ #
114
+ # ==== Parameters
115
+ # include_blank<Boolean>:: Include blank/comment lines?
116
+ #
117
+ # source://iniparse//lib/iniparse/document.rb#23
118
+ def each(*args, &blk); end
119
+
120
+ # Returns true if a section with the given +key+ exists in this document.
121
+ #
122
+ # @return [Boolean]
123
+ #
124
+ # source://iniparse//lib/iniparse/document.rb#87
125
+ def has_section?(key); end
126
+
127
+ # A human-readable version of the document, for debugging.
128
+ #
129
+ # source://iniparse//lib/iniparse/document.rb#81
130
+ def inspect; end
131
+
132
+ # Returns the value of attribute lines.
133
+ #
134
+ # source://iniparse//lib/iniparse/document.rb#6
135
+ def lines; end
136
+
137
+ # Returns the value of attribute path.
138
+ #
139
+ # source://iniparse//lib/iniparse/document.rb#7
140
+ def path; end
141
+
142
+ # Sets the attribute path
143
+ #
144
+ # @param value the value to set the attribute path to.
145
+ #
146
+ # source://iniparse//lib/iniparse/document.rb#7
147
+ def path=(_arg0); end
148
+
149
+ # Saves a copy of this Document to disk.
150
+ #
151
+ # If a path was supplied when the Document was initialized then nothing
152
+ # needs to be given to Document#save. If Document was not given a file
153
+ # path, or you wish to save the document elsewhere, supply a path when
154
+ # calling Document#save.
155
+ #
156
+ # ==== Parameters
157
+ # path<String>:: A path to which this document will be saved.
158
+ #
159
+ # ==== Raises
160
+ # IniParseError:: If your document couldn't be saved.
161
+ #
162
+ # @raise [IniParseError]
163
+ #
164
+ # source://iniparse//lib/iniparse/document.rb#104
165
+ def save(path = T.unsafe(nil)); end
166
+
167
+ # Returns the section identified by +key+.
168
+ #
169
+ # If there is no Section with the given key it will be created.
170
+ #
171
+ # source://iniparse//lib/iniparse/document.rb#39
172
+ def section(key); end
173
+
174
+ # Returns a has representation of the INI with multi-line options
175
+ # as an array
176
+ #
177
+ # source://iniparse//lib/iniparse/document.rb#64
178
+ def to_h; end
179
+
180
+ # Returns a has representation of the INI with multi-line options
181
+ # as an array
182
+ #
183
+ # source://iniparse//lib/iniparse/document.rb#64
184
+ def to_hash; end
185
+
186
+ # Returns this document as a string suitable for saving to a file.
187
+ #
188
+ # source://iniparse//lib/iniparse/document.rb#53
189
+ def to_ini; end
190
+
191
+ # Returns this document as a string suitable for saving to a file.
192
+ #
193
+ # source://iniparse//lib/iniparse/document.rb#53
194
+ def to_s; end
195
+ end
196
+
197
+ # Generator provides a means for easily creating new INI documents.
198
+ #
199
+ # Rather than trying to hack together new INI documents by manually creating
200
+ # Document, Section and Option instances, it is preferable to use Generator
201
+ # which will handle it all for you.
202
+ #
203
+ # The Generator is exposed through IniParse.gen.
204
+ #
205
+ # IniParse.gen do |doc|
206
+ # doc.section("vehicle") do |vehicle|
207
+ # vehicle.option("road_side", "left")
208
+ # vehicle.option("realistic_acceleration", true)
209
+ # vehicle.option("max_trains", 500)
210
+ # end
211
+ #
212
+ # doc.section("construction") do |construction|
213
+ # construction.option("build_on_slopes", true)
214
+ # construction.option("autoslope", true)
215
+ # end
216
+ # end
217
+ #
218
+ # # => IniParse::Document
219
+ #
220
+ # This can be simplified further if you don't mind the small overhead
221
+ # which comes with +method_missing+:
222
+ #
223
+ # IniParse.gen do |doc|
224
+ # doc.vehicle do |vehicle|
225
+ # vehicle.road_side = "left"
226
+ # vehicle.realistic_acceleration = true
227
+ # vehicle.max_trains = 500
228
+ # end
229
+ #
230
+ # doc.construction do |construction|
231
+ # construction.build_on_slopes = true
232
+ # construction.autoslope = true
233
+ # end
234
+ # end
235
+ #
236
+ # # => IniParse::Document
237
+ #
238
+ # If you want to add slightly more complicated formatting to your document,
239
+ # each line type (except blanks) takes a number of optional parameters:
240
+ #
241
+ # :comment::
242
+ # Adds an inline comment at the end of the line.
243
+ # :comment_offset::
244
+ # Indent the comment. Measured in characters from _beginning_ of the line.
245
+ # See String#ljust.
246
+ # :indent::
247
+ # Adds the supplied text to the beginning of the line.
248
+ #
249
+ # If you supply +:indent+, +:comment_sep+, or +:comment_offset+ options when
250
+ # adding a section, the same options will be inherited by all of the options
251
+ # which belong to it.
252
+ #
253
+ # IniParse.gen do |doc|
254
+ # doc.section("vehicle",
255
+ # :comment => "Options for vehicles", :indent => " "
256
+ # ) do |vehicle|
257
+ # vehicle.option("road_side", "left")
258
+ # vehicle.option("realistic_acceleration", true)
259
+ # vehicle.option("max_trains", 500, :comment => "More = slower")
260
+ # end
261
+ # end.to_ini
262
+ #
263
+ # [vehicle] ; Options for vehicles
264
+ # road_side = left
265
+ # realistic_acceleration = true
266
+ # max_trains = 500 ; More = slower
267
+ #
268
+ # source://iniparse//lib/iniparse/generator.rb#73
269
+ class IniParse::Generator
270
+ # @return [Generator] a new instance of Generator
271
+ #
272
+ # source://iniparse//lib/iniparse/generator.rb#77
273
+ def initialize(opts = T.unsafe(nil)); end
274
+
275
+ # Adds a new blank line to the document.
276
+ #
277
+ # source://iniparse//lib/iniparse/generator.rb#170
278
+ def blank; end
279
+
280
+ # Adds a new comment line to the document.
281
+ #
282
+ # ==== Parameters
283
+ # comment<String>:: The text for the comment line.
284
+ #
285
+ # source://iniparse//lib/iniparse/generator.rb#163
286
+ def comment(comment, opts = T.unsafe(nil)); end
287
+
288
+ # Returns the value of attribute context.
289
+ #
290
+ # source://iniparse//lib/iniparse/generator.rb#74
291
+ def context; end
292
+
293
+ # Returns the value of attribute document.
294
+ #
295
+ # source://iniparse//lib/iniparse/generator.rb#75
296
+ def document; end
297
+
298
+ # @yield [_self]
299
+ # @yieldparam _self [IniParse::Generator] the object that the method was called on
300
+ #
301
+ # source://iniparse//lib/iniparse/generator.rb#85
302
+ def gen; end
303
+
304
+ # source://iniparse//lib/iniparse/generator.rb#183
305
+ def method_missing(name, *args, &blk); end
306
+
307
+ # Adds a new option to the current section.
308
+ #
309
+ # Can only be called as part of a section block, or after at least one
310
+ # section has been added to the document.
311
+ #
312
+ # ==== Parameters
313
+ # key<String>:: The key (name) for this option.
314
+ # value:: The option's value.
315
+ # opts<Hash>:: Extra options for the line (formatting, etc).
316
+ #
317
+ # ==== Raises
318
+ # IniParse::NoSectionError::
319
+ # If no section has been added to the document yet.
320
+ #
321
+ # source://iniparse//lib/iniparse/generator.rb#147
322
+ def option(key, value, opts = T.unsafe(nil)); end
323
+
324
+ # Creates a new section with the given name and adds it to the document.
325
+ #
326
+ # You can optionally supply a block (as detailed in the documentation for
327
+ # Generator#gen) in order to add options to the section.
328
+ #
329
+ # ==== Parameters
330
+ # name<String>:: A name for the given section.
331
+ #
332
+ # source://iniparse//lib/iniparse/generator.rb#107
333
+ def section(name, opts = T.unsafe(nil)); end
334
+
335
+ # Wraps lines, setting default options for each.
336
+ #
337
+ # @yield [_self]
338
+ # @yieldparam _self [IniParse::Generator] the object that the method was called on
339
+ #
340
+ # source://iniparse//lib/iniparse/generator.rb#175
341
+ def with_options(opts = T.unsafe(nil)); end
342
+
343
+ private
344
+
345
+ # Returns options for a line.
346
+ #
347
+ # If the context is a section, we use the section options as a base,
348
+ # rather than the global defaults.
349
+ #
350
+ # source://iniparse//lib/iniparse/generator.rb#200
351
+ def line_options(given_opts); end
352
+
353
+ class << self
354
+ # Creates a new IniParse::Document with the given sections and options.
355
+ #
356
+ # ==== Returns
357
+ # IniParse::Document
358
+ #
359
+ # source://iniparse//lib/iniparse/generator.rb#95
360
+ def gen(opts = T.unsafe(nil), &blk); end
361
+ end
362
+ end
363
+
364
+ # A base class for IniParse errors.
365
+ #
366
+ # source://iniparse//lib/iniparse.rb#13
367
+ class IniParse::IniParseError < ::StandardError; end
368
+
369
+ # Represents a collection of lines in an INI document.
370
+ #
371
+ # LineCollection acts a bit like an Array/Hash hybrid, allowing arbitrary
372
+ # lines to be added to the collection, but also indexes the keys of Section
373
+ # and Option lines to enable O(1) lookup via LineCollection#[].
374
+ #
375
+ # The lines instances are stored in an array, +@lines+, while the index of
376
+ # each Section/Option is held in a Hash, +@indicies+, keyed with the
377
+ # Section/Option#key value (see LineCollection#[]=).
378
+ #
379
+ # source://iniparse//lib/iniparse/line_collection.rb#12
380
+ module IniParse::LineCollection
381
+ include ::Enumerable
382
+
383
+ # source://iniparse//lib/iniparse/line_collection.rb#15
384
+ def initialize; end
385
+
386
+ # Appends a line to the collection.
387
+ #
388
+ # Note that if you pass a line with a key already represented in the
389
+ # collection, the old item will be replaced.
390
+ #
391
+ # source://iniparse//lib/iniparse/line_collection.rb#46
392
+ def <<(line); end
393
+
394
+ # Retrive a value identified by +key+.
395
+ #
396
+ # source://iniparse//lib/iniparse/line_collection.rb#21
397
+ def [](key); end
398
+
399
+ # Set a +value+ identified by +key+.
400
+ #
401
+ # If a value with the given key already exists, the value will be replaced
402
+ # with the new one, with the new value taking the position of the old.
403
+ #
404
+ # source://iniparse//lib/iniparse/line_collection.rb#30
405
+ def []=(key, value); end
406
+
407
+ # Removes the value identified by +key+.
408
+ #
409
+ # source://iniparse//lib/iniparse/line_collection.rb#70
410
+ def delete(key); end
411
+
412
+ # Enumerates through the collection.
413
+ #
414
+ # By default #each does not yield blank and comment lines.
415
+ #
416
+ # ==== Parameters
417
+ # include_blank<Boolean>:: Include blank/comment lines?
418
+ #
419
+ # source://iniparse//lib/iniparse/line_collection.rb#59
420
+ def each(include_blank = T.unsafe(nil)); end
421
+
422
+ # Returns whether +key+ is in the collection.
423
+ #
424
+ # @return [Boolean]
425
+ #
426
+ # source://iniparse//lib/iniparse/line_collection.rb#81
427
+ def has_key?(*args); end
428
+
429
+ # Return an array containing the keys for the lines added to this
430
+ # collection.
431
+ #
432
+ # source://iniparse//lib/iniparse/line_collection.rb#87
433
+ def keys; end
434
+
435
+ # Appends a line to the collection.
436
+ #
437
+ # Note that if you pass a line with a key already represented in the
438
+ # collection, the old item will be replaced.
439
+ #
440
+ # source://iniparse//lib/iniparse/line_collection.rb#46
441
+ def push(line); end
442
+
443
+ # Returns this collection as an array. Includes blank and comment lines.
444
+ #
445
+ # source://iniparse//lib/iniparse/line_collection.rb#92
446
+ def to_a; end
447
+
448
+ # Returns this collection as a hash. Does not contain blank and comment
449
+ # lines.
450
+ #
451
+ # source://iniparse//lib/iniparse/line_collection.rb#98
452
+ def to_h; end
453
+
454
+ # Returns this collection as a hash. Does not contain blank and comment
455
+ # lines.
456
+ #
457
+ # source://iniparse//lib/iniparse/line_collection.rb#98
458
+ def to_hash; end
459
+ end
460
+
461
+ # Raised when a line is added to a collection which isn't allowed (e.g.
462
+ # adding a Section line into an OptionCollection).
463
+ #
464
+ # source://iniparse//lib/iniparse.rb#24
465
+ class IniParse::LineNotAllowed < ::IniParse::IniParseError; end
466
+
467
+ # source://iniparse//lib/iniparse/lines.rb#2
468
+ module IniParse::Lines; end
469
+
470
+ # Stores options which appear at the beginning of a file, without a
471
+ # preceding section.
472
+ #
473
+ # source://iniparse//lib/iniparse/lines.rb#225
474
+ class IniParse::Lines::AnonymousSection < ::IniParse::Lines::Section
475
+ # @return [AnonymousSection] a new instance of AnonymousSection
476
+ #
477
+ # source://iniparse//lib/iniparse/lines.rb#226
478
+ def initialize; end
479
+
480
+ # source://iniparse//lib/iniparse/lines.rb#230
481
+ def to_ini; end
482
+
483
+ private
484
+
485
+ # source://iniparse//lib/iniparse/lines.rb#240
486
+ def line_contents; end
487
+ end
488
+
489
+ # Represents a blank line. Used so that we can preserve blank lines when
490
+ # writing back to the file.
491
+ #
492
+ # source://iniparse//lib/iniparse/lines.rb#307
493
+ class IniParse::Lines::Blank
494
+ include ::IniParse::Lines::Line
495
+
496
+ # @return [Boolean]
497
+ #
498
+ # source://iniparse//lib/iniparse/lines.rb#310
499
+ def blank?; end
500
+
501
+ class << self
502
+ # source://iniparse//lib/iniparse/lines.rb#314
503
+ def parse(line, opts); end
504
+ end
505
+ end
506
+
507
+ # Represents a comment. Comment lines begin with a semi-colon or hash.
508
+ #
509
+ # ; this is a comment
510
+ # # also a comment
511
+ #
512
+ # source://iniparse//lib/iniparse/lines.rb#330
513
+ class IniParse::Lines::Comment < ::IniParse::Lines::Blank
514
+ # Returns the inline comment for this line. Includes the comment
515
+ # separator at the beginning of the string.
516
+ #
517
+ # In rare cases where a comment seperator appeared in the original file,
518
+ # but without a comment, just the seperator will be returned.
519
+ #
520
+ # source://iniparse//lib/iniparse/lines.rb#348
521
+ def comment; end
522
+
523
+ # Returns if this line has an inline comment.
524
+ #
525
+ # Being a Comment this will always return true, even if the comment
526
+ # is nil. This would be the case if the line starts with a comment
527
+ # seperator, but has no comment text. See spec/fixtures/smb.ini for a
528
+ # real-world example.
529
+ #
530
+ # @return [Boolean]
531
+ #
532
+ # source://iniparse//lib/iniparse/lines.rb#338
533
+ def has_comment?; end
534
+ end
535
+
536
+ # A base class from which other line types should inherit.
537
+ #
538
+ # source://iniparse//lib/iniparse/lines.rb#4
539
+ module IniParse::Lines::Line
540
+ # ==== Parameters
541
+ # opts<Hash>:: Extra options for the line.
542
+ #
543
+ # source://iniparse//lib/iniparse/lines.rb#8
544
+ def initialize(opts = T.unsafe(nil)); end
545
+
546
+ # Returns whether this is a line which has no data.
547
+ #
548
+ # @return [Boolean]
549
+ #
550
+ # source://iniparse//lib/iniparse/lines.rb#47
551
+ def blank?; end
552
+
553
+ # Returns the inline comment for this line. Includes the comment
554
+ # separator at the beginning of the string.
555
+ #
556
+ # source://iniparse//lib/iniparse/lines.rb#42
557
+ def comment; end
558
+
559
+ # Returns if this line has an inline comment.
560
+ #
561
+ # @return [Boolean]
562
+ #
563
+ # source://iniparse//lib/iniparse/lines.rb#18
564
+ def has_comment?; end
565
+
566
+ # Returns the contents for this line.
567
+ #
568
+ # source://iniparse//lib/iniparse/lines.rb#36
569
+ def line_contents; end
570
+
571
+ # Returns the options used to create the line
572
+ #
573
+ # source://iniparse//lib/iniparse/lines.rb#52
574
+ def options; end
575
+
576
+ # Returns this line as a string as it would be represented in an INI
577
+ # document.
578
+ #
579
+ # source://iniparse//lib/iniparse/lines.rb#24
580
+ def to_ini; end
581
+ end
582
+
583
+ # Represents probably the most common type of line in an INI document:
584
+ # an option. Consists of a key and value, usually separated with an =.
585
+ #
586
+ # key = value
587
+ #
588
+ # source://iniparse//lib/iniparse/lines.rb#250
589
+ class IniParse::Lines::Option
590
+ include ::IniParse::Lines::Line
591
+
592
+ # ==== Parameters
593
+ # key<String>:: The option key.
594
+ # value<String>:: The value for this option.
595
+ # opts<Hash>:: Extra options for the line.
596
+ #
597
+ # @return [Option] a new instance of Option
598
+ #
599
+ # source://iniparse//lib/iniparse/lines.rb#265
600
+ def initialize(key, value, opts = T.unsafe(nil)); end
601
+
602
+ # Returns the value of attribute key.
603
+ #
604
+ # source://iniparse//lib/iniparse/lines.rb#258
605
+ def key; end
606
+
607
+ # Sets the attribute key
608
+ #
609
+ # @param value the value to set the attribute key to.
610
+ #
611
+ # source://iniparse//lib/iniparse/lines.rb#258
612
+ def key=(_arg0); end
613
+
614
+ # Returns the value of attribute value.
615
+ #
616
+ # source://iniparse//lib/iniparse/lines.rb#258
617
+ def value; end
618
+
619
+ # Sets the attribute value
620
+ #
621
+ # @param value the value to set the attribute value to.
622
+ #
623
+ # source://iniparse//lib/iniparse/lines.rb#258
624
+ def value=(_arg0); end
625
+
626
+ private
627
+
628
+ # returns an array to support multiple lines or a single one at once
629
+ # because of options key duplication
630
+ #
631
+ # source://iniparse//lib/iniparse/lines.rb#296
632
+ def line_contents; end
633
+
634
+ class << self
635
+ # source://iniparse//lib/iniparse/lines.rb#271
636
+ def parse(line, opts); end
637
+
638
+ # Attempts to typecast values.
639
+ #
640
+ # source://iniparse//lib/iniparse/lines.rb#279
641
+ def typecast(value); end
642
+ end
643
+ end
644
+
645
+ # Represents a section header in an INI document. Section headers consist
646
+ # of a string of characters wrapped in square brackets.
647
+ #
648
+ # [section]
649
+ # key=value
650
+ # etc
651
+ # ...
652
+ #
653
+ # source://iniparse//lib/iniparse/lines.rb#72
654
+ class IniParse::Lines::Section
655
+ include ::IniParse::Lines::Line
656
+ include ::Enumerable
657
+
658
+ # ==== Parameters
659
+ # key<String>:: The section name.
660
+ # opts<Hash>:: Extra options for the line.
661
+ #
662
+ # @return [Section] a new instance of Section
663
+ #
664
+ # source://iniparse//lib/iniparse/lines.rb#89
665
+ def initialize(key, opts = T.unsafe(nil)); end
666
+
667
+ # Returns the value of an option identified by +key+.
668
+ #
669
+ # Returns nil if there is no corresponding option. If the key provided
670
+ # matches a set of duplicate options, an array will be returned containing
671
+ # the value of each option.
672
+ #
673
+ # source://iniparse//lib/iniparse/lines.rb#162
674
+ def [](key); end
675
+
676
+ # Adds a new option to this section, or updates an existing one.
677
+ #
678
+ # Note that +[]=+ has no knowledge of duplicate options and will happily
679
+ # overwrite duplicate options with your new value.
680
+ #
681
+ # section['an_option']
682
+ # # => ['duplicate one', 'duplicate two', ...]
683
+ # section['an_option'] = 'new value'
684
+ # section['an_option]
685
+ # # => 'new value'
686
+ #
687
+ # If you do not wish to overwrite duplicates, but wish instead for your
688
+ # new option to be considered a duplicate, use +add_option+ instead.
689
+ #
690
+ # source://iniparse//lib/iniparse/lines.rb#145
691
+ def []=(key, value); end
692
+
693
+ # Deletes the option identified by +key+.
694
+ #
695
+ # Returns the section.
696
+ #
697
+ # source://iniparse//lib/iniparse/lines.rb#178
698
+ def delete(*args); end
699
+
700
+ # Enumerates through each Option in this section.
701
+ #
702
+ # Does not yield blank and comment lines by default; if you want _all_
703
+ # lines to be yielded, pass true.
704
+ #
705
+ # ==== Parameters
706
+ # include_blank<Boolean>:: Include blank/comment lines?
707
+ #
708
+ # source://iniparse//lib/iniparse/lines.rb#127
709
+ def each(*args, &blk); end
710
+
711
+ # Returns true if an option with the given +key+ exists in this section.
712
+ #
713
+ # @return [Boolean]
714
+ #
715
+ # source://iniparse//lib/iniparse/lines.rb#193
716
+ def has_option?(key); end
717
+
718
+ # Returns the value of attribute key.
719
+ #
720
+ # source://iniparse//lib/iniparse/lines.rb#80
721
+ def key; end
722
+
723
+ # Sets the attribute key
724
+ #
725
+ # @param value the value to set the attribute key to.
726
+ #
727
+ # source://iniparse//lib/iniparse/lines.rb#80
728
+ def key=(_arg0); end
729
+
730
+ # Returns the value of attribute lines.
731
+ #
732
+ # source://iniparse//lib/iniparse/lines.rb#81
733
+ def lines; end
734
+
735
+ # Merges section +other+ into this one. If the section being merged into
736
+ # this one contains options with the same key, they will be handled as
737
+ # duplicates.
738
+ #
739
+ # ==== Parameters
740
+ # other<IniParse::Section>:: The section to merge into this one.
741
+ #
742
+ # source://iniparse//lib/iniparse/lines.rb#204
743
+ def merge!(other); end
744
+
745
+ # Like [], except instead of returning just the option value, it returns
746
+ # the matching line instance.
747
+ #
748
+ # Will return an array of lines if the key matches a set of duplicates.
749
+ #
750
+ # source://iniparse//lib/iniparse/lines.rb#188
751
+ def option(key); end
752
+
753
+ # Returns this line as a string as it would be represented in an INI
754
+ # document. Includes options, comments and blanks.
755
+ #
756
+ # source://iniparse//lib/iniparse/lines.rb#103
757
+ def to_ini; end
758
+
759
+ private
760
+
761
+ # source://iniparse//lib/iniparse/lines.rb#218
762
+ def line_contents; end
763
+
764
+ class << self
765
+ # source://iniparse//lib/iniparse/lines.rb#95
766
+ def parse(line, opts); end
767
+ end
768
+ end
769
+
770
+ # Raised when an option line is found during parsing before the first
771
+ # section.
772
+ #
773
+ # source://iniparse//lib/iniparse.rb#20
774
+ class IniParse::NoSectionError < ::IniParse::ParseError; end
775
+
776
+ # A implementation of LineCollection used for storing (mostly) Option
777
+ # instances contained within a Section.
778
+ #
779
+ # Whenever OptionCollection encounters an Option key already held in the
780
+ # collection, it treats it as a duplicate. This means that instead of
781
+ # overwriting the existing value, the value is changed to an array
782
+ # containing the previous _and_ the new Option instances.
783
+ #
784
+ # source://iniparse//lib/iniparse/line_collection.rb#140
785
+ class IniParse::OptionCollection
786
+ include ::Enumerable
787
+ include ::IniParse::LineCollection
788
+
789
+ # Appends a line to the collection.
790
+ #
791
+ # If you push an Option with a key already represented in the collection,
792
+ # the previous Option will not be overwritten, but treated as a duplicate.
793
+ #
794
+ # ==== Parameters
795
+ # line<IniParse::LineType::Line>:: The line to be added to this section.
796
+ #
797
+ # source://iniparse//lib/iniparse/line_collection.rb#151
798
+ def <<(line); end
799
+
800
+ # source://iniparse//lib/iniparse/line_collection.rb#166
801
+ def each(*args); end
802
+
803
+ # Return an array containing the keys for the lines added to this
804
+ # collection.
805
+ #
806
+ # source://iniparse//lib/iniparse/line_collection.rb#180
807
+ def keys; end
808
+ end
809
+
810
+ # Raised if an error occurs parsing an INI document.
811
+ #
812
+ # source://iniparse//lib/iniparse.rb#16
813
+ class IniParse::ParseError < ::IniParse::IniParseError; end
814
+
815
+ # source://iniparse//lib/iniparse/parser.rb#2
816
+ class IniParse::Parser
817
+ # Creates a new Parser instance for parsing string +source+.
818
+ #
819
+ # ==== Parameters
820
+ # source<String>:: The source string.
821
+ #
822
+ # @return [Parser] a new instance of Parser
823
+ #
824
+ # source://iniparse//lib/iniparse/parser.rb#31
825
+ def initialize(source); end
826
+
827
+ # Parses the source string and returns the resulting data structure.
828
+ #
829
+ # ==== Returns
830
+ # IniParse::Document
831
+ #
832
+ # source://iniparse//lib/iniparse/parser.rb#40
833
+ def parse; end
834
+
835
+ class << self
836
+ # Takes a raw line from an INI document, striping out any inline
837
+ # comment, and indent, then returns the appropriate tuple so that the
838
+ # Generator instance can add the line to the Document.
839
+ #
840
+ # ==== Raises
841
+ # IniParse::ParseError: If the line could not be parsed.
842
+ #
843
+ # source://iniparse//lib/iniparse/parser.rb#56
844
+ def parse_line(line); end
845
+
846
+ # Returns the line types.
847
+ #
848
+ # ==== Returns
849
+ # Array
850
+ #
851
+ # source://iniparse//lib/iniparse/parser.rb#9
852
+ def parse_types; end
853
+
854
+ # Sets the line types. Handy if you want to add your own custom Line
855
+ # classes.
856
+ #
857
+ # ==== Parameters
858
+ # types<Array[IniParse::Lines::Line]>:: An array containing Line classes.
859
+ #
860
+ # source://iniparse//lib/iniparse/parser.rb#19
861
+ def parse_types=(types); end
862
+
863
+ private
864
+
865
+ # Strips in inline comment from a line (or value), removes trailing
866
+ # whitespace and sets the comment options as applicable.
867
+ #
868
+ # source://iniparse//lib/iniparse/parser.rb#79
869
+ def strip_comment(line, opts); end
870
+
871
+ # Removes any leading whitespace from a line, and adds it to the options
872
+ # hash.
873
+ #
874
+ # source://iniparse//lib/iniparse/parser.rb#100
875
+ def strip_indent(line, opts); end
876
+ end
877
+ end
878
+
879
+ # A implementation of LineCollection used for storing (mostly) Option
880
+ # instances contained within a Section.
881
+ #
882
+ # Since it is assumed that an INI document will only represent a section
883
+ # once, if SectionCollection encounters a Section key already held in the
884
+ # collection, the existing section is merged with the new one (see
885
+ # IniParse::Lines::Section#merge!).
886
+ #
887
+ # source://iniparse//lib/iniparse/line_collection.rb#112
888
+ class IniParse::SectionCollection
889
+ include ::Enumerable
890
+ include ::IniParse::LineCollection
891
+
892
+ # source://iniparse//lib/iniparse/line_collection.rb#115
893
+ def <<(line); end
894
+ end
6
895
 
7
- # THIS IS AN EMPTY RBI FILE.
8
- # see https://github.com/Shopify/tapioca/blob/master/README.md#manual-gem-requires
896
+ # source://iniparse//lib/iniparse.rb#10
897
+ IniParse::VERSION = T.let(T.unsafe(nil), String)