checkoff 0.223.0 → 0.225.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (227) hide show
  1. checksums.yaml +4 -4
  2. data/checkoff.gemspec +10 -5
  3. data/lib/checkoff/cli.rb +1 -1
  4. data/lib/checkoff/clients.rb +1 -1
  5. data/lib/checkoff/custom_fields.rb +1 -1
  6. data/lib/checkoff/events.rb +1 -1
  7. data/lib/checkoff/internal/config_loader.rb +2 -3
  8. data/lib/checkoff/internal/selector_classes/section/function_evaluator.rb +3 -2
  9. data/lib/checkoff/my_tasks.rb +1 -1
  10. data/lib/checkoff/portfolios.rb +11 -9
  11. data/lib/checkoff/projects.rb +1 -1
  12. data/lib/checkoff/sections.rb +3 -4
  13. data/lib/checkoff/tags.rb +66 -17
  14. data/lib/checkoff/tasks.rb +1 -1
  15. data/lib/checkoff/version.rb +1 -1
  16. data/lib/checkoff/workspaces.rb +1 -1
  17. data/rbi/checkoff.rbi +4529 -0
  18. data/sig/checkoff.rbs +3749 -0
  19. metadata +4 -210
  20. data/.circleci/config.yml +0 -291
  21. data/.envrc +0 -9
  22. data/.git-hooks/pre_commit/circle_ci.rb +0 -26
  23. data/.git-hooks/pre_commit/punchlist.rb +0 -52
  24. data/.git-hooks/pre_commit/solargraph_typecheck.rb +0 -77
  25. data/.gitattributes +0 -6
  26. data/.gitignore +0 -65
  27. data/.markdownlint_style.rb +0 -4
  28. data/.mdlrc +0 -1
  29. data/.overcommit.yml +0 -115
  30. data/.rubocop.yml +0 -143
  31. data/.rubocop_todo.yml +0 -90
  32. data/.solargraph.yml +0 -35
  33. data/.yamllint.yml +0 -8
  34. data/.yardopts +0 -2
  35. data/CODE_OF_CONDUCT.md +0 -133
  36. data/CONTRIBUTING.rst +0 -75
  37. data/DEVELOPMENT.md +0 -69
  38. data/GLOSSARY.md +0 -16
  39. data/Gemfile +0 -67
  40. data/Gemfile.lock +0 -351
  41. data/LICENSE +0 -21
  42. data/Makefile +0 -139
  43. data/bin/brakeman +0 -27
  44. data/bin/bump +0 -29
  45. data/bin/checkoff +0 -29
  46. data/bin/console +0 -15
  47. data/bin/overcommit +0 -29
  48. data/bin/overcommit_branch +0 -114
  49. data/bin/rake +0 -29
  50. data/bin/rubocop +0 -27
  51. data/bin/setup +0 -8
  52. data/bin/solargraph +0 -27
  53. data/bin/sord +0 -27
  54. data/bin/spoom +0 -27
  55. data/bin/srb +0 -27
  56. data/bin/srb-rbi +0 -27
  57. data/bin/tapioca +0 -27
  58. data/bin/yard +0 -27
  59. data/config/annotations_asana.rb +0 -253
  60. data/config/annotations_misc.rb +0 -68
  61. data/config/env.1p +0 -2
  62. data/docs/.gitignore +0 -3
  63. data/docs/cookiecutter_input.json +0 -17
  64. data/docs/example_project.png +0 -0
  65. data/fix.sh +0 -534
  66. data/metrics/bigfiles_high_water_mark +0 -1
  67. data/metrics/brakeman_high_water_mark +0 -1
  68. data/metrics/bundle-audit_high_water_mark +0 -1
  69. data/metrics/cane_high_water_mark +0 -1
  70. data/metrics/eslint_high_water_mark +0 -1
  71. data/metrics/flake8_high_water_mark +0 -1
  72. data/metrics/flay_high_water_mark +0 -1
  73. data/metrics/flog_high_water_mark +0 -1
  74. data/metrics/jscs_high_water_mark +0 -1
  75. data/metrics/mdl_high_water_mark +0 -1
  76. data/metrics/pep8_high_water_mark +0 -1
  77. data/metrics/punchlist_high_water_mark +0 -1
  78. data/metrics/pycodestyle_high_water_mark +0 -1
  79. data/metrics/rails_best_practices_high_water_mark +0 -1
  80. data/metrics/rubocop_high_water_mark +0 -1
  81. data/metrics/scalastyle_high_water_mark +0 -1
  82. data/metrics/shellcheck_high_water_mark +0 -1
  83. data/package.json +0 -9
  84. data/rakelib/citest.rake +0 -4
  85. data/rakelib/clear_metrics.rake +0 -9
  86. data/rakelib/console.rake +0 -15
  87. data/rakelib/default.rake +0 -4
  88. data/rakelib/doc.rake +0 -6
  89. data/rakelib/gem_tasks.rake +0 -3
  90. data/rakelib/localtest.rake +0 -4
  91. data/rakelib/overcommit.rake +0 -6
  92. data/rakelib/quality.rake +0 -4
  93. data/rakelib/repl.rake +0 -4
  94. data/rakelib/test.rake +0 -10
  95. data/rakelib/trigger_next_builds.rake +0 -7
  96. data/rakelib/undercover.rake +0 -8
  97. data/requirements_dev.txt +0 -2
  98. data/sorbet/config +0 -4
  99. data/sorbet/rbi/annotations/.gitattributes +0 -1
  100. data/sorbet/rbi/annotations/activesupport.rbi +0 -453
  101. data/sorbet/rbi/annotations/faraday.rbi +0 -17
  102. data/sorbet/rbi/annotations/minitest.rbi +0 -119
  103. data/sorbet/rbi/annotations/mocha.rbi +0 -34
  104. data/sorbet/rbi/annotations/rainbow.rbi +0 -269
  105. data/sorbet/rbi/annotations/webmock.rbi +0 -9
  106. data/sorbet/rbi/dsl/.gitattributes +0 -1
  107. data/sorbet/rbi/dsl/active_support/callbacks.rbi +0 -23
  108. data/sorbet/rbi/gems/.gitattributes +0 -1
  109. data/sorbet/rbi/gems/activesupport@7.1.5.rbi +0 -18746
  110. data/sorbet/rbi/gems/addressable@2.8.6.rbi +0 -1994
  111. data/sorbet/rbi/gems/ansi@1.5.0.rbi +0 -688
  112. data/sorbet/rbi/gems/asana@0.10.6-ab9393136d9ca59b75e42a661fdddc1c65c8f7c3.rbi +0 -6142
  113. data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -585
  114. data/sorbet/rbi/gems/backport@1.2.0.rbi +0 -523
  115. data/sorbet/rbi/gems/base64@0.2.0.rbi +0 -509
  116. data/sorbet/rbi/gems/benchmark@0.4.0.rbi +0 -618
  117. data/sorbet/rbi/gems/bigdecimal@3.1.5.rbi +0 -78
  118. data/sorbet/rbi/gems/brakeman@6.2.2.rbi +0 -222
  119. data/sorbet/rbi/gems/builder@3.2.4.rbi +0 -505
  120. data/sorbet/rbi/gems/bump@0.10.0.rbi +0 -169
  121. data/sorbet/rbi/gems/cache@0.4.1.rbi +0 -211
  122. data/sorbet/rbi/gems/cache_method@0.2.7.rbi +0 -293
  123. data/sorbet/rbi/gems/chef-utils@18.3.0.rbi +0 -9
  124. data/sorbet/rbi/gems/childprocess@5.1.0.rbi +0 -383
  125. data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3427
  126. data/sorbet/rbi/gems/commander@4.6.0.rbi +0 -9
  127. data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +0 -11591
  128. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +0 -9
  129. data/sorbet/rbi/gems/crack@0.4.5.rbi +0 -145
  130. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +0 -969
  131. data/sorbet/rbi/gems/docile@1.4.0.rbi +0 -377
  132. data/sorbet/rbi/gems/drb@2.2.1.rbi +0 -1347
  133. data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +0 -9
  134. data/sorbet/rbi/gems/erubi@1.13.0.rbi +0 -152
  135. data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +0 -222
  136. data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +0 -126
  137. data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +0 -136
  138. data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +0 -145
  139. data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +0 -259
  140. data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +0 -142
  141. data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +0 -118
  142. data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +0 -125
  143. data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +0 -133
  144. data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +0 -198
  145. data/sorbet/rbi/gems/faraday@1.10.3.rbi +0 -2729
  146. data/sorbet/rbi/gems/faraday_middleware-multi_json@0.0.6.rbi +0 -29
  147. data/sorbet/rbi/gems/faraday_middleware@1.2.0.rbi +0 -1004
  148. data/sorbet/rbi/gems/gli@2.22.0.rbi +0 -9
  149. data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +0 -351
  150. data/sorbet/rbi/gems/highline@2.0.3.rbi +0 -9
  151. data/sorbet/rbi/gems/i18n@1.14.6.rbi +0 -2359
  152. data/sorbet/rbi/gems/imagen@0.1.8.rbi +0 -340
  153. data/sorbet/rbi/gems/iniparse@1.5.0.rbi +0 -899
  154. data/sorbet/rbi/gems/jaro_winkler@1.6.0.rbi +0 -22
  155. data/sorbet/rbi/gems/json@2.7.1.rbi +0 -1562
  156. data/sorbet/rbi/gems/jwt@2.7.1.rbi +0 -1405
  157. data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +0 -128
  158. data/sorbet/rbi/gems/kramdown@2.4.0.rbi +0 -3272
  159. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14238
  160. data/sorbet/rbi/gems/logger@1.6.2.rbi +0 -923
  161. data/sorbet/rbi/gems/mdl@0.13.0.rbi +0 -445
  162. data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -273
  163. data/sorbet/rbi/gems/mime-types-data@3.2023.1205.rbi +0 -127
  164. data/sorbet/rbi/gems/mime-types@3.5.1.rbi +0 -1252
  165. data/sorbet/rbi/gems/minitest-profile@0.0.2.rbi +0 -136
  166. data/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +0 -1014
  167. data/sorbet/rbi/gems/minitest@5.21.1.rbi +0 -1539
  168. data/sorbet/rbi/gems/mixlib-cli@2.1.8.rbi +0 -314
  169. data/sorbet/rbi/gems/mixlib-config@3.0.27.rbi +0 -581
  170. data/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi +0 -629
  171. data/sorbet/rbi/gems/mocha@2.1.0.rbi +0 -12
  172. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +0 -268
  173. data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +0 -102
  174. data/sorbet/rbi/gems/multipart-post@2.3.0.rbi +0 -234
  175. data/sorbet/rbi/gems/mutex_m@0.3.0.rbi +0 -97
  176. data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -159
  177. data/sorbet/rbi/gems/nokogiri@1.17.0.rbi +0 -8201
  178. data/sorbet/rbi/gems/oauth2@1.4.11.rbi +0 -833
  179. data/sorbet/rbi/gems/overcommit@0.64.1.rbi +0 -2400
  180. data/sorbet/rbi/gems/parallel@1.23.0.rbi +0 -274
  181. data/sorbet/rbi/gems/parlour@5.0.0.rbi +0 -3007
  182. data/sorbet/rbi/gems/parser@3.2.2.4.rbi +0 -7253
  183. data/sorbet/rbi/gems/prism@1.2.0.rbi +0 -39085
  184. data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10070
  185. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +0 -936
  186. data/sorbet/rbi/gems/punchlist@1.3.2.rbi +0 -173
  187. data/sorbet/rbi/gems/racc@1.8.1.rbi +0 -162
  188. data/sorbet/rbi/gems/rack@3.1.8.rbi +0 -4896
  189. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -403
  190. data/sorbet/rbi/gems/rake@13.1.0.rbi +0 -3022
  191. data/sorbet/rbi/gems/rbi@0.2.1.rbi +0 -4535
  192. data/sorbet/rbi/gems/rbs@2.8.4.rbi +0 -5613
  193. data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +0 -3750
  194. data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +0 -390
  195. data/sorbet/rbi/gems/rexml@3.3.9.rbi +0 -4964
  196. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +0 -7127
  197. data/sorbet/rbi/gems/rubocop-minitest@0.34.5.rbi +0 -2577
  198. data/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi +0 -3262
  199. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +0 -329
  200. data/sorbet/rbi/gems/rubocop-rspec@3.0.0.rbi +0 -7546
  201. data/sorbet/rbi/gems/rubocop@1.59.0.rbi +0 -57238
  202. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +0 -1318
  203. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +0 -9
  204. data/sorbet/rbi/gems/rugged@1.6.3.rbi +0 -1577
  205. data/sorbet/rbi/gems/securerandom@0.4.0.rbi +0 -75
  206. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -217
  207. data/sorbet/rbi/gems/simplecov-lcov@0.8.0.rbi +0 -256
  208. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +0 -2149
  209. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +0 -9
  210. data/sorbet/rbi/gems/solargraph-rails@1.1.0-9dc37915bd4f3b169046e34db6fb32193ab347d8.rbi +0 -320
  211. data/sorbet/rbi/gems/solargraph@0.50.1-904b9304770a59fac393c5cc3cad481e5bdf0fd8.rbi +0 -9396
  212. data/sorbet/rbi/gems/sord@5.1.0.rbi +0 -820
  213. data/sorbet/rbi/gems/source_finder@3.2.1.rbi +0 -317
  214. data/sorbet/rbi/gems/spoom@1.5.0.rbi +0 -4932
  215. data/sorbet/rbi/gems/tapioca@0.16.5.rbi +0 -3617
  216. data/sorbet/rbi/gems/thor@1.3.2.rbi +0 -4378
  217. data/sorbet/rbi/gems/tilt@2.4.0.rbi +0 -933
  218. data/sorbet/rbi/gems/tomlrb@2.0.3.rbi +0 -9
  219. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +0 -5918
  220. data/sorbet/rbi/gems/undercover@0.5.0.rbi +0 -433
  221. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +0 -66
  222. data/sorbet/rbi/gems/webmock@3.19.1.rbi +0 -1769
  223. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
  224. data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18406
  225. data/sorbet/rbi/todo.rbi +0 -11
  226. data/sorbet/tapioca/config.yml +0 -13
  227. data/sorbet/tapioca/require.rb +0 -4
@@ -1,899 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `iniparse` gem.
5
- # Please instead update this file by running `bin/tapioca gem iniparse`.
6
-
7
-
8
- # source://iniparse//lib/iniparse/document.rb#1
9
- module IniParse
10
- private
11
-
12
- # Creates a new IniParse::Document using the specification you provide.
13
- #
14
- # See IniParse::Generator.
15
- #
16
- # ==== Returns
17
- # IniParse::Document
18
- #
19
- # source://iniparse//lib/iniparse.rb#63
20
- def gen(&blk); end
21
-
22
- # Opens the file at +path+, reads and parses it's contents.
23
- #
24
- # ==== Parameters
25
- # path<String>:: The path to the INI document.
26
- #
27
- # ==== Returns
28
- # IniParse::Document
29
- #
30
- # source://iniparse//lib/iniparse.rb#50
31
- def open(path); end
32
-
33
- # Parse given given INI document source +source+.
34
- #
35
- # See IniParse::Parser.parse
36
- #
37
- # ==== Parameters
38
- # source<String>:: The source from the INI document.
39
- #
40
- # ==== Returns
41
- # IniParse::Document
42
- #
43
- # source://iniparse//lib/iniparse.rb#38
44
- def parse(source); end
45
-
46
- class << self
47
- # Creates a new IniParse::Document using the specification you provide.
48
- #
49
- # See IniParse::Generator.
50
- #
51
- # ==== Returns
52
- # IniParse::Document
53
- #
54
- # source://iniparse//lib/iniparse.rb#63
55
- def gen(&blk); end
56
-
57
- # Opens the file at +path+, reads and parses it's contents.
58
- #
59
- # ==== Parameters
60
- # path<String>:: The path to the INI document.
61
- #
62
- # ==== Returns
63
- # IniParse::Document
64
- #
65
- # source://iniparse//lib/iniparse.rb#50
66
- def open(path); end
67
-
68
- # Parse given given INI document source +source+.
69
- #
70
- # See IniParse::Parser.parse
71
- #
72
- # ==== Parameters
73
- # source<String>:: The source from the INI document.
74
- #
75
- # ==== Returns
76
- # IniParse::Document
77
- #
78
- # source://iniparse//lib/iniparse.rb#38
79
- def parse(source); end
80
- end
81
- end
82
-
83
- # Represents an INI document.
84
- #
85
- # source://iniparse//lib/iniparse/document.rb#3
86
- class IniParse::Document
87
- include ::Enumerable
88
-
89
- # Creates a new Document instance.
90
- #
91
- # @return [Document] a new instance of Document
92
- #
93
- # source://iniparse//lib/iniparse/document.rb#10
94
- def initialize(path = T.unsafe(nil)); end
95
-
96
- # Returns the section identified by +key+.
97
- #
98
- # Returns nil if there is no Section with the given key.
99
- #
100
- # source://iniparse//lib/iniparse/document.rb#31
101
- def [](key); end
102
-
103
- # Deletes the section whose name matches the given +key+.
104
- #
105
- # Returns the document.
106
- #
107
- # source://iniparse//lib/iniparse/document.rb#47
108
- def delete(*args); end
109
-
110
- # Enumerates through each Section in this document.
111
- #
112
- # Does not yield blank and comment lines by default; if you want _all_
113
- # lines to be yielded, pass true.
114
- #
115
- # ==== Parameters
116
- # include_blank<Boolean>:: Include blank/comment lines?
117
- #
118
- # source://iniparse//lib/iniparse/document.rb#23
119
- def each(*args, &blk); end
120
-
121
- # Returns true if a section with the given +key+ exists in this document.
122
- #
123
- # @return [Boolean]
124
- #
125
- # source://iniparse//lib/iniparse/document.rb#87
126
- def has_section?(key); end
127
-
128
- # A human-readable version of the document, for debugging.
129
- #
130
- # source://iniparse//lib/iniparse/document.rb#81
131
- def inspect; end
132
-
133
- # Returns the value of attribute lines.
134
- #
135
- # source://iniparse//lib/iniparse/document.rb#6
136
- def lines; end
137
-
138
- # Returns the value of attribute path.
139
- #
140
- # source://iniparse//lib/iniparse/document.rb#7
141
- def path; end
142
-
143
- # Sets the attribute path
144
- #
145
- # @param value the value to set the attribute path to.
146
- #
147
- # source://iniparse//lib/iniparse/document.rb#7
148
- def path=(_arg0); end
149
-
150
- # Saves a copy of this Document to disk.
151
- #
152
- # If a path was supplied when the Document was initialized then nothing
153
- # needs to be given to Document#save. If Document was not given a file
154
- # path, or you wish to save the document elsewhere, supply a path when
155
- # calling Document#save.
156
- #
157
- # ==== Parameters
158
- # path<String>:: A path to which this document will be saved.
159
- #
160
- # ==== Raises
161
- # IniParseError:: If your document couldn't be saved.
162
- #
163
- # @raise [IniParseError]
164
- #
165
- # source://iniparse//lib/iniparse/document.rb#104
166
- def save(path = T.unsafe(nil)); end
167
-
168
- # Returns the section identified by +key+.
169
- #
170
- # If there is no Section with the given key it will be created.
171
- #
172
- # source://iniparse//lib/iniparse/document.rb#39
173
- def section(key); end
174
-
175
- # Returns a has representation of the INI with multi-line options
176
- # as an array
177
- #
178
- # source://iniparse//lib/iniparse/document.rb#64
179
- def to_h; end
180
-
181
- # Returns a has representation of the INI with multi-line options
182
- # as an array
183
- #
184
- # source://iniparse//lib/iniparse/document.rb#64
185
- def to_hash; end
186
-
187
- # Returns this document as a string suitable for saving to a file.
188
- #
189
- # source://iniparse//lib/iniparse/document.rb#53
190
- def to_ini; end
191
-
192
- # Returns this document as a string suitable for saving to a file.
193
- #
194
- # source://iniparse//lib/iniparse/document.rb#53
195
- def to_s; end
196
- end
197
-
198
- # Generator provides a means for easily creating new INI documents.
199
- #
200
- # Rather than trying to hack together new INI documents by manually creating
201
- # Document, Section and Option instances, it is preferable to use Generator
202
- # which will handle it all for you.
203
- #
204
- # The Generator is exposed through IniParse.gen.
205
- #
206
- # IniParse.gen do |doc|
207
- # doc.section("vehicle") do |vehicle|
208
- # vehicle.option("road_side", "left")
209
- # vehicle.option("realistic_acceleration", true)
210
- # vehicle.option("max_trains", 500)
211
- # end
212
- #
213
- # doc.section("construction") do |construction|
214
- # construction.option("build_on_slopes", true)
215
- # construction.option("autoslope", true)
216
- # end
217
- # end
218
- #
219
- # # => IniParse::Document
220
- #
221
- # This can be simplified further if you don't mind the small overhead
222
- # which comes with +method_missing+:
223
- #
224
- # IniParse.gen do |doc|
225
- # doc.vehicle do |vehicle|
226
- # vehicle.road_side = "left"
227
- # vehicle.realistic_acceleration = true
228
- # vehicle.max_trains = 500
229
- # end
230
- #
231
- # doc.construction do |construction|
232
- # construction.build_on_slopes = true
233
- # construction.autoslope = true
234
- # end
235
- # end
236
- #
237
- # # => IniParse::Document
238
- #
239
- # If you want to add slightly more complicated formatting to your document,
240
- # each line type (except blanks) takes a number of optional parameters:
241
- #
242
- # :comment::
243
- # Adds an inline comment at the end of the line.
244
- # :comment_offset::
245
- # Indent the comment. Measured in characters from _beginning_ of the line.
246
- # See String#ljust.
247
- # :indent::
248
- # Adds the supplied text to the beginning of the line.
249
- #
250
- # If you supply +:indent+, +:comment_sep+, or +:comment_offset+ options when
251
- # adding a section, the same options will be inherited by all of the options
252
- # which belong to it.
253
- #
254
- # IniParse.gen do |doc|
255
- # doc.section("vehicle",
256
- # :comment => "Options for vehicles", :indent => " "
257
- # ) do |vehicle|
258
- # vehicle.option("road_side", "left")
259
- # vehicle.option("realistic_acceleration", true)
260
- # vehicle.option("max_trains", 500, :comment => "More = slower")
261
- # end
262
- # end.to_ini
263
- #
264
- # [vehicle] ; Options for vehicles
265
- # road_side = left
266
- # realistic_acceleration = true
267
- # max_trains = 500 ; More = slower
268
- #
269
- # source://iniparse//lib/iniparse/generator.rb#73
270
- class IniParse::Generator
271
- # @return [Generator] a new instance of Generator
272
- #
273
- # source://iniparse//lib/iniparse/generator.rb#77
274
- def initialize(opts = T.unsafe(nil)); end
275
-
276
- # Adds a new blank line to the document.
277
- #
278
- # source://iniparse//lib/iniparse/generator.rb#170
279
- def blank; end
280
-
281
- # Adds a new comment line to the document.
282
- #
283
- # ==== Parameters
284
- # comment<String>:: The text for the comment line.
285
- #
286
- # source://iniparse//lib/iniparse/generator.rb#163
287
- def comment(comment, opts = T.unsafe(nil)); end
288
-
289
- # Returns the value of attribute context.
290
- #
291
- # source://iniparse//lib/iniparse/generator.rb#74
292
- def context; end
293
-
294
- # Returns the value of attribute document.
295
- #
296
- # source://iniparse//lib/iniparse/generator.rb#75
297
- def document; end
298
-
299
- # @yield [_self]
300
- # @yieldparam _self [IniParse::Generator] the object that the method was called on
301
- #
302
- # source://iniparse//lib/iniparse/generator.rb#85
303
- def gen; end
304
-
305
- # source://iniparse//lib/iniparse/generator.rb#183
306
- def method_missing(name, *args, &blk); end
307
-
308
- # Adds a new option to the current section.
309
- #
310
- # Can only be called as part of a section block, or after at least one
311
- # section has been added to the document.
312
- #
313
- # ==== Parameters
314
- # key<String>:: The key (name) for this option.
315
- # value:: The option's value.
316
- # opts<Hash>:: Extra options for the line (formatting, etc).
317
- #
318
- # ==== Raises
319
- # IniParse::NoSectionError::
320
- # If no section has been added to the document yet.
321
- #
322
- # source://iniparse//lib/iniparse/generator.rb#147
323
- def option(key, value, opts = T.unsafe(nil)); end
324
-
325
- # Creates a new section with the given name and adds it to the document.
326
- #
327
- # You can optionally supply a block (as detailed in the documentation for
328
- # Generator#gen) in order to add options to the section.
329
- #
330
- # ==== Parameters
331
- # name<String>:: A name for the given section.
332
- #
333
- # source://iniparse//lib/iniparse/generator.rb#107
334
- def section(name, opts = T.unsafe(nil)); end
335
-
336
- # Wraps lines, setting default options for each.
337
- #
338
- # @yield [_self]
339
- # @yieldparam _self [IniParse::Generator] the object that the method was called on
340
- #
341
- # source://iniparse//lib/iniparse/generator.rb#175
342
- def with_options(opts = T.unsafe(nil)); end
343
-
344
- private
345
-
346
- # Returns options for a line.
347
- #
348
- # If the context is a section, we use the section options as a base,
349
- # rather than the global defaults.
350
- #
351
- # source://iniparse//lib/iniparse/generator.rb#200
352
- def line_options(given_opts); end
353
-
354
- class << self
355
- # Creates a new IniParse::Document with the given sections and options.
356
- #
357
- # ==== Returns
358
- # IniParse::Document
359
- #
360
- # source://iniparse//lib/iniparse/generator.rb#95
361
- def gen(opts = T.unsafe(nil), &blk); end
362
- end
363
- end
364
-
365
- # A base class for IniParse errors.
366
- #
367
- # source://iniparse//lib/iniparse.rb#13
368
- class IniParse::IniParseError < ::StandardError; end
369
-
370
- # Represents a collection of lines in an INI document.
371
- #
372
- # LineCollection acts a bit like an Array/Hash hybrid, allowing arbitrary
373
- # lines to be added to the collection, but also indexes the keys of Section
374
- # and Option lines to enable O(1) lookup via LineCollection#[].
375
- #
376
- # The lines instances are stored in an array, +@lines+, while the index of
377
- # each Section/Option is held in a Hash, +@indicies+, keyed with the
378
- # Section/Option#key value (see LineCollection#[]=).
379
- #
380
- # source://iniparse//lib/iniparse/line_collection.rb#12
381
- module IniParse::LineCollection
382
- include ::Enumerable
383
- include ::ActiveSupport::ToJsonWithActiveSupportEncoder
384
-
385
- # source://iniparse//lib/iniparse/line_collection.rb#15
386
- def initialize; end
387
-
388
- # Appends a line to the collection.
389
- #
390
- # Note that if you pass a line with a key already represented in the
391
- # collection, the old item will be replaced.
392
- #
393
- # source://iniparse//lib/iniparse/line_collection.rb#46
394
- def <<(line); end
395
-
396
- # Retrive a value identified by +key+.
397
- #
398
- # source://iniparse//lib/iniparse/line_collection.rb#21
399
- def [](key); end
400
-
401
- # Set a +value+ identified by +key+.
402
- #
403
- # If a value with the given key already exists, the value will be replaced
404
- # with the new one, with the new value taking the position of the old.
405
- #
406
- # source://iniparse//lib/iniparse/line_collection.rb#30
407
- def []=(key, value); end
408
-
409
- # Removes the value identified by +key+.
410
- #
411
- # source://iniparse//lib/iniparse/line_collection.rb#70
412
- def delete(key); end
413
-
414
- # Enumerates through the collection.
415
- #
416
- # By default #each does not yield blank and comment lines.
417
- #
418
- # ==== Parameters
419
- # include_blank<Boolean>:: Include blank/comment lines?
420
- #
421
- # source://iniparse//lib/iniparse/line_collection.rb#59
422
- def each(include_blank = T.unsafe(nil)); end
423
-
424
- # Returns whether +key+ is in the collection.
425
- #
426
- # @return [Boolean]
427
- #
428
- # source://iniparse//lib/iniparse/line_collection.rb#81
429
- def has_key?(*args); end
430
-
431
- # Return an array containing the keys for the lines added to this
432
- # collection.
433
- #
434
- # source://iniparse//lib/iniparse/line_collection.rb#87
435
- def keys; end
436
-
437
- # Appends a line to the collection.
438
- #
439
- # Note that if you pass a line with a key already represented in the
440
- # collection, the old item will be replaced.
441
- #
442
- # source://iniparse//lib/iniparse/line_collection.rb#46
443
- def push(line); end
444
-
445
- # Returns this collection as an array. Includes blank and comment lines.
446
- #
447
- # source://iniparse//lib/iniparse/line_collection.rb#92
448
- def to_a; end
449
-
450
- # Returns this collection as a hash. Does not contain blank and comment
451
- # lines.
452
- #
453
- # source://iniparse//lib/iniparse/line_collection.rb#98
454
- def to_h; end
455
-
456
- # Returns this collection as a hash. Does not contain blank and comment
457
- # lines.
458
- #
459
- # source://iniparse//lib/iniparse/line_collection.rb#98
460
- def to_hash; end
461
- end
462
-
463
- # Raised when a line is added to a collection which isn't allowed (e.g.
464
- # adding a Section line into an OptionCollection).
465
- #
466
- # source://iniparse//lib/iniparse.rb#24
467
- class IniParse::LineNotAllowed < ::IniParse::IniParseError; end
468
-
469
- # source://iniparse//lib/iniparse/lines.rb#2
470
- module IniParse::Lines; end
471
-
472
- # Stores options which appear at the beginning of a file, without a
473
- # preceding section.
474
- #
475
- # source://iniparse//lib/iniparse/lines.rb#225
476
- class IniParse::Lines::AnonymousSection < ::IniParse::Lines::Section
477
- # @return [AnonymousSection] a new instance of AnonymousSection
478
- #
479
- # source://iniparse//lib/iniparse/lines.rb#226
480
- def initialize; end
481
-
482
- # source://iniparse//lib/iniparse/lines.rb#230
483
- def to_ini; end
484
-
485
- private
486
-
487
- # source://iniparse//lib/iniparse/lines.rb#240
488
- def line_contents; end
489
- end
490
-
491
- # Represents a blank line. Used so that we can preserve blank lines when
492
- # writing back to the file.
493
- #
494
- # source://iniparse//lib/iniparse/lines.rb#307
495
- class IniParse::Lines::Blank
496
- include ::IniParse::Lines::Line
497
-
498
- # @return [Boolean]
499
- #
500
- # source://iniparse//lib/iniparse/lines.rb#310
501
- def blank?; end
502
-
503
- class << self
504
- # source://iniparse//lib/iniparse/lines.rb#314
505
- def parse(line, opts); end
506
- end
507
- end
508
-
509
- # Represents a comment. Comment lines begin with a semi-colon or hash.
510
- #
511
- # ; this is a comment
512
- # # also a comment
513
- #
514
- # source://iniparse//lib/iniparse/lines.rb#337
515
- class IniParse::Lines::Comment < ::IniParse::Lines::Blank
516
- # Returns the inline comment for this line. Includes the comment
517
- # separator at the beginning of the string.
518
- #
519
- # In rare cases where a comment seperator appeared in the original file,
520
- # but without a comment, just the seperator will be returned.
521
- #
522
- # source://iniparse//lib/iniparse/lines.rb#348
523
- def comment; end
524
-
525
- # Returns if this line has an inline comment.
526
- #
527
- # Being a Comment this will always return true, even if the comment
528
- # is nil. This would be the case if the line starts with a comment
529
- # seperator, but has no comment text. See spec/fixtures/smb.ini for a
530
- # real-world example.
531
- #
532
- # @return [Boolean]
533
- #
534
- # source://iniparse//lib/iniparse/lines.rb#338
535
- def has_comment?; end
536
- end
537
-
538
- # A base class from which other line types should inherit.
539
- #
540
- # source://iniparse//lib/iniparse/lines.rb#4
541
- module IniParse::Lines::Line
542
- # ==== Parameters
543
- # opts<Hash>:: Extra options for the line.
544
- #
545
- # source://iniparse//lib/iniparse/lines.rb#8
546
- def initialize(opts = T.unsafe(nil)); end
547
-
548
- # Returns whether this is a line which has no data.
549
- #
550
- # @return [Boolean]
551
- #
552
- # source://iniparse//lib/iniparse/lines.rb#47
553
- def blank?; end
554
-
555
- # Returns the inline comment for this line. Includes the comment
556
- # separator at the beginning of the string.
557
- #
558
- # source://iniparse//lib/iniparse/lines.rb#42
559
- def comment; end
560
-
561
- # Returns if this line has an inline comment.
562
- #
563
- # @return [Boolean]
564
- #
565
- # source://iniparse//lib/iniparse/lines.rb#18
566
- def has_comment?; end
567
-
568
- # Returns the contents for this line.
569
- #
570
- # source://iniparse//lib/iniparse/lines.rb#36
571
- def line_contents; end
572
-
573
- # Returns the options used to create the line
574
- #
575
- # source://iniparse//lib/iniparse/lines.rb#52
576
- def options; end
577
-
578
- # Returns this line as a string as it would be represented in an INI
579
- # document.
580
- #
581
- # source://iniparse//lib/iniparse/lines.rb#24
582
- def to_ini; end
583
- end
584
-
585
- # Represents probably the most common type of line in an INI document:
586
- # an option. Consists of a key and value, usually separated with an =.
587
- #
588
- # key = value
589
- #
590
- # source://iniparse//lib/iniparse/lines.rb#250
591
- class IniParse::Lines::Option
592
- include ::IniParse::Lines::Line
593
-
594
- # ==== Parameters
595
- # key<String>:: The option key.
596
- # value<String>:: The value for this option.
597
- # opts<Hash>:: Extra options for the line.
598
- #
599
- # @return [Option] a new instance of Option
600
- #
601
- # source://iniparse//lib/iniparse/lines.rb#265
602
- def initialize(key, value, opts = T.unsafe(nil)); end
603
-
604
- # Returns the value of attribute key.
605
- #
606
- # source://iniparse//lib/iniparse/lines.rb#258
607
- def key; end
608
-
609
- # Sets the attribute key
610
- #
611
- # @param value the value to set the attribute key to.
612
- #
613
- # source://iniparse//lib/iniparse/lines.rb#258
614
- def key=(_arg0); end
615
-
616
- # Returns the value of attribute value.
617
- #
618
- # source://iniparse//lib/iniparse/lines.rb#258
619
- def value; end
620
-
621
- # Sets the attribute value
622
- #
623
- # @param value the value to set the attribute value to.
624
- #
625
- # source://iniparse//lib/iniparse/lines.rb#258
626
- def value=(_arg0); end
627
-
628
- private
629
-
630
- # returns an array to support multiple lines or a single one at once
631
- # because of options key duplication
632
- #
633
- # source://iniparse//lib/iniparse/lines.rb#296
634
- def line_contents; end
635
-
636
- class << self
637
- # source://iniparse//lib/iniparse/lines.rb#271
638
- def parse(line, opts); end
639
-
640
- # Attempts to typecast values.
641
- #
642
- # source://iniparse//lib/iniparse/lines.rb#279
643
- def typecast(value); end
644
- end
645
- end
646
-
647
- # Represents a section header in an INI document. Section headers consist
648
- # of a string of characters wrapped in square brackets.
649
- #
650
- # [section]
651
- # key=value
652
- # etc
653
- # ...
654
- #
655
- # source://iniparse//lib/iniparse/lines.rb#72
656
- class IniParse::Lines::Section
657
- include ::IniParse::Lines::Line
658
- include ::Enumerable
659
-
660
- # ==== Parameters
661
- # key<String>:: The section name.
662
- # opts<Hash>:: Extra options for the line.
663
- #
664
- # @return [Section] a new instance of Section
665
- #
666
- # source://iniparse//lib/iniparse/lines.rb#89
667
- def initialize(key, opts = T.unsafe(nil)); end
668
-
669
- # Returns the value of an option identified by +key+.
670
- #
671
- # Returns nil if there is no corresponding option. If the key provided
672
- # matches a set of duplicate options, an array will be returned containing
673
- # the value of each option.
674
- #
675
- # source://iniparse//lib/iniparse/lines.rb#162
676
- def [](key); end
677
-
678
- # Adds a new option to this section, or updates an existing one.
679
- #
680
- # Note that +[]=+ has no knowledge of duplicate options and will happily
681
- # overwrite duplicate options with your new value.
682
- #
683
- # section['an_option']
684
- # # => ['duplicate one', 'duplicate two', ...]
685
- # section['an_option'] = 'new value'
686
- # section['an_option]
687
- # # => 'new value'
688
- #
689
- # If you do not wish to overwrite duplicates, but wish instead for your
690
- # new option to be considered a duplicate, use +add_option+ instead.
691
- #
692
- # source://iniparse//lib/iniparse/lines.rb#145
693
- def []=(key, value); end
694
-
695
- # Deletes the option identified by +key+.
696
- #
697
- # Returns the section.
698
- #
699
- # source://iniparse//lib/iniparse/lines.rb#178
700
- def delete(*args); end
701
-
702
- # Enumerates through each Option in this section.
703
- #
704
- # Does not yield blank and comment lines by default; if you want _all_
705
- # lines to be yielded, pass true.
706
- #
707
- # ==== Parameters
708
- # include_blank<Boolean>:: Include blank/comment lines?
709
- #
710
- # source://iniparse//lib/iniparse/lines.rb#127
711
- def each(*args, &blk); end
712
-
713
- # Returns true if an option with the given +key+ exists in this section.
714
- #
715
- # @return [Boolean]
716
- #
717
- # source://iniparse//lib/iniparse/lines.rb#193
718
- def has_option?(key); end
719
-
720
- # Returns the value of attribute key.
721
- #
722
- # source://iniparse//lib/iniparse/lines.rb#80
723
- def key; end
724
-
725
- # Sets the attribute key
726
- #
727
- # @param value the value to set the attribute key to.
728
- #
729
- # source://iniparse//lib/iniparse/lines.rb#80
730
- def key=(_arg0); end
731
-
732
- # Returns the value of attribute lines.
733
- #
734
- # source://iniparse//lib/iniparse/lines.rb#81
735
- def lines; end
736
-
737
- # Merges section +other+ into this one. If the section being merged into
738
- # this one contains options with the same key, they will be handled as
739
- # duplicates.
740
- #
741
- # ==== Parameters
742
- # other<IniParse::Section>:: The section to merge into this one.
743
- #
744
- # source://iniparse//lib/iniparse/lines.rb#204
745
- def merge!(other); end
746
-
747
- # Like [], except instead of returning just the option value, it returns
748
- # the matching line instance.
749
- #
750
- # Will return an array of lines if the key matches a set of duplicates.
751
- #
752
- # source://iniparse//lib/iniparse/lines.rb#188
753
- def option(key); end
754
-
755
- # Returns this line as a string as it would be represented in an INI
756
- # document. Includes options, comments and blanks.
757
- #
758
- # source://iniparse//lib/iniparse/lines.rb#103
759
- def to_ini; end
760
-
761
- private
762
-
763
- # source://iniparse//lib/iniparse/lines.rb#218
764
- def line_contents; end
765
-
766
- class << self
767
- # source://iniparse//lib/iniparse/lines.rb#95
768
- def parse(line, opts); end
769
- end
770
- end
771
-
772
- # Raised when an option line is found during parsing before the first
773
- # section.
774
- #
775
- # source://iniparse//lib/iniparse.rb#20
776
- class IniParse::NoSectionError < ::IniParse::ParseError; end
777
-
778
- # A implementation of LineCollection used for storing (mostly) Option
779
- # instances contained within a Section.
780
- #
781
- # Whenever OptionCollection encounters an Option key already held in the
782
- # collection, it treats it as a duplicate. This means that instead of
783
- # overwriting the existing value, the value is changed to an array
784
- # containing the previous _and_ the new Option instances.
785
- #
786
- # source://iniparse//lib/iniparse/line_collection.rb#140
787
- class IniParse::OptionCollection
788
- include ::Enumerable
789
- include ::IniParse::LineCollection
790
-
791
- # Appends a line to the collection.
792
- #
793
- # If you push an Option with a key already represented in the collection,
794
- # the previous Option will not be overwritten, but treated as a duplicate.
795
- #
796
- # ==== Parameters
797
- # line<IniParse::LineType::Line>:: The line to be added to this section.
798
- #
799
- # source://iniparse//lib/iniparse/line_collection.rb#151
800
- def <<(line); end
801
-
802
- # source://iniparse//lib/iniparse/line_collection.rb#166
803
- def each(*args); end
804
-
805
- # Return an array containing the keys for the lines added to this
806
- # collection.
807
- #
808
- # source://iniparse//lib/iniparse/line_collection.rb#180
809
- def keys; end
810
- end
811
-
812
- # Raised if an error occurs parsing an INI document.
813
- #
814
- # source://iniparse//lib/iniparse.rb#16
815
- class IniParse::ParseError < ::IniParse::IniParseError; end
816
-
817
- # source://iniparse//lib/iniparse/parser.rb#2
818
- class IniParse::Parser
819
- # Creates a new Parser instance for parsing string +source+.
820
- #
821
- # ==== Parameters
822
- # source<String>:: The source string.
823
- #
824
- # @return [Parser] a new instance of Parser
825
- #
826
- # source://iniparse//lib/iniparse/parser.rb#31
827
- def initialize(source); end
828
-
829
- # Parses the source string and returns the resulting data structure.
830
- #
831
- # ==== Returns
832
- # IniParse::Document
833
- #
834
- # source://iniparse//lib/iniparse/parser.rb#40
835
- def parse; end
836
-
837
- class << self
838
- # Takes a raw line from an INI document, striping out any inline
839
- # comment, and indent, then returns the appropriate tuple so that the
840
- # Generator instance can add the line to the Document.
841
- #
842
- # ==== Raises
843
- # IniParse::ParseError: If the line could not be parsed.
844
- #
845
- # source://iniparse//lib/iniparse/parser.rb#56
846
- def parse_line(line); end
847
-
848
- # Returns the line types.
849
- #
850
- # ==== Returns
851
- # Array
852
- #
853
- # source://iniparse//lib/iniparse/parser.rb#9
854
- def parse_types; end
855
-
856
- # Sets the line types. Handy if you want to add your own custom Line
857
- # classes.
858
- #
859
- # ==== Parameters
860
- # types<Array[IniParse::Lines::Line]>:: An array containing Line classes.
861
- #
862
- # source://iniparse//lib/iniparse/parser.rb#19
863
- def parse_types=(types); end
864
-
865
- private
866
-
867
- # Strips in inline comment from a line (or value), removes trailing
868
- # whitespace and sets the comment options as applicable.
869
- #
870
- # source://iniparse//lib/iniparse/parser.rb#79
871
- def strip_comment(line, opts); end
872
-
873
- # Removes any leading whitespace from a line, and adds it to the options
874
- # hash.
875
- #
876
- # source://iniparse//lib/iniparse/parser.rb#100
877
- def strip_indent(line, opts); end
878
- end
879
- end
880
-
881
- # A implementation of LineCollection used for storing (mostly) Option
882
- # instances contained within a Section.
883
- #
884
- # Since it is assumed that an INI document will only represent a section
885
- # once, if SectionCollection encounters a Section key already held in the
886
- # collection, the existing section is merged with the new one (see
887
- # IniParse::Lines::Section#merge!).
888
- #
889
- # source://iniparse//lib/iniparse/line_collection.rb#112
890
- class IniParse::SectionCollection
891
- include ::Enumerable
892
- include ::IniParse::LineCollection
893
-
894
- # source://iniparse//lib/iniparse/line_collection.rb#115
895
- def <<(line); end
896
- end
897
-
898
- # source://iniparse//lib/iniparse.rb#10
899
- IniParse::VERSION = T.let(T.unsafe(nil), String)