inline_fn 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03bfc831e12841eee0b0fe684786fed3b32af9b89f9bec3c5fd0e761291a69d7
4
- data.tar.gz: f197bfbf6147fc1ed496df9f6e32710e6488debb888c641d4775c4c3598968e2
3
+ metadata.gz: b4650aa4545c47c4e0101189e994a591fe1d6dd85e7589c76570b1b51c46f348
4
+ data.tar.gz: c04a3ff00f4a5e17d3d2de33d37822f37f4e5cbc077613809a8781f954976b82
5
5
  SHA512:
6
- metadata.gz: dba9e6151575d891f1f189dd1ebc849c43e283cf1c7766dca30209f7dabfa8711778db1f4bb19e995d8b38d77993b70bea5cf64b8ec52245ed33c77badbd3715
7
- data.tar.gz: 8041cb6ba60c2d34bfacc7db38bd56c2cc3467f4391d21025221eabf49fcbfa508a058ec7412f77463479d0adfd3a6bef140a1bb1717920320d27ace44e9daf2
6
+ metadata.gz: f0bef8221be9c10b7649b0a6fdfc8a3d81beb9227ce41775f1635e52441a306664492e3835a46bdec81a784244c91f84cb86d2b5a4664bec214c581e98daf260
7
+ data.tar.gz: 44d8b52c41d13e7a1e5024dcbbfa6e89adabd3b21304efd2cd4c2cca970c852216db85a82103723a00718bb653b2258f3fedcf6bc87d6b5dd2e10d72ea25f30d
@@ -0,0 +1,70 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="ModuleRunConfigurationManager">
4
+ <shared />
5
+ </component>
6
+ <component name="NewModuleRootManager">
7
+ <content url="file://$MODULE_DIR$">
8
+ <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
9
+ <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
+ </content>
12
+ <orderEntry type="jdk" jdkName="rbenv: 3.1.0" jdkType="RUBY_SDK" />
13
+ <orderEntry type="sourceFolder" forTests="false" />
14
+ <orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, rbenv: 3.1.0) [gem]" level="application" />
15
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.3.17, rbenv: 3.1.0) [gem]" level="application" />
16
+ <orderEntry type="library" scope="PROVIDED" name="json (v2.6.2, rbenv: 3.1.0) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="minitest (v5.16.2, rbenv: 3.1.0) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="parallel (v1.22.1, rbenv: 3.1.0) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="parser (v3.1.2.0, rbenv: 3.1.0) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, rbenv: 3.1.0) [gem]" level="application" />
21
+ <orderEntry type="library" scope="PROVIDED" name="rake (v13.0.6, rbenv: 3.1.0) [gem]" level="application" />
22
+ <orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.5.0, rbenv: 3.1.0) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.5, rbenv: 3.1.0) [gem]" level="application" />
24
+ <orderEntry type="library" scope="PROVIDED" name="rubocop (v1.31.2, rbenv: 3.1.0) [gem]" level="application" />
25
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.19.1, rbenv: 3.1.0) [gem]" level="application" />
26
+ <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.11.0, rbenv: 3.1.0) [gem]" level="application" />
27
+ <orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v2.2.0, rbenv: 3.1.0) [gem]" level="application" />
28
+ </component>
29
+ <component name="RakeTasksCache">
30
+ <option name="myRootTask">
31
+ <RakeTaskImpl id="rake">
32
+ <subtasks>
33
+ <RakeTaskImpl description="Build inline_fn-0.1.0.gem into the pkg directory" fullCommand="build" id="build" />
34
+ <RakeTaskImpl id="build">
35
+ <subtasks>
36
+ <RakeTaskImpl description="Generate SHA512 checksum if inline_fn-0.1.0.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
37
+ </subtasks>
38
+ </RakeTaskImpl>
39
+ <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
40
+ <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
41
+ <RakeTaskImpl description="Build and install inline_fn-0.1.0.gem into system gems" fullCommand="install" id="install" />
42
+ <RakeTaskImpl id="install">
43
+ <subtasks>
44
+ <RakeTaskImpl description="Build and install inline_fn-0.1.0.gem into system gems without network access" fullCommand="install:local" id="local" />
45
+ </subtasks>
46
+ </RakeTaskImpl>
47
+ <RakeTaskImpl description="Create tag v0.1.0 and build and push inline_fn-0.1.0.gem to rubygems.org" fullCommand="release[remote]" id="release[remote]" />
48
+ <RakeTaskImpl description="Run RuboCop" fullCommand="rubocop" id="rubocop" />
49
+ <RakeTaskImpl id="rubocop">
50
+ <subtasks>
51
+ <RakeTaskImpl description="Autocorrect RuboCop offenses (only when it's safe)" fullCommand="rubocop:autocorrect" id="autocorrect" />
52
+ <RakeTaskImpl description="Autocorrect RuboCop offenses (safe and unsafe)" fullCommand="rubocop:autocorrect_all" id="autocorrect_all" />
53
+ <RakeTaskImpl description="" fullCommand="rubocop:auto_correct" id="auto_correct" />
54
+ </subtasks>
55
+ </RakeTaskImpl>
56
+ <RakeTaskImpl description="Run tests" fullCommand="test" id="test" />
57
+ <RakeTaskImpl description="" fullCommand="default" id="default" />
58
+ <RakeTaskImpl description="" fullCommand="release" id="release" />
59
+ <RakeTaskImpl id="release">
60
+ <subtasks>
61
+ <RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
62
+ <RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
63
+ <RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
64
+ </subtasks>
65
+ </RakeTaskImpl>
66
+ </subtasks>
67
+ </RakeTaskImpl>
68
+ </option>
69
+ </component>
70
+ </module>
data/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/inline_fn.iml" filepath="$PROJECT_DIR$/.idea/inline_fn.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,176 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="AutoImportSettings">
4
+ <option name="autoReloadType" value="SELECTIVE" />
5
+ </component>
6
+ <component name="ChangeListManager">
7
+ <list default="true" id="ca42f8e7-82dc-4786-8148-99f859f55553" name="Changes" comment="initial commit">
8
+ <change afterPath="$PROJECT_DIR$/.idea/inline_fn.iml" afterDir="false" />
9
+ <change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
10
+ <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
11
+ <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
12
+ <change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
13
+ <change beforePath="$PROJECT_DIR$/lib/inline_fn/version.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/inline_fn/version.rb" afterDir="false" />
14
+ </list>
15
+ <option name="SHOW_DIALOG" value="false" />
16
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
17
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
18
+ <option name="LAST_RESOLUTION" value="IGNORE" />
19
+ </component>
20
+ <component name="Git.Settings">
21
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
22
+ </component>
23
+ <component name="MarkdownSettingsMigration">
24
+ <option name="stateVersion" value="1" />
25
+ </component>
26
+ <component name="ProjectId" id="2BsPKJxIJhA06NV7wJGqZ9QOswL" />
27
+ <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
28
+ <component name="ProjectViewState">
29
+ <option name="hideEmptyMiddlePackages" value="true" />
30
+ <option name="showLibraryContents" value="true" />
31
+ </component>
32
+ <component name="PropertiesComponent"><![CDATA[{
33
+ "keyToString": {
34
+ "ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
35
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
36
+ "RunOnceActivity.ShowReadmeOnStart": "true",
37
+ "SHARE_PROJECT_CONFIGURATION_FILES": "true",
38
+ "nodejs_package_manager_path": "npm",
39
+ "ruby.rails.projectView.checked": "true"
40
+ }
41
+ }]]></component>
42
+ <component name="RunManager" selected="Test::Unit/Shoulda/Minitest.test_inline_fn_mmd">
43
+ <configuration name="inline_fn" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
44
+ <module name="inline_fn" />
45
+ <RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="" />
46
+ <RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$MODULE_DIR$" />
47
+ <RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
48
+ <RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
49
+ <RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
50
+ <EXTENSION ID="BundlerRunConfigurationExtension" BUNDLE_MODE="AUTO" bundleExecEnabled="true" />
51
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
52
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" ENABLE_BRANCH_COVERAGE="true" ENABLE_FORKED_COVERAGE="true">
53
+ <COVERAGE_PATTERN ENABLED="true">
54
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
55
+ </COVERAGE_PATTERN>
56
+ </EXTENSION>
57
+ <EXTENSION ID="org.jetbrains.plugins.ruby.rails.run.RailsRunConfigurationExtension" SCRATCH_USE_RAILS_RUNNER="false" />
58
+ <RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$MODULE_DIR$/lib/inline_fn.rb" />
59
+ <RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
60
+ <method v="2" />
61
+ </configuration>
62
+ <configuration name="test_inline_fn_mmd" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true" nameIsGenerated="true">
63
+ <module name="inline_fn" />
64
+ <predefined_log_file enabled="true" id="RUBY_TESTUNIT" />
65
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-Ilib:test" />
66
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
67
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
68
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
69
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
70
+ <envs>
71
+ <env name="JRUBY_OPTS" value="-X+O" />
72
+ </envs>
73
+ <EXTENSION ID="BundlerRunConfigurationExtension" BUNDLE_MODE="AUTO" bundleExecEnabled="true" />
74
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
75
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" ENABLE_BRANCH_COVERAGE="true" ENABLE_FORKED_COVERAGE="true">
76
+ <COVERAGE_PATTERN ENABLED="true">
77
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
78
+ </COVERAGE_PATTERN>
79
+ </EXTENSION>
80
+ <EXTENSION ID="org.jetbrains.plugins.ruby.rails.run.RailsRunConfigurationExtension" SCRATCH_USE_RAILS_RUNNER="false" />
81
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
82
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/test/test_inline_fn.rb" />
83
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPTS_PATHS" VALUE="$MODULE_DIR$/test/test_inline_fn.rb" />
84
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
85
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="^test_inline_fn_mmd$" />
86
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_METHOD" />
87
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
88
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
89
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
90
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
91
+ <method v="2" />
92
+ </configuration>
93
+ <configuration name="test_inline_fn_pandoc" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true" nameIsGenerated="true">
94
+ <module name="inline_fn" />
95
+ <predefined_log_file enabled="true" id="RUBY_TESTUNIT" />
96
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-Ilib:test" />
97
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
98
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
99
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
100
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
101
+ <envs>
102
+ <env name="JRUBY_OPTS" value="-X+O" />
103
+ </envs>
104
+ <EXTENSION ID="BundlerRunConfigurationExtension" BUNDLE_MODE="AUTO" bundleExecEnabled="true" />
105
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
106
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" ENABLE_BRANCH_COVERAGE="true" ENABLE_FORKED_COVERAGE="true">
107
+ <COVERAGE_PATTERN ENABLED="true">
108
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
109
+ </COVERAGE_PATTERN>
110
+ </EXTENSION>
111
+ <EXTENSION ID="org.jetbrains.plugins.ruby.rails.run.RailsRunConfigurationExtension" SCRATCH_USE_RAILS_RUNNER="false" />
112
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
113
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/test/test_inline_fn.rb" />
114
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPTS_PATHS" VALUE="$MODULE_DIR$/test/test_inline_fn.rb" />
115
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
116
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="^test_inline_fn_pandoc$" />
117
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_METHOD" />
118
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
119
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
120
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
121
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
122
+ <method v="2" />
123
+ </configuration>
124
+ <recent_temporary>
125
+ <list>
126
+ <item itemvalue="Test::Unit/Shoulda/Minitest.test_inline_fn_mmd" />
127
+ <item itemvalue="Test::Unit/Shoulda/Minitest.test_inline_fn_pandoc" />
128
+ <item itemvalue="Ruby.inline_fn" />
129
+ </list>
130
+ </recent_temporary>
131
+ </component>
132
+ <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
133
+ <component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" RAKE_SPRING_PRE_LOADER_OPTION="true" RAILS_SPRING_PRE_LOADER_OPTION="true" />
134
+ <component name="TaskManager">
135
+ <task active="true" id="Default" summary="Default task">
136
+ <changelist id="ca42f8e7-82dc-4786-8148-99f859f55553" name="Changes" comment="" />
137
+ <created>1657691753423</created>
138
+ <option name="number" value="Default" />
139
+ <option name="presentableId" value="Default" />
140
+ <updated>1657691753423</updated>
141
+ <workItem from="1657691754700" duration="2076000" />
142
+ </task>
143
+ <task id="LOCAL-00001" summary="initial commit">
144
+ <created>1657693651385</created>
145
+ <option name="number" value="00001" />
146
+ <option name="presentableId" value="LOCAL-00001" />
147
+ <option name="project" value="LOCAL" />
148
+ <updated>1657693651385</updated>
149
+ </task>
150
+ <option name="localTasksCounter" value="2" />
151
+ <servers />
152
+ </component>
153
+ <component name="TypeScriptGeneratedFilesManager">
154
+ <option name="version" value="3" />
155
+ </component>
156
+ <component name="Vcs.Log.Tabs.Properties">
157
+ <option name="TAB_STATES">
158
+ <map>
159
+ <entry key="MAIN">
160
+ <value>
161
+ <State />
162
+ </value>
163
+ </entry>
164
+ </map>
165
+ </option>
166
+ </component>
167
+ <component name="VcsManagerConfiguration">
168
+ <MESSAGE value="initial commit" />
169
+ <option name="LAST_COMMIT_MESSAGE" value="initial commit" />
170
+ </component>
171
+ <component name="com.intellij.coverage.CoverageDataManagerImpl">
172
+ <SUITE FILE_PATH="coverage/inline_fn@test_inline_fn_pandoc.rcov" NAME="test_inline_fn_pandoc Coverage Results" MODIFIED="1657693539353" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="inline_fn" />
173
+ <SUITE FILE_PATH="coverage/inline_fn@inline_fn.rcov" NAME="inline_fn Coverage Results" MODIFIED="1657693319814" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="inline_fn" />
174
+ <SUITE FILE_PATH="coverage/inline_fn@test_inline_fn_mmd.rcov" NAME="test_inline_fn_mmd Coverage Results" MODIFIED="1657693593278" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="inline_fn" />
175
+ </component>
176
+ </project>
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.4
2
+ TargetRubyVersion: 2.6
3
3
 
4
4
  Style/StringLiterals:
5
5
  Enabled: true
data/CHANGELOG.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ## [Unreleased]
2
2
 
3
- ## [0.1.0] - 2021-08-25
3
+ ## [0.1.0] - 2022-07-13
4
4
 
5
5
  - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at 35749099+bcdavasconcelos@users.noreply.github.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile CHANGED
@@ -7,4 +7,6 @@ gemspec
7
7
 
8
8
  gem "rake", "~> 13.0"
9
9
 
10
- gem "rubocop", "~> 1.7"
10
+ gem "minitest", "~> 5.0"
11
+
12
+ gem "rubocop", "~> 1.21"
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2021 Bernardo C.D.A. Vasconcelos
3
+ Copyright (c) 2022 Bernardo C.D.A. Vasconcelos
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -25,7 +25,7 @@ puts text.inline_mmd
25
25
  Lorem ipsum dolor sit amet[^Text of fn 1], consectetur adipisicing elit[^Text of fn 2], sed...
26
26
  ```
27
27
 
28
- ## Pandoc
28
+ ## Pandoc
29
29
 
30
30
  ```ruby
31
31
  #!/usr/bin/env ruby
data/Rakefile CHANGED
@@ -1,8 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/test_*.rb"]
10
+ end
11
+
4
12
  require "rubocop/rake_task"
5
13
 
6
14
  RuboCop::RakeTask.new
7
15
 
8
- task default: :rubocop
16
+ task default: %i[test rubocop]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InlineFn
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
data/lib/inline_fn.rb CHANGED
@@ -1,9 +1,71 @@
1
- # frozen_string_literal: true
1
+ # frozen_string_literal: false
2
2
 
3
3
  require_relative "inline_fn/version"
4
- require_relative "inline_fn/inline_mmd"
5
- require_relative "inline_fn/inline_pandoc"
4
+
6
5
  module InlineFn
7
6
  class Error < StandardError; end
8
- class InlineFn < StandardError; end
7
+
8
+ def inline_fn(str, style = :pandoc)
9
+ cut_point = ""
10
+ ref_start = ""
11
+ text = str
12
+ counter = 0
13
+
14
+ until ref_start.nil?
15
+ counter += 1
16
+ cite = "[^#{counter}]"
17
+ ref = "[^#{counter}]:"
18
+ ref_start = text.index(ref)
19
+ break if ref_start.nil?
20
+
21
+ next_ref = "[^#{counter + 1}]:"
22
+ ref_end = text.index(next_ref).nil? ? -1 : text.index(next_ref) - 2
23
+ offset = counter.to_s.length + 5
24
+ note = case style
25
+ when :mmd
26
+ "[^#{text[ref_start + offset..ref_end].strip}]"
27
+ else
28
+ "^[#{text[ref_start + offset..ref_end].strip}]"
29
+ end
30
+
31
+ text = text.gsub(cite, note)
32
+ end
33
+
34
+ if counter >= 1
35
+ case style
36
+ when :mmd
37
+ text = text.gsub(/\n\s*\[\^/, "\n[^")
38
+ cut_point = text.index("\n[^")
39
+ else
40
+ text = text.gsub(/\n\s*\^\[/, "\n^[")
41
+ cut_point = text.index("\n^")
42
+ end
43
+
44
+ text = text[0, cut_point]
45
+ # puts "#{counter -= 1} notes replaced."
46
+ end
47
+ text
48
+ end
49
+
50
+ def inline_fn_pandoc
51
+ inline_fn(self, :pandoc)
52
+ end
53
+
54
+ def inline_fn_mmd
55
+ inline_fn(self, :mmd)
56
+ end
57
+ end
58
+
59
+ class String
60
+ include InlineFn
9
61
  end
62
+
63
+
64
+ # text = %(Lorem ipsum dolor sit amet[^1], consectetur adipisicing elit[^2], sed...
65
+ # [^1]: Text of fn 1
66
+ # [^2]: Text of fn 2)
67
+
68
+ # puts inline_fn(text, :mmd)
69
+ # puts inline_fn(text, :pandoc)
70
+ # puts text.inline_fn_pandoc
71
+ # puts text.inline_fn_mmd
data/sig/inline_fn.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module InlineFn
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_fn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernardo C.D.A. Vasconcelos
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-06 00:00:00.000000000 Z
11
+ date: 2022-07-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: There are two methods that work on strings. Use `str.inline_mmd` for
14
14
  Multimarkdown style or `str.inline_pandoc` for Pandoc style footnotes.
@@ -18,23 +18,20 @@ executables: []
18
18
  extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
- - ".github/workflows/main.yml"
22
- - ".gitignore"
21
+ - ".idea/inline_fn.iml"
22
+ - ".idea/modules.xml"
23
+ - ".idea/vcs.xml"
24
+ - ".idea/workspace.xml"
23
25
  - ".rubocop.yml"
24
26
  - CHANGELOG.md
27
+ - CODE_OF_CONDUCT.md
25
28
  - Gemfile
26
- - Gemfile.lock
27
29
  - LICENSE.txt
28
30
  - README.md
29
31
  - Rakefile
30
- - bin/console
31
- - bin/setup
32
- - inline_fn-0.1.0.gem
33
- - inline_fn.gemspec
34
32
  - lib/inline_fn.rb
35
- - lib/inline_fn/inline_mmd.rb
36
- - lib/inline_fn/inline_pandoc.rb
37
33
  - lib/inline_fn/version.rb
34
+ - sig/inline_fn.rbs
38
35
  homepage: https://github.com/bcdavasconcelos/inline_fn
39
36
  licenses:
40
37
  - MIT
@@ -50,14 +47,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
50
47
  requirements:
51
48
  - - ">="
52
49
  - !ruby/object:Gem::Version
53
- version: 2.4.0
50
+ version: 2.6.0
54
51
  required_rubygems_version: !ruby/object:Gem::Requirement
55
52
  requirements:
56
53
  - - ">="
57
54
  - !ruby/object:Gem::Version
58
55
  version: '0'
59
56
  requirements: []
60
- rubygems_version: 3.3.0.dev
57
+ rubygems_version: 3.3.17
61
58
  signing_key:
62
59
  specification_version: 4
63
60
  summary: Change markdown footnotes format from `[^1]/[^1]:Note` to inline Pandoc or
@@ -1,16 +0,0 @@
1
- name: Ruby
2
-
3
- on: [push,pull_request]
4
-
5
- jobs:
6
- build:
7
- runs-on: ubuntu-latest
8
- steps:
9
- - uses: actions/checkout@v2
10
- - name: Set up Ruby
11
- uses: ruby/setup-ruby@v1
12
- with:
13
- ruby-version: 3.0.2
14
- bundler-cache: true
15
- - name: Run the default task
16
- run: bundle exec rake
data/.gitignore DELETED
@@ -1,10 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
-
10
- .nova/Tasks/run.json
data/Gemfile.lock DELETED
@@ -1,40 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- inline_fn (0.1.1)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- ast (2.4.2)
10
- parallel (1.20.1)
11
- parser (3.0.2.0)
12
- ast (~> 2.4.1)
13
- rainbow (3.0.0)
14
- rake (13.0.6)
15
- regexp_parser (2.1.1)
16
- rexml (3.2.5)
17
- rubocop (1.19.1)
18
- parallel (~> 1.10)
19
- parser (>= 3.0.0.0)
20
- rainbow (>= 2.2.2, < 4.0)
21
- regexp_parser (>= 1.8, < 3.0)
22
- rexml
23
- rubocop-ast (>= 1.9.1, < 2.0)
24
- ruby-progressbar (~> 1.7)
25
- unicode-display_width (>= 1.4.0, < 3.0)
26
- rubocop-ast (1.11.0)
27
- parser (>= 3.0.1.1)
28
- ruby-progressbar (1.11.0)
29
- unicode-display_width (2.0.0)
30
-
31
- PLATFORMS
32
- arm64-darwin-20
33
-
34
- DEPENDENCIES
35
- inline_fn!
36
- rake (~> 13.0)
37
- rubocop (~> 1.7)
38
-
39
- BUNDLED WITH
40
- 2.3.0.dev
data/bin/console DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "bundler/setup"
5
- require "inline_fn"
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require "irb"
15
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/inline_fn-0.1.0.gem DELETED
Binary file
data/inline_fn.gemspec DELETED
@@ -1,36 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "lib/inline_fn/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "inline_fn"
7
- spec.version = InlineFn::VERSION
8
- spec.authors = ["Bernardo C.D.A. Vasconcelos"]
9
- spec.email = ["35749099+bcdavasconcelos@users.noreply.github.com"]
10
-
11
- spec.summary = "Change markdown footnotes format from `[^1]/[^1]:Note` to inline Pandoc or MMD style `^[Note]/[^Note]`."
12
- spec.description = "There are two methods that work on strings. Use `str.inline_mmd` for Multimarkdown style or `str.inline_pandoc` for Pandoc style footnotes."
13
- spec.homepage = "https://github.com/bcdavasconcelos/inline_fn"
14
- spec.license = "MIT"
15
- spec.required_ruby_version = ">= 2.4.0"
16
-
17
-
18
- spec.metadata["homepage_uri"] = spec.homepage
19
- spec.metadata["source_code_uri"] = "https://github.com/bcdavasconcelos/inline_fn.git"
20
- spec.metadata["changelog_uri"] = "https://github.com/bcdavasconcelos/inline_fn/blob/master/CHANGELOG.md"
21
-
22
- # Specify which files should be added to the gem when it is released.
23
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
- spec.files = Dir.chdir(File.expand_path(__dir__)) do
25
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
26
- end
27
- spec.bindir = "exe"
28
- spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
- spec.require_paths = ["lib"]
30
-
31
- # Uncomment to register a new dependency of your gem
32
- # spec.add_dependency "example-gem", "~> 1.0"
33
-
34
- # For more information and examples about making a new gem, checkout our
35
- # guide at: https://bundler.io/guides/creating_gem.html
36
- end
@@ -1,29 +0,0 @@
1
- class InlineFn
2
- def inline_pandoc(str)
3
- text = str
4
- counter = 0
5
- pandoc_mode = true
6
- loop do
7
- counter += 1
8
- cite = "[^#{counter}]"
9
- ref = "[^#{counter}]:"
10
- ref_start = text.index(ref)
11
- break if ref_start.nil?
12
-
13
- next_ref = "[^#{counter + 1}]:"
14
- ref_end = text.index(next_ref).nil? ? -1 : text.index(next_ref) - 2
15
- offset = counter.to_s.length + 5
16
- note = pandoc_mode ? "^[#{text[ref_start + offset..ref_end].strip}]" : "[^#{text[ref_start + offset..ref_end].strip}]"
17
-
18
- text.gsub!(cite, note)
19
- end
20
-
21
- if counter >= 1
22
- text = pandoc_mode ? text.gsub(/\n\s*\^\[/, "\n^[") : text.gsub(/\n\s*\[\^/, "\n[^")
23
- cut_point = pandoc_mode ? text.index("\n^") : text.index("\n[^")
24
- text = text[0, cut_point]
25
- # puts "#{counter -= 1} notes replaced."
26
- end
27
- puts text
28
- end
29
- end
@@ -1,29 +0,0 @@
1
- class InlineFn
2
- def inline_mmd(str)
3
- text = str
4
- counter = 0
5
- pandoc_mode = false
6
- loop do
7
- counter += 1
8
- cite = "[^#{counter}]"
9
- ref = "[^#{counter}]:"
10
- ref_start = text.index(ref)
11
- break if ref_start.nil?
12
-
13
- next_ref = "[^#{counter + 1}]:"
14
- ref_end = text.index(next_ref).nil? ? -1 : text.index(next_ref) - 2
15
- offset = counter.to_s.length + 5
16
- note = pandoc_mode ? "^[#{text[ref_start + offset..ref_end].strip}]" : "[^#{text[ref_start + offset..ref_end].strip}]"
17
-
18
- text.gsub!(cite, note)
19
- end
20
-
21
- if counter >= 1
22
- text = pandoc_mode ? text.gsub(/\n\s*\^\[/, "\n^[") : text.gsub(/\n\s*\[\^/, "\n[^")
23
- cut_point = pandoc_mode ? text.index("\n^") : text.index("\n[^")
24
- text = text[0, cut_point]
25
- # puts "#{counter -= 1} notes replaced."
26
- end
27
- puts text
28
- end
29
- end