Permalink
Browse files

version

  • Loading branch information...
1 parent 42330c2 commit fdc0d1318fceec8f1af97ebc49f8973049b5aa42 @ahoward committed Feb 22, 2014
Showing with 37 additions and 21 deletions.
  1. +34 −16 Rakefile
  2. +1 −1 lib/map.rb
  3. +2 −4 map.gemspec
  4. BIN pkg/map-6.5.2.gem
View
@@ -104,39 +104,51 @@ task :gemspec do
end
extensions = [extensions].flatten.compact
+ if This.dependencies.nil?
+ dependencies = []
+ else
+ case This.dependencies
+ when Hash
+ dependencies = This.dependencies.values
+ when Array
+ dependencies = This.dependencies
+ end
+ end
+
template =
if test(?e, 'gemspec.erb')
Template{ IO.read('gemspec.erb') }
else
Template {
<<-__
- ## #{ lib }.gemspec
+ ## <%= lib %>.gemspec
#
Gem::Specification::new do |spec|
- spec.name = #{ lib.inspect }
- spec.version = #{ version.inspect }
+ spec.name = <%= lib.inspect %>
+ spec.version = <%= version.inspect %>
spec.platform = Gem::Platform::RUBY
- spec.summary = #{ lib.inspect }
- spec.description = #{ description.inspect }
- spec.license = #{ license.inspect }
+ spec.summary = <%= lib.inspect %>
+ spec.description = <%= description.inspect %>
+ spec.license = <%= license.inspect %>
- spec.files =\n#{ files.sort.pretty_inspect }
- spec.executables = #{ executables.inspect }
+ spec.files =\n<%= files.sort.pretty_inspect %>
+ spec.executables = <%= executables.inspect %>
spec.require_path = "lib"
- spec.test_files = #{ test_files.inspect }
+ spec.test_files = <%= test_files.inspect %>
- ### spec.add_dependency 'lib', '>= version'
- #### spec.add_dependency 'map'
+ <% dependencies.each do |lib_version| %>
+ spec.add_dependency(*<%= Array(lib_version).flatten.inspect %>)
+ <% end %>
- spec.extensions.push(*#{ extensions.inspect })
+ spec.extensions.push(*<%= extensions.inspect %>)
- spec.rubyforge_project = #{ This.rubyforge_project.inspect }
- spec.author = #{ This.author.inspect }
- spec.email = #{ This.email.inspect }
- spec.homepage = #{ This.homepage.inspect }
+ spec.rubyforge_project = <%= This.rubyforge_project.inspect %>
+ spec.author = <%= This.author.inspect %>
+ spec.email = <%= This.email.inspect %>
+ spec.homepage = <%= This.homepage.inspect %>
end
__
}
@@ -272,6 +284,12 @@ BEGIN {
end
This.version = version
+# see if dependencies are export by the module
+#
+ if This.object.respond_to?(:dependencies)
+ This.dependencies = This.object.dependencies
+ end
+
# we need to know the name of the lib an it's version
#
abort('no lib') unless This.lib
View
@@ -1,6 +1,6 @@
# -*- encoding : utf-8 -*-
class Map < Hash
- Version = '6.5.2' unless defined?(Version)
+ Version = '6.5.3' unless defined?(Version)
Load = Kernel.method(:load) unless defined?(Load)
class << Map
View
@@ -3,7 +3,7 @@
Gem::Specification::new do |spec|
spec.name = "map"
- spec.version = "6.5.2"
+ spec.version = "6.5.3"
spec.platform = Gem::Platform::RUBY
spec.summary = "map"
spec.description = "the awesome ruby container you've always wanted: a string/symbol indifferent ordered hash that works in all rubies"
@@ -13,7 +13,6 @@ Gem::Specification::new do |spec|
["LICENSE",
"README",
"Rakefile",
- "a",
"a.rb",
"lib",
"lib/map",
@@ -36,8 +35,7 @@ Gem::Specification::new do |spec|
spec.test_files = nil
-### spec.add_dependency 'lib', '>= version'
-#### spec.add_dependency 'map'
+
spec.extensions.push(*[])
View
Binary file not shown.

0 comments on commit fdc0d13

Please sign in to comment.