rails_apps_composer 1.4.8 → 1.4.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  if recipes.include? 'mongoid'
2
2
  gem 'formtastic', "~> 2.1.1"
3
- gem 'activeadmin_mongoid'
3
+ gem 'activeadmin-mongoid'
4
4
  else
5
5
  gem 'activeadmin'
6
6
  end
data/recipes/add_user.rb CHANGED
@@ -39,9 +39,10 @@ RUBY
39
39
  # for mongoid
40
40
  gsub_file 'app/models/user.rb', /end/ do
41
41
  <<-RUBY
42
+ # run 'rake db:mongoid:create_indexes' to create indexes
43
+ index :email, :unique => true
42
44
  field :name
43
45
  validates_presence_of :name
44
- validates_uniqueness_of :name, :email, :case_sensitive => false
45
46
  attr_accessible :name, :email, :password, :password_confirmation, :remember_me
46
47
  end
47
48
  RUBY
@@ -59,6 +60,7 @@ RUBY
59
60
  "validates_presence_of :name\n"
60
61
  end
61
62
  gsub_file 'app/models/user.rb', /validates_uniqueness_of :email/, 'validates_uniqueness_of :name, :email'
63
+ gsub_file 'app/models/user.rb', /# attr_accessible :title, :body/, ''
62
64
  end
63
65
 
64
66
  # needed for both mongoid and ActiveRecord
@@ -72,6 +74,22 @@ RUBY
72
74
  gsub_file 'app/models/user.rb', /# field :unconfirmed_email/, "field :unconfirmed_email"
73
75
  end
74
76
  end
77
+ if recipes.include? 'devise-invitable'
78
+ if recipes.include? 'mongoid'
79
+ gsub_file 'app/models/user.rb', /end/ do
80
+ <<-RUBY
81
+ #invitable
82
+ field :invitation_token, :type => String
83
+ field :invitation_sent_at, :type => Time
84
+ field :invitation_accepted_at, :type => Time
85
+ field :invitation_limit, :type => Integer
86
+ field :invited_by_id, :type => String
87
+ field :invited_by_type, :type => String
88
+ end
89
+ RUBY
90
+ end
91
+ end
92
+ end
75
93
 
76
94
  unless recipes.include? 'haml'
77
95
 
data/recipes/cucumber.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/cucumber.rb
3
3
 
4
4
  if config['cucumber']
5
- gem 'cucumber-rails', '>= 1.3.0', :group => :test
5
+ gem 'cucumber-rails', '>= 1.3.0', :group => :test, :require => false
6
6
  gem 'capybara', '>= 1.1.2', :group => :test
7
7
  gem 'database_cleaner', '>= 0.7.2', :group => :test
8
8
  gem 'launchy', '>= 2.1.0', :group => :test
data/recipes/devise.rb CHANGED
@@ -6,12 +6,12 @@ case config['devise']
6
6
  recipes.delete('devise')
7
7
  say_wizard "Devise recipe skipped."
8
8
  when 'standard'
9
- gem 'devise', '>= 2.1.0.rc'
9
+ gem 'devise', '>= 2.1.0.rc2'
10
10
  when 'confirmable'
11
- gem 'devise', '>= 2.1.0.rc'
11
+ gem 'devise', '>= 2.1.0.rc2'
12
12
  recipes << 'devise-confirmable'
13
13
  when 'invitable'
14
- gem 'devise', '>= 2.1.0.rc'
14
+ gem 'devise', '>= 2.1.0.rc2'
15
15
  gem 'devise_invitable', '>= 1.0.1'
16
16
  recipes << 'devise-confirmable'
17
17
  recipes << 'devise-invitable'
data/recipes/haml.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/haml.rb
3
3
 
4
4
  if config['haml']
5
- gem 'haml', '>= 3.1.4'
5
+ gem 'haml', '>= 3.1.5'
6
6
  gem 'haml-rails', '>= 0.3.4', :group => :development
7
7
  else
8
8
  recipes.delete('haml')
data/recipes/html5.rb CHANGED
@@ -106,8 +106,8 @@ after_bundler do
106
106
  insert_into_file 'app/assets/javascripts/application.js', "//= require bootstrap\n", :after => "jquery_ujs\n"
107
107
  create_file 'app/assets/stylesheets/bootstrap_and_overrides.css.scss', <<-RUBY
108
108
  // Set the correct sprite paths
109
- $iconSpritePath: image-path('glyphicons-halflings.png');
110
- $iconWhiteSpritePath: image-path('glyphicons-halflings-white.png');
109
+ $iconSpritePath: asset-url('glyphicons-halflings.png', image);
110
+ $iconWhiteSpritePath: asset-url('glyphicons-halflings-white.png', image);
111
111
  @import "bootstrap";
112
112
  body { padding-top: 60px; }
113
113
  @import "bootstrap-responsive";
@@ -0,0 +1,10 @@
1
+ gem 'responders'
2
+ after_bundler do
3
+ generate 'responders:install'
4
+ end
5
+
6
+ __END__
7
+
8
+ name: Responders
9
+ description: "Use Responders (https://github.com/plataformatec/responders)."
10
+ author: allen13
data/recipes/rspec.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/rspec.rb
3
3
 
4
4
  if config['rspec']
5
- gem 'rspec-rails', '>= 2.9.0.rc2', :group => [:development, :test]
5
+ gem 'rspec-rails', '>= 2.10.1', :group => [:development, :test]
6
6
  if recipes.include? 'mongoid'
7
7
  # use the database_cleaner gem to reset the test database
8
8
  gem 'database_cleaner', '>= 0.7.2', :group => :test
@@ -62,7 +62,8 @@ after_everything do
62
62
 
63
63
  say_wizard "seeding the database"
64
64
  run 'bundle exec rake db:seed'
65
-
65
+ run 'rake db:mongoid:create_indexes' if recipes.include? 'mongoid'
66
+
66
67
  end
67
68
 
68
69
  __END__
@@ -11,7 +11,7 @@ if recipes.include? 'haml'
11
11
  say_wizard "Subdomains recipe skipped."
12
12
  when 'one-per-user'
13
13
  # user name as a subdomain
14
- inject_into_file 'app/models/user.rb', :before => 'validates_uniqueness_of' do <<-RUBY
14
+ inject_into_file 'app/models/user.rb', :before => 'attr_accessible' do <<-RUBY
15
15
  validates_format_of :name, with: /^[a-z0-9_]+$/, message: 'must be lowercase alphanumerics only'
16
16
  validates_length_of :name, maximum: 32, message: 'exceeds maximum of 32 characters'
17
17
  validates_exclusion_of :name, in: ['www', 'mail', 'ftp'], message: 'is not available'
@@ -160,5 +160,6 @@ name: UsersPage
160
160
  description: "Add a users controller and user show page with links from the home page."
161
161
  author: RailsApps
162
162
 
163
+ run_after: [add_user]
163
164
  category: other
164
165
  tags: [utilities, configuration]
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RailsWizard
2
- VERSION = "1.4.8"
2
+ VERSION = "1.4.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_apps_composer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.8
4
+ version: 1.4.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-27 00:00:00.000000000 Z
12
+ date: 2012-05-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
@@ -186,6 +186,7 @@ files:
186
186
  - recipes/paperclip.rb
187
187
  - recipes/rails_admin.rb
188
188
  - recipes/redis.rb
189
+ - recipes/responders.rb
189
190
  - recipes/resque.rb
190
191
  - recipes/rspec.rb
191
192
  - recipes/sass.rb
@@ -224,7 +225,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
224
225
  version: '0'
225
226
  segments:
226
227
  - 0
227
- hash: 3458666525967832940
228
+ hash: 3252811679047718809
228
229
  required_rubygems_version: !ruby/object:Gem::Requirement
229
230
  none: false
230
231
  requirements:
@@ -233,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
234
  version: '0'
234
235
  segments:
235
236
  - 0
236
- hash: 3458666525967832940
237
+ hash: 3252811679047718809
237
238
  requirements: []
238
239
  rubyforge_project: rails_apps_composer
239
240
  rubygems_version: 1.8.23