tunecore-announcer 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.idea/encodings.xml +5 -0
- data/.idea/inspectionProfiles/Project_Default.xml +6 -0
- data/.idea/inspectionProfiles/profiles_settings.xml +8 -0
- data/.idea/misc.xml +48 -0
- data/.idea/modules.xml +9 -0
- data/.idea/tunecore-announcer.iml +12 -0
- data/.idea/vcs.xml +7 -0
- data/.idea/workspace.xml +316 -0
- data/History.txt +4 -0
- data/Manifest.txt +24 -0
- data/PostInstall.txt +7 -0
- data/README.rdoc +48 -0
- data/Rakefile +28 -0
- data/bin/announcer +79 -0
- data/lib/tunecore-announcer/logger.rb +14 -0
- data/lib/tunecore-announcer/utils.rb +14 -0
- data/lib/tunecore-announcer/xmpp_connection.rb +163 -0
- data/lib/tunecore-announcer.rb +14 -0
- data/lib/xmpp4r-simple/xmpp4r-simple.rb +528 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/test/test_helper.rb +3 -0
- data/test/test_tunecore-announcer.rb +11 -0
- data.tar.gz.sig +0 -0
- metadata +122 -0
- metadata.gz.sig +3 -0
data/.idea/encodings.xml
ADDED
data/.idea/misc.xml
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project relativePaths="false" version="4">
|
3
|
+
<component name="CodeStyleSettingsManager">
|
4
|
+
<option name="PER_PROJECT_SETTINGS">
|
5
|
+
<value>
|
6
|
+
<ADDITIONAL_INDENT_OPTIONS fileType="js">
|
7
|
+
<option name="INDENT_SIZE" value="4" />
|
8
|
+
<option name="CONTINUATION_INDENT_SIZE" value="8" />
|
9
|
+
<option name="TAB_SIZE" value="4" />
|
10
|
+
<option name="USE_TAB_CHARACTER" value="false" />
|
11
|
+
<option name="SMART_TABS" value="false" />
|
12
|
+
<option name="LABEL_INDENT_SIZE" value="0" />
|
13
|
+
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
|
14
|
+
</ADDITIONAL_INDENT_OPTIONS>
|
15
|
+
<ADDITIONAL_INDENT_OPTIONS fileType="rb">
|
16
|
+
<option name="INDENT_SIZE" value="2" />
|
17
|
+
<option name="CONTINUATION_INDENT_SIZE" value="8" />
|
18
|
+
<option name="TAB_SIZE" value="4" />
|
19
|
+
<option name="USE_TAB_CHARACTER" value="false" />
|
20
|
+
<option name="SMART_TABS" value="false" />
|
21
|
+
<option name="LABEL_INDENT_SIZE" value="0" />
|
22
|
+
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
|
23
|
+
</ADDITIONAL_INDENT_OPTIONS>
|
24
|
+
<ADDITIONAL_INDENT_OPTIONS fileType="xml">
|
25
|
+
<option name="INDENT_SIZE" value="4" />
|
26
|
+
<option name="CONTINUATION_INDENT_SIZE" value="8" />
|
27
|
+
<option name="TAB_SIZE" value="4" />
|
28
|
+
<option name="USE_TAB_CHARACTER" value="false" />
|
29
|
+
<option name="SMART_TABS" value="false" />
|
30
|
+
<option name="LABEL_INDENT_SIZE" value="0" />
|
31
|
+
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
|
32
|
+
</ADDITIONAL_INDENT_OPTIONS>
|
33
|
+
</value>
|
34
|
+
</option>
|
35
|
+
<option name="USE_PER_PROJECT_SETTINGS" value="false" />
|
36
|
+
</component>
|
37
|
+
<component name="DependencyValidationManager">
|
38
|
+
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
|
39
|
+
</component>
|
40
|
+
<component name="ProjectDetails">
|
41
|
+
<option name="projectName" value="tunecore-announcer" />
|
42
|
+
</component>
|
43
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="Ruby SDK 1.8.6" project-jdk-type="RUBY_SDK" />
|
44
|
+
<component name="SvnBranchConfigurationManager">
|
45
|
+
<option name="myVersion" value="124" />
|
46
|
+
</component>
|
47
|
+
</project>
|
48
|
+
|
data/.idea/modules.xml
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project relativePaths="false" version="4">
|
3
|
+
<component name="ProjectModuleManager">
|
4
|
+
<modules>
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/tunecore-announcer.iml" filepath="$PROJECT_DIR$/.idea/tunecore-announcer.iml" />
|
6
|
+
</modules>
|
7
|
+
</component>
|
8
|
+
</project>
|
9
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module relativePaths="false" 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
|
+
</component>
|
8
|
+
<component name="RModuleSettingsStorage">
|
9
|
+
<RMODULE_SETTINGS_STORAGE_ID NAME="NUMBER" VALUE="0" />
|
10
|
+
</component>
|
11
|
+
</module>
|
12
|
+
|
data/.idea/vcs.xml
ADDED
data/.idea/workspace.xml
ADDED
@@ -0,0 +1,316 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project relativePaths="false" version="4">
|
3
|
+
<component name="ChangeListManager">
|
4
|
+
<list default="true" readonly="true" name="Default" comment="" />
|
5
|
+
<ignored path="tunecore-announcer.iws" />
|
6
|
+
<ignored path=".idea/workspace.xml" />
|
7
|
+
</component>
|
8
|
+
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
|
9
|
+
<component name="CreatePatchCommitExecutor">
|
10
|
+
<option name="PATCH_PATH" value="" />
|
11
|
+
<option name="REVERSE_PATCH" value="false" />
|
12
|
+
</component>
|
13
|
+
<component name="DaemonCodeAnalyzer">
|
14
|
+
<disable_hints />
|
15
|
+
</component>
|
16
|
+
<component name="FavoritesManager">
|
17
|
+
<favorites_list name="tunecore-announcer" />
|
18
|
+
</component>
|
19
|
+
<component name="FileEditorManager">
|
20
|
+
<leaf>
|
21
|
+
<file leaf-file-name="announcer" pinned="false" current="false" current-in-tab="false">
|
22
|
+
<entry file="file://$PROJECT_DIR$/bin/announcer">
|
23
|
+
<provider selected="true" editor-type-id="text-editor">
|
24
|
+
<state line="76" column="20" selection-start="1985" selection-end="1985" vertical-scroll-proportion="0.0">
|
25
|
+
<folding />
|
26
|
+
</state>
|
27
|
+
</provider>
|
28
|
+
</entry>
|
29
|
+
</file>
|
30
|
+
<file leaf-file-name="xmpp_connection.rb" pinned="false" current="true" current-in-tab="true">
|
31
|
+
<entry file="file://$PROJECT_DIR$/lib/tunecore-announcer/xmpp_connection.rb">
|
32
|
+
<provider selected="true" editor-type-id="text-editor">
|
33
|
+
<state line="36" column="26" selection-start="786" selection-end="786" vertical-scroll-proportion="0.3957399">
|
34
|
+
<folding />
|
35
|
+
</state>
|
36
|
+
</provider>
|
37
|
+
</entry>
|
38
|
+
</file>
|
39
|
+
</leaf>
|
40
|
+
</component>
|
41
|
+
<component name="FindManager">
|
42
|
+
<FindUsagesManager>
|
43
|
+
<setting name="OPEN_NEW_TAB" value="false" />
|
44
|
+
</FindUsagesManager>
|
45
|
+
</component>
|
46
|
+
<component name="ProjectLevelVcsManager">
|
47
|
+
<OptionsSetting value="true" id="Add" />
|
48
|
+
<OptionsSetting value="true" id="Remove" />
|
49
|
+
<OptionsSetting value="true" id="Checkout" />
|
50
|
+
<OptionsSetting value="true" id="Update" />
|
51
|
+
<OptionsSetting value="true" id="Status" />
|
52
|
+
<OptionsSetting value="true" id="Edit" />
|
53
|
+
<ConfirmationsSetting value="0" id="Add" />
|
54
|
+
<ConfirmationsSetting value="0" id="Remove" />
|
55
|
+
</component>
|
56
|
+
<component name="ProjectPane">
|
57
|
+
<subPane />
|
58
|
+
</component>
|
59
|
+
<component name="ProjectReloadState">
|
60
|
+
<option name="STATE" value="0" />
|
61
|
+
</component>
|
62
|
+
<component name="ProjectView">
|
63
|
+
<navigator currentView="ProjectPane" proportions="0.5" version="1" splitterProportion="0.5">
|
64
|
+
<flattenPackages />
|
65
|
+
<showMembers />
|
66
|
+
<showModules />
|
67
|
+
<showLibraryContents />
|
68
|
+
<hideEmptyPackages />
|
69
|
+
<abbreviatePackageNames />
|
70
|
+
<showStructure ProjectPane="false" />
|
71
|
+
<autoscrollToSource />
|
72
|
+
<autoscrollFromSource />
|
73
|
+
<sortByType />
|
74
|
+
</navigator>
|
75
|
+
</component>
|
76
|
+
<component name="PropertiesComponent">
|
77
|
+
<property name="options.splitter.details.proportions" value="0.2" />
|
78
|
+
<property name="options.splitter.main.proportions" value="0.3" />
|
79
|
+
<property name="options.searchVisible" value="true" />
|
80
|
+
<property name="options.lastSelected" value="preferences.sourceCode.General" />
|
81
|
+
</component>
|
82
|
+
<component name="RunManager" selected="Ruby.xmpp_connection">
|
83
|
+
<tempConfiguration default="false" name="xmpp_connection" type="RubyRunConfigurationType" factoryName="Ruby script">
|
84
|
+
<module name="tunecore-announcer" />
|
85
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift)" />
|
86
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$PROJECT_DIR$/lib/tunecore-announcer" />
|
87
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
88
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
89
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
90
|
+
<envs />
|
91
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$PROJECT_DIR$/lib/tunecore-announcer/xmpp_connection.rb" />
|
92
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
93
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
94
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
95
|
+
<method />
|
96
|
+
</tempConfiguration>
|
97
|
+
<configuration default="true" type="RubyRunConfigurationType" factoryName="Ruby script">
|
98
|
+
<module name="" />
|
99
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift)" />
|
100
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="" />
|
101
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
102
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
103
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
104
|
+
<envs />
|
105
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="" />
|
106
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
107
|
+
</configuration>
|
108
|
+
<configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
|
109
|
+
<module name="" />
|
110
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift)" />
|
111
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
112
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
113
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
114
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
115
|
+
<envs />
|
116
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
117
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
118
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="[none]" />
|
119
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
120
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
121
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
122
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUN_SPECS_SEPARATELY" VALUE="false" />
|
123
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
124
|
+
</configuration>
|
125
|
+
<configuration default="true" type="TestUnitRunConfigurationType" factoryName="Ruby test">
|
126
|
+
<module name="" />
|
127
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift)" />
|
128
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
129
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
130
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
131
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
132
|
+
<envs />
|
133
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
134
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
135
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_CLASS_NAME" VALUE="" />
|
136
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
|
137
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
|
138
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
139
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="INHERITANCE_CHECK_DISABLED" VALUE="false" />
|
140
|
+
</configuration>
|
141
|
+
<list size="1">
|
142
|
+
<item index="0" class="java.lang.String" itemvalue="Ruby.xmpp_connection" />
|
143
|
+
</list>
|
144
|
+
</component>
|
145
|
+
<component name="ShelveChangesManager" show_recycled="false" />
|
146
|
+
<component name="StructureViewFactory">
|
147
|
+
<option name="AUTOSCROLL_MODE" value="true" />
|
148
|
+
<option name="AUTOSCROLL_FROM_SOURCE" value="false" />
|
149
|
+
<option name="ACTIVE_ACTIONS" value="" />
|
150
|
+
</component>
|
151
|
+
<component name="SvnConfiguration">
|
152
|
+
<option name="USER" value="" />
|
153
|
+
<option name="PASSWORD" value="" />
|
154
|
+
<option name="LAST_MERGED_REVISION" />
|
155
|
+
<option name="UPDATE_RUN_STATUS" value="false" />
|
156
|
+
<option name="MERGE_DRY_RUN" value="false" />
|
157
|
+
<option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
|
158
|
+
<option name="UPDATE_LOCK_ON_DEMAND" value="false" />
|
159
|
+
<configuration useDefault="true">/Users/alexkane/.subversion</configuration>
|
160
|
+
<myIsUseDefaultProxy>false</myIsUseDefaultProxy>
|
161
|
+
</component>
|
162
|
+
<component name="TodoView" selected-index="0">
|
163
|
+
<todo-panel id="selected-file">
|
164
|
+
<are-packages-shown value="false" />
|
165
|
+
<are-modules-shown value="false" />
|
166
|
+
<flatten-packages value="false" />
|
167
|
+
<is-autoscroll-to-source value="false" />
|
168
|
+
</todo-panel>
|
169
|
+
<todo-panel id="all">
|
170
|
+
<are-packages-shown value="false" />
|
171
|
+
<are-modules-shown value="false" />
|
172
|
+
<flatten-packages value="false" />
|
173
|
+
<is-autoscroll-to-source value="false" />
|
174
|
+
</todo-panel>
|
175
|
+
<todo-panel id="default-changelist">
|
176
|
+
<are-packages-shown value="false" />
|
177
|
+
<are-modules-shown value="false" />
|
178
|
+
<flatten-packages value="false" />
|
179
|
+
<is-autoscroll-to-source value="false" />
|
180
|
+
</todo-panel>
|
181
|
+
</component>
|
182
|
+
<component name="ToolWindowManager">
|
183
|
+
<frame x="-1864" y="170" width="1524" height="1043" extended-state="0" />
|
184
|
+
<editor active="true" />
|
185
|
+
<layout>
|
186
|
+
<window_info id="Web Preview" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="4" side_tool="false" />
|
187
|
+
<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="0" side_tool="false" />
|
188
|
+
<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="2" side_tool="false" />
|
189
|
+
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3297414" sideWeight="0.5" order="7" side_tool="false" />
|
190
|
+
<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="11" side_tool="false" />
|
191
|
+
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.22933333" sideWeight="0.6627155" order="0" side_tool="false" />
|
192
|
+
<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="8" side_tool="false" />
|
193
|
+
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" />
|
194
|
+
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3297414" sideWeight="0.5" order="6" side_tool="false" />
|
195
|
+
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" />
|
196
|
+
<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="10" side_tool="false" />
|
197
|
+
<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="3" side_tool="false" />
|
198
|
+
<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" />
|
199
|
+
<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="9" side_tool="false" />
|
200
|
+
<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="5" side_tool="false" />
|
201
|
+
<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" />
|
202
|
+
<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" />
|
203
|
+
</layout>
|
204
|
+
</component>
|
205
|
+
<component name="VcsManagerConfiguration">
|
206
|
+
<option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
|
207
|
+
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
|
208
|
+
<option name="PERFORM_UPDATE_IN_BACKGROUND" value="false" />
|
209
|
+
<option name="PERFORM_COMMIT_IN_BACKGROUND" value="false" />
|
210
|
+
<option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
|
211
|
+
<option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
|
212
|
+
<option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
|
213
|
+
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
|
214
|
+
<option name="LAST_COMMIT_MESSAGE" />
|
215
|
+
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
|
216
|
+
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
|
217
|
+
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
|
218
|
+
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
|
219
|
+
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
|
220
|
+
<option name="ACTIVE_VCS_NAME" />
|
221
|
+
<option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
|
222
|
+
<option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
|
223
|
+
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
|
224
|
+
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
|
225
|
+
</component>
|
226
|
+
<component name="XDebuggerManager">
|
227
|
+
<breakpoint-manager />
|
228
|
+
</component>
|
229
|
+
<component name="editorHistoryManager">
|
230
|
+
<entry file="file://$PROJECT_DIR$/README.rdoc">
|
231
|
+
<provider selected="true" editor-type-id="text-editor">
|
232
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
233
|
+
<folding />
|
234
|
+
</state>
|
235
|
+
</provider>
|
236
|
+
</entry>
|
237
|
+
<entry file="file://$PROJECT_DIR$/Manifest.txt">
|
238
|
+
<provider selected="true" editor-type-id="text-editor">
|
239
|
+
<state line="12" column="0" selection-start="200" selection-end="200" vertical-scroll-proportion="0.0">
|
240
|
+
<folding />
|
241
|
+
</state>
|
242
|
+
</provider>
|
243
|
+
</entry>
|
244
|
+
<entry file="file://$PROJECT_DIR$/lib/tunecore-announcer.rb">
|
245
|
+
<provider selected="true" editor-type-id="text-editor">
|
246
|
+
<state line="11" column="53" selection-start="360" selection-end="360" vertical-scroll-proportion="0.0">
|
247
|
+
<folding />
|
248
|
+
</state>
|
249
|
+
</provider>
|
250
|
+
</entry>
|
251
|
+
<entry file="file://$PROJECT_DIR$/lib/tunecore-announcer/utils.rb">
|
252
|
+
<provider selected="true" editor-type-id="text-editor">
|
253
|
+
<state line="2" column="29" selection-start="61" selection-end="61" vertical-scroll-proportion="0.0">
|
254
|
+
<folding />
|
255
|
+
</state>
|
256
|
+
</provider>
|
257
|
+
</entry>
|
258
|
+
<entry file="file://$PROJECT_DIR$/lib/tunecore-announcer/logger.rb">
|
259
|
+
<provider selected="true" editor-type-id="text-editor">
|
260
|
+
<state line="10" column="21" selection-start="204" selection-end="204" vertical-scroll-proportion="0.0">
|
261
|
+
<folding />
|
262
|
+
</state>
|
263
|
+
</provider>
|
264
|
+
</entry>
|
265
|
+
<entry file="file://$PROJECT_DIR$/lib/xmpp4r-simple/xmpp4r-simple.rb">
|
266
|
+
<provider selected="true" editor-type-id="text-editor">
|
267
|
+
<state line="346" column="15" selection-start="10989" selection-end="10989" vertical-scroll-proportion="0.5392377">
|
268
|
+
<folding />
|
269
|
+
</state>
|
270
|
+
</provider>
|
271
|
+
</entry>
|
272
|
+
<entry file="file://$PROJECT_DIR$/bin/announcer">
|
273
|
+
<provider selected="true" editor-type-id="text-editor">
|
274
|
+
<state line="76" column="20" selection-start="1985" selection-end="1985" vertical-scroll-proportion="0.0">
|
275
|
+
<folding />
|
276
|
+
</state>
|
277
|
+
</provider>
|
278
|
+
</entry>
|
279
|
+
<entry file="file://$PROJECT_DIR$/lib/tunecore-announcer/xmpp_connection.rb">
|
280
|
+
<provider selected="true" editor-type-id="text-editor">
|
281
|
+
<state line="36" column="26" selection-start="786" selection-end="786" vertical-scroll-proportion="0.3957399">
|
282
|
+
<folding />
|
283
|
+
</state>
|
284
|
+
</provider>
|
285
|
+
</entry>
|
286
|
+
</component>
|
287
|
+
<component name="masterDetails">
|
288
|
+
<option name="states">
|
289
|
+
<map>
|
290
|
+
<entry key="ScopeChooserConfigurable.UI">
|
291
|
+
<value>
|
292
|
+
<UIState>
|
293
|
+
<option name="proportions">
|
294
|
+
<SplitterProportionsDataImpl />
|
295
|
+
</option>
|
296
|
+
</UIState>
|
297
|
+
</value>
|
298
|
+
</entry>
|
299
|
+
</map>
|
300
|
+
</option>
|
301
|
+
<option name="myStates">
|
302
|
+
<map>
|
303
|
+
<entry key="ScopeChooserConfigurable.UI">
|
304
|
+
<value>
|
305
|
+
<UIState>
|
306
|
+
<option name="proportions">
|
307
|
+
<SplitterProportionsDataImpl />
|
308
|
+
</option>
|
309
|
+
</UIState>
|
310
|
+
</value>
|
311
|
+
</entry>
|
312
|
+
</map>
|
313
|
+
</option>
|
314
|
+
</component>
|
315
|
+
</project>
|
316
|
+
|
data/History.txt
ADDED
data/Manifest.txt
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
.idea/encodings.xml
|
2
|
+
.idea/inspectionProfiles/Project_Default.xml
|
3
|
+
.idea/inspectionProfiles/profiles_settings.xml
|
4
|
+
.idea/misc.xml
|
5
|
+
.idea/modules.xml
|
6
|
+
.idea/tunecore-announcer.iml
|
7
|
+
.idea/vcs.xml
|
8
|
+
.idea/workspace.xml
|
9
|
+
History.txt
|
10
|
+
Manifest.txt
|
11
|
+
PostInstall.txt
|
12
|
+
README.rdoc
|
13
|
+
Rakefile
|
14
|
+
bin/announcer
|
15
|
+
lib/tunecore-announcer.rb
|
16
|
+
lib/tunecore-announcer/logger.rb
|
17
|
+
lib/tunecore-announcer/utils.rb
|
18
|
+
lib/tunecore-announcer/xmpp_connection.rb
|
19
|
+
lib/xmpp4r-simple/xmpp4r-simple.rb
|
20
|
+
script/console
|
21
|
+
script/destroy
|
22
|
+
script/generate
|
23
|
+
test/test_helper.rb
|
24
|
+
test/test_tunecore-announcer.rb
|
data/PostInstall.txt
ADDED
data/README.rdoc
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
= tunecore-announcer
|
2
|
+
|
3
|
+
* FIX (url)
|
4
|
+
|
5
|
+
== DESCRIPTION:
|
6
|
+
|
7
|
+
FIX (describe your package)
|
8
|
+
|
9
|
+
== FEATURES/PROBLEMS:
|
10
|
+
|
11
|
+
* FIX (list of features or problems)
|
12
|
+
|
13
|
+
== SYNOPSIS:
|
14
|
+
|
15
|
+
FIX (code sample of usage)
|
16
|
+
|
17
|
+
== REQUIREMENTS:
|
18
|
+
|
19
|
+
* FIX (list of requirements)
|
20
|
+
|
21
|
+
== INSTALL:
|
22
|
+
|
23
|
+
* FIX (sudo gem install, anything else)
|
24
|
+
|
25
|
+
== LICENSE:
|
26
|
+
|
27
|
+
(The MIT License)
|
28
|
+
|
29
|
+
Copyright (c) 2008 FIXME full name
|
30
|
+
|
31
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
32
|
+
a copy of this software and associated documentation files (the
|
33
|
+
'Software'), to deal in the Software without restriction, including
|
34
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
35
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
36
|
+
permit persons to whom the Software is furnished to do so, subject to
|
37
|
+
the following conditions:
|
38
|
+
|
39
|
+
The above copyright notice and this permission notice shall be
|
40
|
+
included in all copies or substantial portions of the Software.
|
41
|
+
|
42
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
43
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
44
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
45
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
46
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
47
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
48
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
%w[rubygems rake rake/clean fileutils newgem rubigen].each { |f| require f }
|
2
|
+
require File.dirname(__FILE__) + '/lib/tunecore-announcer'
|
3
|
+
|
4
|
+
# Generate all the Rake tasks
|
5
|
+
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
6
|
+
$hoe = Hoe.new('tunecore-announcer', TunecoreAnnouncer::VERSION) do |p|
|
7
|
+
p.developer('Alex Kane', 'alex@tunecore.com')
|
8
|
+
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
9
|
+
p.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
|
10
|
+
p.rubyforge_name = p.name # TODO this is default value
|
11
|
+
# p.extra_deps = [
|
12
|
+
# ['activesupport','>= 2.0.2'],
|
13
|
+
# ]
|
14
|
+
p.extra_dev_deps = [
|
15
|
+
['newgem', ">= #{::Newgem::VERSION}"]
|
16
|
+
]
|
17
|
+
|
18
|
+
p.clean_globs |= %w[**/.DS_Store tmp *.log]
|
19
|
+
path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
|
20
|
+
p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
|
21
|
+
p.rsync_args = '-av --delete --ignore-errors'
|
22
|
+
end
|
23
|
+
|
24
|
+
require 'newgem/tasks' # load /tasks/*.rake
|
25
|
+
Dir['tasks/**/*.rake'].each { |t| load t }
|
26
|
+
|
27
|
+
# TODO - want other tests/tasks run by default? Add them to the list
|
28
|
+
# task :default => [:spec, :features]
|
data/bin/announcer
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
require "#{File.dirname(__FILE__)}/../lib/tunecore-announcer"
|
2
|
+
require 'pp'
|
3
|
+
|
4
|
+
class AnnouncerLauncher
|
5
|
+
|
6
|
+
def self.parse_options(args)
|
7
|
+
|
8
|
+
mandatory_opts = %w(name_prefix jabber_server jabber_password admin_jids)
|
9
|
+
|
10
|
+
options = OpenStruct.new
|
11
|
+
options.jabber_port = 5222
|
12
|
+
|
13
|
+
opts = OptionParser.new do |opts|
|
14
|
+
opts.banner = "Usage: announcer arguments"
|
15
|
+
|
16
|
+
opts.separator ""
|
17
|
+
opts.separator "Mandatory arguments:"
|
18
|
+
|
19
|
+
opts.on "-s", "--jabber-server=HOSTNAME", "Jabber server hostname" do |server|
|
20
|
+
options.jabber_server = server
|
21
|
+
end
|
22
|
+
|
23
|
+
opts.on("-n", "--name=NAME", "Jabber username will be NAME-hostname") do |name|
|
24
|
+
options.name_prefix = name
|
25
|
+
end
|
26
|
+
|
27
|
+
opts.on("-p", "--password=PASSWORD", "This can be anything, the Announcer will create an account on the Jabber server") do |password|
|
28
|
+
options.jabber_password = password
|
29
|
+
end
|
30
|
+
|
31
|
+
opts.on("-a", "--admin-jids JID,JID,JID", Array, "List ofJabber IDs of the users that will control the announcer daemon") do |admin_jids|
|
32
|
+
options.admin_jids = admin_jids
|
33
|
+
end
|
34
|
+
|
35
|
+
opts.separator ""
|
36
|
+
opts.separator "Optional arguments:"
|
37
|
+
|
38
|
+
opts.on "--jabber-port=[PORT]", "Jabber server port (default is 5222)" do |port|
|
39
|
+
options.jabber_port = port
|
40
|
+
end
|
41
|
+
|
42
|
+
opts.on "--hello-mesg=[HELLO]", "Message to send to the admin ex: \"Reporting for duty!\" " do |hello_mesg|
|
43
|
+
options.hello_mesg = hello_mesg
|
44
|
+
end
|
45
|
+
|
46
|
+
opts.on "--avatar-file=[AVATAR]", "Avatar image in png format" do |avatar_file|
|
47
|
+
options.avatar_file = avatar_file
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
opts.parse!(args)
|
53
|
+
|
54
|
+
mandatory_opts.each do |opt|
|
55
|
+
if options.send(opt).nil?
|
56
|
+
puts opts
|
57
|
+
exit
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
return options
|
62
|
+
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
66
|
+
|
67
|
+
options = AnnouncerLauncher.parse_options(ARGV)
|
68
|
+
jabber = TunecoreAnnouncer::XmppConnection.instance
|
69
|
+
jabber.connect(options)
|
70
|
+
|
71
|
+
trap("INT") do
|
72
|
+
jabber.disconnect
|
73
|
+
exit
|
74
|
+
end
|
75
|
+
|
76
|
+
while true do
|
77
|
+
jabber.status(:chat, "#{`ps -ef | wc -l`} processes running")
|
78
|
+
sleep 60
|
79
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class TunecoreAnnouncer::Utils
|
2
|
+
|
3
|
+
def self.random_word(size=6)
|
4
|
+
c = %w(b c d f g h j k l m n p qu r s t v w x z ch cr fr nd ng nk nt ph pr rd sh sl sp st th tr lt)
|
5
|
+
v = %w(a e i o u y)
|
6
|
+
f, r = true, ''
|
7
|
+
(size * 2).times do
|
8
|
+
r << (f ? c[rand * c.size] : v[rand * v.size])
|
9
|
+
f = !f
|
10
|
+
end
|
11
|
+
r
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|