gimme_a_break 0.2.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v1.0.0. rails 3 edition
2
+
1
3
  v0.2.0. only act in the Rails production environment
2
4
 
3
5
  v0.1.1. improved documentation and runtime dependency on activerecord
@@ -34,11 +34,13 @@ Your model needs to have a created_at column for this to work. An index on it is
34
34
 
35
35
  == Installation
36
36
 
37
- ruby script/plugin install git://github.com/tilsammans/gimme_a_break
37
+ Rails 2:
38
38
 
39
- or in your Gemfile:
39
+ gem 'gimme_a_break', :version => "~> 0.2.0"
40
40
 
41
- gem 'gimme_a_break'
41
+ Rails 3:
42
+
43
+ gem 'gimme_a_break', '>= 1.0.0'
42
44
 
43
45
 
44
46
  == Examples
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.2.0') do |p|
6
+ Echoe.new('gimme_a_break', '1.0.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"
@@ -1,31 +1,23 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  Gem::Specification.new do |s|
4
- s.name = %q{gimme_a_break}
5
- s.version = "0.2.0"
4
+ s.name = "gimme_a_break"
5
+ s.version = "1.0.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
- s.authors = [%q{Joost Baaij}]
9
- s.date = %q{2011-10-11}
10
- s.description = %q{Throttle ActiveRecord creation}
11
- s.email = %q{joost@spacebabies.nl}
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
- s.homepage = %q{http://github.com/tilsammans/gimme_a_break}
15
- s.post_install_message = %q{
16
- *****************************************************
17
- gimme_a_break installed.
18
-
19
- Make sure your models have a created_at column.
20
- Adding an index to this column is highly recommended.
21
- *****************************************************
22
-
23
- }
24
- s.rdoc_options = [%q{--line-numbers}, %q{--inline-source}, %q{--title}, %q{Gimme_a_break}, %q{--main}, %q{README.rdoc}]
25
- s.require_paths = [%q{lib}]
26
- s.rubyforge_project = %q{gimme_a_break}
27
- s.rubygems_version = %q{1.8.6}
28
- s.summary = %q{Throttle ActiveRecord creation}
8
+ s.authors = ["Joost Baaij"]
9
+ s.date = "2011-12-08"
10
+ s.description = "Throttle ActiveRecord creation"
11
+ s.email = "joost@spacebabies.nl"
12
+ s.extra_rdoc_files = ["CHANGELOG", "README.rdoc", "lib/gimme_a_break.rb"]
13
+ s.files = ["CHANGELOG", "MIT-LICENSE", "README.rdoc", "Rakefile", "init.rb", "lib/gimme_a_break.rb", "Manifest", "gimme_a_break.gemspec"]
14
+ s.homepage = "http://github.com/tilsammans/gimme_a_break"
15
+ s.post_install_message = " \n *****************************************************\n gimme_a_break installed.\n\n Make sure your models have a created_at column.\n Adding an index to this column is highly recommended.\n *****************************************************\n\n"
16
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Gimme_a_break", "--main", "README.rdoc"]
17
+ s.require_paths = ["lib"]
18
+ s.rubyforge_project = "gimme_a_break"
19
+ s.rubygems_version = "1.8.10"
20
+ s.summary = "Throttle ActiveRecord creation"
29
21
 
30
22
  if s.respond_to? :specification_version then
31
23
  s.specification_version = 3
@@ -7,7 +7,7 @@ module GimmeABreak
7
7
  protected
8
8
  def gimme_a_break
9
9
  if last_created && last_created.created_at > self.class.gimme_a_break_timeout.seconds.ago
10
- errors.add_to_base I18n.t("gimme_a_break.notice", :default => "Temporarily disabled due to a safety measure. Please try again in %{count} seconds", :count => self.class.gimme_a_break_timeout)
10
+ errors.add :base, I18n.t("gimme_a_break.notice", :default => "Temporarily disabled due to a safety measure. Please try again in %{count} seconds", :count => self.class.gimme_a_break_timeout)
11
11
  end
12
12
  end
13
13
 
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.2.0
4
+ version: 1.0.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-10-11 00:00:00.000000000Z
12
+ date: 2011-12-08 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
- requirement: &2158246040 !ruby/object:Gem::Requirement
16
+ requirement: &70313742314660 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2158246040
24
+ version_requirements: *70313742314660
25
25
  description: Throttle ActiveRecord creation
26
26
  email: joost@spacebabies.nl
27
27
  executables: []
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  version: '1.2'
68
68
  requirements: []
69
69
  rubyforge_project: gimme_a_break
70
- rubygems_version: 1.8.6
70
+ rubygems_version: 1.8.10
71
71
  signing_key:
72
72
  specification_version: 3
73
73
  summary: Throttle ActiveRecord creation