sooner 0.0.7 → 0.0.8

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/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source "http://gemcutter.org"
2
2
 
3
- gem 'rails', '3.0.0.beta3'
3
+ gem 'rails', '3.0.0.beta4'
4
4
  gem 'mysql'
data/MIT-LICENSE CHANGED
File without changes
data/README.rdoc CHANGED
File without changes
data/Rakefile CHANGED
File without changes
File without changes
@@ -1,8 +1,8 @@
1
1
  module Sooner
2
2
  class Subscriber < ActiveRecord::Base
3
-
3
+
4
4
  validates :email, :presence => true, :uniqueness => true, :email_format => true
5
- validates :name, :presence => true, :uniqueness => true
5
+ validates :name, :presence => true, :uniqueness => true, :if => :should_validate
6
6
 
7
7
  # writes email addresses to CSV file
8
8
  def save_csv
@@ -15,6 +15,9 @@ module Sooner
15
15
  self.errors.add_to_base(e.message + " (CSV)")
16
16
  end
17
17
  end
18
-
18
+
19
+ def should_validate
20
+ Sooner.name_validations
21
+ end
19
22
  end
20
23
  end
File without changes
data/config/routes.rb CHANGED
File without changes
@@ -1,4 +1,4 @@
1
- class SoonerInstallGenerator < Rails::Generators::Base
1
+ class InstallGenerator < Rails::Generators::Base
2
2
  include Rails::Generators::Migration
3
3
 
4
4
  desc "Creates a Sooner initializer and migration to your application."
@@ -2,6 +2,7 @@ Sooner.setup do |config|
2
2
  # Configure the e-mail address which will be shown in SoonerMailer.
3
3
  config.mailer_sender = "info@sooner.com"
4
4
 
5
+ config.name_validations = true
5
6
  config.db_store = true
6
7
  config.csv_store = true
7
8
  config.csv_file = "subscribers.csv"
@@ -1,14 +1,11 @@
1
- class SoonerViewsGenerator < Rails::Generators::Base
1
+ class ViewsGenerator < Rails::Generators::Base
2
+ source_root File.expand_path("../../../../../app/views", __FILE__)
2
3
  desc "Copies all Sooner views to your application."
3
4
 
4
5
  argument :scope, :required => false, :default => nil, :desc => "The scope to copy views to"
5
6
 
6
7
  class_option :template_engine, :type => :string, :aliases => "-t", :default => "erb",
7
8
  :desc => "Template engine for the views. Available options are 'erb' and 'haml'."
8
-
9
- def self.source_root
10
- @_sooner_source_root ||= File.expand_path("../../../../app/views", __FILE__)
11
- end
12
9
 
13
10
  def copy_views
14
11
  case options[:template_engine]
File without changes
data/lib/sooner/rails.rb CHANGED
File without changes
@@ -1,3 +1,3 @@
1
1
  module Sooner
2
- VERSION = "0.0.7".freeze
2
+ VERSION = "0.0.8".freeze
3
3
  end
data/lib/sooner.rb CHANGED
@@ -1,18 +1,16 @@
1
1
  module Sooner
2
-
3
- # Custom domain for cookies. Not set by default
2
+ mattr_accessor :name_validations
3
+ @@name_validations = true
4
+
4
5
  mattr_accessor :db_store
5
6
  @@db_store = true
6
7
 
7
- # Used to encrypt password. Please generate one with rake secret.
8
8
  mattr_accessor :csv_store
9
9
  @@csv_store = true
10
10
 
11
- # The number of times to encrypt password.
12
11
  mattr_accessor :csv_file
13
12
  @@csv_file = 'subscribers.csv'
14
13
 
15
- # Address which sends Devise e-mails.
16
14
  mattr_accessor :mailer_sender
17
15
  @@mailer_sender = nil
18
16
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 7
9
- version: 0.0.7
8
+ - 8
9
+ version: 0.0.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Shenouda Bertel
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-08 00:00:00 +03:00
17
+ date: 2010-07-04 00:00:00 +03:00
18
18
  default_executable:
19
19
  dependencies: []
20
20
 
@@ -27,24 +27,23 @@ extensions: []
27
27
  extra_rdoc_files: []
28
28
 
29
29
  files:
30
- - README.rdoc
31
- - Gemfile
32
- - Github
33
30
  - MIT-LICENSE
31
+ - Gemfile
32
+ - README.rdoc
34
33
  - Rakefile
35
34
  - app/controllers/sooner/subscribers_controller.rb
36
- - app/views/sooner/subscribers/new.html.erb
37
35
  - app/models/sooner/subscriber.rb
36
+ - app/views/sooner/subscribers/new.html.erb
38
37
  - config/routes.rb
39
- - lib/generators/sooner_install/templates/sooner.rb
40
- - lib/generators/sooner_install/templates/migration.rb
41
- - lib/generators/sooner_install/templates/README
42
- - lib/generators/sooner_install/sooner_install_generator.rb
43
- - lib/generators/sooner_views/sooner_views_generator.rb
44
38
  - lib/sooner.rb
45
- - lib/sooner/rails.rb
46
39
  - lib/sooner/email_format_validator.rb
47
40
  - lib/sooner/version.rb
41
+ - lib/sooner/rails.rb
42
+ - lib/generators/sooner/install/install_generator.rb
43
+ - lib/generators/sooner/install/templates/sooner.rb
44
+ - lib/generators/sooner/install/templates/migration.rb
45
+ - lib/generators/sooner/install/templates/README
46
+ - lib/generators/sooner/views/views_generator.rb
48
47
  has_rdoc: true
49
48
  homepage: http://github.com/shenoudab/sooner
50
49
  licenses: []
data/Github DELETED
@@ -1,25 +0,0 @@
1
- Global setup:
2
- Download and install Git
3
- git config --global user.name "Shenouda Bertel"
4
- git config --global user.email ShenoudaB@gmail.com
5
-
6
- Next steps:
7
- mkdir sooner
8
- cd sooner
9
- git init
10
- touch README
11
- git add README
12
- git commit -m 'first commit'
13
- git remote add origin git@github.com:shenoudab/sooner.git
14
- git push origin master
15
-
16
- Existing Git Repo?
17
- cd existing_git_repo
18
- git remote add origin git@github.com:shenoudab/sooner.git
19
- git push origin master
20
-
21
- Importing a Subversion Repo?
22
- Click here
23
-
24
- When you're done:
25
- Continue