-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
125 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
; top-most EditorConfig file | ||
root = true | ||
|
||
; Unix-style newlines | ||
[*] | ||
end_of_line = LF | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
source "https://rubygems.org" | ||
source 'https://rubygems.org' | ||
|
||
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } | ||
git_source(:github) {|repo_name| 'https://github.com/#{repo_name}' } | ||
|
||
# Specify your gem's dependencies in komponent.gemspec | ||
gemspec | ||
|
||
gem "rails" | ||
gem "rake", ">= 11.1" | ||
gem "rubocop", require: false | ||
gem "webpacker" | ||
gem 'rails' | ||
gem 'rake', '>= 11.1' | ||
gem 'rubocop', require: false | ||
gem 'webpacker' | ||
|
||
group :test do | ||
gem "aruba" | ||
gem "cucumber" | ||
gem "simplecov", require: false | ||
gem "coveralls", require: false | ||
gem 'aruba' | ||
gem 'coveralls', require: false | ||
gem 'cucumber' | ||
gem 'simplecov', require: false | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
# frozen_string_literal: true | ||
|
||
require "bundler/gem_tasks" | ||
require "rubocop/rake_task" | ||
require "rake/testtask" | ||
require "cucumber" | ||
require "cucumber/rake/task" | ||
require "coveralls/rake/task" | ||
require 'bundler/gem_tasks' | ||
require 'rubocop/rake_task' | ||
require 'rake/testtask' | ||
require 'cucumber' | ||
require 'cucumber/rake/task' | ||
require 'coveralls/rake/task' | ||
|
||
namespace :test do | ||
task all: [:rubocop, :unit, :cucumber] | ||
task all_with_coverage: [:all, "coveralls:push"] | ||
task all_with_coverage: [:all, 'coveralls:push'] | ||
|
||
RuboCop::RakeTask.new | ||
|
||
Rake::TestTask.new(:unit) do |t| | ||
t.libs << "test" | ||
t.libs << "lib" | ||
t.test_files = FileList["test/**/*_test.rb"] | ||
t.libs << 'test' | ||
t.libs << 'lib' | ||
t.test_files = FileList['test/**/*_test.rb'] | ||
t.verbose = true | ||
t.warning = false | ||
end | ||
|
||
Cucumber::Rake::Task.new(:cucumber) do |t| | ||
t.cucumber_opts = "--format pretty" | ||
t.cucumber_opts = '--format pretty' | ||
end | ||
|
||
Coveralls::RakeTask.new | ||
end | ||
|
||
task test: "test:all" | ||
task test: 'test:all' | ||
|
||
task default: :test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
require "bundler/setup" | ||
require "komponent" | ||
require 'bundler/setup' | ||
require 'komponent' | ||
|
||
# You can add fixtures and/or initialization code here to make experimenting | ||
# with your gem easier. You can also use a different console, if you like. | ||
|
||
# (If you use this, don't forget to add pry to your Gemfile!) | ||
# require "pry" | ||
# require 'pry' | ||
# Pry.start | ||
|
||
require "irb" | ||
require 'irb' | ||
IRB.start(__FILE__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
# frozen_string_literal: true | ||
|
||
lib = File.expand_path("../lib", __FILE__) | ||
lib = File.expand_path('../lib', __FILE__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require "komponent/version" | ||
require 'komponent/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = "komponent" | ||
spec.name = 'komponent' | ||
spec.version = Komponent::VERSION | ||
spec.authors = ["Ouvrages"] | ||
spec.email = ["contact@ouvrages-web.fr"] | ||
spec.authors = ['Ouvrages'] | ||
spec.email = ['contact@ouvrages-web.fr'] | ||
|
||
spec.summary = "An opinionated way of organizing front-end code in Ruby on Rails, based on components" | ||
spec.description = "An opinionated way of organizing front-end code in Ruby on Rails, based on components" | ||
spec.homepage = "http://komponent.io" | ||
spec.license = "MIT" | ||
spec.summary = 'An opinionated way of organizing front-end code in Ruby on Rails, based on components' | ||
spec.description = 'An opinionated way of organizing front-end code in Ruby on Rails, based on components' | ||
spec.homepage = 'http://komponent.io' | ||
spec.license = 'MIT' | ||
|
||
spec.metadata = { | ||
"homepage_uri" => "http://komponent.io", | ||
"changelog_uri" => "https://github.com/komposable/komponent/blob/master/CHANGELOG.md", | ||
"source_code_uri" => "https://github.com/komposable/komponent", | ||
"bug_tracker_uri" => "https://github.com/komposable/komponent/issues", | ||
'homepage_uri' => 'http://komponent.io', | ||
'changelog_uri' => 'https://github.com/komposable/komponent/blob/master/CHANGELOG.md', | ||
'source_code_uri' => 'https://github.com/komposable/komponent', | ||
'bug_tracker_uri' => 'https://github.com/komposable/komponent/issues', | ||
} | ||
|
||
spec.files = `git ls-files -z`.split("\x0").reject do |f| | ||
f.match(%r{^(test|spec|features|fixtures)/}) | ||
end | ||
|
||
spec.require_paths = ["lib"] | ||
spec.require_paths = ['lib'] | ||
spec.required_ruby_version = '>= 2.2.0' | ||
|
||
spec.add_dependency "actionview", ">= 5.0" | ||
spec.add_dependency "activesupport", ">= 5.0" | ||
spec.add_dependency "railties", ">= 5.0" | ||
spec.add_dependency "webpacker", ">= 3.0.0" | ||
spec.add_dependency 'actionview', '>= 5.0' | ||
spec.add_dependency 'activesupport', '>= 5.0' | ||
spec.add_dependency 'railties', '>= 5.0' | ||
spec.add_dependency 'webpacker', '>= 3.0.0' | ||
|
||
spec.add_development_dependency "appraisal" | ||
spec.add_development_dependency "bundler", "~> 1.15" | ||
spec.add_development_dependency 'appraisal' | ||
spec.add_development_dependency 'bundler', '~> 1.15' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.<%= component_class_name %>{ data: { controller: '<%= component_class_name %>' } } | ||
<%- if locale? -%> | ||
= t ".component_name" | ||
= t '.component_name' | ||
<%- else -%> | ||
<%= module_name.underscore %> | ||
<%- end -%> |
4 changes: 2 additions & 2 deletions
4
lib/generators/component/templates/stimulus_view.html.slim.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.<%= component_class_name %>(data-controller="<%= component_class_name %>") | ||
.<%= component_class_name %>(data-controller='<%= component_class_name %>') | ||
<%- if locale? -%> | ||
= t ".component_name" | ||
= t '.component_name' | ||
<%- else -%> | ||
| <%= module_name.underscore %> | ||
<%- end -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.<%= component_class_name %> | ||
<%- if locale? -%> | ||
= t ".component_name" | ||
= t '.component_name' | ||
<%- else -%> | ||
<%= component_name.underscore %> | ||
<%- end -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.<%= component_class_name %> | ||
<%- if locale? -%> | ||
= t ".component_name" | ||
= t '.component_name' | ||
<%- else -%> | ||
| <%= component_name.underscore %> | ||
<%- end -%> |
Oops, something went wrong.