create_valid 0.0.2 → 0.0.3

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
data/create_valid.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{create_valid}
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jason Frame"]
data/lib/create_valid.rb CHANGED
@@ -121,4 +121,8 @@ module CreateValid
121
121
  ::CreateValid.register(model, attributes, &block)
122
122
  end
123
123
  end
124
+
125
+ class KludgyEvalContext
126
+ include GlobalHelpers
127
+ end
124
128
  end
data/rails/init.rb CHANGED
@@ -10,9 +10,9 @@ if defined?(RAILS_ENV) && RAILS_ENV == 'test'
10
10
  alias_method_chain :method_missing, :create_valid
11
11
  end
12
12
 
13
- Kernel.send(:include, CreateValid::GlobalHelpers)
13
+ Kernel.send(:include, ::CreateValid::GlobalHelpers)
14
14
 
15
15
  if File.exists?(RAILS_ROOT + '/test/factory.rb')
16
- require RAILS_ROOT + '/test/factory'
16
+ ::CreateValid::KludgyEvalContext.new.instance_eval(File.read(RAILS_ROOT + '/test/factory.rb'))
17
17
  end
18
- end
18
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jason Frame