flame_routes_toys 0.1.0 → 0.2.0

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: d1fd62ee5f5285a8cd4cb43e5bbae189a4e66afd94746b795d5cf62c4587d02d
4
- data.tar.gz: 24cb65ed1757108b6dab2370c265cdb85223d25ed42ca08b4cf93c420eabc79c
3
+ metadata.gz: 74ff2df23733d940f312add31468954cf5c5058fabc637b068f7d2e8c3266381
4
+ data.tar.gz: e354295f3526156558e0383a85252f6bbb4e4225d842631dea9658a2b8d48523
5
5
  SHA512:
6
- metadata.gz: e7336b346d13879f1bec73ac13e93159409ea819ddb2aac2f77bf0748e331a9e9a12b6c2d229695b0a9ad8ed92c24f6c0c6ef6f0981d50c9ef127756c26cd56c
7
- data.tar.gz: d1fa3efa6579947d5f58e366d9afab4da06fb3a6e238edc6c7827d3d6b024b7c7338685c7da123f5ed6d8ad9a7901a139f8ae200fe3369d8f58a438177c5e102
6
+ metadata.gz: b60c62e7d585cd44dba91b8ad850eff5b3cd368f7e77055312e306d9f887c74881513aa553711520eb0c8e1fcd3f3c40bd302ba8eb08502979009a515248b77d
7
+ data.tar.gz: 77e8fc7e14d06f1851d87f2437ff9faf3b8dbd3d493c3b2995e3110f64d0f937cd9b786a2c17e833d98377cac373bac012e525ebb7c8785d51871da428131c3a
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## master (unreleased)
4
4
 
5
+ ## 0.2.0 (2020-08-02)
6
+
5
7
  ## 0.1.0 (2020-07-12)
6
8
 
7
9
  * Initial release.
data/README.md CHANGED
@@ -34,8 +34,14 @@ gem install flame_routes_toys
34
34
  ## Usage
35
35
 
36
36
  ```ruby
37
+ ## .toys/.toys.rb
38
+
37
39
  require 'flame_routes_toys'
38
- expand FlameRoutesToys::Template, application: MyProject::Application
40
+ expand FlameRoutesToys::Template,
41
+ application_proc: (proc do
42
+ require_relative '../application'
43
+ MyProject::Application
44
+ end)
39
45
  ```
40
46
 
41
47
  ## Development
@@ -1,16 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'memery'
3
4
  require 'toys-core'
4
5
 
5
6
  module FlameRoutesToys
6
7
  ## Define toys for benchmark
7
8
  class Template
8
9
  include Toys::Template
10
+ include Memery
9
11
 
10
- attr_reader :application
12
+ def initialize(application_proc:)
13
+ @application_proc = application_proc
14
+ end
11
15
 
12
- def initialize(application:)
13
- @application = application
16
+ memoize def application
17
+ @application_proc.call
14
18
  end
15
19
 
16
20
  on_expand do |template|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FlameRoutesToys
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.0'
5
5
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flame_routes_toys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Popov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-11 00:00:00.000000000 Z
11
+ date: 2020-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: alt_memery
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: toys-core
15
29
  requirement: !ruby/object:Gem::Requirement