lono 7.2.0 → 7.2.1

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
  SHA256:
3
- metadata.gz: f556c131b651401e05e951dfd499f98bbcfb01e8e3dc912e2b4d3ec128068f93
4
- data.tar.gz: fbc95989d2f2b84cdd8be923c91e05cb002a987050990e932f4355b8689eb058
3
+ metadata.gz: c17c7945bfc25050f4bba832aa84181fa3dbe5936b7091dbb9e229439ee791e7
4
+ data.tar.gz: 9e70a07cf9b49154af4c35895e9168a8b044aeed73ed9ffab19d648727a2f5aa
5
5
  SHA512:
6
- metadata.gz: 6f26e2d765057d328e0c92888c7063a5e849770787928910c0e437a342260fd6e06a11e0d83688d37ab32fb4b22c4c04ccfbed452adecd19c7c7a51e77e333db
7
- data.tar.gz: 801b6151a8a7635b94db55937bb387d00dabff728f3dd49a681201752b7a18664fae0508fdaf38d9e64ef9b53af89fe6437cf82f4f7a7417dad0728c817210bc
6
+ metadata.gz: e8d2c8de40d9b10801fad58420696d8bc0ce40d831b84bd2d9a060c25295c8a0eba29084a12071c96c5347366811581ebc8004319b07be2049f6cc8811f12ca0
7
+ data.tar.gz: '08fcdb268f588cf77f16c4c684940727533665c00e868a1f1c6251325a974987c92feeb68983e105288b21d47ff3db14bdad61e10a9fa84d66793f20b4e1dd07'
@@ -3,6 +3,9 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [7.2.1]
7
+ - #51 fix extensions helpers loading and cleanup
8
+
6
9
  ## [7.2.0]
7
10
  - #48 fix codebuild and circleci
8
11
  - #49 lono extensions
@@ -1,16 +1,17 @@
1
1
  class Lono::Extensions
2
- class Loader < Lono::AbstractBase
2
+ module Loader
3
3
  include Lono::Template::Context::Loader::LoadFiles
4
4
 
5
- def run
5
+ def load_all_extension_helpers
6
6
  Lono::Jade::Registry.tracked_extensions.each do |registry|
7
7
  load_extension_helpers(registry)
8
8
  end
9
9
  end
10
10
 
11
11
  def load_extension_helpers(registry)
12
- root = find_root(registry)
12
+ root = find_extensions_root_path(registry)
13
13
  helpers_path = "#{root}/lib/#{registry.name}/helpers"
14
+
14
15
  load_files(helpers_path)
15
16
  end
16
17
 
@@ -19,14 +20,10 @@ class Lono::Extensions
19
20
  # 2. normal gem
20
21
  # 3. materialized gem
21
22
  #
22
- def find_root(registry)
23
- jadespec = finder.find(registry.name)
23
+ def find_extensions_root_path(registry)
24
+ @finder ||= Lono::Finder::Extension.new
25
+ jadespec = @finder.find(registry.name)
24
26
  jadespec.root
25
27
  end
26
-
27
- def finder
28
- Lono::Finder::Extension.new
29
- end
30
- memoize :finder
31
28
  end
32
29
  end
@@ -3,14 +3,13 @@ class Lono::Extensions
3
3
  def initialize(options={})
4
4
  super
5
5
  @register = Register.new(options)
6
- @loader = Loader.new(options)
7
6
  end
8
7
 
9
8
  def run
10
9
  @register.run
11
10
  materialize
12
- # no need to validate because bundler will fail to install extension earlier and is a form of "validation already"
13
- @loader.run
11
+ # loading happens in Lono::Extensions::Loader load_all_extension_helpers module
12
+ # so it has the proper self.class include scope
14
13
  end
15
14
 
16
15
  def materialize
@@ -2,6 +2,7 @@ class Lono::Template::Strategy::Dsl
2
2
  class Builder
3
3
  include Lono::Template::Util
4
4
  include Lono::Template::Context::Loader
5
+ include Lono::Extensions::Loader
5
6
 
6
7
  include Syntax
7
8
  extend Memoist
@@ -27,6 +28,7 @@ class Lono::Template::Strategy::Dsl
27
28
  # load_extensions and evaluate extend_with methods earlier than load_context so project helpers can override extensions
28
29
  def load_extensions # evaluates extend_with
29
30
  Lono::Extensions::Preparer.new(@options).run
31
+ load_all_extension_helpers # after Extensions::Preparer#run
30
32
  end
31
33
 
32
34
  def finalize
@@ -1,3 +1,3 @@
1
1
  module Lono
2
- VERSION = "7.2.0"
2
+ VERSION = "7.2.1"
3
3
  end
@@ -1,4 +1,4 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- # Specify your gem's dependencies in ecs-asg.gemspec
3
+ # Specify your gem's dependencies in the gemspec file
4
4
  gemspec
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lono
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.2.0
4
+ version: 7.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-23 00:00:00.000000000 Z
11
+ date: 2020-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport