nimbu 0.7.8 → 0.7.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nimbu/command/server.rb +19 -5
- data/lib/nimbu/server/base.rb +6 -0
- data/lib/nimbu/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d7d01bb99d406ca5718d7144a86ac847e1dd406
|
4
|
+
data.tar.gz: b20d6a92f23e1d3e35d2be2497f0ac4afaf05484
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba5804f0fbf643a933a7c108f8957e0c5c9de0cd5254f31ac552adadcd6fe2790ef114df0421f82de6f72b88e91234805436cfe9c49bc64b5b9575c394075031
|
7
|
+
data.tar.gz: 0d4299b4d55489ce381b8dcc3ba0f997716e38a1b8af08580a186e79edb2ee72193df512dbb3890c76a37b3565090029cacea4e88108dfb4b3eed43eb8e0bc3b
|
data/lib/nimbu/command/server.rb
CHANGED
@@ -12,11 +12,13 @@ class Nimbu::Command::Server < Nimbu::Command::Base
|
|
12
12
|
#
|
13
13
|
# starts a local development server, using the data from the Nimbu cloud in real time.
|
14
14
|
#
|
15
|
-
# -p PORT, --port PORT
|
16
|
-
# -h, --haml
|
17
|
-
# -c, --compass
|
18
|
-
# -d, --debug
|
19
|
-
# --
|
15
|
+
# -p PORT, --port PORT # set the port on which to start the http server
|
16
|
+
# -h, --haml # start local HAML watcher
|
17
|
+
# -c, --compass # start local Compass watcher
|
18
|
+
# -d, --debug # enable debugging output
|
19
|
+
# --webpack RES # comma separated list of webpack resources (relative to /javascripts)
|
20
|
+
# --webpackurl URL # proxy requests for webpack resources to the given URL prefix (default: http://localhost:8080)
|
21
|
+
# --nocookies # disable session refresh cookie check
|
20
22
|
#
|
21
23
|
def index
|
22
24
|
# Check if config file is present?
|
@@ -27,11 +29,22 @@ class Nimbu::Command::Server < Nimbu::Command::Base
|
|
27
29
|
with_haml = options[:haml]
|
28
30
|
with_compass = options[:compass] || options[:c]
|
29
31
|
no_cookies = options[:nocookies]
|
32
|
+
webpack_resources = options[:webpack]
|
33
|
+
webpack_url = options[:webpackurl]
|
30
34
|
|
31
35
|
if no_cookies
|
32
36
|
Nimbu.cli_options[:nocookies] = true
|
33
37
|
end
|
34
38
|
|
39
|
+
if webpack_resources
|
40
|
+
Nimbu.cli_options[:webpack_resources] = webpack_resources.split(",").map(&:strip)
|
41
|
+
if webpack_url
|
42
|
+
Nimbu.cli_options[:webpack_url] = webpack_url
|
43
|
+
else
|
44
|
+
Nimbu.cli_options[:webpack_url] = "http://localhost:8080"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
35
48
|
if with_compass
|
36
49
|
require 'compass'
|
37
50
|
require 'compass/exec'
|
@@ -47,6 +60,7 @@ class Nimbu::Command::Server < Nimbu::Command::Base
|
|
47
60
|
title = "Starting up Nimbu Server"
|
48
61
|
title << " (with local #{services.join(' and ')} watcher)" if with_compass || with_haml
|
49
62
|
title << " (skipping cookies check)" if no_cookies
|
63
|
+
title << " (proxying webpack resources to #{Nimbu.cli_options[:webpack_url]})" if webpack_resources
|
50
64
|
title << " ..."
|
51
65
|
puts white("\n#{title}")
|
52
66
|
puts green(nimbu_header)
|
data/lib/nimbu/server/base.rb
CHANGED
@@ -29,6 +29,8 @@ module Nimbu
|
|
29
29
|
use Rack::StreamingProxy::Proxy do |request|
|
30
30
|
if request.path.start_with?('/favicon.ico')
|
31
31
|
"http://#{Nimbu::Auth.site}.#{Nimbu::Auth.admin_host}/favicon.ico"
|
32
|
+
elsif Nimbu.cli_options[:webpack_url] && webpack_resource?(request.path)
|
33
|
+
"#{Nimbu.cli_options[:webpack_url]}#{request.path}"
|
32
34
|
end
|
33
35
|
end
|
34
36
|
|
@@ -189,6 +191,10 @@ module Nimbu
|
|
189
191
|
end
|
190
192
|
end
|
191
193
|
|
194
|
+
def self.webpack_resource?(path)
|
195
|
+
path =~ /\/javascripts\// && Nimbu.cli_options[:webpack_resources].include?(path.gsub("/javascripts/", ""))
|
196
|
+
end
|
197
|
+
|
192
198
|
end
|
193
199
|
end
|
194
200
|
end
|
data/lib/nimbu/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nimbu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zenjoy BVBA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: term-ansicolor
|
@@ -311,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
311
311
|
version: '0'
|
312
312
|
requirements: []
|
313
313
|
rubyforge_project:
|
314
|
-
rubygems_version: 2.4.
|
314
|
+
rubygems_version: 2.4.6
|
315
315
|
signing_key:
|
316
316
|
specification_version: 4
|
317
317
|
summary: Client library and CLI to design websites on the Nimbu platform.
|