sombrero 0.0.8 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/base/api/.ignore +0 -0
- data/app/base/load.rb +0 -0
- data/app/base/rtcp_controller.rb +4 -4
- data/app/config/config.rb +0 -2
- data/app/config/config.yml +3 -2
- data/app/core/Gemfile +1 -1
- data/app/core/boot.rb +3 -4
- data/app/core/generate_controllers_map.rb +3 -0
- data/app/core/generate_webpack_setup.rb +3 -0
- data/app/core/load.rb +6 -4
- data/app/core/load_controllers.rb +1 -2
- data/app/generators/api/.ignore +0 -0
- data/app/public/.ignore +0 -0
- data/app/webpack.config.js +4 -3
- data/lib/sombrero.rb +2 -2
- data/lib/sombrero/cli.rb +3 -0
- data/lib/sombrero/cli/app/install.rb +5 -0
- data/lib/sombrero/rtcp_controller.rb +19 -7
- data/lib/sombrero/version.rb +3 -0
- data/sombrero.gemspec +3 -4
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 728b3df0b0b89665e7e5fec06812414d325ce620
|
4
|
+
data.tar.gz: b998ce6174285cb33b7341de46fa544b51570e45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6c9fa48d4bf329d99bd65de7fa29b4a448e47714bc821ed0e92a0b421419fca3736346a19a8631d327142770355295ddc0402bb719b58cbc13a5e3047d5492b
|
7
|
+
data.tar.gz: f2764813e9c382d4c902e791c6c1702343ee09aba12f4db7b2f21e1f50b8af9fae55100f6beabd65ad13f073b7ba303c9a2246385abd8fad1b007ff73eb73aa5
|
File without changes
|
data/app/base/load.rb
ADDED
File without changes
|
data/app/base/rtcp_controller.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
class RTCPController <
|
2
|
-
map Cfg.baseurl
|
1
|
+
class RTCPController < Sombrero::RTCPController
|
2
|
+
map File.join(Cfg.baseurl, '__rtcp__')
|
3
3
|
|
4
4
|
private
|
5
|
-
# called after socket connection established
|
5
|
+
# called after socket connection established
|
6
6
|
def connected
|
7
7
|
end
|
8
8
|
|
9
|
-
# data sent to client after connection established
|
9
|
+
# data sent to client after connection established
|
10
10
|
def initialization_data
|
11
11
|
{}
|
12
12
|
end
|
data/app/config/config.rb
CHANGED
data/app/config/config.yml
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
# module SystemRequiredConfigs # Do NOT Remove!
|
2
2
|
baseurl: /
|
3
3
|
app:
|
4
|
-
|
4
|
+
baseurl:
|
5
5
|
development: /app
|
6
6
|
production: /app
|
7
|
-
|
7
|
+
# relative to webpack.config.js
|
8
|
+
path: ./public
|
8
9
|
# end
|
9
10
|
|
10
11
|
# put here configs that will be the same on all environments.
|
data/app/core/Gemfile
CHANGED
data/app/core/boot.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# do NOT edit this file, edit base/boot.rb instead
|
2
|
+
|
3
|
+
require 'yaml'
|
3
4
|
|
4
5
|
Dir.chdir File.expand_path('../..', __FILE__) do
|
5
6
|
require './base/boot'
|
@@ -12,6 +13,4 @@ Dir.chdir File.expand_path('../..', __FILE__) do
|
|
12
13
|
|
13
14
|
require './base/helpers/application_helpers'
|
14
15
|
Dir['./base/helpers/**/*.rb'].each {|f| require(f)}
|
15
|
-
|
16
|
-
require './base/load'
|
17
16
|
end
|
data/app/core/load.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
#
|
2
|
-
# edit base/load.rb instead.
|
1
|
+
# do NOT edit this file, edit base/load.rb instead
|
3
2
|
|
4
|
-
|
5
|
-
|
3
|
+
%w[
|
4
|
+
boot
|
5
|
+
../base/load
|
6
|
+
load_controllers
|
7
|
+
].each {|f| require File.expand_path("../#{f}", __FILE__)}
|
File without changes
|
data/app/public/.ignore
ADDED
File without changes
|
data/app/webpack.config.js
CHANGED
@@ -16,9 +16,9 @@ console.log(JSON.stringify(setup, null, 2))
|
|
16
16
|
module.exports = {
|
17
17
|
entry: setup.entries,
|
18
18
|
output: {
|
19
|
-
path: [setup.path, setup.
|
19
|
+
path: [setup.path, setup.baseurl].join('/'),
|
20
20
|
filename: '[name].js',
|
21
|
-
publicPath: setup.
|
21
|
+
publicPath: setup.baseurl + '/', // trailing slash required
|
22
22
|
libraryTarget: 'commonjs2'
|
23
23
|
},
|
24
24
|
module: {
|
@@ -39,7 +39,8 @@ module.exports = {
|
|
39
39
|
resolve: {
|
40
40
|
extensions: ['', '.js', '.css', '.json', '.coffee', '.html'],
|
41
41
|
alias: {
|
42
|
-
|
42
|
+
app: __dirname,
|
43
|
+
base: 'app/base',
|
43
44
|
api: 'base/api',
|
44
45
|
}
|
45
46
|
},
|
data/lib/sombrero.rb
CHANGED
@@ -89,8 +89,8 @@ module Sombrero
|
|
89
89
|
|
90
90
|
File.open File.expand_path('webpack_setup.json', dir), 'w' do |f|
|
91
91
|
f << {
|
92
|
-
path: config[:app][:
|
93
|
-
|
92
|
+
path: config[:app][:path],
|
93
|
+
baseurl: config[:app][:baseurl][:development],
|
94
94
|
entries: entries
|
95
95
|
}.to_json
|
96
96
|
end
|
data/lib/sombrero/cli.rb
CHANGED
@@ -2,6 +2,7 @@ require 'fileutils'
|
|
2
2
|
require 'pathname'
|
3
3
|
require 'yaml'
|
4
4
|
require 'pty'
|
5
|
+
require 'sombrero/version'
|
5
6
|
require 'sombrero/cli/helpers'
|
6
7
|
require 'sombrero/cli/assertions'
|
7
8
|
|
@@ -20,6 +21,8 @@ module Sombrero
|
|
20
21
|
generator(args)
|
21
22
|
when 'd', 'docker'
|
22
23
|
docker(args)
|
24
|
+
when 'v', '-v', '--version'
|
25
|
+
puts Sombrero::VERSION
|
23
26
|
when nil, '-h', '--help'
|
24
27
|
usage
|
25
28
|
else
|
@@ -14,6 +14,7 @@ module Sombrero
|
|
14
14
|
def install dir, working_dir_opted
|
15
15
|
src = working_dir_opted ? BASE_DIR.to_path + '/.' : BASE_DIR
|
16
16
|
FileUtils.cp_r(src, dir)
|
17
|
+
cleanup(dir)
|
17
18
|
end
|
18
19
|
|
19
20
|
def add_namespace dir, namespace
|
@@ -31,6 +32,10 @@ module Sombrero
|
|
31
32
|
end
|
32
33
|
end
|
33
34
|
|
35
|
+
def cleanup dir
|
36
|
+
Dir[dir / "**/.ignore"].each {|f| FileUtils.rm_f(f)}
|
37
|
+
end
|
38
|
+
|
34
39
|
end
|
35
40
|
end
|
36
41
|
end
|
@@ -20,13 +20,7 @@ module Sombrero
|
|
20
20
|
|
21
21
|
def on_open
|
22
22
|
connected
|
23
|
-
write(serial: 0, data: initialization_data
|
24
|
-
end
|
25
|
-
|
26
|
-
def __initialization_data__
|
27
|
-
{
|
28
|
-
app_url: Cfg.app[:url][RocketIO.environment] || Cfg.app[:url][:development]
|
29
|
-
}
|
23
|
+
write(serial: 0, data: initialization_data)
|
30
24
|
end
|
31
25
|
|
32
26
|
def on_message msg
|
@@ -81,5 +75,23 @@ module Sombrero
|
|
81
75
|
def write data
|
82
76
|
@socket.send_data(data.to_json)
|
83
77
|
end
|
78
|
+
|
79
|
+
# called after socket connection established
|
80
|
+
def connected
|
81
|
+
end
|
82
|
+
|
83
|
+
# data sent to client after connection established
|
84
|
+
def initialization_data
|
85
|
+
{}
|
86
|
+
end
|
87
|
+
|
88
|
+
# merged into original env when calling a controller
|
89
|
+
def rtcp_env
|
90
|
+
{}
|
91
|
+
end
|
92
|
+
|
93
|
+
# called when socket connection closed
|
94
|
+
def disconnected
|
95
|
+
end
|
84
96
|
end
|
85
97
|
end
|
data/sombrero.gemspec
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
# coding: utf-8
|
2
|
+
require File.expand_path('../lib/sombrero/version', __FILE__)
|
2
3
|
|
3
4
|
Gem::Specification.new do |spec|
|
4
|
-
spec.name
|
5
|
-
|
6
|
-
0.0.8
|
7
|
-
]
|
5
|
+
spec.name = 'sombrero'
|
6
|
+
spec.version = Sombrero::VERSION
|
8
7
|
spec.authors = ['Slee Woo']
|
9
8
|
spec.email = ['mail@sleewoo.com']
|
10
9
|
spec.summary = [spec.name, spec.version]*'-',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sombrero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Slee Woo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rocketio
|
@@ -52,9 +52,11 @@ files:
|
|
52
52
|
- app/.pryrc
|
53
53
|
- app/Gemfile
|
54
54
|
- app/Rakefile
|
55
|
+
- app/base/api/.ignore
|
55
56
|
- app/base/base_controller.rb
|
56
57
|
- app/base/boot.rb
|
57
58
|
- app/base/helpers/application_helpers.rb
|
59
|
+
- app/base/load.rb
|
58
60
|
- app/base/load_controllers.rb
|
59
61
|
- app/base/rtcp_controller.rb
|
60
62
|
- app/config.ru
|
@@ -70,7 +72,9 @@ files:
|
|
70
72
|
- app/core/generate_webpack_setup.rb
|
71
73
|
- app/core/load.rb
|
72
74
|
- app/core/load_controllers.rb
|
75
|
+
- app/generators/api/.ignore
|
73
76
|
- app/package.json
|
77
|
+
- app/public/.ignore
|
74
78
|
- app/webpack.config.js
|
75
79
|
- bin/sombrero
|
76
80
|
- docker/Dockerfile
|
@@ -99,6 +103,7 @@ files:
|
|
99
103
|
- lib/sombrero/cli/generator.rb
|
100
104
|
- lib/sombrero/cli/helpers.rb
|
101
105
|
- lib/sombrero/rtcp_controller.rb
|
106
|
+
- lib/sombrero/version.rb
|
102
107
|
- sombrero.gemspec
|
103
108
|
homepage: https://github.com/sleewoo/sombrero
|
104
109
|
licenses:
|
@@ -123,5 +128,5 @@ rubyforge_project:
|
|
123
128
|
rubygems_version: 2.5.1
|
124
129
|
signing_key:
|
125
130
|
specification_version: 4
|
126
|
-
summary: '["sombrero-0.0
|
131
|
+
summary: '["sombrero-0.1.0", "Opinionated stack for building opinionated web applications"]'
|
127
132
|
test_files: []
|