rack-blogengine 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
- ---
2
- SHA1:
3
- metadata.gz: b85e44aec9f30c3944e5feca09a34fb3aaaeb8bd
4
- data.tar.gz: 54907dc8238afedbf1cdfec83a1ef23fe43a1f95
5
- SHA512:
6
- metadata.gz: a3dfdf1ce30085b2ba4e3d3d0b4003fb3eda33535e8c1cdf4ec8b456f4a8a6b1dbd767ddc46ef096a37b56306ba5327b358b939ae47f00ab72ecb1751416f1ee
7
- data.tar.gz: 7abe2e621475eebd54e607724aa0c12203195ceb1a9c984f2c56c599a195abf5d7303bb2438710e4b750e3e9003d6676795a3b9045d967f8017e9568d5f36e58
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e1ac611f30d7558778b156825c66a1b65f8e77e3
4
+ data.tar.gz: 6b16217da824dde68105d447bb539b3c5366b62e
5
+ SHA512:
6
+ metadata.gz: 0df749ef6cddacf0c71664d84c0952e2c3cc03310b3100e1fd251ab5575fbd5e76b9199357ad07afc1c13baf7a98e32ecf63237f2b7e87d9d3ebedcedc502624
7
+ data.tar.gz: 30023202e69c94406b4c684f2eec763ec373348337d378c2dedd2dcbe1221cc94619ac7a01f33d565c43608f45ad7dddb8dfdddbaa5859c68fa7ae02be6ae14b
data/bin/rack-blogengine CHANGED
@@ -11,4 +11,9 @@ target = ARGV[1]
11
11
  target = "" if !ARGV[1]
12
12
 
13
13
  cli = Rack::Blogengine::CommandLineInterface.new
14
- cli.send(command, target)
14
+
15
+ if target != ""
16
+ cli.send(command, target)
17
+ else
18
+ cli.send(command)
19
+ end
@@ -1,6 +1,7 @@
1
1
  require 'rack'
2
2
  #require 'rack/attack'
3
3
  require 'rack/blogengine'
4
+ require 'yaml'
4
5
 
5
6
  module Rack
6
7
  module Blogengine
@@ -17,6 +18,7 @@ module Rack
17
18
  # Method to run the cli command
18
19
  # @param [String] target
19
20
  def run(target)
21
+
20
22
  unless target.empty?
21
23
  if target.include?("/")
22
24
  target = target.dup
@@ -25,7 +27,9 @@ module Rack
25
27
 
26
28
  if Dir.exists?("#{target}")
27
29
  system("cd #{target}")
30
+
28
31
  $targetfolder = "#{Dir.pwd}/#{target}"
32
+ config = YAML::load(::File.open("#{$targetfolder}/config.yml"))
29
33
  app = Rack::Builder.new do
30
34
  use Rack::CommonLogger
31
35
  use Rack::ShowExceptions
@@ -37,7 +41,10 @@ module Rack
37
41
  run Rack::Blogengine::Application
38
42
  end
39
43
 
40
- Rack::Server.start( :app => app, :Port => 3000 )
44
+
45
+ port = config["Port"];
46
+ server = config["Server"];
47
+ Rack::Server.start( :app => app, :Port => port, :server => server )
41
48
  else
42
49
  puts "Target is not a folder!"
43
50
  end
@@ -52,6 +59,10 @@ module Rack
52
59
  puts "Generating folder skeleton"
53
60
  system("mkdir #{folder} && mkdir #{folder}/assets && mkdir #{folder}/assets/layout && mkdir #{folder}/assets/js && mkdir #{folder}/assets/style && mkdir #{folder}/assets/images")
54
61
  end
62
+
63
+ def version?
64
+ puts Rack::Blogengine::VERSION
65
+ end
55
66
  end
56
67
  end
57
68
  end
@@ -26,6 +26,7 @@ module Rack
26
26
  documents << @document
27
27
  end
28
28
 
29
+ # Has to exec operator after all docs were read, so documents are available for operators (list all docs, etc...)
29
30
  documents.each do |document|
30
31
  document.exec_content_operator(documents, @target)
31
32
  end
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module Blogengine
3
- VERSION = "0.1.4".freeze
3
+ VERSION = "0.1.5".freeze
4
4
  end
5
- end
5
+ end
metadata CHANGED
@@ -1,66 +1,80 @@
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.4
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.5
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - Benny1992
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
-
12
- date: 2014-01-07 00:00:00 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- prerelease: false
11
+ date: 2014-01-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
16
14
  name: bundler
17
- version_requirements: &id001 !ruby/object:Gem::Requirement
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
21
- version: "1.3"
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
22
20
  type: :development
23
- requirement: *id001
24
- - !ruby/object:Gem::Dependency
25
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
26
28
  name: rake
27
- version_requirements: &id002 !ruby/object:Gem::Requirement
28
- requirements:
29
- - &id004
30
- - ">="
31
- - !ruby/object:Gem::Version
32
- version: "0"
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
33
34
  type: :development
34
- requirement: *id002
35
- - !ruby/object:Gem::Dependency
36
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
37
42
  name: rspec
38
- version_requirements: &id003 !ruby/object:Gem::Requirement
39
- requirements:
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
40
45
  - - ">="
41
- - !ruby/object:Gem::Version
46
+ - !ruby/object:Gem::Version
42
47
  version: 2.0.0
43
48
  type: :development
44
- requirement: *id003
45
- - !ruby/object:Gem::Dependency
46
49
  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
47
56
  name: rack
48
- version_requirements: &id005 !ruby/object:Gem::Requirement
49
- requirements:
50
- - *id004
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
51
62
  type: :runtime
52
- requirement: *id005
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
53
69
  description: Blogengine based on rack applications
54
- email:
70
+ email:
55
71
  - klotz.benjamin@yahoo.de
56
- executables:
72
+ executables:
57
73
  - rack-blogengine
58
74
  extensions: []
59
-
60
75
  extra_rdoc_files: []
61
-
62
- files:
63
- - .gitignore
76
+ files:
77
+ - ".gitignore"
64
78
  - Gemfile
65
79
  - LICENSE.txt
66
80
  - README.md
@@ -75,29 +89,29 @@ files:
75
89
  - lib/rack/blogengine/operator.rb
76
90
  - lib/rack/blogengine/version.rb
77
91
  - rack-blogengine.gemspec
78
- homepage: ""
79
- licenses:
92
+ homepage: ''
93
+ licenses:
80
94
  - MIT
81
95
  metadata: {}
82
-
83
96
  post_install_message:
84
97
  rdoc_options: []
85
-
86
- require_paths:
98
+ require_paths:
87
99
  - lib
88
100
  - spec
89
- required_ruby_version: !ruby/object:Gem::Requirement
90
- requirements:
91
- - *id004
92
- required_rubygems_version: !ruby/object:Gem::Requirement
93
- requirements:
94
- - *id004
101
+ required_ruby_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
95
111
  requirements: []
96
-
97
112
  rubyforge_project:
98
- rubygems_version: 2.2.0
113
+ rubygems_version: 2.2.0.rc.1
99
114
  signing_key:
100
115
  specification_version: 4
101
116
  summary: Blogengine based on rack applications
102
117
  test_files: []
103
-