fake_gem 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +31 -27
- metadata +5 -5
data/Rakefile
CHANGED
@@ -1,60 +1,64 @@
|
|
1
1
|
require 'rake'
|
2
|
-
require '
|
2
|
+
require 'fileutils'
|
3
|
+
current_dir = File.expand_path(File.dirname(__FILE__))
|
4
|
+
Dir.chdir current_dir
|
3
5
|
|
4
|
-
Dir.chdir File.dirname(__FILE__)
|
5
6
|
|
7
|
+
#
|
6
8
|
# Specs
|
9
|
+
#
|
10
|
+
require 'spec/rake/spectask'
|
11
|
+
|
7
12
|
task :default => :spec
|
8
13
|
|
9
14
|
Spec::Rake::SpecTask.new('spec') do |t|
|
10
15
|
t.spec_files = FileList["spec/**/*_spec.rb"].select{|f| f !~ /\/_/}
|
11
|
-
t.libs = [
|
12
|
-
# t.spec_opts = ["--backtrace"]
|
16
|
+
t.libs = ["#{current_dir}/lib"]
|
13
17
|
end
|
14
18
|
|
19
|
+
|
20
|
+
#
|
15
21
|
# Gem
|
22
|
+
#
|
16
23
|
require 'rake/clean'
|
17
24
|
require 'rake/gempackagetask'
|
18
|
-
require 'fileutils'
|
19
25
|
|
26
|
+
gem_options = {
|
27
|
+
:name => "fake_gem",
|
28
|
+
:version => "0.1.3",
|
29
|
+
:summary => "Makes any directory looks like Ruby Gem",
|
30
|
+
:dependencies => %w()
|
31
|
+
}
|
32
|
+
|
33
|
+
gem_name = gem_options[:name]
|
20
34
|
spec = Gem::Specification.new do |s|
|
21
|
-
s.
|
22
|
-
s.
|
23
|
-
|
24
|
-
s.
|
35
|
+
gem_options.delete(:dependencies).each{|d| s.add_dependency d}
|
36
|
+
gem_options.each{|k, v| s.send "#{k}=", v}
|
37
|
+
|
38
|
+
s.name = gem_name
|
25
39
|
s.author = "Alexey Petrushin"
|
26
|
-
|
27
|
-
s.
|
40
|
+
s.homepage = "http://github.com/alexeypetrushin/#{gem_options[:name]}"
|
41
|
+
s.require_path = "lib"
|
42
|
+
s.files = (%w{Rakefile readme.md} + Dir.glob("{lib,spec}/**/*"))
|
28
43
|
|
29
44
|
s.platform = Gem::Platform::RUBY
|
30
|
-
s.has_rdoc = true
|
31
|
-
|
32
|
-
s.files = (['Rakefile', 'readme.md'] + Dir.glob("{lib,spec}/**/*"))
|
33
|
-
|
34
|
-
s.require_paths = ["lib"]
|
45
|
+
s.has_rdoc = true
|
35
46
|
end
|
36
47
|
|
37
|
-
|
38
|
-
|
48
|
+
package_dir = "#{current_dir}/build"
|
39
49
|
Rake::GemPackageTask.new(spec) do |p|
|
40
|
-
package_dir = PACKAGE_DIR
|
41
|
-
# FileUtils.mkdir package_dir unless File.exist? package_dir
|
42
50
|
p.need_tar = true if RUBY_PLATFORM !~ /mswin/
|
43
51
|
p.need_zip = true
|
44
52
|
p.package_dir = package_dir
|
45
53
|
end
|
46
54
|
|
47
|
-
# CLEAN.include [ 'pkg', '*.gem']
|
48
|
-
|
49
55
|
task :push do
|
50
|
-
|
51
|
-
|
52
|
-
system "gem push #{gem_file}"
|
53
|
-
end
|
56
|
+
gem_file = Dir.glob("#{package_dir}/#{gem_name}*.gem").first
|
57
|
+
system "gem push #{gem_file}"
|
54
58
|
end
|
55
59
|
|
56
60
|
task :clean do
|
57
|
-
system "rm -r #{
|
61
|
+
system "rm -r #{package_dir}"
|
58
62
|
end
|
59
63
|
|
60
64
|
task :release => [:gem, :push, :clean]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fake_gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alexey Petrushin
|
@@ -15,11 +15,11 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-10-
|
18
|
+
date: 2010-10-11 00:00:00 +04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
22
|
-
description:
|
22
|
+
description:
|
23
23
|
email:
|
24
24
|
executables: []
|
25
25
|
|