lucie 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +7 -67
- metadata +27 -20
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 619d03be479e1937fbbba26cf92dddcf34d2dc2b
|
4
|
+
data.tar.gz: b28e9e84b23e935afc5910ed67670b0afcf35fca
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7bece07a56d238ea67255a37a597ea4e7df220ac11e4664bbce23d0cac947e888f26f099d92cdbb2159f6f45c368cd2413463b1976342434d413177c9ac040fa
|
7
|
+
data.tar.gz: c4bd575bd1ee14530af6a7f83959866ce82d9d4fe7747cc3682539e725f86c4bacf3408ff6ac7dd05d5ba574c3576bfb80b20f6b298d3e15103df58c3a6d4490
|
data/README.md
CHANGED
@@ -1,76 +1,16 @@
|
|
1
|
-
# Lucie - Console Application Framework
|
1
|
+
# Lucie - Console Application Framework
|
2
2
|
|
3
|
-
|
3
|
+
## Description
|
4
4
|
|
5
|
-
|
5
|
+
You can find more info about this project [here](http://my.luc.ie/).
|
6
6
|
|
7
|
-
|
7
|
+
## Code status
|
8
8
|
|
9
|
-
|
9
|
+
[![Code Climate](https://api.travis-ci.org/Nucc/lucie.png)](https://travis-ci.org/Nucc/lucie)
|
10
10
|
|
11
|
-
|
11
|
+
[![Code Climate](https://codeclimate.com/github/Nucc/lucie.png)](https://codeclimate.com/github/Nucc/lucie)
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
<pre>
|
16
|
-
# /app/controllers/host_controller.rb:
|
17
|
-
class HostController < Controller::Base
|
18
|
-
mandatory "-d", "--domain", "Domain name of the host"
|
19
|
-
|
20
|
-
def create
|
21
|
-
mandatory "-s", "--server", "Hosting server"
|
22
|
-
|
23
|
-
@domain = params[:domain]
|
24
|
-
@server = ip_address(find_host(params[:server]))
|
25
|
-
|
26
|
-
Host.create!(:domain => {:_value => @domain, :server => @server)
|
27
|
-
|
28
|
-
template "nginx/vhost", :ssh, @server, "/etc/nginx/vhosts/#{domain}"
|
29
|
-
run "nginx -s reload", :on => @server
|
30
|
-
end
|
31
|
-
end
|
32
|
-
</pre>
|
33
|
-
|
34
|
-
Controller stores the new domain and its base host is in Host model. It uses the `nginx/vhost` template to generate a new configuration file on `@server` at `/etc/nginx/vhosts/#{domain}`. After configuration is generated it reloads nginx.
|
35
|
-
|
36
|
-
The host model is an XML configuration that looks like this:
|
37
|
-
|
38
|
-
<pre>
|
39
|
-
# /app/models/host.rb
|
40
|
-
class Host < XmlModel
|
41
|
-
root :configuration
|
42
|
-
|
43
|
-
Element :domain do
|
44
|
-
Attribute :server
|
45
|
-
end
|
46
|
-
end
|
47
|
-
</pre>
|
48
|
-
|
49
|
-
The root of `Host` is `:configuration`, so it will be under the `<configuration>` node. Domain is an xml element, server is its attribute, so the result will be this:
|
50
|
-
|
51
|
-
<pre>
|
52
|
-
<configuration>
|
53
|
-
<hosts>
|
54
|
-
<domain server='web1'>luc.ie</domain>
|
55
|
-
</hosts>
|
56
|
-
</configuration>
|
57
|
-
</pre>
|
58
|
-
|
59
|
-
The template defines an Nginx configuration. `HostController#create` applies this template and render its content on `@server` to `/etc/nginx/vhosts/luc.ie`.
|
60
|
-
|
61
|
-
<pre>
|
62
|
-
# /app/templates/nginx/vhost:
|
63
|
-
server {
|
64
|
-
listen 80;
|
65
|
-
server_name <%= @domain %>
|
66
|
-
|
67
|
-
location / {
|
68
|
-
root /var/www/<%= @domain %>
|
69
|
-
}
|
70
|
-
}
|
71
|
-
</pre>
|
72
|
-
|
73
|
-
So this would be a simple process in Lucie, if you're interested, let me know!
|
13
|
+
[![Coverage Status](https://coveralls.io/repos/Nucc/lucie/badge.png?branch=master)](https://coveralls.io/r/Nucc/lucie)
|
74
14
|
|
75
15
|
## Contributing
|
76
16
|
|
metadata
CHANGED
@@ -1,32 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lucie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Nucc
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-09-15 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: lucie-lib
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.0.4
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.0.4
|
14
27
|
- !ruby/object:Gem::Dependency
|
15
28
|
name: lucie-bin
|
16
29
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
30
|
requirements:
|
19
31
|
- - '='
|
20
32
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.0.
|
33
|
+
version: 0.0.4
|
22
34
|
type: :runtime
|
23
35
|
prerelease: false
|
24
36
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
37
|
requirements:
|
27
38
|
- - '='
|
28
39
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.0.
|
40
|
+
version: 0.0.4
|
30
41
|
description: Command line utility framework
|
31
42
|
email:
|
32
43
|
- nucc@bteam.hu
|
@@ -37,32 +48,28 @@ files:
|
|
37
48
|
- README.md
|
38
49
|
homepage: http://my.luc.ie
|
39
50
|
licenses: []
|
51
|
+
metadata: {}
|
40
52
|
post_install_message:
|
41
53
|
rdoc_options: []
|
42
54
|
require_paths:
|
43
55
|
- lib
|
44
56
|
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
-
none: false
|
46
57
|
requirements:
|
47
|
-
- -
|
58
|
+
- - '>='
|
48
59
|
- !ruby/object:Gem::Version
|
49
60
|
version: '0'
|
50
|
-
segments:
|
51
|
-
- 0
|
52
|
-
hash: 1759029910771884850
|
53
61
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
|
-
none: false
|
55
62
|
requirements:
|
56
|
-
- -
|
63
|
+
- - '>='
|
57
64
|
- !ruby/object:Gem::Version
|
58
65
|
version: '0'
|
59
|
-
segments:
|
60
|
-
- 0
|
61
|
-
hash: 1759029910771884850
|
62
66
|
requirements: []
|
63
67
|
rubyforge_project:
|
64
|
-
rubygems_version:
|
68
|
+
rubygems_version: 2.0.3
|
65
69
|
signing_key:
|
66
|
-
specification_version:
|
67
|
-
summary:
|
70
|
+
specification_version: 4
|
71
|
+
summary: Lucie is a console application framework like Rails for Ruby programmers
|
72
|
+
or Symfony for PHP developers. While these tools help the web developers in create
|
73
|
+
beautiful websites rapidly, there's no easy way to create complex console applications
|
74
|
+
like do this in Ruby on Rails. Lucie wants to bridge this gap.
|
68
75
|
test_files: []
|