raykit 0.0.502 → 0.0.504
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/lib/raykit/configuration.rb +4 -1
- data/lib/raykit/console.rb +9 -3
- data/lib/raykit/git/repository.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b49d6cba7430666418067f9e7099a6a221a5fcb1d93192217726fb9795647ca2
|
4
|
+
data.tar.gz: d499243bcb1654d7af54fbfc8571e0037d8fe7effda76a69a8701630ab89f3b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eca289b64a0fe73caea6a9505ece0a36b43a73d56b0d94d66fd6d901d94c3e79ea8ffaf51e43cdcedb8c65b41f27a3832bf391629ebd165b88c364c5a4e9c653
|
7
|
+
data.tar.gz: 4491b547d98dde905e2b3cb148c6dfb27cd066d6be0a3a51c491f71e6500fc0da45fdb9b2ebf51eaa54f523e1e12103260958582afce7b990b2892c349bd1897
|
data/README.md
CHANGED
data/lib/raykit/configuration.rb
CHANGED
@@ -2,7 +2,7 @@ require "json"
|
|
2
2
|
|
3
3
|
module Raykit
|
4
4
|
class Configuration
|
5
|
-
attr_accessor :root_dir, :auto_setup, :backup_dir
|
5
|
+
attr_accessor :root_dir, :auto_setup, :backup_dir, :log_level
|
6
6
|
|
7
7
|
# Define a subdirectory and filename for the config file in a cross-platform manner.
|
8
8
|
CONFIG_DIR = File.join(Dir.home, ".config", "raykit")
|
@@ -24,12 +24,14 @@ module Raykit
|
|
24
24
|
@root_dir = config_data["root_dir"]
|
25
25
|
@auto_setup = config_data["auto_setup"]
|
26
26
|
@backup_dir = config_data["backup_dir"]
|
27
|
+
@log_level = config_data["log_level"]
|
27
28
|
end
|
28
29
|
|
29
30
|
def set_default_configuration
|
30
31
|
@root_dir = ""
|
31
32
|
@auto_setup = false
|
32
33
|
@backup_dir = "backup"
|
34
|
+
@log_level = Logger::DEBUG
|
33
35
|
end
|
34
36
|
|
35
37
|
def save_configuration
|
@@ -40,6 +42,7 @@ module Raykit
|
|
40
42
|
root_dir: @root_dir,
|
41
43
|
auto_setup: @auto_setup,
|
42
44
|
backup_dir: @backup_dir,
|
45
|
+
log_level: @log_level,
|
43
46
|
}.to_json)
|
44
47
|
end
|
45
48
|
|
data/lib/raykit/console.rb
CHANGED
@@ -159,16 +159,22 @@ module Raykit
|
|
159
159
|
def work
|
160
160
|
pattern = ""
|
161
161
|
pattern = @opts.arguments[1] if @opts.arguments.length > 1
|
162
|
+
logger = Logger.new(STDOUT)
|
163
|
+
logger.level = Configuration.new().log_level
|
164
|
+
logger.debug("work: pattern: #{pattern}")
|
162
165
|
|
163
166
|
work_repositories = REPOSITORIES.matches(pattern)
|
164
167
|
errors = []
|
165
|
-
|
168
|
+
logger.info("work: found #{work_repositories.length} matching urls")
|
169
|
+
#puts "work: found #{work_repositories.length} matching urls"
|
166
170
|
work_repositories.each do |url|
|
167
171
|
default_command = "rake default"
|
168
|
-
|
172
|
+
logger.info("work: #{url} #{default_command}")
|
173
|
+
#puts "work: #{url} #{default_command}"
|
169
174
|
repo = Raykit::Git::Repository.new(url)
|
170
175
|
cmd = repo.work default_command
|
171
|
-
|
176
|
+
logger.info(cmd.to_s)
|
177
|
+
#puts cmd.to_s
|
172
178
|
#exitstatus = work_url(url)
|
173
179
|
#puts " " if @opts.verbose?
|
174
180
|
#return exitstatus if @opts[:stop] && exitstatus != 0
|