express_templates 0.11.16 → 0.11.17

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: 465c9bcf84550cd605762fa987f8f21a1880082a
4
- data.tar.gz: 1285bc76a58d0279bd620c0e3b3044ad1f050634
3
+ metadata.gz: 2657456072d4ef3e2bdefa7a90aeb4d0661513c3
4
+ data.tar.gz: e4061750733bb15e0bbfe68cf379d2ac102fc742
5
5
  SHA512:
6
- metadata.gz: 1a6706d87535f5ea465bb8216842dcb665ab767cfc779aaa3c0a26ec929c54702b0f91bcc8fa80893e6cba600f9ae03e859b3a63a38a1fb8d5f1469c4ac299f0
7
- data.tar.gz: f55e913bd2c5c97c1d1130f7d9f50d954d7b68855f4297c7a7bb4b074cfa4396dbe30cfd92e5813b124511206cae7c12d4ce14ceac84a14a82d5b51c693dc7a6
6
+ metadata.gz: 8c012d5ab9d10634ed9904c0d0ea6015a68df9c96769b54080268036b0f39d1d0e4b99d79fe3cff7cb6815e43c173281b7c287bf7eb105f28b71d21ed42ecfee
7
+ data.tar.gz: 8839b0c6effbafb74e1cedc7624f51daa05e8ce81f062523baf1954a9a31565942ca8232af617a90668328d37c18142db57b1579cdc178f5701a21d0013b7634
@@ -14,6 +14,8 @@ module ExpressTemplates
14
14
  # An ET component may adopt other capabilities (e.g. support RESTful options).
15
15
  class Base < Arbre::Component
16
16
 
17
+ MAP = {}
18
+
17
19
  class_attribute :before_build_hooks
18
20
  self.before_build_hooks = []
19
21
 
@@ -52,6 +54,7 @@ module ExpressTemplates
52
54
  #
53
55
  # @param Class klass
54
56
  def self.builder_method_and_class(method_name, klass)
57
+ ExpressTemplates::Components::Registry[method_name] = klass
55
58
  Arbre::Element::BuilderMethods.class_eval <<-EOF, __FILE__, __LINE__
56
59
  def #{method_name}(*args, &block) # def checkbox(*args, &block)
57
60
  insert_tag ::#{klass.name}, *args, &block # insert_tag ::Checkbox, *args, &block
@@ -0,0 +1,22 @@
1
+ module ExpressTemplates
2
+ module Components
3
+ class Registry
4
+ def self.[]=(builder_method, klass)
5
+ _map[builder_method]= klass
6
+ end
7
+
8
+ def self.[](builder_method)
9
+ _map[builder_method]
10
+ end
11
+
12
+ def self.keys
13
+ _map.keys
14
+ end
15
+
16
+ private
17
+ def self._map
18
+ @_map ||= {}
19
+ end
20
+ end
21
+ end
22
+ end
@@ -6,6 +6,7 @@ end
6
6
  # Abbreviation for your component class definitions
7
7
  ET = ExpressTemplates
8
8
 
9
+ require 'express_templates/components/registry'
9
10
  require 'express_templates/components/base'
10
11
  require 'express_templates/components/configurable'
11
12
  require 'express_templates/components/container'
@@ -1,3 +1,3 @@
1
1
  module ExpressTemplates
2
- VERSION = "0.11.16"
2
+ VERSION = "0.11.17"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: express_templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.16
4
+ version: 0.11.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Talcott Smith
@@ -9,48 +9,48 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-04-02 00:00:00.000000000 Z
12
+ date: 2017-04-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: arbre
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.1'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.1'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rails
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '4.2'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '4.2'
56
56
  description: Write templates in Ruby for building reusable view components
@@ -61,10 +61,14 @@ executables: []
61
61
  extensions: []
62
62
  extra_rdoc_files: []
63
63
  files:
64
+ - README.md
65
+ - Rakefile
64
66
  - lib/arbre/patches.rb
65
67
  - lib/core_extensions/proc.rb
66
68
  - lib/core_extensions/string.rb
69
+ - lib/express_templates.rb
67
70
  - lib/express_templates/compiler.rb
71
+ - lib/express_templates/components.rb
68
72
  - lib/express_templates/components/all.rb
69
73
  - lib/express_templates/components/base.rb
70
74
  - lib/express_templates/components/capabilities/configurable.rb
@@ -74,6 +78,7 @@ files:
74
78
  - lib/express_templates/components/configurable.rb
75
79
  - lib/express_templates/components/container.rb
76
80
  - lib/express_templates/components/content_for.rb
81
+ - lib/express_templates/components/forms.rb
77
82
  - lib/express_templates/components/forms/basic_fields.rb
78
83
  - lib/express_templates/components/forms/checkbox.rb
79
84
  - lib/express_templates/components/forms/express_form.rb
@@ -83,16 +88,12 @@ files:
83
88
  - lib/express_templates/components/forms/select.rb
84
89
  - lib/express_templates/components/forms/select_collection.rb
85
90
  - lib/express_templates/components/forms/submit.rb
86
- - lib/express_templates/components/forms.rb
91
+ - lib/express_templates/components/registry.rb
87
92
  - lib/express_templates/components/tree_for.rb
88
- - lib/express_templates/components.rb
89
93
  - lib/express_templates/renderer.rb
90
94
  - lib/express_templates/template/handler.rb
91
95
  - lib/express_templates/version.rb
92
- - lib/express_templates.rb
93
96
  - lib/tasks/express_templates.rake
94
- - Rakefile
95
- - README.md
96
97
  - test/compiler_test.rb
97
98
  - test/components/base_test.rb
98
99
  - test/components/capabilities/resourceful_test.rb
@@ -106,6 +107,7 @@ files:
106
107
  - test/components/tree_for_test.rb
107
108
  - test/core_extensions/proc_test.rb
108
109
  - test/core_extensions/string_test.rb
110
+ - test/dummy/Rakefile
109
111
  - test/dummy/app/assets/javascripts/application.js
110
112
  - test/dummy/app/assets/stylesheets/application.css
111
113
  - test/dummy/app/controllers/application_controller.rb
@@ -116,6 +118,7 @@ files:
116
118
  - test/dummy/bin/bundle
117
119
  - test/dummy/bin/rails
118
120
  - test/dummy/bin/rake
121
+ - test/dummy/config.ru
119
122
  - test/dummy/config/application.rb
120
123
  - test/dummy/config/boot.rb
121
124
  - test/dummy/config/environment.rb
@@ -133,12 +136,10 @@ files:
133
136
  - test/dummy/config/locales/en.yml
134
137
  - test/dummy/config/routes.rb
135
138
  - test/dummy/config/secrets.yml
136
- - test/dummy/config.ru
137
139
  - test/dummy/public/404.html
138
140
  - test/dummy/public/422.html
139
141
  - test/dummy/public/500.html
140
142
  - test/dummy/public/favicon.ico
141
- - test/dummy/Rakefile
142
143
  - test/dummy/test/controllers/hello_controller_test.rb
143
144
  - test/dummy/test/helpers/hello_helper_test.rb
144
145
  - test/express_templates_test.rb
@@ -154,17 +155,17 @@ require_paths:
154
155
  - lib
155
156
  required_ruby_version: !ruby/object:Gem::Requirement
156
157
  requirements:
157
- - - '>='
158
+ - - ">="
158
159
  - !ruby/object:Gem::Version
159
160
  version: '0'
160
161
  required_rubygems_version: !ruby/object:Gem::Requirement
161
162
  requirements:
162
- - - '>='
163
+ - - ">="
163
164
  - !ruby/object:Gem::Version
164
165
  version: '0'
165
166
  requirements: []
166
167
  rubyforge_project:
167
- rubygems_version: 2.0.14.1
168
+ rubygems_version: 2.4.7
168
169
  signing_key:
169
170
  specification_version: 4
170
171
  summary: Reusable view components