claiss 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of claiss might be problematic. Click here for more details.

Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/claiss.rb +27 -3
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7b117b78d9275e924380505e1ca1ddb0818490cd1532dd5a31de08b199e1b84
4
- data.tar.gz: 39ba11f151fe5ecd59cc291011ef8611e61f4a83cf4d95427bd3589643be7353
3
+ metadata.gz: c0f324755ac02efc230d061a533eb5ab80123ec65fa8c614290212da27ece964
4
+ data.tar.gz: 0be3363e9516f0248bf62c418b3a9198b23b20471ee6581669626b90c7cbf48b
5
5
  SHA512:
6
- metadata.gz: 4265f73dadbbae241ca6d6dab87b121f5fc931c9f2044c8a159d52031c1b629eec97c4439dbd7879efbc48ad5bb6c36075d40cd8c7c3a5d12a87117d6b580efa
7
- data.tar.gz: b217629b6cc0da245dfe5e1e3b33123a22f52d7037b6c8900688d32291b730a75ef76152be7c059fce5bd2b9d7fb5c932f11fa098bab3355a22a28acb3d92c26
6
+ metadata.gz: c9f18ed1169ddfb66735e52f8ddb357a7db57906089c66d5e5943b0a95bad3b426ff2322344e5046d202550cf493f5786c8e1fb8ce3a19c068c28b05efe7082e
7
+ data.tar.gz: f9c7d2039c6e6f4ba365a192d2a87de0a58b87c007af637b0860f0af830e6c1bb6ed8bdce6f24d446e048fd471a74e02553a28ec5027795ebd94f2e3abdc936c
data/lib/claiss.rb CHANGED
@@ -13,7 +13,7 @@ module Claiss
13
13
 
14
14
  def call(*)
15
15
  spec = Gem::Specification::load("claiss.gemspec")
16
- puts "#{spec.summary}"
16
+ puts "#{spec.description}"
17
17
  puts "Version: #{spec.version}"
18
18
  end
19
19
  end
@@ -32,6 +32,7 @@ module Claiss
32
32
  origin_path = File.expand_path(path)
33
33
  destination_path = File.expand_path("."+ temp_dir)
34
34
 
35
+
35
36
  if !json_file.nil?
36
37
  jfile = File.read(json_file)
37
38
  dict = JSON.parse(jfile)
@@ -47,7 +48,10 @@ module Claiss
47
48
  input = STDIN.gets.chomp!
48
49
  end
49
50
  end
50
- source = File.expand_path(origin_path + "/**/*", __FILE__)
51
+
52
+ dict = {origin_path => destination_path}.merge(dict)
53
+ dict[origin_path] = destination_path
54
+ source = File.expand_path(origin_path + "/**/{*,.*}", __FILE__)
51
55
  Dir.glob(source).reject{ |f| File.directory?(f)}.each do |file_name|
52
56
  destination = file_name
53
57
  text = File.read(file_name) if !File.directory?(file_name)
@@ -63,11 +67,31 @@ module Claiss
63
67
  File.write(destination, text) if !File.directory?(file_name)
64
68
  puts "File: #{destination}, OK" if !File.directory?(file_name)
65
69
  end
66
- puts "done!"
67
70
 
71
+ puts "done! your project is in the #{temp_dir} folder"
68
72
  end
69
73
  end
70
74
 
75
+ class FixRubyPermissions < Dry::CLI::Command
76
+ argument :path, required: true, desc: "The path of your ruby project"
77
+
78
+ def call(path: nil, **)
79
+ if path.nil?
80
+ path = File.basename(Dir.getwd)
81
+ end
82
+
83
+ # Run shell scripts to set permissions.
84
+ directories = `chmod 755 $(find #{path} -type d)`
85
+ files = `chmod 644 $(find #{path} -type f)`
86
+ bundle = `chmod 755 #{path+'/bin/bundle'}`
87
+ rails = `chmod 755 #{path+'/bin/rails'}`
88
+ rake = `chmod 755 #{path+'/bin/rake'}`
89
+ spring = `chmod 755 #{path+'/bin/spring'}`
90
+ end
91
+ end
92
+
93
+
71
94
  register "version", Version, aliases: ["v", "-v", "--version"]
72
95
  register "refactor",Refactor
96
+ register "fix_ruby_permissions",FixRubyPermissions
73
97
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: claiss
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Júlio Papel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-02 00:00:00.000000000 Z
11
+ date: 2024-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  requirements: []
101
- rubygems_version: 3.4.15
101
+ rubygems_version: 3.5.9
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: Laiss AI CLI application Toolbox