armstrong 0.2.4 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/armstrong.gemspec +2 -1
- data/bin/armstrong +70 -0
- metadata +7 -6
data/armstrong.gemspec
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
-
Gem::Specification.new 'armstrong', '0.2.
|
1
|
+
Gem::Specification.new 'armstrong', '0.2.6' do |s|
|
2
2
|
s.description = "Armstrong is an Mongrel2 fronted, actor-based web development framework similar in style to sinatra. With natively-threaded interpreters (Rubinius2), Armstrong provides true concurrency and high stability, by design."
|
3
3
|
s.summary = "Highly concurrent, sinatra-like framework"
|
4
4
|
s.author = "Artem Titoulenko"
|
5
5
|
s.email = "artem.titoulenko@gmail.com"
|
6
6
|
s.homepage = "https://www.github.com/artemtitoulenko/armstrong"
|
7
7
|
s.files = `git ls-files`.split("\n") - %w[.gitignore .travis.yml response_benchmark.rb demo/config.sqlite]
|
8
|
+
s.executables = %w[ armstrong ]
|
8
9
|
|
9
10
|
s.add_dependency 'ffi', '~> 1.0', '>= 1.0.10'
|
10
11
|
s.add_dependency 'ffi-rzmq', '~> 0.9', '>= 0.9.0'
|
data/bin/armstrong
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'fileutils'
|
4
|
+
include FileUtils
|
5
|
+
|
6
|
+
# this is a cli tool to make getting running with armstrong easier.
|
7
|
+
def inform
|
8
|
+
puts """
|
9
|
+
Armstrong is an asynchronous ruby web framework that's fronted by mongrel2
|
10
|
+
and makes use of Actors in order to handle requests. It is preferred to use
|
11
|
+
rubinius2.0.0dev in order to take advantage of true concurrency in Ruby.
|
12
|
+
|
13
|
+
usage: armstrong <command>
|
14
|
+
|
15
|
+
commands:
|
16
|
+
create <name> Creates an armstrong app with a sample mongrel2.conf and config.sqlite
|
17
|
+
"""
|
18
|
+
end
|
19
|
+
|
20
|
+
port = 6767
|
21
|
+
|
22
|
+
mongrel2_conf = """
|
23
|
+
armstrong_handler = Handler(
|
24
|
+
send_spec='tcp://127.0.0.1:9999',
|
25
|
+
send_ident='34f9ceee-cd52-4b7f-b197-88bf2f0ec378',
|
26
|
+
recv_spec='tcp://127.0.0.1:9998',
|
27
|
+
recv_ident='')
|
28
|
+
|
29
|
+
media_dir = Dir(
|
30
|
+
base='media/',
|
31
|
+
index_file='index.html',
|
32
|
+
default_ctype='text/plain')
|
33
|
+
|
34
|
+
armstrong_host = Host(
|
35
|
+
name=\"localhost\",
|
36
|
+
routes={
|
37
|
+
'/media/': media_dir,
|
38
|
+
'/': armstrong_handler})
|
39
|
+
|
40
|
+
armstrong_serv = Server(
|
41
|
+
uuid=\"%s\",
|
42
|
+
access_log=\"/log/mongrel2.access.log\",
|
43
|
+
error_log=\"/log/mongrel2.error.log\",
|
44
|
+
chroot=\"./\",
|
45
|
+
default_host=\"localhost\",
|
46
|
+
name=\"armstrong test\",
|
47
|
+
pid_file=\"/run/mongrel2.pid\",
|
48
|
+
port=%i,
|
49
|
+
hosts = [armstrong_host]
|
50
|
+
)
|
51
|
+
|
52
|
+
settings = {\"zeromq.threads\": 2, \"limits.min_ping\": 15, \"limits.kill_limit\": 2}
|
53
|
+
|
54
|
+
servers = [armstrong_serv]
|
55
|
+
"""
|
56
|
+
|
57
|
+
inform if ARGV.empty?
|
58
|
+
|
59
|
+
case ARGV[0]
|
60
|
+
when 'create'
|
61
|
+
inform if ARGV[1].nil?
|
62
|
+
mkdir ARGV[1]
|
63
|
+
cd ARGV[1]
|
64
|
+
%w[log run tmp].map(&method(:mkdir))
|
65
|
+
File.open("mongrel2.conf", 'w') {|file| file.puts(mongrel2_conf % [`m2sh uuid`.chomp, port]) }
|
66
|
+
puts "loading in the mongrel2.conf config"
|
67
|
+
puts `m2sh load -config mongrel2.conf -db config.sqlite`
|
68
|
+
File.open("#{ARGV[1]}.rb", 'w') {|file| file.puts "require 'rubygems'\nrequire 'armstrong'\n\n"}
|
69
|
+
puts "Created app #{ARGV[1]} that will run on port #{port}"
|
70
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: armstrong
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1408122028129865489
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 6
|
10
|
+
version: 0.2.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Artem Titoulenko
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-11-
|
18
|
+
date: 2011-11-16 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: ffi
|
@@ -81,8 +81,8 @@ dependencies:
|
|
81
81
|
version_requirements: *id003
|
82
82
|
description: Armstrong is an Mongrel2 fronted, actor-based web development framework similar in style to sinatra. With natively-threaded interpreters (Rubinius2), Armstrong provides true concurrency and high stability, by design.
|
83
83
|
email: artem.titoulenko@gmail.com
|
84
|
-
executables:
|
85
|
-
|
84
|
+
executables:
|
85
|
+
- armstrong
|
86
86
|
extensions: []
|
87
87
|
|
88
88
|
extra_rdoc_files: []
|
@@ -92,6 +92,7 @@ files:
|
|
92
92
|
- README.md
|
93
93
|
- Rakefile
|
94
94
|
- armstrong.gemspec
|
95
|
+
- bin/armstrong
|
95
96
|
- demo/armstrong_test.rb
|
96
97
|
- demo/mongrel2.conf
|
97
98
|
- lib/armstrong.rb
|