telepost 0.2.1 → 0.2.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: 05c7f5ad3d7c02a345d51f5aac1e18215533afc37fafbeadb979791f415681d2
4
- data.tar.gz: d4d78741d5e7be0e3469a252b03395ed992e4a6177a5328ca065e105bdef8d75
3
+ metadata.gz: 3b7a6ced97dca0eda53074e82010b9508f3b0892a9c227304ccefebf6dae64da
4
+ data.tar.gz: c575a38531edb4e97cb35bff9578ba683d9db8ab8ea2a49c998e43d72a90de8c
5
5
  SHA512:
6
- metadata.gz: 4f4f4867bf91b0d1089ced152ff8f56373c23c438e5eecbb053877e9f4d20557bc4c529a7e9abed340f6c45472cc3e46cb4fb8ba6156bbea40b73abd457b8676
7
- data.tar.gz: 7e231e1add641240cacddc737ebab3260a5c3671cfa65d7eb042038a00ca992614d3674f165198bf841dffe71acebc98db263a6d76382f7041f56ee669d1ffc7
6
+ metadata.gz: 9a83e6b3354872b927f5a83cf092c5616ac740e81b19966ec09ccfade3c19e7d821d280465279e44ce8b8334307a8ced2e79cee1013d0f787958c648b3a02832
7
+ data.tar.gz: ff685a2f5af0dc7bfb4adde95f5e0fcff69523ec650f4fca506d576db0294e3e7f396ef6fe272dd635bd2d7e68d05dfe6590816976ea77d2bd7846a1771f1eba
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Settings><!--This file was automatically generated by Ruby plugin.
3
+ You are allowed to:
4
+ 1. Remove rake task
5
+ 2. Add existing rake tasks
6
+ To add existing rake tasks automatically delete this file and reload the project.
7
+ --><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Remove RDoc HTML files" fullCmd="clobber_rdoc" taksId="clobber_rdoc" /><RakeTask description="Build RDoc HTML files" fullCmd="rdoc" taksId="rdoc" /><RakeTask description="Rebuild RDoc HTML files" fullCmd="rerdoc" taksId="rerdoc" /><RakeTask description="Run RuboCop on all directories" fullCmd="rubocop" taksId="rubocop" /><RakeGroup description="" fullCmd="" taksId="rubocop"><RakeTask description="Auto-correct RuboCop offenses" fullCmd="rubocop:auto_correct" taksId="auto_correct" /></RakeGroup><RakeTask description="Run tests" fullCmd="test" taksId="test" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="rdoc/created.rid" taksId="rdoc/created.rid" /></RakeGroup></Settings>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Encoding" addBOMForNewFiles="with NO BOM" />
4
+ </project>
@@ -0,0 +1,115 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0" is_locked="false">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="AnonymousFunctionJS" enabled="true" level="WARNING" enabled_by_default="true" />
5
+ <inspection_tool class="AssignmentResultUsedJS" enabled="true" level="WARNING" enabled_by_default="true" />
6
+ <inspection_tool class="AssignmentToForLoopParameterJS" enabled="true" level="WARNING" enabled_by_default="true" />
7
+ <inspection_tool class="AssignmentToFunctionParameterJS" enabled="true" level="WARNING" enabled_by_default="true" />
8
+ <inspection_tool class="BlockStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
9
+ <inspection_tool class="BreakStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
10
+ <inspection_tool class="BreakStatementWithLabelJS" enabled="true" level="WARNING" enabled_by_default="true" />
11
+ <inspection_tool class="ChainedEqualityJS" enabled="true" level="WARNING" enabled_by_default="true" />
12
+ <inspection_tool class="ChainedFunctionCallJS" enabled="true" level="WARNING" enabled_by_default="true" />
13
+ <inspection_tool class="ConditionalExpressionJS" enabled="true" level="WARNING" enabled_by_default="true" />
14
+ <inspection_tool class="ConditionalExpressionWithIdenticalBranchesJS" enabled="true" level="WARNING" enabled_by_default="true" />
15
+ <inspection_tool class="ConfusingFloatingPointLiteralJS" enabled="true" level="WARNING" enabled_by_default="true" />
16
+ <inspection_tool class="ConfusingPlusesOrMinusesJS" enabled="true" level="WARNING" enabled_by_default="true" />
17
+ <inspection_tool class="ConstantOnLHSOfComparisonJS" enabled="true" level="WARNING" enabled_by_default="true" />
18
+ <inspection_tool class="ConstantOnRHSOfComparisonJS" enabled="true" level="WARNING" enabled_by_default="true" />
19
+ <inspection_tool class="ContinueStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
20
+ <inspection_tool class="ContinueStatementWithLabelJS" enabled="true" level="WARNING" enabled_by_default="true" />
21
+ <inspection_tool class="CssConvertColorToHexInspection" enabled="true" level="WARNING" enabled_by_default="true" />
22
+ <inspection_tool class="CssConvertColorToRgbInspection" enabled="true" level="WARNING" enabled_by_default="true" />
23
+ <inspection_tool class="CssMissingSemicolon" enabled="true" level="WARNING" enabled_by_default="true" />
24
+ <inspection_tool class="CyclomaticComplexityJS" enabled="true" level="WARNING" enabled_by_default="true">
25
+ <option name="m_limit" value="10" />
26
+ </inspection_tool>
27
+ <inspection_tool class="DebuggerStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
28
+ <inspection_tool class="DefaultNotLastCaseInSwitchJS" enabled="true" level="WARNING" enabled_by_default="true" />
29
+ <inspection_tool class="DivideByZeroJS" enabled="true" level="WARNING" enabled_by_default="true" />
30
+ <inspection_tool class="DocumentWriteJS" enabled="true" level="WARNING" enabled_by_default="true" />
31
+ <inspection_tool class="DuplicateConditionJS" enabled="true" level="WARNING" enabled_by_default="true" />
32
+ <inspection_tool class="DynamicallyGeneratedCodeJS" enabled="true" level="WARNING" enabled_by_default="true" />
33
+ <inspection_tool class="EmptyCatchBlockJS" enabled="true" level="WARNING" enabled_by_default="true" />
34
+ <inspection_tool class="EmptyFinallyBlockJS" enabled="true" level="WARNING" enabled_by_default="true" />
35
+ <inspection_tool class="EmptyTryBlockJS" enabled="true" level="WARNING" enabled_by_default="true" />
36
+ <inspection_tool class="EqualityComparisonWithCoercionJS" enabled="true" level="WARNING" enabled_by_default="true" />
37
+ <inspection_tool class="ForLoopReplaceableByWhileJS" enabled="true" level="WARNING" enabled_by_default="true">
38
+ <option name="m_ignoreLoopsWithoutConditions" value="false" />
39
+ </inspection_tool>
40
+ <inspection_tool class="ForLoopThatDoesntUseLoopVariableJS" enabled="true" level="WARNING" enabled_by_default="true" />
41
+ <inspection_tool class="FunctionNamingConventionJS" enabled="true" level="WARNING" enabled_by_default="true">
42
+ <option name="m_regex" value="[a-z][A-Za-z]*" />
43
+ <option name="m_minLength" value="4" />
44
+ <option name="m_maxLength" value="32" />
45
+ </inspection_tool>
46
+ <inspection_tool class="FunctionWithMultipleLoopsJS" enabled="true" level="WARNING" enabled_by_default="true" />
47
+ <inspection_tool class="FunctionWithMultipleReturnPointsJS" enabled="true" level="WARNING" enabled_by_default="true" />
48
+ <inspection_tool class="GjsLint" enabled="true" level="WARNING" enabled_by_default="true" />
49
+ <inspection_tool class="HtmlNonExistentInternetResource" enabled="true" level="WARNING" enabled_by_default="true" />
50
+ <inspection_tool class="IfStatementWithIdenticalBranchesJS" enabled="true" level="WARNING" enabled_by_default="true" />
51
+ <inspection_tool class="IfStatementWithTooManyBranchesJS" enabled="true" level="WARNING" enabled_by_default="true">
52
+ <option name="m_limit" value="3" />
53
+ </inspection_tool>
54
+ <inspection_tool class="InconsistentLineSeparators" enabled="true" level="WARNING" enabled_by_default="true" />
55
+ <inspection_tool class="IncrementDecrementResultUsedJS" enabled="true" level="WARNING" enabled_by_default="true" />
56
+ <inspection_tool class="InnerHTMLJS" enabled="true" level="WARNING" enabled_by_default="true" />
57
+ <inspection_tool class="JSDeclarationsAtScopeStart" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
58
+ <inspection_tool class="JSHint" enabled="true" level="ERROR" enabled_by_default="true" />
59
+ <inspection_tool class="JSLint" enabled="true" level="ERROR" enabled_by_default="true" />
60
+ <inspection_tool class="LabeledStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
61
+ <inspection_tool class="LocalVariableNamingConventionJS" enabled="true" level="WARNING" enabled_by_default="true">
62
+ <option name="m_regex" value="[a-z][A-Za-z]*" />
63
+ <option name="m_minLength" value="1" />
64
+ <option name="m_maxLength" value="32" />
65
+ </inspection_tool>
66
+ <inspection_tool class="MagicNumberJS" enabled="true" level="WARNING" enabled_by_default="true" />
67
+ <inspection_tool class="NegatedConditionalExpressionJS" enabled="true" level="WARNING" enabled_by_default="true" />
68
+ <inspection_tool class="NegatedIfStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
69
+ <inspection_tool class="NestedAssignmentJS" enabled="true" level="WARNING" enabled_by_default="true" />
70
+ <inspection_tool class="NestedConditionalExpressionJS" enabled="true" level="WARNING" enabled_by_default="true" />
71
+ <inspection_tool class="NestedFunctionCallJS" enabled="true" level="WARNING" enabled_by_default="true" />
72
+ <inspection_tool class="NestedFunctionJS" enabled="true" level="WARNING" enabled_by_default="true">
73
+ <option name="m_includeAnonymousFunctions" value="false" />
74
+ </inspection_tool>
75
+ <inspection_tool class="NestedSwitchStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
76
+ <inspection_tool class="NestingDepthJS" enabled="true" level="WARNING" enabled_by_default="true">
77
+ <option name="m_limit" value="5" />
78
+ </inspection_tool>
79
+ <inspection_tool class="NonBlockStatementBodyJS" enabled="true" level="WARNING" enabled_by_default="true" />
80
+ <inspection_tool class="NonShortCircuitBooleanExpressionJS" enabled="true" level="WARNING" enabled_by_default="true" />
81
+ <inspection_tool class="ObjectAllocationIgnoredJS" enabled="true" level="WARNING" enabled_by_default="true" />
82
+ <inspection_tool class="OverlyComplexArithmeticExpressionJS" enabled="true" level="WARNING" enabled_by_default="true">
83
+ <option name="m_limit" value="6" />
84
+ </inspection_tool>
85
+ <inspection_tool class="OverlyComplexBooleanExpressionJS" enabled="true" level="WARNING" enabled_by_default="true">
86
+ <option name="m_limit" value="3" />
87
+ </inspection_tool>
88
+ <inspection_tool class="ParameterNamingConventionJS" enabled="true" level="WARNING" enabled_by_default="true">
89
+ <option name="m_regex" value="[a-z][A-Za-z]*" />
90
+ <option name="m_minLength" value="1" />
91
+ <option name="m_maxLength" value="32" />
92
+ </inspection_tool>
93
+ <inspection_tool class="ParametersPerFunctionJS" enabled="true" level="WARNING" enabled_by_default="true">
94
+ <option name="m_limit" value="5" />
95
+ </inspection_tool>
96
+ <inspection_tool class="PlatformDetectionJS" enabled="true" level="WARNING" enabled_by_default="true" />
97
+ <inspection_tool class="ReplaceAssignmentWithOperatorAssignmentJS" enabled="true" level="WARNING" enabled_by_default="true" />
98
+ <inspection_tool class="ReuseOfLocalVariableJS" enabled="true" level="WARNING" enabled_by_default="true" />
99
+ <inspection_tool class="RubyConvertAllHashesInFileInspections" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
100
+ <inspection_tool class="StatementsPerFunctionJS" enabled="true" level="WARNING" enabled_by_default="true">
101
+ <option name="m_limit" value="30" />
102
+ </inspection_tool>
103
+ <inspection_tool class="StringLiteralBreaksHTMLJS" enabled="true" level="WARNING" enabled_by_default="true" />
104
+ <inspection_tool class="SwitchStatementWithNoDefaultBranchJS" enabled="true" level="WARNING" enabled_by_default="true" />
105
+ <inspection_tool class="TailRecursionJS" enabled="true" level="WARNING" enabled_by_default="true" />
106
+ <inspection_tool class="TextLabelInSwitchStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
107
+ <inspection_tool class="ThreeNegationsPerFunctionJS" enabled="true" level="WARNING" enabled_by_default="true" />
108
+ <inspection_tool class="UnusedCatchParameterJS" enabled="true" level="WARNING" enabled_by_default="true">
109
+ <option name="m_ignoreCatchBlocksWithComments" value="false" />
110
+ </inspection_tool>
111
+ <inspection_tool class="UnusedDefine" enabled="true" level="WARNING" enabled_by_default="true" />
112
+ <inspection_tool class="VoidExpressionJS" enabled="true" level="WARNING" enabled_by_default="true" />
113
+ <inspection_tool class="XHTMLIncompatabilitiesJS" enabled="true" level="WARNING" enabled_by_default="true" />
114
+ </profile>
115
+ </component>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="JavaScriptSettings">
4
+ <option name="languageLevel" value="ES6" />
5
+ </component>
6
+ <component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-2.5.1 [global]" project-jdk-type="RUBY_SDK" />
7
+ </project>
@@ -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/telepost.iml" filepath="$PROJECT_DIR$/.idea/telepost.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,35 @@
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
+ <orderEntry type="inheritedJdk" />
9
+ <orderEntry type="sourceFolder" forTests="false" />
10
+ <orderEntry type="library" scope="PROVIDED" name="ast (v2.4.0, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
11
+ <orderEntry type="library" scope="PROVIDED" name="axiom-types (v0.1.1, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
12
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v1.17.2, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
13
+ <orderEntry type="library" scope="PROVIDED" name="coercible (v1.0.0, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
14
+ <orderEntry type="library" scope="PROVIDED" name="descendants_tracker (v0.0.4, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
15
+ <orderEntry type="library" scope="PROVIDED" name="equalizer (v0.0.11, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
16
+ <orderEntry type="library" scope="PROVIDED" name="faraday (v0.15.4, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="faraday_middleware (v0.12.2, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="ice_nine (v0.11.2, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="minitest (v5.11.3, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="multipart-post (v2.0.0, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
21
+ <orderEntry type="library" scope="PROVIDED" name="parallel (v1.12.1, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
22
+ <orderEntry type="library" scope="PROVIDED" name="parser (v2.5.3.0, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="powerpack (v0.1.2, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
24
+ <orderEntry type="library" scope="PROVIDED" name="rainbow (v3.0.0, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
25
+ <orderEntry type="library" scope="PROVIDED" name="rake (v12.3.1, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
26
+ <orderEntry type="library" scope="PROVIDED" name="rdoc (v4.3.0, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
27
+ <orderEntry type="library" scope="PROVIDED" name="rubocop (v0.60.0, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
28
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-rspec (v1.30.1, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
29
+ <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.10.0, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
30
+ <orderEntry type="library" scope="PROVIDED" name="telebot (v0.1.2, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
31
+ <orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.6, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
32
+ <orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v1.4.0, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
33
+ <orderEntry type="library" scope="PROVIDED" name="virtus (v1.0.5, RVM: ruby-2.5.1 [global]) [gem]" level="application" />
34
+ </component>
35
+ </module>
@@ -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,130 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ChangeListManager">
4
+ <list default="true" id="26e4d5ac-0ee1-44f0-b7e0-956373308cf8" name="Default Changelist" comment="">
5
+ <change afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" afterDir="false" />
6
+ <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
7
+ <change beforePath="$PROJECT_DIR$/lib/telepost.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/telepost.rb" afterDir="false" />
8
+ </list>
9
+ <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
10
+ <option name="SHOW_DIALOG" value="false" />
11
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
12
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
13
+ <option name="LAST_RESOLUTION" value="IGNORE" />
14
+ </component>
15
+ <component name="FileEditorManager">
16
+ <leaf>
17
+ <file pinned="false" current-in-tab="true">
18
+ <entry file="file://$PROJECT_DIR$/lib/telepost.rb">
19
+ <provider selected="true" editor-type-id="text-editor">
20
+ <state relative-caret-position="302">
21
+ <caret line="103" column="25" selection-start-line="103" selection-start-column="25" selection-end-line="103" selection-end-column="25" />
22
+ </state>
23
+ </provider>
24
+ </entry>
25
+ </file>
26
+ </leaf>
27
+ </component>
28
+ <component name="Git.Settings">
29
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
30
+ </component>
31
+ <component name="IdeDocumentHistory">
32
+ <option name="CHANGED_PATHS">
33
+ <list>
34
+ <option value="$PROJECT_DIR$/lib/telepost.rb" />
35
+ </list>
36
+ </option>
37
+ </component>
38
+ <component name="ProjectFrameBounds">
39
+ <option name="y" value="23" />
40
+ <option name="width" value="1440" />
41
+ <option name="height" value="873" />
42
+ </component>
43
+ <component name="ProjectLevelVcsManager">
44
+ <ConfirmationsSetting value="2" id="Add" />
45
+ </component>
46
+ <component name="ProjectView">
47
+ <navigator proportions="" version="1">
48
+ <foldersAlwaysOnTop value="true" />
49
+ </navigator>
50
+ <panes>
51
+ <pane id="Scope" />
52
+ <pane id="ProjectPane" />
53
+ </panes>
54
+ </component>
55
+ <component name="PropertiesComponent">
56
+ <property name="WebServerToolWindowFactoryState" value="false" />
57
+ <property name="last_opened_file_path" value="$PROJECT_DIR$" />
58
+ <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
59
+ <property name="nodejs_npm_path_reset_for_default_project" value="true" />
60
+ <property name="settings.editor.selected.configurable" value="configurable.group.appearance" />
61
+ </component>
62
+ <component name="RunDashboard">
63
+ <option name="ruleStates">
64
+ <list>
65
+ <RuleState>
66
+ <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
67
+ </RuleState>
68
+ <RuleState>
69
+ <option name="name" value="StatusDashboardGroupingRule" />
70
+ </RuleState>
71
+ </list>
72
+ </option>
73
+ </component>
74
+ <component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" />
75
+ <component name="SvnConfiguration">
76
+ <configuration />
77
+ </component>
78
+ <component name="TaskManager">
79
+ <task active="true" id="Default" summary="Default task">
80
+ <changelist id="26e4d5ac-0ee1-44f0-b7e0-956373308cf8" name="Default Changelist" comment="" />
81
+ <created>1545554989599</created>
82
+ <option name="number" value="Default" />
83
+ <option name="presentableId" value="Default" />
84
+ <updated>1545554989599</updated>
85
+ <workItem from="1545554990888" duration="210000" />
86
+ </task>
87
+ <servers />
88
+ </component>
89
+ <component name="TimeTrackingManager">
90
+ <option name="totallyTimeSpent" value="210000" />
91
+ </component>
92
+ <component name="ToolWindowManager">
93
+ <frame x="0" y="23" width="1440" height="873" extended-state="0" />
94
+ <editor active="true" />
95
+ <layout>
96
+ <window_info id="Favorites" side_tool="true" />
97
+ <window_info content_ui="combo" id="Project" order="0" weight="0.25" />
98
+ <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
99
+ <window_info anchor="bottom" id="Docker" show_stripe_button="false" />
100
+ <window_info anchor="bottom" id="Database Changes" />
101
+ <window_info anchor="bottom" id="Version Control" />
102
+ <window_info active="true" anchor="bottom" id="Messages" visible="true" weight="0.32969698" />
103
+ <window_info anchor="bottom" id="Terminal" />
104
+ <window_info anchor="bottom" id="Event Log" side_tool="true" />
105
+ <window_info anchor="bottom" id="Message" order="0" />
106
+ <window_info anchor="bottom" id="Find" order="1" />
107
+ <window_info anchor="bottom" id="Run" order="2" weight="0.32969698" />
108
+ <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
109
+ <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
110
+ <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
111
+ <window_info anchor="bottom" id="TODO" order="6" />
112
+ <window_info anchor="right" id="Database" />
113
+ <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
114
+ <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
115
+ <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
116
+ </layout>
117
+ </component>
118
+ <component name="TypeScriptGeneratedFilesManager">
119
+ <option name="version" value="1" />
120
+ </component>
121
+ <component name="editorHistoryManager">
122
+ <entry file="file://$PROJECT_DIR$/lib/telepost.rb">
123
+ <provider selected="true" editor-type-id="text-editor">
124
+ <state relative-caret-position="302">
125
+ <caret line="103" column="25" selection-start-line="103" selection-start-column="25" selection-end-line="103" selection-end-column="25" />
126
+ </state>
127
+ </provider>
128
+ </entry>
129
+ </component>
130
+ </project>
@@ -60,6 +60,11 @@ class Telepost
60
60
  end
61
61
  end
62
62
 
63
+ # When can't post a message
64
+ class CantPost < StandardError; end
65
+
66
+ # Makes a new object. To obtain a token you should talk
67
+ # to the @BotFather in Telegram.
63
68
  def initialize(token, chats: [])
64
69
  @token = token
65
70
  @client = Telebot::Client.new(token)
@@ -81,20 +86,29 @@ class Telepost
81
86
  end
82
87
  end
83
88
 
89
+ # Send the message (lines will be concatenated with a space
90
+ # between them) to the chats provided in the constructor
91
+ # and encapsulated.
84
92
  def spam(*lines)
85
93
  @chats.each do |chat|
86
94
  post(chat, lines)
87
95
  end
88
96
  end
89
97
 
98
+ # Post a single message to the designated chat room. The
99
+ # chat argument can either me an integer, if you know the
100
+ # chat ID, or the name of the channel (your bot has to
101
+ # be the admin there). The lines provided will be
102
+ # concatenated with a space between them.
90
103
  def post(chat, *lines)
104
+ msg = lines.join(' ')
91
105
  @client.send_message(
92
106
  chat_id: chat,
93
107
  parse_mode: 'Markdown',
94
108
  disable_web_page_preview: true,
95
- text: lines.join(' ')
109
+ text: msg
96
110
  )
97
111
  rescue Telebot::Error => e
98
- raise "#{e.message}: \"#{msg}\""
112
+ raise CantPost, "#{e.message}: \"#{msg}\""
99
113
  end
100
114
  end
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
31
31
  s.rubygems_version = '2.5.1'
32
32
  s.required_ruby_version = '>=2.5'
33
33
  s.name = 'telepost'
34
- s.version = '0.2.1'
34
+ s.version = '0.2.2'
35
35
  s.license = 'MIT'
36
36
  s.summary = 'Simple Telegram posting Ruby gem'
37
37
  s.description = 'Simple Telegram posting Ruby gem'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telepost
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-14 00:00:00.000000000 Z
11
+ date: 2018-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: telebot
@@ -103,6 +103,14 @@ extra_rdoc_files:
103
103
  files:
104
104
  - ".0pdd.yml"
105
105
  - ".gitignore"
106
+ - ".idea/.rakeTasks"
107
+ - ".idea/encodings.xml"
108
+ - ".idea/inspectionProfiles/Project_Default.xml"
109
+ - ".idea/misc.xml"
110
+ - ".idea/modules.xml"
111
+ - ".idea/telepost.iml"
112
+ - ".idea/vcs.xml"
113
+ - ".idea/workspace.xml"
106
114
  - ".pdd"
107
115
  - ".rubocop.yml"
108
116
  - ".rultor.yml"