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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f9b693bb96f596489d005f216b74b220daf4282
4
- data.tar.gz: 615892bd318a3adb4c0ead677158382c7ede7e90
3
+ metadata.gz: 3c9377deab99581ee6e89e5e3e6cbceb98dd4026
4
+ data.tar.gz: 2187956b23b549261acc83724bcd9ef065fc72cd
5
5
  SHA512:
6
- metadata.gz: 35cb3946a721b3ffb23c7f578aa7d5282f9fa0188b353f1408cb34a72b3c5fa0b0b4921e92c7a407f311059f24e70c2a04a2ce8bb905d223aeff3fa68071a559
7
- data.tar.gz: f28b325824d08395859092ae3689d5442f4f591f43a8df6490e4a915c0ca3ac7458536728c61699075ef459659b07e5f0acc897f356c4f96f4c1f52d2f3f6353
6
+ metadata.gz: ad2e7c2b5fb2905324c943c44bb034efb28dee02722ff77face6991dccf3d72fea75aa7ad14d1e83543cfdf4635d94fd009b576b3e5165a1d31b7084bd336e8e
7
+ data.tar.gz: 08f6ac384d00f0f50832cf727c82adda7ef658452de8e7d5df311d0a293c7fb076539ae401dba82b6eb042092bf95c6be5c4a2491042d1a7de00638d039fe8fd
@@ -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>
@@ -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
 
@@ -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)
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Usmu
3
3
  # The current version string for the gem
4
- VERSION = '1.4.5'
4
+ VERSION = '1.4.6'
5
5
  end
@@ -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.5
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-02 00:00:00.000000000 Z
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