app_drone 0.11.3 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/lib/app_drone/drones/bootstrap/bootstrap.rb +6 -28
- data/lib/app_drone/drones/git/commit.erb +1 -1
- data/lib/app_drone/drones/gon/gon.rb +17 -0
- data/lib/app_drone/drones/haml_view/application_haml.erb +2 -1
- data/lib/app_drone/drones/haml_view/haml_view.rb +1 -0
- data/lib/app_drone/drones/html5_placeholder_shim/html5_placeholder_shim.rb +1 -1
- data/lib/app_drone/drones/quiet_assets/quiet_assets.rb +13 -0
- data/lib/app_drone/drones/slim_view/application_slim.erb +2 -1
- data/lib/app_drone/drones/slim_view/slim_view.rb +1 -0
- data/lib/app_drone/drones/strong_parameters/strong_parameters.rb +13 -0
- data/lib/app_drone/template.rb +2 -2
- data/lib/app_drone/version.rb +1 -1
- data/out.rb +33 -17
- data/test/test_app_drone.rb +1 -1
- metadata +13 -5
data/Gemfile
CHANGED
@@ -4,42 +4,20 @@ class Bootstrap < Drone
|
|
4
4
|
desc "Installs Twitter Bootstrap stylesheets and javascripts"
|
5
5
|
category :ui
|
6
6
|
|
7
|
-
#param :vendor, :boolean, info: 'place a local copy of the files into the repo for customization'
|
8
|
-
|
9
7
|
param :responsive, :boolean, info: 'include responsive grid'
|
10
|
-
param :font_awesome, :boolean, info: 'use font-awesome for icons'
|
8
|
+
param :font_awesome, :boolean, info: 'use font-awesome for icons'#, default: true
|
11
9
|
param :javascript_plugins, :choose_many, info: 'pipeline javascript plugin files', default: [], choices: %w(modal dropdown scrollspy tab tooltip popover alert button collapse carousel typeahead)
|
12
10
|
|
13
11
|
depends_on :bundle, :stylesheet, :javascript
|
14
12
|
pairs_with :flair
|
15
13
|
|
16
14
|
def align
|
17
|
-
bundle.add '
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
def execute
|
23
|
-
false ? execute_vendor : execute_bundle
|
24
|
-
end
|
25
|
-
|
26
|
-
private
|
27
|
-
def align_vendor
|
28
|
-
# TODO import paths for stylesheet (different to bundle)
|
29
|
-
param(:javascript_plugins).each { |p| javascript.pipeline "bootstrap-#{p}" }
|
30
|
-
end
|
31
|
-
|
32
|
-
def align_bundle
|
33
|
-
stylesheet.import param(:font_awesome) ? 'compass_twitter_bootstrap_awesome' : 'compass_twitter_bootstrap'
|
34
|
-
stylesheet.import 'compass_twitter_bootstrap_responsive' if param(:responsive)
|
15
|
+
bundle.add 'bootstrap-sass', group: :assets
|
16
|
+
bundle.add 'font-awesome-sass-rails', group: :assets if param(:font_awesome)
|
17
|
+
stylesheet.import 'bootstrap'
|
18
|
+
stylesheet.import 'font-awesome' if param(:font_awesome)
|
35
19
|
param(:javascript_plugins).each { |p| javascript.pipeline "bootstrap-#{p}" }
|
36
|
-
|
37
|
-
|
38
|
-
def execute_vendor
|
39
|
-
# TODO pull files from git
|
40
|
-
end
|
41
|
-
|
42
|
-
def execute_bundle
|
20
|
+
flair!
|
43
21
|
end
|
44
22
|
|
45
23
|
end
|
@@ -9,7 +9,8 @@ haml_index_path = File.join %w(app views layouts application.html.haml)
|
|
9
9
|
= stylesheet_link_tag 'application', media: 'all'
|
10
10
|
= javascript_include_tag 'application'
|
11
11
|
= csrf_meta_tags
|
12
|
-
|
12
|
+
<% if pair?(:gon) %> = include_gon
|
13
|
+
<% end %>
|
13
14
|
%body{:class => controller_name}
|
14
15
|
= yield
|
15
16
|
HAML
|
data/lib/app_drone/template.rb
CHANGED
@@ -20,7 +20,7 @@ class Template
|
|
20
20
|
raise "No such drone: #{klass}" unless i_klass = @drones[klass]
|
21
21
|
return i_klass
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
def leftover_directives; @directives[:leftovers] end
|
25
25
|
def generator_methods; @directives.keys - [:leftovers] end
|
26
26
|
def overridable_generator_methods; [:gemfile] end
|
@@ -38,7 +38,7 @@ class Template
|
|
38
38
|
def notify!(notice,drone)
|
39
39
|
@drone_notices[drone.class] << notice.gsub("'","\\'").gsub('"','\\"') # escape quotes
|
40
40
|
end
|
41
|
-
|
41
|
+
|
42
42
|
def render!
|
43
43
|
return if @rendered
|
44
44
|
DependencyChain.check_dependencies!(drone_classes)
|
data/lib/app_drone/version.rb
CHANGED
data/out.rb
CHANGED
@@ -25,7 +25,9 @@ class AppBuilder < Rails::AppBuilder
|
|
25
25
|
# ---
|
26
26
|
@generator.gem 'therubyracer'
|
27
27
|
@generator.gem 'compass-rails'
|
28
|
-
@generator.gem '
|
28
|
+
@generator.gem 'slim-rails'
|
29
|
+
@generator.gem 'high_voltage'
|
30
|
+
@generator.gem 'quiet_assets', :group=>:development
|
29
31
|
|
30
32
|
run_bundle
|
31
33
|
@generator.options = @generator.options.dup
|
@@ -72,30 +74,44 @@ COFFEE
|
|
72
74
|
SASS
|
73
75
|
|
74
76
|
# ---
|
75
|
-
# AppDrone::
|
76
|
-
# ---
|
77
|
-
@generator.remove_file File.join %w(public index.html)
|
78
|
-
@generator.remove_file File.join %w(app assets images rails.png)
|
79
|
-
@generator.remove_file File.join %w(README.rdoc)
|
80
|
-
|
81
|
-
# ---
|
82
|
-
# AppDrone::HamlView
|
77
|
+
# AppDrone::SlimView
|
83
78
|
# ---
|
84
79
|
erb_index_path = File.join %w(app views layouts application.html.erb)
|
85
80
|
@generator.remove_file(erb_index_path)
|
86
|
-
|
87
|
-
@generator.create_file
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
81
|
+
slim_index_path = File.join %w(app views layouts application.html.slim)
|
82
|
+
@generator.create_file slim_index_path, <<-SLIM
|
83
|
+
doctype 5
|
84
|
+
html
|
85
|
+
head
|
86
|
+
title #{app_name}
|
92
87
|
= stylesheet_link_tag 'application', media: 'all'
|
93
88
|
= javascript_include_tag 'application'
|
94
89
|
= csrf_meta_tags
|
95
90
|
|
96
|
-
|
91
|
+
body class=controller_name
|
97
92
|
= yield
|
98
|
-
|
93
|
+
SLIM
|
94
|
+
|
95
|
+
# ---
|
96
|
+
# AppDrone::HighVoltage
|
97
|
+
# ---
|
98
|
+
FileUtils.mkpath 'app/views/pages'
|
99
|
+
|
100
|
+
# ---
|
101
|
+
# AppDrone::Flair
|
102
|
+
# ---
|
103
|
+
@generator.create_file 'app/views/pages/flair.html.slim', <<-FLAIR
|
104
|
+
h1 Flair!
|
105
|
+
|
106
|
+
|
107
|
+
FLAIR
|
108
|
+
|
109
|
+
# ---
|
110
|
+
# AppDrone::Cleanup
|
111
|
+
# ---
|
112
|
+
@generator.remove_file File.join %w(public index.html)
|
113
|
+
@generator.remove_file File.join %w(app assets images rails.png)
|
114
|
+
@generator.remove_file File.join %w(README.rdoc)
|
99
115
|
|
100
116
|
|
101
117
|
# This should be removed when the database drone is installed
|
data/test/test_app_drone.rb
CHANGED
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.12.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-
|
12
|
+
date: 2012-10-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,12 @@ dependencies:
|
|
21
21
|
version: 3.2.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.2.0
|
25
30
|
description: Give your Rails apps a kickstart
|
26
31
|
email:
|
27
32
|
- whoisdanieldavey@gmail.com
|
@@ -65,6 +70,7 @@ files:
|
|
65
70
|
- lib/app_drone/drones/git/commit.erb
|
66
71
|
- lib/app_drone/drones/git/fetch.erb
|
67
72
|
- lib/app_drone/drones/git/git.rb
|
73
|
+
- lib/app_drone/drones/gon/gon.rb
|
68
74
|
- lib/app_drone/drones/gritter/flair.html.slim.erb
|
69
75
|
- lib/app_drone/drones/gritter/gritter.rb
|
70
76
|
- lib/app_drone/drones/gritter/install.erb
|
@@ -84,6 +90,7 @@ files:
|
|
84
90
|
- lib/app_drone/drones/new_relic/new_relic.rb
|
85
91
|
- lib/app_drone/drones/nifty_generators/nifty_config.erb
|
86
92
|
- lib/app_drone/drones/nifty_generators/nifty_generators.rb
|
93
|
+
- lib/app_drone/drones/quiet_assets/quiet_assets.rb
|
87
94
|
- lib/app_drone/drones/ranked_model/ranked_model.rb
|
88
95
|
- lib/app_drone/drones/remotipart/remotipart.rb
|
89
96
|
- lib/app_drone/drones/responders/install.erb
|
@@ -102,6 +109,7 @@ files:
|
|
102
109
|
- lib/app_drone/drones/squeel/initializer.erb
|
103
110
|
- lib/app_drone/drones/squeel/squeel.rb
|
104
111
|
- lib/app_drone/drones/stateflow/stateflow.rb
|
112
|
+
- lib/app_drone/drones/strong_parameters/strong_parameters.rb
|
105
113
|
- lib/app_drone/drones/stylesheet/application_sass.erb
|
106
114
|
- lib/app_drone/drones/stylesheet/stylesheet.rb
|
107
115
|
- lib/app_drone/drones/timecop/timecop.rb
|
@@ -138,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
146
|
version: '0'
|
139
147
|
requirements: []
|
140
148
|
rubyforge_project:
|
141
|
-
rubygems_version: 1.8.
|
149
|
+
rubygems_version: 1.8.23
|
142
150
|
signing_key:
|
143
151
|
specification_version: 3
|
144
152
|
summary: Generates Rails templates to help start your app on good footing
|