downloadr 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/Rakefile +60 -1
- data/lib/downloadr/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6bf909898c44e6e22b39b15ba65c1fc2d5930ef
|
4
|
+
data.tar.gz: cbc3326cbb7299f3ecd030101a9cf1e8674f1a86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 686c70074cc16ec702cc49e612c6e6c5d8b3af362c29bd1806c8bc8708c727ff63f20a3277a0eb189e93e118412b9d6b3a0eb877c55fe43b8c838203a51b3e3a
|
7
|
+
data.tar.gz: f9ca2550e2e9183932e3a2b0721cae8006e6408f1e271f3b3511626c8a4fd00e8e4e5347e1e07040da1de948a4f648bf83a33055db1e670942551fdee3b40847
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -6,7 +6,66 @@ require 'rspec'
|
|
6
6
|
require 'rspec/core'
|
7
7
|
require 'rspec/core/rake_task'
|
8
8
|
|
9
|
+
$:.unshift File.join(File.dirname(__FILE__), "lib")
|
10
|
+
|
9
11
|
task :default => :spec
|
10
12
|
|
11
13
|
desc "Run all specs in spec directory"
|
12
|
-
RSpec::Core::RakeTask.new(:spec)
|
14
|
+
RSpec::Core::RakeTask.new(:spec)
|
15
|
+
|
16
|
+
def clean_up
|
17
|
+
Dir.glob("*.gem").each { |f| File.unlink(f) }
|
18
|
+
Dir.glob("*.lock").each { |f| File.unlink(f) }
|
19
|
+
end
|
20
|
+
|
21
|
+
desc "Bump the Gemspec Version"
|
22
|
+
task :bump do
|
23
|
+
version_string_match = File.read('lib/downloadr/version.rb').match(/VERSION='(\d+\.\d+\.)(\d+)'/)
|
24
|
+
|
25
|
+
version_prefix = version_string_match[1]
|
26
|
+
existing_patch_version = version_string_match[2]
|
27
|
+
new_patch_version = (existing_patch_version.to_i + 1).to_s
|
28
|
+
new_version = version_prefix + new_patch_version
|
29
|
+
|
30
|
+
File.open('lib/downloadr/version.rb', 'w') do |f|
|
31
|
+
f.puts "module Downloadr\n"
|
32
|
+
f.puts " VERSION='#{new_version}'\n"
|
33
|
+
f.puts "end"
|
34
|
+
end
|
35
|
+
|
36
|
+
puts "[+] Bumping Downloadr version #{new_version}"
|
37
|
+
puts `git add lib/downloadr/version.rb`
|
38
|
+
puts `git commit -a -m "Bumped Gem version to #{new_version}"`
|
39
|
+
puts `git push origin master`
|
40
|
+
end
|
41
|
+
|
42
|
+
require 'downloadr/version'
|
43
|
+
|
44
|
+
desc "Build the gem"
|
45
|
+
task :build do
|
46
|
+
puts "[+] Building Downloadr version #{Downloadr::VERSION}"
|
47
|
+
puts `gem build downloadr.gemspec`
|
48
|
+
end
|
49
|
+
|
50
|
+
desc "Publish the gem"
|
51
|
+
task :publish do
|
52
|
+
puts "[+] Publishing Downloadr version #{Downloadr::VERSION}"
|
53
|
+
Dir.glob("*.gem").each { |f| puts `gem push #{f}`}
|
54
|
+
end
|
55
|
+
|
56
|
+
desc "Tag the release"
|
57
|
+
task :tag do
|
58
|
+
puts "[+] Tagging Downloadr version #{Downloadr::VERSION}"
|
59
|
+
`git tag #{Downloadr::VERSION}`
|
60
|
+
`git push --tags`
|
61
|
+
end
|
62
|
+
|
63
|
+
desc "Perform an end-to-end release of the gem"
|
64
|
+
task :release do
|
65
|
+
clean_up() # Clean up before we start
|
66
|
+
Rake::Task[:bump].execute
|
67
|
+
Rake::Task[:build].execute
|
68
|
+
Rake::Task[:tag].execute
|
69
|
+
Rake::Task[:publish].execute
|
70
|
+
clean_up() # Clean up after we complete
|
71
|
+
end
|
data/lib/downloadr/version.rb
CHANGED