alacritty_themes 0.1.0 → 0.1.3

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
  SHA256:
3
- metadata.gz: 4512f9e40bccfba6d7a1edd7191d745c6e6c20cd92a723ab184d986d5a09ff46
4
- data.tar.gz: 12a4a57efb31513fd8793d5afec3587677829221891f84a87df5ba85c8032ea2
3
+ metadata.gz: c3b80a8eaa73cc20db767c821bf75f7eaf3d66837567d912667021a33eff7efb
4
+ data.tar.gz: 3d2bd727ad856da6850a413b758f9bf23e8ed5bb9b538c3562b104a3fa396b7a
5
5
  SHA512:
6
- metadata.gz: a805d1f3a7844243baa5ee724dfedcfefbc3e99e90fccc4178505ff3db4dd9a7a66c49c399928491a09dd576f14d0e317585098812171bad885d8bc832908b71
7
- data.tar.gz: d353bf2d758d73cd303fa2c5842c8dc7ea1c702f216b6c2d002fdd52022b2755127f221529ea3d801cd19f2cf0aa24e7920777e071144669c9de593379ab7c97
6
+ metadata.gz: 83f7a669db25b316d183c759feb1e064b37d64fa51e56a48f91a0979d1c51a49794ab50ffba6a1ad492e6b81f2e190703d2ff1f3c097d6c87ee566e98bff27e1
7
+ data.tar.gz: f42dda3a46e2c331e090e5e8970eefcd7bae131fdfff15dfa9688c8dbc9d002a2c1b642ee6095075d3e7608d738c7093405f94aa648df09f7e9f7b04789ed792
@@ -0,0 +1,21 @@
1
+ name: Ruby
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+
9
+ strategy:
10
+ matrix:
11
+ ruby-version: [3.0.1, 2.7.5]
12
+
13
+ steps:
14
+ - uses: actions/checkout@v2
15
+ - name: Set up Ruby ${{ matrix.ruby-version }}
16
+ uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: ${{ matrix.ruby-version }}
19
+ bundler-cache: true
20
+ - name: Run the default task
21
+ run: bundle exec rake
data/.gitignore CHANGED
@@ -6,6 +6,8 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ *.gem
10
+ Gemfile.lock
9
11
 
10
12
  # rspec failure tracking
11
13
  .rspec_status
data/.rubocop.yml ADDED
@@ -0,0 +1,19 @@
1
+ require:
2
+ - rubocop-rspec
3
+ - rubocop-rake
4
+
5
+ AllCops:
6
+ NewCops: enable
7
+ TargetRubyVersion: 2.7.5
8
+
9
+ Style/StringLiterals:
10
+ Enabled: true
11
+ EnforcedStyle: double_quotes
12
+
13
+ Style/StringLiteralsInInterpolation:
14
+ Enabled: true
15
+ EnforcedStyle: double_quotes
16
+
17
+ RSpec/DescribedClass:
18
+ Enabled: true
19
+ EnforcedStyle: explicit
data/.ruby-gemset CHANGED
@@ -1 +1 @@
1
- alacritty-themes
1
+ alacritty_themes
data/CHANGELOG.md ADDED
@@ -0,0 +1,47 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.3] - 2022-03-21
4
+
5
+ ### Changed
6
+
7
+ - update readme
8
+
9
+ ### Fixed
10
+
11
+ - Fix gem's homepage
12
+
13
+ ## [0.1.2] - 2022-03-21
14
+
15
+ ### Added
16
+
17
+ - Add help option
18
+
19
+ ```ruby
20
+ alacritty_themes --help
21
+ ```
22
+
23
+ - Add version option
24
+
25
+ ```ruby
26
+ alacritty_themes --version
27
+ ```
28
+
29
+ - Add rubocop-rake
30
+ - Add rubocop-rspec
31
+
32
+ ### Changed
33
+
34
+ - rubocop config
35
+
36
+ ## [0.1.1] - 2022-03-16
37
+
38
+ ### Added
39
+
40
+ - Configure rubocop
41
+ - Configure github workflow
42
+
43
+ ## [0.1.0] - 2022-03-15
44
+
45
+ ### Added
46
+
47
+ - Initial commit
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
5
  # Specify your gem's dependencies in alacritty_themes.gemspec
@@ -5,3 +7,6 @@ gemspec
5
7
 
6
8
  gem "rake", "~> 12.0"
7
9
  gem "rspec", "~> 3.0"
10
+ gem "rubocop", "~> 1.7"
11
+ gem "rubocop-rake", require: false
12
+ gem "rubocop-rspec", require: false
data/Gemfile.lock CHANGED
@@ -1,13 +1,25 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- alacritty_themes (0.1.0)
4
+ alacritty_themes (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
+ ast (2.4.2)
10
+ coderay (1.1.3)
9
11
  diff-lcs (1.5.0)
12
+ method_source (1.0.0)
13
+ parallel (1.21.0)
14
+ parser (3.1.1.0)
15
+ ast (~> 2.4.1)
16
+ pry (0.13.1)
17
+ coderay (~> 1.1)
18
+ method_source (~> 1.0)
19
+ rainbow (3.1.1)
10
20
  rake (12.3.3)
21
+ regexp_parser (2.2.1)
22
+ rexml (3.2.5)
11
23
  rspec (3.11.0)
12
24
  rspec-core (~> 3.11.0)
13
25
  rspec-expectations (~> 3.11.0)
@@ -21,14 +33,35 @@ GEM
21
33
  diff-lcs (>= 1.2.0, < 2.0)
22
34
  rspec-support (~> 3.11.0)
23
35
  rspec-support (3.11.0)
36
+ rubocop (1.26.0)
37
+ parallel (~> 1.10)
38
+ parser (>= 3.1.0.0)
39
+ rainbow (>= 2.2.2, < 4.0)
40
+ regexp_parser (>= 1.8, < 3.0)
41
+ rexml
42
+ rubocop-ast (>= 1.16.0, < 2.0)
43
+ ruby-progressbar (~> 1.7)
44
+ unicode-display_width (>= 1.4.0, < 3.0)
45
+ rubocop-ast (1.16.0)
46
+ parser (>= 3.1.1.0)
47
+ rubocop-rake (0.6.0)
48
+ rubocop (~> 1.0)
49
+ rubocop-rspec (2.9.0)
50
+ rubocop (~> 1.19)
51
+ ruby-progressbar (1.11.0)
52
+ unicode-display_width (2.1.0)
24
53
 
25
54
  PLATFORMS
26
55
  ruby
27
56
 
28
57
  DEPENDENCIES
29
58
  alacritty_themes!
59
+ pry (~> 0.13.1)
30
60
  rake (~> 12.0)
31
61
  rspec (~> 3.0)
62
+ rubocop (~> 1.7)
63
+ rubocop-rake
64
+ rubocop-rspec
32
65
 
33
66
  BUNDLED WITH
34
67
  2.1.4
data/README.md CHANGED
@@ -1,44 +1,47 @@
1
- # AlacrittyThemes
1
+ # Alacritty Themes
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/alacritty_themes`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ [![Gem Version](https://badge.fury.io/rb/alacritty_themes.svg)](https://badge.fury.io/rb/alacritty_themes)
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ > NOTE: This gem is work in progress
6
6
 
7
- ## Installation
7
+ Your favorite collection of themes for alacritty,
8
+ we initialize with a few themes and you can add more.
8
9
 
9
- Add this line to your application's Gemfile:
10
+ ## Installation
10
11
 
11
- ```ruby
12
- gem 'alacritty_themes'
12
+ ```bash
13
+ gem install alacritty_themes
13
14
  ```
14
15
 
15
- And then execute:
16
-
17
- $ bundle install
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install alacritty_themes
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
16
  ## Development
28
17
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
18
+ After checking out the repo, run `bin/setup` to install dependencies.
19
+ Then, run `rake spec` to run the tests.
20
+ You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
21
 
31
- 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`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
22
+ To install this gem onto your local machine, run `bundle exec rake install`.
23
+ To release a new version, update the version number in `version.rb`,
24
+ and then run `bundle exec rake release`,
25
+ which will create a git tag for the version, push git commits and tags,
26
+ and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
27
 
33
28
  ## Contributing
34
29
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/alacritty_themes. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/alacritty_themes/blob/master/CODE_OF_CONDUCT.md).
36
-
30
+ Bug reports and pull requests are welcome on GitHub at
31
+ https://github.com/juanvqz/alacritty_themes.
32
+ This project is intended to be a safe,
33
+ welcoming space for collaboration,
34
+ and contributors are expected to adhere to the
35
+ [code of conduct](https://github.com/[USERNAME]/alacritty_themes/blob/master/CODE_OF_CONDUCT.md).
37
36
 
38
37
  ## License
39
38
 
40
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
39
+ The gem is available as open source
40
+ under the terms of the [MIT License](https://opensource.org/licenses/MIT).
41
41
 
42
42
  ## Code of Conduct
43
43
 
44
- Everyone interacting in the AlacrittyThemes project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/alacritty_themes/blob/master/CODE_OF_CONDUCT.md).
44
+ Everyone interacting in the AlacrittyThemes project's codebases,
45
+ issue trackers,
46
+ chat rooms and mailing lists is expected to follow the
47
+ [code of conduct](https://github.com/[USERNAME]/alacritty_themes/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile CHANGED
@@ -1,6 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bundler/gem_tasks"
2
4
  require "rspec/core/rake_task"
5
+ require "rubocop/rake_task"
3
6
 
4
7
  RSpec::Core::RakeTask.new(:spec)
5
8
 
6
- task :default => :spec
9
+ RuboCop::RakeTask.new do |task|
10
+ task.requires << "rubocop-rake"
11
+ task.requires << "rubocop-rspec"
12
+ end
13
+
14
+ task default: %i[spec rubocop]
@@ -1,16 +1,21 @@
1
- require_relative 'lib/alacritty_themes/version'
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/alacritty_themes/version"
2
4
 
3
5
  Gem::Specification.new do |spec|
4
6
  spec.name = "alacritty_themes"
5
7
  spec.version = AlacrittyThemes::VERSION
6
8
  spec.authors = ["Juan Vasquez"]
7
- spec.email = ["isc.juanvasquez@gmail.com"]
9
+ spec.email = ["me@juanvasquez.dev"]
8
10
 
9
- spec.summary = %q{A collection of themes for alacritty}
10
- spec.description = %q{A collection of themes for alacritty}
11
- spec.homepage = "https://github.com/juanvasquez/alacritty_themes"
11
+ spec.summary = "A collection of themes for alacritty"
12
+ spec.description = <<~DESC
13
+ Your favorite collection of themes for alacritty,
14
+ we initialize with a few themes and you can add more.
15
+ DESC
16
+ spec.homepage = "https://github.com/juanvqz/alacritty_themes"
12
17
  spec.license = "MIT"
13
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
18
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.5")
14
19
 
15
20
  spec.metadata["allowed_push_host"] = "https://rubygems.org"
16
21
 
@@ -20,10 +25,13 @@ Gem::Specification.new do |spec|
20
25
 
21
26
  # Specify which files should be added to the gem when it is released.
22
27
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
28
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
24
29
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
30
  end
26
31
  spec.bindir = "exe"
27
32
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
33
  spec.require_paths = ["lib"]
34
+ spec.metadata = { "rubygems_mfa_required" => "true" }
35
+
36
+ spec.add_development_dependency "pry", "~> 0.13.1"
29
37
  end
data/bin/console CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require "bundler/setup"
4
5
  require "alacritty_themes"
data/exe/alacritty_themes CHANGED
@@ -1,3 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require "alacritty_themes"
5
+
6
+ AlacrittyThemes::CLI.new.start(ARGV)
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "optparse"
4
+
5
+ module AlacrittyThemes
6
+ # Arguments parser
7
+ module Parser
8
+ class << self
9
+ def from(argv)
10
+ options = {}
11
+
12
+ options[:parser] = parser
13
+ add_banner
14
+ add_create_option(options)
15
+ add_version_option(options)
16
+ add_help_option(options)
17
+ parser.parse!(argv)
18
+
19
+ options
20
+ rescue OptionParser::ParseError => e
21
+ { command: :error, message: e.message }
22
+ end
23
+
24
+ def parser
25
+ @parser ||= OptionParser.new
26
+ end
27
+
28
+ def add_create_option(options)
29
+ parser.on("-c", "--create", "Creates file") do
30
+ options[:command] = :create
31
+ options[:message] = "Creating Alacritty file"
32
+ end
33
+ end
34
+
35
+ def add_version_option(options)
36
+ parser.on("-v", "--version", "Shows version") do
37
+ options[:command] = :version
38
+ options[:message] = "Alacritty Themes v#{AlacrittyThemes::VERSION}"
39
+ end
40
+ end
41
+
42
+ def add_help_option(options)
43
+ parser.on("-h", "--help", "Shows help") do
44
+ options[:command] = :help
45
+ options[:message] = parser.help
46
+ end
47
+ end
48
+
49
+ def add_banner
50
+ parser.banner = "Usage: alacritty_themes [options]"
51
+ end
52
+ end
53
+ end
54
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module AlacrittyThemes
2
- VERSION = "0.1.0"
4
+ VERSION = "0.1.3"
3
5
  end
@@ -1,6 +1,26 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "alacritty_themes/version"
4
+ require_relative "alacritty_themes/parser"
2
5
 
3
6
  module AlacrittyThemes
4
7
  class Error < StandardError; end
5
- # Your code goes here...
8
+
9
+ # CLI entry point
10
+ class CLI
11
+ def start(argv)
12
+ options = parse_options(argv)
13
+ execute_command(options)
14
+ end
15
+
16
+ private
17
+
18
+ def parse_options(argv)
19
+ Parser.from(argv)
20
+ end
21
+
22
+ def execute_command(options)
23
+ puts options[:message]
24
+ end
25
+ end
6
26
  end
metadata CHANGED
@@ -1,27 +1,46 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alacritty_themes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Vasquez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-16 00:00:00.000000000 Z
12
- dependencies: []
13
- description: A collection of themes for alacritty
11
+ date: 2022-03-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: pry
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.13.1
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.13.1
27
+ description: |
28
+ Your favorite collection of themes for alacritty,
29
+ we initialize with a few themes and you can add more.
14
30
  email:
15
- - isc.juanvasquez@gmail.com
31
+ - me@juanvasquez.dev
16
32
  executables:
17
33
  - alacritty_themes
18
34
  extensions: []
19
35
  extra_rdoc_files: []
20
36
  files:
37
+ - ".github/workflows/main.yml"
21
38
  - ".gitignore"
22
39
  - ".rspec"
40
+ - ".rubocop.yml"
23
41
  - ".ruby-gemset"
24
42
  - ".travis.yml"
43
+ - CHANGELOG.md
25
44
  - CODE_OF_CONDUCT.md
26
45
  - Gemfile
27
46
  - Gemfile.lock
@@ -33,15 +52,13 @@ files:
33
52
  - bin/setup
34
53
  - exe/alacritty_themes
35
54
  - lib/alacritty_themes.rb
55
+ - lib/alacritty_themes/parser.rb
36
56
  - lib/alacritty_themes/version.rb
37
- homepage: https://github.com/juanvasquez/alacritty_themes
57
+ homepage: https://github.com/juanvqz/alacritty_themes
38
58
  licenses:
39
59
  - MIT
40
60
  metadata:
41
- allowed_push_host: https://rubygems.org
42
- homepage_uri: https://github.com/juanvasquez/alacritty_themes
43
- source_code_uri: https://github.com/juanvasquez/alacritty_themes
44
- changelog_uri: https://github.com/juanvasquez/alacritty_themes/blob/master/CHANGELOG.md
61
+ rubygems_mfa_required: 'true'
45
62
  post_install_message:
46
63
  rdoc_options: []
47
64
  require_paths:
@@ -50,7 +67,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
50
67
  requirements:
51
68
  - - ">="
52
69
  - !ruby/object:Gem::Version
53
- version: 2.3.0
70
+ version: 2.7.5
54
71
  required_rubygems_version: !ruby/object:Gem::Requirement
55
72
  requirements:
56
73
  - - ">="