app_drone 0.9.2 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -272,24 +272,28 @@ AppDrone is not for everyone. It's highly opinionated about how a Rails app shou
272
272
  - [views] **SimpleForm** with optional Country Select and automatic Twitter Bootstrap integration
273
273
  - [views] **NestedForm** for managing multiple models in a single form
274
274
  - [auth] **Sorcery** for no-frills user authentication
275
+ - [auth] **Devise**, a flexible authentication solution for Rails with Warden
275
276
  - [auth] **CanCan** for role-based authorization
276
277
  - [auth] **EasyRoles**,to add roles to your User models
277
278
  - [model] **Migrant** for easier schema management
278
279
  - [model] **Squeel** improving on ActiveRelation
279
280
  - [model] **RankedModel** for sorting and ranking objects
281
+ - [model] **Stateflow** state machine for complex business decisions (or easy ones)
280
282
  - [ui] **Chosen select** by harvestHQ
281
283
  - [ui] **Bootstrap** by Twitter
282
284
  - [ui] **Gritter** for jQuery growl-like notifications
283
285
  - [ui] **Underscore.js** utility belt
286
+ - [ui_shim] HTML5 placeholder shim
284
287
  - [ux] **Ember** (the Ember.js library)
285
288
  - [controller] **Responders** from Plataformatec
286
289
  - [controller] **HasScope** for mapping filters to controller actions
287
290
  - [controller] **WillPaginate** with automatic Bootstrap integration
288
- - [misc] **LetterOpener** to preview email in the browser instead of sending it\
291
+ - [misc] **LetterOpener** to preview email in the browser instead of sending it
289
292
  - [misc] **Chronic** for natural language date parsing
290
293
  - [misc] **Timecop** - time travelling for Ruby
291
294
  - [misc] **NiftyGenerators**, a collection of useful Rails generator scripts
292
295
  - [misc] **NewRelic** app performance monitoring
296
+ - [misc] **Whenever** clear syntax for writing and deploying cron jobs
293
297
  - [uploads] **Carrierwave** file uploading plus optional Fog cloud storage
294
298
  - [uploads] **Remotipart**, for AJAX file uploads with jQuery
295
299
  - [test] **RSpec** for BDD
@@ -298,38 +302,44 @@ AppDrone is not for everyone. It's highly opinionated about how a Rails app shou
298
302
 
299
303
  ### Frozen drones (currently in development)
300
304
 
301
- - [base] Database (currently rake db:migrate in template will break non-sqlite dbs)
305
+ - [base] Database: rake [db:create, db:migrate] at very end of generator, options? postgres etc. (will need a dropdown option in the app for this)
302
306
  - [auth] Devise
303
307
  - [test] DatabaseCleaner
304
- - [test] TimeCop
305
308
  - [test] Capybara
306
309
  - [test] Shoulda
307
310
  - [dev] Guard
308
311
  - [source-control] Git
309
312
  - [requests] InheritedResources (deprecated)
310
313
  - [requests] UserAgent blocking script
311
- - [mailing] SendGrid
314
+ - [mailing] SendGrid https://github.com/stephenb/sendgrid
315
+ - [mailing] Postmark https://github.com/wildbit/postmark-rails
316
+
312
317
 
313
318
  ### Future drones (TODO - I'll get there some day!)
314
319
 
320
+ - [ux] Backbone integration + Skim
321
+ - [uploads] Cloudinary
322
+ - [dev] Spork
323
+ - [search] Sphinx
324
+ - [?] DelayedJob
325
+ - [?] Resque
326
+ - [?] Redis
327
+ - [?] Faye
328
+ - [test] Cucumber
315
329
  - [ui] Stylesheet utils
316
330
  - [ui] Calendrical for jQuery
317
331
  - [ui] SlimViews: Add browser-specific classes to <html> via useragent + helpers..
318
332
  - [ui] Bootstrap: vendor files rather than gem require (is this necessary? seems all variables can be customized in an external sheet as long as it's required before compass_twitter_bootstrap)
319
- - [ui] jQuery shims
320
333
  - [ui] jQuery UI (vendor + theme etc.)
321
- - [ui] pie.htc for IE
322
- - [ui] HTML5 shim for IE
323
- - [uploads?] RMagick / minimagick
324
- - [requests] HasScope
325
- - [requests] will-paginate (+bootstrap-will-paginate)
334
+ - [ui_shim] pie.htc for IE
335
+ - [ui_shim] jQuery shims
336
+ - [ui_shim] HTML5 shim/shiv for IE -- http://ejohn.org/blog/html5-shiv/ http://code.google.com/p/html5shiv/ (or use modernizr?)
337
+ - [processing] RMagick / minimagick
326
338
  - [dev] rails-best-practices (and the other output gem for debugging)
327
339
  - [dev] Pivotal tracker
328
340
  - [dev] RailsErd
329
341
  - [production] Airbrake + API Key
330
342
  - [production] EngineYard for deployment
331
- - [ux] Backbone integration + Skim
332
- - [views] Nested Form
333
343
  - [?] SeedFu
334
344
  - [?] Launchy
335
345
  - [?] Growl & rb-notify etc.
@@ -33,7 +33,7 @@ class Drone
33
33
  end
34
34
 
35
35
  def pair?(drone_symbol)
36
- drone_klass = ('AppDrone::' + drone_symbol.to_s.classify).constantize
36
+ drone_klass = drone_symbol.to_app_drone_class
37
37
  return @template.hook?(drone_klass)
38
38
  end
39
39
 
@@ -49,7 +49,7 @@ class Drone
49
49
  def setup; end
50
50
 
51
51
  def render(partial, opts={})
52
- class_name = self.class.to_s.split('::').last.underscore
52
+ class_name = self.class.to_sym
53
53
  template_path = "/drones/#{class_name}/#{partial}.erb"
54
54
  full_path = File.dirname(__FILE__) + template_path
55
55
  snippet = ERB.new File.read(full_path)
@@ -0,0 +1,17 @@
1
+ module AppDrone
2
+ class Devise < Drone
3
+ desc "Flexible authentication solution for Rails with Warden"
4
+ category :auth
5
+
6
+ depends_on :bundle
7
+
8
+ def align
9
+ bundle.add 'devise'
10
+ end
11
+
12
+ def execute
13
+ do! :install
14
+ end
15
+
16
+ end
17
+ end
@@ -0,0 +1 @@
1
+ generate 'devise:install'
@@ -1,5 +1,5 @@
1
1
  module AppDrone
2
- class EasyRolez < Drone
2
+ class EasyRoles < Drone
3
3
  desc "Add roles to your User models"
4
4
  category :auth
5
5
 
@@ -1,5 +1,5 @@
1
1
  module AppDrone
2
- class NiftyGeneratorz < Drone
2
+ class NiftyGenerators < Drone
3
3
  desc "A collection of useful Rails generator scripts"
4
4
  category :misc
5
5
 
@@ -1,5 +1,5 @@
1
1
  module AppDrone
2
- class Responderz < Drone
2
+ class Responders < Drone
3
3
  desc "DRY up your controllers"
4
4
  category :controller
5
5
 
@@ -0,0 +1,13 @@
1
+ module AppDrone
2
+ class Stateflow < Drone
3
+ desc "State machine for complex business decisions (or easy ones)"
4
+ category :model
5
+
6
+ depends_on :bundle
7
+
8
+ def align
9
+ bundle.add 'stateflow'
10
+ end
11
+
12
+ end
13
+ end
@@ -0,0 +1,17 @@
1
+ module AppDrone
2
+ class Whenever < Drone
3
+ desc "Clear syntax for writing and deploying cron jobs"
4
+ category :misc
5
+
6
+ depends_on :bundle
7
+
8
+ def align
9
+ bundle.add 'whenever', require: false
10
+ end
11
+
12
+ def execute
13
+ do! :wheneverize
14
+ end
15
+
16
+ end
17
+ end
@@ -0,0 +1 @@
1
+ @generator.run 'wheneverize .'
@@ -0,0 +1,6 @@
1
+ <% fetches.each do |f| %>
2
+ <% url = f.is_a?(Hash) ? github_repo_url(f[:github]) : f %>
3
+ inside '<%= tmp_path %>' do
4
+ @generator.run 'git clone <%= url %>'
5
+ end
6
+ <% end %>
@@ -1,9 +1,30 @@
1
- # Incomplete
2
1
  module AppDrone
3
2
  class Git < Drone
4
- desc "Sets up a fresh git repo"
3
+ desc "Clone external resources into your app"
4
+ category :base
5
+
6
+ attr_accessor :fetches
7
+
8
+ def tmp_path; 'git_tmp' end
9
+
10
+ def setup
11
+ self.fetches = []
12
+ end
13
+
14
+ def fetch(f); self.fetches << f end
15
+
5
16
  def execute
6
- do! :install
17
+ do! :fetch
18
+ end
19
+
20
+ def locate(p)
21
+ File.join '.', tmp_path, p
22
+ end
23
+
24
+ private
25
+ def github_repo_url(repo)
26
+ "git://github.com/#{repo}.git"
7
27
  end
28
+
8
29
  end
9
30
  end
@@ -0,0 +1,5 @@
1
+ <%
2
+ source = git.locate('jquery-html5-placeholder-shim/jquery.html5-placeholder-shim.js')
3
+ dest = 'app/assets/javascripts/jquery.html5-placeholder-shim.js'
4
+ %>
5
+ @generator.copy_file '<%= source %>', '<%= dest %>'
@@ -0,0 +1,18 @@
1
+ module AppDrone
2
+ class Html5PlaceholderShim < Drone
3
+ desc "HTML5 placeholder support for older browsers"
4
+ category :ui_shim
5
+
6
+ depends_on :javascript, :git
7
+
8
+ def align
9
+ javascript.pipeline 'jquery.html5-placeholder-shim'
10
+ git.fetch github: 'jcampbell1/jquery-html5-placeholder-shim'
11
+ end
12
+
13
+ def execute
14
+ do! :copy_to_assets
15
+ end
16
+
17
+ end
18
+ end
@@ -12,6 +12,6 @@ end
12
12
 
13
13
  class Symbol
14
14
  def to_app_drone_class
15
- ('AppDrone::' + self.to_s.classify).constantize
15
+ ('AppDrone::' + self.to_s.camelize).constantize
16
16
  end
17
17
  end
@@ -3,7 +3,7 @@ class Template
3
3
  def initialize; @drones = {}; @directives = {}; @drone_notices = {} end
4
4
 
5
5
  def add(ref,*params)
6
- klass = ref.is_a?(Class)? ref : ('AppDrone::' + ref.to_s.classify).constantize
6
+ klass = ref.is_a?(Class)? ref : ref.to_sym.to_app_drone_class
7
7
  @drones[klass] = klass.new(self, params.first) # no idea why `.first` is required..
8
8
  end
9
9
 
@@ -1,3 +1,3 @@
1
1
  module AppDrone
2
- VERSION = "0.9.2"
2
+ VERSION = "0.10.0"
3
3
  end
data/out.rb CHANGED
@@ -27,8 +27,6 @@ class AppBuilder < Rails::AppBuilder
27
27
  @generator.gem 'compass-rails'
28
28
  @generator.gem 'slim-rails'
29
29
  @generator.gem 'high_voltage'
30
- @generator.gem 'rspec-rails', :group=>["development", "test"]
31
- @generator.gem 'simplecov', :require=>false, :group=>:test
32
30
 
33
31
  run_bundle
34
32
  @generator.options = @generator.options.dup
@@ -50,6 +48,7 @@ js_asset_path = File.join %w(app assets javascripts application.js)
50
48
  //= require jquery
51
49
  //= require jquery_ujs
52
50
  //= require init
51
+ //= require jquery.html5-placeholder-shim
53
52
 
54
53
  COFFEE
55
54
 
@@ -115,23 +114,20 @@ FLAIR
115
114
  @generator.remove_file File.join %w(README.rdoc)
116
115
 
117
116
  # ---
118
- # AppDrone::Rspec
117
+ # AppDrone::Git
119
118
  # ---
120
- generate "rspec:install"
121
119
 
122
- # ---
123
- # AppDrone::SimpleCov
124
- # ---
125
- @generator.create_file '.simplecov', <<-SIMPLECOV
126
- SimpleCov.start 'rails' do
127
- # any custom configs like groups and filters can be here at a central place
128
- end
129
- SIMPLECOV
120
+
121
+ inside 'git_tmp' do
122
+ @generator.run 'git clone git://github.com/jcampbell1/jquery-html5-placeholder-shim.git'
123
+ end
124
+
130
125
 
131
126
  # ---
132
- # AppDrone::SimpleCov
127
+ # AppDrone::Html5PlaceholderShim
133
128
  # ---
134
- @generator.prepend_file 'spec/spec_helper.rb', "require 'simplecov'\n"
129
+
130
+ @generator.copy_file './git_tmp/jquery-html5-placeholder-shim/jquery.html5-placeholder-shim.js', 'app/assets/javascripts/jquery.html5-placeholder-shim.js'
135
131
 
136
132
 
137
133
  # This should be removed when the database drone is installed
@@ -24,8 +24,8 @@ class AppDroneTest < Test::Unit::TestCase
24
24
  template = Template.new
25
25
  add_defaults_to_template(template)
26
26
 
27
- template.add :simple_cov
28
- template.add :rspec
27
+ template.add :git
28
+ template.add :html5_placeholder_shim
29
29
 
30
30
  template.render_to_file
31
31
  end
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.9.2
4
+ version: 0.10.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-05-03 00:00:00.000000000 Z
12
+ date: 2012-05-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &16418980 !ruby/object:Gem::Requirement
16
+ requirement: &13619840 !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: *16418980
24
+ version_requirements: *13619840
25
25
  description: Give your Rails apps a kickstart
26
26
  email:
27
27
  - whoisdanieldavey@gmail.com
@@ -51,7 +51,9 @@ files:
51
51
  - lib/app_drone/drones/chronic/chronic.rb
52
52
  - lib/app_drone/drones/cleanup/cleanup.erb
53
53
  - lib/app_drone/drones/cleanup/cleanup.rb
54
- - lib/app_drone/drones/easy_rolez/easy_rolez.rb
54
+ - lib/app_drone/drones/devise/devise.rb
55
+ - lib/app_drone/drones/devise/install.erb
56
+ - lib/app_drone/drones/easy_roles/easy_roles.rb
55
57
  - lib/app_drone/drones/ember/ember.rb
56
58
  - lib/app_drone/drones/ember/install.erb
57
59
  - lib/app_drone/drones/factory_girl/factory_girl.rb
@@ -70,12 +72,12 @@ files:
70
72
  - lib/app_drone/drones/migrant/migrant.rb
71
73
  - lib/app_drone/drones/nested_form/nested_form.rb
72
74
  - lib/app_drone/drones/new_relic/new_relic.rb
73
- - lib/app_drone/drones/nifty_generatorz/nifty_config.erb
74
- - lib/app_drone/drones/nifty_generatorz/nifty_generatorz.rb
75
+ - lib/app_drone/drones/nifty_generators/nifty_config.erb
76
+ - lib/app_drone/drones/nifty_generators/nifty_generators.rb
75
77
  - lib/app_drone/drones/ranked_model/ranked_model.rb
76
78
  - lib/app_drone/drones/remotipart/remotipart.rb
77
- - lib/app_drone/drones/responderz/install.erb
78
- - lib/app_drone/drones/responderz/responderz.rb
79
+ - lib/app_drone/drones/responders/install.erb
80
+ - lib/app_drone/drones/responders/responders.rb
79
81
  - lib/app_drone/drones/rspec/install.erb
80
82
  - lib/app_drone/drones/rspec/rspec.rb
81
83
  - lib/app_drone/drones/simple_cov/install.erb
@@ -89,15 +91,21 @@ files:
89
91
  - lib/app_drone/drones/sorcery/sorcery.rb
90
92
  - lib/app_drone/drones/squeel/initializer.erb
91
93
  - lib/app_drone/drones/squeel/squeel.rb
94
+ - lib/app_drone/drones/stateflow/stateflow.rb
92
95
  - lib/app_drone/drones/stylesheet/application_sass.erb
93
96
  - lib/app_drone/drones/stylesheet/stylesheet.rb
94
97
  - lib/app_drone/drones/timecop/timecop.rb
95
98
  - lib/app_drone/drones/underscore/flair.html.slim.erb
96
99
  - lib/app_drone/drones/underscore/underscore.rb
100
+ - lib/app_drone/drones/whenever/whenever.rb
101
+ - lib/app_drone/drones/whenever/wheneverize.erb
97
102
  - lib/app_drone/drones/will_paginate/will_paginate.rb
103
+ - lib/app_drone/drones/zzz/git/fetch.erb
98
104
  - lib/app_drone/drones/zzz/git/git.rb
99
105
  - lib/app_drone/drones/zzz/git/install.erb
100
106
  - lib/app_drone/drones/zzz/guard/guard.rb
107
+ - lib/app_drone/drones/zzz/html5_placeholder_shim/copy_to_assets.erb
108
+ - lib/app_drone/drones/zzz/html5_placeholder_shim/html5_placeholder_shim.rb
101
109
  - lib/app_drone/drones/zzz/rspec/install.erb
102
110
  - lib/app_drone/drones/zzz/rspec/rspec.rb
103
111
  - lib/app_drone/object_extensions.rb
@@ -105,8 +113,6 @@ files:
105
113
  - lib/app_drone/template.rb
106
114
  - lib/app_drone/version.rb
107
115
  - out.rb
108
- - scraps/App admin
109
- - scraps/TODO
110
116
  - scraps/blank drone
111
117
  - test/test_app_drone.rb
112
118
  homepage: https://github.com/jeriko/app_drone
data/scraps/App admin DELETED
@@ -1,7 +0,0 @@
1
- APP:
2
-
3
- - add data-related="whoisdandavey(:description)" to share link
4
- - add platform 45 logo to footer
5
- - choose, configure, compile: add 1, 2, 3 somewhere
6
-
7
- - choose_one dropdown in ember app
data/scraps/TODO DELETED
@@ -1,32 +0,0 @@
1
- ** When finished: if Flair, say: 'Boot your app and visit /pages/flair to see a functionality demo'
2
- ** When finished: general stats/instructions?
3
- ** Will-paginate bootstrap flair?
4
-
5
- - [uploads] Cloudinary
6
- - [misc] Spork
7
- - [test] DatabaseCleaner
8
- - [test] Capybara
9
- - [test] Shoulda
10
-
11
- - [ui] jQuery UI (vendor + theme etc.)
12
- - [ui_shim] HTML5 placeholder shim - https://github.com/parndt/jquery-html5-placeholder-shim
13
- - [ui_shim] HTML5 shim/shiv for IE -- http://ejohn.org/blog/html5-shiv/ http://code.google.com/p/html5shiv/ (or use modernizr?)
14
- - [ui_shim] pie.htc for IE
15
- - [ui_shim] jQuery shims
16
-
17
- - [mailing] SendGrid https://github.com/stephenb/sendgrid
18
- - [mailing] Postmark https://github.com/wildbit/postmark-rails
19
-
20
- - [?] DelayedJob
21
- - [search] Sphinx
22
- - put has_scope in [search]?
23
-
24
- LATER:
25
- - [?] Resque
26
- - [?] Redis
27
- - [dev] rails-best-practices (and the other output gem for debugging)
28
- - [dev] RailsErd
29
- - [production] Airbrake + API Key
30
- - [?] Launchy
31
- - [base] Database: rake [db:create, db:migrate] at very end of generator, options? postgres etc. (will need a dropdown option in the app for this)
32
- - [auth] Devise