cobinhood_api 0.0.1
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 +7 -0
- data/.gitignore +8 -0
- data/.idea/cobinhood_api.iml +14 -0
- data/.idea/inspectionProfiles/Project_Default.xml +6 -0
- data/.idea/misc.xml +4 -0
- data/.idea/modules.xml +8 -0
- data/.idea/vcs.xml +6 -0
- data/.idea/workspace.xml +423 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/cobinhood_api.gemspec +34 -0
- data/lib/cobinhood_api.rb +356 -0
- metadata +103 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 818ad7e64b4f00359548b11f49ab1c39bd0935fe
|
4
|
+
data.tar.gz: 379b160d6f0c71c9eedceb83b769160b6cce8f50
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5afd2ae47233829033c8ae2eb60c746321b34243e9d787e517662f642be716d943a43876c3fa69889a0cb78bc53d693c50f26dd4bfc31456d59d4f506e92c676
|
7
|
+
data.tar.gz: 71b5bdd63e7e0c6f1dd835db22a35ea46457a7f7c826e2e93057533c0db814cee4565cf0ac0a5cbb30183f6eb354060b33c301aa4024824e28be573c4aebdc94
|
data/.gitignore
ADDED
@@ -0,0 +1,14 @@
|
|
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="bundler (v1.16.1, ruby-2.4.3-p205) [gem]" level="application" />
|
11
|
+
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.11.3, ruby-2.4.3-p205) [gem]" level="application" />
|
12
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v10.5.0, ruby-2.4.3-p205) [gem]" level="application" />
|
13
|
+
</component>
|
14
|
+
</module>
|
data/.idea/misc.xml
ADDED
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/cobinhood_api.iml" filepath="$PROJECT_DIR$/.idea/cobinhood_api.iml" />
|
6
|
+
</modules>
|
7
|
+
</component>
|
8
|
+
</project>
|
data/.idea/vcs.xml
ADDED
data/.idea/workspace.xml
ADDED
@@ -0,0 +1,423 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ChangeListManager">
|
4
|
+
<list default="true" id="5e41dde8-a081-42e7-b832-bd5db6809d7f" name="Default" comment="">
|
5
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/.gitignore" />
|
6
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/.idea/cobinhood_api.iml" />
|
7
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" />
|
8
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/.idea/misc.xml" />
|
9
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/.idea/modules.xml" />
|
10
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
|
11
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
12
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/.travis.yml" />
|
13
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/CODE_OF_CONDUCT.md" />
|
14
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/Gemfile" />
|
15
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/LICENSE.txt" />
|
16
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/README.md" />
|
17
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/Rakefile" />
|
18
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/bin/console" />
|
19
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/bin/setup" />
|
20
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/cobinhood_api.gemspec" />
|
21
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/lib/cobinhood_api.rb" />
|
22
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/test/cobinhood_api_test.rb" />
|
23
|
+
<change beforePath="" afterPath="$PROJECT_DIR$/test/test_helper.rb" />
|
24
|
+
</list>
|
25
|
+
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
26
|
+
<option name="TRACKING_ENABLED" value="true" />
|
27
|
+
<option name="SHOW_DIALOG" value="false" />
|
28
|
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
29
|
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
30
|
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
31
|
+
</component>
|
32
|
+
<component name="CoverageDataManager">
|
33
|
+
<SUITE FILE_PATH="coverage/cobinhood_api@cobinhood_api_xxx.coverage" NAME="cobinhood_api_xxx Coverage Results" MODIFIED="1519673709628" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/lib" MODULE_NAME="cobinhood_api" />
|
34
|
+
<SUITE FILE_PATH="coverage/cobinhood_api@cobinhood_api.coverage" NAME="cobinhood_api_version Coverage Results" MODIFIED="1519674391444" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/lib" MODULE_NAME="cobinhood_api" />
|
35
|
+
<SUITE FILE_PATH="coverage/cobinhood_api@console.coverage" NAME="console Coverage Results" MODIFIED="1519675125496" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/bin" MODULE_NAME="cobinhood_api" />
|
36
|
+
<SUITE FILE_PATH="coverage/cobinhood_api@testmead.coverage" NAME="mycode Coverage Results" MODIFIED="1519673444079" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="cobinhood_api" />
|
37
|
+
<SUITE FILE_PATH="coverage/cobinhood_api@wtf_class.coverage" NAME="wtf_class Coverage Results" MODIFIED="1519673885773" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/lib" MODULE_NAME="cobinhood_api" />
|
38
|
+
<SUITE FILE_PATH="coverage/cobinhood_api@foo_bar.coverage" NAME="foo_bar Coverage Results" MODIFIED="1519673845215" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="cobinhood_api" />
|
39
|
+
</component>
|
40
|
+
<component name="FileEditorManager">
|
41
|
+
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
42
|
+
<file leaf-file-name="cobinhood_api.rb" pinned="false" current-in-tab="false">
|
43
|
+
<entry file="file://$PROJECT_DIR$/lib/cobinhood_api.rb">
|
44
|
+
<provider selected="true" editor-type-id="text-editor">
|
45
|
+
<state relative-caret-position="340">
|
46
|
+
<caret line="65" column="0" lean-forward="false" selection-start-line="65" selection-start-column="0" selection-end-line="65" selection-end-column="0" />
|
47
|
+
<folding />
|
48
|
+
</state>
|
49
|
+
</provider>
|
50
|
+
</entry>
|
51
|
+
</file>
|
52
|
+
<file leaf-file-name="cobinhood_api.gemspec" pinned="false" current-in-tab="true">
|
53
|
+
<entry file="file://$PROJECT_DIR$/cobinhood_api.gemspec">
|
54
|
+
<provider selected="true" editor-type-id="text-editor">
|
55
|
+
<state relative-caret-position="51">
|
56
|
+
<caret line="3" column="0" lean-forward="false" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
|
57
|
+
<folding />
|
58
|
+
</state>
|
59
|
+
</provider>
|
60
|
+
</entry>
|
61
|
+
</file>
|
62
|
+
<file leaf-file-name="console" pinned="false" current-in-tab="false">
|
63
|
+
<entry file="file://$PROJECT_DIR$/bin/console">
|
64
|
+
<provider selected="true" editor-type-id="text-editor">
|
65
|
+
<state relative-caret-position="187">
|
66
|
+
<caret line="11" column="0" lean-forward="false" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
|
67
|
+
<folding />
|
68
|
+
</state>
|
69
|
+
</provider>
|
70
|
+
</entry>
|
71
|
+
</file>
|
72
|
+
</leaf>
|
73
|
+
</component>
|
74
|
+
<component name="FileTemplateManagerImpl">
|
75
|
+
<option name="RECENT_TEMPLATES">
|
76
|
+
<list>
|
77
|
+
<option value="Ruby Class Template" />
|
78
|
+
</list>
|
79
|
+
</option>
|
80
|
+
</component>
|
81
|
+
<component name="Git.Settings">
|
82
|
+
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
83
|
+
</component>
|
84
|
+
<component name="IdeDocumentHistory">
|
85
|
+
<option name="CHANGED_PATHS">
|
86
|
+
<list>
|
87
|
+
<option value="$PROJECT_DIR$/lib/cobinhood_api/version.rb" />
|
88
|
+
<option value="$PROJECT_DIR$/testmead.rb" />
|
89
|
+
<option value="$PROJECT_DIR$/foo_bar.rb" />
|
90
|
+
<option value="$PROJECT_DIR$/lib/foo_bar.rb" />
|
91
|
+
<option value="$PROJECT_DIR$/lib/wtf_class.rb" />
|
92
|
+
<option value="$PROJECT_DIR$/lib/cobinhood_api.rb" />
|
93
|
+
<option value="$PROJECT_DIR$/cobinhood_api.gemspec" />
|
94
|
+
<option value="$PROJECT_DIR$/bin/console" />
|
95
|
+
</list>
|
96
|
+
</option>
|
97
|
+
</component>
|
98
|
+
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
|
99
|
+
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
|
100
|
+
<component name="JsGulpfileManager">
|
101
|
+
<detection-done>true</detection-done>
|
102
|
+
<sorting>DEFINITION_ORDER</sorting>
|
103
|
+
</component>
|
104
|
+
<component name="ProjectFrameBounds" extendedState="6">
|
105
|
+
<option name="x" value="260" />
|
106
|
+
<option name="y" value="20" />
|
107
|
+
<option name="width" value="1400" />
|
108
|
+
<option name="height" value="1000" />
|
109
|
+
</component>
|
110
|
+
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
111
|
+
<component name="ProjectView">
|
112
|
+
<navigator currentView="ProjectPane" proportions="" version="1">
|
113
|
+
<flattenPackages />
|
114
|
+
<showMembers />
|
115
|
+
<showModules />
|
116
|
+
<showLibraryContents />
|
117
|
+
<hideEmptyPackages />
|
118
|
+
<abbreviatePackageNames />
|
119
|
+
<autoscrollToSource />
|
120
|
+
<autoscrollFromSource />
|
121
|
+
<sortByType />
|
122
|
+
<manualOrder />
|
123
|
+
<foldersAlwaysOnTop value="true" />
|
124
|
+
</navigator>
|
125
|
+
<panes>
|
126
|
+
<pane id="Scope" />
|
127
|
+
<pane id="ProjectPane">
|
128
|
+
<subPane>
|
129
|
+
<expand>
|
130
|
+
<path>
|
131
|
+
<item name="cobinhood_api" type="b2602c69:ProjectViewProjectNode" />
|
132
|
+
<item name="cobinhood_api" type="462c0819:PsiDirectoryNode" />
|
133
|
+
</path>
|
134
|
+
<path>
|
135
|
+
<item name="cobinhood_api" type="b2602c69:ProjectViewProjectNode" />
|
136
|
+
<item name="cobinhood_api" type="462c0819:PsiDirectoryNode" />
|
137
|
+
<item name="bin" type="462c0819:PsiDirectoryNode" />
|
138
|
+
</path>
|
139
|
+
<path>
|
140
|
+
<item name="cobinhood_api" type="b2602c69:ProjectViewProjectNode" />
|
141
|
+
<item name="cobinhood_api" type="462c0819:PsiDirectoryNode" />
|
142
|
+
<item name="lib" type="462c0819:PsiDirectoryNode" />
|
143
|
+
</path>
|
144
|
+
</expand>
|
145
|
+
<select />
|
146
|
+
</subPane>
|
147
|
+
</pane>
|
148
|
+
<pane id="Scratches" />
|
149
|
+
</panes>
|
150
|
+
</component>
|
151
|
+
<component name="PropertiesComponent">
|
152
|
+
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
|
153
|
+
<property name="WebServerToolWindowFactoryState" value="false" />
|
154
|
+
<property name="settings.editor.selected.configurable" value="preferences.sourceCode.Ruby" />
|
155
|
+
</component>
|
156
|
+
<component name="RecentsManager">
|
157
|
+
<key name="MoveFile.RECENT_KEYS">
|
158
|
+
<recent name="C:\Users\Algis\RubymineProjects\cobinhood_api\lib" />
|
159
|
+
</key>
|
160
|
+
</component>
|
161
|
+
<component name="RunDashboard">
|
162
|
+
<option name="ruleStates">
|
163
|
+
<list>
|
164
|
+
<RuleState>
|
165
|
+
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
166
|
+
</RuleState>
|
167
|
+
<RuleState>
|
168
|
+
<option name="name" value="StatusDashboardGroupingRule" />
|
169
|
+
</RuleState>
|
170
|
+
</list>
|
171
|
+
</option>
|
172
|
+
</component>
|
173
|
+
<component name="RunManager" selected="Ruby.console">
|
174
|
+
<configuration name="cobinhood_api_version" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
175
|
+
<module name="cobinhood_api" />
|
176
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
177
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$MODULE_DIR$/lib" />
|
178
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
179
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
180
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
181
|
+
<envs />
|
182
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
183
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
184
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov" />
|
185
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$MODULE_DIR$/lib/cobinhood_api.rb" />
|
186
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
187
|
+
</configuration>
|
188
|
+
<configuration name="cobinhood_api_version" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
189
|
+
<module name="cobinhood_api" />
|
190
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
191
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$MODULE_DIR$/lib" />
|
192
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
193
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
194
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
195
|
+
<envs />
|
196
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
197
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
198
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov" />
|
199
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$MODULE_DIR$/lib/cobinhood_api.rb" />
|
200
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
201
|
+
</configuration>
|
202
|
+
<configuration name="console" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
203
|
+
<module name="cobinhood_api" />
|
204
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
205
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$MODULE_DIR$/bin" />
|
206
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
207
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
208
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
209
|
+
<envs />
|
210
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
211
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
212
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov" />
|
213
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$MODULE_DIR$/bin/console" />
|
214
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
215
|
+
</configuration>
|
216
|
+
<configuration name="foo_bar" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
217
|
+
<module name="cobinhood_api" />
|
218
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
219
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
220
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
221
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
222
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
223
|
+
<envs />
|
224
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
225
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
226
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov" />
|
227
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$MODULE_DIR$/lib/foo_bar.rb" />
|
228
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
229
|
+
</configuration>
|
230
|
+
<configuration name="wtf_class" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
231
|
+
<module name="cobinhood_api" />
|
232
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
233
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$MODULE_DIR$/lib" />
|
234
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
235
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
236
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
237
|
+
<envs />
|
238
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
239
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
240
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov" />
|
241
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$MODULE_DIR$/lib/wtf_class.rb" />
|
242
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
243
|
+
</configuration>
|
244
|
+
<list size="5">
|
245
|
+
<item index="0" class="java.lang.String" itemvalue="Ruby.console" />
|
246
|
+
<item index="1" class="java.lang.String" itemvalue="Ruby.cobinhood_api_version" />
|
247
|
+
<item index="2" class="java.lang.String" itemvalue="Ruby.cobinhood_api_version" />
|
248
|
+
<item index="3" class="java.lang.String" itemvalue="Ruby.foo_bar" />
|
249
|
+
<item index="4" class="java.lang.String" itemvalue="Ruby.wtf_class" />
|
250
|
+
</list>
|
251
|
+
<recent_temporary>
|
252
|
+
<list size="5">
|
253
|
+
<item index="0" class="java.lang.String" itemvalue="Ruby.console" />
|
254
|
+
<item index="1" class="java.lang.String" itemvalue="Ruby.cobinhood_api_version" />
|
255
|
+
<item index="2" class="java.lang.String" itemvalue="Ruby.wtf_class" />
|
256
|
+
<item index="3" class="java.lang.String" itemvalue="Ruby.foo_bar" />
|
257
|
+
<item index="4" class="java.lang.String" itemvalue="Ruby.cobinhood_api_version" />
|
258
|
+
</list>
|
259
|
+
</recent_temporary>
|
260
|
+
</component>
|
261
|
+
<component name="ShelveChangesManager" show_recycled="false">
|
262
|
+
<option name="remove_strategy" value="false" />
|
263
|
+
</component>
|
264
|
+
<component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" />
|
265
|
+
<component name="SvnConfiguration">
|
266
|
+
<configuration />
|
267
|
+
</component>
|
268
|
+
<component name="TaskManager">
|
269
|
+
<task active="true" id="Default" summary="Default task">
|
270
|
+
<changelist id="5e41dde8-a081-42e7-b832-bd5db6809d7f" name="Default" comment="" />
|
271
|
+
<created>1519599831778</created>
|
272
|
+
<option name="number" value="Default" />
|
273
|
+
<option name="presentableId" value="Default" />
|
274
|
+
<updated>1519599831778</updated>
|
275
|
+
<workItem from="1519599833334" duration="1242000" />
|
276
|
+
<workItem from="1519667930537" duration="6239000" />
|
277
|
+
</task>
|
278
|
+
<servers />
|
279
|
+
</component>
|
280
|
+
<component name="TimeTrackingManager">
|
281
|
+
<option name="totallyTimeSpent" value="7481000" />
|
282
|
+
</component>
|
283
|
+
<component name="ToolWindowManager">
|
284
|
+
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
|
285
|
+
<editor active="true" />
|
286
|
+
<layout>
|
287
|
+
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25586355" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
288
|
+
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
289
|
+
<window_info id="Docker" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
290
|
+
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
291
|
+
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
292
|
+
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
293
|
+
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33719704" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
294
|
+
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
295
|
+
<window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32982087" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
296
|
+
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
297
|
+
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
298
|
+
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
299
|
+
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
300
|
+
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
301
|
+
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
302
|
+
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
303
|
+
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
304
|
+
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
305
|
+
</layout>
|
306
|
+
</component>
|
307
|
+
<component name="TypeScriptGeneratedFilesManager">
|
308
|
+
<option name="version" value="1" />
|
309
|
+
</component>
|
310
|
+
<component name="VcsContentAnnotationSettings">
|
311
|
+
<option name="myLimit" value="2678400000" />
|
312
|
+
</component>
|
313
|
+
<component name="XDebuggerManager">
|
314
|
+
<breakpoint-manager />
|
315
|
+
<watches-manager />
|
316
|
+
</component>
|
317
|
+
<component name="editorHistoryManager">
|
318
|
+
<entry file="file://$PROJECT_DIR$/lib/cobinhood_api.rb">
|
319
|
+
<provider selected="true" editor-type-id="text-editor">
|
320
|
+
<state relative-caret-position="0">
|
321
|
+
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
322
|
+
<folding />
|
323
|
+
</state>
|
324
|
+
</provider>
|
325
|
+
</entry>
|
326
|
+
<entry file="file://$PROJECT_DIR$/cobinhood_api.gemspec">
|
327
|
+
<provider selected="true" editor-type-id="text-editor">
|
328
|
+
<state relative-caret-position="374">
|
329
|
+
<caret line="22" column="6" lean-forward="false" selection-start-line="22" selection-start-column="6" selection-end-line="22" selection-end-column="6" />
|
330
|
+
<folding />
|
331
|
+
</state>
|
332
|
+
</provider>
|
333
|
+
</entry>
|
334
|
+
<entry file="file://$PROJECT_DIR$/bin/console">
|
335
|
+
<provider selected="true" editor-type-id="text-editor">
|
336
|
+
<state relative-caret-position="170">
|
337
|
+
<caret line="10" column="11" lean-forward="false" selection-start-line="10" selection-start-column="11" selection-end-line="10" selection-end-column="11" />
|
338
|
+
<folding />
|
339
|
+
</state>
|
340
|
+
</provider>
|
341
|
+
</entry>
|
342
|
+
<entry file="file://$PROJECT_DIR$/.travis.yml">
|
343
|
+
<provider selected="true" editor-type-id="text-editor">
|
344
|
+
<state relative-caret-position="0">
|
345
|
+
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
346
|
+
<folding />
|
347
|
+
</state>
|
348
|
+
</provider>
|
349
|
+
</entry>
|
350
|
+
<entry file="file://$PROJECT_DIR$/bin/setup">
|
351
|
+
<provider selected="true" editor-type-id="text-editor">
|
352
|
+
<state relative-caret-position="0">
|
353
|
+
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
354
|
+
<folding />
|
355
|
+
</state>
|
356
|
+
</provider>
|
357
|
+
</entry>
|
358
|
+
<entry file="file://$PROJECT_DIR$/mycode.rb">
|
359
|
+
<provider selected="true" editor-type-id="text-editor">
|
360
|
+
<state relative-caret-position="0">
|
361
|
+
<caret line="0" column="23" lean-forward="false" selection-start-line="0" selection-start-column="23" selection-end-line="0" selection-end-column="23" />
|
362
|
+
<folding />
|
363
|
+
</state>
|
364
|
+
</provider>
|
365
|
+
</entry>
|
366
|
+
<entry file="file://$PROJECT_DIR$/lib/cobinhood_api.rb">
|
367
|
+
<provider selected="true" editor-type-id="text-editor">
|
368
|
+
<state relative-caret-position="340">
|
369
|
+
<caret line="68" column="0" lean-forward="true" selection-start-line="68" selection-start-column="0" selection-end-line="68" selection-end-column="0" />
|
370
|
+
<folding />
|
371
|
+
</state>
|
372
|
+
</provider>
|
373
|
+
</entry>
|
374
|
+
<entry file="file://$PROJECT_DIR$/lib/foo_bar.rb">
|
375
|
+
<provider selected="true" editor-type-id="text-editor">
|
376
|
+
<state relative-caret-position="136">
|
377
|
+
<caret line="8" column="8" lean-forward="true" selection-start-line="8" selection-start-column="8" selection-end-line="8" selection-end-column="8" />
|
378
|
+
<folding />
|
379
|
+
</state>
|
380
|
+
</provider>
|
381
|
+
</entry>
|
382
|
+
<entry file="file://$PROJECT_DIR$/lib/wtf_class.rb">
|
383
|
+
<provider selected="true" editor-type-id="text-editor">
|
384
|
+
<state relative-caret-position="68">
|
385
|
+
<caret line="4" column="3" lean-forward="true" selection-start-line="4" selection-start-column="3" selection-end-line="4" selection-end-column="3" />
|
386
|
+
<folding />
|
387
|
+
</state>
|
388
|
+
</provider>
|
389
|
+
</entry>
|
390
|
+
<entry file="file://$PROJECT_DIR$/lib/cobinhood_api_version/version.rb">
|
391
|
+
<provider selected="true" editor-type-id="text-editor">
|
392
|
+
<state relative-caret-position="17">
|
393
|
+
<caret line="1" column="4" lean-forward="false" selection-start-line="1" selection-start-column="4" selection-end-line="1" selection-end-column="4" />
|
394
|
+
<folding />
|
395
|
+
</state>
|
396
|
+
</provider>
|
397
|
+
</entry>
|
398
|
+
<entry file="file://$PROJECT_DIR$/lib/cobinhood_api.rb">
|
399
|
+
<provider selected="true" editor-type-id="text-editor">
|
400
|
+
<state relative-caret-position="340">
|
401
|
+
<caret line="65" column="0" lean-forward="false" selection-start-line="65" selection-start-column="0" selection-end-line="65" selection-end-column="0" />
|
402
|
+
<folding />
|
403
|
+
</state>
|
404
|
+
</provider>
|
405
|
+
</entry>
|
406
|
+
<entry file="file://$PROJECT_DIR$/bin/console">
|
407
|
+
<provider selected="true" editor-type-id="text-editor">
|
408
|
+
<state relative-caret-position="187">
|
409
|
+
<caret line="11" column="0" lean-forward="false" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
|
410
|
+
<folding />
|
411
|
+
</state>
|
412
|
+
</provider>
|
413
|
+
</entry>
|
414
|
+
<entry file="file://$PROJECT_DIR$/cobinhood_api.gemspec">
|
415
|
+
<provider selected="true" editor-type-id="text-editor">
|
416
|
+
<state relative-caret-position="51">
|
417
|
+
<caret line="3" column="0" lean-forward="false" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
|
418
|
+
<folding />
|
419
|
+
</state>
|
420
|
+
</provider>
|
421
|
+
</entry>
|
422
|
+
</component>
|
423
|
+
</project>
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at litovec@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 Algis
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# CobinhoodApi
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/cobinhood_api`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'cobinhood_api'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install cobinhood_api
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/cobinhood_api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
40
|
+
|
41
|
+
## Code of Conduct
|
42
|
+
|
43
|
+
Everyone interacting in the CobinhoodApi project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/cobinhood_api/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "cobinhood_api"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "cobinhood_api"
|
7
|
+
spec.version = "0.0.1"
|
8
|
+
spec.authors = ["Algis"]
|
9
|
+
spec.email = ["litovec@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = "Cobinhood REST API"
|
12
|
+
spec.description = "Simple wrapper over Cobinhood REST API"
|
13
|
+
spec.homepage = "https://github.com/algpet/cobinhood_ruby_api"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
+
#if spec.respond_to?(:metadata)
|
19
|
+
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
20
|
+
#else
|
21
|
+
# raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
22
|
+
#end
|
23
|
+
|
24
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
25
|
+
f.match(%r{^(test|spec|features)/})
|
26
|
+
end
|
27
|
+
spec.bindir = "exe"
|
28
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
|
+
spec.require_paths = ["lib"]
|
30
|
+
|
31
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
32
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
33
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
34
|
+
end
|
@@ -0,0 +1,356 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require 'json'
|
3
|
+
require 'logger'
|
4
|
+
|
5
|
+
LIVE_API = "https://api.cobinhood.com"
|
6
|
+
|
7
|
+
# API resources. SYSTEM
|
8
|
+
SYSTEM_INFO = "/v1/system/info"
|
9
|
+
SYSTEM_TIME = "/v1/system/time"
|
10
|
+
|
11
|
+
# API resources. MARKET
|
12
|
+
MARKET_CURRENCIES = "/v1/market/currencies"
|
13
|
+
MARKET_TRADING_PAIRS = "/v1/market/trading_pairs"
|
14
|
+
MARKET_ORDER_BOOK = "/v1/market/orderbooks/%{trading_pair}?limit=%{limit}"
|
15
|
+
MARKET_STATS = "/v1/market/stats"
|
16
|
+
MARKET_TICKER = "/v1/market/tickers/%{trading_pair}"
|
17
|
+
MARKET_RECENT_TRADES = "/v1/market/trades/%{trading_pair}"
|
18
|
+
|
19
|
+
# API resources. CANDLES
|
20
|
+
CHART_CANDLES = '/v1/chart/candles/%{trading_pair}?timeframe=%{timeframe}'
|
21
|
+
class CHART_CANDLE_TIMEFRAMES
|
22
|
+
TIMEFRAME_1_MINUTE = "1m"
|
23
|
+
TIMEFRAME_5_MINUTES = "5m"
|
24
|
+
TIMEFRAME_15_MINUTES = "15m"
|
25
|
+
TIMEFRAME_30_MINUTES = "30m"
|
26
|
+
TIMEFRAME_1_HOUR = "1h"
|
27
|
+
TIMEFRAME_3_HOURS = "3h"
|
28
|
+
TIMEFRAME_6_HOURS = "6h"
|
29
|
+
TIMEFRAME_12_HOURS = "12h"
|
30
|
+
TIMEFRAME_1_DAY = "1D"
|
31
|
+
TIMEFRAME_7_DAYS = "7D"
|
32
|
+
TIMEFRAME_14_DAYS = "14D"
|
33
|
+
TIMEFRAME_1_MONTH = "1M"
|
34
|
+
end
|
35
|
+
|
36
|
+
# API resources. TRADING
|
37
|
+
TRADING_ORDERS = '/v1/trading/orders'
|
38
|
+
TRADING_ORDER = '/v1/trading/orders/%{order_id}'
|
39
|
+
TRADING_ORDERS_HISTORY = '/v1/trading/order_history'
|
40
|
+
TRADING_TRADE = '/v1/trading/trades/%{trade_id}'
|
41
|
+
TRADING_TRADE_HISTORY = '/v1/trading/trades'
|
42
|
+
TRADING_ORDER_TRADES = '/v1/trading/orders/%{order_id}/trades'
|
43
|
+
|
44
|
+
class TRADING_ORDER_SIDE
|
45
|
+
SIDE_BUY = "bid"
|
46
|
+
SIDE_SELL = "ask"
|
47
|
+
SIDE_BID = "bid"
|
48
|
+
SIDE_ASK = "ask"
|
49
|
+
end
|
50
|
+
|
51
|
+
class TRADING_ORDER_TYPE
|
52
|
+
TYPE_MARKET = "market"
|
53
|
+
TYPE_LIMIT = "limit"
|
54
|
+
TYPE_STOP = "stop"
|
55
|
+
TYPE_STOP_LIMIT = "stop_limit"
|
56
|
+
end
|
57
|
+
|
58
|
+
# API resources. WALLET
|
59
|
+
WALLET_DEPOSIT_ADDRESSES = "/v1/wallet/deposit_addresses"
|
60
|
+
WALLET_WITHDRAWAL_ADDRESSES = "/v1/wallet/withdrawal_addresses"
|
61
|
+
WALLET_LEDGER = "/v1/wallet/ledger"
|
62
|
+
WALLET_DEPOSIT = "/v1/wallet/deposits/%{deposit_id}"
|
63
|
+
WALLET_WITHDRAWAL = "/v1/wallet/withdrawals/%{withdrawal_id}"
|
64
|
+
WALLET_WITHDRAWALS = "/v1/wallet/withdrawals"
|
65
|
+
WALLET_DEPOSITS = "/v1/wallet/deposits"
|
66
|
+
|
67
|
+
class CobinhoodApi
|
68
|
+
VERB_MAP = {
|
69
|
+
:get => Net::HTTP::Get,
|
70
|
+
:post => Net::HTTP::Post,
|
71
|
+
:put => Net::HTTP::Put,
|
72
|
+
:delete => Net::HTTP::Delete
|
73
|
+
}
|
74
|
+
|
75
|
+
def initialize(api_key:nil,console_log:false,logfile:"cobinhood.log")
|
76
|
+
unless api_key.nil?
|
77
|
+
@auth = {:authorization => api_key}
|
78
|
+
@live_api = URI(LIVE_API)
|
79
|
+
@http = Net::HTTP.new(@live_api.host,@live_api.port)
|
80
|
+
@http.use_ssl = true
|
81
|
+
#@http.set_debug_output($stdout)
|
82
|
+
else
|
83
|
+
@auth = nil
|
84
|
+
@live_api = nil
|
85
|
+
@http = nil
|
86
|
+
end
|
87
|
+
|
88
|
+
@loggers = []
|
89
|
+
if console_log
|
90
|
+
@loggers.push(Logger.new(STDOUT))
|
91
|
+
end
|
92
|
+
unless logfile.nil?
|
93
|
+
@loggers.push(Logger.new(logfile))
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
def log(message)
|
98
|
+
@loggers.each do |logger|
|
99
|
+
logger.info(message)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
"""
|
104
|
+
core stuff for later use
|
105
|
+
"""
|
106
|
+
def request(method,request_url,params:nil,data:nil,auth:false)
|
107
|
+
unless params.nil?
|
108
|
+
request_url = request_url % params
|
109
|
+
end
|
110
|
+
uri = URI(LIVE_API + request_url)
|
111
|
+
log(method.to_s + " " + uri.to_s + " data=" + data.to_s)
|
112
|
+
|
113
|
+
if auth
|
114
|
+
request = VERB_MAP[method].new(uri.request_uri)
|
115
|
+
request[:authorization] = @auth[:authorization]
|
116
|
+
unless method.equal? :get
|
117
|
+
request[:nonce] = Time.now.to_i.to_s
|
118
|
+
end
|
119
|
+
unless data.nil?
|
120
|
+
request.body = JSON.generate(data)
|
121
|
+
end
|
122
|
+
response = @http.request(request).body
|
123
|
+
else
|
124
|
+
response = Net::HTTP.get(uri)
|
125
|
+
end
|
126
|
+
JSON.parse(response)
|
127
|
+
|
128
|
+
end
|
129
|
+
|
130
|
+
def get(request_url,params:nil,auth:nil)
|
131
|
+
request(:get,request_url,params:params,auth:auth)
|
132
|
+
end
|
133
|
+
|
134
|
+
def get_auth(request_url,params:nil)
|
135
|
+
request(:get,request_url,params:params,auth:true)
|
136
|
+
end
|
137
|
+
|
138
|
+
def put(request_url,params:nil,data:nil)
|
139
|
+
request(:put,request_url,params:params,data:data,auth:true)
|
140
|
+
end
|
141
|
+
|
142
|
+
def post(request_url,params:nil,data:nil)
|
143
|
+
request(:post,request_url,params:params,data:data,auth:true)
|
144
|
+
end
|
145
|
+
|
146
|
+
def delete(request_url,params:nil)
|
147
|
+
request(:delete,request_url,params:params,auth:true)
|
148
|
+
end
|
149
|
+
|
150
|
+
"""
|
151
|
+
extract contents of API responce. Only cream go outside
|
152
|
+
"""
|
153
|
+
def result(request_result,entry=nil)
|
154
|
+
return nil if request_result.nil?
|
155
|
+
return nil unless request_result.key?("success") and request_result.key?("result")
|
156
|
+
return request_result unless request_result["success"]
|
157
|
+
|
158
|
+
if entry.nil?
|
159
|
+
request_result["result"]
|
160
|
+
else
|
161
|
+
request_result["result"][entry]
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
def outcome(request_result)
|
166
|
+
return nil if request_result.nil?
|
167
|
+
return nil unless request_result.key?("success") and request_result.key?("result")
|
168
|
+
request_result['success']
|
169
|
+
end
|
170
|
+
|
171
|
+
|
172
|
+
"""
|
173
|
+
more routines
|
174
|
+
"""
|
175
|
+
def add_filter(filter,value,url,params)
|
176
|
+
unless value.nil?
|
177
|
+
if url["?"]
|
178
|
+
url += "&"
|
179
|
+
else
|
180
|
+
url += "?"
|
181
|
+
end
|
182
|
+
url += filter + "=%{" + filter + "}"
|
183
|
+
params[filter.to_sym] = value
|
184
|
+
end
|
185
|
+
url
|
186
|
+
end
|
187
|
+
|
188
|
+
|
189
|
+
def get_system_info
|
190
|
+
result get(SYSTEM_INFO) ,"info"
|
191
|
+
end
|
192
|
+
|
193
|
+
def get_system_time
|
194
|
+
result get(SYSTEM_TIME)
|
195
|
+
end
|
196
|
+
|
197
|
+
def get_market_currencies
|
198
|
+
result get(MARKET_CURRENCIES),"currencies"
|
199
|
+
end
|
200
|
+
|
201
|
+
def get_market_trading_pairs
|
202
|
+
result get(MARKET_TRADING_PAIRS),"trading_pairs"
|
203
|
+
end
|
204
|
+
|
205
|
+
def get_market_order_book(trading_pair,limit=50)
|
206
|
+
raw_order_book = result get(MARKET_ORDER_BOOK,params:{:trading_pair=>trading_pair,:limit=>limit}),"orderbook"
|
207
|
+
order_book = {asks:[],bids:[]}
|
208
|
+
%w(asks bids).each do |side|
|
209
|
+
raw_order_book[side].each do |offer|
|
210
|
+
order_book[side.to_sym].push({"price" => offer[0].to_f, "size" => offer[2].to_f,"count" => offer[1].to_i})
|
211
|
+
end
|
212
|
+
end
|
213
|
+
order_book
|
214
|
+
end
|
215
|
+
|
216
|
+
def get_market_stats
|
217
|
+
result get(MARKET_STATS)
|
218
|
+
end
|
219
|
+
|
220
|
+
def get_all_last_prices
|
221
|
+
stats = result get(MARKET_STATS)
|
222
|
+
unless stats.nil?
|
223
|
+
prices = {}
|
224
|
+
stats.each do |pair,stat|
|
225
|
+
prices[pair] = stat["last_price"].to_f
|
226
|
+
end
|
227
|
+
prices
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
def get_ticker(trading_pair)
|
232
|
+
result get(MARKET_TICKER, params:{:trading_pair=>trading_pair}) , "ticker"
|
233
|
+
end
|
234
|
+
|
235
|
+
def get_recent_trades(trading_pair)
|
236
|
+
result get(MARKET_RECENT_TRADES, params:{:trading_pair=>trading_pair}),"trades"
|
237
|
+
end
|
238
|
+
|
239
|
+
"""
|
240
|
+
CHART resource methods
|
241
|
+
"""
|
242
|
+
def get_chart_candles(trading_pair,timeframe=CHART_CANDLE_TIMEFRAMES::TIMEFRAME_1_HOUR,start_time=nil,end_time=nil)
|
243
|
+
params = {:trading_pair => trading_pair,:timeframe => timeframe}
|
244
|
+
base_url = CHART_CANDLES
|
245
|
+
base_url = add_filter("start_time",start_time,base_url,params)
|
246
|
+
base_url = add_filter("end_time", end_time, base_url, params)
|
247
|
+
result get(base_url,params:params) ,"candles"
|
248
|
+
end
|
249
|
+
|
250
|
+
"""
|
251
|
+
TRADING resource methods
|
252
|
+
"""
|
253
|
+
def get_orders(trading_pair=nil)
|
254
|
+
params ={}
|
255
|
+
base_url = add_filter("trading_pair_id",trading_pair,TRADING_ORDERS,params)
|
256
|
+
result get_auth(base_url,params:params) , "orders"
|
257
|
+
end
|
258
|
+
|
259
|
+
def get_order_history(trading_pair=nil)
|
260
|
+
params ={}
|
261
|
+
base_url = add_filter("trading_pair_id",trading_pair,TRADING_ORDERS_HISTORY,params)
|
262
|
+
result get_auth(base_url,params:params) , "orders"
|
263
|
+
end
|
264
|
+
|
265
|
+
def get_order(order_id)
|
266
|
+
params = {:order_id => order_id}
|
267
|
+
result get_auth(TRADING_ORDER, params:params),"order"
|
268
|
+
end
|
269
|
+
|
270
|
+
def get_order_trades(order_id)
|
271
|
+
params = {:order_id => order_id}
|
272
|
+
result get_auth(TRADING_ORDER_TRADES, params:params),"trades"
|
273
|
+
end
|
274
|
+
|
275
|
+
def get_trade(trade_id)
|
276
|
+
params = {:trade_id => trade_id}
|
277
|
+
result get_auth(TRADING_TRADE, params:params) , "trade"
|
278
|
+
end
|
279
|
+
|
280
|
+
def get_trade_history(trading_pair=nil)
|
281
|
+
params ={}
|
282
|
+
base_url = add_filter("trading_pair_id",trading_pair,TRADING_TRADE_HISTORY,params)
|
283
|
+
result get_auth(base_url, params:params),"trades"
|
284
|
+
end
|
285
|
+
|
286
|
+
def place_order(trading_pair,side,order_type,size,price=nil)
|
287
|
+
unless order_type == TRADING_ORDER_TYPE::TYPE_MARKET
|
288
|
+
return nil if price.nil?
|
289
|
+
end
|
290
|
+
data = {
|
291
|
+
:trading_pair_id => trading_pair,
|
292
|
+
:side => side,
|
293
|
+
:type => order_type,
|
294
|
+
:size => size.to_s,
|
295
|
+
:price => price.to_s
|
296
|
+
}
|
297
|
+
result post(TRADING_ORDERS,data:data) , "order"
|
298
|
+
end
|
299
|
+
|
300
|
+
def modify_order(order_id,size,price)
|
301
|
+
params = {:order_id => order_id}
|
302
|
+
data = {
|
303
|
+
:size => size.to_s,
|
304
|
+
:price => price.to_s
|
305
|
+
}
|
306
|
+
outcome put(TRADING_ORDER,params:params,data:data)
|
307
|
+
end
|
308
|
+
|
309
|
+
def cancel_order(order_id)
|
310
|
+
params = {:order_id => order_id}
|
311
|
+
outcome delete(TRADING_ORDER, params:params)
|
312
|
+
end
|
313
|
+
|
314
|
+
"""
|
315
|
+
WALLET resource methods
|
316
|
+
"""
|
317
|
+
def get_ledger(currency=nil)
|
318
|
+
params = {}
|
319
|
+
base_url = add_filter("currency", currency, WALLET_LEDGER, params)
|
320
|
+
result get_auth(base_url, params:params) ,"ledger"
|
321
|
+
end
|
322
|
+
|
323
|
+
def get_deposit_addresses(currency=nil)
|
324
|
+
params = {}
|
325
|
+
base_url = add_filter("currency",currency, WALLET_DEPOSIT_ADDRESSES, params)
|
326
|
+
result get_auth(base_url, params:params),"deposit_addresses"
|
327
|
+
end
|
328
|
+
|
329
|
+
def get_withdrawal_addresses(currency=nil)
|
330
|
+
params = {}
|
331
|
+
base_url = add_filter("currency", currency, WALLET_WITHDRAWAL_ADDRESSES, params)
|
332
|
+
result get_auth(base_url, params:params),"withdrawal_addresses"
|
333
|
+
end
|
334
|
+
|
335
|
+
def get_deposit_history(currency=nil)
|
336
|
+
params = {}
|
337
|
+
base_url = add_filter("currency", currency, WALLET_DEPOSITS, params)
|
338
|
+
result get_auth(base_url, params:params),"deposits"
|
339
|
+
end
|
340
|
+
|
341
|
+
def get_withdrawal_history(currency=nil)
|
342
|
+
params = {}
|
343
|
+
base_url = add_filter("currency", currency, WALLET_WITHDRAWALS, params)
|
344
|
+
result get_auth(base_url, params:params),"withdrawals"
|
345
|
+
end
|
346
|
+
|
347
|
+
def get_withdrawal(withdrawal_id)
|
348
|
+
params = {:withdrawal_id =>withdrawal_id}
|
349
|
+
result get_auth(WALLET_WITHDRAWAL, params:params),"withdrawal"
|
350
|
+
end
|
351
|
+
|
352
|
+
def get_deposit(deposit_id)
|
353
|
+
params = {:deposit_id => deposit_id}
|
354
|
+
result get_auth(WALLET_DEPOSIT, params:params),"deposit"
|
355
|
+
end
|
356
|
+
end
|
metadata
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cobinhood_api
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Algis
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-02-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.0'
|
55
|
+
description: Simple wrapper over Cobinhood REST API
|
56
|
+
email:
|
57
|
+
- litovec@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- ".idea/cobinhood_api.iml"
|
64
|
+
- ".idea/inspectionProfiles/Project_Default.xml"
|
65
|
+
- ".idea/misc.xml"
|
66
|
+
- ".idea/modules.xml"
|
67
|
+
- ".idea/vcs.xml"
|
68
|
+
- ".idea/workspace.xml"
|
69
|
+
- ".travis.yml"
|
70
|
+
- CODE_OF_CONDUCT.md
|
71
|
+
- Gemfile
|
72
|
+
- LICENSE.txt
|
73
|
+
- README.md
|
74
|
+
- Rakefile
|
75
|
+
- bin/console
|
76
|
+
- bin/setup
|
77
|
+
- cobinhood_api.gemspec
|
78
|
+
- lib/cobinhood_api.rb
|
79
|
+
homepage: https://github.com/algpet/cobinhood_ruby_api
|
80
|
+
licenses:
|
81
|
+
- MIT
|
82
|
+
metadata: {}
|
83
|
+
post_install_message:
|
84
|
+
rdoc_options: []
|
85
|
+
require_paths:
|
86
|
+
- lib
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
requirements: []
|
98
|
+
rubyforge_project:
|
99
|
+
rubygems_version: 2.6.14
|
100
|
+
signing_key:
|
101
|
+
specification_version: 4
|
102
|
+
summary: Cobinhood REST API
|
103
|
+
test_files: []
|