rubyonacid 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
data/examples/test.rb CHANGED
@@ -80,10 +80,10 @@ class MyApp < Wx::App
80
80
  @f.within(:width, 1, 5).to_i
81
81
  )
82
82
  surface.draw_line(
83
- @f.within(:x, 0, WIDTH).to_i,
84
- @f.within(:y, 0, HEIGHT).to_i,
85
- @f.within(:x2, 0, WIDTH).to_i,
86
- @f.within(:y2, 0, HEIGHT).to_i
83
+ @f.get(:x, :max => WIDTH).to_i,
84
+ @f.get(:y, :max => HEIGHT).to_i,
85
+ @f.get(:x2, :max => WIDTH).to_i,
86
+ @f.get(:y2, :max => HEIGHT).to_i
87
87
  )
88
88
  end
89
89
  @f.reset_assignments if @resetter.boolean(:reset)
@@ -15,7 +15,7 @@ class Factory
15
15
  #Calls get_unit with key to get value between 0.0 and 1.0, then converts that value to be between given minimum and maximum.
16
16
  def get(key, options = {})
17
17
  @minimums[key] = (options[:min] || @minimums[key] || 0.0)
18
- @maximums[key] = (options[:max] || @maximums[key] || @minimums[key] > 1.0 ? @minimums[key] + 1.0 : 1.0)
18
+ @maximums[key] = (options[:max] || @maximums[key] || (@minimums[key] > 1.0 ? @minimums[key] + 1.0 : 1.0))
19
19
  get_unit(key) * (@maximums[key] - @minimums[key]) + @minimums[key]
20
20
  end
21
21
 
@@ -61,7 +61,6 @@ shared_examples_for "a factory" do
61
61
  end
62
62
  it "uses a default maximum of 1.0" do
63
63
  @it.get(:a).should <= 1.0
64
- @it.get(:a, :min => -1.0).should <= 0.0
65
64
  end
66
65
  it "keeps the minimum and maximum between calls for a given key" do
67
66
  @it.get(:a, :max => 2.0).should <= 2.0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyonacid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay McGavren
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-21 00:00:00 -07:00
12
+ date: 2009-11-30 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency