gimme_a_break 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG ADDED
@@ -0,0 +1,5 @@
1
+ v0.2.0. only act in the Rails production environment
2
+
3
+ v0.1.1. improved documentation and runtime dependency on activerecord
4
+
5
+ v0.1.0. initial release
data/Manifest CHANGED
@@ -1,3 +1,4 @@
1
+ CHANGELOG
1
2
  MIT-LICENSE
2
3
  README.rdoc
3
4
  Rakefile
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rubygems'
3
3
  require 'rake'
4
4
  require 'echoe'
5
5
 
6
- Echoe.new('gimme_a_break', '0.1.1') do |p|
6
+ Echoe.new('gimme_a_break', '0.2.0') do |p|
7
7
  p.summary = "Throttle ActiveRecord creation"
8
8
  p.url = "http://github.com/tilsammans/gimme_a_break"
9
9
  p.author = "Joost Baaij"
@@ -2,15 +2,15 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{gimme_a_break}
5
- s.version = "0.1.1"
5
+ s.version = "0.2.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = [%q{Joost Baaij}]
9
- s.date = %q{2011-07-20}
9
+ s.date = %q{2011-10-11}
10
10
  s.description = %q{Throttle ActiveRecord creation}
11
11
  s.email = %q{joost@spacebabies.nl}
12
- s.extra_rdoc_files = [%q{README.rdoc}, %q{lib/gimme_a_break.rb}]
13
- s.files = [%q{MIT-LICENSE}, %q{README.rdoc}, %q{Rakefile}, %q{init.rb}, %q{lib/gimme_a_break.rb}, %q{Manifest}, %q{gimme_a_break.gemspec}]
12
+ s.extra_rdoc_files = [%q{CHANGELOG}, %q{README.rdoc}, %q{lib/gimme_a_break.rb}]
13
+ s.files = [%q{CHANGELOG}, %q{MIT-LICENSE}, %q{README.rdoc}, %q{Rakefile}, %q{init.rb}, %q{lib/gimme_a_break.rb}, %q{Manifest}, %q{gimme_a_break.gemspec}]
14
14
  s.homepage = %q{http://github.com/tilsammans/gimme_a_break}
15
15
  s.post_install_message = %q{
16
16
  *****************************************************
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  s.rdoc_options = [%q{--line-numbers}, %q{--inline-source}, %q{--title}, %q{Gimme_a_break}, %q{--main}, %q{README.rdoc}]
25
25
  s.require_paths = [%q{lib}]
26
26
  s.rubyforge_project = %q{gimme_a_break}
27
- s.rubygems_version = %q{1.8.5}
27
+ s.rubygems_version = %q{1.8.6}
28
28
  s.summary = %q{Throttle ActiveRecord creation}
29
29
 
30
30
  if s.respond_to? :specification_version then
data/lib/gimme_a_break.rb CHANGED
@@ -21,10 +21,13 @@ class ActiveRecord::Base
21
21
  def self.gimme_a_break(options ={})
22
22
  cattr_accessor :gimme_a_break_timeout
23
23
  self.gimme_a_break_timeout = (options[:timeout] || 6)
24
- include GimmeABreak
25
24
 
26
- class_eval <<-EOV
27
- validate :gimme_a_break
28
- EOV
25
+ if Rails.env.production?
26
+ include GimmeABreak
27
+
28
+ class_eval <<-EOV
29
+ validate :gimme_a_break
30
+ EOV
31
+ end
29
32
  end
30
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gimme_a_break
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-07-20 00:00:00.000000000Z
12
+ date: 2011-10-11 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
- requirement: &2153305480 !ruby/object:Gem::Requirement
16
+ requirement: &2158246040 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,15 +21,17 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2153305480
24
+ version_requirements: *2158246040
25
25
  description: Throttle ActiveRecord creation
26
26
  email: joost@spacebabies.nl
27
27
  executables: []
28
28
  extensions: []
29
29
  extra_rdoc_files:
30
+ - CHANGELOG
30
31
  - README.rdoc
31
32
  - lib/gimme_a_break.rb
32
33
  files:
34
+ - CHANGELOG
33
35
  - MIT-LICENSE
34
36
  - README.rdoc
35
37
  - Rakefile
@@ -65,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
67
  version: '1.2'
66
68
  requirements: []
67
69
  rubyforge_project: gimme_a_break
68
- rubygems_version: 1.8.5
70
+ rubygems_version: 1.8.6
69
71
  signing_key:
70
72
  specification_version: 3
71
73
  summary: Throttle ActiveRecord creation