Skip to content

Commit

Permalink
🎨 A bunch of cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
myles committed Dec 22, 2023
1 parent 309a912 commit 1481c64
Show file tree
Hide file tree
Showing 21 changed files with 200 additions and 138 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6

- name: Install dependencies
run: bundle install

- name: Run tests
run: bundle exec rake
62 changes: 55 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,59 @@
/.bundle/
/.yardoc
/_yardoc/
.idea/
spec/fixtures/.jekyll-cache/

*.gem
*.rbc
/.config
/coverage/
/doc/
/InstalledFiles
/pkg/
/spec/reports/
/spec/examples.txt
/test/tmp/
/test/version_tmp/
/tmp/
/vendor/
/spec/dest/
/designs/

# Used by dotenv library to load environment variables.
.env

# Ignore Byebug command history file.
.byebug_history

## Specific to RubyMotion:
.dat*
.repl_history
build/
*.bridgesupport
build-iPhoneOS/
build-iPhoneSimulator/

## Specific to RubyMotion (use of CocoaPods):
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# vendor/Pods/

## Documentation cache and generated files:
/.yardoc/
/_yardoc/
/doc/
/rdoc/

## Environment normalization:
/.bundle/
/vendor/bundle
/lib/bundler/man/

# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
# .ruby-version
# .ruby-gemset

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc

# Used by RuboCop. Remote config files pulled in from inherit_from directive.
.rubocop-https?--*
15 changes: 15 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
AllCops:
NewCops: enable
Exclude:
- "spec/**/*"
- "vendor/**/*"
TargetRubyVersion: 2.7

Layout:
Enabled: false

Metrics:
Enabled: false

Style:
Enabled: false
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ I love to get pull requests from everyone. By participating in this project, you

Set up your machine:

./bin/setup
make setup

Make sure the tests pass

./bin/test
make test

Make your change. Add tests for your change. Make the tests pass:

./bin/test
make test

Push to your fork and [submit a pull request](https://github.com/myles/jekyll-typogrify/compare/).
13 changes: 8 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
source 'https://rubygems.org'
source "https://rubygems.org"

gem 'typogruby'
gem 'titlecase'
gem "titlecase"
gem "typogruby"

group :test do
gem 'simplecov'
gem 'codeclimate-test-reporter', '~> 1.0.0'
gem "codeclimate-test-reporter", "~> 1.0.0"
gem "pry"
gem "rubocop"
gem "rufo"
gem "simplecov"
end

gemspec
30 changes: 30 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ GEM
specs:
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
ast (2.4.2)
codeclimate-test-reporter (1.0.8)
simplecov (<= 0.13)
coderay (1.1.3)
colorator (1.1.0)
concurrent-ruby (1.1.6)
diff-lcs (1.3)
Expand Down Expand Up @@ -54,13 +56,24 @@ GEM
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
method_source (1.0.0)
parallel (1.24.0)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
pathutil (0.16.2)
forwardable-extended (~> 2.6)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.6)
racc (1.7.3)
rainbow (3.1.1)
rake (13.0.1)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (2.8.3)
rexml (3.2.5)
rouge (3.20.0)
rspec (3.7.0)
Expand All @@ -76,7 +89,21 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.0)
rubocop (1.42.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.2.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.24.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
ruby-progressbar (1.13.0)
rubypants (0.6.0)
rufo (0.16.3)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
Expand All @@ -100,8 +127,11 @@ DEPENDENCIES
codeclimate-test-reporter (~> 1.0.0)
jekyll
jekyll-typogrify!
pry
rake (~> 13.0)
rspec (~> 3.0)
rubocop
rufo
simplecov
titlecase
typogruby
Expand Down
29 changes: 29 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.PHONY: setup
setup:
bundle install --path vendor/bundle

.PHONY: test
test:
bundle exec rake

.PHONY: jekyll
jekyll:
bundle exec jekyll serve \
--config ./spec/fixtures/_config.yml \
-d ./spec/dest \
-s ./spec/fixtures/ \
--watch

.PHONY: console
console:
bundle exec ruby bin/console

.PHONY: lint
lint:
bundle exec rufo -c .
bundle exec rubocop

.PHONY: lintfix
lintfix:
bundle exec rufo .
bundle exec rubocop -a
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Identify em dashes and surround them with a span.

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
After checking out the repo, run `make setup` to install dependencies. Then, run `make console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

Expand Down
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "bundler/gem_tasks"
require 'rspec/core/rake_task'
require "rspec/core/rake_task"

RSpec::Core::RakeTask.new(:spec)

task :default => :spec
task :default => :spec
25 changes: 0 additions & 25 deletions appveyor.yml

This file was deleted.

11 changes: 2 additions & 9 deletions bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,5 @@
require "bundler/setup"
require "jekyll/typogrify"

# 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"
# Pry.start

require "irb"
IRB.start
require "pry"
Pry.start
5 changes: 0 additions & 5 deletions bin/server

This file was deleted.

5 changes: 0 additions & 5 deletions bin/setup

This file was deleted.

5 changes: 0 additions & 5 deletions bin/test

This file was deleted.

33 changes: 17 additions & 16 deletions jekyll-typogrify.gemspec
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'jekyll/typogrify/version'
require "jekyll/typogrify/version"

Gem::Specification.new do |spec|
spec.name = "jekyll-typogrify"
spec.version = Jekyll::Typogrify::VERSION
spec.summary = %q{A Jekyll plugin that improves the typography of your Liquid templates.}
spec.description = %q{A Jekyll plugin that improves the typography of your Liquid templates.}
spec.license = "MIT"
spec.name = "jekyll-typogrify"
spec.version = Jekyll::Typogrify::VERSION
spec.summary = %q{A Jekyll plugin that improves the typography of your Liquid templates.}
spec.description = %q{A Jekyll plugin that improves the typography of your Liquid templates.}
spec.license = "MIT"

spec.authors = ["Myles Braithwaite"]
spec.email = ["me@mylesbraithwaite.com"]
spec.authors = ["Myles Braithwaite"]
spec.email = ["me@mylesbraithwaite.com"]

spec.homepage = "http://myles.github.io/jekyll-typogrify/"
spec.homepage = "https://myles.github.io/jekyll-typogrify/"

spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_runtime_dependency "typogruby"
spec.add_runtime_dependency "titlecase"
spec.add_runtime_dependency "typogruby"

spec.add_development_dependency "bundler", "~> 1.7"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "jekyll"
spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "rspec", "~> 3.0"
spec.metadata["rubygems_mfa_required"] = "true"
end
4 changes: 2 additions & 2 deletions lib/jekyll-typogrify.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# rubocop: disable FileName
require "jekyll/typogrify"
# rubocop: disable Naming/FileName
require "jekyll/typogrify"
Loading

0 comments on commit 1481c64

Please sign in to comment.