usmu 1.4.5-java → 1.4.6-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/usmu/ui/console.rb +3 -0
- data/lib/usmu/ui/rack_server.rb +12 -1
- data/lib/usmu/version.rb +1 -1
- data/usmu.gemspec +2 -0
- metadata +30 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c9377deab99581ee6e89e5e3e6cbceb98dd4026
|
4
|
+
data.tar.gz: 2187956b23b549261acc83724bcd9ef065fc72cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad2e7c2b5fb2905324c943c44bb034efb28dee02722ff77face6991dccf3d72fea75aa7ad14d1e83543cfdf4635d94fd009b576b3e5165a1d31b7084bd336e8e
|
7
|
+
data.tar.gz: 08f6ac384d00f0f50832cf727c82adda7ef658452de8e7d5df311d0a293c7fb076539ae401dba82b6eb042092bf95c6be5c4a2491042d1a7de00638d039fe8fd
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Usmu Change Log
|
2
2
|
|
3
|
+
## 1.4.6
|
4
|
+
|
5
|
+
Matthew Scharley <matt.scharley@gmail.com>
|
6
|
+
|
7
|
+
* Add dotenv (`.env`) support (dc0aac6f2719efcb9ccd96f28496ec526ec6d6f6)
|
8
|
+
* Add support for reloading configuration file during `usmu serve` (d66d02006e359b145e114fb68e29ae0985f46296)
|
9
|
+
|
3
10
|
## 1.4.5
|
4
11
|
|
5
12
|
Matthew Scharley <matt.scharley@gmail.com>
|
data/lib/usmu/ui/console.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'usmu'
|
2
2
|
require 'commander'
|
3
|
+
require 'dotenv'
|
3
4
|
|
4
5
|
module Usmu
|
5
6
|
module Ui
|
@@ -17,6 +18,8 @@ module Usmu
|
|
17
18
|
def initialize(args)
|
18
19
|
@log = Logging.logger[self]
|
19
20
|
initialize_logging args
|
21
|
+
@log.debug 'Loading environment variables.'
|
22
|
+
::Dotenv.load
|
20
23
|
Usmu.load_lazy_tilt_modules
|
21
24
|
@commander = initialize_commander(args)
|
22
25
|
|
data/lib/usmu/ui/rack_server.rb
CHANGED
@@ -1,16 +1,27 @@
|
|
1
|
+
require 'dotenv'
|
2
|
+
require 'listen'
|
1
3
|
|
2
4
|
module Usmu
|
3
5
|
module Ui
|
4
6
|
class RackServer
|
5
7
|
def initialize(configuration)
|
6
8
|
@log = Logging.logger[self]
|
9
|
+
@log.debug 'Loading environment variables.'
|
10
|
+
::Dotenv.load
|
7
11
|
@configuration = configuration
|
8
12
|
@index = configuration['serve', 'index', default: 'index.html']
|
13
|
+
|
14
|
+
config_filename = File.basename(@configuration.config_file)
|
15
|
+
config_listen = ::Listen.to(@configuration.config_dir, only: %r{#{::Regexp.escape config_filename}$}) do |modified, added, removed|
|
16
|
+
@log.info 'Usmu configuration changed, updating...'
|
17
|
+
@configuration = Usmu::Configuration.from_file(@configuration.config_file)
|
18
|
+
end
|
19
|
+
config_listen.start
|
9
20
|
end
|
10
21
|
|
11
22
|
def call(env)
|
12
23
|
generator = @configuration.generator
|
13
|
-
|
24
|
+
|
14
25
|
path = env['PATH_INFO'][1...env['PATH_INFO'].length]
|
15
26
|
@log.info "Received a request for: #{path}"
|
16
27
|
path = File.join(path, @index) if File.directory? File.join(@configuration.source_path, path)
|
data/lib/usmu/version.rb
CHANGED
data/usmu.gemspec
CHANGED
@@ -23,6 +23,8 @@ Gem::Specification.new do |spec|
|
|
23
23
|
|
24
24
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.2.0')
|
25
25
|
|
26
|
+
spec.add_dependency 'dotenv', '~> 2.1'
|
27
|
+
spec.add_dependency 'listen', '~> 3.0'
|
26
28
|
spec.add_dependency 'slim', '~> 3.0'
|
27
29
|
spec.add_dependency 'tilt', '~> 2.0'
|
28
30
|
spec.add_dependency 'rack', '~> 1.6'
|
metadata
CHANGED
@@ -1,15 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: usmu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.6
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Matthew Scharley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: dotenv
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: listen
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.0'
|
13
41
|
- !ruby/object:Gem::Dependency
|
14
42
|
name: slim
|
15
43
|
requirement: !ruby/object:Gem::Requirement
|