union 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGES CHANGED
@@ -1,3 +1,7 @@
1
+ == 1.0.2 - 3-Oct-2009
2
+ * Some gemspec updates and one fix.
3
+ * Added the :gem rake task.
4
+
1
5
  == 1.0.1 - 31-Jul-2009
2
6
  * Now compatible with Ruby 1.9.x
3
7
  * Changed the license to Artistic 2.0.
@@ -0,0 +1,27 @@
1
+ require 'rake'
2
+ require 'rake/testtask'
3
+ require 'rbconfig'
4
+ include Config
5
+
6
+ desc 'Install the union library (non-gem)'
7
+ task :install do
8
+ sitelibdir = CONFIG["sitelibdir"]
9
+ file = "lib/union.rb"
10
+ FileUtils.cp(file, sitelibdir, :verbose => true)
11
+ end
12
+
13
+ desc 'Build the union gem'
14
+ task :gem do
15
+ spec = eval(IO.read('union.gemspec'))
16
+ Gem::Builder.new(spec).build
17
+ end
18
+
19
+ task :install_gem => [:gem] do
20
+ file = Dir["*.gem"].first
21
+ sh "gem install #{file}"
22
+ end
23
+
24
+ Rake::TestTask.new do |t|
25
+ t.verbose = true
26
+ t.warning = true
27
+ end
@@ -2,8 +2,8 @@
2
2
  # a Union object can be set to a non-nil value at a time.
3
3
  #
4
4
  class Union < Struct
5
- # The version of this library
6
- VERSION = '1.0.1'
5
+ # The version of the union library
6
+ VERSION = '1.0.2'
7
7
 
8
8
  # Creates and returns a new Union. Unlike Struct::Class.new, this does not
9
9
  # take any arguments. You must assign attributes individually.
@@ -8,7 +8,7 @@ class TC_Union < Test::Unit::TestCase
8
8
  end
9
9
 
10
10
  def test_union_version
11
- assert_equal('1.0.1', Union::VERSION)
11
+ assert_equal('1.0.2', Union::VERSION)
12
12
  end
13
13
 
14
14
  def test_union_constructor
@@ -0,0 +1,23 @@
1
+ require 'rubygems'
2
+
3
+ Gem::Specification.new do |gem|
4
+ gem.name = 'union'
5
+ gem.version = '1.0.2'
6
+ gem.author = 'Daniel J. Berger'
7
+ gem.license = 'Artistic 2.0'
8
+ gem.email = 'djberg96@gmail.com'
9
+ gem.homepage = 'http://www.rubyforge.org/projects/shards'
10
+ gem.summary = 'A struct-like C union for Ruby'
11
+ gem.test_file = 'test/test_union.rb'
12
+ gem.has_rdoc = true
13
+ gem.files = Dir['**/*'].reject{ |f| f.include?('CVS') }
14
+
15
+ gem.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST']
16
+
17
+ gem.description = <<-EOF
18
+ The union library provides an analog to a C/C++ union for Ruby.
19
+ In this implementation a union is a kind of struct where multiple
20
+ members may be defined, but only one member ever contains a non-nil
21
+ value at any given time.
22
+ EOF
23
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: union
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-31 00:00:00 -06:00
12
+ date: 2009-10-03 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -24,11 +24,13 @@ extra_rdoc_files:
24
24
  - CHANGES
25
25
  - MANIFEST
26
26
  files:
27
- - lib/union.rb
28
- - test/test_union.rb
29
- - README
30
27
  - CHANGES
28
+ - lib/union.rb
31
29
  - MANIFEST
30
+ - Rakefile
31
+ - README
32
+ - test/test_union.rb
33
+ - union.gemspec
32
34
  has_rdoc: true
33
35
  homepage: http://www.rubyforge.org/projects/shards
34
36
  licenses: