asset-packager 0.0.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/Rakefile +39 -39
  2. metadata +7 -7
data/Rakefile CHANGED
@@ -1,66 +1,66 @@
1
1
  require 'rake'
2
- require 'spec/rake/spectask'
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 = ['lib'].collect{|f| "#{File.dirname __FILE__}/#{f}"}
16
+ t.libs = ["#{current_dir}/lib"]
12
17
  end
13
18
 
19
+
20
+ #
14
21
  # Gem
22
+ #
15
23
  require 'rake/clean'
16
24
  require 'rake/gempackagetask'
17
- require 'fileutils'
18
25
 
26
+ gem_options = {
27
+ :name => "asset_packager",
28
+ :version => "0.1.2",
29
+ :summary => "Ruby language extensions",
30
+ :dependencies => %w(facets)
31
+ }
32
+
33
+ gem_name = 'asset-packager'
19
34
  spec = Gem::Specification.new do |s|
20
- s.name = "asset-packager"
21
- s.version = "0.0.1"
22
- s.summary = "Asset Packager for the Crystal framework"
23
- s.description = "Asset Packager for the Crystal framework"
24
- s.author = "Alexey Petrushin"
25
- # s.email = ""
26
- s.homepage = "http://github.com/alexeypetrushin/asset-packager"
35
+ gem_options.delete(:dependencies).each{|d| s.add_dependency d}
36
+ gem_options.each{|k, v| s.send "#{k}=", v}
27
37
 
28
- s.platform = Gem::Platform::RUBY
29
- s.has_rdoc = true
30
- # s.extra_rdoc_files = ["README.rdoc"]
31
-
32
- # s.files = (%w{rakefile readme.md .gitignore} + Dir.glob("{app,lib,spec,.git}/**/*"))
33
- s.files = (['Rakefile', 'readme.md'] + Dir.glob("{lib,spec}/**/*"))
34
-
35
- s.require_paths = ["lib"]
36
-
37
- [
38
- 'crystal',
39
- ].each{|name| s.add_dependency(name)}
40
-
38
+ s.name = gem_name
39
+ s.author = "Alexey Petrushin"
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}/**/*"))
43
+
44
+ s.platform = Gem::Platform::RUBY
45
+ s.has_rdoc = true
41
46
  end
42
47
 
43
- PACKAGE_DIR = "#{File.expand_path File.dirname(__FILE__)}/build"
44
-
48
+ package_dir = "#{current_dir}/build"
45
49
  Rake::GemPackageTask.new(spec) do |p|
46
- package_dir = PACKAGE_DIR
47
- # FileUtils.mkdir package_dir unless File.exist? package_dir
48
- p.need_tar = true if RUBY_PLATFORM !~ /mswin/
49
- p.need_zip = true
50
- p.package_dir = package_dir
50
+ p.need_tar = true if RUBY_PLATFORM !~ /mswin/
51
+ p.need_zip = true
52
+ p.package_dir = package_dir
51
53
  end
52
54
 
53
- # CLEAN.include [ 'pkg', '*.gem']
54
-
55
55
  task :push do
56
- dir = Dir.chdir PACKAGE_DIR do
57
- gem_file = Dir.glob("asset-packager*.gem").first
58
- system "gem push #{gem_file}"
59
- end
60
- end
56
+ # dir = Dir.chdir package_dir do
57
+ gem_file = Dir.glob("#{package_dir}/#{gem_name}*.gem").first
58
+ system "gem push #{gem_file}"
59
+ # end
60
+ end
61
61
 
62
62
  task :clean do
63
- system "rm -r #{PACKAGE_DIR}"
63
+ system "rm -r #{package_dir}"
64
64
  end
65
65
 
66
66
  task :release => [:gem, :push, :clean]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asset-packager
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 0
9
8
  - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alexey Petrushin
@@ -19,7 +19,7 @@ date: 2010-10-11 00:00:00 +04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- name: crystal
22
+ name: facets
23
23
  prerelease: false
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: "0"
33
33
  type: :runtime
34
34
  version_requirements: *id001
35
- description: Asset Packager for the Crystal framework
35
+ description:
36
36
  email:
37
37
  executables: []
38
38
 
@@ -50,7 +50,7 @@ files:
50
50
  - lib/asset_packager.rb
51
51
  - spec/spec.opts
52
52
  has_rdoc: true
53
- homepage: http://github.com/alexeypetrushin/asset-packager
53
+ homepage: http://github.com/alexeypetrushin/asset_packager
54
54
  licenses: []
55
55
 
56
56
  post_install_message:
@@ -82,6 +82,6 @@ rubyforge_project:
82
82
  rubygems_version: 1.3.7
83
83
  signing_key:
84
84
  specification_version: 3
85
- summary: Asset Packager for the Crystal framework
85
+ summary: Ruby language extensions
86
86
  test_files: []
87
87