alchemist 0.1.2 → 0.1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/Rakefile +7 -22
  2. data/lib/alchemist.rb +7 -1
  3. metadata +18 -5
data/Rakefile CHANGED
@@ -1,27 +1,6 @@
1
1
  require 'rake'
2
2
  require 'rake/testtask'
3
-
4
- PKG_FILES = %w(Rakefile) +
5
- Dir.glob("{lib}/**/*")
6
-
7
- gem_spec = Gem::Specification.new do |gem_spec|
8
- gem_spec.name = 'alchemist'
9
- gem_spec.version = '0.1.2'
10
- gem_spec.summary = 'Conversions... like you\'ve never seen them before!'
11
- gem_spec.description = 'Conversions... like you\'ve never seen them before!!'
12
- gem_spec.email = 'matt@toastyapps.com'
13
- gem_spec.homepage = 'http://github.com/toastyapps/alchemist'
14
- gem_spec.authors = ["Matthew Mongeau"]
15
- gem_spec.files = PKG_FILES
16
- end
17
-
18
- desc "Generate a gemspec file"
19
- task :gemspec do
20
- File.open("#{gem_spec.name}.gemspec", "w") do |f|
21
- f.write gem_spec.to_yaml
22
- end
23
- end
24
-
3
+ require 'rake/gempackagetask'
25
4
 
26
5
  task :default => [:test]
27
6
  task :test => ['test:units']
@@ -34,3 +13,9 @@ namespace :test do
34
13
  test.verbose = true
35
14
  end
36
15
  end
16
+
17
+ eval("$specification = begin; #{IO.read('alchemist.gemspec')}; end")
18
+ Rake::GemPackageTask.new($specification) do |package|
19
+ package.need_zip = true
20
+ package.need_tar = true
21
+ end
data/lib/alchemist.rb CHANGED
@@ -44,6 +44,12 @@ module Alchemist
44
44
  :abfarad => 1.0e+9, :emu_of_capacitance => 1.0e+9, :abfarads => 1.0e+9, :emus_of_capacitance => 1.0e+9,
45
45
  :statfarad => 1.112650e-12, :esu_of_capacitance => 1.112650e-12, :statfarads => 1.112650e-12, :esus_of_capacitance => 1.112650e-12
46
46
  },
47
+ :density => {
48
+ :specific_gravity => 1, :sg => 1,
49
+ :brix => [Proc.new{ |d| -261.3 / (d - 261.3) }, Proc.new{ |d| 261.3 - (261.3 / d) }],
50
+ :plato => [Proc.new{ |d| -260.0 / (d - 260.0) }, Proc.new{ |d| 260.0 - (260.0 / d) }],
51
+ :baume => [Proc.new{ |d| -145.0 / (d - 145.0) }, Proc.new{ |d| 145.0 - (145.0 / d) }]
52
+ },
47
53
  :distance => {
48
54
  :meter => 1.0, :metres => 1.0, :meters => 1.0, :m => 1.0,
49
55
  :fermi => 1.0e-15, :fermis => 1.0e-15,
@@ -280,7 +286,7 @@ module Alchemist
280
286
  :imperial_fluid_ounce => 0.0284130742, :imperial_fluid_ounces => 0.0284130742,
281
287
  :ounce => 0.0295735296, :ounces => 0.0295735296, :fluid_ounce => 0.0295735296, :fluid_ounces => 0.0295735296,
282
288
  :imperial_gallon => 4.54609, :imperial_gallons => 4.54609,
283
- :gallon => 3.785412, :gallons => 3.785412,
289
+ :gallon => 3.785412, :gallons => 3.785412, :gals => 3.785412, :Gals => 3.785412,
284
290
  :imperial_gill => 1.420653e-1, :imperial_gills => 1.420653e-1,
285
291
  :gill => 1.182941e-1, :gills => 1.182941e-1, :gi => 1.182941e-1,
286
292
  :pint => 5.506105e-1, :pints => 5.506105e-1,
metadata CHANGED
@@ -1,7 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ hash: 77
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 2
10
+ - 1
11
+ version: 0.1.2.1
5
12
  platform: ruby
6
13
  authors:
7
14
  - Matthew Mongeau
@@ -9,7 +16,7 @@ autorequire:
9
16
  bindir: bin
10
17
  cert_chain: []
11
18
 
12
- date: 2010-01-01 00:00:00 -05:00
19
+ date: 2011-01-05 00:00:00 -05:00
13
20
  default_executable:
14
21
  dependencies: []
15
22
 
@@ -35,21 +42,27 @@ rdoc_options: []
35
42
  require_paths:
36
43
  - lib
37
44
  required_ruby_version: !ruby/object:Gem::Requirement
45
+ none: false
38
46
  requirements:
39
47
  - - ">="
40
48
  - !ruby/object:Gem::Version
49
+ hash: 3
50
+ segments:
51
+ - 0
41
52
  version: "0"
42
- version:
43
53
  required_rubygems_version: !ruby/object:Gem::Requirement
54
+ none: false
44
55
  requirements:
45
56
  - - ">="
46
57
  - !ruby/object:Gem::Version
58
+ hash: 3
59
+ segments:
60
+ - 0
47
61
  version: "0"
48
- version:
49
62
  requirements: []
50
63
 
51
64
  rubyforge_project:
52
- rubygems_version: 1.3.5
65
+ rubygems_version: 1.3.7
53
66
  signing_key:
54
67
  specification_version: 3
55
68
  summary: Conversions... like you've never seen them before!