inline_forms 1.3.17 → 1.3.18
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/inline_forms +25 -40
- data/lib/inline_forms/version.rb +1 -1
- metadata +2 -2
data/bin/inline_forms
CHANGED
@@ -20,25 +20,19 @@ require "#{src}/lib/inline_forms/version.rb"
|
|
20
20
|
USAGE = "
|
21
21
|
USAGE: inline_forms <options> <app-name>
|
22
22
|
|
23
|
-
'inline_forms MyApp' will create a rails app in directory MyApp.
|
24
|
-
try to create a MyApp_development mysql database and grant permissions on that
|
25
|
-
database to user 'MyApp' identified by 'MyApp', unless you specify
|
26
|
-
--skip-db-setup
|
23
|
+
'inline_forms MyApp' will create a rails app in directory MyApp.
|
27
24
|
|
28
25
|
Options:
|
29
|
-
--skip-db-setup # skip setup of mysql development database
|
30
26
|
--help # show this message
|
31
27
|
|
32
28
|
VERSION: #{InlineForms::VERSION}
|
33
29
|
"
|
34
30
|
|
35
31
|
|
36
|
-
skip_db_setup = false
|
37
|
-
|
38
32
|
while true
|
39
33
|
case arg_name = ARGV.shift
|
40
|
-
when "--skip-db-setup"
|
41
|
-
skip_db_setup = true
|
34
|
+
# when "--skip-db-setup"
|
35
|
+
# skip_db_setup = true
|
42
36
|
when "--help"
|
43
37
|
puts USAGE
|
44
38
|
exit
|
@@ -70,7 +64,7 @@ gemfile_gems = "
|
|
70
64
|
gem 'rails'
|
71
65
|
gem 'rake'
|
72
66
|
gem 'jquery-rails'
|
73
|
-
gem 'mysql2'
|
67
|
+
#gem 'mysql2'
|
74
68
|
gem 'capistrano'
|
75
69
|
gem 'will_paginate' #, :git => 'git://github.com/acesuares/will_paginate.git', :branch => 'rails3'
|
76
70
|
gem 'tabs_on_rails' # , :git => 'git://github.com/acesuares/tabs_on_rails.git', :branch => 'add_remote'
|
@@ -93,6 +87,7 @@ gemfile_development_group ="
|
|
93
87
|
|
94
88
|
# Include everything needed to run rake, tests, features, etc.
|
95
89
|
group :development do
|
90
|
+
gem 'sqlite3'
|
96
91
|
gem 'rspec-rails'
|
97
92
|
gem 'shoulda', '>= 0'
|
98
93
|
gem 'bundler'
|
@@ -114,36 +109,23 @@ File.open( 'Gemfile', 'w') {|f| f.write(gemfile_sources + gemfile_gems + gemfile
|
|
114
109
|
|
115
110
|
system('bundle install')
|
116
111
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
adapter: mysql2
|
132
|
-
database: #{app_name}_p
|
133
|
-
username: #{app_name}
|
134
|
-
password: #{app_name}444
|
135
|
-
|
136
|
-
"
|
137
|
-
File.open( 'config/database.yml', 'w') {|f| f.write(development_stanza + production_stanza) }
|
138
|
-
|
139
|
-
puts "CREATE #{app_name}_dev database"
|
140
|
-
system("sudo mysqladmin create #{app_name}_dev")
|
141
|
-
|
142
|
-
puts "GRANT ALL ON #{app_name}_dev.* to '#{app_name}'@'localhost' identified by '#{app_name}'"
|
143
|
-
system("echo \"GRANT ALL ON #{app_name}_dev.* to '#{app_name}'@'localhost' identified by '#{app_name}';\" | sudo mysql -v mysql")
|
144
|
-
system('echo "FLUSH PRIVILEGES;" | sudo mysql mysql')
|
112
|
+
puts "\nDatabase setup: creating config/database.yml\n"
|
113
|
+
development_stanza = "
|
114
|
+
development:
|
115
|
+
adapter: sqlite3
|
116
|
+
database: db/development.sqlite3
|
117
|
+
pool: 5
|
118
|
+
timeout: 5000
|
119
|
+
"
|
120
|
+
production_stanza = "
|
121
|
+
production:
|
122
|
+
adapter: mysql2
|
123
|
+
database: #{app_name}_p
|
124
|
+
username: #{app_name}
|
125
|
+
password: #{app_name}444
|
145
126
|
|
146
|
-
|
127
|
+
"
|
128
|
+
File.open( 'config/database.yml', 'w') {|f| f.write(development_stanza + production_stanza) }
|
147
129
|
|
148
130
|
puts "\nDevise install..."
|
149
131
|
system('bundle exec rails g devise:install')
|
@@ -220,5 +202,8 @@ system('echo >> .gitignore')
|
|
220
202
|
system('git add .')
|
221
203
|
system('git commit -a -m " * Initial"')
|
222
204
|
|
223
|
-
puts "\n\nDone! Now make your tables with 'rails g inline_forms ...\n
|
205
|
+
puts "\n\nDone! Now make your tables with 'rails g inline_forms ...\n"
|
206
|
+
puts "\nDon't forget: edit config/{routes.rb, deploy.rb}, .git/config, delete public/index.html\n\n"
|
207
|
+
|
208
|
+
|
224
209
|
|
data/lib/inline_forms/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inline_forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.18
|
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-05-
|
12
|
+
date: 2012-05-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec-rails
|