appscrolls 0.7.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,10 @@
1
+ script: bundle exec rake
2
+ language: ruby
1
3
  rvm:
2
4
  - 1.8.7
3
- - 1.9.2
4
- - jruby
5
- - rbx
6
- - ree
5
+ - 1.9.3
6
+ - rbx-18mode
7
+ - rbx-19mode
8
+ notifications:
9
+ recipients:
10
+ - drnicwilliams@gmail.com
@@ -1,5 +1,14 @@
1
1
  # ChangeLog
2
2
 
3
+ ## v0.8
4
+
5
+ * `postgresql` - supported on `eycloud` (Currently PostgreSQL 9.1)
6
+ * `eycloud` - can boot clusters, in addition to solos
7
+ * `mysql` - always generates `sample.rake`
8
+ * bin/scrolls is short-form of bin/appscrolls
9
+ * `puma` & `thin` - moved into zzz archive until Puma is released on EY Cloud; or another supporting platform added
10
+ * `spork` - moved into zzz archive as part of simplification
11
+
3
12
  ## v0.7
4
13
 
5
14
  New name! "App Scrolls"
data/README.md CHANGED
@@ -11,6 +11,7 @@
11
11
  The App Scrolls is a magical tool to generate new Rails and modify existing Rails applications (coming) to include your favourite, powerful magic. Authentication, testing, persistence, javascript, css, deployment, and templating - there's a magical scroll for you.
12
12
 
13
13
  * Follow on twitter [@appscrolls][9]
14
+ * [![Build Status](https://secure.travis-ci.org/drnic/appscrolls.png?branch=master)](http://travis-ci.org/drnic/appscrolls)
14
15
 
15
16
  An example application that was built by the App Scrolls is at [https://github.com/drnic/mydemoapp][14]. The generated README shows all the scrolls that were included.
16
17
 
@@ -25,17 +26,32 @@ Installation is simple:
25
26
  The primary usage of the `appscrolls` gem is to utilize its interactive terminal command to build a new Rails application. To get started, you can simply run the command thusly:
26
27
 
27
28
  appscrolls new APP_NAME
29
+ scrolls new APP_NAME
28
30
 
29
31
  Where `APP_NAME` is the directory in which you wish to create the app (it mirrors the Rails creation syntax). You will then be guided through the scroll selection process and subsequently the Rails app generator will automatically run with the template and all appropriate command line options included.
30
32
 
31
33
  To transform an existing Rails app, you ... wait, that's not implemented yet. But since the "apply template" feature of `rails new APP_NAME -m template.rb` is implemented in Thor, I mean, how hard could it be?*
32
34
 
35
+ ### Available Scrolls
36
+
37
+ The current available scrolls grouped by category:
38
+
39
+ * administration: active_admin
40
+ * assets: jquery, prototype
41
+ * deployment: eycloud, eycloud_recipes_on_deploy, git, github, passenger, thin, unicorn
42
+ * persistence: mysql, postgresql, redis, sqlite3
43
+ * stylesheet: twitter_bootstrap
44
+ * templating: simple_form
45
+ * testing: capybara, cucumber, rspec, test_unit
46
+ * worker: delayed_job, resque
47
+ * other: env_yaml, guard, rails_basics, split
48
+
33
49
  ### Specifying Scrolls
34
50
 
35
51
  If you wish to skip the interactive scroll selector, you may provide instead a list of scrolls with the `-s` or `--scrolls` option:
36
52
 
37
- appscrolls new APP_NAME -s twitter_bootstrap mysql resque
38
- appscrolls new APP_NAME --scrolls postgresql github eycloud
53
+ scrolls new APP_NAME -s twitter_bootstrap mysql resque
54
+ scrolls new APP_NAME --scrolls postgresql github eycloud
39
55
 
40
56
  This will automatically generate a Rails template with the provided scrolls and begin the app generator.
41
57
 
@@ -43,11 +59,11 @@ This will automatically generate a Rails template with the provided scrolls and
43
59
 
44
60
  You can also print out a simple list of scrolls:
45
61
 
46
- appscrolls list
62
+ scrolls list
47
63
 
48
64
  Or print out a list of scrolls for a specific category:
49
65
 
50
- appscrolls list persistence
66
+ scrolls list persistence
51
67
 
52
68
  ## Deployment Support
53
69
 
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+ $:.push File.dirname(__FILE__) + '/../lib'
3
+
4
+ require 'rubygems'
5
+ require 'appscrolls/command'
6
+
7
+ AppScrollsScrolls::Command.start
@@ -1,8 +1,8 @@
1
1
  @name = File.basename(File.expand_path("."))
2
2
 
3
3
  gem_group :development do
4
- gem 'ey_cli'
5
- gem 'engineyard'
4
+ gem 'ey_cli', '>= 0.3.0'
5
+ gem 'engineyard', '>= 1.4.28'
6
6
  end
7
7
 
8
8
  gem 'ey_config' # for partner services
@@ -10,13 +10,13 @@ gem 'ey_config' # for partner services
10
10
  required_dbs = %w[mysql postgresql]
11
11
  required_app_servers = %w[unicorn trinidad passenger puma thin]
12
12
 
13
- selected_db = required_dbs.find {|db| scroll? db }
13
+ selected_db = required_dbs.find { |db| scroll? db }
14
14
  unless selected_db
15
15
  say_custom "eycloud", "Please include a DB choice from: #{required_dbs.join ", "}"
16
16
  exit_now = true
17
17
  end
18
18
 
19
- selected_app_server = required_app_servers.find {|app| scroll? app }
19
+ selected_app_server = required_app_servers.find { |app| scroll? app }
20
20
  unless selected_app_server
21
21
  say_custom "eycloud", "Please include an App Server choice from: #{required_app_servers.join ", "}"
22
22
  exit_now = true
@@ -31,13 +31,10 @@ after_everything do
31
31
  else
32
32
  run "ey login"
33
33
 
34
- if @mysql_stack
35
- say_custom "eycloud", "Using mysql #{@mysql_stack}"
36
- elsif @postgresql_stack
37
- say_custom "eycloud", "Using postgresql #{@postgresql_stack}"
38
- end
39
-
40
- framework_env = multiple_choice "Which framework environment?", [%w[Production production], %w[Staging staging]]
34
+ framework_env = multiple_choice "Which framework environment?", [
35
+ ['Production', 'production'],
36
+ ['Staging (solo environment only)', 'staging']
37
+ ]
41
38
 
42
39
  # TODO check for app name first
43
40
  app_name = (@repo_name && @repo_name.size > 0) ? @repo_name : @name
@@ -46,6 +43,18 @@ after_everything do
46
43
  while @app_names.include?(app_name)
47
44
  app_name = ask_wizard "Application #{app_name} is already exists. What name?"
48
45
  end
46
+
47
+ if framework_env == "production"
48
+ say_custom "eycloud", "All configurations use High-CPU VM worth $170/mth each."
49
+ say_custom "eycloud", "Process numbers below are estimates."
50
+ cluster_config = multiple_choice "Select application cluster configuration?", [
51
+ ['Basic - 5 CPU-based processes (1 VM) & DB Master VM', 'basic'],
52
+ ['Pro - 15 CPU-based highly-available processes (3 VMs) & DB Master VM', 'ha'],
53
+ ['Solo - 1 VM for app processes, DB and other services', 'solo']
54
+ ]
55
+ else
56
+ say_custom "eycloud", "Defaulting to single/solo High-CPU medium instance for staging environment"
57
+ end
49
58
 
50
59
  name = File.basename(".")
51
60
  command = "bundle exec ey_cli create_app --name #{app_name} --type rails3 "
@@ -53,7 +62,16 @@ after_everything do
53
62
  command += "--framework_env #{framework_env} "
54
63
  command += "--env_name #{@name}_#{framework_env} "
55
64
  command += "--stack #{selected_app_server} "
56
- command += "--solo"
65
+ command += "--db_stack #{selected_db} " if selected_db
66
+ case cluster_config.to_sym
67
+ when :basic
68
+ command += "--app_instances 1 "
69
+ when :ha
70
+ command += "--app_instances 3 "
71
+ when :solo
72
+ command += "--solo "
73
+ end
74
+
57
75
  run command
58
76
 
59
77
  end
@@ -1,29 +1,22 @@
1
1
  gem "mysql2"
2
2
 
3
- # TODO what about Windows?
4
-
5
- # if scroll?("eycloud")
6
- # mysql_versions = [
7
- # ["MySQL 5.0", "mysql_50"],
8
- # ["MySQL 5.5 (beta)", "mysql_55"]
9
- # ]
10
- # @mysql_stack = multiple_choice("Create app to which Engine Yard Cloud account?", mysql_versions)
11
- # end
3
+ if scroll?("eycloud")
4
+ @db_stack = "mysql"
5
+ end
12
6
 
13
7
  after_bundler do
14
8
  rake "db:create:all" if config['auto_create']
15
9
 
16
- if config['populate_rake_task']
17
- sample_rake = <<-RUBY
18
- require './config/environment'
10
+ rakefile("sample.rake") do
11
+ <<-RUBY
19
12
  namespace :db do
20
13
  desc "Populate the database with sample data"
21
- task :sample do
14
+ task :sample => :environment do
15
+
22
16
  end
23
17
  task :populate => :sample
24
18
  end
25
19
  RUBY
26
- File.open("lib/tasks/sample.rake", 'w') {|f| f.write(sample_rake)}
27
20
  end
28
21
  end
29
22
 
@@ -43,9 +36,4 @@ args: -d mysql
43
36
  config:
44
37
  - auto_create:
45
38
  type: boolean
46
- prompt: "Create MySQL database with default configuration?"
47
-
48
- - populate_rake_task:
49
- type: boolean
50
- prompt: "Add db:sample rake task?"
51
-
39
+ prompt: "Create local MySQL databases with default configuration?"
@@ -1,26 +1,25 @@
1
1
  gem "pg"
2
2
 
3
3
  gsub_file "config/database.yml", /username: .*/, "username: #{config['pg_username']}"
4
- gsub_file "config/database.yml", /password: .*/, "username: #{config['pg_password']}"
4
+ gsub_file "config/database.yml", /password: .*/, "password: #{config['pg_password']}"
5
5
 
6
- # if scroll?("eycloud")
7
- # @db_stack = "postgresql_91"
8
- # end
6
+ if scroll?("eycloud")
7
+ @db_stack = "postgresql"
8
+ end
9
9
 
10
10
  after_bundler do
11
11
  rake "db:create:all" if config['auto_create']
12
12
 
13
- if config['populate_rake_task']
14
- sample_rake = <<-RUBY
15
- require './config/environment'
13
+ rakefile("sample.rake") do
14
+ <<-RUBY
16
15
  namespace :db do
17
16
  desc "Populate the database with sample data"
18
- task :sample do
17
+ task :sample => :environment do
18
+
19
19
  end
20
20
  task :populate => :sample
21
21
  end
22
22
  RUBY
23
- File.open("lib/tasks/sample.rake", 'w') {|f| f.write(sample_rake)}
24
23
  end
25
24
  end
26
25
 
@@ -40,11 +39,7 @@ args: -d postgresql
40
39
  config:
41
40
  - auto_create:
42
41
  type: boolean
43
- prompt: "Create PostgreSQL database with default configuration?"
44
-
45
- - populate_rake_task:
46
- type: boolean
47
- prompt: "Add db:sample rake task?"
42
+ prompt: "Create local PostgreSQL databases with default configuration?"
48
43
 
49
44
  - pg_username:
50
45
  type: string
File without changes
File without changes
File without changes
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module AppScrollsScrolls
2
- VERSION = "0.7.1"
2
+ VERSION = "0.8.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appscrolls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ date: 2012-04-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
17
- requirement: &70325815885200 !ruby/object:Gem::Requirement
17
+ requirement: &70196379709560 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 3.2.2
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70325815885200
25
+ version_requirements: *70196379709560
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: i18n
28
- requirement: &70325815883940 !ruby/object:Gem::Requirement
28
+ requirement: &70196379708380 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70325815883940
36
+ version_requirements: *70196379708380
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: json
39
- requirement: &70325813090120 !ruby/object:Gem::Requirement
39
+ requirement: &70196379706120 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - =
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 1.6.5
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *70325813090120
47
+ version_requirements: *70196379706120
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: activesupport
50
- requirement: &70325813087820 !ruby/object:Gem::Requirement
50
+ requirement: &70196379726380 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '3.0'
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *70325813087820
58
+ version_requirements: *70196379726380
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: thor
61
- requirement: &70325813083840 !ruby/object:Gem::Requirement
61
+ requirement: &70196379720980 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: '0'
67
67
  type: :runtime
68
68
  prerelease: false
69
- version_requirements: *70325813083840
69
+ version_requirements: *70196379720980
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rspec
72
- requirement: &70325813082980 !ruby/object:Gem::Requirement
72
+ requirement: &70196379735760 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ~>
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: 2.5.0
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *70325813082980
80
+ version_requirements: *70196379735760
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: guard-rspec
83
- requirement: &70325815911220 !ruby/object:Gem::Requirement
83
+ requirement: &70196379733280 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ! '>='
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: '0'
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *70325815911220
91
+ version_requirements: *70196379733280
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: cucumber
94
- requirement: &70325815906900 !ruby/object:Gem::Requirement
94
+ requirement: &70196379730960 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ! '>='
@@ -99,10 +99,10 @@ dependencies:
99
99
  version: '0'
100
100
  type: :development
101
101
  prerelease: false
102
- version_requirements: *70325815906900
102
+ version_requirements: *70196379730960
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: guard-cucumber
105
- requirement: &70325815919760 !ruby/object:Gem::Requirement
105
+ requirement: &70196379728900 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ! '>='
@@ -110,10 +110,10 @@ dependencies:
110
110
  version: '0'
111
111
  type: :development
112
112
  prerelease: false
113
- version_requirements: *70325815919760
113
+ version_requirements: *70196379728900
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: bundler
116
- requirement: &70325815916760 !ruby/object:Gem::Requirement
116
+ requirement: &70196379755440 !ruby/object:Gem::Requirement
117
117
  none: false
118
118
  requirements:
119
119
  - - ~>
@@ -121,10 +121,10 @@ dependencies:
121
121
  version: 1.1.0
122
122
  type: :development
123
123
  prerelease: false
124
- version_requirements: *70325815916760
124
+ version_requirements: *70196379755440
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: guard-bundler
127
- requirement: &70325815914860 !ruby/object:Gem::Requirement
127
+ requirement: &70196379754620 !ruby/object:Gem::Requirement
128
128
  none: false
129
129
  requirements:
130
130
  - - ! '>='
@@ -132,10 +132,10 @@ dependencies:
132
132
  version: '0'
133
133
  type: :development
134
134
  prerelease: false
135
- version_requirements: *70325815914860
135
+ version_requirements: *70196379754620
136
136
  - !ruby/object:Gem::Dependency
137
137
  name: rails
138
- requirement: &70325815926660 !ruby/object:Gem::Requirement
138
+ requirement: &70196379753920 !ruby/object:Gem::Requirement
139
139
  none: false
140
140
  requirements:
141
141
  - - ~>
@@ -143,7 +143,7 @@ dependencies:
143
143
  version: '3.0'
144
144
  type: :development
145
145
  prerelease: false
146
- version_requirements: *70325815926660
146
+ version_requirements: *70196379753920
147
147
  description: ! 'The App Scrolls is a magical tool to generate new Rails and modify
148
148
  existing Rails applications (coming) to include your favourite, powerful magic. '
149
149
  email:
@@ -151,6 +151,7 @@ email:
151
151
  - drnicwilliams@gmail.com
152
152
  executables:
153
153
  - appscrolls
154
+ - scrolls
154
155
  extensions: []
155
156
  extra_rdoc_files: []
156
157
  files:
@@ -165,6 +166,7 @@ files:
165
166
  - Rakefile
166
167
  - appscrolls.gemspec
167
168
  - bin/appscrolls
169
+ - bin/scrolls
168
170
  - features/step_definitions/common_steps.rb
169
171
  - features/support/common.rb
170
172
  - features/support/env.rb
@@ -193,17 +195,14 @@ files:
193
195
  - scrolls/passenger.rb
194
196
  - scrolls/postgresql.rb
195
197
  - scrolls/prototype.rb
196
- - scrolls/puma.rb
197
198
  - scrolls/rails_basics.rb
198
199
  - scrolls/redis.rb
199
200
  - scrolls/resque.rb
200
201
  - scrolls/rspec.rb
201
202
  - scrolls/simple_form.rb
202
203
  - scrolls/split.rb
203
- - scrolls/spork.rb
204
204
  - scrolls/sqlite3.rb
205
205
  - scrolls/test_unit.rb
206
- - scrolls/thin.rb
207
206
  - scrolls/twitter_bootstrap.rb
208
207
  - scrolls/unicorn.rb
209
208
  - scrolls/zzz/activerecord.rb
@@ -236,6 +235,7 @@ files:
236
235
  - scrolls/zzz/omniauth.rb
237
236
  - scrolls/zzz/paper_trail.rb
238
237
  - scrolls/zzz/pow.rb
238
+ - scrolls/zzz/puma.rb
239
239
  - scrolls/zzz/rails_admin.rb
240
240
  - scrolls/zzz/rails_dev_tweaks.rb
241
241
  - scrolls/zzz/rails_erd.rb
@@ -248,6 +248,8 @@ files:
248
248
  - scrolls/zzz/shoulda_matchers.rb
249
249
  - scrolls/zzz/sidekiq.rb
250
250
  - scrolls/zzz/slim.rb
251
+ - scrolls/zzz/spork.rb
252
+ - scrolls/zzz/thin.rb
251
253
  - scrolls/zzz/thinking_sphinx.rb
252
254
  - scrolls/zzz/vanity.rb
253
255
  - spec/appscrolls/config_spec.rb
@@ -277,7 +279,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
277
279
  version: '0'
278
280
  segments:
279
281
  - 0
280
- hash: 3316206599219771388
282
+ hash: 703188970612526833
281
283
  required_rubygems_version: !ruby/object:Gem::Requirement
282
284
  none: false
283
285
  requirements:
@@ -286,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
286
288
  version: '0'
287
289
  segments:
288
290
  - 0
289
- hash: 3316206599219771388
291
+ hash: 703188970612526833
290
292
  requirements: []
291
293
  rubyforge_project:
292
294
  rubygems_version: 1.8.17