komponent 1.1.4 → 2.0.0.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +9 -9
- data/.simplecov +7 -0
- data/.travis.yml +1 -2
- data/CHANGELOG.md +12 -1
- data/Gemfile +2 -0
- data/README.md +48 -6
- data/Rakefile +12 -4
- data/komponent.gemspec +18 -12
- data/lib/generators/component/component_generator.rb +1 -5
- data/lib/generators/component/templates/rb.erb +2 -0
- data/lib/komponent/{core/component_helper.rb → component_helper.rb} +0 -5
- data/lib/komponent/{core/component_path_resolver.rb → component_path_resolver.rb} +0 -0
- data/lib/komponent/component_renderer.rb +78 -0
- data/lib/komponent/komponent_helper.rb +10 -76
- data/lib/komponent/railtie.rb +6 -4
- data/lib/komponent/{core/translation.rb → translation.rb} +0 -0
- data/lib/komponent/version.rb +1 -1
- metadata +29 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f4a2e93f4dd2d59cfe137824c4cf0befd7a827d
|
4
|
+
data.tar.gz: 531498a2ea3eb8063057a840ad29d4d6d3ec2b28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba27094468525618389dba4e707a19f8bd488e0dcdf74ad3ddf17e5a88e61f18ef6556d644a76251aad595232f25eae7d08bf563433c7656dc190a0fa7a95c00
|
7
|
+
data.tar.gz: ea2a13b0eebb2885baa9d43a3e3763dce0d36baef252408645005b142893e310ae01c3632f83f520c42b359080b03cd4df961ab5ca63cbb232363a5b70ab9e74
|
data/.rubocop.yml
CHANGED
@@ -52,29 +52,29 @@ Naming/PredicateName:
|
|
52
52
|
Naming/VariableName:
|
53
53
|
Enabled: true
|
54
54
|
|
55
|
-
Lint/
|
55
|
+
Lint/DeprecatedClassMethods:
|
56
56
|
Enabled: true
|
57
|
-
EnforcedStyleAlignWith: start_of_block
|
58
57
|
|
59
|
-
|
58
|
+
Layout/AlignParameters:
|
60
59
|
Enabled: true
|
61
60
|
|
62
|
-
|
61
|
+
Layout/BlockAlignment:
|
63
62
|
Enabled: true
|
63
|
+
EnforcedStyleAlignWith: start_of_block
|
64
64
|
|
65
|
-
|
65
|
+
Layout/BlockEndNewline:
|
66
66
|
Enabled: true
|
67
67
|
|
68
|
-
Layout/
|
68
|
+
Layout/CaseIndentation:
|
69
69
|
Enabled: true
|
70
70
|
|
71
|
-
Layout/
|
71
|
+
Layout/ClosingParenthesisIndentation:
|
72
72
|
Enabled: true
|
73
73
|
|
74
|
-
Layout/
|
74
|
+
Layout/ConditionPosition:
|
75
75
|
Enabled: true
|
76
76
|
|
77
|
-
Layout/
|
77
|
+
Layout/DefEndAlignment:
|
78
78
|
Enabled: true
|
79
79
|
|
80
80
|
Layout/DotPosition:
|
data/.simplecov
ADDED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,10 +2,21 @@
|
|
2
2
|
|
3
3
|
## Upcoming release
|
4
4
|
|
5
|
-
##
|
5
|
+
## v2.0.0.pre.1 (2018-04-12)
|
6
|
+
|
7
|
+
**Breaking changes:**
|
8
|
+
- Removed deprecated `render_partial` method
|
9
|
+
- Removed rendering of namespaced component with the old naming convention
|
6
10
|
|
7
11
|
**Enhancements:**
|
12
|
+
- Changed `@block_given_to_component` from an instance variable to a method `block_given_to_component` available in the view context
|
13
|
+
- Implemented component caching with the `cached: true` option
|
14
|
+
- Added a `stylesheet_engine` option to Komponent configuration
|
15
|
+
- When generating a new component, the `frozen_string_literal: true` magic comment is prepended to Ruby files
|
8
16
|
|
17
|
+
## v1.1.4 (2018-03-05)
|
18
|
+
|
19
|
+
**Enhancements:**
|
9
20
|
- Added `frozen_string_literal` option to optimize performance
|
10
21
|
- Removed useless `autoload_paths` config definition (it was not taken into account)
|
11
22
|
- Install generator can be ran several times in order to enable features
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# <img alt="Komponent" src="https://raw.github.com/ouvrages/komponent/master/logo.svg?sanitize=true" width="200" height="40" />
|
2
2
|
[![Build Status](https://travis-ci.org/komposable/komponent.svg?branch=master)](https://travis-ci.org/komposable/komponent)
|
3
3
|
[![Gem](https://img.shields.io/gem/v/komponent.svg)](https://github.com/komposable/komponent)
|
4
|
+
[![Dependency Status](https://beta.gemnasium.com/badges/github.com/komposable/komponent.svg)](https://beta.gemnasium.com/projects/github.com/komposable/komponent)
|
5
|
+
[![Coverage Status](https://coveralls.io/repos/github/komposable/komponent/badge.svg?branch=master)](https://coveralls.io/github/komposable/komponent?branch=master)
|
4
6
|
|
5
7
|
**Komponent** implements an opinionated way of organizing front-end code in Ruby on Rails, based on _components_.
|
6
8
|
|
@@ -17,9 +19,12 @@ This gem has been inspired by our Rails development practices at [Ouvrages](http
|
|
17
19
|
|
18
20
|
## Table of contents
|
19
21
|
|
22
|
+
- [Compatibility](#compatibility)
|
20
23
|
- [Getting started](#getting-started)
|
21
24
|
- [Usage](#usage)
|
22
25
|
- [Passing variables](#passing-variables)
|
26
|
+
- [Passing options](#passing-options)
|
27
|
+
- [Component caching](#component-caching)
|
23
28
|
- [Passing a block](#passing-a-block)
|
24
29
|
- [Properties](#properties)
|
25
30
|
- [Helpers](#helpers)
|
@@ -31,11 +36,18 @@ This gem has been inspired by our Rails development practices at [Ouvrages](http
|
|
31
36
|
- [Configuration](#configuration)
|
32
37
|
- [Change default root path](#change-default-root-path)
|
33
38
|
- [Default options for the generators](#default-options-for-the-generators)
|
39
|
+
- [Change default stylesheet engine](#change-default-stylesheet-engine)
|
34
40
|
- [Force default templating engine](#force-default-templating-engine)
|
35
41
|
- [Additional paths](#additional-paths)
|
36
42
|
- [Contributing](#contributing)
|
37
43
|
- [License](#license)
|
38
44
|
|
45
|
+
## Compatibility
|
46
|
+
|
47
|
+
- Ruby 2.2+
|
48
|
+
- Rails 4.2+
|
49
|
+
- Webpacker 3.0.0+
|
50
|
+
|
39
51
|
## Getting started
|
40
52
|
|
41
53
|
```ruby
|
@@ -108,6 +120,25 @@ You can pass `locals` to the helper. They are accessible within the component pa
|
|
108
120
|
= @text
|
109
121
|
```
|
110
122
|
|
123
|
+
### Passing options
|
124
|
+
|
125
|
+
#### Component caching
|
126
|
+
|
127
|
+
Komponent relies on [Rails Low-level caching](http://guides.rubyonrails.org/caching_with_rails.html#low-level-caching).
|
128
|
+
|
129
|
+
You can cache the component by passing the `cached: true` option. The cache will expire when the locals, options or block change.
|
130
|
+
If you want better control of the cache expiration, you can provide a custom `cache_key`. When the `cache_key` changes, the cache will be cleared.
|
131
|
+
|
132
|
+
```slim
|
133
|
+
/ app/views/pages/home.html.slim
|
134
|
+
|
135
|
+
/ Cache the component based on its locals
|
136
|
+
= component "button", { text: "Click here" }, cached: true
|
137
|
+
|
138
|
+
/ or cache the component with a specific key, such as the last update of a model
|
139
|
+
= component "button", { text: "Click here" }, cached: true, cache_key: @product.updated_at
|
140
|
+
```
|
141
|
+
|
111
142
|
### Passing a block
|
112
143
|
|
113
144
|
The component also accepts a `block`. To render the block, just use the standard `yield`.
|
@@ -186,9 +217,10 @@ You can also choose to split your component into partials. In this case, we can
|
|
186
217
|
```slim
|
187
218
|
/ frontend/components/button/_button.html.slim
|
188
219
|
|
189
|
-
|
220
|
+
a.button(href=@href)
|
190
221
|
= @text
|
191
|
-
|
222
|
+
- if external_link?
|
223
|
+
= render "suffix", text: "external link"
|
192
224
|
```
|
193
225
|
|
194
226
|
```slim
|
@@ -207,7 +239,6 @@ rails generate component admin/header
|
|
207
239
|
|
208
240
|
This will create the component in an `admin` folder, and name its Ruby module `AdminHeaderComponent`.
|
209
241
|
|
210
|
-
|
211
242
|
### Stimulus integration
|
212
243
|
|
213
244
|
Komponent supports [stimulus](https://github.com/stimulusjs/stimulus) 1.0.
|
@@ -267,8 +298,19 @@ You can whitelist the locales you use by setting this into an initializer, as ex
|
|
267
298
|
I18n.available_locales = [:en, :fr]
|
268
299
|
```
|
269
300
|
|
301
|
+
> If you have the `rails-i18n` gem in your `Gemfile`, you should whitelist locales to prevent creating a lot of
|
302
|
+
> locale files when you generate a new component.
|
303
|
+
|
270
304
|
### Configuration
|
271
305
|
|
306
|
+
#### Change default root path
|
307
|
+
|
308
|
+
You can change the default root path (`frontend`) to another path where Komponent should be installed and components generated. You need to change `komponent.root` in an initializer.
|
309
|
+
|
310
|
+
```rb
|
311
|
+
Rails.application.config.komponent.root = Rails.root.join("app/frontend")
|
312
|
+
```
|
313
|
+
|
272
314
|
#### Default options for the generators
|
273
315
|
|
274
316
|
You can configure the generators in an initializer or in `application.rb`, so you don't have to add `--locale` and/or `--stimulus` flags every time you generate a fresh component.
|
@@ -279,12 +321,12 @@ config.generators do |g|
|
|
279
321
|
end
|
280
322
|
```
|
281
323
|
|
282
|
-
#### Change default
|
324
|
+
#### Change default stylesheet engine
|
283
325
|
|
284
|
-
You can
|
326
|
+
You can configure the stylesheet engine used for generate stylesheet file, values allowed are ':css', ':scss', ':sass'.
|
285
327
|
|
286
328
|
```rb
|
287
|
-
Rails.application.config.komponent.
|
329
|
+
Rails.application.config.komponent.stylesheet_engine = :css # default value is :css
|
288
330
|
```
|
289
331
|
|
290
332
|
#### Force default templating engine
|
data/Rakefile
CHANGED
@@ -1,25 +1,33 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "bundler/gem_tasks"
|
4
|
+
require "rubocop/rake_task"
|
4
5
|
require "rake/testtask"
|
5
|
-
require
|
6
|
-
require
|
6
|
+
require "cucumber"
|
7
|
+
require "cucumber/rake/task"
|
8
|
+
require "coveralls/rake/task"
|
7
9
|
|
8
10
|
namespace :test do
|
9
|
-
task all: [:unit, :cucumber]
|
11
|
+
task all: [:rubocop, :unit, :cucumber]
|
12
|
+
task all_with_coverage: [:all, "coveralls:push"]
|
13
|
+
|
14
|
+
RuboCop::RakeTask.new
|
10
15
|
|
11
16
|
Rake::TestTask.new(:unit) do |t|
|
12
17
|
t.libs << "test"
|
13
18
|
t.libs << "lib"
|
14
19
|
t.test_files = FileList["test/**/*_test.rb"]
|
15
20
|
t.verbose = true
|
21
|
+
t.warning = false
|
16
22
|
end
|
17
23
|
|
18
24
|
Cucumber::Rake::Task.new(:cucumber) do |t|
|
19
25
|
t.cucumber_opts = "--format pretty"
|
20
26
|
end
|
27
|
+
|
28
|
+
Coveralls::RakeTask.new
|
21
29
|
end
|
22
30
|
|
23
|
-
task test:
|
31
|
+
task test: "test:all"
|
24
32
|
|
25
33
|
task default: :test
|
data/komponent.gemspec
CHANGED
@@ -5,25 +5,31 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
require "komponent/version"
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
|
-
spec.name
|
9
|
-
spec.version
|
10
|
-
spec.authors
|
11
|
-
spec.email
|
8
|
+
spec.name = "komponent"
|
9
|
+
spec.version = Komponent::VERSION
|
10
|
+
spec.authors = ["Ouvrages"]
|
11
|
+
spec.email = ["contact@ouvrages-web.fr"]
|
12
12
|
|
13
|
-
spec.summary
|
14
|
-
spec.description
|
15
|
-
spec.homepage
|
16
|
-
spec.license
|
13
|
+
spec.summary = "An opinionated way of organizing front-end code in Ruby on Rails, based on components"
|
14
|
+
spec.description = "An opinionated way of organizing front-end code in Ruby on Rails, based on components"
|
15
|
+
spec.homepage = "http://komponent.io"
|
16
|
+
spec.license = "MIT"
|
17
17
|
|
18
|
-
spec.
|
18
|
+
spec.metadata = {
|
19
|
+
"homepage_uri" => "http://komponent.io",
|
20
|
+
"changelog_uri" => "https://github.com/komposable/komponent/blob/master/CHANGELOG.md",
|
21
|
+
"source_code_uri" => "https://github.com/komposable/komponent",
|
22
|
+
"bug_tracker_uri" => "https://github.com/komposable/komponent/issues",
|
23
|
+
}
|
24
|
+
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
19
26
|
f.match(%r{^(test|spec|features|fixtures)/})
|
20
27
|
end
|
21
|
-
spec.bindir = "exe"
|
22
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
-
spec.require_paths = ["lib"]
|
24
28
|
|
29
|
+
spec.require_paths = ["lib"]
|
25
30
|
spec.required_ruby_version = '>= 2.2.0'
|
26
31
|
|
32
|
+
spec.add_dependency "actionview", ">= 4.2"
|
27
33
|
spec.add_dependency "activesupport", ">= 4.2"
|
28
34
|
spec.add_dependency "railties", ">= 4.2"
|
29
35
|
spec.add_dependency "webpacker", ">= 3.0.0"
|
@@ -134,11 +134,7 @@ class ComponentGenerator < Rails::Generators::NamedBase
|
|
134
134
|
end
|
135
135
|
|
136
136
|
def stylesheet_engine
|
137
|
-
|
138
|
-
sass[:preferred_syntax]
|
139
|
-
else
|
140
|
-
:css
|
141
|
-
end
|
137
|
+
rails_configuration.komponent.stylesheet_engine
|
142
138
|
end
|
143
139
|
|
144
140
|
def default_path
|
File without changes
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Komponent
|
4
|
+
class ComponentRenderer
|
5
|
+
include ActionView::Helpers::CaptureHelper
|
6
|
+
|
7
|
+
attr_accessor :output_buffer
|
8
|
+
attr_reader :context
|
9
|
+
|
10
|
+
def initialize(controller)
|
11
|
+
@context = controller.view_context.dup
|
12
|
+
@view_renderer = @context.view_renderer = @context.view_renderer.dup
|
13
|
+
@lookup_context = @view_renderer.lookup_context = @view_renderer.lookup_context.dup
|
14
|
+
end
|
15
|
+
|
16
|
+
def render(component, locals = {}, options = {}, &block)
|
17
|
+
cached = options.delete(:cached)
|
18
|
+
if cached
|
19
|
+
|
20
|
+
cached_block = block ? block.call : nil
|
21
|
+
key = [component, locals, options, cached_block].to_s
|
22
|
+
cache_key = Digest::SHA1.hexdigest(key)
|
23
|
+
|
24
|
+
Rails.cache.fetch(cache_key) do
|
25
|
+
_render(component, locals, options, &block)
|
26
|
+
end
|
27
|
+
else
|
28
|
+
_render(component, locals, options, &block)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def _render(component, locals = {}, options = {}, &block)
|
35
|
+
parts = component.split("/")
|
36
|
+
component_name = parts.join("_")
|
37
|
+
|
38
|
+
component_module_path = resolved_component_path(component)
|
39
|
+
.join("#{component_name}_component")
|
40
|
+
require_dependency(component_module_path)
|
41
|
+
component_module = "#{component_name}_component".camelize.constantize
|
42
|
+
|
43
|
+
@context.class_eval { prepend component_module }
|
44
|
+
@context.class_eval { prepend Komponent::Translation }
|
45
|
+
|
46
|
+
@lookup_context.prefixes = ["components/#{component}"]
|
47
|
+
|
48
|
+
@context.instance_eval do
|
49
|
+
if component_module.respond_to?(:properties)
|
50
|
+
locals = locals.dup
|
51
|
+
component_module.properties.each do |name, options|
|
52
|
+
unless locals.has_key?(name)
|
53
|
+
if options.has_key?(:default)
|
54
|
+
locals[name] = options[:default]
|
55
|
+
elsif options[:required]
|
56
|
+
raise "Missing required component parameter: #{name}"
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
locals.each do |name, value|
|
63
|
+
instance_variable_set(:"@#{name}", locals[name])
|
64
|
+
end
|
65
|
+
|
66
|
+
define_singleton_method(:properties) { locals }
|
67
|
+
define_singleton_method(:block_given_to_component?) { block_given? }
|
68
|
+
define_singleton_method(:block_given_to_component) { block }
|
69
|
+
end
|
70
|
+
|
71
|
+
@context.render("components/#{component}/#{parts.join('_')}", &block)
|
72
|
+
end
|
73
|
+
|
74
|
+
def resolved_component_path(component)
|
75
|
+
Komponent::ComponentPathResolver.new.resolve(component)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -1,82 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module KomponentHelper
|
4
|
-
def component(
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
context = controller.view_context.dup
|
15
|
-
|
16
|
-
context.view_flow = view_flow
|
17
|
-
|
18
|
-
view_renderer = context.view_renderer = context.view_renderer.dup
|
19
|
-
lookup_context = view_renderer.lookup_context = view_renderer.lookup_context.dup
|
20
|
-
lookup_context.prefixes = ["components/#{component}"]
|
21
|
-
|
22
|
-
context.class_eval { prepend component_module }
|
23
|
-
context.class_eval { prepend Komponent::Translation }
|
24
|
-
|
25
|
-
capture_block = proc { capture(&block) } if block
|
26
|
-
|
27
|
-
context.instance_eval do
|
28
|
-
if component_module.respond_to?(:properties)
|
29
|
-
locals = locals.dup
|
30
|
-
component_module.properties.each do |name, options|
|
31
|
-
unless locals.has_key?(name)
|
32
|
-
if options.has_key?(:default)
|
33
|
-
locals[name] = options[:default]
|
34
|
-
elsif options[:required]
|
35
|
-
raise "Missing required component parameter: #{name}"
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
locals.each do |name, value|
|
42
|
-
instance_variable_set(:"@#{name}", locals[name])
|
43
|
-
end
|
44
|
-
|
45
|
-
define_singleton_method(:properties) { locals }
|
46
|
-
|
47
|
-
instance_variable_set(:"@block_given_to_component", block)
|
48
|
-
end
|
49
|
-
|
50
|
-
begin
|
51
|
-
context.render("components/#{component}/#{parts.join('_')}", &capture_block)
|
52
|
-
rescue ActionView::MissingTemplate
|
53
|
-
warn "[DEPRECATION WARNING] `#{parts.last}` filename in namespace is deprecated in favor of `#{parts.join('_')}`."
|
54
|
-
context.render("components/#{component}/#{parts.last}", &capture_block)
|
55
|
-
end
|
4
|
+
def component(component_name, locals = {}, options = {}, &block)
|
5
|
+
captured_block = proc { capture(&block) } if block_given?
|
6
|
+
Komponent::ComponentRenderer.new(
|
7
|
+
controller,
|
8
|
+
).render(
|
9
|
+
component_name,
|
10
|
+
locals,
|
11
|
+
options,
|
12
|
+
&captured_block
|
13
|
+
)
|
56
14
|
end
|
57
15
|
alias :c :component
|
58
|
-
|
59
|
-
def render_partial(partial_name, locals = {}, &block)
|
60
|
-
warn "[DEPRECATION WARNING] `render_partial` is deprecated. Please use default `render` instead."
|
61
|
-
|
62
|
-
context = controller.view_context
|
63
|
-
view_paths = context.lookup_context.view_paths.dup
|
64
|
-
components_path = Rails.root.join "frontend/components"
|
65
|
-
|
66
|
-
capture_block = proc { capture(&block) } if block
|
67
|
-
|
68
|
-
current_dir = Pathname.new(@virtual_path).dirname
|
69
|
-
|
70
|
-
context.lookup_context.prefixes.prepend current_dir
|
71
|
-
context.lookup_context.view_paths.unshift components_path
|
72
|
-
|
73
|
-
rendered_partial = capture do
|
74
|
-
context.render partial_name, locals, &capture_block
|
75
|
-
end
|
76
|
-
|
77
|
-
context.lookup_context.prefixes.delete current_dir
|
78
|
-
context.lookup_context.view_paths = view_paths
|
79
|
-
|
80
|
-
rendered_partial
|
81
|
-
end
|
82
16
|
end
|
data/lib/komponent/railtie.rb
CHANGED
@@ -1,19 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'webpacker'
|
4
|
-
require 'komponent/
|
5
|
-
require 'komponent/
|
6
|
-
require 'komponent/
|
4
|
+
require 'komponent/component_helper'
|
5
|
+
require 'komponent/component_path_resolver'
|
6
|
+
require 'komponent/component_renderer'
|
7
|
+
require 'komponent/translation'
|
7
8
|
|
8
9
|
module Komponent
|
9
10
|
class Railtie < Rails::Railtie
|
10
11
|
config.komponent = ActiveSupport::OrderedOptions.new
|
11
12
|
config.komponent.root = nil
|
12
13
|
config.komponent.component_paths = []
|
14
|
+
config.komponent.stylesheet_engine = :css
|
13
15
|
|
14
16
|
config.before_configuration do |app|
|
15
|
-
app.config.komponent.root = app.config.root.join("frontend")
|
16
17
|
app.config.komponent = config.komponent
|
18
|
+
app.config.komponent.root = app.config.root.join("frontend")
|
17
19
|
end
|
18
20
|
|
19
21
|
config.after_initialize do |app|
|
File without changes
|
data/lib/komponent/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: komponent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0.pre.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ouvrages
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: actionview
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.2'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: activesupport
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -76,6 +90,7 @@ extra_rdoc_files: []
|
|
76
90
|
files:
|
77
91
|
- ".gitignore"
|
78
92
|
- ".rubocop.yml"
|
93
|
+
- ".simplecov"
|
79
94
|
- ".travis.yml"
|
80
95
|
- CHANGELOG.md
|
81
96
|
- CODE_OF_CONDUCT.md
|
@@ -107,17 +122,22 @@ files:
|
|
107
122
|
- lib/generators/component/templates/view.html.slim.erb
|
108
123
|
- lib/generators/komponent/install_generator.rb
|
109
124
|
- lib/komponent.rb
|
110
|
-
- lib/komponent/
|
111
|
-
- lib/komponent/
|
112
|
-
- lib/komponent/
|
125
|
+
- lib/komponent/component_helper.rb
|
126
|
+
- lib/komponent/component_path_resolver.rb
|
127
|
+
- lib/komponent/component_renderer.rb
|
113
128
|
- lib/komponent/komponent_helper.rb
|
114
129
|
- lib/komponent/railtie.rb
|
130
|
+
- lib/komponent/translation.rb
|
115
131
|
- lib/komponent/version.rb
|
116
132
|
- logo.svg
|
117
133
|
homepage: http://komponent.io
|
118
134
|
licenses:
|
119
135
|
- MIT
|
120
|
-
metadata:
|
136
|
+
metadata:
|
137
|
+
homepage_uri: http://komponent.io
|
138
|
+
changelog_uri: https://github.com/komposable/komponent/blob/master/CHANGELOG.md
|
139
|
+
source_code_uri: https://github.com/komposable/komponent
|
140
|
+
bug_tracker_uri: https://github.com/komposable/komponent/issues
|
121
141
|
post_install_message:
|
122
142
|
rdoc_options: []
|
123
143
|
require_paths:
|
@@ -129,9 +149,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
129
149
|
version: 2.2.0
|
130
150
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
151
|
requirements:
|
132
|
-
- - "
|
152
|
+
- - ">"
|
133
153
|
- !ruby/object:Gem::Version
|
134
|
-
version:
|
154
|
+
version: 1.3.1
|
135
155
|
requirements: []
|
136
156
|
rubyforge_project:
|
137
157
|
rubygems_version: 2.6.13
|