Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update repo_server to use username and password from config

  • Loading branch information...
commit 394f660181f7031249522992e216fe035b0e1e61 1 parent d611f40
@rambocoder authored
View
150 .idea/workspace.xml
@@ -2,17 +2,25 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="64b9ed1d-f865-415f-8849-671d66542d8b" name="Default" comment="">
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/priv/static/jquery.min.js" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/priv/static/spin.min.js" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/priv/erlanghub.sqlite" afterPath="$PROJECT_DIR$/priv/erlanghub.sqlite" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/erlanghub_pull_handler.erl" afterPath="$PROJECT_DIR$/src/erlanghub_pull_handler.erl" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/github_server.erl" afterPath="$PROJECT_DIR$/src/github_server.erl" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/priv/static/home.js" afterPath="$PROJECT_DIR$/priv/static/home.js" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/priv/html/index.html" afterPath="$PROJECT_DIR$/priv/html/index.html" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/repo_server.erl" afterPath="$PROJECT_DIR$/src/repo_server.erl" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
</list>
<ignored path="erlanghub.iws" />
<ignored path=".idea/workspace.xml" />
- <file path="/Dummy.txt" changelist="64b9ed1d-f865-415f-8849-671d66542d8b" time="1363719631131" ignored="false" />
+ <file path="/Dummy.txt" changelist="64b9ed1d-f865-415f-8849-671d66542d8b" time="1363725495794" ignored="false" />
<file path="/github_server.erl" changelist="64b9ed1d-f865-415f-8849-671d66542d8b" time="1363708191300" ignored="false" />
<file path="/erlanghub_cowboy.erl" changelist="64b9ed1d-f865-415f-8849-671d66542d8b" time="1363709195420" ignored="false" />
- <file path="/index.html" changelist="64b9ed1d-f865-415f-8849-671d66542d8b" time="1363717646435" ignored="false" />
- <file path="/home.js" changelist="64b9ed1d-f865-415f-8849-671d66542d8b" time="1363719497566" ignored="false" />
+ <file path="/index.html" changelist="64b9ed1d-f865-415f-8849-671d66542d8b" time="1363725308756" ignored="false" />
+ <file path="/home.js" changelist="64b9ed1d-f865-415f-8849-671d66542d8b" time="1363724399612" ignored="false" />
+ <file path="/erlanghub_pull_handler.erl" changelist="64b9ed1d-f865-415f-8849-671d66542d8b" time="1363722166064" ignored="false" />
+ <file path="/repo_server.erl" changelist="64b9ed1d-f865-415f-8849-671d66542d8b" time="1363723872869" ignored="false" />
+ <file path="/README.md" changelist="64b9ed1d-f865-415f-8849-671d66542d8b" time="1363725058223" ignored="false" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -71,62 +79,62 @@
</component>
<component name="FileEditorManager">
<leaf>
- <file leaf-file-name="erlanghub_cowboy.erl" pinned="false" current="true" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/src/erlanghub_cowboy.erl">
+ <file leaf-file-name="home.js" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/priv/static/home.js">
<provider selected="true" editor-type-id="text-editor">
- <state line="17" column="4" selection-start="478" selection-end="478" vertical-scroll-proportion="0.425">
+ <state line="35" column="16" selection-start="1294" selection-end="1294" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="index.html" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/priv/html/index.html">
+ <file leaf-file-name="README.md" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor">
- <state line="16" column="27" selection-start="804" selection-end="804" vertical-scroll-proportion="-8.541667">
+ <state line="6" column="43" selection-start="198" selection-end="198" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="jquery.min.js" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/priv/static/jquery.min.js">
+ <file leaf-file-name="index.html" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/priv/html/index.html">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+ <state line="3" column="18" selection-start="48" selection-end="48" vertical-scroll-proportion="0.07992895">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="home.js" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/priv/static/home.js">
+ <file leaf-file-name="useful snippets.txt" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/useful snippets.txt">
<provider selected="true" editor-type-id="text-editor">
- <state line="11" column="15" selection-start="326" selection-end="326" vertical-scroll-proportion="0.0">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="useful snippets.txt" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/useful snippets.txt">
+ <file leaf-file-name="start.sh" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/start.sh">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+ <state line="2" column="64" selection-start="88" selection-end="88" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="rebar.config" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/rebar.config">
+ <file leaf-file-name="erlanghub.erl" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/erlanghub.erl">
<provider selected="true" editor-type-id="text-editor">
- <state line="6" column="80" selection-start="484" selection-end="484" vertical-scroll-proportion="0.0">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="README.md" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/README.md">
+ <file leaf-file-name="erlanghub.app.src" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/erlanghub.app.src">
<provider selected="true" editor-type-id="text-editor">
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
@@ -134,19 +142,19 @@
</provider>
</entry>
</file>
- <file leaf-file-name="start.sh" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/start.sh">
+ <file leaf-file-name="default_handler.erl" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/default_handler.erl">
<provider selected="true" editor-type-id="text-editor">
- <state line="2" column="64" selection-start="88" selection-end="88" vertical-scroll-proportion="0.0">
+ <state line="3" column="22" selection-start="109" selection-end="109" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="test.txt" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/priv/static/test.txt">
+ <file leaf-file-name="repo_server.erl" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/repo_server.erl">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+ <state line="20" column="0" selection-start="552" selection-end="552" vertical-scroll-proportion="-4.2">
<folding />
</state>
</provider>
@@ -155,7 +163,7 @@
<file leaf-file-name="github_server.erl" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/github_server.erl">
<provider selected="true" editor-type-id="text-editor">
- <state line="30" column="0" selection-start="707" selection-end="707" vertical-scroll-proportion="0.0">
+ <state line="52" column="22" selection-start="1790" selection-end="1790" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
@@ -180,8 +188,6 @@
<component name="IdeDocumentHistory">
<option name="changedFiles">
<list>
- <option value="$PROJECT_DIR$/src/repo_server.erl" />
- <option value="$PROJECT_DIR$/deps/tinymq/src/tinymq_channels_sup.erl" />
<option value="$PROJECT_DIR$/deps/tinymq/src/tinymq_channel_sup.erl" />
<option value="$PROJECT_DIR$/deps/tinymq/src/tinymq_controller.erl" />
<option value="$PROJECT_DIR$/deps/tinymq/src/tinymq_channel_controller.erl" />
@@ -191,11 +197,13 @@
<option value="$PROJECT_DIR$/rebar.config" />
<option value="$PROJECT_DIR$/src/erlanghub_app.erl" />
<option value="$PROJECT_DIR$/src/default_handler.erl" />
- <option value="$PROJECT_DIR$/src/erlanghub_pull_handler.erl" />
<option value="$PROJECT_DIR$/src/erlanghub_cowboy.erl" />
+ <option value="$PROJECT_DIR$/src/erlanghub_pull_handler.erl" />
+ <option value="$PROJECT_DIR$/src/repo_server.erl" />
<option value="$PROJECT_DIR$/src/github_server.erl" />
- <option value="$PROJECT_DIR$/priv/html/index.html" />
<option value="$PROJECT_DIR$/priv/static/home.js" />
+ <option value="$PROJECT_DIR$/README.md" />
+ <option value="$PROJECT_DIR$/priv/html/index.html" />
</list>
</option>
</component>
@@ -529,7 +537,11 @@
<created>1363719635272</created>
<updated>1363719635272</updated>
</task>
- <option name="localTasksCounter" value="3" />
+ <task id="LOCAL-00003" summary="Including spinner UI">
+ <created>1363720559130</created>
+ <updated>1363720559130</updated>
+ </task>
+ <option name="localTasksCounter" value="4" />
<servers />
</component>
<component name="ToolWindowManager">
@@ -539,21 +551,21 @@
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.41421947" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="JetGradle" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32766616" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<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" />
<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" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
- <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
+ <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32921174" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<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" />
<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" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32932332" sideWeight="0.5857805" order="3" side_tool="false" content_ui="tabs" />
<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" />
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.22406015" sideWeight="0.5857805" order="0" side_tool="false" content_ui="combo" />
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.22406015" sideWeight="0.6707882" order="0" side_tool="false" content_ui="combo" />
<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" />
<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" />
<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" />
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32897195" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<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" />
<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" />
</layout>
@@ -596,7 +608,7 @@
<option name="MAXIMUM_HISTORY_ROWS" value="1000" />
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
- <option name="LAST_COMMIT_MESSAGE" value="Update Look and Feel" />
+ <option name="LAST_COMMIT_MESSAGE" value="Update repo_server to use username and password from config" />
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
@@ -611,91 +623,93 @@
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
<MESSAGE value="Using Cowboy 0.8.2 and config file" />
<MESSAGE value="Update Look and Feel" />
+ <MESSAGE value="Including spinner UI" />
+ <MESSAGE value="Update repo_server to use username and password from config" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
</component>
<component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/src/erlanghub.erl">
+ <entry file="file://$PROJECT_DIR$/priv/static/test.txt">
<provider selected="true" editor-type-id="text-editor">
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/erlanghub_sup.erl">
+ <entry file="file://$PROJECT_DIR$/rebar.config">
<provider selected="true" editor-type-id="text-editor">
- <state line="19" column="23" selection-start="460" selection-end="460" vertical-scroll-proportion="0.0">
+ <state line="6" column="80" selection-start="484" selection-end="484" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/erlanghub_app.erl">
+ <entry file="file://$PROJECT_DIR$/priv/static/jquery.min.js">
<provider selected="true" editor-type-id="text-editor">
- <state line="9" column="41" selection-start="242" selection-end="242" vertical-scroll-proportion="0.0">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/default_handler.erl">
+ <entry file="file://$PROJECT_DIR$/src/erlanghub_cowboy.erl">
<provider selected="true" editor-type-id="text-editor">
- <state line="3" column="22" selection-start="109" selection-end="109" vertical-scroll-proportion="0.0">
+ <state line="15" column="18" selection-start="380" selection-end="380" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/deps/cowboy/src/cowboy_http_handler.erl">
+ <entry file="file://$PROJECT_DIR$/src/erlanghub_pull_handler.erl">
<provider selected="true" editor-type-id="text-editor">
- <state line="50" column="47" selection-start="2207" selection-end="2207" vertical-scroll-proportion="0.0">
+ <state line="36" column="25" selection-start="1157" selection-end="1157" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/erlanghub_pull_handler.erl">
+ <entry file="file://$PROJECT_DIR$/src/erlanghub_app.erl">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+ <state line="9" column="41" selection-start="242" selection-end="242" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/github_server.erl">
+ <entry file="file://$PROJECT_DIR$/src/erlanghub.erl">
<provider selected="true" editor-type-id="text-editor">
- <state line="30" column="0" selection-start="707" selection-end="707" vertical-scroll-proportion="0.0">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/priv/static/test.txt">
+ <entry file="file://$PROJECT_DIR$/src/erlanghub.app.src">
<provider selected="true" editor-type-id="text-editor">
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/priv/static/jquery.min.js">
+ <entry file="file://$PROJECT_DIR$/src/default_handler.erl">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+ <state line="3" column="22" selection-start="109" selection-end="109" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/priv/html/index.html">
+ <entry file="file://$PROJECT_DIR$/src/repo_server.erl">
<provider selected="true" editor-type-id="text-editor">
- <state line="16" column="27" selection-start="804" selection-end="804" vertical-scroll-proportion="-8.541667">
+ <state line="20" column="0" selection-start="552" selection-end="552" vertical-scroll-proportion="-4.2">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/priv/static/home.js">
+ <entry file="file://$PROJECT_DIR$/src/github_server.erl">
<provider selected="true" editor-type-id="text-editor">
- <state line="11" column="15" selection-start="326" selection-end="326" vertical-scroll-proportion="0.0">
+ <state line="52" column="22" selection-start="1790" selection-end="1790" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/start.sh">
+ <entry file="file://$PROJECT_DIR$/priv/static/home.js">
<provider selected="true" editor-type-id="text-editor">
- <state line="2" column="64" selection-start="88" selection-end="88" vertical-scroll-proportion="0.0">
+ <state line="35" column="16" selection-start="1294" selection-end="1294" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
@@ -707,23 +721,23 @@
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/rebar.config">
+ <entry file="file://$PROJECT_DIR$/start.sh">
<provider selected="true" editor-type-id="text-editor">
- <state line="6" column="80" selection-start="484" selection-end="484" vertical-scroll-proportion="0.0">
+ <state line="2" column="64" selection-start="88" selection-end="88" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+ <state line="6" column="43" selection-start="198" selection-end="198" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/erlanghub_cowboy.erl">
+ <entry file="file://$PROJECT_DIR$/priv/html/index.html">
<provider selected="true" editor-type-id="text-editor">
- <state line="17" column="4" selection-start="478" selection-end="478" vertical-scroll-proportion="0.425">
+ <state line="3" column="18" selection-start="48" selection-end="48" vertical-scroll-proportion="0.07992895">
<folding />
</state>
</provider>
View
7 README.md
@@ -0,0 +1,7 @@
+# Stream all events on GitHub that happen to repos containing Erlang code
+
+Visit [ErlangHub.com](http://erlanghub.com) for demo.
+
+# TODO:
+* Make it pretty
+* Add ability to maintain repos via the web
View
BIN  priv/erlanghub.sqlite
Binary file not shown
View
6 priv/html/index.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
- <title>Erlanghub Events</title>
+ <title>ErlangHub Events</title>
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<style>
html, body {margin:0; padding:0;}
@@ -10,7 +10,9 @@
border-radius: 15px; border:2px solid #000; }
#header {text-align:center; }
/* Messages Display Area */
- #Events {margin:0 auto; margin-bottom: 20px; border:1px solid #CCC; width:90%; height:16em; overflow:auto;
+ #Events {margin:0 auto; margin-bottom: 20px; border:1px solid #CCC; width:90%;
+ min-height:16em;
+ overflow:auto;
background-color: #F8F8F8; }
#msgList {margin:0px; padding:5px; list-style:none;}
#msgList li {padding:5px 10px; border-bottom:1px solid gray;}
View
17 priv/static/home.js
@@ -32,7 +32,8 @@ $(function () {
// work with value
msg = value.replace("\\", "");
obj = JSON.parse(msg);
- $("#msgList").prepend('<li>' + obj.type + " in " + obj.repo.name + " by: " + obj.actor.login + '</li>');
+ var date = new Date(obj.created_at);
+ $("#msgList").prepend('<li>' + date.toString().replace(/GMT.*/g,"") + " " + obj.type + ' in <a href="https://github.com/' + obj.repo.name + '" target="_blank">' + obj.repo.name + '</a> by: <a href="https://github.com/' + obj.actor.login + '" target="_blank">' + obj.actor.login +'</a></li>');
//$.getJSON(obj.repo.url, function (data) {
// $("#msgList").prepend('<li>' + obj.type + " : " + data.name + " @ <a href='" + data.html_url + "'>" + obj.repo.name + "</a> Language: " + data.language + '</li>');
//});
@@ -44,6 +45,7 @@ $(function () {
}
};
+
$('#Events').bind({
'pull': function () {
$.ajax({
@@ -76,8 +78,19 @@ $(function () {
setTimeout(function () { /* Do Nothing here */
}, 1);
}
- }).triggerHandler("pull"); // kick off the pull event after all the events are bound to the Events object
+ });
+ $('#Events').bind({
+ 'start' : function() {
+ $.getJSON(pullUrl, function (data) {
+ // data.timestamp is in microseconds
+ // let's get the last 5 minutes of changes
+ var subtract = 5 * 60 * 1000000;
+ timestamp = data.timestamp - subtract;
+ // kick off the pull event after we get the last timestamp
+ $('#Events').triggerHandler("pull");
+ });
+ }}).triggerHandler("start");
});
View
2  src/erlanghub_pull_handler.erl
@@ -34,7 +34,7 @@ since(<<"GET">>, Since, Req) ->
end,
Json = jiffy:encode({[{timestamp, Timestamp}, {messages, Messages}, {timeout, Timeout}]}),
cowboy_req:reply(200,
- [{<<"Content-Encoding">>, <<"utf-8">>}, {<<"content-type">>, <<"application/json">>}], Json, Req);
+ [{<<"content-encoding">>, <<"utf-8">>}, {<<"content-type">>, <<"application/json">>}], Json, Req);
since(_, _, Req) ->
%% Method not allowed.
cowboy_req:reply(405, Req).
View
2  src/github_server.erl
@@ -43,7 +43,7 @@ handle_info(trigger, Cache) ->
NewCache = Cache;
Events ->
NewCache = lists:foldl(fun (Event, Acc) -> insert_event(Event, Acc) end, Cache, lists:reverse(Events)),
- io:format("Received Events from github:~n", []),
+ io:format("Received Events from github~n", []),
% ok = file:write_file("output.txt", Body1, [write, append]),
RemainingHits = proplists:get_value("x-ratelimit-remaining", Headers1),
io:format("Remaining hits: ~p ~n", [RemainingHits])
View
13 src/repo_server.erl
@@ -53,10 +53,13 @@ code_change(_OldVsn, State, _Extra) ->
fetch_language_info({RepoId, RepoUrl}) ->
+
+ {ok, Username} = application:get_env(erlanghub, username),
+ {ok, Password} = application:get_env(erlanghub, password),
LanguageUrl = string:concat(unicode:characters_to_list(RepoUrl), "/languages"),
- case httpc:request(get, {LanguageUrl, []}, [{timeout, 10000}], []) of
+ case httpc:request(get, {LanguageUrl, [auth_header(Username, Password)]}, [{timeout, 10000}], []) of
{error, Reason} -> io:format("Repo error:~p~n", [Reason]);
- {ok, {{_Version, StatusCode, _Reason}, _Headers1, Body1}} ->
+ {ok, {{_Version, StatusCode, Reason}, _Headers1, Body1}} ->
case StatusCode of
200 ->
{Languages} = jiffy:decode(Body1),
@@ -72,9 +75,13 @@ fetch_language_info({RepoId, RepoUrl}) ->
Body1,
httpd_util:rfc1123_date(erlang:localtime()),
IsErlang]);
- _ -> nothing
+ _ -> io:format("StatusCode:~p Reason:~p RepoId: ~p RepoUrl:~p~n", [StatusCode, Reason, RepoId, RepoUrl])
end
end,
% io:format("Language URL: ~p~n", [LanguageUrl]),
% io:format("Repo id: ~p~n", [RepoId]),
timer:sleep(100).
+
+auth_header(User, Pass) ->
+ Encoded = base64:encode_to_string(lists:append([erlang:atom_to_list(User),":",erlang:atom_to_list(Pass)])),
+ {"Authorization","Basic " ++ Encoded}.
Please sign in to comment.
Something went wrong with that request. Please try again.