komponent 2.0.0.pre.1 → 2.0.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
  SHA1:
3
- metadata.gz: 6f4a2e93f4dd2d59cfe137824c4cf0befd7a827d
4
- data.tar.gz: 531498a2ea3eb8063057a840ad29d4d6d3ec2b28
3
+ metadata.gz: 610fb0c8b248f5226502a802d27a057bfe59379f
4
+ data.tar.gz: 32663c31a285ada02b9c6d64e4b55c4bc15b0966
5
5
  SHA512:
6
- metadata.gz: ba27094468525618389dba4e707a19f8bd488e0dcdf74ad3ddf17e5a88e61f18ef6556d644a76251aad595232f25eae7d08bf563433c7656dc190a0fa7a95c00
7
- data.tar.gz: ea2a13b0eebb2885baa9d43a3e3763dce0d36baef252408645005b142893e310ae01c3632f83f520c42b359080b03cd4df961ab5ca63cbb232363a5b70ab9e74
6
+ metadata.gz: 79d976d2ac66900176e80336d42825005730b710d8f8fef880ff8f854e6bcee67cad84a2bedf27e51e288d6b084b3a998ca98bf42e3bafac60d11f0ae827b407
7
+ data.tar.gz: 572bad8d05dc4defb113907fe443f41fbb3cca8577cec78f8f015ecfd55b7c7e265b4cbe593e169353ab29c7ae1fbe82ca446e184d5e25c6ed67a14cce860033
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Upcoming release
4
4
 
5
+ ## v2.0.0 (2018-04-22)
6
+
7
+ **Enhancements:**
8
+
9
+ - Use lazy lookup for translations in all generator templates
10
+
5
11
  ## v2.0.0.pre.1 (2018-04-12)
6
12
 
7
13
  **Breaking changes:**
data/README.md CHANGED
@@ -1,8 +1,9 @@
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
- [![Gem](https://img.shields.io/gem/v/komponent.svg)](https://github.com/komposable/komponent)
3
+ ![GitHub release](https://img.shields.io/github/release/komposable/komponent.svg)
4
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)
5
+ [![Maintainability](https://api.codeclimate.com/v1/badges/36d6dcf883df8f63893a/maintainability)](https://codeclimate.com/github/komposable/komponent/maintainability)
6
+ ![Coveralls github](https://img.shields.io/coveralls/github/komposable/komponent.svg)
6
7
 
7
8
  **Komponent** implements an opinionated way of organizing front-end code in Ruby on Rails, based on _components_.
8
9
 
@@ -86,6 +87,16 @@ Then, render it in your views with the `component` helper (or its alias `c`).
86
87
  = c "button"
87
88
  ```
88
89
 
90
+ Or, directly from your controllers:
91
+
92
+ ```ruby
93
+ # app/controllers/pages_controller.rb
94
+
95
+ def home
96
+ render html: helpers.component("home")
97
+ end
98
+ ```
99
+
89
100
  Make sure to include javascript pack tag and stylesheet pack tag in your application layout file, for instance:
90
101
 
91
102
  ```slim
@@ -1,6 +1,6 @@
1
1
  <div class="<%= component_class_name %>">
2
2
  <%- if locale? -%>
3
- <%%= t "<%= module_name.underscore %>.component_name" %>
3
+ <%%= t ".component_name" %>
4
4
  <%- else -%>
5
5
  <%= module_name.underscore %>
6
6
  <%- end -%>
@@ -1,6 +1,6 @@
1
1
  .<%= component_class_name %>{class: "<%= component_class_name %>"}
2
2
  <%- if locale? -%>
3
- = t "<%= module_name.underscore %>.component_name"
3
+ = t ".component_name"
4
4
  <%- else -%>
5
5
  <%= module_name.underscore %>
6
6
  <%- end -%>
@@ -1,6 +1,6 @@
1
1
  .<%= component_class_name %>
2
2
  <%- if locale? -%>
3
- = t "<%= module_name.underscore %>.component_name"
3
+ = t ".component_name"
4
4
  <%- else -%>
5
5
  | <%= module_name.underscore %>
6
6
  <%- end -%>
@@ -38,8 +38,9 @@ module Komponent
38
38
 
39
39
  def create_stimulus_file
40
40
  return if File.exist?(stimulus_application_path)
41
+ return unless stimulus?
41
42
 
42
- create_file(stimulus_application_path, stimulus? ? stimulus_application_template : "")
43
+ create_file(stimulus_application_path, stimulus_application_template)
43
44
  end
44
45
 
45
46
  def append_to_application_configuration
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Komponent
4
- VERSION = "2.0.0.pre.1"
4
+ VERSION = "2.0.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: komponent
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ouvrages
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-12 00:00:00.000000000 Z
11
+ date: 2018-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -149,9 +149,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
149
149
  version: 2.2.0
150
150
  required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  requirements:
152
- - - ">"
152
+ - - ">="
153
153
  - !ruby/object:Gem::Version
154
- version: 1.3.1
154
+ version: '0'
155
155
  requirements: []
156
156
  rubyforge_project:
157
157
  rubygems_version: 2.6.13