conditioner 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -42,6 +42,7 @@ To override Conditioner configurations create config/initializers/conditioner.rb
42
42
  == CHANGE LIST:
43
43
 
44
44
  * 0.0.2 Add configurable rules for extactions
45
+ * 0.0.3 Fix bug with to extract - which eat first parameter
45
46
 
46
47
  == LICENSE:
47
48
 
data/Rakefile CHANGED
@@ -28,7 +28,7 @@ PKG_FILES = FileList[ '[a-zA-Z]*', 'generators/**/*', 'lib/**/*', 'rails/**/*',
28
28
 
29
29
  spec = Gem::Specification.new do |s|
30
30
  s.name = "conditioner"
31
- s.version = "0.0.2"
31
+ s.version = "0.0.3"
32
32
  s.author = "niquola"
33
33
  s.email = "niquola@gmail.com"
34
34
  s.homepage = "http://github.com/niquola/conditioner"
@@ -2,7 +2,7 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module Conditioner
5
- VERSION = '0.0.1'
5
+ VERSION = '0.0.3'
6
6
  autoload :ActiveRecordMixin, 'conditioner/active_record_mixin'
7
7
  autoload :Condition, 'conditioner/condition'
8
8
  autoload :Configurator, 'conditioner/configurator'
@@ -47,13 +47,13 @@ module Conditioner
47
47
 
48
48
  def extract(hash)
49
49
  hash.each do |k,v|
50
+ @condition_called_flag = false
50
51
  field = k.to_s
51
52
  Conditioner.config.extract_rules.each do |rule|
52
53
  rule.call(field,v,self)
53
54
  break if @condition_called_flag
54
55
  end
55
56
  _and(field=>v) if is_field?(field) and !@condition_called_flag
56
- @condition_called_flag = false
57
57
  end
58
58
  self
59
59
  end
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conditioner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 3
9
+ version: 0.0.3
5
10
  platform: ruby
6
11
  authors:
7
12
  - niquola
@@ -9,7 +14,7 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-03-04 00:00:00 +03:00
17
+ date: 2010-04-15 00:00:00 +04:00
13
18
  default_executable:
14
19
  dependencies: []
15
20
 
@@ -47,18 +52,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
47
52
  requirements:
48
53
  - - ">="
49
54
  - !ruby/object:Gem::Version
55
+ segments:
56
+ - 0
50
57
  version: "0"
51
- version:
52
58
  required_rubygems_version: !ruby/object:Gem::Requirement
53
59
  requirements:
54
60
  - - ">="
55
61
  - !ruby/object:Gem::Version
62
+ segments:
63
+ - 0
56
64
  version: "0"
57
- version:
58
65
  requirements: []
59
66
 
60
67
  rubyforge_project:
61
- rubygems_version: 1.3.5
68
+ rubygems_version: 1.3.6
62
69
  signing_key:
63
70
  specification_version: 3
64
71
  summary: Simple conditions builder for active_record