mail_robber 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/.gitignore +17 -0
- data/.idea/.name +1 -0
- data/.idea/.rakeTasks +7 -0
- data/.idea/dictionaries/ilyagelman.xml +3 -0
- data/.idea/encodings.xml +5 -0
- data/.idea/mail_robber.iml +34 -0
- data/.idea/misc.xml +41 -0
- data/.idea/modules.xml +9 -0
- data/.idea/scopes/scope_settings.xml +5 -0
- data/.idea/vcs.xml +7 -0
- data/.idea/workspace.xml +476 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/lib/generators/mail_robber/install_generator.rb +31 -0
- data/lib/generators/templates/mail_robber.rb +5 -0
- data/lib/mail_robber/config.rb +21 -0
- data/lib/mail_robber/railtie.rb +12 -0
- data/lib/mail_robber/version.rb +3 -0
- data/lib/mail_robber.rb +58 -0
- data/lib/tasks/mail_robber_open.rake +9 -0
- data/mail_robber.gemspec +24 -0
- metadata +109 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: cd578ea6265e2dfbf811e08b32f220a79176435e
|
4
|
+
data.tar.gz: fb0fa5381827e13ceb4b93d4501390082d6fc6f2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 05d9c3b1730b86d01756fedbd179ea17ca6c500510827f98bdba58ec3f344be5b3cf6c188b538b4641fdcb3df8daaa037e5a174bd2b32a2883282359866fd9b1
|
7
|
+
data.tar.gz: 55752f7a08da15ad49248874aac669ecd448cfd594e5959511bc0ae97c5a319f1b8ff31f34388aa7dc6006bbc6cf7fe6fd979ffa81efe1f3139163ef076f49dc
|
data/.gitignore
ADDED
data/.idea/.name
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
mail_robber
|
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 mail_robber-1.0.0.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Build and install mail_robber-1.0.0.gem into system gems" fullCmd="install" taksId="install" /><RakeTask description="Create tag v1.0.0 and build and push mail_robber-1.0.0.gem to Rubygems" fullCmd="release" taksId="release" /></RakeGroup></Settings>
|
data/.idea/encodings.xml
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="FacetManager">
|
4
|
+
<facet type="gem" name="Ruby 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="jdk" jdkName="RVM: ruby-2.0.0-p451" jdkType="RUBY_SDK" />
|
15
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
16
|
+
<orderEntry type="module-library">
|
17
|
+
<library name="mail_robber (v1.0.0, /Users/ilyagelman/code/gems/mail_robber) [path][gem]">
|
18
|
+
<CLASSES>
|
19
|
+
<root url="file://$MODULE_DIR$/lib" />
|
20
|
+
<root url="file://$MODULE_DIR$/.idea" />
|
21
|
+
</CLASSES>
|
22
|
+
<SOURCES>
|
23
|
+
<root url="file://$MODULE_DIR$/lib" />
|
24
|
+
<root url="file://$MODULE_DIR$/.idea" />
|
25
|
+
</SOURCES>
|
26
|
+
</library>
|
27
|
+
</orderEntry>
|
28
|
+
<orderEntry type="library" scope="PROVIDED" name="addressable (v2.3.5, RVM: ruby-2.0.0-p451) [gem]" level="application" />
|
29
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.6.1, RVM: ruby-2.0.0-p451) [gem]" level="application" />
|
30
|
+
<orderEntry type="library" scope="PROVIDED" name="launchy (v2.4.2, RVM: ruby-2.0.0-p451) [gem]" level="application" />
|
31
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v10.3.1, RVM: ruby-2.0.0-p451) [gem]" level="application" />
|
32
|
+
</component>
|
33
|
+
</module>
|
34
|
+
|
data/.idea/misc.xml
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ProjectInspectionProfilesVisibleTreeState">
|
4
|
+
<entry key="Project Default">
|
5
|
+
<profile-state>
|
6
|
+
<expanded-state>
|
7
|
+
<State>
|
8
|
+
<id />
|
9
|
+
</State>
|
10
|
+
</expanded-state>
|
11
|
+
<selected-state>
|
12
|
+
<State>
|
13
|
+
<id>Internationalization issues</id>
|
14
|
+
</State>
|
15
|
+
</selected-state>
|
16
|
+
</profile-state>
|
17
|
+
</entry>
|
18
|
+
</component>
|
19
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-2.1.1" project-jdk-type="RUBY_SDK" />
|
20
|
+
<component name="VagrantSettings">
|
21
|
+
<option name="instanceFolder" value="" />
|
22
|
+
<option name="provider" value="" />
|
23
|
+
<option name="vagrantExecutable" value="vagrant" />
|
24
|
+
</component>
|
25
|
+
<component name="masterDetails">
|
26
|
+
<states>
|
27
|
+
<state key="ScopeChooserConfigurable.UI">
|
28
|
+
<settings>
|
29
|
+
<splitter-proportions>
|
30
|
+
<option name="proportions">
|
31
|
+
<list>
|
32
|
+
<option value="0.2" />
|
33
|
+
</list>
|
34
|
+
</option>
|
35
|
+
</splitter-proportions>
|
36
|
+
</settings>
|
37
|
+
</state>
|
38
|
+
</states>
|
39
|
+
</component>
|
40
|
+
</project>
|
41
|
+
|
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/mail_robber.iml" filepath="$PROJECT_DIR$/.idea/mail_robber.iml" />
|
6
|
+
</modules>
|
7
|
+
</component>
|
8
|
+
</project>
|
9
|
+
|
data/.idea/vcs.xml
ADDED
data/.idea/workspace.xml
ADDED
@@ -0,0 +1,476 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ChangeListManager">
|
4
|
+
<list default="true" id="78103ded-9bc2-4132-b2ae-f0aa61766719" name="Default" comment="" />
|
5
|
+
<ignored path="mail_robber.iws" />
|
6
|
+
<ignored path=".idea/workspace.xml" />
|
7
|
+
<option name="TRACKING_ENABLED" value="true" />
|
8
|
+
<option name="SHOW_DIALOG" value="false" />
|
9
|
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
10
|
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
11
|
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
12
|
+
</component>
|
13
|
+
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
|
14
|
+
<component name="CreatePatchCommitExecutor">
|
15
|
+
<option name="PATCH_PATH" value="" />
|
16
|
+
</component>
|
17
|
+
<component name="DaemonCodeAnalyzer">
|
18
|
+
<disable_hints />
|
19
|
+
</component>
|
20
|
+
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
|
21
|
+
<component name="FavoritesManager">
|
22
|
+
<favorites_list name="mail_robber" />
|
23
|
+
</component>
|
24
|
+
<component name="FileEditorManager">
|
25
|
+
<leaf>
|
26
|
+
<file leaf-file-name="mail_robber.rb" pinned="false" current="false" current-in-tab="false">
|
27
|
+
<entry file="file://$PROJECT_DIR$/lib/mail_robber.rb">
|
28
|
+
<provider selected="true" editor-type-id="text-editor">
|
29
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="543" max-vertical-offset="960">
|
30
|
+
<caret line="47" column="46" selection-start-line="47" selection-start-column="46" selection-end-line="47" selection-end-column="46" />
|
31
|
+
<folding />
|
32
|
+
</state>
|
33
|
+
</provider>
|
34
|
+
</entry>
|
35
|
+
</file>
|
36
|
+
<file leaf-file-name="mail_robber_open.rake" pinned="false" current="false" current-in-tab="false">
|
37
|
+
<entry file="file://$PROJECT_DIR$/lib/tasks/mail_robber_open.rake">
|
38
|
+
<provider selected="true" editor-type-id="text-editor">
|
39
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="135" max-vertical-offset="225">
|
40
|
+
<caret line="9" column="0" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
|
41
|
+
<folding />
|
42
|
+
</state>
|
43
|
+
</provider>
|
44
|
+
</entry>
|
45
|
+
</file>
|
46
|
+
<file leaf-file-name="Gemfile" pinned="false" current="false" current-in-tab="false">
|
47
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
48
|
+
<provider selected="true" editor-type-id="text-editor">
|
49
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="135">
|
50
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
51
|
+
<folding />
|
52
|
+
</state>
|
53
|
+
</provider>
|
54
|
+
</entry>
|
55
|
+
</file>
|
56
|
+
<file leaf-file-name="mail_robber.gemspec" pinned="false" current="true" current-in-tab="true">
|
57
|
+
<entry file="file://$PROJECT_DIR$/mail_robber.gemspec">
|
58
|
+
<provider selected="true" editor-type-id="text-editor">
|
59
|
+
<state vertical-scroll-proportion="0.35714287" vertical-offset="0" max-vertical-offset="966">
|
60
|
+
<caret line="23" column="3" selection-start-line="23" selection-start-column="3" selection-end-line="23" selection-end-column="3" />
|
61
|
+
<folding />
|
62
|
+
</state>
|
63
|
+
</provider>
|
64
|
+
</entry>
|
65
|
+
</file>
|
66
|
+
<file leaf-file-name="README.md" pinned="false" current="false" current-in-tab="false">
|
67
|
+
<entry file="file://$PROJECT_DIR$/README.md">
|
68
|
+
<provider selected="true" editor-type-id="text-editor">
|
69
|
+
<state vertical-scroll-proportion="-9.6" vertical-offset="0" max-vertical-offset="525">
|
70
|
+
<caret line="16" column="33" selection-start-line="16" selection-start-column="33" selection-end-line="16" selection-end-column="33" />
|
71
|
+
<folding />
|
72
|
+
</state>
|
73
|
+
</provider>
|
74
|
+
</entry>
|
75
|
+
</file>
|
76
|
+
<file leaf-file-name="install_generator.rb" pinned="false" current="false" current-in-tab="false">
|
77
|
+
<entry file="file://$PROJECT_DIR$/lib/generators/mail_robber/install_generator.rb">
|
78
|
+
<provider selected="true" editor-type-id="text-editor">
|
79
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="360" max-vertical-offset="555">
|
80
|
+
<caret line="24" column="46" selection-start-line="24" selection-start-column="46" selection-end-line="24" selection-end-column="46" />
|
81
|
+
<folding />
|
82
|
+
</state>
|
83
|
+
</provider>
|
84
|
+
</entry>
|
85
|
+
</file>
|
86
|
+
</leaf>
|
87
|
+
</component>
|
88
|
+
<component name="FindManager">
|
89
|
+
<FindUsagesManager>
|
90
|
+
<setting name="OPEN_NEW_TAB" value="true" />
|
91
|
+
</FindUsagesManager>
|
92
|
+
</component>
|
93
|
+
<component name="IdeDocumentHistory">
|
94
|
+
<option name="changedFiles">
|
95
|
+
<list>
|
96
|
+
<option value="$PROJECT_DIR$/lib/mail_robber.rb" />
|
97
|
+
<option value="$PROJECT_DIR$/lib/generators/mail_robber/install_generator.rb" />
|
98
|
+
<option value="$PROJECT_DIR$/lib/tasks/mail_robber_open.rake" />
|
99
|
+
<option value="$PROJECT_DIR$/mail_robber.gemspec" />
|
100
|
+
</list>
|
101
|
+
</option>
|
102
|
+
</component>
|
103
|
+
<component name="ProjectFrameBounds">
|
104
|
+
<option name="x" value="-1245" />
|
105
|
+
<option name="y" value="-1058" />
|
106
|
+
<option name="width" value="1920" />
|
107
|
+
<option name="height" value="1058" />
|
108
|
+
</component>
|
109
|
+
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
110
|
+
<OptionsSetting value="true" id="Add" />
|
111
|
+
<OptionsSetting value="true" id="Remove" />
|
112
|
+
<OptionsSetting value="true" id="Checkout" />
|
113
|
+
<OptionsSetting value="true" id="Update" />
|
114
|
+
<OptionsSetting value="true" id="Status" />
|
115
|
+
<OptionsSetting value="true" id="Edit" />
|
116
|
+
<ConfirmationsSetting value="0" id="Add" />
|
117
|
+
<ConfirmationsSetting value="0" id="Remove" />
|
118
|
+
</component>
|
119
|
+
<component name="ProjectReloadState">
|
120
|
+
<option name="STATE" value="0" />
|
121
|
+
</component>
|
122
|
+
<component name="ProjectView">
|
123
|
+
<navigator currentView="ProjectPane" proportions="" version="1">
|
124
|
+
<flattenPackages />
|
125
|
+
<showMembers />
|
126
|
+
<showModules />
|
127
|
+
<showLibraryContents />
|
128
|
+
<hideEmptyPackages />
|
129
|
+
<abbreviatePackageNames />
|
130
|
+
<autoscrollToSource />
|
131
|
+
<autoscrollFromSource />
|
132
|
+
<sortByType />
|
133
|
+
</navigator>
|
134
|
+
<panes>
|
135
|
+
<pane id="Scope" />
|
136
|
+
<pane id="ProjectPane">
|
137
|
+
<subPane>
|
138
|
+
<PATH>
|
139
|
+
<PATH_ELEMENT>
|
140
|
+
<option name="myItemId" value="mail_robber" />
|
141
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
142
|
+
</PATH_ELEMENT>
|
143
|
+
</PATH>
|
144
|
+
<PATH>
|
145
|
+
<PATH_ELEMENT>
|
146
|
+
<option name="myItemId" value="mail_robber" />
|
147
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
148
|
+
</PATH_ELEMENT>
|
149
|
+
<PATH_ELEMENT>
|
150
|
+
<option name="myItemId" value="mail_robber" />
|
151
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
152
|
+
</PATH_ELEMENT>
|
153
|
+
</PATH>
|
154
|
+
<PATH>
|
155
|
+
<PATH_ELEMENT>
|
156
|
+
<option name="myItemId" value="mail_robber" />
|
157
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
158
|
+
</PATH_ELEMENT>
|
159
|
+
<PATH_ELEMENT>
|
160
|
+
<option name="myItemId" value="mail_robber" />
|
161
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
162
|
+
</PATH_ELEMENT>
|
163
|
+
<PATH_ELEMENT>
|
164
|
+
<option name="myItemId" value="lib" />
|
165
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
166
|
+
</PATH_ELEMENT>
|
167
|
+
</PATH>
|
168
|
+
<PATH>
|
169
|
+
<PATH_ELEMENT>
|
170
|
+
<option name="myItemId" value="mail_robber" />
|
171
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
172
|
+
</PATH_ELEMENT>
|
173
|
+
<PATH_ELEMENT>
|
174
|
+
<option name="myItemId" value="mail_robber" />
|
175
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
176
|
+
</PATH_ELEMENT>
|
177
|
+
<PATH_ELEMENT>
|
178
|
+
<option name="myItemId" value="lib" />
|
179
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
180
|
+
</PATH_ELEMENT>
|
181
|
+
<PATH_ELEMENT>
|
182
|
+
<option name="myItemId" value="mail_robber" />
|
183
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
184
|
+
</PATH_ELEMENT>
|
185
|
+
</PATH>
|
186
|
+
<PATH>
|
187
|
+
<PATH_ELEMENT>
|
188
|
+
<option name="myItemId" value="mail_robber" />
|
189
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
190
|
+
</PATH_ELEMENT>
|
191
|
+
<PATH_ELEMENT>
|
192
|
+
<option name="myItemId" value="mail_robber" />
|
193
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
194
|
+
</PATH_ELEMENT>
|
195
|
+
<PATH_ELEMENT>
|
196
|
+
<option name="myItemId" value="lib" />
|
197
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
198
|
+
</PATH_ELEMENT>
|
199
|
+
<PATH_ELEMENT>
|
200
|
+
<option name="myItemId" value="generators" />
|
201
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
202
|
+
</PATH_ELEMENT>
|
203
|
+
</PATH>
|
204
|
+
<PATH>
|
205
|
+
<PATH_ELEMENT>
|
206
|
+
<option name="myItemId" value="mail_robber" />
|
207
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
208
|
+
</PATH_ELEMENT>
|
209
|
+
<PATH_ELEMENT>
|
210
|
+
<option name="myItemId" value="mail_robber" />
|
211
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
212
|
+
</PATH_ELEMENT>
|
213
|
+
<PATH_ELEMENT>
|
214
|
+
<option name="myItemId" value="lib" />
|
215
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
216
|
+
</PATH_ELEMENT>
|
217
|
+
<PATH_ELEMENT>
|
218
|
+
<option name="myItemId" value="generators" />
|
219
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
220
|
+
</PATH_ELEMENT>
|
221
|
+
<PATH_ELEMENT>
|
222
|
+
<option name="myItemId" value="mail_robber" />
|
223
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
224
|
+
</PATH_ELEMENT>
|
225
|
+
</PATH>
|
226
|
+
</subPane>
|
227
|
+
</pane>
|
228
|
+
</panes>
|
229
|
+
</component>
|
230
|
+
<component name="PropertiesComponent">
|
231
|
+
<property name="JavaScriptLanguageLevel" value="ES5" />
|
232
|
+
<property name="JavaScriptPreferStrict" value="true" />
|
233
|
+
<property name="JavaScriptWeakerCompletionTypeGuess" value="true" />
|
234
|
+
<property name="options.lastSelected" value="org.jetbrains.plugins.ruby.settings.RubyActiveModuleSdkConfigurable" />
|
235
|
+
<property name="options.splitter.main.proportions" value="0.3" />
|
236
|
+
<property name="options.splitter.details.proportions" value="0.2" />
|
237
|
+
<property name="options.searchVisible" value="true" />
|
238
|
+
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
239
|
+
<property name="WebServerToolWindowFactoryState" value="false" />
|
240
|
+
</component>
|
241
|
+
<component name="RunManager">
|
242
|
+
<list size="0" />
|
243
|
+
</component>
|
244
|
+
<component name="ShelveChangesManager" show_recycled="false" />
|
245
|
+
<component name="TaskManager">
|
246
|
+
<task active="true" id="Default" summary="Default task">
|
247
|
+
<changelist id="78103ded-9bc2-4132-b2ae-f0aa61766719" name="Default" comment="" />
|
248
|
+
<created>1399786966763</created>
|
249
|
+
<updated>1399786966763</updated>
|
250
|
+
</task>
|
251
|
+
<servers />
|
252
|
+
</component>
|
253
|
+
<component name="ToolWindowManager">
|
254
|
+
<frame x="-1245" y="-1058" width="1920" height="1058" extended-state="6" />
|
255
|
+
<editor active="true" />
|
256
|
+
<layout>
|
257
|
+
<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="8" side_tool="false" content_ui="tabs" />
|
258
|
+
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32880846" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
|
259
|
+
<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" />
|
260
|
+
<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="8" side_tool="false" content_ui="tabs" />
|
261
|
+
<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" />
|
262
|
+
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2683706" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
263
|
+
<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" />
|
264
|
+
<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="3" side_tool="true" content_ui="tabs" />
|
265
|
+
<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="8" side_tool="true" content_ui="tabs" />
|
266
|
+
<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" />
|
267
|
+
<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="8" side_tool="false" content_ui="tabs" />
|
268
|
+
<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" />
|
269
|
+
<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" />
|
270
|
+
<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" />
|
271
|
+
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32880846" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
272
|
+
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3296" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
|
273
|
+
<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" />
|
274
|
+
<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" />
|
275
|
+
<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" />
|
276
|
+
</layout>
|
277
|
+
</component>
|
278
|
+
<component name="Vcs.Log.UiProperties">
|
279
|
+
<option name="RECENTLY_FILTERED_USER_GROUPS">
|
280
|
+
<collection />
|
281
|
+
</option>
|
282
|
+
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
|
283
|
+
<collection />
|
284
|
+
</option>
|
285
|
+
</component>
|
286
|
+
<component name="VcsContentAnnotationSettings">
|
287
|
+
<option name="myLimit" value="2678400000" />
|
288
|
+
</component>
|
289
|
+
<component name="VcsManagerConfiguration">
|
290
|
+
<option name="myTodoPanelSettings">
|
291
|
+
<TodoPanelSettings />
|
292
|
+
</option>
|
293
|
+
</component>
|
294
|
+
<component name="XDebuggerManager">
|
295
|
+
<breakpoint-manager />
|
296
|
+
</component>
|
297
|
+
<component name="editorHistoryManager">
|
298
|
+
<entry file="file://$PROJECT_DIR$/lib/mail_robber.rb">
|
299
|
+
<provider selected="true" editor-type-id="text-editor">
|
300
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="543" max-vertical-offset="960">
|
301
|
+
<caret line="47" column="46" selection-start-line="47" selection-start-column="46" selection-end-line="47" selection-end-column="46" />
|
302
|
+
<folding />
|
303
|
+
</state>
|
304
|
+
</provider>
|
305
|
+
</entry>
|
306
|
+
<entry file="file://$PROJECT_DIR$/lib/tasks/mail_robber_open.rake">
|
307
|
+
<provider selected="true" editor-type-id="text-editor">
|
308
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="135" max-vertical-offset="225">
|
309
|
+
<caret line="9" column="0" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="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 vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="135">
|
317
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
318
|
+
<folding />
|
319
|
+
</state>
|
320
|
+
</provider>
|
321
|
+
</entry>
|
322
|
+
<entry file="file://$PROJECT_DIR$/mail_robber.gemspec">
|
323
|
+
<provider selected="true" editor-type-id="text-editor">
|
324
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="165" max-vertical-offset="450">
|
325
|
+
<caret line="11" column="36" selection-start-line="11" selection-start-column="26" selection-end-line="11" selection-end-column="36" />
|
326
|
+
<folding />
|
327
|
+
</state>
|
328
|
+
</provider>
|
329
|
+
</entry>
|
330
|
+
<entry file="file://$PROJECT_DIR$/lib/generators/mail_robber/install_generator.rb">
|
331
|
+
<provider selected="true" editor-type-id="text-editor">
|
332
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="360" max-vertical-offset="555">
|
333
|
+
<caret line="24" column="46" selection-start-line="24" selection-start-column="46" selection-end-line="24" selection-end-column="46" />
|
334
|
+
<folding />
|
335
|
+
</state>
|
336
|
+
</provider>
|
337
|
+
</entry>
|
338
|
+
<entry file="file://$PROJECT_DIR$/lib/mail_robber.rb">
|
339
|
+
<provider selected="true" editor-type-id="text-editor">
|
340
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="543" max-vertical-offset="960">
|
341
|
+
<caret line="47" column="46" selection-start-line="47" selection-start-column="46" selection-end-line="47" selection-end-column="46" />
|
342
|
+
<folding />
|
343
|
+
</state>
|
344
|
+
</provider>
|
345
|
+
</entry>
|
346
|
+
<entry file="file://$PROJECT_DIR$/lib/tasks/mail_robber_open.rake">
|
347
|
+
<provider selected="true" editor-type-id="text-editor">
|
348
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="90" max-vertical-offset="225">
|
349
|
+
<caret line="6" column="42" selection-start-line="6" selection-start-column="42" selection-end-line="6" selection-end-column="42" />
|
350
|
+
<folding />
|
351
|
+
</state>
|
352
|
+
</provider>
|
353
|
+
</entry>
|
354
|
+
<entry file="file://$PROJECT_DIR$/mail_robber.gemspec">
|
355
|
+
<provider selected="true" editor-type-id="text-editor">
|
356
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="180" max-vertical-offset="450">
|
357
|
+
<caret line="12" column="45" selection-start-line="12" selection-start-column="41" selection-end-line="12" selection-end-column="45" />
|
358
|
+
<folding />
|
359
|
+
</state>
|
360
|
+
</provider>
|
361
|
+
</entry>
|
362
|
+
<entry file="file://$PROJECT_DIR$/lib/generators/mail_robber/install_generator.rb">
|
363
|
+
<provider selected="true" editor-type-id="text-editor">
|
364
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="360" max-vertical-offset="555">
|
365
|
+
<caret line="24" column="46" selection-start-line="24" selection-start-column="46" selection-end-line="24" selection-end-column="46" />
|
366
|
+
<folding />
|
367
|
+
</state>
|
368
|
+
</provider>
|
369
|
+
</entry>
|
370
|
+
<entry file="file://$PROJECT_DIR$/lib/mail_robber.rb">
|
371
|
+
<provider selected="true" editor-type-id="text-editor">
|
372
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="543" max-vertical-offset="960">
|
373
|
+
<caret line="47" column="46" selection-start-line="47" selection-start-column="46" selection-end-line="47" selection-end-column="46" />
|
374
|
+
<folding />
|
375
|
+
</state>
|
376
|
+
</provider>
|
377
|
+
</entry>
|
378
|
+
<entry file="file://$PROJECT_DIR$/lib/tasks/mail_robber_open.rake">
|
379
|
+
<provider selected="true" editor-type-id="text-editor">
|
380
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="90" max-vertical-offset="225">
|
381
|
+
<caret line="6" column="25" selection-start-line="6" selection-start-column="25" selection-end-line="6" selection-end-column="25" />
|
382
|
+
<folding />
|
383
|
+
</state>
|
384
|
+
</provider>
|
385
|
+
</entry>
|
386
|
+
<entry file="file://$PROJECT_DIR$/mail_robber.gemspec">
|
387
|
+
<provider selected="true" editor-type-id="text-editor">
|
388
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="180" max-vertical-offset="450">
|
389
|
+
<caret line="12" column="31" selection-start-line="12" selection-start-column="31" selection-end-line="12" selection-end-column="31" />
|
390
|
+
<folding />
|
391
|
+
</state>
|
392
|
+
</provider>
|
393
|
+
</entry>
|
394
|
+
<entry file="file://$PROJECT_DIR$/lib/generators/mail_robber/install_generator.rb">
|
395
|
+
<provider selected="true" editor-type-id="text-editor">
|
396
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="163" max-vertical-offset="555">
|
397
|
+
<caret line="24" column="29" selection-start-line="24" selection-start-column="29" selection-end-line="24" selection-end-column="29" />
|
398
|
+
<folding />
|
399
|
+
</state>
|
400
|
+
</provider>
|
401
|
+
</entry>
|
402
|
+
<entry file="file://$PROJECT_DIR$/lib/mail_robber.rb">
|
403
|
+
<provider selected="true" editor-type-id="text-editor">
|
404
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="705" max-vertical-offset="960">
|
405
|
+
<caret line="47" column="65" selection-start-line="47" selection-start-column="65" selection-end-line="47" selection-end-column="65" />
|
406
|
+
<folding />
|
407
|
+
</state>
|
408
|
+
</provider>
|
409
|
+
</entry>
|
410
|
+
<entry file="file://$PROJECT_DIR$/lib/generators/mail_robber/install_generator.rb">
|
411
|
+
<provider selected="true" editor-type-id="text-editor">
|
412
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="13" max-vertical-offset="555">
|
413
|
+
<caret line="23" column="46" selection-start-line="23" selection-start-column="46" selection-end-line="23" selection-end-column="46" />
|
414
|
+
<folding />
|
415
|
+
</state>
|
416
|
+
</provider>
|
417
|
+
</entry>
|
418
|
+
<entry file="file://$PROJECT_DIR$/lib/mail_robber.rb">
|
419
|
+
<provider selected="true" editor-type-id="text-editor">
|
420
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="543" max-vertical-offset="960">
|
421
|
+
<caret line="47" column="46" selection-start-line="47" selection-start-column="46" selection-end-line="47" selection-end-column="46" />
|
422
|
+
<folding />
|
423
|
+
</state>
|
424
|
+
</provider>
|
425
|
+
</entry>
|
426
|
+
<entry file="file://$PROJECT_DIR$/lib/generators/mail_robber/install_generator.rb">
|
427
|
+
<provider selected="true" editor-type-id="text-editor">
|
428
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="360" max-vertical-offset="555">
|
429
|
+
<caret line="24" column="46" selection-start-line="24" selection-start-column="46" selection-end-line="24" selection-end-column="46" />
|
430
|
+
<folding />
|
431
|
+
</state>
|
432
|
+
</provider>
|
433
|
+
</entry>
|
434
|
+
<entry file="file://$PROJECT_DIR$/lib/tasks/mail_robber_open.rake">
|
435
|
+
<provider selected="true" editor-type-id="text-editor">
|
436
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="225">
|
437
|
+
<caret line="9" column="0" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
|
438
|
+
<folding />
|
439
|
+
</state>
|
440
|
+
</provider>
|
441
|
+
</entry>
|
442
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
443
|
+
<provider selected="true" editor-type-id="text-editor">
|
444
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="635">
|
445
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
446
|
+
<folding />
|
447
|
+
</state>
|
448
|
+
</provider>
|
449
|
+
</entry>
|
450
|
+
<entry file="file://$PROJECT_DIR$/README.md">
|
451
|
+
<provider selected="true" editor-type-id="text-editor">
|
452
|
+
<state vertical-scroll-proportion="-9.6" vertical-offset="0" max-vertical-offset="525">
|
453
|
+
<caret line="16" column="33" selection-start-line="16" selection-start-column="33" selection-end-line="16" selection-end-column="33" />
|
454
|
+
<folding />
|
455
|
+
</state>
|
456
|
+
</provider>
|
457
|
+
</entry>
|
458
|
+
<entry file="file://$PROJECT_DIR$/lib/mail_robber/version.rb">
|
459
|
+
<provider selected="true" editor-type-id="text-editor">
|
460
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="966">
|
461
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
462
|
+
<folding />
|
463
|
+
</state>
|
464
|
+
</provider>
|
465
|
+
</entry>
|
466
|
+
<entry file="file://$PROJECT_DIR$/mail_robber.gemspec">
|
467
|
+
<provider selected="true" editor-type-id="text-editor">
|
468
|
+
<state vertical-scroll-proportion="0.35714287" vertical-offset="0" max-vertical-offset="966">
|
469
|
+
<caret line="23" column="3" selection-start-line="23" selection-start-column="3" selection-end-line="23" selection-end-column="3" />
|
470
|
+
<folding />
|
471
|
+
</state>
|
472
|
+
</provider>
|
473
|
+
</entry>
|
474
|
+
</component>
|
475
|
+
</project>
|
476
|
+
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Ilya Gelman
|
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
|
+
# MailRobber
|
2
|
+
|
3
|
+
Simple email testing for Rails
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'mail_robber'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Register your app in MailRobber service:
|
16
|
+
|
17
|
+
$ rails g mail_robber:install
|
18
|
+
|
19
|
+
This will be added to your config/initializers/mail_robber.rb
|
20
|
+
|
21
|
+
MailRobber.configure do |config|
|
22
|
+
config.enabled = true # enable mail interception
|
23
|
+
config.block_delivery = true # don't proceed sending email
|
24
|
+
config.token = 'token-for-your-application'
|
25
|
+
end
|
26
|
+
|
27
|
+
To open a page with your emails, run:
|
28
|
+
|
29
|
+
$ rake mail_robber:open
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'rails/generators/base'
|
2
|
+
require 'securerandom'
|
3
|
+
|
4
|
+
module MailRobber
|
5
|
+
module Generators
|
6
|
+
class InstallGenerator < Rails::Generators::Base
|
7
|
+
desc "Register your app with a new API key within MailRobber service."
|
8
|
+
|
9
|
+
source_root File.expand_path("../../templates", __FILE__)
|
10
|
+
|
11
|
+
@@token = SecureRandom.hex(16)
|
12
|
+
|
13
|
+
def copy_initializer
|
14
|
+
template 'mail_robber.rb', 'config/initializers/mail_robber.rb'
|
15
|
+
end
|
16
|
+
|
17
|
+
def token
|
18
|
+
@@token
|
19
|
+
end
|
20
|
+
|
21
|
+
begin
|
22
|
+
params = { app_name: Rails.application.class.parent,
|
23
|
+
token: @@token }
|
24
|
+
Net::HTTP.post_form(URI.parse("http://mailrobber.com/api/apps/create/"), params)
|
25
|
+
Launchy.open("http://mailrobber.com/#/#{@@token}")
|
26
|
+
rescue
|
27
|
+
raise 'Couldn\'t create app within MailRobber service. Check config/initializers/mail_robber.rb'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module MailRobber
|
2
|
+
class << self
|
3
|
+
attr_accessor :config
|
4
|
+
end
|
5
|
+
|
6
|
+
def self.configure
|
7
|
+
self.config ||= Configuration.new
|
8
|
+
yield(config)
|
9
|
+
ActionMailer::Base.register_interceptor(MailRobber)
|
10
|
+
end
|
11
|
+
|
12
|
+
class Configuration
|
13
|
+
attr_accessor :token, :enabled, :block_delivery
|
14
|
+
|
15
|
+
def initialize
|
16
|
+
@token = nil
|
17
|
+
@enabled = true
|
18
|
+
@block_delivery = false
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/mail_robber.rb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
require "net/http"
|
2
|
+
require "uri"
|
3
|
+
require "mail_robber/version"
|
4
|
+
require "mail_robber/config"
|
5
|
+
require "mail_robber/railtie" if defined?(Rails)
|
6
|
+
require "launchy"
|
7
|
+
|
8
|
+
module MailRobber
|
9
|
+
def self.delivering_email(message)
|
10
|
+
params = { token: self.config.token,
|
11
|
+
from: message.from,
|
12
|
+
to: message.to,
|
13
|
+
cc: message.cc,
|
14
|
+
bcc: message.bcc,
|
15
|
+
subject: message.subject }
|
16
|
+
|
17
|
+
if message.multipart?
|
18
|
+
# If message is HTML-only and has attachments,
|
19
|
+
# it is considered multipart, but doesn't have
|
20
|
+
# text_part, which is required by MailRobber
|
21
|
+
params[:text_part] = message.text_part.body.raw_source || message.html_part.body.raw_source
|
22
|
+
params[:html_part] = message.html_part.body.raw_source if message.html_part
|
23
|
+
else
|
24
|
+
case message.mime_type
|
25
|
+
when 'text/html'
|
26
|
+
params[:text_part] = message.body.raw_source
|
27
|
+
params[:html_part] = message.body.raw_source
|
28
|
+
when 'text/plain'
|
29
|
+
params[:text_part] = message.body.raw_source
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
attachments = message.attachments.map do |a|
|
34
|
+
{ content_type: a.content_type,
|
35
|
+
filename: a.filename,
|
36
|
+
raw_source: a.body.raw_source }
|
37
|
+
end
|
38
|
+
params[:attachments] = Marshal::dump(attachments)
|
39
|
+
|
40
|
+
intercept_letter(params) if self.config.enabled
|
41
|
+
block_delivery(message) if self.config.block_delivery
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
def self.intercept_letter(params)
|
46
|
+
Rails.logger.debug "MailRobber intercepting email"
|
47
|
+
begin
|
48
|
+
Net::HTTP.post_form(URI.parse('http://mailrobber.com/api/emails/create'), params)
|
49
|
+
rescue
|
50
|
+
raise 'Couldn\'t send email to MailRobber'
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.block_delivery(message)
|
55
|
+
message.perform_deliveries = false
|
56
|
+
Rails.logger.debug "MailRobber prevented sending email #{message.inspect}!"
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
namespace :mail_robber do
|
2
|
+
desc 'Open emails page in a web browser'
|
3
|
+
task :open do
|
4
|
+
config_file = Rails.root.join('config', 'initializers', 'mail_robber.rb')
|
5
|
+
config_line = /config.token\s*=\s*'(?<token>.*)'/
|
6
|
+
token = File.read(config_file).match(config_line)['token']
|
7
|
+
Launchy.open("http://mailrobber.com/#/#{token}")
|
8
|
+
end
|
9
|
+
end
|
data/mail_robber.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'mail_robber/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "mail_robber"
|
8
|
+
spec.version = MailRobber::VERSION
|
9
|
+
spec.authors = ["Ilya Gelman"]
|
10
|
+
spec.email = ["ilyagelman@ilyagelman.ru"]
|
11
|
+
spec.description = %q{Simple email testing for Rails}
|
12
|
+
spec.summary = %q{Test your emails from any environment via mailrobber.com service}
|
13
|
+
spec.homepage = "http://mailrobber.com"
|
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 "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake", "~> 0"
|
23
|
+
spec.add_development_dependency "launchy", "~> 0"
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mail_robber
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ilya Gelman
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-05-25 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.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: launchy
|
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: Simple email testing for Rails
|
56
|
+
email:
|
57
|
+
- ilyagelman@ilyagelman.ru
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- .gitignore
|
63
|
+
- .idea/.name
|
64
|
+
- .idea/.rakeTasks
|
65
|
+
- .idea/dictionaries/ilyagelman.xml
|
66
|
+
- .idea/encodings.xml
|
67
|
+
- .idea/mail_robber.iml
|
68
|
+
- .idea/misc.xml
|
69
|
+
- .idea/modules.xml
|
70
|
+
- .idea/scopes/scope_settings.xml
|
71
|
+
- .idea/vcs.xml
|
72
|
+
- .idea/workspace.xml
|
73
|
+
- Gemfile
|
74
|
+
- LICENSE.txt
|
75
|
+
- README.md
|
76
|
+
- Rakefile
|
77
|
+
- lib/generators/mail_robber/install_generator.rb
|
78
|
+
- lib/generators/templates/mail_robber.rb
|
79
|
+
- lib/mail_robber.rb
|
80
|
+
- lib/mail_robber/config.rb
|
81
|
+
- lib/mail_robber/railtie.rb
|
82
|
+
- lib/mail_robber/version.rb
|
83
|
+
- lib/tasks/mail_robber_open.rake
|
84
|
+
- mail_robber.gemspec
|
85
|
+
homepage: http://mailrobber.com
|
86
|
+
licenses:
|
87
|
+
- MIT
|
88
|
+
metadata: {}
|
89
|
+
post_install_message:
|
90
|
+
rdoc_options: []
|
91
|
+
require_paths:
|
92
|
+
- lib
|
93
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - '>='
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - '>='
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
requirements: []
|
104
|
+
rubyforge_project:
|
105
|
+
rubygems_version: 2.2.2
|
106
|
+
signing_key:
|
107
|
+
specification_version: 4
|
108
|
+
summary: Test your emails from any environment via mailrobber.com service
|
109
|
+
test_files: []
|