├── .gitignore ├── template ├── .gitignore ├── CHANGELOG.md.tt ├── Gemfile ├── spec │ └── %spec_name%_spec.rb.tt ├── lib │ ├── %path%.rb.tt │ └── %path% │ │ └── version.rb.tt ├── README.md.tt ├── %name%.gemspec.tt ├── MIT-LICENSE.txt.tt ├── Rakefile.tt ├── .github │ └── workflows │ │ └── test.yml.tt └── CODE_OF_CONDUCT.md.tt ├── bin └── microgem ├── lib ├── microgem │ ├── version.rb │ └── generator.rb └── microgem.rb ├── README.md ├── Rakefile ├── microgem.gemspec ├── MIT-LICENSE.txt ├── CHANGELOG.md └── CODE_OF_CONDUCT.md /.gitignore: -------------------------------------------------------------------------------- 1 | Gemfile.lock 2 | pkg 3 | -------------------------------------------------------------------------------- /template/.gitignore: -------------------------------------------------------------------------------- 1 | Gemfile.lock 2 | /pkg 3 | -------------------------------------------------------------------------------- /bin/microgem: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require "microgem" 4 | Microgem.run! 5 | -------------------------------------------------------------------------------- /template/CHANGELOG.md.tt: -------------------------------------------------------------------------------- 1 | ## CHANGELOG 2 | 3 | ### <%= version %> 4 | 5 | * Initial release 6 | 7 | -------------------------------------------------------------------------------- /lib/microgem/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Microgem 4 | VERSION = "1.1.2" 5 | end 6 | -------------------------------------------------------------------------------- /template/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gemspec 4 | 5 | gem "minitest" 6 | gem "rake" 7 | gem "irb" 8 | -------------------------------------------------------------------------------- /lib/microgem.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative "microgem/version" 4 | require_relative "microgem/generator" 5 | 6 | module Microgem 7 | def self.run! 8 | Microgem::Generator.start 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /template/spec/%spec_name%_spec.rb.tt: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative "../lib/<%= path %>" 4 | require "minitest/autorun" 5 | 6 | describe <%= module_name %> do 7 | it "works" do 8 | assert_equal true, false 9 | end 10 | end 11 | 12 | -------------------------------------------------------------------------------- /template/lib/%path%.rb.tt: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative "<%= last_name %>/version" 4 | 5 | <% sub_modules.each.with_index do |sub_module, index| %><%= " " * index %><%= module_def(index) %> <%= sub_module %> 6 | <% end %><% sub_modules.size.downto(1) do |index| %><%= " " * (index - 1) %>end 7 | <% end %> 8 | -------------------------------------------------------------------------------- /template/lib/%path%/version.rb.tt: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | <% sub_modules.each.with_index do |sub_module, index| %><%= " " * index %><%= module_def(index) %> <%= sub_module %> 4 | <% end %><%= " " * sub_modules.size %>VERSION = "<%= version %>" 5 | <% sub_modules.size.downto(1) do |index| %><%= " " * (index - 1) %>end 6 | <% end %> 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # microgem [![[version]](https://badge.fury.io/rb/microgem.svg)](https://badge.fury.io/rb/microgem) 2 | 3 | Yet another [thor](http://whatisthor.com/) based gem generator. Not much configurable, if you are looking for something more flexible, consider using [ore](https://github.com/ruby-ore/ore) instead. 4 | 5 | ## Install 6 | 7 | $ gem install microgem 8 | 9 | ## Use 10 | 11 | $ microgem gem_name 12 | 13 | -------------------------------------------------------------------------------- /template/README.md.tt: -------------------------------------------------------------------------------- 1 | # <%= name %> [![[version]](https://badge.fury.io/rb/<%= name %>.svg)](https://badge.fury.io/rb/<%= name %>) [![[ci]](https://github.com/<%= settings['github'] %>/<%= github_name %>/workflows/Test/badge.svg)](https://github.com/<%= settings['github'] %>/<%= github_name %>/actions?query=workflow%3ATest) 2 | 3 | <%= info %> 4 | 5 | 6 | ## Setup 7 | 8 | Add to your `Gemfile`: 9 | 10 | ```ruby 11 | gem "<%= name %>" 12 | ``` 13 | 14 | 15 | ## Usage 16 | 17 | ```ruby 18 | ``` 19 | 20 | 21 | ## MIT License 22 | 23 | Copyright (C) <%= current_year %> <%= settings['author'] %> <<%= settings['website'] %>>. Released under the MIT license. 24 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # # # 2 | # Get gemspec info 3 | 4 | gemspec_file = Dir['*.gemspec'].first 5 | gemspec = eval File.read(gemspec_file), binding, gemspec_file 6 | info = "#{gemspec.name} | #{gemspec.version} | " \ 7 | "#{gemspec.runtime_dependencies.size} dependencies | " \ 8 | "#{gemspec.files.size} files" 9 | 10 | 11 | # # # 12 | # Gem build and install task 13 | 14 | desc info 15 | task :gem do 16 | puts info + "\n\n" 17 | print " "; sh "gem build #{gemspec_file}" 18 | FileUtils.mkdir_p 'pkg' 19 | FileUtils.mv "#{gemspec.name}-#{gemspec.version}.gem", 'pkg' 20 | puts; sh %{gem install --no-document pkg/#{gemspec.name}-#{gemspec.version}.gem} 21 | end 22 | 23 | 24 | # # # 25 | # Start an IRB session with the gem loaded 26 | 27 | desc "#{gemspec.name} | IRB" 28 | task :irb do 29 | sh "irb -I ./lib -r #{gemspec.name.gsub '-','/'}" 30 | end 31 | -------------------------------------------------------------------------------- /template/%name%.gemspec.tt: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | 3 | require File.dirname(__FILE__) + "/lib/<%= path %>/version" 4 | 5 | Gem::Specification.new do |gem| 6 | gem.name = "<%= name %>" 7 | gem.version = <%= module_name %>::VERSION 8 | gem.summary = "<%= info %>" 9 | gem.description = "<%= info %>" 10 | gem.authors = ["<%= settings['author'] %>"] 11 | gem.email = ["<%= settings['email'] %>"] 12 | gem.homepage = "https://github.com/<%= settings['github'] %>/<%= github_name %>" 13 | gem.license = "MIT" 14 | 15 | gem.files = Dir["{**/}{.*,*}"].select{ |path| File.file?(path) && path !~ /^pkg/ } 16 | gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } 17 | gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) 18 | gem.require_paths = ["lib"] 19 | gem.metadata = { "rubygems_mfa_required" => "true" } 20 | 21 | gem.required_ruby_version = "~> 2.0" 22 | end 23 | -------------------------------------------------------------------------------- /microgem.gemspec: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | 3 | require File.dirname(__FILE__) + "/lib/microgem/version" 4 | 5 | Gem::Specification.new do |gem| 6 | gem.name = "microgem" 7 | gem.version = Microgem::VERSION 8 | gem.summary = "Generates new micro gems." 9 | gem.description = "Generates new micro gems. Usage: $ microgem gem_name" 10 | gem.authors = ["Jan Lelis"] 11 | gem.email = ["hi@ruby.consulting"] 12 | gem.homepage = "https://github.com/janlelis/microgem" 13 | gem.license = "MIT" 14 | 15 | gem.files = Dir["{**/,template/.github/**/}{.*,*}"].select{ |path| File.file?(path) && path !~ /^pkg/ } 16 | gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } 17 | gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) 18 | gem.require_paths = ["lib"] 19 | gem.metadata = { "rubygems_mfa_required" => "true" } 20 | gem.add_runtime_dependency 'thor', '~> 0.19.1' 21 | end 22 | -------------------------------------------------------------------------------- /MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015-2021 Jan Lelis 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /template/MIT-LICENSE.txt.tt: -------------------------------------------------------------------------------- 1 | Copyright (c) <%= current_year %> <%= settings['author'] %>, <%= settings['email'] %> 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /template/Rakefile.tt: -------------------------------------------------------------------------------- 1 | # # # 2 | # Get gemspec info 3 | 4 | gemspec_file = Dir["*.gemspec"].first 5 | gemspec = eval File.read(gemspec_file), binding, gemspec_file 6 | info = "#{gemspec.name} | #{gemspec.version} | " \ 7 | "#{gemspec.runtime_dependencies.size} dependencies | " \ 8 | "#{gemspec.files.size} files" 9 | 10 | # # # 11 | # Gem build and install task 12 | 13 | desc info 14 | task :gem do 15 | puts info + "\n\n" 16 | print " "; sh "gem build #{gemspec_file}" 17 | FileUtils.mkdir_p "pkg" 18 | FileUtils.mv "#{gemspec.name}-#{gemspec.version}.gem", "pkg" 19 | puts; sh %{gem install --no-document pkg/#{gemspec.name}-#{gemspec.version}.gem} 20 | end 21 | 22 | # # # 23 | # Start an IRB session with the gem loaded 24 | 25 | desc "#{gemspec.name} | IRB" 26 | task :irb do 27 | sh "irb -I ./lib -r #{gemspec.name.gsub '-','/'}" 28 | end 29 | <% if specs %> 30 | # # # 31 | # Run specs 32 | 33 | desc "#{gemspec.name} | Spec" 34 | task :spec do 35 | if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ 36 | sh "for %f in (spec/\*.rb) do ruby spec/%f" 37 | else 38 | sh "for file in spec/*.rb; do ruby $file; done" 39 | end 40 | end 41 | task default: :spec 42 | <% end %> 43 | -------------------------------------------------------------------------------- /template/.github/workflows/test.yml.tt: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | test: 7 | name: Ruby ${{ matrix.ruby }} (${{ matrix.os }}) 8 | if: "!contains(github.event.head_commit.message, '[skip ci]')" 9 | strategy: 10 | matrix: 11 | ruby: 12 | - '3.3' 13 | - '3.2' 14 | - '3.1' 15 | - '3.0' 16 | - jruby 17 | - truffleruby 18 | os: 19 | - ubuntu-latest 20 | - macos-latest 21 | runs-on: ${{matrix.os}} 22 | steps: 23 | - uses: actions/checkout@v4 24 | - name: Set up Ruby 25 | uses: ruby/setup-ruby@v1 26 | with: 27 | ruby-version: ${{matrix.ruby}} 28 | bundler-cache: true 29 | - name: Run tests 30 | run: bundle exec rake 31 | 32 | test-windows: 33 | name: Ruby ${{ matrix.ruby }} (windows-latest) 34 | if: "!contains(github.event.head_commit.message, '[skip ci]')" 35 | strategy: 36 | matrix: 37 | ruby: 38 | - '3.3' 39 | - '3.2' 40 | - '3.1' 41 | - '3.0' 42 | runs-on: windows-latest 43 | steps: 44 | - uses: actions/checkout@v4 45 | - name: Set up Ruby 46 | uses: ruby/setup-ruby@v1 47 | with: 48 | ruby-version: ${{matrix.ruby}} 49 | bundler-cache: true 50 | # - run: cinst ansicon 51 | - name: Run tests 52 | run: bundle exec rake 53 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## CHANGELOG 2 | 3 | ### 1.1.2 4 | 5 | * Update CI Rubies to 2024 6 | 7 | ### 1.1.1 8 | 9 | * Update CI Rubies to late 2021 10 | * Add MFA requirement to gemspec 11 | 12 | ### 1.1.0 13 | 14 | * Move from Travis CI to GitHub CI 15 | * Rakefile: Make spec runner windows compatible 16 | 17 | ### 1.0.23 18 | 19 | * travis.yml: Specify TruffleRuby at 20.2.0 and remove it from allowed failed 20 | * travis.yml: Update JRuby to 9.2.11.1 21 | 22 | ### 1.0.22 23 | 24 | * travis.yml: Update JRuby to 9.2.11.0 25 | * travis.yml: Don't test 2.3 anymore 26 | 27 | ### 1.0.21 28 | 29 | * Use frozen strings in generated Ruby files 30 | 31 | ### 1.0.20 32 | 33 | * travis.yml: Update Rubies, add 2.7 34 | 35 | ### 1.0.19 36 | 37 | * Add IRB to Gemfile (for bundler) 38 | * Small tweaks (https link, prefer double quotes) 39 | 40 | ### 1.0.18 41 | 42 | * travis.yml: Slim down 43 | 44 | ### 1.0.17 45 | 46 | * travis.yml: Update to Ruby 2.5.5 47 | 48 | ### 1.0.16 49 | 50 | * travis.yml: Update to Ruby 2.6.2, 2.5.4 51 | 52 | ### 1.0.15 53 | 54 | * travis.yml: Update to Ruby 2.6.1 55 | 56 | ### 1.0.14 57 | 58 | * travis.yml: Update Rubies, include Ruby 2.6 59 | 60 | ### 1.0.13 61 | 62 | * travis.yml: Update Rubies 63 | 64 | ### 1.0.12 65 | 66 | * travis.yml: Update Rubies 67 | 68 | ### 1.0.11 69 | 70 | * travis.yml: Update Rubies, remove `cache: bundler` 71 | * Only generate double quotes 72 | * Add "rake" to Gemfile 73 | 74 | ### 1.0.10 75 | 76 | * travis.yml: Update Rubies 77 | * Remove thor warnings 78 | 79 | ### 1.0.9 80 | 81 | * Fix typo in CHANGELOG template: Inital -> Initial 82 | 83 | ### 1.0.8 84 | 85 | * travis.yml: Update Rubies, allow failures for -head 86 | 87 | ### 1.0.7 88 | 89 | * travis: Remove Ruby 2.0, remove rbx, update JRuby 9000 90 | * Also generate Rake default spec task 91 | * Use .svg badge for travis 92 | 93 | ### 1.0.6 94 | 95 | * Add missing thor dependency 96 | * Add Code of Conduct 97 | * Fix for travis Ruby 2.3.0 98 | 99 | ### 1.0.5 100 | 101 | * Add 2.3 + HEAD to .travis.yml 102 | 103 | ### 1.0.4 104 | 105 | * .travis.yml: Fast finish should not be on by default 106 | * gemspec: email data as array 107 | * .gitignore: add /pkg 108 | 109 | 110 | ### 1.0.3 111 | 112 | * Add IRB task 113 | * Make travis run faster 114 | 115 | 116 | ### 1.0.2 117 | 118 | * Fix spec name in .travis.yml 119 | 120 | 121 | ### 1.0.1 122 | 123 | * Improve gemspec template 124 | * Add Rakefile with gem task 125 | * Simplifiy .travis.yml Ruby versions 126 | 127 | 128 | ### 1.0.0 129 | 130 | * Release 131 | 132 | -------------------------------------------------------------------------------- /lib/microgem/generator.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'thor' 4 | require 'json' 5 | 6 | class Microgem::Generator < Thor::Group 7 | include Thor::Actions 8 | 9 | def self.source_root 10 | File.dirname(__FILE__) + '/../../template/' 11 | end 12 | 13 | argument :name 14 | class_option :version, default: "0.1.0" 15 | class_option :info, default: "TODO" 16 | class_option :specs, default: true, type: :boolean 17 | class_option :class, default: false, type: :boolean 18 | class_option :github 19 | 20 | attr_reader :settings 21 | 22 | def load_settings 23 | dotfile_path = File.expand_path("~/.microgem") 24 | if File.exist? dotfile_path 25 | @settings = JSON.load File.read(dotfile_path) 26 | else 27 | @settings = {} 28 | say "This is your first microgem. Please tell me who you are!" 29 | guess_author = `git config user.name`.chomp 30 | guess_author = nil if guess_author.empty? 31 | guess_email = `git config user.email`.chomp 32 | guess_email = nil if guess_email.empty? 33 | guess_github = `git config github.user`.chomp 34 | guess_github = nil if guess_github.empty? 35 | @settings["author"] = ask("Your Name" + (guess_author ? " [#{guess_author}]:" : ":")) 36 | @settings["author"] = guess_author if @settings["author"].empty? && guess_author 37 | @settings["email"] = ask("Your E-Mail" + (guess_email ? " [#{guess_email}]:" : ":")) || guess_email 38 | @settings["email"] = guess_email if @settings["email"].empty? && guess_email 39 | @settings["website"] = ask("Your Website:") 40 | @settings["github"] = ask("Your GitHub Name" + (guess_github ? " [#{guess_github}]:" : ":")) || guess_github 41 | @settings["github"] = guess_github if @settings["github"].empty? && guess_github 42 | File.write dotfile_path, JSON.dump(@settings) 43 | end 44 | end 45 | 46 | def validate_name 47 | unless name =~ /\A[A-Z0-9_-]+\z/i 48 | raise ArgumentError, "invalid gem name: must only contain A-Z, 0-9, _ or -" 49 | end 50 | if module_name =~ /::[^A-Z]/ 51 | raise ArgumentError, "invalid gem name: module names only allowed to start with A-Z" 52 | end 53 | end 54 | 55 | # - - - 56 | 57 | def module_def(index=nil) 58 | options[:class] && index && sub_modules.size == index + 1 ? "class" : "module" 59 | end 60 | 61 | def module_name 62 | name.gsub(/-[_-]*(?![_-]|$)/){ '::' }.gsub(/(^?[_-]+|(?<=:)|^)(.|$)/){ $2.upcase } 63 | end 64 | 65 | def sub_modules 66 | module_name.split '::' 67 | end 68 | 69 | def path 70 | name.gsub(/-[_-]*(?![_-]|$)/){ '/' } 71 | end 72 | 73 | def spec_name 74 | name.gsub(/-[_-]*(?![_-]|$)/){ '_' } 75 | end 76 | 77 | def last_name 78 | path[%r<[^/]+$>] 79 | end 80 | 81 | def specs 82 | options[:specs] 83 | end 84 | 85 | def github_name 86 | options[:github] || name 87 | end 88 | 89 | def info 90 | options[:info] 91 | end 92 | 93 | def version 94 | options[:version] 95 | end 96 | 97 | def current_year 98 | Date.today.year 99 | end 100 | 101 | def generate 102 | directory ".", name, exclude_pattern: %r<_spec.rb|Gemfile|\.github> 103 | if options[:specs] 104 | directory "spec", name + "/spec" 105 | directory ".github", name + "/.github" 106 | copy_file "Gemfile", name + "/Gemfile" 107 | end 108 | end 109 | end 110 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, gender identity and expression, level of experience, 9 | nationality, personal appearance, race, religion, or sexual identity and 10 | orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at opensource@janlelis.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at [http://contributor-covenant.org/version/1/4][version] 72 | 73 | [homepage]: http://contributor-covenant.org 74 | [version]: http://contributor-covenant.org/version/1/4/ 75 | -------------------------------------------------------------------------------- /template/CODE_OF_CONDUCT.md.tt: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, gender identity and expression, level of experience, 9 | nationality, personal appearance, race, religion, or sexual identity and 10 | orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at <%= settings['conduct_email'] || settings['email'] %>. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at [http://contributor-covenant.org/version/1/4][version] 72 | 73 | [homepage]: http://contributor-covenant.org 74 | [version]: http://contributor-covenant.org/version/1/4/ 75 | --------------------------------------------------------------------------------