interkassa 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.idea/.name +1 -0
- data/.idea/.rakeTasks +7 -0
- data/.idea/encodings.xml +5 -0
- data/.idea/interkassa.iml +10 -0
- data/.idea/misc.xml +8 -0
- data/.idea/modules.xml +9 -0
- data/.idea/vcs.xml +7 -0
- data/.idea/workspace.xml +358 -0
- data/lib/interkassa/base_operation.rb +13 -0
- data/lib/interkassa/interkassa_helper.rb +32 -0
- data/lib/interkassa/railtie.rb +7 -0
- data/lib/interkassa/request.rb +74 -0
- data/lib/interkassa/response.rb +90 -0
- data/lib/interkassa/version.rb +1 -1
- metadata +15 -2
data/.idea/.name
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
interkassa
|
data/.idea/.rakeTasks
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Settings><!--This file was automatically generated by Ruby plugin.
|
3
|
+
You are allowed to:
|
4
|
+
1. Remove rake task
|
5
|
+
2. Add existing rake tasks
|
6
|
+
To add existing rake tasks automatically delete this file and reload the project.
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build interkassa-0.0.1.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Build and install interkassa-0.0.1.gem into system gems" fullCmd="install" taksId="install" /><RakeTask description="Create tag v0.0.1 and build and push interkassa-0.0.1.gem to Rubygems" fullCmd="release" taksId="release" /></RakeGroup></Settings>
|
data/.idea/encodings.xml
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="NewModuleRootManager">
|
4
|
+
<content url="file://$MODULE_DIR$" />
|
5
|
+
<orderEntry type="inheritedJdk" />
|
6
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
7
|
+
<orderEntry type="library" scope="PROVIDED" name="[gem] bundler (v1.0.15, /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.15)" level="application" />
|
8
|
+
</component>
|
9
|
+
</module>
|
10
|
+
|
data/.idea/misc.xml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="DependencyValidationManager">
|
4
|
+
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
|
5
|
+
</component>
|
6
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="ruby-1.9.2-p180" project-jdk-type="RUBY_SDK" />
|
7
|
+
</project>
|
8
|
+
|
data/.idea/modules.xml
ADDED
@@ -0,0 +1,9 @@
|
|
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/interkassa.iml" filepath="$PROJECT_DIR$/.idea/interkassa.iml" />
|
6
|
+
</modules>
|
7
|
+
</component>
|
8
|
+
</project>
|
9
|
+
|
data/.idea/vcs.xml
ADDED
data/.idea/workspace.xml
ADDED
@@ -0,0 +1,358 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ChangeListManager">
|
4
|
+
<list default="true" id="f143fc1e-b882-4f04-a839-a523ac9fe456" name="Default" comment="">
|
5
|
+
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.gitignore" />
|
6
|
+
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/Gemfile" />
|
7
|
+
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/Rakefile" />
|
8
|
+
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/interkassa.gemspec" />
|
9
|
+
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/interkassa.rb" />
|
10
|
+
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/interkassa/version.rb" />
|
11
|
+
</list>
|
12
|
+
<ignored path="interkassa.iws" />
|
13
|
+
<ignored path=".idea/workspace.xml" />
|
14
|
+
<option name="TRACKING_ENABLED" value="true" />
|
15
|
+
<option name="SHOW_DIALOG" value="false" />
|
16
|
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
17
|
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
18
|
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
19
|
+
</component>
|
20
|
+
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
|
21
|
+
<component name="CoverageDataManager" choice="3" />
|
22
|
+
<component name="CreatePatchCommitExecutor">
|
23
|
+
<option name="PATCH_PATH" value="" />
|
24
|
+
<option name="REVERSE_PATCH" value="false" />
|
25
|
+
</component>
|
26
|
+
<component name="DaemonCodeAnalyzer">
|
27
|
+
<disable_hints />
|
28
|
+
</component>
|
29
|
+
<component name="FavoritesManager">
|
30
|
+
<favorites_list name="interkassa" />
|
31
|
+
</component>
|
32
|
+
<component name="FileEditorManager">
|
33
|
+
<leaf>
|
34
|
+
<file leaf-file-name="interkassa.rb" pinned="false" current="true" current-in-tab="true">
|
35
|
+
<entry file="file://$PROJECT_DIR$/lib/interkassa.rb">
|
36
|
+
<provider selected="true" editor-type-id="text-editor">
|
37
|
+
<state line="3" column="47" selection-start="135" selection-end="135" vertical-scroll-proportion="0.08122744">
|
38
|
+
<folding />
|
39
|
+
</state>
|
40
|
+
</provider>
|
41
|
+
</entry>
|
42
|
+
</file>
|
43
|
+
<file leaf-file-name="railtie.rb" pinned="false" current="false" current-in-tab="false">
|
44
|
+
<entry file="file://$PROJECT_DIR$/lib/interkassa/railtie.rb">
|
45
|
+
<provider selected="true" editor-type-id="text-editor">
|
46
|
+
<state line="0" column="20" selection-start="20" selection-end="20" vertical-scroll-proportion="0.0">
|
47
|
+
<folding />
|
48
|
+
</state>
|
49
|
+
</provider>
|
50
|
+
</entry>
|
51
|
+
</file>
|
52
|
+
<file leaf-file-name="interkassa_helper.rb" pinned="false" current="false" current-in-tab="false">
|
53
|
+
<entry file="file://$PROJECT_DIR$/lib/interkassa/interkassa_helper.rb">
|
54
|
+
<provider selected="true" editor-type-id="text-editor">
|
55
|
+
<state line="16" column="68" selection-start="949" selection-end="959" vertical-scroll-proportion="0.0">
|
56
|
+
<folding />
|
57
|
+
</state>
|
58
|
+
</provider>
|
59
|
+
</entry>
|
60
|
+
</file>
|
61
|
+
<file leaf-file-name="interkassa.gemspec" pinned="false" current="false" current-in-tab="false">
|
62
|
+
<entry file="file://$PROJECT_DIR$/interkassa.gemspec">
|
63
|
+
<provider selected="true" editor-type-id="text-editor">
|
64
|
+
<state line="20" column="0" selection-start="738" selection-end="738" vertical-scroll-proportion="0.0">
|
65
|
+
<folding />
|
66
|
+
</state>
|
67
|
+
</provider>
|
68
|
+
</entry>
|
69
|
+
</file>
|
70
|
+
<file leaf-file-name="Rakefile" pinned="false" current="false" current-in-tab="false">
|
71
|
+
<entry file="file://$PROJECT_DIR$/Rakefile">
|
72
|
+
<provider selected="true" editor-type-id="text-editor">
|
73
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
74
|
+
<folding />
|
75
|
+
</state>
|
76
|
+
</provider>
|
77
|
+
</entry>
|
78
|
+
</file>
|
79
|
+
<file leaf-file-name="version.rb" pinned="false" current="false" current-in-tab="false">
|
80
|
+
<entry file="file://$PROJECT_DIR$/lib/interkassa/version.rb">
|
81
|
+
<provider selected="true" editor-type-id="text-editor">
|
82
|
+
<state line="0" column="17" selection-start="7" selection-end="17" vertical-scroll-proportion="0.0">
|
83
|
+
<folding />
|
84
|
+
</state>
|
85
|
+
</provider>
|
86
|
+
</entry>
|
87
|
+
</file>
|
88
|
+
<file leaf-file-name="request.rb" pinned="false" current="false" current-in-tab="false">
|
89
|
+
<entry file="file://$PROJECT_DIR$/lib/interkassa/request.rb">
|
90
|
+
<provider selected="true" editor-type-id="text-editor">
|
91
|
+
<state line="3" column="17" selection-start="71" selection-end="71" vertical-scroll-proportion="0.0">
|
92
|
+
<folding />
|
93
|
+
</state>
|
94
|
+
</provider>
|
95
|
+
</entry>
|
96
|
+
</file>
|
97
|
+
<file leaf-file-name=".gitignore" pinned="false" current="false" current-in-tab="false">
|
98
|
+
<entry file="file://$PROJECT_DIR$/.gitignore">
|
99
|
+
<provider selected="true" editor-type-id="text-editor">
|
100
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
101
|
+
<folding />
|
102
|
+
</state>
|
103
|
+
</provider>
|
104
|
+
</entry>
|
105
|
+
</file>
|
106
|
+
<file leaf-file-name="Gemfile" pinned="false" current="false" current-in-tab="false">
|
107
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
108
|
+
<provider selected="true" editor-type-id="text-editor">
|
109
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
110
|
+
<folding />
|
111
|
+
</state>
|
112
|
+
</provider>
|
113
|
+
</entry>
|
114
|
+
</file>
|
115
|
+
</leaf>
|
116
|
+
</component>
|
117
|
+
<component name="Git.Settings">
|
118
|
+
<option name="CHECKOUT_INCLUDE_TAGS" value="false" />
|
119
|
+
<option name="UPDATE_CHANGES_POLICY" value="STASH" />
|
120
|
+
</component>
|
121
|
+
<component name="IdeDocumentHistory">
|
122
|
+
<option name="changedFiles">
|
123
|
+
<list>
|
124
|
+
<option value="$PROJECT_DIR$/lib/interkassa/request.rb" />
|
125
|
+
<option value="$PROJECT_DIR$/lib/interkassa.rb" />
|
126
|
+
<option value="$PROJECT_DIR$/lib/interkassa/railtie.rb" />
|
127
|
+
<option value="$PROJECT_DIR$/lib/interkassa/interkassa_helper.rb" />
|
128
|
+
</list>
|
129
|
+
</option>
|
130
|
+
</component>
|
131
|
+
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
132
|
+
<OptionsSetting value="true" id="Add" />
|
133
|
+
<OptionsSetting value="true" id="Remove" />
|
134
|
+
<OptionsSetting value="true" id="Checkout" />
|
135
|
+
<OptionsSetting value="true" id="Update" />
|
136
|
+
<OptionsSetting value="true" id="Status" />
|
137
|
+
<OptionsSetting value="true" id="Edit" />
|
138
|
+
<ConfirmationsSetting value="0" id="Add" />
|
139
|
+
<ConfirmationsSetting value="0" id="Remove" />
|
140
|
+
</component>
|
141
|
+
<component name="ProjectReloadState">
|
142
|
+
<option name="STATE" value="0" />
|
143
|
+
</component>
|
144
|
+
<component name="ProjectView">
|
145
|
+
<navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
|
146
|
+
<flattenPackages />
|
147
|
+
<showMembers />
|
148
|
+
<showModules />
|
149
|
+
<showLibraryContents />
|
150
|
+
<hideEmptyPackages />
|
151
|
+
<abbreviatePackageNames />
|
152
|
+
<autoscrollToSource />
|
153
|
+
<autoscrollFromSource />
|
154
|
+
<sortByType />
|
155
|
+
</navigator>
|
156
|
+
<panes>
|
157
|
+
<pane id="Scope" />
|
158
|
+
<pane id="ProjectPane">
|
159
|
+
<subPane>
|
160
|
+
<PATH>
|
161
|
+
<PATH_ELEMENT>
|
162
|
+
<option name="myItemId" value="interkassa" />
|
163
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
164
|
+
</PATH_ELEMENT>
|
165
|
+
</PATH>
|
166
|
+
<PATH>
|
167
|
+
<PATH_ELEMENT>
|
168
|
+
<option name="myItemId" value="interkassa" />
|
169
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
170
|
+
</PATH_ELEMENT>
|
171
|
+
<PATH_ELEMENT>
|
172
|
+
<option name="myItemId" value="interkassa" />
|
173
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
174
|
+
</PATH_ELEMENT>
|
175
|
+
</PATH>
|
176
|
+
<PATH>
|
177
|
+
<PATH_ELEMENT>
|
178
|
+
<option name="myItemId" value="interkassa" />
|
179
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
180
|
+
</PATH_ELEMENT>
|
181
|
+
<PATH_ELEMENT>
|
182
|
+
<option name="myItemId" value="interkassa" />
|
183
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
184
|
+
</PATH_ELEMENT>
|
185
|
+
<PATH_ELEMENT>
|
186
|
+
<option name="myItemId" value="lib" />
|
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="interkassa" />
|
193
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
194
|
+
</PATH_ELEMENT>
|
195
|
+
<PATH_ELEMENT>
|
196
|
+
<option name="myItemId" value="interkassa" />
|
197
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
198
|
+
</PATH_ELEMENT>
|
199
|
+
<PATH_ELEMENT>
|
200
|
+
<option name="myItemId" value="lib" />
|
201
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
202
|
+
</PATH_ELEMENT>
|
203
|
+
<PATH_ELEMENT>
|
204
|
+
<option name="myItemId" value="interkassa" />
|
205
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
206
|
+
</PATH_ELEMENT>
|
207
|
+
</PATH>
|
208
|
+
</subPane>
|
209
|
+
</pane>
|
210
|
+
<pane id="Favorites" />
|
211
|
+
</panes>
|
212
|
+
</component>
|
213
|
+
<component name="RunManager">
|
214
|
+
<list size="0" />
|
215
|
+
</component>
|
216
|
+
<component name="ShelveChangesManager" show_recycled="false" />
|
217
|
+
<component name="SvnConfiguration" maxAnnotateRevisions="500">
|
218
|
+
<option name="USER" value="" />
|
219
|
+
<option name="PASSWORD" value="" />
|
220
|
+
<option name="LAST_MERGED_REVISION" />
|
221
|
+
<option name="MERGE_DRY_RUN" value="false" />
|
222
|
+
<option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
|
223
|
+
<option name="UPDATE_LOCK_ON_DEMAND" value="false" />
|
224
|
+
<option name="IGNORE_SPACES_IN_MERGE" value="false" />
|
225
|
+
<option name="DETECT_NESTED_COPIES" value="true" />
|
226
|
+
<option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
|
227
|
+
<option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
|
228
|
+
<option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
|
229
|
+
<option name="FORCE_UPDATE" value="false" />
|
230
|
+
<myIsUseDefaultProxy>false</myIsUseDefaultProxy>
|
231
|
+
</component>
|
232
|
+
<component name="TaskManager">
|
233
|
+
<task active="true" id="Default" summary="Default task">
|
234
|
+
<created>1329242640427</created>
|
235
|
+
<updated>1329242640427</updated>
|
236
|
+
</task>
|
237
|
+
<servers />
|
238
|
+
</component>
|
239
|
+
<component name="ToolWindowManager">
|
240
|
+
<frame x="0" y="24" width="1280" height="733" extended-state="0" />
|
241
|
+
<editor active="true" />
|
242
|
+
<layout>
|
243
|
+
<window_info id="Changes" 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" />
|
244
|
+
<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" />
|
245
|
+
<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="true" content_ui="tabs" />
|
246
|
+
<window_info id="Dependency Viewer" 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" />
|
247
|
+
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
248
|
+
<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" />
|
249
|
+
<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" />
|
250
|
+
<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="-1" side_tool="false" content_ui="tabs" />
|
251
|
+
<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" />
|
252
|
+
<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" />
|
253
|
+
<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" />
|
254
|
+
<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" />
|
255
|
+
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
256
|
+
<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" />
|
257
|
+
<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" />
|
258
|
+
</layout>
|
259
|
+
</component>
|
260
|
+
<component name="VcsManagerConfiguration">
|
261
|
+
<option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
|
262
|
+
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
|
263
|
+
<option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
|
264
|
+
<option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
|
265
|
+
<option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
|
266
|
+
<option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
|
267
|
+
<option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
|
268
|
+
<option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
|
269
|
+
<option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
|
270
|
+
<option name="ENABLE_BACKGROUND_PROCESSES" value="false" />
|
271
|
+
<option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
|
272
|
+
<option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
|
273
|
+
<option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
|
274
|
+
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
|
275
|
+
<option name="LAST_COMMIT_MESSAGE" />
|
276
|
+
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="true" />
|
277
|
+
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
|
278
|
+
<option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
|
279
|
+
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
|
280
|
+
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
|
281
|
+
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
|
282
|
+
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
|
283
|
+
<option name="ACTIVE_VCS_NAME" />
|
284
|
+
<option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
|
285
|
+
<option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
|
286
|
+
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
|
287
|
+
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
|
288
|
+
</component>
|
289
|
+
<component name="XDebuggerManager">
|
290
|
+
<breakpoint-manager />
|
291
|
+
</component>
|
292
|
+
<component name="editorHistoryManager">
|
293
|
+
<entry file="file://$PROJECT_DIR$/lib/interkassa/version.rb">
|
294
|
+
<provider selected="true" editor-type-id="text-editor">
|
295
|
+
<state line="0" column="17" selection-start="7" selection-end="17" vertical-scroll-proportion="0.0">
|
296
|
+
<folding />
|
297
|
+
</state>
|
298
|
+
</provider>
|
299
|
+
</entry>
|
300
|
+
<entry file="file://$PROJECT_DIR$/lib/interkassa/request.rb">
|
301
|
+
<provider selected="true" editor-type-id="text-editor">
|
302
|
+
<state line="3" column="17" selection-start="71" selection-end="71" vertical-scroll-proportion="0.0">
|
303
|
+
<folding />
|
304
|
+
</state>
|
305
|
+
</provider>
|
306
|
+
</entry>
|
307
|
+
<entry file="file://$PROJECT_DIR$/.gitignore">
|
308
|
+
<provider selected="true" editor-type-id="text-editor">
|
309
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
310
|
+
<folding />
|
311
|
+
</state>
|
312
|
+
</provider>
|
313
|
+
</entry>
|
314
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
315
|
+
<provider selected="true" editor-type-id="text-editor">
|
316
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
317
|
+
<folding />
|
318
|
+
</state>
|
319
|
+
</provider>
|
320
|
+
</entry>
|
321
|
+
<entry file="file://$PROJECT_DIR$/Rakefile">
|
322
|
+
<provider selected="true" editor-type-id="text-editor">
|
323
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
324
|
+
<folding />
|
325
|
+
</state>
|
326
|
+
</provider>
|
327
|
+
</entry>
|
328
|
+
<entry file="file://$PROJECT_DIR$/interkassa.gemspec">
|
329
|
+
<provider selected="true" editor-type-id="text-editor">
|
330
|
+
<state line="20" column="0" selection-start="738" selection-end="738" vertical-scroll-proportion="0.0">
|
331
|
+
<folding />
|
332
|
+
</state>
|
333
|
+
</provider>
|
334
|
+
</entry>
|
335
|
+
<entry file="file://$PROJECT_DIR$/lib/interkassa/railtie.rb">
|
336
|
+
<provider selected="true" editor-type-id="text-editor">
|
337
|
+
<state line="0" column="20" selection-start="20" selection-end="20" vertical-scroll-proportion="0.0">
|
338
|
+
<folding />
|
339
|
+
</state>
|
340
|
+
</provider>
|
341
|
+
</entry>
|
342
|
+
<entry file="file://$PROJECT_DIR$/lib/interkassa/interkassa_helper.rb">
|
343
|
+
<provider selected="true" editor-type-id="text-editor">
|
344
|
+
<state line="16" column="68" selection-start="949" selection-end="959" vertical-scroll-proportion="0.0">
|
345
|
+
<folding />
|
346
|
+
</state>
|
347
|
+
</provider>
|
348
|
+
</entry>
|
349
|
+
<entry file="file://$PROJECT_DIR$/lib/interkassa.rb">
|
350
|
+
<provider selected="true" editor-type-id="text-editor">
|
351
|
+
<state line="3" column="47" selection-start="135" selection-end="135" vertical-scroll-proportion="0.08122744">
|
352
|
+
<folding />
|
353
|
+
</state>
|
354
|
+
</provider>
|
355
|
+
</entry>
|
356
|
+
</component>
|
357
|
+
</project>
|
358
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Interkassa
|
2
|
+
class BaseOperation
|
3
|
+
attr_accessor :ik_shop_id, :secret_key
|
4
|
+
|
5
|
+
def initialize(options={})
|
6
|
+
options.replace(Interkassa.default_options.merge(options))
|
7
|
+
|
8
|
+
@ik_shop_id = options[:ik_shop_id]
|
9
|
+
@secret_key = options[:secret_key]
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
#encoding: utf-8
|
2
|
+
module Interkassa
|
3
|
+
module InterkassaHelper
|
4
|
+
# Displays a form to send a payment request to Interkassa
|
5
|
+
#
|
6
|
+
# You can either pass in a block, that SHOULD render a submit button (or not, if you plan to submit the form otherwise), or
|
7
|
+
# let the helper create a simple submit button for you.
|
8
|
+
#
|
9
|
+
# ik_request - an instance of Interkassa::Request
|
10
|
+
# options - currently accepts two options
|
11
|
+
# id - the ID of the form being created (`interkassa_form` by default)
|
12
|
+
# title - text on the submit button (`Pay with Interkassa` by default); not used if you pass in a block
|
13
|
+
def interkassa_button(ik_request, options={}, &block)
|
14
|
+
id = options.fetch(:id, 'interkassa_form')
|
15
|
+
title = options.fetch(:title, 'Pay with Interkassa')
|
16
|
+
content_tag(:form, :id => id,:name=>id, :action => Interkassa::INTERKASSA_ENDPOINT_URL, :method => :post) do
|
17
|
+
result = hidden_field_tag(:ik_shop_id, ik_request.ik_shop_id)+
|
18
|
+
hidden_field_tag(:ik_payment_amount, ik_request.ik_payment_amount)+
|
19
|
+
hidden_field_tag(:ik_payment_id, ik_request.ik_payment_id)+
|
20
|
+
hidden_field_tag(:ik_payment_desc, ik_request.ik_payment_desc)+
|
21
|
+
hidden_field_tag(:ik_paysystem_alias, ik_request.ik_paysystem_alias)+
|
22
|
+
hidden_field_tag(:ik_baggage_fields, ik_request.ik_baggage_fields);
|
23
|
+
if block_given?
|
24
|
+
result += yield
|
25
|
+
else
|
26
|
+
result += submit_tag(title, :name => nil)
|
27
|
+
end
|
28
|
+
result
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
#encoding: utf-8
|
2
|
+
require "interkassa/base_operation"
|
3
|
+
|
4
|
+
module Interkassa
|
5
|
+
class Request < BaseOperation
|
6
|
+
#Сумма платежа, которую заплатил покупатель получить от покупателя (с учетом валюты и курса магазина, настраивается в «Настройки магазина»).
|
7
|
+
#Дробная часть отделяется точкой.
|
8
|
+
# ОБЯЗАТЕЛЬНЫЙ
|
9
|
+
attr_accessor :ik_payment_amount
|
10
|
+
#В этом поле передается идентификатор покупки в соответствии с системой учета продавца, полученный сервисом с веб-сайта продавца.
|
11
|
+
# ОБЯЗАТЕЛЬНЫЙ
|
12
|
+
attr_accessor :ik_payment_id
|
13
|
+
#Описание товара или услуги.
|
14
|
+
# ОБЯЗАТЕЛЬНЫЙ
|
15
|
+
attr_accessor :ik_payment_desc
|
16
|
+
#Способ оплаты с помощью которого была произведена оплата покупателем.
|
17
|
+
#Возможные значения: rupay, egold, webmoneyz, webmoneyu, webmoneyr, webmoneye, ukrmoneyu, ukrmoneyz, ukrmoneyr, ukrmoneye, liberty, pecunix
|
18
|
+
# ОБЯЗАТЕЛЬНЫЙ
|
19
|
+
attr_accessor :ik_paysystem_alias
|
20
|
+
#Это поле, переданное с веб-сайта продавца в «Форме запроса платежа»
|
21
|
+
#Пример: email: mail@mail.com, tel: +380441234567
|
22
|
+
attr_accessor :ik_baggage_fields
|
23
|
+
#URL (на интернет-магазине), на который будет переведен покупатель в случае успешного выполнения платежа в сервисе IKI.
|
24
|
+
#URL должен иметь префикс "http://" или https:// (полный путь).
|
25
|
+
attr_accessor :ik_success_url
|
26
|
+
#Метод передачи данных платежа (POST, GET или LINK), который будет использоваться при переходе на Success URL.
|
27
|
+
attr_accessor :ik_success_method
|
28
|
+
#URL (на интернет-магазине), на который будет переведен покупатель в том случае, если платеж в сервисе IKI не был выполнен по каким-то причинам.
|
29
|
+
#URL должен иметь префикс "http://" или https:// (полный путь).
|
30
|
+
attr_accessor :ik_fail_url
|
31
|
+
#Метод передачи данных платежа (POST, GET или LINK), который будет использоваться при переходе на Fail URL.
|
32
|
+
attr_accessor :ik_fail_method
|
33
|
+
#URL (на интернет-магазине), на который сервис IKI посылает HTTP GET или POST оповещение о совершении платежа с его детальными реквизитами. Если вы определили метод передачи Status URL (см. ниже) как “OFF”, то он не будет оповещаться сервисом о совершенных платежах.
|
34
|
+
attr_accessor :ik_status_url
|
35
|
+
#Метод передачи данных платежа (POST, GET или OFF), который будет использоваться при переходе на Status URL.
|
36
|
+
#Выберите вариант 'OFF', если вы не желаете использовать Status URL.
|
37
|
+
attr_accessor :ik_status_method
|
38
|
+
|
39
|
+
def initialize(options={})
|
40
|
+
super(options)
|
41
|
+
|
42
|
+
@ik_payment_amount = options[:ik_payment_amount]
|
43
|
+
@ik_payment_id = options[:ik_payment_id]
|
44
|
+
@ik_payment_desc = options[:ik_payment_desc]
|
45
|
+
@ik_paysystem_alias = options[:ik_paysystem_alias]
|
46
|
+
@ik_baggage_fields = options[:ik_baggage_fields]
|
47
|
+
@ik_success_url = options[:ik_success_url]
|
48
|
+
@ik_success_method = options[:ik_success_method]
|
49
|
+
@ik_fail_url = options[:ik_fail_url]
|
50
|
+
@ik_fail_method = options[:ik_fail_method]
|
51
|
+
@ik_status_url = options[:ik_status_url]
|
52
|
+
@ik_status_method = options[:ik_status_method]
|
53
|
+
end
|
54
|
+
|
55
|
+
private
|
56
|
+
def validate!
|
57
|
+
|
58
|
+
%w(ik_shop_id ik_payment_amount ik_payment_id ik_payment_desc ik_paysystem_alias).each do |required_field|
|
59
|
+
raise Interkassa::Exception.new(required_field + ' is a required field') unless self.send(required_field).to_s != ''
|
60
|
+
end
|
61
|
+
|
62
|
+
begin
|
63
|
+
self.ik_payment_amount = Float(self.ik_payment_amount)
|
64
|
+
rescue ArgumentError, TypeError
|
65
|
+
raise Interkassa::Exception.new('amount must be a number')
|
66
|
+
end
|
67
|
+
|
68
|
+
raise Interkassa::Exception.new('payment_id must only contain digits') unless ik_payment_id.to_s =~ /\A\d*\Z/
|
69
|
+
|
70
|
+
raise Interkassa::Exception.new('amount must be more than 0.01') unless ik_payment_amount >= 0.01
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
#encoding: utf-8
|
2
|
+
require "interkassa/base_operation"
|
3
|
+
require 'digest/md5'
|
4
|
+
|
5
|
+
module Interkassa
|
6
|
+
class Response < BaseOperation
|
7
|
+
SUCCESS_STATUSES = "success"
|
8
|
+
|
9
|
+
ATTRIBUTES = %w(ik_shop_id ik_payment_amount ik_payment_id ik_paysystem_alias ik_baggage_fields ik_payment_state ik_trans_id ik_currency_exch ik_fees_payer ik_payment_desc ik_payment_timestamp ik_sign_hash)
|
10
|
+
SIGN_ATTRIBUTES = %w(ik_shop_id ik_payment_amount ik_payment_id ik_paysystem_alias ik_baggage_fields ik_payment_state ik_trans_id ik_currency_exch ik_fees_payer);
|
11
|
+
SPLITER=":"
|
12
|
+
=begin
|
13
|
+
%w(ik_shop_id ik_payment_amount ik_payment_id ik_payment_desc ik_paysystem_alias ik_baggage_fields ik_payment_timestamp ik_payment_state ik_trans_id ik_currency_exch ik_fees_payer ik_sign_hash).each do |attr|
|
14
|
+
attr_reader attr
|
15
|
+
end
|
16
|
+
=end
|
17
|
+
|
18
|
+
#Идентификатор магазина зарегистрированного в системе «INTERKASSA» на который был совершен платеж.
|
19
|
+
attr_reader :ik_shop_id
|
20
|
+
#Сумма платежа, которую заплатил покупатель получить от покупателя (с учетом валюты и курса магазина, настраивается в «Настройки магазина»).
|
21
|
+
#Дробная часть отделяется точкой.
|
22
|
+
attr_reader :ik_payment_amount
|
23
|
+
#В этом поле передается идентификатор покупки в соответствии с системой учета продавца, полученный сервисом с веб-сайта продавца.
|
24
|
+
attr_reader :ik_payment_id
|
25
|
+
#Описание товара или услуги.
|
26
|
+
attr_reader :ik_payment_desc
|
27
|
+
#Способ оплаты с помощью которого была произведена оплата покупателем.
|
28
|
+
#Возможные значения: rupay, egold, webmoneyz, webmoneyu, webmoneyr, webmoneye, ukrmoneyu, ukrmoneyz, ukrmoneyr, ukrmoneye, liberty, pecunix
|
29
|
+
attr_reader :ik_paysystem_alias
|
30
|
+
#Это поле, переданное с веб-сайта продавца в «Форме запроса платежа»
|
31
|
+
#Пример: email: mail@mail.com, tel: +380441234567
|
32
|
+
attr_reader :ik_baggage_fields
|
33
|
+
#Дата и время выполнения платежа в UNIX TIMESTAMP формате
|
34
|
+
attr_reader :ik_payment_timestamp
|
35
|
+
#Состояние (статус) платежа проведенного в системе «INTERKASSA».
|
36
|
+
#Принимаемые значения: success / fail. (success – платеж принят, fail – платеж не принят).
|
37
|
+
attr_reader :ik_payment_state
|
38
|
+
#Номер платежа в системе «INTERKASSA», выполненный в процессе обработки запроса на выполнение платежа сервисом Interkassa Payment Interface. Является уникальным в системе «INTERKASSA».
|
39
|
+
attr_reader :ik_trans_id
|
40
|
+
#Курс валюты, установленный в «Настройках магазина» в момент создания платежа.
|
41
|
+
attr_reader :ik_currency_exch
|
42
|
+
#Плательщик комиссии, установленный в «Настройках магазина» в момент создания платежа.
|
43
|
+
#Пример: 0 – за счет продавца, 1– за счет покупателя, 2 – 50/50
|
44
|
+
attr_reader :ik_fees_payer
|
45
|
+
#Контрольная подпись оповещения о выполнении платежа, которая используется для проверки целостности полученной информации и однозначной идентификации отправителя.
|
46
|
+
attr_reader :ik_sign_hash
|
47
|
+
|
48
|
+
def initialize(options = {})
|
49
|
+
super(options)
|
50
|
+
|
51
|
+
@ik_shop_id = options[:ik_shop_id]
|
52
|
+
@ik_payment_amount = options[:ik_payment_amount]
|
53
|
+
@ik_payment_id = options[:ik_payment_id]
|
54
|
+
@ik_payment_desc = options[:ik_payment_desc]
|
55
|
+
@ik_paysystem_alias = options[:ik_paysystem_alias]
|
56
|
+
@ik_baggage_fields = options[:ik_baggage_fields]
|
57
|
+
@ik_payment_timestamp = options[:ik_payment_timestamp]
|
58
|
+
@ik_payment_state = options[:ik_payment_state]
|
59
|
+
@ik_trans_id = options[:ik_trans_id]
|
60
|
+
@ik_currency_exch = options[:ik_currency_exch]
|
61
|
+
@ik_fees_payer = options[:ik_fees_payer]
|
62
|
+
@ik_sign_hash = options[:ik_sign_hash]
|
63
|
+
|
64
|
+
validate!
|
65
|
+
end
|
66
|
+
|
67
|
+
# Returns true, if the transaction was successful
|
68
|
+
def success?
|
69
|
+
SUCCESS_STATUSES== self.ik_payment_state
|
70
|
+
end
|
71
|
+
|
72
|
+
private
|
73
|
+
def validate!
|
74
|
+
|
75
|
+
if check_sum() != self.ik_sign_hash
|
76
|
+
raise Interkassa::InvalidResponse
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
|
+
def check_sum()
|
82
|
+
data=""
|
83
|
+
SIGN_ATTRIBUTES.each do |attr|
|
84
|
+
data+=self.instance_variable_get("@"+attr)+SPLITER;
|
85
|
+
end
|
86
|
+
Digest::MD5.digest(data+@secret_key).upcase!
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
90
|
+
end
|
data/lib/interkassa/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 3
|
9
|
+
version: 0.0.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Galanov Viacheslav
|
@@ -29,10 +29,23 @@ extra_rdoc_files: []
|
|
29
29
|
|
30
30
|
files:
|
31
31
|
- .gitignore
|
32
|
+
- .idea/.name
|
33
|
+
- .idea/.rakeTasks
|
34
|
+
- .idea/encodings.xml
|
35
|
+
- .idea/interkassa.iml
|
36
|
+
- .idea/misc.xml
|
37
|
+
- .idea/modules.xml
|
38
|
+
- .idea/vcs.xml
|
39
|
+
- .idea/workspace.xml
|
32
40
|
- Gemfile
|
33
41
|
- Rakefile
|
34
42
|
- interkassa.gemspec
|
35
43
|
- lib/interkassa.rb
|
44
|
+
- lib/interkassa/base_operation.rb
|
45
|
+
- lib/interkassa/interkassa_helper.rb
|
46
|
+
- lib/interkassa/railtie.rb
|
47
|
+
- lib/interkassa/request.rb
|
48
|
+
- lib/interkassa/response.rb
|
36
49
|
- lib/interkassa/version.rb
|
37
50
|
has_rdoc: true
|
38
51
|
homepage: http://www.forcus.net
|