rails_apps_composer 1.4.8 → 1.4.9
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/recipes/active_admin.rb +1 -1
- data/recipes/add_user.rb +19 -1
- data/recipes/cucumber.rb +1 -1
- data/recipes/devise.rb +3 -3
- data/recipes/haml.rb +1 -1
- data/recipes/html5.rb +2 -2
- data/recipes/responders.rb +10 -0
- data/recipes/rspec.rb +1 -1
- data/recipes/seed_database.rb +2 -1
- data/recipes/subdomains.rb +1 -1
- data/recipes/users_page.rb +1 -0
- data/version.rb +1 -1
- metadata +5 -4
data/recipes/active_admin.rb
CHANGED
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.
|
9
|
+
gem 'devise', '>= 2.1.0.rc2'
|
10
10
|
when 'confirmable'
|
11
|
-
gem 'devise', '>= 2.1.0.
|
11
|
+
gem 'devise', '>= 2.1.0.rc2'
|
12
12
|
recipes << 'devise-confirmable'
|
13
13
|
when 'invitable'
|
14
|
-
gem 'devise', '>= 2.1.0.
|
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
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:
|
110
|
-
$iconWhiteSpritePath:
|
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";
|
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.
|
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
|
data/recipes/seed_database.rb
CHANGED
data/recipes/subdomains.rb
CHANGED
@@ -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 => '
|
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'
|
data/recipes/users_page.rb
CHANGED
data/version.rb
CHANGED
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.
|
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-
|
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:
|
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:
|
237
|
+
hash: 3252811679047718809
|
237
238
|
requirements: []
|
238
239
|
rubyforge_project: rails_apps_composer
|
239
240
|
rubygems_version: 1.8.23
|