yorobot 1.1.0 → 2026.6.13

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.
Files changed (9) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +4 -4
  3. data/README.md +23 -24
  4. data/Rakefile +32 -34
  5. data/bin/yo +17 -17
  6. data/bin/yorobot +17 -17
  7. data/lib/yorobot/version.rb +24 -25
  8. data/lib/yorobot.rb +137 -125
  9. metadata +10 -39
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6cfbe776d81878255808559a2b04b9e5127749d6
4
- data.tar.gz: c4cd78e6c6861b15a304919bc4c365d9bb30d086
2
+ SHA256:
3
+ metadata.gz: 92b36ab6713e30294513f4112bb5bfb38048d1acce02f2cd32d02dd4f0bcff1f
4
+ data.tar.gz: 59e24c70e6848ceb8ebeab85adebf5752a3c84213714942cbc463cd6adfc8b07
5
5
  SHA512:
6
- metadata.gz: 868dd686ac6e0bff72a7f3e394e76a4752bd2aa71f70db7633aefd8fafb64b702e91a76bc250a9f29bcde17bc1f4248707c9e541a59a8b550d4b0869c129cff0
7
- data.tar.gz: daec8b3a92615b8d144395530ea2866d8e632b8682585c1b7c187e8fce25812a66069c631e84f6f29e9e23c58149020e6cde7af06ee89ab2e98c623033be4cf0
6
+ metadata.gz: 261aeeaf8db19674d14aee57e3bb03c124276ca9f33dd0a7f5c67c4b9f0a00cc8e5eac84c510f5180a2d1bfc13e56018d1ec4f0708d399fd5279596e6db7666b
7
+ data.tar.gz: 17f1b81b85ace6fde8978fc07e9dd663bb6a6db3345712a91b975d7f28cafdbe39ffd8f176a1562971540e33e25b1cf8e9e2ab9d588e81a183e8153c0f2ee1f6
data/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ### 0.0.1 / 2020-10-19
2
-
3
- * Everything is new. First release.
4
-
1
+ ### 2026.6.13
2
+ ### 0.0.1 / 2020-10-19
3
+
4
+ * Everything is new. First release.
data/README.md CHANGED
@@ -1,24 +1,23 @@
1
- # yorobot
2
-
3
- yorobot gem - yo, robot - automate, automate, automate - ready to use scripts and command line tool
4
-
5
-
6
- * home :: [github.com/rubycoco/git](https://github.com/rubycoco/git)
7
- * bugs :: [github.com/rubycoco/git/issues](https://github.com/rubycoco/git/issues)
8
- * gem :: [rubygems.org/gems/yorobot](https://rubygems.org/gems/yorobot)
9
- * rdoc :: [rubydoc.info/gems/yorobot](http://rubydoc.info/gems/yorobot)
10
-
11
-
12
-
13
- ## Usage
14
-
15
- To be done
16
-
17
-
18
-
19
-
20
- ## License
21
-
22
- The `yorobot` scripts are dedicated to the public domain.
23
- Use it as you please with no restrictions whatsoever.
24
-
1
+ # yorobot
2
+
3
+ yorobot gem - yo, robot - automate, automate, automate - ready to use scripts and command line tool
4
+
5
+
6
+ * home :: [github.com/rubycoco/git](https://github.com/rubycocos/git)
7
+ * bugs :: [github.com/rubycoco/git/issues](https://github.com/rubycocos/git/issues)
8
+ * gem :: [rubygems.org/gems/yorobot](https://rubygems.org/gems/yorobot)
9
+ * rdoc :: [rubydoc.info/gems/yorobot](http://rubydoc.info/gems/yorobot)
10
+
11
+
12
+
13
+ ## Usage
14
+
15
+ To be done
16
+
17
+
18
+
19
+
20
+ ## License
21
+
22
+ The `yorobot` scripts are dedicated to the public domain.
23
+ Use as you please with no restrictions whatsoever.
data/Rakefile CHANGED
@@ -1,34 +1,32 @@
1
- require 'hoe'
2
- require './lib/yorobot/version.rb'
3
-
4
- Hoe.spec 'yorobot' do
5
-
6
- self.version = Yorobot::Module::Tool::VERSION
7
-
8
- self.summary = "yorbot gem - yo, robot - automate, automate, automate - ready to use scripts and command line tool"
9
- self.description = summary
10
-
11
- self.urls = { home: 'https://github.com/rubycoco/git' }
12
-
13
- self.author = 'Gerald Bauer'
14
- self.email = 'ruby-talk@ruby-lang.org'
15
-
16
- # switch extension to .markdown for gihub formatting
17
- self.readme_file = 'README.md'
18
- self.history_file = 'CHANGELOG.md'
19
-
20
- self.extra_deps = [
21
- ['flow-lite', '>= 1.1.0'],
22
- ['gitti', '>= 0.6.1'],
23
- ['hubba', '>= 1.0.0'],
24
- ['hubba-reports', '>= 1.0.1'],
25
- ['monos', '>= 1.1.1'], ## todo/check: just add monofile - why? why not?
26
- ]
27
-
28
- self.licenses = ['Public Domain']
29
-
30
- self.spec_extras = {
31
- required_ruby_version: '>= 2.2.2'
32
- }
33
-
34
- end
1
+ require 'hoe'
2
+ require './lib/yorobot/version.rb'
3
+
4
+ Hoe.spec 'yorobot' do
5
+
6
+ self.version = Yorobot::Module::Tool::VERSION
7
+
8
+ self.summary = "yorbot gem - yo, robot - automate, automate, automate - ready to use scripts and command line tool"
9
+ self.description = summary
10
+
11
+ self.urls = { home: 'https://github.com/rubycocos/git' }
12
+
13
+ self.author = 'Gerald Bauer'
14
+ self.email = 'gerald.bauer@gmail.com'
15
+
16
+ # switch extension to .markdown for gihub formatting
17
+ self.readme_file = 'README.md'
18
+ self.history_file = 'CHANGELOG.md'
19
+
20
+ self.extra_deps = [
21
+ ['flow-lite', '>= 1.1.0'],
22
+ ['gitti', '>= 0.6.1'],
23
+ ['monos', '>= 1.1.1'], ## todo/check: just add monofile - why? why not?
24
+ ]
25
+
26
+ self.licenses = ['Public Domain']
27
+
28
+ self.spec_extras = {
29
+ required_ruby_version: '>= 2.2.2'
30
+ }
31
+
32
+ end
data/bin/yo CHANGED
@@ -1,17 +1,17 @@
1
- #!/usr/bin/env ruby
2
-
3
- ###################
4
- # DEV TIPS:
5
- #
6
- # For local testing run like:
7
- #
8
- # ruby -Ilib bin/yo
9
- #
10
- # Set the executable bit in Linux. Example:
11
- #
12
- # % chmod a+x bin/yo
13
- #
14
-
15
- require 'yorobot'
16
-
17
- Yorobot::Tool.main
1
+ #!/usr/bin/env ruby
2
+
3
+ ###################
4
+ # DEV TIPS:
5
+ #
6
+ # For local testing run like:
7
+ #
8
+ # ruby -Ilib bin/yo
9
+ #
10
+ # Set the executable bit in Linux. Example:
11
+ #
12
+ # % chmod a+x bin/yo
13
+ #
14
+
15
+ require 'yorobot'
16
+
17
+ Yorobot::Tool.main
data/bin/yorobot CHANGED
@@ -1,17 +1,17 @@
1
- #!/usr/bin/env ruby
2
-
3
- ###################
4
- # DEV TIPS:
5
- #
6
- # For local testing run like:
7
- #
8
- # ruby -Ilib bin/yorobot
9
- #
10
- # Set the executable bit in Linux. Example:
11
- #
12
- # % chmod a+x bin/yorobot
13
- #
14
-
15
- require 'yorobot'
16
-
17
- Yorobot::Tool.main
1
+ #!/usr/bin/env ruby
2
+
3
+ ###################
4
+ # DEV TIPS:
5
+ #
6
+ # For local testing run like:
7
+ #
8
+ # ruby -Ilib bin/yorobot
9
+ #
10
+ # Set the executable bit in Linux. Example:
11
+ #
12
+ # % chmod a+x bin/yorobot
13
+ #
14
+
15
+ require 'yorobot'
16
+
17
+ Yorobot::Tool.main
@@ -1,25 +1,24 @@
1
-
2
- module Yorobot
3
- module Module
4
- module Tool
5
- MAJOR = 1 ## todo: namespace inside version or something - why? why not??
6
- MINOR = 1
7
- PATCH = 0
8
- VERSION = [MAJOR,MINOR,PATCH].join('.')
9
-
10
- def self.version
11
- VERSION
12
- end
13
-
14
- def self.banner
15
- "yorobot/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
16
- end
17
-
18
- def self.root
19
- File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )
20
- end
21
-
22
- end # module Tool
23
- end # module Module
24
- end # module Yorobot
25
-
1
+
2
+ module Yorobot
3
+ module Module
4
+ module Tool
5
+ MAJOR = 2026 ## todo: namespace inside version or something - why? why not??
6
+ MINOR = 6
7
+ PATCH = 13
8
+ VERSION = [MAJOR,MINOR,PATCH].join('.')
9
+
10
+ def self.version
11
+ VERSION
12
+ end
13
+
14
+ def self.banner
15
+ "yorobot/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
16
+ end
17
+
18
+ def self.root
19
+ File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )
20
+ end
21
+
22
+ end # module Tool
23
+ end # module Module
24
+ end # module Yorobot
data/lib/yorobot.rb CHANGED
@@ -1,125 +1,137 @@
1
- require 'flow-lite'
2
-
3
-
4
- ####
5
- # add more 3rd party gems / libs to flow "prologue / prelude"
6
- #
7
- # require 'computer' # add shell run/call etc. machinery
8
- # add via gitti & hubba
9
- require 'gitti'
10
- require 'hubba'
11
- require 'hubba/reports'
12
- require 'mono'
13
-
14
-
15
- # our own code
16
- require 'yorobot/version' # note: let version always go first
17
-
18
-
19
-
20
- #### add predefined steps
21
- module Flow
22
- class Base
23
-
24
- =begin
25
- # check ssh
26
- if [ ! -d ~/.ssh ]; then mkdir ~/.ssh; fi
27
- echo "$SSH_KEY" > ~/.ssh/id_rsa
28
- chmod 600 ~/.ssh/id_rsa
29
- echo "ssh directory - ~/.ssh:"
30
- ls -la ~/.ssh
31
- # ssh -vT git@github.com
32
-
33
- # check git
34
- git --version
35
- git config --global user.name "Yo Robot"
36
- git config --global user.email "gerald.bauer+yorobot@gmail.com"
37
- git config -l --show-origin
38
- =end
39
- def step_adduser
40
- ##############
41
- ## setup ssh
42
-
43
- ssh_key = ENV['SSH_KEY']
44
-
45
- if ssh_key.nil?
46
- STDERR.puts "!! ERROR - required SSH_KEY env(ironment) variable missing"
47
- exit 1
48
- end
49
-
50
- ssh_path = File.expand_path( '~/.ssh' )
51
-
52
- if File.exist?( "#{ssh_path}/id_rsa" )
53
- STDERR.puts "!! ERROR - ssh key >#{ssh_path}/id_rsa< already exists"
54
- exit 1
55
- end
56
-
57
- ## make sure path exists
58
- FileUtils.mkdir_p( ssh_path ) unless Dir.exist?( ssh_path )
59
- puts "--> writing ssh key to >#{ssh_path}/id_rsa<..."
60
- File.open( "#{ssh_path}/id_rsa", 'w:utf-8' ) do |f|
61
- f.write( ssh_key )
62
- end
63
- ## note: ssh key must be "private" only access by owner (otherwise) WILL NOT work
64
- ## res = File.chmod( 0600, "#{ssh_path}/id_rsa" )
65
- ## puts res ## returns number of files processed; should be 1 - assert - why? why not?
66
- Computer::Shell.run( %Q{chmod 600 #{ssh_path}/id_rsa} )
67
-
68
- Computer::Shell.run( %Q{ls -la #{ssh_path}} )
69
- # ssh -vT git@github.com
70
-
71
-
72
- #####
73
- ## setup git
74
- ## git --version
75
- Git.version
76
-
77
- user_name = ENV['YOROBOT_NAME'] || ENV['YO_NAME'] || 'Yo Robot'
78
- user_email = ENV['YOROBOT_EMAIL'] || ENV['YO_EMAIL'] || 'gerald.bauer+yorobot@gmail.com'
79
-
80
- Computer::Shell.run( %Q{git config --global user.name "#{user_name}"} )
81
- Computer::Shell.run( %Q{git config --global user.email "#{user_email}"} )
82
-
83
- Computer::Shell.run( %Q{git config -l --show-origin} )
84
- end
85
-
86
- end # class Base
87
- end # module Flow
88
-
89
-
90
-
91
- module Yorobot
92
- class Tool
93
- def self.main( args=ARGV )
94
-
95
- ## setup/check mono root
96
- puts "[flow] pwd: #{Dir.pwd}"
97
-
98
-
99
- ## quick hack:
100
- ## if /sites does not exists
101
- ## assume running with GitHub Actions or such
102
- ## and use working dir as root? or change to home dir ~/ or ~/mono - why? why not?
103
- ##
104
- ## in the future use some -e/-env(ironemt) settings and scripts - why? why not?
105
- if Dir.exist?( 'C:/Sites' )
106
- Mono.root = 'C:/Sites' ## use local (dev) setup for testing flow steps
107
-
108
- puts "[flow] assume local (dev) setup for testing"
109
- else
110
- Mono.root = Dir.pwd
111
-
112
- ## for debugging print / walk mono (source) tree
113
- Mono.walk
114
- end
115
- puts "[flow] Mono.root: #{Mono.root}"
116
-
117
-
118
- ## pass along to "standard" flow engine
119
- ::Flow::Tool.main( args )
120
- end
121
- end # class Tool
122
- end # module Yorobot
123
-
124
-
125
- puts Yorobot::Module::Tool.banner # say hello
1
+ require 'flow-lite'
2
+
3
+
4
+ ####
5
+ # add more 3rd party gems / libs to flow "prologue / prelude"
6
+ #
7
+ # require 'computer' # add shell run/call etc. machinery
8
+ # add via gitti (git command-line support)
9
+ #
10
+ # note - make hubba (github json api support) optional for now
11
+ require 'gitti'
12
+ require 'mono'
13
+
14
+
15
+
16
+ # our own code
17
+ require_relative 'yorobot/version' # note: let version always go first
18
+
19
+
20
+ #############################
21
+ #### add predefined steps
22
+ #### - adduser
23
+
24
+
25
+ module Flow
26
+ class Base
27
+
28
+ =begin
29
+ #
30
+ # note - change id_rsa to id_ed25519 !!!
31
+
32
+ # check ssh
33
+ if [ ! -d ~/.ssh ]; then mkdir ~/.ssh; fi
34
+ echo "$SSH_KEY" > ~/.ssh/id_ed25519
35
+ chmod 600 ~/.ssh/id_ed25519
36
+ echo "ssh directory - ~/.ssh:"
37
+ ls -la ~/.ssh
38
+ ssh -vT git@github.com
39
+
40
+ # check git
41
+ git --version
42
+ git config --global user.name "Yo Robot"
43
+ git config --global user.email "gerald.bauer+yorobot@gmail.com"
44
+ git config -l --show-origin
45
+ =end
46
+
47
+
48
+ def step_adduser
49
+ ##############
50
+ ## setup ssh
51
+
52
+ ssh_key = ENV['SSH_KEY']
53
+
54
+ if ssh_key.nil?
55
+ STDERR.puts "!! ERROR - required SSH_KEY env(ironment) variable missing"
56
+ exit 1
57
+ end
58
+
59
+ ssh_path = File.expand_path( '~/.ssh' )
60
+
61
+ if File.exist?( "#{ssh_path}/id_ed25519" )
62
+ STDERR.puts "!! ERROR - ssh key >#{ssh_path}/id_ed25519< already exists"
63
+ exit 1
64
+ end
65
+
66
+ ## make sure path exists
67
+ FileUtils.mkdir_p( ssh_path ) unless Dir.exist?( ssh_path )
68
+ puts "--> writing ssh key to >#{ssh_path}/id_ed25519<..."
69
+ File.open( "#{ssh_path}/id_ed25519", 'w:utf-8' ) do |f|
70
+ f.write( ssh_key )
71
+ end
72
+ ## note: ssh key must be "private" only access by owner (otherwise) WILL NOT work
73
+ ## res = File.chmod( 0600, "#{ssh_path}/id_rsa" )
74
+ ## puts res ## returns number of files processed; should be 1 - assert - why? why not?
75
+ Computer::Shell.run( %Q{chmod 600 #{ssh_path}/id_ed25519} )
76
+
77
+ Computer::Shell.run( %Q{ls -la #{ssh_path}} )
78
+
79
+ ## todo - fix/fix/fix - maybe add a flag to turn on/off debugging
80
+ ## or connection test - why? why not?
81
+ Computer::Shell.run( %Q{ssh -vT git@github.com} )
82
+
83
+ #####
84
+ ## setup git
85
+ ## git --version
86
+ Git.version
87
+
88
+ user_name = ENV['YOROBOT_NAME'] || ENV['YO_NAME'] || 'Yo Robot'
89
+ user_email = ENV['YOROBOT_EMAIL'] || ENV['YO_EMAIL'] || 'gerald.bauer+yorobot@gmail.com'
90
+
91
+ Computer::Shell.run( %Q{git config --global user.name "#{user_name}"} )
92
+ Computer::Shell.run( %Q{git config --global user.email "#{user_email}"} )
93
+
94
+ Computer::Shell.run( %Q{git config -l --show-origin} )
95
+ end
96
+
97
+ end # class Base
98
+ end # module Flow
99
+
100
+
101
+
102
+
103
+ module Yorobot
104
+ class Tool
105
+ def self.main( args=ARGV )
106
+
107
+ ## setup/check mono root
108
+ puts "[flow] pwd: #{Dir.pwd}"
109
+
110
+
111
+ ## quick hack:
112
+ ## if /sites does not exists
113
+ ## assume running with GitHub Actions or such
114
+ ## and use working dir as root? or change to home dir ~/ or ~/mono - why? why not?
115
+ ##
116
+ ## in the future use some -e/-env(ironemt) settings and scripts - why? why not?
117
+ if Dir.exist?( 'C:/Sites' )
118
+ Mono.root = 'C:/Sites' ## use local (dev) setup for testing flow steps
119
+
120
+ puts "[flow] assume local (dev) setup for testing"
121
+ else
122
+ Mono.root = Dir.pwd
123
+
124
+ ## for debugging print / walk mono (source) tree
125
+ Mono.walk
126
+ end
127
+ puts "[flow] Mono.root: #{Mono.root}"
128
+
129
+
130
+ ## pass along to "standard" flow engine
131
+ ::Flow::Tool.main( args )
132
+ end
133
+ end # class Tool
134
+ end # module Yorobot
135
+
136
+
137
+ puts Yorobot::Module::Tool.banner # say hello
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yorobot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 2026.6.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-04 00:00:00.000000000 Z
11
+ date: 2026-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: flow-lite
@@ -38,34 +38,6 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.6.1
41
- - !ruby/object:Gem::Dependency
42
- name: hubba
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: 1.0.0
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: 1.0.0
55
- - !ruby/object:Gem::Dependency
56
- name: hubba-reports
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: 1.0.1
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: 1.0.1
69
41
  - !ruby/object:Gem::Dependency
70
42
  name: monos
71
43
  requirement: !ruby/object:Gem::Requirement
@@ -106,17 +78,17 @@ dependencies:
106
78
  requirements:
107
79
  - - "~>"
108
80
  - !ruby/object:Gem::Version
109
- version: '3.22'
81
+ version: '4.2'
110
82
  type: :development
111
83
  prerelease: false
112
84
  version_requirements: !ruby/object:Gem::Requirement
113
85
  requirements:
114
86
  - - "~>"
115
87
  - !ruby/object:Gem::Version
116
- version: '3.22'
88
+ version: '4.2'
117
89
  description: yorbot gem - yo, robot - automate, automate, automate - ready to use
118
90
  scripts and command line tool
119
- email: ruby-talk@ruby-lang.org
91
+ email: gerald.bauer@gmail.com
120
92
  executables:
121
93
  - yo
122
94
  - yorobot
@@ -134,11 +106,11 @@ files:
134
106
  - bin/yorobot
135
107
  - lib/yorobot.rb
136
108
  - lib/yorobot/version.rb
137
- homepage: https://github.com/rubycoco/git
109
+ homepage: https://github.com/rubycocos/git
138
110
  licenses:
139
111
  - Public Domain
140
112
  metadata: {}
141
- post_install_message:
113
+ post_install_message:
142
114
  rdoc_options:
143
115
  - "--main"
144
116
  - README.md
@@ -155,9 +127,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
127
  - !ruby/object:Gem::Version
156
128
  version: '0'
157
129
  requirements: []
158
- rubyforge_project:
159
- rubygems_version: 2.5.2
160
- signing_key:
130
+ rubygems_version: 3.5.22
131
+ signing_key:
161
132
  specification_version: 4
162
133
  summary: yorbot gem - yo, robot - automate, automate, automate - ready to use scripts
163
134
  and command line tool