pingable 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +20 -0
- data/lib/pingable/handler.rb +1 -1
- data/lib/pingable/version.rb +1 -1
- metadata +3 -3
data/Rakefile
CHANGED
@@ -1 +1,21 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
+
|
3
|
+
desc 'Bump version'
|
4
|
+
task :bump do
|
5
|
+
if `git status -uno -s --porcelain | wc -l`.to_i > 0
|
6
|
+
abort "You have uncommitted changed."
|
7
|
+
end
|
8
|
+
text = File.read('lib/pingable/version.rb')
|
9
|
+
if text =~ /VERSION = ['"](.*)['"]/
|
10
|
+
old_version = $1
|
11
|
+
version_parts = old_version.split('.')
|
12
|
+
version_parts[-1] = version_parts[-1].to_i + 1
|
13
|
+
new_version = version_parts.join('.')
|
14
|
+
text.gsub!(/VERSION = ['"](.*)['"]/, "VERSION = '#{new_version}'")
|
15
|
+
File.open('lib/pingable/version.rb', 'w') { |f| f << text }
|
16
|
+
(system("git add lib/pingable/version.rb") and
|
17
|
+
system("git commit -m 'Bump to #{new_version}.'")) or abort "Failed to commit."
|
18
|
+
else
|
19
|
+
abort "Could not find version number"
|
20
|
+
end
|
21
|
+
end
|
data/lib/pingable/handler.rb
CHANGED
data/lib/pingable/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pingable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alexander Staubo
|