ekg 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.DS_Store +0 -0
- data/.gitignore +19 -0
- data/.idea/ekg.iml +18 -0
- data/.idea/scopes/scope_settings.xml +5 -0
- data/.idea/workspace.xml +438 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/ekg.gemspec +30 -0
- data/lib/.DS_Store +0 -0
- data/lib/ekg/data.rb +45 -0
- data/lib/ekg/version.rb +3 -0
- data/lib/ekg.rb +13 -0
- data/spec/ekg/data_spec.rb +42 -0
- data/spec/ekg_spec.rb +41 -0
- data/spec/spec_helper.rb +8 -0
- metadata +191 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 55bdc73579680440d8ca929bb5b32f1285f10656
|
4
|
+
data.tar.gz: cf7faed83828c5f16c0c3d97c7bba30178086fcb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 33a74a1eb0c544ce5a56acacfc4581d3c0a3f10014661d9329a35bd8bcc69ba2d9f066f66c6b51a540118ff236c2e4086369c6b1008bb415a9d674e8ca20705c
|
7
|
+
data.tar.gz: 9286ab78330829787f348d9179c041b5ba0e14f83e2c8678b979e3853adeff897b086875ef426bf953b05276e4d452400ae0bc0c01878e5b9c96a8fdf8b0fbeb
|
data/.DS_Store
ADDED
Binary file
|
data/.gitignore
ADDED
data/.idea/ekg.iml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="FacetManager">
|
4
|
+
<facet type="gem" name="Gem">
|
5
|
+
<configuration>
|
6
|
+
<option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
|
7
|
+
<option name="GEM_APP_TEST_PATH" value="" />
|
8
|
+
<option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
|
9
|
+
</configuration>
|
10
|
+
</facet>
|
11
|
+
</component>
|
12
|
+
<component name="NewModuleRootManager">
|
13
|
+
<content url="file://$MODULE_DIR$" />
|
14
|
+
<orderEntry type="inheritedJdk" />
|
15
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
16
|
+
</component>
|
17
|
+
</module>
|
18
|
+
|
data/.idea/workspace.xml
ADDED
@@ -0,0 +1,438 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ChangeListManager">
|
4
|
+
<list default="true" id="6a2f0408-4244-4fa5-82e1-ced494e41658" name="Default" comment="" />
|
5
|
+
<ignored path="ekg.iws" />
|
6
|
+
<ignored path=".idea/workspace.xml" />
|
7
|
+
<file path="/Dummy.txt" changelist="6a2f0408-4244-4fa5-82e1-ced494e41658" time="1379612149104" ignored="false" />
|
8
|
+
<file path="/ekg.gemspec" changelist="6a2f0408-4244-4fa5-82e1-ced494e41658" time="1379619943356" ignored="false" />
|
9
|
+
<file path="/temp.rb" changelist="6a2f0408-4244-4fa5-82e1-ced494e41658" time="1379606192467" ignored="false" />
|
10
|
+
<file path="/a.dummy" changelist="6a2f0408-4244-4fa5-82e1-ced494e41658" time="1379612084488" ignored="false" />
|
11
|
+
<file path="/Guardfile" changelist="6a2f0408-4244-4fa5-82e1-ced494e41658" time="1379606333038" ignored="false" />
|
12
|
+
<file path="/README.md" changelist="6a2f0408-4244-4fa5-82e1-ced494e41658" time="1379611929079" ignored="false" />
|
13
|
+
<file path="/ekg.rb" changelist="6a2f0408-4244-4fa5-82e1-ced494e41658" time="1379606377523" ignored="false" />
|
14
|
+
<file path="/data.rb" changelist="6a2f0408-4244-4fa5-82e1-ced494e41658" time="1379612072888" ignored="false" />
|
15
|
+
<file path="/spec_helper.rb" changelist="6a2f0408-4244-4fa5-82e1-ced494e41658" time="1379606398582" ignored="false" />
|
16
|
+
<file path="/data_spec.rb" changelist="6a2f0408-4244-4fa5-82e1-ced494e41658" time="1379611913614" ignored="false" />
|
17
|
+
<file path="/.gitignore" changelist="6a2f0408-4244-4fa5-82e1-ced494e41658" time="1379619967801" ignored="false" />
|
18
|
+
<option name="TRACKING_ENABLED" value="true" />
|
19
|
+
<option name="SHOW_DIALOG" value="false" />
|
20
|
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
21
|
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
22
|
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
23
|
+
</component>
|
24
|
+
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
|
25
|
+
<component name="CreatePatchCommitExecutor">
|
26
|
+
<option name="PATCH_PATH" value="" />
|
27
|
+
</component>
|
28
|
+
<component name="DaemonCodeAnalyzer">
|
29
|
+
<disable_hints />
|
30
|
+
</component>
|
31
|
+
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
|
32
|
+
<component name="FavoritesManager">
|
33
|
+
<favorites_list name="ekg" />
|
34
|
+
</component>
|
35
|
+
<component name="FileEditorManager">
|
36
|
+
<leaf>
|
37
|
+
<file leaf-file-name="Gemfile" pinned="false" current="false" current-in-tab="false">
|
38
|
+
<entry file="file://$USER_HOME$/ekg2/Gemfile">
|
39
|
+
<provider selected="true" editor-type-id="text-editor">
|
40
|
+
<state line="2" column="0" selection-start="31" selection-end="273" vertical-scroll-proportion="0.0">
|
41
|
+
<folding />
|
42
|
+
</state>
|
43
|
+
</provider>
|
44
|
+
</entry>
|
45
|
+
</file>
|
46
|
+
<file leaf-file-name="ekg.gemspec" pinned="false" current="true" current-in-tab="true">
|
47
|
+
<entry file="file://$PROJECT_DIR$/ekg.gemspec">
|
48
|
+
<provider selected="true" editor-type-id="text-editor">
|
49
|
+
<state line="28" column="42" selection-start="1125" selection-end="1125" vertical-scroll-proportion="0.5785124">
|
50
|
+
<folding />
|
51
|
+
</state>
|
52
|
+
</provider>
|
53
|
+
</entry>
|
54
|
+
</file>
|
55
|
+
</leaf>
|
56
|
+
</component>
|
57
|
+
<component name="FindManager">
|
58
|
+
<FindUsagesManager>
|
59
|
+
<setting name="OPEN_NEW_TAB" value="false" />
|
60
|
+
</FindUsagesManager>
|
61
|
+
</component>
|
62
|
+
<component name="Git.Settings">
|
63
|
+
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
64
|
+
</component>
|
65
|
+
<component name="GitLogSettings">
|
66
|
+
<option name="myDateState">
|
67
|
+
<MyDateState />
|
68
|
+
</option>
|
69
|
+
</component>
|
70
|
+
<component name="IdeDocumentHistory">
|
71
|
+
<option name="changedFiles">
|
72
|
+
<list>
|
73
|
+
<option value="$PROJECT_DIR$/lib/ekg/version.rb" />
|
74
|
+
<option value="$PROJECT_DIR$/lib/ekg/ekg.rb" />
|
75
|
+
<option value="$PROJECT_DIR$/Gemfile" />
|
76
|
+
<option value="$PROJECT_DIR$/Guardfile" />
|
77
|
+
<option value="$PROJECT_DIR$/lib/ekg.rb" />
|
78
|
+
<option value="$PROJECT_DIR$/spec/spec_helper.rb" />
|
79
|
+
<option value="$PROJECT_DIR$/spec/ekg/ekg_spec.rb" />
|
80
|
+
<option value="$PROJECT_DIR$/README.md" />
|
81
|
+
<option value="$PROJECT_DIR$/spec/ekg/data_spec.rb" />
|
82
|
+
<option value="$PROJECT_DIR$/lib/ekg/data.rb" />
|
83
|
+
<option value="$PROJECT_DIR$/ekg.gemspec" />
|
84
|
+
<option value="$PROJECT_DIR$/.gitignore" />
|
85
|
+
</list>
|
86
|
+
</option>
|
87
|
+
</component>
|
88
|
+
<component name="ProjectFrameBounds">
|
89
|
+
<option name="y" value="22" />
|
90
|
+
<option name="width" value="1600" />
|
91
|
+
<option name="height" value="874" />
|
92
|
+
</component>
|
93
|
+
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
94
|
+
<OptionsSetting value="true" id="Add" />
|
95
|
+
<OptionsSetting value="true" id="Remove" />
|
96
|
+
<OptionsSetting value="true" id="Checkout" />
|
97
|
+
<OptionsSetting value="true" id="Update" />
|
98
|
+
<OptionsSetting value="true" id="Status" />
|
99
|
+
<OptionsSetting value="true" id="Edit" />
|
100
|
+
<ConfirmationsSetting value="0" id="Add" />
|
101
|
+
<ConfirmationsSetting value="0" id="Remove" />
|
102
|
+
</component>
|
103
|
+
<component name="ProjectReloadState">
|
104
|
+
<option name="STATE" value="0" />
|
105
|
+
</component>
|
106
|
+
<component name="ProjectView">
|
107
|
+
<navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
|
108
|
+
<flattenPackages />
|
109
|
+
<showMembers />
|
110
|
+
<showModules />
|
111
|
+
<showLibraryContents />
|
112
|
+
<hideEmptyPackages />
|
113
|
+
<abbreviatePackageNames />
|
114
|
+
<autoscrollToSource />
|
115
|
+
<autoscrollFromSource />
|
116
|
+
<sortByType />
|
117
|
+
</navigator>
|
118
|
+
<panes>
|
119
|
+
<pane id="ProjectPane">
|
120
|
+
<subPane>
|
121
|
+
<PATH>
|
122
|
+
<PATH_ELEMENT>
|
123
|
+
<option name="myItemId" value="ekg" />
|
124
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
125
|
+
</PATH_ELEMENT>
|
126
|
+
</PATH>
|
127
|
+
<PATH>
|
128
|
+
<PATH_ELEMENT>
|
129
|
+
<option name="myItemId" value="ekg" />
|
130
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
131
|
+
</PATH_ELEMENT>
|
132
|
+
<PATH_ELEMENT>
|
133
|
+
<option name="myItemId" value="ekg" />
|
134
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
135
|
+
</PATH_ELEMENT>
|
136
|
+
</PATH>
|
137
|
+
</subPane>
|
138
|
+
</pane>
|
139
|
+
<pane id="Scope" />
|
140
|
+
</panes>
|
141
|
+
</component>
|
142
|
+
<component name="PropertiesComponent">
|
143
|
+
<property name="WebServerToolWindowFactoryState" value="false" />
|
144
|
+
<property name="recentsLimit" value="5" />
|
145
|
+
</component>
|
146
|
+
<component name="RunManager" selected="RSpec.Ekg::Data#send_data should fire">
|
147
|
+
<configuration default="false" name="All tests in: spec" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true">
|
148
|
+
<predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
|
149
|
+
<module name="ekg" />
|
150
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
151
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$/spec" />
|
152
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
153
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
154
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
155
|
+
<envs>
|
156
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
157
|
+
</envs>
|
158
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
159
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" />
|
160
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
161
|
+
<COVERAGE_PATTERN ENABLED="true">
|
162
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
163
|
+
</COVERAGE_PATTERN>
|
164
|
+
</EXTENSION>
|
165
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
166
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="$PROJECT_DIR$/spec" />
|
167
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
168
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/{*_test,test_*}.rb" />
|
169
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
|
170
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="ALL_IN_FOLDER" />
|
171
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
172
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
|
173
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
174
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
175
|
+
<method />
|
176
|
+
</configuration>
|
177
|
+
<configuration default="false" name="Ekg::Data#send_data should fire" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
178
|
+
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
179
|
+
<module name="ekg" />
|
180
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
181
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
|
182
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
183
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
184
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
185
|
+
<envs>
|
186
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
187
|
+
</envs>
|
188
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
189
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" />
|
190
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
191
|
+
<COVERAGE_PATTERN ENABLED="true">
|
192
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
193
|
+
</COVERAGE_PATTERN>
|
194
|
+
</EXTENSION>
|
195
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
196
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
197
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/ekg/data_spec.rb" />
|
198
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
199
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
200
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="Ekg::Data#send_data should fire" />
|
201
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
202
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
203
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
204
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
205
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
206
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
207
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
208
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
209
|
+
<method />
|
210
|
+
</configuration>
|
211
|
+
<configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
|
212
|
+
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
213
|
+
<module name="" />
|
214
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
215
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
216
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
217
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
218
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
219
|
+
<envs />
|
220
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
221
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" />
|
222
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
223
|
+
<COVERAGE_PATTERN ENABLED="true">
|
224
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
225
|
+
</COVERAGE_PATTERN>
|
226
|
+
</EXTENSION>
|
227
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
228
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
229
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
230
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
231
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
232
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
|
233
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
234
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
235
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
236
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
237
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
238
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
239
|
+
<method />
|
240
|
+
</configuration>
|
241
|
+
<configuration default="true" type="RubyRunConfigurationType" factoryName="Ruby">
|
242
|
+
<module name="" />
|
243
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
244
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="" />
|
245
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
246
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
247
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
248
|
+
<envs />
|
249
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
250
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" />
|
251
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
252
|
+
<COVERAGE_PATTERN ENABLED="true">
|
253
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
254
|
+
</COVERAGE_PATTERN>
|
255
|
+
</EXTENSION>
|
256
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
257
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="" />
|
258
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
259
|
+
<method />
|
260
|
+
</configuration>
|
261
|
+
<configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
|
262
|
+
<predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
|
263
|
+
<module name="" />
|
264
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
265
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
266
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
267
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
268
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
269
|
+
<envs />
|
270
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
271
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" />
|
272
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
273
|
+
<COVERAGE_PATTERN ENABLED="true">
|
274
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
275
|
+
</COVERAGE_PATTERN>
|
276
|
+
</EXTENSION>
|
277
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
278
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
279
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
280
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
|
281
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
|
282
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
283
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
284
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
|
285
|
+
<method />
|
286
|
+
</configuration>
|
287
|
+
<list size="2">
|
288
|
+
<item index="0" class="java.lang.String" itemvalue="Test::Unit/Shoulda/Minitest.All tests in: spec" />
|
289
|
+
<item index="1" class="java.lang.String" itemvalue="RSpec.Ekg::Data#send_data should fire" />
|
290
|
+
</list>
|
291
|
+
<recent_temporary>
|
292
|
+
<list size="2">
|
293
|
+
<item index="0" class="java.lang.String" itemvalue="RSpec.Ekg::Data#send_data should fire" />
|
294
|
+
<item index="1" class="java.lang.String" itemvalue="Test::Unit/Shoulda/Minitest.All tests in: spec" />
|
295
|
+
</list>
|
296
|
+
</recent_temporary>
|
297
|
+
</component>
|
298
|
+
<component name="ShelveChangesManager" show_recycled="false" />
|
299
|
+
<component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false" SSL_PROTOCOLS="sslv3">
|
300
|
+
<option name="USER" value="" />
|
301
|
+
<option name="PASSWORD" value="" />
|
302
|
+
<option name="mySSHConnectionTimeout" value="30000" />
|
303
|
+
<option name="mySSHReadTimeout" value="30000" />
|
304
|
+
<option name="LAST_MERGED_REVISION" />
|
305
|
+
<option name="MERGE_DRY_RUN" value="false" />
|
306
|
+
<option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
|
307
|
+
<option name="UPDATE_LOCK_ON_DEMAND" value="false" />
|
308
|
+
<option name="IGNORE_SPACES_IN_MERGE" value="false" />
|
309
|
+
<option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
|
310
|
+
<option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
|
311
|
+
<option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
|
312
|
+
<option name="FORCE_UPDATE" value="false" />
|
313
|
+
<option name="IGNORE_EXTERNALS" value="false" />
|
314
|
+
<myIsUseDefaultProxy>false</myIsUseDefaultProxy>
|
315
|
+
</component>
|
316
|
+
<component name="TaskManager">
|
317
|
+
<task active="true" id="Default" summary="Default task">
|
318
|
+
<changelist id="6a2f0408-4244-4fa5-82e1-ced494e41658" name="Default" comment="" />
|
319
|
+
<created>1379606072344</created>
|
320
|
+
<updated>1379606072344</updated>
|
321
|
+
</task>
|
322
|
+
<task id="LOCAL-00001" summary="initial commit">
|
323
|
+
<created>1379612155717</created>
|
324
|
+
<updated>1379612155717</updated>
|
325
|
+
</task>
|
326
|
+
<option name="localTasksCounter" value="2" />
|
327
|
+
<servers />
|
328
|
+
</component>
|
329
|
+
<component name="ToolWindowManager">
|
330
|
+
<frame x="0" y="22" width="1600" height="874" extended-state="0" />
|
331
|
+
<editor active="true" />
|
332
|
+
<layout>
|
333
|
+
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
334
|
+
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32891247" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
335
|
+
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
336
|
+
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
337
|
+
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
338
|
+
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24967825" sideWeight="0.6710875" order="0" side_tool="false" content_ui="combo" />
|
339
|
+
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
340
|
+
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
341
|
+
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
342
|
+
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
343
|
+
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
344
|
+
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
345
|
+
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
346
|
+
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
347
|
+
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32891247" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
348
|
+
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
349
|
+
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
350
|
+
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
351
|
+
</layout>
|
352
|
+
</component>
|
353
|
+
<component name="VcsContentAnnotationSettings">
|
354
|
+
<option name="myLimit" value="2678400000" />
|
355
|
+
</component>
|
356
|
+
<component name="VcsManagerConfiguration">
|
357
|
+
<option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
|
358
|
+
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
359
|
+
<option name="CHECK_NEW_TODO" value="true" />
|
360
|
+
<option name="myTodoPanelSettings">
|
361
|
+
<value>
|
362
|
+
<are-packages-shown value="false" />
|
363
|
+
<are-modules-shown value="false" />
|
364
|
+
<flatten-packages value="false" />
|
365
|
+
<is-autoscroll-to-source value="false" />
|
366
|
+
</value>
|
367
|
+
</option>
|
368
|
+
<option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
|
369
|
+
<option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
|
370
|
+
<option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
|
371
|
+
<option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
|
372
|
+
<option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
|
373
|
+
<option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
|
374
|
+
<option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
|
375
|
+
<option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
|
376
|
+
<option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
|
377
|
+
<option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
|
378
|
+
<option name="DEFAULT_PATCH_EXTENSION" value="patch" />
|
379
|
+
<option name="SHORT_DIFF_HORIZONTALLY" value="true" />
|
380
|
+
<option name="SHORT_DIFF_EXTRA_LINES" value="2" />
|
381
|
+
<option name="SOFT_WRAPS_IN_SHORT_DIFF" value="true" />
|
382
|
+
<option name="INCLUDE_TEXT_INTO_PATCH" value="false" />
|
383
|
+
<option name="INCLUDE_TEXT_INTO_SHELF" value="false" />
|
384
|
+
<option name="SHOW_FILE_HISTORY_DETAILS" value="true" />
|
385
|
+
<option name="SHOW_VCS_ERROR_NOTIFICATIONS" value="true" />
|
386
|
+
<option name="SHOW_DIRTY_RECURSIVELY" value="false" />
|
387
|
+
<option name="LIMIT_HISTORY" value="true" />
|
388
|
+
<option name="MAXIMUM_HISTORY_ROWS" value="1000" />
|
389
|
+
<option name="UPDATE_FILTER_SCOPE_NAME" />
|
390
|
+
<option name="USE_COMMIT_MESSAGE_MARGIN" value="false" />
|
391
|
+
<option name="COMMIT_MESSAGE_MARGIN_SIZE" value="72" />
|
392
|
+
<option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="false" />
|
393
|
+
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
|
394
|
+
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
|
395
|
+
<option name="LAST_COMMIT_MESSAGE" value="initial commit" />
|
396
|
+
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
|
397
|
+
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
|
398
|
+
<option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
|
399
|
+
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
|
400
|
+
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
|
401
|
+
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
|
402
|
+
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
|
403
|
+
<option name="ACTIVE_VCS_NAME" />
|
404
|
+
<option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
|
405
|
+
<option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
|
406
|
+
<option name="UPDATE_FILTER_BY_SCOPE" value="false" />
|
407
|
+
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
|
408
|
+
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
|
409
|
+
<MESSAGE value="initial commit" />
|
410
|
+
</component>
|
411
|
+
<component name="XDebuggerManager">
|
412
|
+
<breakpoint-manager />
|
413
|
+
</component>
|
414
|
+
<component name="editorHistoryManager">
|
415
|
+
<entry file="file://$USER_HOME$/ekg2/Gemfile">
|
416
|
+
<provider selected="true" editor-type-id="text-editor">
|
417
|
+
<state line="2" column="0" selection-start="31" selection-end="273" vertical-scroll-proportion="0.0">
|
418
|
+
<folding />
|
419
|
+
</state>
|
420
|
+
</provider>
|
421
|
+
</entry>
|
422
|
+
<entry file="file://$PROJECT_DIR$/.gitignore">
|
423
|
+
<provider selected="true" editor-type-id="text-editor">
|
424
|
+
<state line="18" column="6" selection-start="165" selection-end="165" vertical-scroll-proportion="0.37190083">
|
425
|
+
<folding />
|
426
|
+
</state>
|
427
|
+
</provider>
|
428
|
+
</entry>
|
429
|
+
<entry file="file://$PROJECT_DIR$/ekg.gemspec">
|
430
|
+
<provider selected="true" editor-type-id="text-editor">
|
431
|
+
<state line="28" column="42" selection-start="1125" selection-end="1125" vertical-scroll-proportion="0.5785124">
|
432
|
+
<folding />
|
433
|
+
</state>
|
434
|
+
</provider>
|
435
|
+
</entry>
|
436
|
+
</component>
|
437
|
+
</project>
|
438
|
+
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Ferris Lucas
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Ekg
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'ekg'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install ekg
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/ekg.gemspec
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'ekg/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "ekg"
|
8
|
+
spec.version = Ekg::VERSION
|
9
|
+
spec.authors = ["Darren Cauthon", "Ferris Lucas"]
|
10
|
+
spec.email = ["darren@cauthon.com"]
|
11
|
+
spec.description = "Monitor the heartbeat of your app"
|
12
|
+
spec.summary = "Monitor the heartbeat of your app"
|
13
|
+
spec.homepage = "https://github.com/darrencauthon/ekg"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency 'minitest'
|
22
|
+
spec.add_development_dependency 'timecop'
|
23
|
+
spec.add_development_dependency 'subtle', '~>1.1.0'
|
24
|
+
spec.add_development_dependency 'webmock'
|
25
|
+
spec.add_development_dependency 'contrast'
|
26
|
+
spec.add_development_dependency 'mocha'
|
27
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
28
|
+
spec.add_development_dependency "rake"
|
29
|
+
spec.add_development_dependency "faraday"
|
30
|
+
end
|
data/lib/.DS_Store
ADDED
Binary file
|
data/lib/ekg/data.rb
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module Ekg
|
5
|
+
class Data
|
6
|
+
class << self
|
7
|
+
def send_data(data)
|
8
|
+
name = data[:name]
|
9
|
+
body = build_the_body_from_the data
|
10
|
+
send_the_body name, body
|
11
|
+
end
|
12
|
+
|
13
|
+
def receive_data
|
14
|
+
connection = Faraday.new(:url => Ekg.config[:firebase_url]) do |faraday|
|
15
|
+
faraday.request :url_encoded
|
16
|
+
faraday.response :logger
|
17
|
+
faraday.adapter Faraday.default_adapter
|
18
|
+
end
|
19
|
+
response = connection.get do |req|
|
20
|
+
req.url "/heartbeats.json"
|
21
|
+
end
|
22
|
+
JSON.parse(response.body).map { |x| x[1] }
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def build_the_body_from_the(data)
|
29
|
+
'{ ' + data.map { |item| "\"#{item[0]}\": \"#{item[1]}\"" }.join(', ') + ' }'
|
30
|
+
end
|
31
|
+
|
32
|
+
def send_the_body(name, body)
|
33
|
+
connection = Faraday.new(:url => Ekg.config[:firebase_url]) do |faraday|
|
34
|
+
faraday.request :url_encoded
|
35
|
+
faraday.response :logger
|
36
|
+
faraday.adapter Faraday.default_adapter
|
37
|
+
end
|
38
|
+
response = connection.patch do |req|
|
39
|
+
req.url "/heartbeats/#{name}.json"
|
40
|
+
req.body = body
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/lib/ekg/version.rb
ADDED
data/lib/ekg.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
Dir[File.dirname(__FILE__) + '/ekg/*.rb'].each {|file| require file }
|
2
|
+
|
3
|
+
module Ekg
|
4
|
+
class << self
|
5
|
+
attr_accessor :config
|
6
|
+
def lub_dub
|
7
|
+
Ekg::Data.send_data({ name: Ekg.config[:name],
|
8
|
+
version: Ekg.config[:version],
|
9
|
+
time: Time.now })
|
10
|
+
rescue
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'minitest'
|
2
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
3
|
+
|
4
|
+
describe Ekg::Data do
|
5
|
+
let(:firebase_url) {'https://test.firebaseio.com'}
|
6
|
+
|
7
|
+
describe "#send_data" do
|
8
|
+
before do
|
9
|
+
Ekg.config = {
|
10
|
+
firebase_url: firebase_url
|
11
|
+
}
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should fire" do
|
15
|
+
request_body = nil
|
16
|
+
stub_request(:patch, "#{firebase_url}/heartbeats/testing.json").
|
17
|
+
to_return { |request| request_body = request.body; {body: ''} }
|
18
|
+
Ekg::Data.send_data({name: 'testing', some: 'data', and: 'more'})
|
19
|
+
|
20
|
+
request_body.must_equal "{ \"name\": \"testing\", \"some\": \"data\", \"and\": \"more\" }"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe "#receive_data" do
|
25
|
+
before do
|
26
|
+
Ekg.config = {
|
27
|
+
firebase_url: firebase_url
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should work" do
|
32
|
+
stub_request(:get, "#{firebase_url}/heartbeats.json").
|
33
|
+
to_return({body: '{"Ashley":{"version":"0.0.1","name":"Ashley","time":"2013-02-13 23:48:22 -0600"},"Darren":{"version":"0.0.2","name":"Darren","time":"2013-02-13 23:48:06 -0700"}}' })
|
34
|
+
|
35
|
+
results = Ekg::Data.receive_data
|
36
|
+
|
37
|
+
results.count.must_equal 2
|
38
|
+
results[0].contrast_with!({ 'name' => 'Ashley', 'version' => '0.0.1', 'time' => '2013-02-13 23:48:22 -0600' })
|
39
|
+
results[1].contrast_with!({ 'name' => 'Darren', 'version' => '0.0.2', 'time' => '2013-02-13 23:48:06 -0700' })
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
data/spec/ekg_spec.rb
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe Ekg do
|
4
|
+
|
5
|
+
describe "#lub_dub" do
|
6
|
+
[:name, :version].to_hashes {[
|
7
|
+
['a name', '1.0'],
|
8
|
+
['another name', '2.0']
|
9
|
+
]}.each do |test|
|
10
|
+
describe "sending data" do
|
11
|
+
before do
|
12
|
+
time = Timecop.freeze
|
13
|
+
Ekg::Data.expects(:send_data).with do |data|
|
14
|
+
data[:name] == test[:name] and
|
15
|
+
data[:version] == test[:version] and
|
16
|
+
data[:time] == time
|
17
|
+
end
|
18
|
+
|
19
|
+
Ekg.config = test
|
20
|
+
Ekg.lub_dub
|
21
|
+
end
|
22
|
+
|
23
|
+
after do
|
24
|
+
Timecop.return
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should post the data about the service" do
|
28
|
+
# asserted above
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should eat all errors" do
|
34
|
+
time = Timecop.freeze
|
35
|
+
Ekg::Data.stubs(:send_data).raises
|
36
|
+
Ekg.config = {}
|
37
|
+
Ekg.lub_dub
|
38
|
+
# an error should not bubble up
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,191 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ekg
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Darren Cauthon
|
8
|
+
- Ferris Lucas
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-09-19 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: minitest
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - '>='
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - '>='
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: timecop
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - '>='
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: subtle
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ~>
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 1.1.0
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ~>
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 1.1.0
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: webmock
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: contrast
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - '>='
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: mocha
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - '>='
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - '>='
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: bundler
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ~>
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '1.3'
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ~>
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '1.3'
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: rake
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - '>='
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
type: :development
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: faraday
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - '>='
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
type: :development
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - '>='
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
140
|
+
description: Monitor the heartbeat of your app
|
141
|
+
email:
|
142
|
+
- darren@cauthon.com
|
143
|
+
executables: []
|
144
|
+
extensions: []
|
145
|
+
extra_rdoc_files: []
|
146
|
+
files:
|
147
|
+
- .DS_Store
|
148
|
+
- .gitignore
|
149
|
+
- .idea/ekg.iml
|
150
|
+
- .idea/scopes/scope_settings.xml
|
151
|
+
- .idea/workspace.xml
|
152
|
+
- Gemfile
|
153
|
+
- LICENSE.txt
|
154
|
+
- README.md
|
155
|
+
- Rakefile
|
156
|
+
- ekg.gemspec
|
157
|
+
- lib/.DS_Store
|
158
|
+
- lib/ekg.rb
|
159
|
+
- lib/ekg/data.rb
|
160
|
+
- lib/ekg/version.rb
|
161
|
+
- spec/ekg/data_spec.rb
|
162
|
+
- spec/ekg_spec.rb
|
163
|
+
- spec/spec_helper.rb
|
164
|
+
homepage: https://github.com/darrencauthon/ekg
|
165
|
+
licenses:
|
166
|
+
- MIT
|
167
|
+
metadata: {}
|
168
|
+
post_install_message:
|
169
|
+
rdoc_options: []
|
170
|
+
require_paths:
|
171
|
+
- lib
|
172
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
173
|
+
requirements:
|
174
|
+
- - '>='
|
175
|
+
- !ruby/object:Gem::Version
|
176
|
+
version: '0'
|
177
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
|
+
requirements:
|
179
|
+
- - '>='
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0'
|
182
|
+
requirements: []
|
183
|
+
rubyforge_project:
|
184
|
+
rubygems_version: 2.0.3
|
185
|
+
signing_key:
|
186
|
+
specification_version: 4
|
187
|
+
summary: Monitor the heartbeat of your app
|
188
|
+
test_files:
|
189
|
+
- spec/ekg/data_spec.rb
|
190
|
+
- spec/ekg_spec.rb
|
191
|
+
- spec/spec_helper.rb
|