gunnertechnology 0.0.21 → 0.0.22
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/lib/generators/{project → gunnertechnology}/USAGE +0 -0
- data/lib/generators/gunnertechnology/gems/gems_generator.rb +49 -0
- data/lib/generators/gunnertechnology/project/project_generator.rb +194 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/app/controllers/authentications_controller.rb +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/app/helpers/gunner_technology_helper.rb +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/app/models/authentication.rb +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/app/views/layouts/application.html.erb +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/app/views/shared/_facebook_init.html.erb +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/app/views/shared/_flash_messages.html.erb +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/app/views/shared/_footer.html.erb +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/app/views/shared/_google_analytics.html.erb +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/app/views/shared/_header.html.erb +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/config/facebook_config.yml +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/config/google_analytics_config.yml +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/config/heroku.yml +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/config/initializers/load_facebook_config.rb +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/config/initializers/load_google_analytics_config.rb +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/config/initializers/load_seo_config.rb +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/config/initializers/omniauth.rb +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/config/providers.yml +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/config/seo_config.yml +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/db/migrate/create_authentications.rb +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/PIE.htc +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/colorpicker.js +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/dd_belatedpng.js +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/eye.js +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/head.js +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/jquery.validationEngine-en.js +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/jquery.validationEngine-es.js +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/jquery.validationEngine-fr.js +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/jquery.validationEngine-it.js +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/jquery.validationEngine-pt.js +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/jquery.validationEngine-ro.js +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/jquery.validationEngine.js +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/layout.js +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/modernizr-1.6.min.js +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/utils.js +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/mylibs/.gitignore +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/plugins.js +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/profiling/config.js +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/profiling/yahoo-profiling.min.js +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/script.js +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/stylesheets/grids/1008_24_10_10.css +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/stylesheets/grids/fluid.css +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/stylesheets/handheld.css +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/stylesheets/profiling/yahoo-profiling.css +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/stylesheets/reset.css +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/stylesheets/text.css +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/stylesheets/validationEngine.jquery.css +0 -0
- data/lib/generators/{project → gunnertechnology/project}/templates/public/swfs/charts.swf +0 -0
- data/lib/gunnertechnology/version.rb +1 -1
- metadata +53 -52
- data/lib/generators/project/project_generator.rb +0 -192
|
File without changes
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
module Gunnertechnology
|
|
2
|
+
module Generators
|
|
3
|
+
class GemsGenerator < Rails::Generators::Base
|
|
4
|
+
def generate_gem_dependencies
|
|
5
|
+
gsub_file("Gemfile",/gem 'sqlite3'/,"")
|
|
6
|
+
|
|
7
|
+
gem "rails", "3.0.4"
|
|
8
|
+
gem "aws-s3", "0.6.2", :require => "aws/s3"
|
|
9
|
+
gem "flickr_fu", "0.3.0"
|
|
10
|
+
gem "mini_fb", "1.1.7"
|
|
11
|
+
gem "twitter", "1.0.0"
|
|
12
|
+
gem "foursquare", "0.3.4"
|
|
13
|
+
gem "devise", "1.1.5"
|
|
14
|
+
gem "omniauth", "0.1.6"
|
|
15
|
+
gem "rmagick", ">= 2.12.2"
|
|
16
|
+
gem "simple_form", "1.3.0"
|
|
17
|
+
gem "inherited_resources", "1.1.2"
|
|
18
|
+
gem "delayed_job", "2.1.3"
|
|
19
|
+
gem "mislav-will_paginate", "2.3.11", :require => "will_paginate"
|
|
20
|
+
gem "jquery-rails", ">= 0.2.6"
|
|
21
|
+
gem "paperclip", "2.3.8"
|
|
22
|
+
gem "mysql2", ">= 0.2.6"
|
|
23
|
+
gem "gunnertechnology", ">= 0.0.22"
|
|
24
|
+
|
|
25
|
+
gem "sqlite3-ruby", "1.3.2", :require => "sqlite3", :groups => [:development,:test]
|
|
26
|
+
gem "rspec-rails", ">= 2.5.0", :groups => [:development,:test]
|
|
27
|
+
gem "cucumber-rails", ">= 0.3.2", :groups => [:development,:test]
|
|
28
|
+
gem "cucumber", ">= 0.10.0", :groups => [:development,:test]
|
|
29
|
+
|
|
30
|
+
gem "autotest", "4.4.6", :group => "test"
|
|
31
|
+
gem "autotest-rails", "4.1.0", :group => "test"
|
|
32
|
+
gem "capybara", "0.4.1.1", :group => "test"
|
|
33
|
+
gem "launchy", "0.3.7", :group => "test"
|
|
34
|
+
gem "database_cleaner", "0.6.0", :group => "test"
|
|
35
|
+
gem "spork", "0.8.4", :group => "test"
|
|
36
|
+
gem "factory_girl", "1.3.2", :group => "test"
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
gem "capistrano", "2.5.19", :group => "development"
|
|
40
|
+
gem "heroku", "> 1.15.1", :group => "development"
|
|
41
|
+
gem "heroku_san_gt", ">= 1.0.8", :group => "development"
|
|
42
|
+
gem "rails3-generators", "0.17.0", :group => "development"
|
|
43
|
+
gem "nifty-generators", ">= 0.4.2", :group => "development"
|
|
44
|
+
|
|
45
|
+
run 'bundle install'
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
module Gunnertechnology
|
|
2
|
+
module Generators
|
|
3
|
+
class ProjectGenerator < Rails::Generators::Base
|
|
4
|
+
include Rails::Generators::Migration
|
|
5
|
+
|
|
6
|
+
source_root File.expand_path('../templates', __FILE__)
|
|
7
|
+
argument :devise_model_name, :type => :string, :default => "User"
|
|
8
|
+
|
|
9
|
+
def self.next_migration_number(dirname)
|
|
10
|
+
if ActiveRecord::Base.timestamped_migrations
|
|
11
|
+
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
|
12
|
+
else
|
|
13
|
+
"%.3d" % (current_migration_number(dirname) + 1)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def generate_gem_set
|
|
18
|
+
prepend_to_file '.gitignore' do
|
|
19
|
+
'.bundle
|
|
20
|
+
db/*.sqlite3
|
|
21
|
+
log/*.log
|
|
22
|
+
tmp/**/*
|
|
23
|
+
|
|
24
|
+
config/database.yml
|
|
25
|
+
config/*.sphinx.conf
|
|
26
|
+
config/s3_credentials.yml
|
|
27
|
+
*~
|
|
28
|
+
*.cache
|
|
29
|
+
*.log
|
|
30
|
+
*.pid
|
|
31
|
+
tmp/**/*
|
|
32
|
+
.DS_Store
|
|
33
|
+
db/cstore/**
|
|
34
|
+
db/sphinx/**
|
|
35
|
+
doc/api
|
|
36
|
+
doc/app
|
|
37
|
+
doc/plugins
|
|
38
|
+
doc/*.dot
|
|
39
|
+
coverage/*
|
|
40
|
+
db/*.sqlite3
|
|
41
|
+
*.tmproj
|
|
42
|
+
*.sw?'
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def generate_gem_dependencies
|
|
47
|
+
gsub_file("Gemfile",/gem 'sqlite3'/,"")
|
|
48
|
+
|
|
49
|
+
gem "rails", "3.0.4"
|
|
50
|
+
gem "aws-s3", "0.6.2", :require => "aws/s3"
|
|
51
|
+
gem "flickr_fu", "0.3.0"
|
|
52
|
+
gem "mini_fb", "1.1.7"
|
|
53
|
+
gem "twitter", "1.0.0"
|
|
54
|
+
gem "foursquare", "0.3.4"
|
|
55
|
+
gem "devise", "1.1.5"
|
|
56
|
+
gem "omniauth", "0.1.6"
|
|
57
|
+
gem "rmagick", ">= 2.12.2"
|
|
58
|
+
gem "simple_form", "1.3.0"
|
|
59
|
+
gem "inherited_resources", "1.1.2"
|
|
60
|
+
gem "delayed_job", "2.1.3"
|
|
61
|
+
gem "mislav-will_paginate", "2.3.11", :require => "will_paginate"
|
|
62
|
+
gem "jquery-rails", ">= 0.2.6"
|
|
63
|
+
gem "paperclip", "2.3.8"
|
|
64
|
+
gem "mysql2", ">= 0.2.6"
|
|
65
|
+
gem "gunnertechnology", ">= 0.0.21"
|
|
66
|
+
|
|
67
|
+
gem "sqlite3-ruby", "1.3.2", :require => "sqlite3", :groups => [:development,:test]
|
|
68
|
+
gem "rspec-rails", ">= 2.5.0", :groups => [:development,:test]
|
|
69
|
+
gem "cucumber-rails", ">= 0.3.2", :groups => [:development,:test]
|
|
70
|
+
gem "cucumber", ">= 0.10.0", :groups => [:development,:test]
|
|
71
|
+
|
|
72
|
+
gem "autotest", "4.4.6", :group => "test"
|
|
73
|
+
gem "autotest-rails", "4.1.0", :group => "test"
|
|
74
|
+
gem "capybara", "0.4.1.1", :group => "test"
|
|
75
|
+
gem "launchy", "0.3.7", :group => "test"
|
|
76
|
+
gem "database_cleaner", "0.6.0", :group => "test"
|
|
77
|
+
gem "spork", "0.8.4", :group => "test"
|
|
78
|
+
gem "factory_girl", "1.3.2", :group => "test"
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
gem "capistrano", "2.5.19", :group => "development"
|
|
82
|
+
gem "heroku", "> 1.15.1", :group => "development"
|
|
83
|
+
gem "heroku_san_gt", ">= 1.0.8", :group => "development"
|
|
84
|
+
gem "rails3-generators", "0.17.0", :group => "development"
|
|
85
|
+
gem "nifty-generators", ">= 0.4.2", :group => "development"
|
|
86
|
+
|
|
87
|
+
run 'bundle install'
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def generate_heroku_setup
|
|
91
|
+
template('config/heroku.yml','config/heroku.yml')
|
|
92
|
+
rake("all heroku:create heroku:rack_env")
|
|
93
|
+
|
|
94
|
+
run("heroku addons:add ssl:piggyback --app #{project_name}-staging")
|
|
95
|
+
run("heroku addons:add cron:daily --app #{project_name}-staging")
|
|
96
|
+
run("heroku addons:add custom_error_pages --app #{project_name}-staging")
|
|
97
|
+
run("heroku addons:add custom_domains:basic --app #{project_name}-staging")
|
|
98
|
+
run("heroku addons:add deployhooks:email --app #{project_name}-staging")
|
|
99
|
+
run("heroku addons:add exceptional:basic --app #{project_name}-staging")
|
|
100
|
+
run("heroku addons:add memcache:5mb --app #{project_name}-staging")
|
|
101
|
+
run("heroku addons:add pgbackups:basic --app #{project_name}-staging")
|
|
102
|
+
run("heroku addons:add sendgrid:free --app #{project_name}-staging")
|
|
103
|
+
|
|
104
|
+
run("heroku addons:add ssl:piggyback --app #{project_name}")
|
|
105
|
+
run("heroku addons:add cron:daily --app #{project_name}")
|
|
106
|
+
run("heroku addons:add custom_error_pages --app #{project_name}")
|
|
107
|
+
run("heroku addons:add custom_domains:basic --app #{project_name}")
|
|
108
|
+
run("heroku addons:add deployhooks:email --app #{project_name}")
|
|
109
|
+
run("heroku addons:add exceptional:basic --app #{project_name}")
|
|
110
|
+
run("heroku addons:add memcache:5mb --app #{project_name}")
|
|
111
|
+
run("heroku addons:add pgbackups:basic --app #{project_name}")
|
|
112
|
+
run("heroku addons:add sendgrid:free --app #{project_name}")
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def generate_layout
|
|
116
|
+
template "app/views/layouts/application.html.erb", "app/views/layouts/application.html.erb"
|
|
117
|
+
copy_file "app/helpers/gunner_technology_helper.rb", "app/helpers/gunner_technology_helper.rb"
|
|
118
|
+
directory "app/views/shared", "app/views/shared"
|
|
119
|
+
directory "public/javascripts", "public/javascripts"
|
|
120
|
+
directory "public/stylesheets", "public/stylesheets"
|
|
121
|
+
directory "public/swfs", "public/swfs"
|
|
122
|
+
route('root :to => "doesnot/#exist"')
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def generate_facebook_config
|
|
126
|
+
copy_file "config/facebook_config.yml", "config/facebook_config.yml"
|
|
127
|
+
copy_file "config/initializers/load_facebook_config.rb", "config/initializers/facebook_config.rb"
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
def generate_google_analytics_config
|
|
131
|
+
copy_file "config/google_analytics_config.yml", "config/google_analytics_config.yml"
|
|
132
|
+
copy_file "config/initializers/load_google_analytics_config.rb", "config/initializers/load_google_analytics_config.rb"
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
def generate_seo_config
|
|
136
|
+
copy_file "config/seo_config.yml", "config/seo_config.yml"
|
|
137
|
+
copy_file "config/initializers/load_seo_config.rb", "config/initializers/load_seo_config.rb"
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
def generate_providers_config
|
|
141
|
+
copy_file "config/providers.yml", "config/providers.yml"
|
|
142
|
+
copy_file "config/initializers/omniauth.rb", "config/initializers/omniauth.rb"
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
def generate_jquery
|
|
146
|
+
generate("jquery:install")
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
def generate_simple_form
|
|
150
|
+
generate("simple_form:install")
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
def generate_rspec
|
|
154
|
+
generate("rspec:install")
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
def generate_cucumber
|
|
158
|
+
generate("cucumber:skeleton --rspec --capybara")
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
def generate_devise
|
|
162
|
+
generate("devise:install")
|
|
163
|
+
generate("devise",devise_model_name)
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
def generate_authentication
|
|
167
|
+
# model
|
|
168
|
+
template "app/models/authentication.rb", "app/models/authentication.rb"
|
|
169
|
+
# controller
|
|
170
|
+
template "app/controllers/authentications_controller.rb", "app/controllers/authentications_controller.rb"
|
|
171
|
+
# migration
|
|
172
|
+
migration_template "db/migrate/create_authentications.rb", "db/migrate/create_authentications.rb"
|
|
173
|
+
# route
|
|
174
|
+
route("match '/auth/:provider/callback' => 'authentications#create'")
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
def generate_git_configuration
|
|
178
|
+
git :init
|
|
179
|
+
git :add => "."
|
|
180
|
+
git :commit => "-m 'first commit'"
|
|
181
|
+
git :remote => "add origin git@github.com:gunnertech/#{project_name}.git"
|
|
182
|
+
git :push => "origin master"
|
|
183
|
+
git :checkout => "-b staging"
|
|
184
|
+
git :checkout => "-b production"
|
|
185
|
+
git :checkout => "-b working"
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
private
|
|
189
|
+
def project_name
|
|
190
|
+
Rails.root.to_s.split('/').last
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
end
|
|
File without changes
|
|
File without changes
|
data/lib/generators/{project → gunnertechnology/project}/templates/app/models/authentication.rb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/generators/{project → gunnertechnology/project}/templates/app/views/shared/_footer.html.erb
RENAMED
|
File without changes
|
|
File without changes
|
data/lib/generators/{project → gunnertechnology/project}/templates/app/views/shared/_header.html.erb
RENAMED
|
File without changes
|
data/lib/generators/{project → gunnertechnology/project}/templates/config/facebook_config.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/generators/{project → gunnertechnology/project}/templates/config/initializers/omniauth.rb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/PIE.htc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/eye.js
RENAMED
|
File without changes
|
data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/head.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/layout.js
RENAMED
|
File without changes
|
|
File without changes
|
data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/libs/utils.js
RENAMED
|
File without changes
|
|
File without changes
|
data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/plugins.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/generators/{project → gunnertechnology/project}/templates/public/javascripts/script.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/generators/{project → gunnertechnology/project}/templates/public/stylesheets/handheld.css
RENAMED
|
File without changes
|
|
File without changes
|
data/lib/generators/{project → gunnertechnology/project}/templates/public/stylesheets/reset.css
RENAMED
|
File without changes
|
data/lib/generators/{project → gunnertechnology/project}/templates/public/stylesheets/text.css
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gunnertechnology
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 51
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 22
|
|
10
|
+
version: 0.0.22
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Cody Swann
|
|
@@ -129,55 +129,56 @@ files:
|
|
|
129
129
|
- Rakefile
|
|
130
130
|
- gunnertechnology.gemspec
|
|
131
131
|
- lib/acts_as_authenticatable.rb
|
|
132
|
-
- lib/generators/
|
|
133
|
-
- lib/generators/
|
|
134
|
-
- lib/generators/project/
|
|
135
|
-
- lib/generators/project/templates/app/
|
|
136
|
-
- lib/generators/project/templates/app/
|
|
137
|
-
- lib/generators/project/templates/app/
|
|
138
|
-
- lib/generators/project/templates/app/views/
|
|
139
|
-
- lib/generators/project/templates/app/views/shared/
|
|
140
|
-
- lib/generators/project/templates/app/views/shared/
|
|
141
|
-
- lib/generators/project/templates/app/views/shared/
|
|
142
|
-
- lib/generators/project/templates/app/views/shared/
|
|
143
|
-
- lib/generators/project/templates/
|
|
144
|
-
- lib/generators/project/templates/config/
|
|
145
|
-
- lib/generators/project/templates/config/
|
|
146
|
-
- lib/generators/project/templates/config/
|
|
147
|
-
- lib/generators/project/templates/config/initializers/
|
|
148
|
-
- lib/generators/project/templates/config/initializers/
|
|
149
|
-
- lib/generators/project/templates/config/initializers/
|
|
150
|
-
- lib/generators/project/templates/config/
|
|
151
|
-
- lib/generators/project/templates/config/
|
|
152
|
-
- lib/generators/project/templates/
|
|
153
|
-
- lib/generators/project/templates/
|
|
154
|
-
- lib/generators/project/templates/public/javascripts/libs/
|
|
155
|
-
- lib/generators/project/templates/public/javascripts/libs/
|
|
156
|
-
- lib/generators/project/templates/public/javascripts/libs/
|
|
157
|
-
- lib/generators/project/templates/public/javascripts/libs/
|
|
158
|
-
- lib/generators/project/templates/public/javascripts/libs/
|
|
159
|
-
- lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine-
|
|
160
|
-
- lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine-
|
|
161
|
-
- lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine-
|
|
162
|
-
- lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine-
|
|
163
|
-
- lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine-
|
|
164
|
-
- lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine.js
|
|
165
|
-
- lib/generators/project/templates/public/javascripts/libs/
|
|
166
|
-
- lib/generators/project/templates/public/javascripts/libs/
|
|
167
|
-
- lib/generators/project/templates/public/javascripts/libs/
|
|
168
|
-
- lib/generators/project/templates/public/javascripts/
|
|
169
|
-
- lib/generators/project/templates/public/javascripts/
|
|
170
|
-
- lib/generators/project/templates/public/javascripts/
|
|
171
|
-
- lib/generators/project/templates/public/javascripts/profiling/
|
|
172
|
-
- lib/generators/project/templates/public/javascripts/
|
|
173
|
-
- lib/generators/project/templates/public/
|
|
174
|
-
- lib/generators/project/templates/public/stylesheets/grids/
|
|
175
|
-
- lib/generators/project/templates/public/stylesheets/
|
|
176
|
-
- lib/generators/project/templates/public/stylesheets/
|
|
177
|
-
- lib/generators/project/templates/public/stylesheets/
|
|
178
|
-
- lib/generators/project/templates/public/stylesheets/
|
|
179
|
-
- lib/generators/project/templates/public/stylesheets/
|
|
180
|
-
- lib/generators/project/templates/public/
|
|
132
|
+
- lib/generators/gunnertechnology/USAGE
|
|
133
|
+
- lib/generators/gunnertechnology/gems/gems_generator.rb
|
|
134
|
+
- lib/generators/gunnertechnology/project/project_generator.rb
|
|
135
|
+
- lib/generators/gunnertechnology/project/templates/app/controllers/authentications_controller.rb
|
|
136
|
+
- lib/generators/gunnertechnology/project/templates/app/helpers/gunner_technology_helper.rb
|
|
137
|
+
- lib/generators/gunnertechnology/project/templates/app/models/authentication.rb
|
|
138
|
+
- lib/generators/gunnertechnology/project/templates/app/views/layouts/application.html.erb
|
|
139
|
+
- lib/generators/gunnertechnology/project/templates/app/views/shared/_facebook_init.html.erb
|
|
140
|
+
- lib/generators/gunnertechnology/project/templates/app/views/shared/_flash_messages.html.erb
|
|
141
|
+
- lib/generators/gunnertechnology/project/templates/app/views/shared/_footer.html.erb
|
|
142
|
+
- lib/generators/gunnertechnology/project/templates/app/views/shared/_google_analytics.html.erb
|
|
143
|
+
- lib/generators/gunnertechnology/project/templates/app/views/shared/_header.html.erb
|
|
144
|
+
- lib/generators/gunnertechnology/project/templates/config/facebook_config.yml
|
|
145
|
+
- lib/generators/gunnertechnology/project/templates/config/google_analytics_config.yml
|
|
146
|
+
- lib/generators/gunnertechnology/project/templates/config/heroku.yml
|
|
147
|
+
- lib/generators/gunnertechnology/project/templates/config/initializers/load_facebook_config.rb
|
|
148
|
+
- lib/generators/gunnertechnology/project/templates/config/initializers/load_google_analytics_config.rb
|
|
149
|
+
- lib/generators/gunnertechnology/project/templates/config/initializers/load_seo_config.rb
|
|
150
|
+
- lib/generators/gunnertechnology/project/templates/config/initializers/omniauth.rb
|
|
151
|
+
- lib/generators/gunnertechnology/project/templates/config/providers.yml
|
|
152
|
+
- lib/generators/gunnertechnology/project/templates/config/seo_config.yml
|
|
153
|
+
- lib/generators/gunnertechnology/project/templates/db/migrate/create_authentications.rb
|
|
154
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/libs/PIE.htc
|
|
155
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/libs/colorpicker.js
|
|
156
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/libs/dd_belatedpng.js
|
|
157
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/libs/eye.js
|
|
158
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/libs/head.js
|
|
159
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/libs/jquery.validationEngine-en.js
|
|
160
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/libs/jquery.validationEngine-es.js
|
|
161
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/libs/jquery.validationEngine-fr.js
|
|
162
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/libs/jquery.validationEngine-it.js
|
|
163
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/libs/jquery.validationEngine-pt.js
|
|
164
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/libs/jquery.validationEngine-ro.js
|
|
165
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/libs/jquery.validationEngine.js
|
|
166
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/libs/layout.js
|
|
167
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/libs/modernizr-1.6.min.js
|
|
168
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/libs/utils.js
|
|
169
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/mylibs/.gitignore
|
|
170
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/plugins.js
|
|
171
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/profiling/config.js
|
|
172
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/profiling/yahoo-profiling.min.js
|
|
173
|
+
- lib/generators/gunnertechnology/project/templates/public/javascripts/script.js
|
|
174
|
+
- lib/generators/gunnertechnology/project/templates/public/stylesheets/grids/1008_24_10_10.css
|
|
175
|
+
- lib/generators/gunnertechnology/project/templates/public/stylesheets/grids/fluid.css
|
|
176
|
+
- lib/generators/gunnertechnology/project/templates/public/stylesheets/handheld.css
|
|
177
|
+
- lib/generators/gunnertechnology/project/templates/public/stylesheets/profiling/yahoo-profiling.css
|
|
178
|
+
- lib/generators/gunnertechnology/project/templates/public/stylesheets/reset.css
|
|
179
|
+
- lib/generators/gunnertechnology/project/templates/public/stylesheets/text.css
|
|
180
|
+
- lib/generators/gunnertechnology/project/templates/public/stylesheets/validationEngine.jquery.css
|
|
181
|
+
- lib/generators/gunnertechnology/project/templates/public/swfs/charts.swf
|
|
181
182
|
- lib/gunnertechnology.rb
|
|
182
183
|
- lib/gunnertechnology/version.rb
|
|
183
184
|
has_rdoc: true
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
class ProjectGenerator < Rails::Generators::Base
|
|
2
|
-
include Rails::Generators::Migration
|
|
3
|
-
|
|
4
|
-
source_root File.expand_path('../templates', __FILE__)
|
|
5
|
-
argument :devise_model_name, :type => :string, :default => "User"
|
|
6
|
-
|
|
7
|
-
def self.next_migration_number(dirname)
|
|
8
|
-
if ActiveRecord::Base.timestamped_migrations
|
|
9
|
-
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
|
10
|
-
else
|
|
11
|
-
"%.3d" % (current_migration_number(dirname) + 1)
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def generate_gem_set
|
|
16
|
-
run("rvm use 1.9.2-head@#{project_name} --create")
|
|
17
|
-
|
|
18
|
-
prepend_to_file '.gitignore' do
|
|
19
|
-
'.bundle
|
|
20
|
-
db/*.sqlite3
|
|
21
|
-
log/*.log
|
|
22
|
-
tmp/**/*
|
|
23
|
-
|
|
24
|
-
config/database.yml
|
|
25
|
-
config/*.sphinx.conf
|
|
26
|
-
config/s3_credentials.yml
|
|
27
|
-
*~
|
|
28
|
-
*.cache
|
|
29
|
-
*.log
|
|
30
|
-
*.pid
|
|
31
|
-
tmp/**/*
|
|
32
|
-
.DS_Store
|
|
33
|
-
db/cstore/**
|
|
34
|
-
db/sphinx/**
|
|
35
|
-
doc/api
|
|
36
|
-
doc/app
|
|
37
|
-
doc/plugins
|
|
38
|
-
doc/*.dot
|
|
39
|
-
coverage/*
|
|
40
|
-
db/*.sqlite3
|
|
41
|
-
*.tmproj
|
|
42
|
-
*.sw?'
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def generate_gem_dependencies
|
|
47
|
-
gsub_file("Gemfile",/gem 'sqlite3'/,"")
|
|
48
|
-
|
|
49
|
-
gem "rails", "3.0.4"
|
|
50
|
-
gem "aws-s3", "0.6.2", :require => "aws/s3"
|
|
51
|
-
gem "flickr_fu", "0.3.0"
|
|
52
|
-
gem "mini_fb", "1.1.7"
|
|
53
|
-
gem "twitter", "1.0.0"
|
|
54
|
-
gem "foursquare", "0.3.4"
|
|
55
|
-
gem "devise", "1.1.5"
|
|
56
|
-
gem "omniauth", "0.1.6"
|
|
57
|
-
gem "rmagick", ">= 2.12.2"
|
|
58
|
-
gem "simple_form", "1.3.0"
|
|
59
|
-
gem "inherited_resources", "1.1.2"
|
|
60
|
-
gem "delayed_job", "2.1.3"
|
|
61
|
-
gem "mislav-will_paginate", "2.3.11", :require => "will_paginate"
|
|
62
|
-
gem "jquery-rails", "0.2.6"
|
|
63
|
-
gem "paperclip", "2.3.8"
|
|
64
|
-
gem "mysql2", ">= 0.2.6"
|
|
65
|
-
gem "gunnertechnology", ">= 0.0.21"
|
|
66
|
-
|
|
67
|
-
gem "sqlite3-ruby", "1.3.2", :require => "sqlite3", :groups => [:development,:test]
|
|
68
|
-
gem "rspec-rails", ">= 2.5.0", :groups => [:development,:test]
|
|
69
|
-
gem "cucumber-rails", ">= 0.3.2", :groups => [:development,:test]
|
|
70
|
-
gem "cucumber", ">= 0.10.0", :groups => [:development,:test]
|
|
71
|
-
|
|
72
|
-
gem "autotest", "4.4.6", :group => "test"
|
|
73
|
-
gem "autotest-rails", "4.1.0", :group => "test"
|
|
74
|
-
gem "capybara", "0.4.1.1", :group => "test"
|
|
75
|
-
gem "launchy", "0.3.7", :group => "test"
|
|
76
|
-
gem "database_cleaner", "0.6.0", :group => "test"
|
|
77
|
-
gem "spork", "0.8.4", :group => "test"
|
|
78
|
-
gem "factory_girl", "1.3.2", :group => "test"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
gem "capistrano", "2.5.19", :group => "development"
|
|
82
|
-
gem "heroku", "> 1.15.1", :group => "development"
|
|
83
|
-
gem "heroku_san_gt", ">= 1.0.8", :group => "development"
|
|
84
|
-
gem "rails3-generators", "0.17.0", :group => "development"
|
|
85
|
-
gem "nifty-generators", ">= 0.4.2", :group => "development"
|
|
86
|
-
|
|
87
|
-
run 'bundle install'
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
def generate_heroku_setup
|
|
91
|
-
template('config/heroku.yml','config/heroku.yml')
|
|
92
|
-
rake("all heroku:create heroku:rack_env")
|
|
93
|
-
|
|
94
|
-
run("heroku addons:add ssl:piggyback --app #{project_name}-staging")
|
|
95
|
-
run("heroku addons:add cron:daily --app #{project_name}-staging")
|
|
96
|
-
run("heroku addons:add custom_error_pages --app #{project_name}-staging")
|
|
97
|
-
run("heroku addons:add custom_domains:basic --app #{project_name}-staging")
|
|
98
|
-
run("heroku addons:add deployhooks:email --app #{project_name}-staging")
|
|
99
|
-
run("heroku addons:add exceptional:basic --app #{project_name}-staging")
|
|
100
|
-
run("heroku addons:add memcache:5mb --app #{project_name}-staging")
|
|
101
|
-
run("heroku addons:add pgbackups:basic --app #{project_name}-staging")
|
|
102
|
-
run("heroku addons:add sendgrid:free --app #{project_name}-staging")
|
|
103
|
-
|
|
104
|
-
run("heroku addons:add ssl:piggyback --app #{project_name}")
|
|
105
|
-
run("heroku addons:add cron:daily --app #{project_name}")
|
|
106
|
-
run("heroku addons:add custom_error_pages --app #{project_name}")
|
|
107
|
-
run("heroku addons:add custom_domains:basic --app #{project_name}")
|
|
108
|
-
run("heroku addons:add deployhooks:email --app #{project_name}")
|
|
109
|
-
run("heroku addons:add exceptional:basic --app #{project_name}")
|
|
110
|
-
run("heroku addons:add memcache:5mb --app #{project_name}")
|
|
111
|
-
run("heroku addons:add pgbackups:basic --app #{project_name}")
|
|
112
|
-
run("heroku addons:add sendgrid:free --app #{project_name}")
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
def generate_layout
|
|
116
|
-
template "app/views/layouts/application.html.erb", "app/views/layouts/application.html.erb"
|
|
117
|
-
copy_file "app/helpers/gunner_technology_helper.rb", "app/helpers/gunner_technology_helper.rb"
|
|
118
|
-
directory "app/views/shared", "app/views/shared"
|
|
119
|
-
directory "public/javascripts", "public/javascripts"
|
|
120
|
-
directory "public/stylesheets", "public/stylesheets"
|
|
121
|
-
directory "public/swfs", "public/swfs"
|
|
122
|
-
route('root :to => "doesnot/#exist"')
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
def generate_facebook_config
|
|
126
|
-
copy_file "config/facebook_config.yml", "config/facebook_config.yml"
|
|
127
|
-
copy_file "config/initializers/load_facebook_config.rb", "config/initializers/facebook_config.rb"
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
def generate_google_analytics_config
|
|
131
|
-
copy_file "config/google_analytics_config.yml", "config/google_analytics_config.yml"
|
|
132
|
-
copy_file "config/initializers/load_google_analytics_config.rb", "config/initializers/load_google_analytics_config.rb"
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
def generate_seo_config
|
|
136
|
-
copy_file "config/seo_config.yml", "config/seo_config.yml"
|
|
137
|
-
copy_file "config/initializers/load_seo_config.rb", "config/initializers/load_seo_config.rb"
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
def generate_providers_config
|
|
141
|
-
copy_file "config/providers.yml", "config/providers.yml"
|
|
142
|
-
copy_file "config/initializers/omniauth.rb", "config/initializers/omniauth.rb"
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
def generate_jquery
|
|
146
|
-
generate("jquery:install")
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
def generate_simple_form
|
|
150
|
-
generate("simple_form:install")
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
def generate_rspec
|
|
154
|
-
generate("rspec:install")
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
def generate_cucumber
|
|
158
|
-
generate("cucumber:skeleton --rspec --capybara")
|
|
159
|
-
end
|
|
160
|
-
|
|
161
|
-
def generate_devise
|
|
162
|
-
generate("devise:install")
|
|
163
|
-
generate("devise",devise_model_name)
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
def generate_authentication
|
|
167
|
-
# model
|
|
168
|
-
template "app/models/authentication.rb", "app/models/authentication.rb"
|
|
169
|
-
# controller
|
|
170
|
-
template "app/controllers/authentications_controller.rb", "app/controllers/authentications_controller.rb"
|
|
171
|
-
# migration
|
|
172
|
-
migration_template "db/migrate/create_authentications.rb", "db/migrate/create_authentications.rb"
|
|
173
|
-
# route
|
|
174
|
-
route("match '/auth/:provider/callback' => 'authentications#create'")
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
def generate_git_configuration
|
|
178
|
-
git :init
|
|
179
|
-
git :add => "."
|
|
180
|
-
git :commit => "-m 'first commit'"
|
|
181
|
-
git :remote => "add origin git@github.com:gunnertech/#{project_name}.git"
|
|
182
|
-
git :push => "origin master"
|
|
183
|
-
git :checkout => "-b staging"
|
|
184
|
-
git :checkout => "-b production"
|
|
185
|
-
git :checkout => "-b working"
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
private
|
|
189
|
-
def project_name
|
|
190
|
-
Rails.root.to_s.split('/').last
|
|
191
|
-
end
|
|
192
|
-
end
|