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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 27d81af96e4c375b2e56e509da28c05d53d7c7cd1d9f5dbc0c5b7f9c141e2860
4
- data.tar.gz: dcecf67df9537d6936cd81d837198d772df8796da8563616457de3b9bdc109e2
3
+ metadata.gz: b49d6cba7430666418067f9e7099a6a221a5fcb1d93192217726fb9795647ca2
4
+ data.tar.gz: d499243bcb1654d7af54fbfc8571e0037d8fe7effda76a69a8701630ab89f3b2
5
5
  SHA512:
6
- metadata.gz: 6b2caed73535cdfbdf6cb94c5f0a35af214f06d159e8102d61817cabbf529d4ad8e19c614a7033fef214b4e1b5b8a290e8dfee423cd1c790e06d1b3d9de63b54
7
- data.tar.gz: 2c9d10cef76fc4be9494e1c65b84d1edf0e814e2613146adfe0f3737ecbf1d4c5f150ed5c36235d0145e463856b31b9f6c4e3974cbc853dbac1ae4692a3aacd7
6
+ metadata.gz: eca289b64a0fe73caea6a9505ece0a36b43a73d56b0d94d66fd6d901d94c3e79ea8ffaf51e43cdcedb8c65b41f27a3832bf391629ebd165b88c364c5a4e9c653
7
+ data.tar.gz: 4491b547d98dde905e2b3cb148c6dfb27cd066d6be0a3a51c491f71e6500fc0da45fdb9b2ebf51eaa54f523e1e12103260958582afce7b990b2892c349bd1897
data/README.md CHANGED
@@ -18,4 +18,9 @@ if (SECRETS.has_key?("test"))
18
18
  else
19
19
  puts "did not find SECRETS[\"test\"]"
20
20
  end
21
+ ```
22
+
23
+
24
+ # raykit work sample output
25
+ ```shell
21
26
  ```
@@ -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
 
@@ -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
- puts "work: found #{work_repositories.length} matching urls"
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
- puts "work: #{url} #{default_command}"
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
- puts cmd.to_s
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
@@ -295,7 +295,7 @@ module Raykit
295
295
  Dir.chdir(work_dir) do
296
296
  run("git pull")
297
297
  cmd = Raykit::Command.new(cmd)
298
- cmd = cmd.run().summary()
298
+ cmd = cmd.run().summary().details()
299
299
  cmd
300
300
  end
301
301
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raykit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.502
4
+ version: 0.0.504
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow