js_responder 0.1.0
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 +11 -0
- data/.idea/workspace.xml +443 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +90 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/js_responder.gemspec +25 -0
- data/lib/js_responder/version.rb +3 -0
- data/lib/js_responder.rb +34 -0
- metadata +101 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e4758d1e0b259b68cf52e4ce5a5a88b50a1d5fb6
|
4
|
+
data.tar.gz: 6cfad934337993dbed70bd166174436c15a31d1a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b4458f65ec0eeb163e50403e71b21f5bd9358db5907b1e35938719a315480c3df484adc3a432176a5299fb9995c694d87ac79ff3187cb1216bcb179de4cf72fe
|
7
|
+
data.tar.gz: 795165b72cd977cf9152c2cd9b3306c270e41f12a09e04a0906d8eae747a33ce615935823d21989ac2909ed51ef2da0d10bb7a1b9a930e0d85a23c1a08313ed8
|
data/.gitignore
ADDED
data/.idea/workspace.xml
ADDED
@@ -0,0 +1,443 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ChangeListManager">
|
4
|
+
<list default="true" id="8e2cb23b-2c1a-4526-9254-510cf09e691d" name="Default" comment="" />
|
5
|
+
<ignored path="js_responder.iws" />
|
6
|
+
<ignored path=".idea/workspace.xml" />
|
7
|
+
<ignored path=".idea/dataSources.local.xml" />
|
8
|
+
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
9
|
+
<option name="TRACKING_ENABLED" value="true" />
|
10
|
+
<option name="SHOW_DIALOG" value="false" />
|
11
|
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
12
|
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
13
|
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
14
|
+
</component>
|
15
|
+
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
|
16
|
+
<component name="CreatePatchCommitExecutor">
|
17
|
+
<option name="PATCH_PATH" value="" />
|
18
|
+
</component>
|
19
|
+
<component name="FavoritesManager">
|
20
|
+
<favorites_list name="js_responder" />
|
21
|
+
</component>
|
22
|
+
<component name="FileEditorManager">
|
23
|
+
<leaf>
|
24
|
+
<file leaf-file-name="js_responder_spec.rb" pinned="false" current-in-tab="false">
|
25
|
+
<entry file="file://$PROJECT_DIR$/spec/js_responder_spec.rb">
|
26
|
+
<provider selected="true" editor-type-id="text-editor">
|
27
|
+
<state vertical-scroll-proportion="0.0">
|
28
|
+
<caret line="16" column="29" selection-start-line="16" selection-start-column="29" selection-end-line="16" selection-end-column="29" />
|
29
|
+
<folding />
|
30
|
+
</state>
|
31
|
+
</provider>
|
32
|
+
</entry>
|
33
|
+
</file>
|
34
|
+
<file leaf-file-name="js_responder.gemspec" pinned="false" current-in-tab="false">
|
35
|
+
<entry file="file://$PROJECT_DIR$/js_responder.gemspec">
|
36
|
+
<provider selected="true" editor-type-id="text-editor">
|
37
|
+
<state vertical-scroll-proportion="0.0">
|
38
|
+
<caret line="25" column="0" selection-start-line="25" selection-start-column="0" selection-end-line="25" selection-end-column="0" />
|
39
|
+
<folding />
|
40
|
+
</state>
|
41
|
+
</provider>
|
42
|
+
</entry>
|
43
|
+
</file>
|
44
|
+
<file leaf-file-name="README.md" pinned="false" current-in-tab="true">
|
45
|
+
<entry file="file://$PROJECT_DIR$/README.md">
|
46
|
+
<provider editor-type-id="MarkdownPreviewEditor">
|
47
|
+
<state />
|
48
|
+
</provider>
|
49
|
+
<provider editor-type-id="MultiMarkdownFxHtmlEditor">
|
50
|
+
<state />
|
51
|
+
</provider>
|
52
|
+
<provider editor-type-id="MultiMarkdownFxPreviewEditor">
|
53
|
+
<state />
|
54
|
+
</provider>
|
55
|
+
<provider selected="true" editor-type-id="text-editor">
|
56
|
+
<state vertical-scroll-proportion="0.7281553">
|
57
|
+
<caret line="45" column="13" selection-start-line="45" selection-start-column="13" selection-end-line="45" selection-end-column="13" />
|
58
|
+
<folding />
|
59
|
+
</state>
|
60
|
+
</provider>
|
61
|
+
</entry>
|
62
|
+
</file>
|
63
|
+
<file leaf-file-name="js_responder.rb" pinned="false" current-in-tab="false">
|
64
|
+
<entry file="file://$PROJECT_DIR$/lib/js_responder.rb">
|
65
|
+
<provider selected="true" editor-type-id="text-editor">
|
66
|
+
<state vertical-scroll-proportion="0.0">
|
67
|
+
<caret line="17" column="0" selection-start-line="17" selection-start-column="0" selection-end-line="17" selection-end-column="0" />
|
68
|
+
<folding />
|
69
|
+
</state>
|
70
|
+
</provider>
|
71
|
+
</entry>
|
72
|
+
</file>
|
73
|
+
</leaf>
|
74
|
+
</component>
|
75
|
+
<component name="IdeDocumentHistory">
|
76
|
+
<option name="CHANGED_PATHS">
|
77
|
+
<list>
|
78
|
+
<option value="$PROJECT_DIR$/.gitignore" />
|
79
|
+
<option value="$PROJECT_DIR$/lib/js_responder/version.rb" />
|
80
|
+
<option value="$PROJECT_DIR$/js_responder.gemspec" />
|
81
|
+
<option value="$PROJECT_DIR$/lib/js_responder.rb" />
|
82
|
+
<option value="$PROJECT_DIR$/spec/js_responder_spec.rb" />
|
83
|
+
<option value="$PROJECT_DIR$/README.md" />
|
84
|
+
</list>
|
85
|
+
</option>
|
86
|
+
</component>
|
87
|
+
<component name="JsBuildToolGruntFileManager" detection-done="true" />
|
88
|
+
<component name="JsGulpfileManager">
|
89
|
+
<detection-done>true</detection-done>
|
90
|
+
</component>
|
91
|
+
<component name="NamedScopeManager">
|
92
|
+
<order />
|
93
|
+
</component>
|
94
|
+
<component name="ProjectFrameBounds">
|
95
|
+
<option name="x" value="237" />
|
96
|
+
<option name="y" value="77" />
|
97
|
+
<option name="width" value="1121" />
|
98
|
+
<option name="height" value="1027" />
|
99
|
+
</component>
|
100
|
+
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
101
|
+
<OptionsSetting value="true" id="Add" />
|
102
|
+
<OptionsSetting value="true" id="Remove" />
|
103
|
+
<OptionsSetting value="true" id="Checkout" />
|
104
|
+
<OptionsSetting value="true" id="Update" />
|
105
|
+
<OptionsSetting value="true" id="Status" />
|
106
|
+
<OptionsSetting value="true" id="Edit" />
|
107
|
+
<ConfirmationsSetting value="0" id="Add" />
|
108
|
+
<ConfirmationsSetting value="0" id="Remove" />
|
109
|
+
</component>
|
110
|
+
<component name="ProjectView">
|
111
|
+
<navigator currentView="ProjectPane" proportions="" version="1">
|
112
|
+
<flattenPackages />
|
113
|
+
<showMembers />
|
114
|
+
<showModules />
|
115
|
+
<showLibraryContents />
|
116
|
+
<hideEmptyPackages />
|
117
|
+
<abbreviatePackageNames />
|
118
|
+
<autoscrollToSource />
|
119
|
+
<autoscrollFromSource />
|
120
|
+
<sortByType />
|
121
|
+
</navigator>
|
122
|
+
<panes>
|
123
|
+
<pane id="Scope">
|
124
|
+
<subPane subId="Project Files" />
|
125
|
+
</pane>
|
126
|
+
<pane id="ProjectPane">
|
127
|
+
<subPane>
|
128
|
+
<PATH>
|
129
|
+
<PATH_ELEMENT>
|
130
|
+
<option name="myItemId" value="js_responder" />
|
131
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
132
|
+
</PATH_ELEMENT>
|
133
|
+
</PATH>
|
134
|
+
<PATH>
|
135
|
+
<PATH_ELEMENT>
|
136
|
+
<option name="myItemId" value="js_responder" />
|
137
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
138
|
+
</PATH_ELEMENT>
|
139
|
+
<PATH_ELEMENT>
|
140
|
+
<option name="myItemId" value="js_responder" />
|
141
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
142
|
+
</PATH_ELEMENT>
|
143
|
+
</PATH>
|
144
|
+
<PATH>
|
145
|
+
<PATH_ELEMENT>
|
146
|
+
<option name="myItemId" value="js_responder" />
|
147
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
148
|
+
</PATH_ELEMENT>
|
149
|
+
<PATH_ELEMENT>
|
150
|
+
<option name="myItemId" value="js_responder" />
|
151
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
152
|
+
</PATH_ELEMENT>
|
153
|
+
<PATH_ELEMENT>
|
154
|
+
<option name="myItemId" value="spec" />
|
155
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
156
|
+
</PATH_ELEMENT>
|
157
|
+
</PATH>
|
158
|
+
<PATH>
|
159
|
+
<PATH_ELEMENT>
|
160
|
+
<option name="myItemId" value="js_responder" />
|
161
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
162
|
+
</PATH_ELEMENT>
|
163
|
+
<PATH_ELEMENT>
|
164
|
+
<option name="myItemId" value="js_responder" />
|
165
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
166
|
+
</PATH_ELEMENT>
|
167
|
+
<PATH_ELEMENT>
|
168
|
+
<option name="myItemId" value="lib" />
|
169
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
170
|
+
</PATH_ELEMENT>
|
171
|
+
</PATH>
|
172
|
+
<PATH>
|
173
|
+
<PATH_ELEMENT>
|
174
|
+
<option name="myItemId" value="js_responder" />
|
175
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
176
|
+
</PATH_ELEMENT>
|
177
|
+
<PATH_ELEMENT>
|
178
|
+
<option name="myItemId" value="js_responder" />
|
179
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
180
|
+
</PATH_ELEMENT>
|
181
|
+
<PATH_ELEMENT>
|
182
|
+
<option name="myItemId" value="lib" />
|
183
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
184
|
+
</PATH_ELEMENT>
|
185
|
+
<PATH_ELEMENT>
|
186
|
+
<option name="myItemId" value="js_responder" />
|
187
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
188
|
+
</PATH_ELEMENT>
|
189
|
+
</PATH>
|
190
|
+
<PATH>
|
191
|
+
<PATH_ELEMENT>
|
192
|
+
<option name="myItemId" value="js_responder" />
|
193
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
194
|
+
</PATH_ELEMENT>
|
195
|
+
<PATH_ELEMENT>
|
196
|
+
<option name="myItemId" value="js_responder" />
|
197
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
198
|
+
</PATH_ELEMENT>
|
199
|
+
<PATH_ELEMENT>
|
200
|
+
<option name="myItemId" value="bin" />
|
201
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
202
|
+
</PATH_ELEMENT>
|
203
|
+
</PATH>
|
204
|
+
</subPane>
|
205
|
+
</pane>
|
206
|
+
<pane id="Scratches" />
|
207
|
+
</panes>
|
208
|
+
</component>
|
209
|
+
<component name="PropertiesComponent">
|
210
|
+
<property name="WebServerToolWindowFactoryState" value="false" />
|
211
|
+
<property name="FullScreen" value="false" />
|
212
|
+
</component>
|
213
|
+
<component name="RunManager">
|
214
|
+
<configuration default="true" type="BashConfigurationType" factoryName="Bash">
|
215
|
+
<option name="INTERPRETER_OPTIONS" value="" />
|
216
|
+
<option name="INTERPRETER_PATH" value="/bin/bash" />
|
217
|
+
<option name="WORKING_DIRECTORY" value="" />
|
218
|
+
<option name="PARENT_ENVS" value="true" />
|
219
|
+
<option name="SCRIPT_NAME" value="" />
|
220
|
+
<option name="PARAMETERS" value="" />
|
221
|
+
<module name="" />
|
222
|
+
<envs />
|
223
|
+
<method />
|
224
|
+
</configuration>
|
225
|
+
<configuration default="true" type="CucumberRunConfigurationType" factoryName="Cucumber">
|
226
|
+
<predefined_log_file id="RUBY_CUCUMBER" enabled="true" />
|
227
|
+
<module name="" />
|
228
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
229
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
230
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
231
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
232
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
233
|
+
<envs />
|
234
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
235
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
236
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
237
|
+
<COVERAGE_PATTERN ENABLED="true">
|
238
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
239
|
+
</COVERAGE_PATTERN>
|
240
|
+
</EXTENSION>
|
241
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
242
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*.feature" />
|
243
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
244
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
245
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
246
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TAGS_FILTER" VALUE="" />
|
247
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_NAME_FILTER" VALUE="" />
|
248
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_ARGS" VALUE="--color -r features" />
|
249
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
250
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
251
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="VERBOSE_OPTION" VALUE="false" />
|
252
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
253
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
254
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
255
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_RUNNER_PATH" VALUE="" />
|
256
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_RUNNER" VALUE="false" />
|
257
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SETTINGS_VERSION" VALUE="2" />
|
258
|
+
<method />
|
259
|
+
</configuration>
|
260
|
+
<configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
|
261
|
+
<method />
|
262
|
+
</configuration>
|
263
|
+
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
|
264
|
+
<method />
|
265
|
+
</configuration>
|
266
|
+
</component>
|
267
|
+
<component name="ShelveChangesManager" show_recycled="false" />
|
268
|
+
<component name="SvnConfiguration">
|
269
|
+
<configuration />
|
270
|
+
</component>
|
271
|
+
<component name="TaskManager">
|
272
|
+
<task active="true" id="Default" summary="Default task">
|
273
|
+
<changelist id="8e2cb23b-2c1a-4526-9254-510cf09e691d" name="Default" comment="" />
|
274
|
+
<created>1444896271327</created>
|
275
|
+
<option name="number" value="Default" />
|
276
|
+
<updated>1444896271327</updated>
|
277
|
+
</task>
|
278
|
+
<servers />
|
279
|
+
</component>
|
280
|
+
<component name="ToolWindowManager">
|
281
|
+
<frame x="237" y="77" width="1121" height="1027" extended-state="0" />
|
282
|
+
<editor active="true" />
|
283
|
+
<layout>
|
284
|
+
<window_info id="Terminal" 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" />
|
285
|
+
<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" />
|
286
|
+
<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" />
|
287
|
+
<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" />
|
288
|
+
<window_info id="Application Servers" 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" />
|
289
|
+
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.18108831" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
290
|
+
<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" />
|
291
|
+
<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" />
|
292
|
+
<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" />
|
293
|
+
<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" />
|
294
|
+
<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" />
|
295
|
+
<window_info id="Find" 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" />
|
296
|
+
<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" />
|
297
|
+
<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" />
|
298
|
+
<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" />
|
299
|
+
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3292683" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
300
|
+
<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" />
|
301
|
+
<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" />
|
302
|
+
</layout>
|
303
|
+
</component>
|
304
|
+
<component name="Vcs.Log.UiProperties">
|
305
|
+
<option name="RECENTLY_FILTERED_USER_GROUPS">
|
306
|
+
<collection />
|
307
|
+
</option>
|
308
|
+
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
|
309
|
+
<collection />
|
310
|
+
</option>
|
311
|
+
</component>
|
312
|
+
<component name="VcsContentAnnotationSettings">
|
313
|
+
<option name="myLimit" value="2678400000" />
|
314
|
+
</component>
|
315
|
+
<component name="XDebuggerManager">
|
316
|
+
<breakpoint-manager />
|
317
|
+
<watches-manager />
|
318
|
+
</component>
|
319
|
+
<component name="editorHistoryManager">
|
320
|
+
<entry file="file://$PROJECT_DIR$/spec/js_responder_spec.rb">
|
321
|
+
<provider selected="true" editor-type-id="text-editor">
|
322
|
+
<state vertical-scroll-proportion="0.0">
|
323
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
324
|
+
<folding />
|
325
|
+
</state>
|
326
|
+
</provider>
|
327
|
+
</entry>
|
328
|
+
<entry file="file://$PROJECT_DIR$/js_responder.gemspec">
|
329
|
+
<provider selected="true" editor-type-id="text-editor">
|
330
|
+
<state vertical-scroll-proportion="0.0">
|
331
|
+
<caret line="15" column="0" selection-start-line="15" selection-start-column="0" selection-end-line="15" selection-end-column="0" />
|
332
|
+
<folding />
|
333
|
+
</state>
|
334
|
+
</provider>
|
335
|
+
</entry>
|
336
|
+
<entry file="file://$PROJECT_DIR$/LICENSE.txt">
|
337
|
+
<provider editor-type-id="com.intellij.database.editor.CsvTableFileEditorProvider">
|
338
|
+
<state />
|
339
|
+
</provider>
|
340
|
+
<provider selected="true" editor-type-id="text-editor">
|
341
|
+
<state vertical-scroll-proportion="0.0">
|
342
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
343
|
+
</state>
|
344
|
+
</provider>
|
345
|
+
</entry>
|
346
|
+
<entry file="file://$PROJECT_DIR$/.rspec">
|
347
|
+
<provider selected="true" editor-type-id="text-editor">
|
348
|
+
<state vertical-scroll-proportion="0.0">
|
349
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
350
|
+
</state>
|
351
|
+
</provider>
|
352
|
+
</entry>
|
353
|
+
<entry file="file://$PROJECT_DIR$/CODE_OF_CONDUCT.md">
|
354
|
+
<provider editor-type-id="MarkdownPreviewEditor">
|
355
|
+
<state />
|
356
|
+
</provider>
|
357
|
+
<provider editor-type-id="MultiMarkdownFxHtmlEditor">
|
358
|
+
<state />
|
359
|
+
</provider>
|
360
|
+
<provider editor-type-id="MultiMarkdownFxPreviewEditor">
|
361
|
+
<state />
|
362
|
+
</provider>
|
363
|
+
<provider selected="true" editor-type-id="text-editor">
|
364
|
+
<state vertical-scroll-proportion="0.01618123">
|
365
|
+
<caret line="1" column="0" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
|
366
|
+
</state>
|
367
|
+
</provider>
|
368
|
+
</entry>
|
369
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
370
|
+
<provider selected="true" editor-type-id="text-editor">
|
371
|
+
<state vertical-scroll-proportion="0.0">
|
372
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
373
|
+
<folding />
|
374
|
+
</state>
|
375
|
+
</provider>
|
376
|
+
</entry>
|
377
|
+
<entry file="file://$PROJECT_DIR$/.gitignore">
|
378
|
+
<provider selected="true" editor-type-id="text-editor">
|
379
|
+
<state vertical-scroll-proportion="0.15690376">
|
380
|
+
<caret line="10" column="9" selection-start-line="10" selection-start-column="9" selection-end-line="10" selection-end-column="9" />
|
381
|
+
<folding />
|
382
|
+
</state>
|
383
|
+
</provider>
|
384
|
+
</entry>
|
385
|
+
<entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
|
386
|
+
<provider selected="true" editor-type-id="text-editor">
|
387
|
+
<state vertical-scroll-proportion="0.0">
|
388
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
389
|
+
<folding />
|
390
|
+
</state>
|
391
|
+
</provider>
|
392
|
+
</entry>
|
393
|
+
<entry file="file://$PROJECT_DIR$/lib/js_responder/version.rb">
|
394
|
+
<provider selected="true" editor-type-id="text-editor">
|
395
|
+
<state vertical-scroll-proportion="0.04707113">
|
396
|
+
<caret line="3" column="0" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
|
397
|
+
<folding />
|
398
|
+
</state>
|
399
|
+
</provider>
|
400
|
+
</entry>
|
401
|
+
<entry file="file://$PROJECT_DIR$/lib/js_responder.rb">
|
402
|
+
<provider selected="true" editor-type-id="text-editor">
|
403
|
+
<state vertical-scroll-proportion="0.0">
|
404
|
+
<caret line="17" column="0" selection-start-line="17" selection-start-column="0" selection-end-line="17" selection-end-column="0" />
|
405
|
+
<folding />
|
406
|
+
</state>
|
407
|
+
</provider>
|
408
|
+
</entry>
|
409
|
+
<entry file="file://$PROJECT_DIR$/spec/js_responder_spec.rb">
|
410
|
+
<provider selected="true" editor-type-id="text-editor">
|
411
|
+
<state vertical-scroll-proportion="0.0">
|
412
|
+
<caret line="16" column="29" selection-start-line="16" selection-start-column="29" selection-end-line="16" selection-end-column="29" />
|
413
|
+
<folding />
|
414
|
+
</state>
|
415
|
+
</provider>
|
416
|
+
</entry>
|
417
|
+
<entry file="file://$PROJECT_DIR$/js_responder.gemspec">
|
418
|
+
<provider selected="true" editor-type-id="text-editor">
|
419
|
+
<state vertical-scroll-proportion="0.0">
|
420
|
+
<caret line="25" column="0" selection-start-line="25" selection-start-column="0" selection-end-line="25" selection-end-column="0" />
|
421
|
+
<folding />
|
422
|
+
</state>
|
423
|
+
</provider>
|
424
|
+
</entry>
|
425
|
+
<entry file="file://$PROJECT_DIR$/README.md">
|
426
|
+
<provider editor-type-id="MarkdownPreviewEditor">
|
427
|
+
<state />
|
428
|
+
</provider>
|
429
|
+
<provider editor-type-id="MultiMarkdownFxHtmlEditor">
|
430
|
+
<state />
|
431
|
+
</provider>
|
432
|
+
<provider editor-type-id="MultiMarkdownFxPreviewEditor">
|
433
|
+
<state />
|
434
|
+
</provider>
|
435
|
+
<provider selected="true" editor-type-id="text-editor">
|
436
|
+
<state vertical-scroll-proportion="0.7281553">
|
437
|
+
<caret line="45" column="13" selection-start-line="45" selection-start-column="13" selection-end-line="45" selection-end-column="13" />
|
438
|
+
<folding />
|
439
|
+
</state>
|
440
|
+
</provider>
|
441
|
+
</entry>
|
442
|
+
</component>
|
443
|
+
</project>
|
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Felix Tioh
|
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,90 @@
|
|
1
|
+
# JsResponder
|
2
|
+
|
3
|
+
Part of the Rails Ajax Responder Architecture.
|
4
|
+
On the server side controller, you transcode your chain of commands into an array to your JS Client.
|
5
|
+
Your JS Client should have a corresponding methods that are able to execute these commands.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'js_responder'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install js_responder
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
```ruby
|
25
|
+
condition = (1+1 == 2)
|
26
|
+
instructions = JsResponder.new.transcode do
|
27
|
+
redirect 'http://www.redirect.to'
|
28
|
+
if condition
|
29
|
+
success 'Yes, 1+1 equal 2'
|
30
|
+
else
|
31
|
+
error 'Nope, 1+1 not equal to 2'
|
32
|
+
end
|
33
|
+
log 'Operation completed'
|
34
|
+
end
|
35
|
+
instructions == [
|
36
|
+
['redirect', 'http://www.redirect.to'],
|
37
|
+
['success', 'Yes, 1+1 equal 2'],
|
38
|
+
['log', 'Operation completed']
|
39
|
+
]
|
40
|
+
```
|
41
|
+
|
42
|
+
On the client side
|
43
|
+
|
44
|
+
```coffeescript
|
45
|
+
$(document).on 'ajax:success', 'form', (event, data, status, xhr) ->
|
46
|
+
# Use your ResponderClient
|
47
|
+
|
48
|
+
class ResponderClient
|
49
|
+
# receive whole json array and execute each instruction sequentially
|
50
|
+
@execute: (instructions) ->
|
51
|
+
_.each instructions, (instruction) =>
|
52
|
+
@translate instruction
|
53
|
+
|
54
|
+
# translate array instruction into class method call
|
55
|
+
@translate: (instruction) ->
|
56
|
+
command = instruction.shift()
|
57
|
+
@[command].apply(this, instruction)
|
58
|
+
|
59
|
+
# ----------------------------
|
60
|
+
# AVAILABLE COMMANDS
|
61
|
+
# ----------------------------
|
62
|
+
@redirect: (url) ->
|
63
|
+
window.location = url
|
64
|
+
|
65
|
+
@log: (text) ->
|
66
|
+
alertify.log text
|
67
|
+
|
68
|
+
@success: (text) ->
|
69
|
+
alertify.success text
|
70
|
+
|
71
|
+
@error: (text) ->
|
72
|
+
alertify.error text
|
73
|
+
```
|
74
|
+
|
75
|
+
|
76
|
+
## Development
|
77
|
+
|
78
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
79
|
+
|
80
|
+
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).
|
81
|
+
|
82
|
+
## Contributing
|
83
|
+
|
84
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/js_responder. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
85
|
+
|
86
|
+
|
87
|
+
## License
|
88
|
+
|
89
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
90
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "js_responder"
|
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
|
data/bin/setup
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'js_responder/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "js_responder"
|
8
|
+
spec.version = JsResponder::VERSION
|
9
|
+
spec.authors = ["Felix Tioh"]
|
10
|
+
spec.email = ["felixsagitta@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = "A DSL to create commands in array format, then to be used in Rails controller with a corresponding JS client"
|
13
|
+
spec.description = ""
|
14
|
+
spec.homepage = "https://github.com/sagittaros/js_responder"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
+
spec.add_development_dependency "rspec"
|
25
|
+
end
|
data/lib/js_responder.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require "js_responder/version"
|
2
|
+
|
3
|
+
class JsResponder
|
4
|
+
attr_accessor :instructions
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
@instructions = []
|
8
|
+
end
|
9
|
+
|
10
|
+
def transcode(&block)
|
11
|
+
if block_given?
|
12
|
+
instance_eval(&block)
|
13
|
+
else
|
14
|
+
raise 'Expecting a block'
|
15
|
+
end
|
16
|
+
return instructions
|
17
|
+
end
|
18
|
+
|
19
|
+
def redirect(url)
|
20
|
+
instructions << ['redirect', url]
|
21
|
+
end
|
22
|
+
|
23
|
+
def log(text)
|
24
|
+
instructions << ['log', text]
|
25
|
+
end
|
26
|
+
|
27
|
+
def success(text)
|
28
|
+
instructions << ['success', text]
|
29
|
+
end
|
30
|
+
|
31
|
+
def error(text)
|
32
|
+
instructions << ['error', text]
|
33
|
+
end
|
34
|
+
end
|
metadata
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: js_responder
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Felix Tioh
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-10-15 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.10'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
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: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: ''
|
56
|
+
email:
|
57
|
+
- felixsagitta@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- ".idea/workspace.xml"
|
64
|
+
- ".rspec"
|
65
|
+
- ".travis.yml"
|
66
|
+
- CODE_OF_CONDUCT.md
|
67
|
+
- Gemfile
|
68
|
+
- LICENSE.txt
|
69
|
+
- README.md
|
70
|
+
- Rakefile
|
71
|
+
- bin/console
|
72
|
+
- bin/setup
|
73
|
+
- js_responder.gemspec
|
74
|
+
- lib/js_responder.rb
|
75
|
+
- lib/js_responder/version.rb
|
76
|
+
homepage: https://github.com/sagittaros/js_responder
|
77
|
+
licenses:
|
78
|
+
- MIT
|
79
|
+
metadata: {}
|
80
|
+
post_install_message:
|
81
|
+
rdoc_options: []
|
82
|
+
require_paths:
|
83
|
+
- lib
|
84
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
requirements: []
|
95
|
+
rubyforge_project:
|
96
|
+
rubygems_version: 2.4.5.1
|
97
|
+
signing_key:
|
98
|
+
specification_version: 4
|
99
|
+
summary: A DSL to create commands in array format, then to be used in Rails controller
|
100
|
+
with a corresponding JS client
|
101
|
+
test_files: []
|