devcenter 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,7 +9,7 @@ module Devcenter::Previewer
9
9
  extend self
10
10
 
11
11
  def preview(slug, md_path, host, port)
12
- server = WebServer.new(host, port, WebApp, true)
12
+ server = WebServer.new(host, port, WebApp)
13
13
  file_listener_callback = Proc.new do |modified, added, removed|
14
14
  modified.each{ |f| Devcenter::Logger.log "File modified: #{f}" }
15
15
  WebApp.send_server_event
@@ -16,11 +16,11 @@
16
16
  </div>
17
17
  <% end %>
18
18
 
19
- <form class="cli-save" action="<%= devcenter_base_url %>/admin/articles/update/<%= @article.metadata.id %>" method="POST">
19
+ <form class="cli-save" action="<%= devcenter_base_url %>/admin/articles/cli-edit/<%= @article.metadata.id %>" method="POST">
20
20
  <input name="_method" type="hidden" value="put">
21
21
  <input type="hidden" name="article[title]" value="<%= @article.metadata.title %>">
22
22
  <textarea style="display:none1" name="article[content]">
23
- <%= @article.content.to_s.lstrip %>
23
+ <%= @article.content.to_s.lstrip %>
24
24
  </textarea>
25
25
  <input type="submit" value="Save in Dev Center">
26
26
  </form>
@@ -3,26 +3,18 @@ module Devcenter::Previewer
3
3
  class WebServer
4
4
  require 'thin'
5
5
 
6
- attr_reader :threaded
7
-
8
- def initialize(host, port, app, threaded = false)
6
+ def initialize(host, port, app)
9
7
  @host, @port = host, port
10
8
  Thin::Logging.silent = true
11
9
  @server = Thin::Server.new(@host, @port, app)
12
- @threaded = false
13
10
  end
14
11
 
15
12
  def start
16
- if threaded
17
- @thread = Thread.new { @server.start }
18
- else
19
- @server.start
20
- end
13
+ @server.start
21
14
  end
22
15
 
23
16
  def stop
24
17
  @server.stop
25
- Thread.kill(@thread) if threaded
26
18
  end
27
19
  end
28
20
 
@@ -1,3 +1,3 @@
1
1
  module Devcenter
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devcenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-03-01 00:00:00.000000000 Z
13
+ date: 2013-05-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: listen