rack-blogengine 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/Gemfile +1 -1
- data/bin/rack-blogengine +1 -6
- data/lib/rack/blogengine/application_router.rb +2 -0
- data/lib/rack/blogengine/command_line_interface.rb +16 -12
- data/lib/rack/blogengine/document.rb +2 -2
- data/lib/rack/blogengine/version.rb +1 -1
- metadata +52 -66
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
5
|
-
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b85e44aec9f30c3944e5feca09a34fb3aaaeb8bd
|
4
|
+
data.tar.gz: 54907dc8238afedbf1cdfec83a1ef23fe43a1f95
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a3dfdf1ce30085b2ba4e3d3d0b4003fb3eda33535e8c1cdf4ec8b456f4a8a6b1dbd767ddc46ef096a37b56306ba5327b358b939ae47f00ab72ecb1751416f1ee
|
7
|
+
data.tar.gz: 7abe2e621475eebd54e607724aa0c12203195ceb1a9c984f2c56c599a195abf5d7303bb2438710e4b750e3e9003d6676795a3b9045d967f8017e9568d5f36e58
|
data/Gemfile
CHANGED
data/bin/rack-blogengine
CHANGED
@@ -7,13 +7,8 @@ else
|
|
7
7
|
command = "".to_sym
|
8
8
|
end
|
9
9
|
|
10
|
-
|
11
10
|
target = ARGV[1]
|
12
11
|
target = "" if !ARGV[1]
|
13
12
|
|
14
|
-
|
15
|
-
cli = Rack::Blogengine::CommandLineInterface.new
|
16
|
-
methods = Rack::Blogengine::CommandLineInterface.instance_methods(false)
|
17
|
-
|
13
|
+
cli = Rack::Blogengine::CommandLineInterface.new
|
18
14
|
cli.send(command, target)
|
19
|
-
|
@@ -15,6 +15,8 @@ module Rack
|
|
15
15
|
|
16
16
|
|
17
17
|
# Iterate through available docs, if nothing matched return nil
|
18
|
+
# TODO: Dont iterate through every doc, get requested doc from DocParser
|
19
|
+
# Operators should have access to ALL available docs (title, path, html etc)
|
18
20
|
documents.each do |doc|
|
19
21
|
if doc[:path] == path
|
20
22
|
route_response = {
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'rack'
|
2
|
+
#require 'rack/attack'
|
2
3
|
require 'rack/blogengine'
|
3
4
|
|
4
5
|
module Rack
|
@@ -21,22 +22,25 @@ module Rack
|
|
21
22
|
target = target.dup
|
22
23
|
target["/"] = ""
|
23
24
|
end
|
24
|
-
puts target
|
25
|
-
system("cd #{target}")
|
26
|
-
$targetfolder = "#{Dir.pwd}/#{target}"
|
27
|
-
app = Rack::Builder.new do
|
28
|
-
use Rack::CommonLogger
|
29
|
-
use Rack::ShowExceptions
|
30
25
|
|
31
|
-
|
32
|
-
|
26
|
+
if Dir.exists?("#{target}")
|
27
|
+
system("cd #{target}")
|
28
|
+
$targetfolder = "#{Dir.pwd}/#{target}"
|
29
|
+
app = Rack::Builder.new do
|
30
|
+
use Rack::CommonLogger
|
31
|
+
use Rack::ShowExceptions
|
32
|
+
|
33
|
+
map "/assets" do
|
34
|
+
run Rack::Directory.new("#{$targetfolder}/assets")
|
35
|
+
end
|
36
|
+
use Rack::Lint
|
37
|
+
run Rack::Blogengine::Application
|
33
38
|
end
|
34
39
|
|
35
|
-
|
36
|
-
|
40
|
+
Rack::Server.start( :app => app, :Port => 3000 )
|
41
|
+
else
|
42
|
+
puts "Target is not a folder!"
|
37
43
|
end
|
38
|
-
|
39
|
-
Rack::Server.start( :app => app, :Port => 3000 )
|
40
44
|
else
|
41
45
|
puts "Specify a targetfolder!"
|
42
46
|
end
|
@@ -5,8 +5,8 @@ module Rack
|
|
5
5
|
|
6
6
|
def to_hash
|
7
7
|
hash = {}
|
8
|
-
instance_variables.each do
|
9
|
-
|
8
|
+
instance_variables.each do |var|
|
9
|
+
hash[var.to_s.delete("@").to_sym] = instance_variable_get(var) unless var.to_s == "@title"
|
10
10
|
end
|
11
11
|
hash
|
12
12
|
end
|
metadata
CHANGED
@@ -1,79 +1,65 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-blogengine
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Benny1992
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
|
12
|
+
date: 2014-01-07 00:00:00 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
prerelease: false
|
14
16
|
name: bundler
|
15
|
-
|
16
|
-
requirements:
|
17
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
17
19
|
- - ~>
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: "1.3"
|
20
22
|
type: :development
|
23
|
+
requirement: *id001
|
24
|
+
- !ruby/object:Gem::Dependency
|
21
25
|
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
26
|
name: rake
|
29
|
-
|
30
|
-
requirements:
|
31
|
-
-
|
32
|
-
-
|
33
|
-
|
27
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
28
|
+
requirements:
|
29
|
+
- &id004
|
30
|
+
- ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: "0"
|
34
33
|
type: :development
|
34
|
+
requirement: *id002
|
35
|
+
- !ruby/object:Gem::Dependency
|
35
36
|
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
37
|
name: rspec
|
43
|
-
|
44
|
-
requirements:
|
45
|
-
- -
|
46
|
-
- !ruby/object:Gem::Version
|
38
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
47
42
|
version: 2.0.0
|
48
43
|
type: :development
|
44
|
+
requirement: *id003
|
45
|
+
- !ruby/object:Gem::Dependency
|
49
46
|
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - '>='
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 2.0.0
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
47
|
name: rack
|
57
|
-
|
58
|
-
requirements:
|
59
|
-
-
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
48
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- *id004
|
62
51
|
type: :runtime
|
63
|
-
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - '>='
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
52
|
+
requirement: *id005
|
69
53
|
description: Blogengine based on rack applications
|
70
|
-
email:
|
54
|
+
email:
|
71
55
|
- klotz.benjamin@yahoo.de
|
72
|
-
executables:
|
56
|
+
executables:
|
73
57
|
- rack-blogengine
|
74
58
|
extensions: []
|
59
|
+
|
75
60
|
extra_rdoc_files: []
|
76
|
-
|
61
|
+
|
62
|
+
files:
|
77
63
|
- .gitignore
|
78
64
|
- Gemfile
|
79
65
|
- LICENSE.txt
|
@@ -89,29 +75,29 @@ files:
|
|
89
75
|
- lib/rack/blogengine/operator.rb
|
90
76
|
- lib/rack/blogengine/version.rb
|
91
77
|
- rack-blogengine.gemspec
|
92
|
-
homepage:
|
93
|
-
licenses:
|
78
|
+
homepage: ""
|
79
|
+
licenses:
|
94
80
|
- MIT
|
95
81
|
metadata: {}
|
82
|
+
|
96
83
|
post_install_message:
|
97
84
|
rdoc_options: []
|
98
|
-
|
85
|
+
|
86
|
+
require_paths:
|
99
87
|
- lib
|
100
88
|
- spec
|
101
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
102
|
-
requirements:
|
103
|
-
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
requirements:
|
108
|
-
- - '>='
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
89
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- *id004
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- *id004
|
111
95
|
requirements: []
|
96
|
+
|
112
97
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.0
|
98
|
+
rubygems_version: 2.2.0
|
114
99
|
signing_key:
|
115
100
|
specification_version: 4
|
116
101
|
summary: Blogengine based on rack applications
|
117
102
|
test_files: []
|
103
|
+
|