alacritty_themes 0.1.3 → 0.1.4

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: c3b80a8eaa73cc20db767c821bf75f7eaf3d66837567d912667021a33eff7efb
4
- data.tar.gz: 3d2bd727ad856da6850a413b758f9bf23e8ed5bb9b538c3562b104a3fa396b7a
3
+ metadata.gz: 2230b5f4993021f0fedb68fcd8e9bbc034be2b01418268ab1af1405caef44186
4
+ data.tar.gz: 7d39c7954afed54f12b4b0edbe1f858c2c59c325b1f088d66d9b6bb200719738
5
5
  SHA512:
6
- metadata.gz: 83f7a669db25b316d183c759feb1e064b37d64fa51e56a48f91a0979d1c51a49794ab50ffba6a1ad492e6b81f2e190703d2ff1f3c097d6c87ee566e98bff27e1
7
- data.tar.gz: f42dda3a46e2c331e090e5e8970eefcd7bae131fdfff15dfa9688c8dbc9d002a2c1b642ee6095075d3e7608d738c7093405f94aa648df09f7e9f7b04789ed792
6
+ metadata.gz: 81266ca24e04d2cd20b1341240b0a5f9c7f9a143799074b6da4cfd19469d88fc0a69cbcdff7d4607e27d68bbf3fe2998d4181f8cef6adaccb9043391eb081595
7
+ data.tar.gz: d8f1cbcb16ffe8c333d6fef5b49bc01937bc10d17a49272d2b109876ef85cd8aced61f0bc049124a656c096c298571844147b065fe8cc81438a7b38d46035aef
@@ -0,0 +1,11 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "bundler"
9
+ directory: "/"
10
+ schedule:
11
+ interval: "daily"
@@ -8,7 +8,7 @@ jobs:
8
8
 
9
9
  strategy:
10
10
  matrix:
11
- ruby-version: [3.0.1, 2.7.5]
11
+ ruby-version: [ruby-head, 3.0.1, 2.7.5]
12
12
 
13
13
  steps:
14
14
  - uses: actions/checkout@v2
data/.rubocop.yml CHANGED
@@ -14,6 +14,17 @@ Style/StringLiteralsInInterpolation:
14
14
  Enabled: true
15
15
  EnforcedStyle: double_quotes
16
16
 
17
+ Metrics/BlockLength:
18
+ Enabled: false
19
+
17
20
  RSpec/DescribedClass:
18
21
  Enabled: true
19
22
  EnforcedStyle: explicit
23
+
24
+ RSpec/MultipleExpectations:
25
+ Enabled: true
26
+ Max: 2
27
+
28
+ RSpec/NestedGroups:
29
+ Enabled: true
30
+ Max: 4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.4] - 2022-03-21
4
+
5
+ ### Added
6
+
7
+ - Add dependabot config
8
+ - Add FakeFs gem
9
+ - Add ruby compatibility with `ruby-head`
10
+
11
+ ### Changed
12
+
13
+ - Creates the alacritty.yml file if doesn't exist
14
+ - Move the alacritty.yml to a backup if the alacritty.yml already exists
15
+
3
16
  ## [0.1.3] - 2022-03-21
4
17
 
5
18
  ### Changed
data/Gemfile CHANGED
@@ -5,8 +5,8 @@ source "https://rubygems.org"
5
5
  # Specify your gem's dependencies in alacritty_themes.gemspec
6
6
  gemspec
7
7
 
8
- gem "rake", "~> 12.0"
8
+ gem "rake", "~> 13.0"
9
9
  gem "rspec", "~> 3.0"
10
- gem "rubocop", "~> 1.7"
10
+ gem "rubocop", "~> 1.26"
11
11
  gem "rubocop-rake", require: false
12
12
  gem "rubocop-rspec", require: false
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- alacritty_themes (0.1.1)
4
+ alacritty_themes (0.1.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -9,15 +9,16 @@ GEM
9
9
  ast (2.4.2)
10
10
  coderay (1.1.3)
11
11
  diff-lcs (1.5.0)
12
+ fakefs (1.4.1)
12
13
  method_source (1.0.0)
13
- parallel (1.21.0)
14
+ parallel (1.22.1)
14
15
  parser (3.1.1.0)
15
16
  ast (~> 2.4.1)
16
- pry (0.13.1)
17
+ pry (0.14.1)
17
18
  coderay (~> 1.1)
18
19
  method_source (~> 1.0)
19
20
  rainbow (3.1.1)
20
- rake (12.3.3)
21
+ rake (13.0.6)
21
22
  regexp_parser (2.2.1)
22
23
  rexml (3.2.5)
23
24
  rspec (3.11.0)
@@ -33,7 +34,7 @@ GEM
33
34
  diff-lcs (>= 1.2.0, < 2.0)
34
35
  rspec-support (~> 3.11.0)
35
36
  rspec-support (3.11.0)
36
- rubocop (1.26.0)
37
+ rubocop (1.26.1)
37
38
  parallel (~> 1.10)
38
39
  parser (>= 3.1.0.0)
39
40
  rainbow (>= 2.2.2, < 4.0)
@@ -56,10 +57,11 @@ PLATFORMS
56
57
 
57
58
  DEPENDENCIES
58
59
  alacritty_themes!
59
- pry (~> 0.13.1)
60
- rake (~> 12.0)
60
+ fakefs (~> 1.4.1)
61
+ pry (~> 0.14.1)
62
+ rake (~> 13.0)
61
63
  rspec (~> 3.0)
62
- rubocop (~> 1.7)
64
+ rubocop (~> 1.26)
63
65
  rubocop-rake
64
66
  rubocop-rspec
65
67
 
@@ -33,5 +33,6 @@ Gem::Specification.new do |spec|
33
33
  spec.require_paths = ["lib"]
34
34
  spec.metadata = { "rubygems_mfa_required" => "true" }
35
35
 
36
- spec.add_development_dependency "pry", "~> 0.13.1"
36
+ spec.add_development_dependency "fakefs", "~> 1.4.1"
37
+ spec.add_development_dependency "pry", "~> 0.14.1"
37
38
  end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "fileutils"
4
+
5
+ module AlacrittyThemes
6
+ module FileHelper # :nodoc:
7
+ def create_file
8
+ FileUtils.touch(file_path)
9
+ end
10
+
11
+ def create_directory_path
12
+ FileUtils.mkdir_p(directory_path)
13
+ end
14
+
15
+ def create_backup_file
16
+ FileUtils.mv(file_path, "#{file_path}.bak")
17
+ end
18
+
19
+ def does_file_exist?
20
+ File.exist?(file_path)
21
+ end
22
+
23
+ def does_path_exist?
24
+ File.directory?(directory_path)
25
+ end
26
+
27
+ def file_path
28
+ File.join(Dir.home, ".config/alacritty/alacritty.yml")
29
+ end
30
+
31
+ def directory_path
32
+ File.dirname(file_path)
33
+ end
34
+ end
35
+ end
@@ -28,7 +28,7 @@ module AlacrittyThemes
28
28
  def add_create_option(options)
29
29
  parser.on("-c", "--create", "Creates file") do
30
30
  options[:command] = :create
31
- options[:message] = "Creating Alacritty file"
31
+ options[:message] = "alacritty.yml was created"
32
32
  end
33
33
  end
34
34
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AlacrittyThemes
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
@@ -2,12 +2,14 @@
2
2
 
3
3
  require "alacritty_themes/version"
4
4
  require_relative "alacritty_themes/parser"
5
+ require_relative "alacritty_themes/file_helper"
5
6
 
6
7
  module AlacrittyThemes
7
8
  class Error < StandardError; end
8
9
 
9
- # CLI entry point
10
- class CLI
10
+ class CLI # :nodoc:
11
+ include FileHelper
12
+
11
13
  def start(argv)
12
14
  options = parse_options(argv)
13
15
  execute_command(options)
@@ -20,6 +22,11 @@ module AlacrittyThemes
20
22
  end
21
23
 
22
24
  def execute_command(options)
25
+ if options[:command] == :create
26
+ create_directory_path unless does_path_exist?
27
+ create_backup_file if does_file_exist?
28
+ create_file
29
+ end
23
30
  puts options[:message]
24
31
  end
25
32
  end
metadata CHANGED
@@ -1,29 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alacritty_themes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
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-22 00:00:00.000000000 Z
11
+ date: 2022-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: fakefs
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.4.1
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.4.1
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: pry
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
31
  - - "~>"
18
32
  - !ruby/object:Gem::Version
19
- version: 0.13.1
33
+ version: 0.14.1
20
34
  type: :development
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
38
  - - "~>"
25
39
  - !ruby/object:Gem::Version
26
- version: 0.13.1
40
+ version: 0.14.1
27
41
  description: |
28
42
  Your favorite collection of themes for alacritty,
29
43
  we initialize with a few themes and you can add more.
@@ -34,6 +48,7 @@ executables:
34
48
  extensions: []
35
49
  extra_rdoc_files: []
36
50
  files:
51
+ - ".github/dependabot.yml"
37
52
  - ".github/workflows/main.yml"
38
53
  - ".gitignore"
39
54
  - ".rspec"
@@ -52,6 +67,7 @@ files:
52
67
  - bin/setup
53
68
  - exe/alacritty_themes
54
69
  - lib/alacritty_themes.rb
70
+ - lib/alacritty_themes/file_helper.rb
55
71
  - lib/alacritty_themes/parser.rb
56
72
  - lib/alacritty_themes/version.rb
57
73
  homepage: https://github.com/juanvqz/alacritty_themes
@@ -74,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
90
  - !ruby/object:Gem::Version
75
91
  version: '0'
76
92
  requirements: []
77
- rubygems_version: 3.1.6
93
+ rubygems_version: 3.3.3
78
94
  signing_key:
79
95
  specification_version: 4
80
96
  summary: A collection of themes for alacritty