my_scripts 0.0.23 → 0.0.24
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.
- data/HISTORY +2 -0
- data/VERSION +1 -1
- data/lib/my_scripts/gitto.rb +9 -18
- data/lib/my_scripts/wake.rb +1 -3
- metadata +2 -7
- data/bin/mybones +0 -5
- data/bin/newscript +0 -5
- data/lib/my_scripts/mybones.rb +0 -20
data/HISTORY
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.24
|
data/lib/my_scripts/gitto.rb
CHANGED
@@ -5,29 +5,20 @@ module MyScripts
|
|
5
5
|
#
|
6
6
|
class Gitto < Script
|
7
7
|
def run
|
8
|
-
usage "[
|
8
|
+
usage "[0.1.2 - version, 100/10/1 - bump major/minor/patch, .patch - add patch] Commit message goes here" if @argv.empty?
|
9
9
|
|
10
|
-
#
|
11
|
-
|
10
|
+
# First Arg may indicate version command if it matches pattern
|
11
|
+
ver = @argv[0] =~ /^(\d+\.\d+\.\d+(?:\.(.*?))?|\.(.*?)|\d{1}0{0,2})$/ ? @argv[0].shift : nil
|
12
12
|
|
13
13
|
# All the other args lumped into message, or default message
|
14
|
-
message = @argv.empty? ?
|
15
|
-
# Timestamp added to message
|
16
|
-
message += " #{Time.now.to_s[0..-6]}"
|
14
|
+
message = @argv.empty? ? "Commit #{Time.now.to_s[0..-6]}" : @argv.join(' ')
|
17
15
|
|
18
|
-
puts "Committing (
|
16
|
+
puts "Committing #{ ver ? "(version = #{ver}) " : ""}with message: #{message}"
|
19
17
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
system %Q[rake version:bump:minor]
|
25
|
-
when 100
|
26
|
-
system %Q[rake version:bump:major]
|
27
|
-
end
|
28
|
-
system %Q[git add --all]
|
29
|
-
system %Q[git commit -a -m "#{message}" --author arvicco]
|
30
|
-
system %Q[git push]
|
18
|
+
system %Q{rake version[#{ver}]} if ver
|
19
|
+
system %Q{git add --all}
|
20
|
+
system %Q{git commit -a -m "#{message}" --author arvicco}
|
21
|
+
system %Q{git push}
|
31
22
|
end
|
32
23
|
end
|
33
24
|
end
|
data/lib/my_scripts/wake.rb
CHANGED
@@ -8,9 +8,7 @@ module MyScripts
|
|
8
8
|
SLEEP_TIME = 4 * 60 # seconds
|
9
9
|
|
10
10
|
def initialize( name, argv, cli )
|
11
|
-
|
12
11
|
require 'win/gui/input'
|
13
|
-
|
14
12
|
self.class.send(:include, Win::Gui::Input)
|
15
13
|
super
|
16
14
|
end
|
@@ -27,7 +25,7 @@ module MyScripts
|
|
27
25
|
when 0
|
28
26
|
sleep_time = SLEEP_TIME
|
29
27
|
when 1
|
30
|
-
|
28
|
+
sleep_time = @argv.first.to_f * 60
|
31
29
|
else
|
32
30
|
usage "[minutes] - prevents screen auto lock-up by moving mouse pointer every (4) [minutes]"
|
33
31
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 24
|
9
|
+
version: 0.0.24
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- arvicco
|
@@ -50,8 +50,6 @@ executables:
|
|
50
50
|
- dummy
|
51
51
|
- gitto
|
52
52
|
- jew
|
53
|
-
- mybones
|
54
|
-
- newscript
|
55
53
|
- rabbit
|
56
54
|
- wake
|
57
55
|
extensions: []
|
@@ -65,8 +63,6 @@ files:
|
|
65
63
|
- bin/dummy
|
66
64
|
- bin/gitto
|
67
65
|
- bin/jew
|
68
|
-
- bin/mybones
|
69
|
-
- bin/newscript
|
70
66
|
- bin/rabbit
|
71
67
|
- bin/wake
|
72
68
|
- lib/my_scripts/citi.rb
|
@@ -75,7 +71,6 @@ files:
|
|
75
71
|
- lib/my_scripts/extensions.rb
|
76
72
|
- lib/my_scripts/gitto.rb
|
77
73
|
- lib/my_scripts/jew.rb
|
78
|
-
- lib/my_scripts/mybones.rb
|
79
74
|
- lib/my_scripts/rabbit.rb
|
80
75
|
- lib/my_scripts/script.rb
|
81
76
|
- lib/my_scripts/wake.rb
|
data/bin/mybones
DELETED
data/bin/newscript
DELETED
data/lib/my_scripts/mybones.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
module MyScripts
|
2
|
-
# This script uses Mr.Bones gem to create new project skeleton, local git repo and
|
3
|
-
# initiate remote repo on github
|
4
|
-
#
|
5
|
-
class Mybones < Script
|
6
|
-
def run
|
7
|
-
usage "project_name Summary or description goes here" if @argv.empty?
|
8
|
-
|
9
|
-
# First Arg should be project name
|
10
|
-
project = @argv.shift
|
11
|
-
|
12
|
-
# All the other args lumped into summary, or default summary
|
13
|
-
summary = @argv.empty? ? "New project #{project}" : @argv.join(' ')
|
14
|
-
|
15
|
-
puts "Creating Bones project #{project} with summary: #{summary}"
|
16
|
-
|
17
|
-
system %Q[bones create --github "#{summary}" -s basic #{project}]
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|