app_drone 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -3
- data/README.md~ +4 -2
- data/lib/app_drone/drones/bundle/bundle.rb +0 -1
- data/lib/app_drone/drones/chosen/chosen.rb +14 -0
- data/lib/app_drone/drones/chosen/chosen.rb~ +14 -0
- data/lib/app_drone/drones/chosen/showcase.html.slim +4 -0
- data/lib/app_drone/drones/chosen/showcase.html.slim~ +0 -0
- data/lib/app_drone/drones/cleanup/cleanup.rb +0 -1
- data/lib/app_drone/drones/high_voltage/create_pages_directory.erb +1 -0
- data/lib/app_drone/drones/high_voltage/create_pages_directory.erb~ +1 -0
- data/lib/app_drone/drones/high_voltage/high_voltage.rb +14 -0
- data/lib/app_drone/drones/high_voltage/high_voltage.rb~ +14 -0
- data/lib/app_drone/drones/javascript/application_coffee.erb +2 -2
- data/lib/app_drone/drones/javascript/application_coffee.erb~ +12 -0
- data/lib/app_drone/drones/javascript/javascript.rb +7 -10
- data/lib/app_drone/drones/javascript/javascript.rb~ +8 -10
- data/lib/app_drone/drones/showcase/showcase.rb +27 -0
- data/lib/app_drone/drones/showcase/showcase.rb~ +27 -0
- data/lib/app_drone/drones/showcase/showcase_page.erb +11 -0
- data/lib/app_drone/drones/showcase/showcase_page.erb~ +11 -0
- data/lib/app_drone/drones/slim_view/application_slim.erb~ +15 -0
- data/lib/app_drone/drones/slim_view/slim_view.rb +3 -2
- data/lib/app_drone/drones/slim_view/slim_view.rb~ +4 -3
- data/lib/app_drone/drones/stylesheet/application_sass.erb +5 -6
- data/lib/app_drone/drones/stylesheet/application_sass.erb~ +5 -6
- data/lib/app_drone/drones/stylesheet/stylesheet.rb +6 -9
- data/lib/app_drone/drones/stylesheet/stylesheet.rb~ +7 -9
- data/lib/app_drone/drones/zzz/bootstrap/bootstrap.rb +2 -2
- data/lib/app_drone/drones/zzz/bootstrap/bootstrap.rb~ +2 -2
- data/lib/app_drone/drones/zzz/simple_form/simple_form.rb +3 -1
- data/lib/app_drone/drones/zzz/simple_form/simple_form.rb~ +4 -2
- data/lib/app_drone/version.rb +1 -1
- data/lib/app_drone/version.rb~ +1 -1
- data/out.rb +41 -6
- data/test/test_app_drone.rb +7 -3
- data/test/test_app_drone.rb~ +7 -3
- metadata +19 -7
- data/lib/app_drone/drones/zzz/chosen/chosen.rb +0 -13
- data/lib/app_drone/drones/zzz/chosen/chosen.rb~ +0 -13
data/README.md
CHANGED
@@ -156,14 +156,15 @@ AppDrone is not for everyone. It's highly opinionated about how a Rails app shou
|
|
156
156
|
- Stylesheet
|
157
157
|
- Javascript
|
158
158
|
- SlimView
|
159
|
+
- HighVoltage
|
160
|
+
- Showcase (drones use this to demonstrate their working functionality)
|
161
|
+
- Chosen, by harvestHQ
|
159
162
|
- Cleanup
|
160
163
|
|
161
164
|
|
162
165
|
### Frozen drones (currently in development)
|
163
166
|
|
164
167
|
- Bootstrap
|
165
|
-
- Chosen
|
166
|
-
- Cleanup
|
167
168
|
- FactoryGirl
|
168
169
|
- Git
|
169
170
|
- Guard
|
@@ -174,7 +175,8 @@ AppDrone is not for everyone. It's highly opinionated about how a Rails app shou
|
|
174
175
|
|
175
176
|
### Future drones (TODO - I'll get there some day!)
|
176
177
|
|
177
|
-
-
|
178
|
+
- Stylesheet utils
|
179
|
+
- SlimViews: Add browser-specific classes to <html> via useragent + helpers..
|
178
180
|
- UserAgent blocking script
|
179
181
|
- Responders
|
180
182
|
- HasScope
|
data/README.md~
CHANGED
@@ -156,14 +156,15 @@ AppDrone is not for everyone. It's highly opinionated about how a Rails app shou
|
|
156
156
|
- Stylesheet
|
157
157
|
- Javascript
|
158
158
|
- SlimView
|
159
|
+
- HighVoltage
|
160
|
+
- Showcase (drones use this to demonstrate their working functionality)
|
161
|
+
- Chosen, by harvestHQ
|
159
162
|
- Cleanup
|
160
163
|
|
161
164
|
|
162
165
|
### Frozen drones (currently in development)
|
163
166
|
|
164
167
|
- Bootstrap
|
165
|
-
- Chosen
|
166
|
-
- Cleanup
|
167
168
|
- FactoryGirl
|
168
169
|
- Git
|
169
170
|
- Guard
|
@@ -174,6 +175,7 @@ AppDrone is not for everyone. It's highly opinionated about how a Rails app shou
|
|
174
175
|
|
175
176
|
### Future drones (TODO - I'll get there some day!)
|
176
177
|
|
178
|
+
- Stylesheet utils
|
177
179
|
- SlimViews: Add browser-specific classes to <html>
|
178
180
|
- UserAgent blocking script
|
179
181
|
- Responders
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module AppDrone
|
2
|
+
class Chosen < Drone
|
3
|
+
desc 'Installs the Chosen plugin by HarvestHQ'
|
4
|
+
depends_on :bundle, :stylesheet, :javascript
|
5
|
+
|
6
|
+
def align
|
7
|
+
bundle.add 'chosen-rails'
|
8
|
+
stylesheet.pipeline 'chosen'
|
9
|
+
javascript.pipeline 'chosen-jquery'
|
10
|
+
javascript.on_ready "$('.chzn-select').chosen();"
|
11
|
+
showcase.me! self
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module AppDrone
|
2
|
+
class Chosen < Drone
|
3
|
+
desc 'Installs the Chosen plugin by HarvestHQ'
|
4
|
+
depends_on :bundle, :stylesheet, :javascript
|
5
|
+
|
6
|
+
def align
|
7
|
+
bundle.add 'chosen-rails'
|
8
|
+
stylesheet.pipeline 'chosen'
|
9
|
+
javascript.pipeline 'chosen-jquery'
|
10
|
+
javascript.on_ready "$('.chzn-select').chosen();"
|
11
|
+
showcase.me! self
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
FileUtils.mkpath 'app/views/pages'
|
@@ -0,0 +1 @@
|
|
1
|
+
@generator.directory 'app/views/pages'
|
@@ -2,11 +2,11 @@ js_asset_path = File.join %w(app assets javascripts application.js)
|
|
2
2
|
@generator.remove_file(js_asset_path)
|
3
3
|
@coffee_asset_path = File.join %w(app assets javascripts application.js.coffee)
|
4
4
|
@generator.create_file @coffee_asset_path, <<-COFFEE
|
5
|
-
<%
|
5
|
+
<% pipeline_requires.each { |r| %>//= require <%= r %>
|
6
6
|
<% } %>//= require_tree .
|
7
7
|
|
8
8
|
$(document).ready ->
|
9
|
-
<%
|
9
|
+
<% on_readies.each { |r| %><%= r %>
|
10
10
|
<% } %>
|
11
11
|
|
12
12
|
COFFEE
|
@@ -0,0 +1,12 @@
|
|
1
|
+
js_asset_path = File.join %w(app assets javascripts application.js)
|
2
|
+
@generator.remove_file(js_asset_path)
|
3
|
+
@coffee_asset_path = File.join %w(app assets javascripts application.js.coffee)
|
4
|
+
@generator.create_file @coffee_asset_path, <<-COFFEE
|
5
|
+
<% pipeline_requires.each { |r| %>//= require <%= r %>
|
6
|
+
<% } %>//= require_tree .
|
7
|
+
|
8
|
+
$(document).ready ->
|
9
|
+
<% onreadies.each { |r| %><%= r %>
|
10
|
+
<% } %>
|
11
|
+
|
12
|
+
COFFEE
|
@@ -1,21 +1,18 @@
|
|
1
|
-
# Incomplete
|
2
1
|
module AppDrone
|
3
2
|
class Javascript < Drone
|
4
3
|
desc "Generates application.js.coffee with manifest options and jQuery load hooks"
|
5
|
-
attr_accessor :
|
4
|
+
attr_accessor :pipeline_requires, :on_readies
|
6
5
|
|
7
6
|
def setup
|
8
|
-
self.
|
9
|
-
self.
|
10
|
-
self.add_require 'jquery'
|
11
|
-
self.add_require 'jquery_ujs'
|
7
|
+
self.pipeline_requires = []
|
8
|
+
self.on_readies = []
|
12
9
|
|
13
|
-
|
14
|
-
|
10
|
+
self.pipeline 'jquery'
|
11
|
+
self.pipeline 'jquery_ujs'
|
15
12
|
end
|
16
13
|
|
17
|
-
def
|
18
|
-
def
|
14
|
+
def pipeline(r); self.pipeline_requires << r end
|
15
|
+
def on_ready(r); self.on_readies << r end
|
19
16
|
|
20
17
|
def execute
|
21
18
|
do! :application_coffee
|
@@ -1,21 +1,19 @@
|
|
1
|
-
#
|
1
|
+
# Complete!
|
2
2
|
module AppDrone
|
3
3
|
class Javascript < Drone
|
4
4
|
desc "Generates application.js.coffee with manifest options and jQuery load hooks"
|
5
|
-
attr_accessor :
|
5
|
+
attr_accessor :pipeline_requires, :on_readies
|
6
6
|
|
7
7
|
def setup
|
8
|
-
self.
|
9
|
-
self.
|
10
|
-
self.add_require 'jquery'
|
11
|
-
self.add_require 'jquery_ujs'
|
8
|
+
self.pipeline_requires = []
|
9
|
+
self.on_readies = []
|
12
10
|
|
13
|
-
|
14
|
-
|
11
|
+
self.pipeline 'jquery'
|
12
|
+
self.pipeline 'jquery_ujs'
|
15
13
|
end
|
16
14
|
|
17
|
-
def
|
18
|
-
def
|
15
|
+
def pipeline(r); self.pipeline_requires << r end
|
16
|
+
def on_ready(r); self.on_readies << r end
|
19
17
|
|
20
18
|
def execute
|
21
19
|
do! :application_coffee
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module AppDrone
|
2
|
+
class Showcase < Drone
|
3
|
+
desc "Creates a page to demonstrate the drones' hard work"
|
4
|
+
depends_on :high_voltage, :slim_view
|
5
|
+
|
6
|
+
attr_accessor :showcases
|
7
|
+
|
8
|
+
def setup
|
9
|
+
self.showcases = []
|
10
|
+
end
|
11
|
+
|
12
|
+
def me!(klass)
|
13
|
+
showcases << klass.class.to_s.gsub('AppDrone::','').underscore
|
14
|
+
end
|
15
|
+
|
16
|
+
def execute
|
17
|
+
do! :showcase_page
|
18
|
+
end
|
19
|
+
|
20
|
+
def showcase_for(drone_name)
|
21
|
+
showcase_path = File.join File.dirname(__FILE__), '..', drone_name, 'showcase.html.slim'
|
22
|
+
snippet = ERB.new File.read(showcase_path)
|
23
|
+
return snippet.result(binding)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module AppDrone
|
2
|
+
class Showcase < Drone
|
3
|
+
desc "Creates a page to demonstrate the drones' hard work"
|
4
|
+
depends_on :high_voltage, :slim_view
|
5
|
+
|
6
|
+
attr_accessor :showcases
|
7
|
+
|
8
|
+
def setup
|
9
|
+
self.showcases = []
|
10
|
+
end
|
11
|
+
|
12
|
+
def me!(klass)
|
13
|
+
showcases << klass.class.to_s.gsub('AppDrone::','').underscore
|
14
|
+
end
|
15
|
+
|
16
|
+
def execute
|
17
|
+
do! :showcase_page
|
18
|
+
end
|
19
|
+
|
20
|
+
def showcase_for(drone_name)
|
21
|
+
showcase_path = File.join File.dirname(__FILE__), '..', drone_name, 'showcase.html.slim'
|
22
|
+
snippet = ERB.new File.read(showcase_path)
|
23
|
+
return snippet.result(binding)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
erb_index_path = File.join %w(app views layouts application.html.erb)
|
2
|
+
@generator.remove_file(erb_index_path)
|
3
|
+
slim_index_path = File.join %w(app views layouts application.html.slim)
|
4
|
+
@generator.create_file slim_index_path, <<-SLIM
|
5
|
+
doctype 5
|
6
|
+
html
|
7
|
+
head
|
8
|
+
title #{app_name}
|
9
|
+
= stylesheet_link_tag 'application', media: 'all'
|
10
|
+
= javascript_include_tag 'application'
|
11
|
+
= csrf_meta_tags
|
12
|
+
|
13
|
+
body class=controller_name
|
14
|
+
= yield
|
15
|
+
SLIM
|
@@ -1,8 +1,9 @@
|
|
1
|
-
# Incomplete
|
2
1
|
module AppDrone
|
3
2
|
class SlimView < Drone
|
4
3
|
desc "Sets up application.html.slim with shiny goodness"
|
5
|
-
# TODO
|
4
|
+
# TODO integration with rack useragent for browser-detection
|
5
|
+
|
6
|
+
depends_on :bundle
|
6
7
|
|
7
8
|
def align
|
8
9
|
bundle.add 'slim-rails'
|
@@ -1,11 +1,12 @@
|
|
1
|
-
# Incomplete
|
2
1
|
module AppDrone
|
3
2
|
class SlimView < Drone
|
4
3
|
desc "Sets up application.html.slim with shiny goodness"
|
5
|
-
# TODO
|
4
|
+
# TODO integration with rack useragent for browser-detection
|
5
|
+
|
6
|
+
depends_on :bundle
|
6
7
|
|
7
8
|
def align
|
8
|
-
|
9
|
+
bundle.add 'slim-rails'
|
9
10
|
end
|
10
11
|
|
11
12
|
def execute
|
@@ -1,12 +1,11 @@
|
|
1
1
|
@css_asset_path = File.join %w(app assets stylesheets application.css)
|
2
2
|
@generator.remove_file(@css_asset_path)
|
3
|
-
@sass_asset_path = File.join %w(app assets stylesheets application.css.
|
3
|
+
@sass_asset_path = File.join %w(app assets stylesheets application.css.sass)
|
4
|
+
|
4
5
|
@generator.create_file @sass_asset_path, <<-SASS
|
5
|
-
|
6
|
-
<%
|
7
|
-
<% } %>/*= require_self
|
8
|
-
*/
|
6
|
+
<% pipeline_requires.each { |r| %>/*= require <%= r %> */<% } %><% unless pipeline_requires.empty? %>
|
7
|
+
<% end%>/*= require_self */
|
9
8
|
|
10
|
-
<% imports.each { |i| %>@import '<%= i %>'
|
9
|
+
<% imports.each { |i| %>@import '<%= i %>'
|
11
10
|
<% } %>
|
12
11
|
SASS
|
@@ -1,12 +1,11 @@
|
|
1
1
|
@css_asset_path = File.join %w(app assets stylesheets application.css)
|
2
2
|
@generator.remove_file(@css_asset_path)
|
3
|
-
@sass_asset_path = File.join %w(app assets stylesheets application.css.
|
3
|
+
@sass_asset_path = File.join %w(app assets stylesheets application.css.sass)
|
4
|
+
|
4
5
|
@generator.create_file @sass_asset_path, <<-SASS
|
5
|
-
|
6
|
-
<%
|
7
|
-
<% } %>/*= require_self
|
8
|
-
*/
|
6
|
+
<% pipeline_requires.each { |r| %>/*= require <%= r %> */<% } %><% unless pipeline_requires.empty? %>
|
7
|
+
<% end%>/*= require_self */
|
9
8
|
|
10
|
-
<% imports.each { |i| %>@import '<%= i %>'
|
9
|
+
<% imports.each { |i| %>@import '<%= i %>'
|
11
10
|
<% } %>
|
12
11
|
SASS
|
@@ -1,28 +1,25 @@
|
|
1
|
-
# Incomplete
|
2
1
|
module AppDrone
|
3
2
|
class Stylesheet < Drone
|
4
3
|
desc "Generates application.css.sass with manifest options and imports"
|
5
|
-
|
4
|
+
depends_on :bundle
|
6
5
|
|
7
|
-
attr_accessor :
|
8
|
-
def
|
9
|
-
def
|
6
|
+
attr_accessor :pipeline_requires, :imports
|
7
|
+
def pipeline(r); self.pipeline_requires << r end
|
8
|
+
def import(i); self.imports << i end
|
10
9
|
|
11
10
|
def setup
|
12
|
-
self.
|
11
|
+
self.pipeline_requires = []
|
13
12
|
self.imports = []
|
14
13
|
end
|
15
14
|
|
16
15
|
def align
|
17
16
|
bundle.add 'therubyracer'
|
18
17
|
bundle.add 'compass-rails'
|
19
|
-
self.
|
18
|
+
self.import 'compass'
|
20
19
|
end
|
21
20
|
|
22
21
|
def execute
|
23
22
|
do! :application_sass
|
24
|
-
# TODO currently using .scss and not .sass, switch to the cleaner syntax
|
25
|
-
# TODO render css utils (or make this a separate integration)
|
26
23
|
end
|
27
24
|
|
28
25
|
end
|
@@ -1,28 +1,26 @@
|
|
1
|
-
#
|
1
|
+
# Complete
|
2
2
|
module AppDrone
|
3
3
|
class Stylesheet < Drone
|
4
4
|
desc "Generates application.css.sass with manifest options and imports"
|
5
|
-
|
5
|
+
depends_on :bundle
|
6
6
|
|
7
|
-
attr_accessor :
|
8
|
-
def
|
9
|
-
def
|
7
|
+
attr_accessor :pipeline_requires, :imports
|
8
|
+
def pipeline(r); self.pipeline_requires << r end
|
9
|
+
def import(i); self.imports << i end
|
10
10
|
|
11
11
|
def setup
|
12
|
-
self.
|
12
|
+
self.pipeline_requires = []
|
13
13
|
self.imports = []
|
14
14
|
end
|
15
15
|
|
16
16
|
def align
|
17
17
|
bundle.add 'therubyracer'
|
18
18
|
bundle.add 'compass-rails'
|
19
|
-
self.
|
19
|
+
self.import 'compass'
|
20
20
|
end
|
21
21
|
|
22
22
|
def execute
|
23
23
|
do! :application_sass
|
24
|
-
# TODO currently using .scss and not .sass, switch to the cleaner syntax
|
25
|
-
# TODO render css utils (or make this a separate integration)
|
26
24
|
end
|
27
25
|
|
28
26
|
end
|
@@ -13,8 +13,8 @@ class Bootstrap < Drone
|
|
13
13
|
if params[:vendor]
|
14
14
|
# TODO different require paths for stylesheet
|
15
15
|
else
|
16
|
-
stylesheet.
|
17
|
-
stylesheet.
|
16
|
+
stylesheet.import 'compass_twitter_bootstrap'
|
17
|
+
stylesheet.import 'compass_twitter_bootstrap_responsive' if params[:responsive]
|
18
18
|
# TODO js imports - based on options
|
19
19
|
end
|
20
20
|
end
|
@@ -13,8 +13,8 @@ class Bootstrap < Drone
|
|
13
13
|
if params[:vendor]
|
14
14
|
# TODO different require paths for stylesheet
|
15
15
|
else
|
16
|
-
stylesheet.
|
17
|
-
stylesheet.
|
16
|
+
stylesheet.import 'compass_twitter_bootstrap'
|
17
|
+
stylesheet.import 'compass_twitter_bootstrap_responsive' if params[:responsive]
|
18
18
|
# TODO js imports - based on options
|
19
19
|
end
|
20
20
|
end
|
@@ -2,9 +2,11 @@
|
|
2
2
|
module AppDrone
|
3
3
|
class SimpleForm < Drone
|
4
4
|
desc "Installs SimpleForm (with custom Bootstrap integration)"
|
5
|
+
param :country_select, :boolean, info: 'Add country_select for listing countries'
|
6
|
+
|
5
7
|
def align
|
6
8
|
bundle.add 'simple_form'
|
7
|
-
bundle.add 'country_select'
|
9
|
+
bundle.add 'country_select' if params[:country_select]
|
8
10
|
end
|
9
11
|
|
10
12
|
def execute
|
@@ -2,9 +2,11 @@
|
|
2
2
|
module AppDrone
|
3
3
|
class SimpleForm < Drone
|
4
4
|
desc "Installs SimpleForm (with custom Bootstrap integration)"
|
5
|
+
param :country_select, :boolean, info: 'Add country_select for listing countries'
|
6
|
+
|
5
7
|
def align
|
6
|
-
|
7
|
-
|
8
|
+
bundle.add 'simple_form'
|
9
|
+
bundle.add 'country_select' if params[:country_select]
|
8
10
|
end
|
9
11
|
|
10
12
|
def execute
|
data/lib/app_drone/version.rb
CHANGED
data/lib/app_drone/version.rb~
CHANGED
data/out.rb
CHANGED
@@ -26,6 +26,8 @@ class AppBuilder < Rails::AppBuilder
|
|
26
26
|
@generator.gem 'therubyracer'
|
27
27
|
@generator.gem 'compass-rails'
|
28
28
|
@generator.gem 'slim-rails'
|
29
|
+
@generator.gem 'high_voltage'
|
30
|
+
@generator.gem 'chosen-rails'
|
29
31
|
|
30
32
|
run_bundle
|
31
33
|
@generator.options = @generator.options.dup
|
@@ -45,10 +47,12 @@ js_asset_path = File.join %w(app assets javascripts application.js)
|
|
45
47
|
@generator.create_file @coffee_asset_path, <<-COFFEE
|
46
48
|
//= require jquery
|
47
49
|
//= require jquery_ujs
|
50
|
+
//= require chosen-jquery
|
48
51
|
//= require_tree .
|
49
52
|
|
50
53
|
$(document).ready ->
|
51
|
-
|
54
|
+
$('.chzn-select').chosen();
|
55
|
+
|
52
56
|
|
53
57
|
COFFEE
|
54
58
|
|
@@ -57,13 +61,13 @@ COFFEE
|
|
57
61
|
# ---
|
58
62
|
@css_asset_path = File.join %w(app assets stylesheets application.css)
|
59
63
|
@generator.remove_file(@css_asset_path)
|
60
|
-
@sass_asset_path = File.join %w(app assets stylesheets application.css.
|
64
|
+
@sass_asset_path = File.join %w(app assets stylesheets application.css.sass)
|
65
|
+
|
61
66
|
@generator.create_file @sass_asset_path, <<-SASS
|
62
|
-
|
63
|
-
/*= require_self
|
64
|
-
*/
|
67
|
+
/*= require chosen */
|
68
|
+
/*= require_self */
|
65
69
|
|
66
|
-
@import 'compass'
|
70
|
+
@import 'compass'
|
67
71
|
|
68
72
|
SASS
|
69
73
|
|
@@ -86,6 +90,37 @@ html
|
|
86
90
|
= yield
|
87
91
|
SLIM
|
88
92
|
|
93
|
+
# ---
|
94
|
+
# AppDrone::HighVoltage
|
95
|
+
# ---
|
96
|
+
FileUtils.mkpath 'app/views/pages'
|
97
|
+
|
98
|
+
# ---
|
99
|
+
# AppDrone::Showcase
|
100
|
+
# ---
|
101
|
+
@generator.create_file 'app/views/pages/showcase.html.slim', <<-SHOWCASE
|
102
|
+
h1 Showcase
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
h3 Chosen
|
107
|
+
|
108
|
+
select.chzn-select
|
109
|
+
option One
|
110
|
+
option Two
|
111
|
+
option Three
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
SHOWCASE
|
116
|
+
|
117
|
+
# ---
|
118
|
+
# AppDrone::Cleanup
|
119
|
+
# ---
|
120
|
+
@generator.remove_file File.join %w(public index.html)
|
121
|
+
@generator.remove_file File.join %w(app assets images rails.png)
|
122
|
+
@generator.remove_file File.join %w(README.rdoc)
|
123
|
+
|
89
124
|
rake 'db:migrate'
|
90
125
|
say "She's all yours, sparky!\n\n", :green
|
91
126
|
end
|
data/test/test_app_drone.rb
CHANGED
@@ -14,13 +14,17 @@ class AppDroneTest < Test::Unit::TestCase
|
|
14
14
|
template.add :javascript
|
15
15
|
template.add :stylesheet
|
16
16
|
template.add :slim_view
|
17
|
+
template.add :high_voltage
|
18
|
+
template.add :showcase
|
19
|
+
template.add :chosen
|
20
|
+
template.add :cleanup
|
17
21
|
template.render_to_file
|
18
22
|
end
|
19
23
|
|
20
24
|
def test_gems
|
21
|
-
template = Template.new
|
22
|
-
template.add :bundle
|
23
|
-
puts AppDrone::Bootstrap.params
|
25
|
+
#template = Template.new
|
26
|
+
#template.add :bundle
|
27
|
+
#puts AppDrone::Bootstrap.params
|
24
28
|
#@template.add Stylesheet
|
25
29
|
#@template.add Javascript
|
26
30
|
#@template.render_to_screen
|
data/test/test_app_drone.rb~
CHANGED
@@ -14,13 +14,17 @@ class AppDroneTest < Test::Unit::TestCase
|
|
14
14
|
template.add :javascript
|
15
15
|
template.add :stylesheet
|
16
16
|
template.add :slim_view
|
17
|
+
template.add :high_voltage
|
18
|
+
template.add :showcase
|
19
|
+
template.add :chosen
|
20
|
+
template.add :cleanup
|
17
21
|
template.render_to_file
|
18
22
|
end
|
19
23
|
|
20
24
|
def test_gems
|
21
|
-
template = Template.new
|
22
|
-
template.add :bundle
|
23
|
-
puts
|
25
|
+
#template = Template.new
|
26
|
+
#template.add :bundle
|
27
|
+
#puts AppDrone::Bootstrap.params
|
24
28
|
#@template.add Stylesheet
|
25
29
|
#@template.add Javascript
|
26
30
|
#@template.render_to_screen
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: app_drone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
16
|
-
requirement: &
|
16
|
+
requirement: &13840260 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: 3.2.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *13840260
|
25
25
|
description: Give your Rails apps a kickstart
|
26
26
|
email:
|
27
27
|
- whoisdanieldavey@gmail.com
|
@@ -50,14 +50,28 @@ files:
|
|
50
50
|
- lib/app_drone/drones/bundle/gem_entries.erb
|
51
51
|
- lib/app_drone/drones/bundle/gem_entries.erb~
|
52
52
|
- lib/app_drone/drones/bundle/gems.rb~
|
53
|
+
- lib/app_drone/drones/chosen/chosen.rb
|
54
|
+
- lib/app_drone/drones/chosen/chosen.rb~
|
55
|
+
- lib/app_drone/drones/chosen/showcase.html.slim
|
56
|
+
- lib/app_drone/drones/chosen/showcase.html.slim~
|
53
57
|
- lib/app_drone/drones/cleanup/cleanup.erb
|
54
58
|
- lib/app_drone/drones/cleanup/cleanup.rb
|
55
59
|
- lib/app_drone/drones/cleanup/cleanup.rb~
|
60
|
+
- lib/app_drone/drones/high_voltage/create_pages_directory.erb
|
61
|
+
- lib/app_drone/drones/high_voltage/create_pages_directory.erb~
|
62
|
+
- lib/app_drone/drones/high_voltage/high_voltage.rb
|
63
|
+
- lib/app_drone/drones/high_voltage/high_voltage.rb~
|
56
64
|
- lib/app_drone/drones/javascript/application_coffee.erb
|
65
|
+
- lib/app_drone/drones/javascript/application_coffee.erb~
|
57
66
|
- lib/app_drone/drones/javascript/javascript.rb
|
58
67
|
- lib/app_drone/drones/javascript/javascript.rb~
|
59
68
|
- lib/app_drone/drones/javascript/javascripts.rb~
|
69
|
+
- lib/app_drone/drones/showcase/showcase.rb
|
70
|
+
- lib/app_drone/drones/showcase/showcase.rb~
|
71
|
+
- lib/app_drone/drones/showcase/showcase_page.erb
|
72
|
+
- lib/app_drone/drones/showcase/showcase_page.erb~
|
60
73
|
- lib/app_drone/drones/slim_view/application_slim.erb
|
74
|
+
- lib/app_drone/drones/slim_view/application_slim.erb~
|
61
75
|
- lib/app_drone/drones/slim_view/slim_view.rb
|
62
76
|
- lib/app_drone/drones/slim_view/slim_view.rb~
|
63
77
|
- lib/app_drone/drones/slim_view/slim_views.rb~
|
@@ -68,8 +82,6 @@ files:
|
|
68
82
|
- lib/app_drone/drones/stylesheet/stylesheets.rb~
|
69
83
|
- lib/app_drone/drones/zzz/bootstrap/bootstrap.rb
|
70
84
|
- lib/app_drone/drones/zzz/bootstrap/bootstrap.rb~
|
71
|
-
- lib/app_drone/drones/zzz/chosen/chosen.rb
|
72
|
-
- lib/app_drone/drones/zzz/chosen/chosen.rb~
|
73
85
|
- lib/app_drone/drones/zzz/factory_girl/factory_girl.rb
|
74
86
|
- lib/app_drone/drones/zzz/factory_girl/factory_girl.rb~
|
75
87
|
- lib/app_drone/drones/zzz/git/git.rb
|
@@ -118,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
130
|
version: '0'
|
119
131
|
requirements: []
|
120
132
|
rubyforge_project:
|
121
|
-
rubygems_version: 1.8.
|
133
|
+
rubygems_version: 1.8.10
|
122
134
|
signing_key:
|
123
135
|
specification_version: 3
|
124
136
|
summary: Generates Rails templates to help start your app on good footing
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# Complete!
|
2
|
-
module AppDrone
|
3
|
-
class Chosen < Drone
|
4
|
-
desc 'Installs the Chosen plugin from HarvestHQ'
|
5
|
-
|
6
|
-
def align
|
7
|
-
bundle.add 'chosen-rails'
|
8
|
-
stylesheet.add_require 'chosen'
|
9
|
-
javascript.add_require 'chosen-jquery'
|
10
|
-
javascript.add_onready "$('.chzn-select').chosen();"
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# Complete!
|
2
|
-
module AppDrone
|
3
|
-
class Chosen < Drone
|
4
|
-
desc 'Installs the Chosen plugin from HarvestHQ'
|
5
|
-
|
6
|
-
def align
|
7
|
-
gem.add 'chosen-rails'
|
8
|
-
stylesheet.add_require 'chosen'
|
9
|
-
javascript.add_require 'chosen-jquery'
|
10
|
-
javascript.add_onready "$('.chzn-select').chosen();"
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|