t-minus 0.2.0
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/LICENSE +20 -0
- data/README.markdown +92 -0
- data/app/controllers/prelaunch_controller.rb +19 -0
- data/app/models/prelaunch_subscriber.rb +21 -0
- data/app/views/layouts/prelaunch.html.erb +12 -0
- data/app/views/prelaunch/new.html.erb +17 -0
- data/config/cucumber.yml +1 -0
- data/config/initializers/load_prelaunch_config.rb +8 -0
- data/config/routes.rb +15 -0
- data/lib/generators/erb/t_minus_generator.rb +20 -0
- data/lib/generators/haml/t_minus_generator.rb +20 -0
- data/lib/generators/haml/templates/new.html.haml +12 -0
- data/lib/generators/haml/templates/prelaunch.html.haml +9 -0
- data/lib/generators/rspec/t_minus_generator.rb +22 -0
- data/lib/generators/rspec/templates/view_spec.erb +14 -0
- data/lib/generators/t_minus/controller_generator.rb +12 -0
- data/lib/generators/t_minus/install_generator.rb +37 -0
- data/lib/generators/t_minus/model_generator.rb +12 -0
- data/lib/generators/t_minus/templates/migration.rb +12 -0
- data/lib/generators/t_minus/templates/prelaunch_config.yml +10 -0
- data/lib/generators/test_unit/t_minus_generator.rb +22 -0
- data/lib/generators/test_unit/templates/view_test.erb +16 -0
- data/lib/t-minus.rb +1 -0
- data/lib/t-minus/engine.rb +7 -0
- data/lib/t-minus/test_helper.rb +9 -0
- data/spec/controllers/prelaunch_controller_spec.rb +25 -0
- data/spec/models/prelaunch_subscriber_spec.rb +24 -0
- data/spec/views/prelaunch/new.html.erb_spec.rb +11 -0
- data/spec/views/prelaunch/new.html.haml_spec.rb +12 -0
- metadata +263 -0
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2010 John Grimes
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.markdown
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
# T-Minus
|
2
|
+
|
3
|
+
T-Minus is a Rails engine and set of generators that make it easier to
|
4
|
+
create a prelaunch page for your Rails application. It includes support
|
5
|
+
for the collection of email addresses from interested visitors, and it
|
6
|
+
can automatically update your [Campaign Monitor](http://www.campaignmonitor.com/)
|
7
|
+
mailing list.
|
8
|
+
|
9
|
+
T-Minus currently only works with Rails 3 applications.
|
10
|
+
|
11
|
+
You can use T-Minus as a gem by adding it the following line to your
|
12
|
+
Gemfile, then running `bundle:install`:
|
13
|
+
|
14
|
+
gem 't-minus'
|
15
|
+
|
16
|
+
Or you can install it as a plugin:
|
17
|
+
|
18
|
+
rails plugin install http://github.com/johngrimes/t-minus.git
|
19
|
+
|
20
|
+
## Getting started
|
21
|
+
|
22
|
+
Once you have T-Minus installed, run the installation generator:
|
23
|
+
|
24
|
+
rails generate t_minus:install
|
25
|
+
|
26
|
+
By default, this will generate the following:
|
27
|
+
|
28
|
+
* Configuration file - `config/prelaunch_config.yml`
|
29
|
+
* Database migration for prelaunch_subscribers
|
30
|
+
* Prelaunch page view template - `app/views/prelaunch/new.html.erb`
|
31
|
+
* Prelaunch layout template - `app/views/layouts/prelaunch.html.erb`
|
32
|
+
* Empty prelaunch stylesheet - `public/stylesheets/prelaunch.css`
|
33
|
+
|
34
|
+
Then run:
|
35
|
+
|
36
|
+
rake db:migrate
|
37
|
+
|
38
|
+
## Configuration
|
39
|
+
|
40
|
+
The `prelaunch_config.yml` file is separated into environments, and has
|
41
|
+
the following options:
|
42
|
+
|
43
|
+
* `active` (optional, defaults to `false`) - Set this to `true` in environments in which you want the
|
44
|
+
prelaunch page to show in place of the rest of your app. When your app
|
45
|
+
launches, you can simply change this to `false` in production.
|
46
|
+
* `campaign_monitor_api_key` and `campaign_monitor_list_id` (optional) -
|
47
|
+
Add your Campaign Monitor API key and list ID to have new subscribers
|
48
|
+
automatically added.
|
49
|
+
|
50
|
+
Having trouble finding your Campaign Monitor API key or list ID? Visit
|
51
|
+
[this page](http://www.campaignmonitor.com/api/required/).
|
52
|
+
|
53
|
+
## Customising your model or controller
|
54
|
+
|
55
|
+
If you want to customise the PrelaunchController or the
|
56
|
+
PrelaunchSubscriber model, simply use the built-in generators and make
|
57
|
+
changes to the generated files:
|
58
|
+
|
59
|
+
rails generate t_minus:controller
|
60
|
+
|
61
|
+
rails generate t_minus:model
|
62
|
+
|
63
|
+
## Contributing to T-Minus
|
64
|
+
|
65
|
+
I encourage you to:
|
66
|
+
|
67
|
+
* Fork the project.
|
68
|
+
* Make your feature addition or bug fix.
|
69
|
+
* Add features / specs for it.
|
70
|
+
* Send me a pull request. Bonus points for topic branches.
|
71
|
+
|
72
|
+
### A quick guide to getting the features and specs running
|
73
|
+
|
74
|
+
T-Minus works out on a Rails project in the test/rails_app directory.
|
75
|
+
|
76
|
+
First thing to do once you have cloned it down is to go into the
|
77
|
+
test/rails_app directory and run `bundle install` to get all the
|
78
|
+
dependencies.
|
79
|
+
|
80
|
+
Then go back to the root of T-Minus and run:
|
81
|
+
|
82
|
+
cucumber
|
83
|
+
|
84
|
+
Then:
|
85
|
+
|
86
|
+
rake spec
|
87
|
+
|
88
|
+
If the features or specs don't pass, please let me know.
|
89
|
+
|
90
|
+
## Copyright
|
91
|
+
|
92
|
+
Copyright (c) 2010 [John Grimes](http://www.smallspark.com.au/about/). See LICENSE for details.
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class PrelaunchController < ActionController::Base
|
2
|
+
layout 'prelaunch'
|
3
|
+
|
4
|
+
def new
|
5
|
+
@prelaunch_subscriber = PrelaunchSubscriber.new
|
6
|
+
end
|
7
|
+
|
8
|
+
def create
|
9
|
+
@prelaunch_subscriber = PrelaunchSubscriber.new(params[:prelaunch_subscriber])
|
10
|
+
if @prelaunch_subscriber.save
|
11
|
+
redirect_to root_url, :notice => <<NOTICE
|
12
|
+
<p>Thank you for your interest.</p>
|
13
|
+
<p>We have sent you an email to confirm your subscription to our prelaunch mailing list.</p>
|
14
|
+
NOTICE
|
15
|
+
else
|
16
|
+
render :action => 'new'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class PrelaunchSubscriber < ActiveRecord::Base
|
2
|
+
validates_presence_of :email, :message => 'Please enter your email address first.'
|
3
|
+
validates_uniqueness_of :email, :message => 'That email is already on the list.'
|
4
|
+
validates_format_of :email,
|
5
|
+
:with => /\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/i,
|
6
|
+
:message => 'That email address doesn\'t look right.'
|
7
|
+
|
8
|
+
after_save :add_to_campaign_monitor, :if => :campaign_monitor_configured?
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def add_to_campaign_monitor
|
13
|
+
subscriber = Campaigning::Subscriber.new(email)
|
14
|
+
subscriber.add_and_resubscribe!(PRELAUNCH_CONFIG[:campaign_monitor_list_id])
|
15
|
+
end
|
16
|
+
|
17
|
+
def campaign_monitor_configured?
|
18
|
+
!(PRELAUNCH_CONFIG[:campaign_monitor_api_key].blank? ||
|
19
|
+
PRELAUNCH_CONFIG[:campaign_monitor_list_id].blank?)
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8"/>
|
5
|
+
<title><%= Rails.application.class.to_s.split('::').first.titleize %></title>
|
6
|
+
<%= stylesheet_link_tag 'prelaunch' %>
|
7
|
+
<%= csrf_meta_tag %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<%= yield %>
|
11
|
+
</body>
|
12
|
+
</html>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<% if flash[:notice] %>
|
2
|
+
<%= flash[:notice].html_safe %>
|
3
|
+
<% else %>
|
4
|
+
<p>Our new website is launching soon.</p>
|
5
|
+
<p>Add your name to the list and you will be the first to know when we are ready.</p>
|
6
|
+
<%= form_for @prelaunch_subscriber, :url => prelaunch_path do |f| %>
|
7
|
+
<div class="field">
|
8
|
+
<%= f.text_field :email %>
|
9
|
+
<% if @prelaunch_subscriber.errors[:email] %>
|
10
|
+
<div class="form-error"><%= @prelaunch_subscriber.errors[:email].first %></div>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
13
|
+
<div class="actions">
|
14
|
+
<%= f.submit 'Add me to the list' %>
|
15
|
+
</div>
|
16
|
+
<% end %>
|
17
|
+
<% end %>
|
data/config/cucumber.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
default: --format pretty
|
@@ -0,0 +1,8 @@
|
|
1
|
+
prelaunch_config_path = "#{Rails.root}/config/prelaunch_config.yml"
|
2
|
+
if File.exists?(prelaunch_config_path)
|
3
|
+
raw_config = File.read(prelaunch_config_path)
|
4
|
+
PRELAUNCH_CONFIG = YAML.load(raw_config)[Rails.env].symbolize_keys
|
5
|
+
CAMPAIGN_MONITOR_API_KEY = PRELAUNCH_CONFIG[:campaign_monitor_api_key]
|
6
|
+
else
|
7
|
+
PRELAUNCH_CONFIG = {}
|
8
|
+
end
|
data/config/routes.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
module TMinus
|
2
|
+
module Routes
|
3
|
+
def Routes.map
|
4
|
+
Rails.application.routes.draw do
|
5
|
+
post '/' => 'prelaunch#create', :as => :prelaunch
|
6
|
+
root :to => 'prelaunch#new'
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
if PRELAUNCH_CONFIG[:active]
|
13
|
+
Rails.application.routes.clear!
|
14
|
+
TMinus::Routes.map
|
15
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Erb
|
2
|
+
module Generators
|
3
|
+
class TMinusGenerator < Rails::Generators::Base
|
4
|
+
desc 'Generates ERB view template for T-Minus'
|
5
|
+
source_root File.expand_path('../../../../app/views/', __FILE__)
|
6
|
+
|
7
|
+
def create_prelaunch_directory
|
8
|
+
empty_directory 'app/views/prelaunch'
|
9
|
+
end
|
10
|
+
|
11
|
+
def copy_view_file
|
12
|
+
copy_file 'prelaunch/new.html.erb', 'app/views/prelaunch/new.html.erb'
|
13
|
+
end
|
14
|
+
|
15
|
+
def copy_layout_file
|
16
|
+
copy_file 'layouts/prelaunch.html.erb', 'app/views/layouts/prelaunch.html.erb'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Haml
|
2
|
+
module Generators
|
3
|
+
class TMinusGenerator < ::Rails::Generators::Base
|
4
|
+
desc 'Generates Haml view template for T-Minus'
|
5
|
+
source_root File.expand_path('../templates', __FILE__)
|
6
|
+
|
7
|
+
def create_prelaunch_directory
|
8
|
+
empty_directory 'app/views/prelaunch'
|
9
|
+
end
|
10
|
+
|
11
|
+
def copy_view_file
|
12
|
+
copy_file 'new.html.haml', 'app/views/prelaunch/new.html.haml'
|
13
|
+
end
|
14
|
+
|
15
|
+
def copy_layout_file
|
16
|
+
copy_file 'prelaunch.html.haml', 'app/views/layouts/prelaunch.html.haml'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
- if flash[:notice]
|
2
|
+
= flash[:notice].html_safe
|
3
|
+
- else
|
4
|
+
%p Our new website is launching soon.
|
5
|
+
%p Add your name to the list and you will be the first to know when we are ready.
|
6
|
+
= form_for @prelaunch_subscriber, :url => prelaunch_path do |f|
|
7
|
+
.field
|
8
|
+
= f.text_field :email
|
9
|
+
- if @prelaunch_subscriber.errors[:email]
|
10
|
+
.form-error= @prelaunch_subscriber.errors[:email].first
|
11
|
+
.actions
|
12
|
+
= f.submit 'Add me to the list'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Rspec
|
2
|
+
module Generators
|
3
|
+
class TMinusGenerator < ::Rails::Generators::Base
|
4
|
+
desc 'Generates view spec for T-Minus'
|
5
|
+
source_root File.expand_path('../templates', __FILE__)
|
6
|
+
class_option :template_engine
|
7
|
+
|
8
|
+
def create_view_spec_directory
|
9
|
+
empty_directory 'spec/views/prelaunch'
|
10
|
+
end
|
11
|
+
|
12
|
+
def copy_view_file
|
13
|
+
template 'view_spec.erb',
|
14
|
+
"spec/views/prelaunch/new.html.#{options[:template_engine]}_spec.rb"
|
15
|
+
end
|
16
|
+
|
17
|
+
def include_test_helper
|
18
|
+
append_file 'spec/spec_helper.rb', "require 't-minus/test_helper'"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'prelaunch/new.html.<%= options[:template_engine] %>' do
|
4
|
+
before do
|
5
|
+
simulate_prelaunch_routes
|
6
|
+
assign(:prelaunch_subscriber, PrelaunchSubscriber.new)
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should render successfully' do
|
10
|
+
render
|
11
|
+
end
|
12
|
+
|
13
|
+
after { restore_routes }
|
14
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module TMinus
|
2
|
+
module Generators
|
3
|
+
class ControllerGenerator < Rails::Generators::Base
|
4
|
+
desc 'Generates the PrelaunchController for T-Minus'
|
5
|
+
source_root File.expand_path('../../../../app/controllers/', __FILE__)
|
6
|
+
|
7
|
+
def copy_controller_file
|
8
|
+
copy_file 'prelaunch_controller.rb', 'app/controllers/prelaunch_controller.rb'
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'rails/generators/active_record'
|
2
|
+
|
3
|
+
module TMinus
|
4
|
+
module Generators
|
5
|
+
class InstallGenerator < Rails::Generators::Base
|
6
|
+
include Rails::Generators::Migration
|
7
|
+
|
8
|
+
desc 'Generates configuration and migration files for T-Minus'
|
9
|
+
source_root File.expand_path('../templates', __FILE__)
|
10
|
+
|
11
|
+
hook_for :template_engine, :as => :t_minus
|
12
|
+
hook_for :test_framework, :as => :t_minus
|
13
|
+
|
14
|
+
def copy_configuration_file
|
15
|
+
copy_file 'prelaunch_config.yml', 'config/prelaunch_config.yml'
|
16
|
+
end
|
17
|
+
|
18
|
+
def generate_migration
|
19
|
+
migration_template 'migration.rb', "db/migrate/create_#{table_name}"
|
20
|
+
end
|
21
|
+
|
22
|
+
def create_css_file
|
23
|
+
create_file 'public/stylesheets/prelaunch.css'
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.next_migration_number(dirname)
|
27
|
+
ActiveRecord::Generators::Base.next_migration_number(dirname)
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def table_name
|
33
|
+
'prelaunch_subscribers'
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module TMinus
|
2
|
+
module Generators
|
3
|
+
class ModelGenerator < Rails::Generators::Base
|
4
|
+
desc 'Generates the PrelaunchSubscriber model for T-Minus'
|
5
|
+
source_root File.expand_path('../../../../app/models/', __FILE__)
|
6
|
+
|
7
|
+
def copy_controller_file
|
8
|
+
copy_file 'prelaunch_subscriber.rb', 'app/models/prelaunch_subscriber.rb'
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module TestUnit
|
2
|
+
module Generators
|
3
|
+
class TMinusGenerator < ::Rails::Generators::Base
|
4
|
+
desc 'Generates view spec for T-Minus'
|
5
|
+
source_root File.expand_path('../templates', __FILE__)
|
6
|
+
class_option :template_engine
|
7
|
+
|
8
|
+
def create_view_test_directory
|
9
|
+
empty_directory 'test/views/prelaunch'
|
10
|
+
end
|
11
|
+
|
12
|
+
def copy_view_file
|
13
|
+
template 'view_test.erb',
|
14
|
+
"test/views/prelaunch/new.html.#{options[:template_engine]}_test.rb"
|
15
|
+
end
|
16
|
+
|
17
|
+
def include_test_helper
|
18
|
+
append_file 'test/test_helper.rb', "require 't-minus/test_helper'"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class PrelaunchNewViewTest < ActionView::TestCase
|
4
|
+
def setup
|
5
|
+
simulate_prelaunch_routes
|
6
|
+
@prelaunch_subscriber = PrelaunchSubscriber.new
|
7
|
+
end
|
8
|
+
|
9
|
+
test 'should render successfully' do
|
10
|
+
render :template => 'prelaunch/new'
|
11
|
+
end
|
12
|
+
|
13
|
+
def teardown
|
14
|
+
restore_routes
|
15
|
+
end
|
16
|
+
end
|
data/lib/t-minus.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 't-minus/engine' if defined?(Rails)
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe PrelaunchController do
|
4
|
+
describe 'new action' do
|
5
|
+
it 'should be successful' do
|
6
|
+
get :new
|
7
|
+
assigns(:prelaunch_subscriber).should be_a(PrelaunchSubscriber)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
describe 'create action' do
|
12
|
+
it 'should be successful' do
|
13
|
+
PrelaunchSubscriber.any_instance.expects(:save).returns(true)
|
14
|
+
post :create
|
15
|
+
flash[:notice].should_not be_nil
|
16
|
+
response.should redirect_to(root_url)
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should render new template if unsuccessful' do
|
20
|
+
PrelaunchSubscriber.any_instance.expects(:save).returns(false)
|
21
|
+
post :create
|
22
|
+
response.should render_template('prelaunch/new')
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe PrelaunchSubscriber do
|
4
|
+
before do
|
5
|
+
@prelaunch_subscriber = PrelaunchSubscriber.new(:email => 'bob@somedomain.com')
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'should be valid' do
|
9
|
+
@prelaunch_subscriber.should be_valid
|
10
|
+
end
|
11
|
+
|
12
|
+
describe 'add_to_campaign_monitor' do
|
13
|
+
it 'should be successful' do
|
14
|
+
Campaigning::Subscriber.any_instance.expects(:add_and_resubscribe!).returns(true)
|
15
|
+
@prelaunch_subscriber.send(:add_to_campaign_monitor)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe 'campaign_monitor_configured?' do
|
20
|
+
it 'should be successful' do
|
21
|
+
@prelaunch_subscriber.send(:campaign_monitor_configured?).should == true
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'prelaunch/new.html.haml' do
|
4
|
+
before do
|
5
|
+
assign(:prelaunch_subscriber, PrelaunchSubscriber.new)
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'should render successfully' do
|
9
|
+
append_view_path File.expand_path('../../../../lib/generators/haml/templates', __FILE__)
|
10
|
+
render :template => 'new.html.haml'
|
11
|
+
end
|
12
|
+
end
|
metadata
ADDED
@@ -0,0 +1,263 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: t-minus
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- John Grimes
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-09-23 00:00:00 +10:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: campaigning
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 35
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 15
|
33
|
+
- 0
|
34
|
+
version: 0.15.0
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: bundler
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 23
|
46
|
+
segments:
|
47
|
+
- 1
|
48
|
+
- 0
|
49
|
+
- 0
|
50
|
+
version: 1.0.0
|
51
|
+
type: :development
|
52
|
+
version_requirements: *id002
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: rspec
|
55
|
+
prerelease: false
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
hash: 62196431
|
62
|
+
segments:
|
63
|
+
- 2
|
64
|
+
- 0
|
65
|
+
- 0
|
66
|
+
- beta
|
67
|
+
- 22
|
68
|
+
version: 2.0.0.beta.22
|
69
|
+
type: :development
|
70
|
+
version_requirements: *id003
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: rspec-rails
|
73
|
+
prerelease: false
|
74
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
hash: 62196431
|
80
|
+
segments:
|
81
|
+
- 2
|
82
|
+
- 0
|
83
|
+
- 0
|
84
|
+
- beta
|
85
|
+
- 22
|
86
|
+
version: 2.0.0.beta.22
|
87
|
+
type: :development
|
88
|
+
version_requirements: *id004
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: mocha
|
91
|
+
prerelease: false
|
92
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
93
|
+
none: false
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
hash: 43
|
98
|
+
segments:
|
99
|
+
- 0
|
100
|
+
- 9
|
101
|
+
- 8
|
102
|
+
version: 0.9.8
|
103
|
+
type: :development
|
104
|
+
version_requirements: *id005
|
105
|
+
- !ruby/object:Gem::Dependency
|
106
|
+
name: cucumber
|
107
|
+
prerelease: false
|
108
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
109
|
+
none: false
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
hash: 53
|
114
|
+
segments:
|
115
|
+
- 0
|
116
|
+
- 8
|
117
|
+
- 5
|
118
|
+
version: 0.8.5
|
119
|
+
type: :development
|
120
|
+
version_requirements: *id006
|
121
|
+
- !ruby/object:Gem::Dependency
|
122
|
+
name: cucumber-rails
|
123
|
+
prerelease: false
|
124
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
125
|
+
none: false
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
hash: 23
|
130
|
+
segments:
|
131
|
+
- 0
|
132
|
+
- 3
|
133
|
+
- 2
|
134
|
+
version: 0.3.2
|
135
|
+
type: :development
|
136
|
+
version_requirements: *id007
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: webrat
|
139
|
+
prerelease: false
|
140
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
141
|
+
none: false
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
hash: 1
|
146
|
+
segments:
|
147
|
+
- 0
|
148
|
+
- 7
|
149
|
+
- 1
|
150
|
+
version: 0.7.1
|
151
|
+
type: :development
|
152
|
+
version_requirements: *id008
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: nokogiri
|
155
|
+
prerelease: false
|
156
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
157
|
+
none: false
|
158
|
+
requirements:
|
159
|
+
- - ">="
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
hash: 113
|
162
|
+
segments:
|
163
|
+
- 1
|
164
|
+
- 4
|
165
|
+
- 3
|
166
|
+
- 1
|
167
|
+
version: 1.4.3.1
|
168
|
+
type: :development
|
169
|
+
version_requirements: *id009
|
170
|
+
- !ruby/object:Gem::Dependency
|
171
|
+
name: jeweler
|
172
|
+
prerelease: false
|
173
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
174
|
+
none: false
|
175
|
+
requirements:
|
176
|
+
- - ">="
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
hash: 7
|
179
|
+
segments:
|
180
|
+
- 1
|
181
|
+
- 4
|
182
|
+
- 0
|
183
|
+
version: 1.4.0
|
184
|
+
type: :development
|
185
|
+
version_requirements: *id010
|
186
|
+
description: Rails engine and generators that make it easier to create a prelaunch page for your application that can collect email addresses of interested visitors.
|
187
|
+
email: john@smallspark.com.au
|
188
|
+
executables: []
|
189
|
+
|
190
|
+
extensions: []
|
191
|
+
|
192
|
+
extra_rdoc_files:
|
193
|
+
- LICENSE
|
194
|
+
- README.markdown
|
195
|
+
files:
|
196
|
+
- app/controllers/prelaunch_controller.rb
|
197
|
+
- app/models/prelaunch_subscriber.rb
|
198
|
+
- app/views/layouts/prelaunch.html.erb
|
199
|
+
- app/views/prelaunch/new.html.erb
|
200
|
+
- config/cucumber.yml
|
201
|
+
- config/initializers/load_prelaunch_config.rb
|
202
|
+
- config/routes.rb
|
203
|
+
- lib/generators/erb/t_minus_generator.rb
|
204
|
+
- lib/generators/haml/t_minus_generator.rb
|
205
|
+
- lib/generators/haml/templates/new.html.haml
|
206
|
+
- lib/generators/haml/templates/prelaunch.html.haml
|
207
|
+
- lib/generators/rspec/t_minus_generator.rb
|
208
|
+
- lib/generators/rspec/templates/view_spec.erb
|
209
|
+
- lib/generators/t_minus/controller_generator.rb
|
210
|
+
- lib/generators/t_minus/install_generator.rb
|
211
|
+
- lib/generators/t_minus/model_generator.rb
|
212
|
+
- lib/generators/t_minus/templates/migration.rb
|
213
|
+
- lib/generators/t_minus/templates/prelaunch_config.yml
|
214
|
+
- lib/generators/test_unit/t_minus_generator.rb
|
215
|
+
- lib/generators/test_unit/templates/view_test.erb
|
216
|
+
- lib/t-minus.rb
|
217
|
+
- lib/t-minus/engine.rb
|
218
|
+
- lib/t-minus/test_helper.rb
|
219
|
+
- LICENSE
|
220
|
+
- README.markdown
|
221
|
+
- spec/views/prelaunch/new.html.haml_spec.rb
|
222
|
+
- spec/views/prelaunch/new.html.erb_spec.rb
|
223
|
+
- spec/controllers/prelaunch_controller_spec.rb
|
224
|
+
- spec/models/prelaunch_subscriber_spec.rb
|
225
|
+
has_rdoc: true
|
226
|
+
homepage: http://github.com/johngrimes/t-minus
|
227
|
+
licenses: []
|
228
|
+
|
229
|
+
post_install_message:
|
230
|
+
rdoc_options:
|
231
|
+
- --charset=UTF-8
|
232
|
+
require_paths:
|
233
|
+
- lib
|
234
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
235
|
+
none: false
|
236
|
+
requirements:
|
237
|
+
- - ">="
|
238
|
+
- !ruby/object:Gem::Version
|
239
|
+
hash: 3
|
240
|
+
segments:
|
241
|
+
- 0
|
242
|
+
version: "0"
|
243
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
244
|
+
none: false
|
245
|
+
requirements:
|
246
|
+
- - ">="
|
247
|
+
- !ruby/object:Gem::Version
|
248
|
+
hash: 3
|
249
|
+
segments:
|
250
|
+
- 0
|
251
|
+
version: "0"
|
252
|
+
requirements: []
|
253
|
+
|
254
|
+
rubyforge_project:
|
255
|
+
rubygems_version: 1.3.7
|
256
|
+
signing_key:
|
257
|
+
specification_version: 3
|
258
|
+
summary: Prelaunch page and subscriber list for your Rails app.
|
259
|
+
test_files:
|
260
|
+
- spec/views/prelaunch/new.html.haml_spec.rb
|
261
|
+
- spec/views/prelaunch/new.html.erb_spec.rb
|
262
|
+
- spec/controllers/prelaunch_controller_spec.rb
|
263
|
+
- spec/models/prelaunch_subscriber_spec.rb
|