suspenders 0.3.6 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/GOALS ADDED
@@ -0,0 +1,2 @@
1
+ Suspenders hits 1.0.0 when it can generate a Rails app that we can build
2
+ upon and use for all client demands.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- suspenders (0.3.6)
4
+ suspenders (1.0.0)
5
5
  bundler (>= 1.1)
6
6
  rails (= 3.2.6)
7
7
 
@@ -63,7 +63,7 @@ GEM
63
63
  i18n (>= 0.4.0)
64
64
  mime-types (~> 1.16)
65
65
  treetop (~> 1.4.8)
66
- mime-types (1.18)
66
+ mime-types (1.19)
67
67
  multi_json (1.3.6)
68
68
  polyglot (0.3.3)
69
69
  rack (1.4.1)
@@ -104,7 +104,7 @@ GEM
104
104
  rack (~> 1.0)
105
105
  tilt (~> 1.1, != 1.3.0)
106
106
  term-ansicolor (1.0.7)
107
- thor (0.15.2)
107
+ thor (0.15.4)
108
108
  tilt (1.3.3)
109
109
  treetop (1.4.10)
110
110
  polyglot
data/NEWS.md ADDED
@@ -0,0 +1,17 @@
1
+ New for 1.0.0:
2
+
3
+ * Ignore `bin/`, `.rake_tasks`, `.bundle/`, and `.gem/`.
4
+ * Create a root route only with `--clearance`.
5
+ * Do not autocommit after generate.
6
+ * Style static error pages.
7
+ * Cucumber requires everything under `features/`, regardless of pwd.
8
+ * Added gems:
9
+ * foreman
10
+ * therubyracer
11
+ * Removed gems:
12
+ * copycopter_client
13
+ * heroku
14
+ * ruby-debug
15
+ * sass
16
+ * sprockets-redirect
17
+ * email_spec
data/README.md CHANGED
@@ -62,8 +62,8 @@ You can optionally create Heroku staging and production apps:
62
62
 
63
63
  This has the same effect as running:
64
64
 
65
- heroku create app-staging --remote staging --stack cedar
66
- heroku create app-production --remote production --stack cedar
65
+ heroku create app-staging --remote staging
66
+ heroku create app-production --remote production
67
67
 
68
68
  Clearance
69
69
  ---------
@@ -1,5 +1,5 @@
1
1
  Then /^"(.*)" should not be installed$/ do |gem_name|
2
2
  in_current_dir do
3
- system("bundle show #{gem_name}").should be_false
3
+ system("bundle show #{gem_name} 2>&1 > /dev/null").should be_false
4
4
  end
5
5
  end
@@ -10,8 +10,8 @@ module Suspenders
10
10
  remove_file 'public/index.html'
11
11
  end
12
12
 
13
- def remove_public_images_rails
14
- remove_file 'public/images/rails.png'
13
+ def remove_rails_logo_image
14
+ remove_file 'app/assets/images/rails.png'
15
15
  end
16
16
 
17
17
  def raise_delivery_errors
@@ -94,6 +94,7 @@ module Suspenders
94
94
  %{Capybara.save_and_open_page_path = 'tmp'\n} +
95
95
  %{Capybara.javascript_driver = :webkit\n},
96
96
  :before => %{Capybara.default_selector = :css}
97
+ inject_into_file 'config/cucumber.yml', ' -r features', :after => %{default: <%= std_opts %> features}
97
98
  end
98
99
 
99
100
  def generate_clearance
@@ -115,10 +116,10 @@ module Suspenders
115
116
  def gitignore_files
116
117
  concat_file "suspenders_gitignore", ".gitignore"
117
118
  ["app/models",
119
+ "app/assets/images",
118
120
  "app/views/pages",
119
121
  "db/migrate",
120
122
  "log",
121
- "public/images",
122
123
  "spec/support",
123
124
  "spec/lib",
124
125
  "spec/models",
@@ -134,8 +135,6 @@ module Suspenders
134
135
 
135
136
  def init_git
136
137
  run "git init"
137
- run "git add -A ."
138
- run "git commit -m 'Initial commit - suspended project'"
139
138
  end
140
139
 
141
140
  def create_heroku_apps
@@ -144,8 +143,8 @@ module Suspenders
144
143
  support_bin = File.expand_path(File.join('..', '..', '..', 'features', 'support', 'bin'))
145
144
  path_addition = "PATH=#{support_bin}:$PATH"
146
145
  end
147
- run "#{path_addition} heroku create #{app_name}-production --remote=production --stack=cedar"
148
- run "#{path_addition} heroku create #{app_name}-staging --remote=staging --stack=cedar"
146
+ run "#{path_addition} heroku create #{app_name}-production --remote=production"
147
+ run "#{path_addition} heroku create #{app_name}-staging --remote=staging"
149
148
  end
150
149
 
151
150
  def document_heroku
@@ -160,12 +159,23 @@ module Suspenders
160
159
  copy_file "Procfile"
161
160
  end
162
161
 
163
- def setup_root_route
164
- route "root :to => 'Clearance::Sessions#new'"
162
+ def customize_error_pages
163
+ meta_tags =<<-EOS
164
+ <meta charset="utf-8" />
165
+ <meta name="ROBOTS" content="NOODP" />
166
+ EOS
167
+ style_tags =<<-EOS
168
+ <link href="/assets/application.css" media="all" rel="stylesheet" type="text/css" />
169
+ EOS
170
+ %w(500 404 422).each do |page|
171
+ inject_into_file "public/#{page}.html", meta_tags, :after => "<head>\n"
172
+ replace_in_file "public/#{page}.html", /<style.+>.+<\/style>/mi, style_tags.strip
173
+ replace_in_file "public/#{page}.html", /<!--.+-->\n/, ''
174
+ end
165
175
  end
166
176
 
167
- def set_active_record_whitelist_attributes
168
- inject_into_class "config/application.rb", "Application", " config.active_record.whitelist_attributes = true\n"
177
+ def setup_root_route
178
+ route "root :to => 'Clearance::Sessions#new'"
169
179
  end
170
180
 
171
181
  def set_attr_accessibles_on_user
@@ -33,8 +33,8 @@ module Suspenders
33
33
  invoke :configure_app
34
34
  invoke :setup_stylesheets
35
35
  invoke :copy_miscellaneous_files
36
+ invoke :customize_error_pages
36
37
  invoke :setup_root_route
37
- invoke :set_active_record_whitelist_attributes
38
38
  invoke :setup_git
39
39
  invoke :create_heroku_apps
40
40
  invoke :outro
@@ -42,7 +42,7 @@ module Suspenders
42
42
 
43
43
  def remove_files_we_dont_need
44
44
  build(:remove_public_index)
45
- build(:remove_public_images_rails)
45
+ build(:remove_rails_logo_image)
46
46
  end
47
47
 
48
48
  def setup_development_environment
@@ -118,7 +118,7 @@ module Suspenders
118
118
  end
119
119
 
120
120
  def setup_git
121
- say "Initializing git and initial commit"
121
+ say "Initializing git"
122
122
  invoke :setup_gitignore
123
123
  invoke :init_git
124
124
  end
@@ -144,15 +144,15 @@ module Suspenders
144
144
  build(:copy_miscellaneous_files)
145
145
  end
146
146
 
147
- def setup_root_route
148
- say "Setting up a root route"
149
- build(:setup_root_route)
147
+ def customize_error_pages
148
+ say "Customizing the 500/404/422 pages"
149
+ build(:customize_error_pages)
150
150
  end
151
151
 
152
- def set_active_record_whitelist_attributes
153
- if using_active_record?
154
- say "Setting up active_record.whitelist_attributes"
155
- build(:set_active_record_whitelist_attributes)
152
+ def setup_root_route
153
+ if options[:clearance]
154
+ say "Setting up a root route"
155
+ build(:setup_root_route)
156
156
  end
157
157
  end
158
158
 
@@ -1,3 +1,3 @@
1
1
  module Suspenders
2
- VERSION = '0.3.6'
2
+ VERSION = '1.0.0'
3
3
  end
@@ -1,20 +1,18 @@
1
1
  gem 'thin'
2
- gem 'sass'
3
2
  gem 'high_voltage'
4
3
  gem 'paperclip'
5
4
  gem 'formtastic'
6
5
  gem 'flutie'
7
6
  gem 'bourbon'
8
- gem 'copycopter_client'
9
7
  gem 'airbrake'
8
+ gem 'therubyracer'
10
9
 
11
10
  group :development do
12
- gem 'heroku'
11
+ gem 'foreman'
13
12
  end
14
13
 
15
14
  group :development, :test do
16
15
  gem 'rspec-rails', '~> 2.9.0'
17
- gem 'ruby-debug19'
18
16
  gem 'sham_rack'
19
17
  end
20
18
 
@@ -27,10 +25,8 @@ group :test do
27
25
  gem 'timecop'
28
26
  gem 'shoulda-matchers'
29
27
  gem 'launchy'
30
- gem 'email_spec'
31
28
  end
32
29
 
33
30
  group :staging, :production do
34
31
  gem 'newrelic_rpm'
35
- gem 'sprockets-redirect'
36
32
  end
data/templates/errors.rb CHANGED
@@ -1,4 +1,6 @@
1
+ require 'net/http'
1
2
  require 'net/smtp'
3
+
2
4
  # Example:
3
5
  # begin
4
6
  # some http call
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: suspenders
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-15 00:00:00.000000000 Z
12
+ date: 2012-07-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -92,9 +92,11 @@ extra_rdoc_files:
92
92
  - LICENSE
93
93
  files:
94
94
  - CONTRIBUTING.md
95
+ - GOALS
95
96
  - Gemfile
96
97
  - Gemfile.lock
97
98
  - LICENSE
99
+ - NEWS.md
98
100
  - README.md
99
101
  - Rakefile
100
102
  - bin/suspenders
@@ -142,12 +144,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
142
144
  - - ! '>='
143
145
  - !ruby/object:Gem::Version
144
146
  version: '0'
147
+ segments:
148
+ - 0
149
+ hash: 1021739957831646571
145
150
  required_rubygems_version: !ruby/object:Gem::Requirement
146
151
  none: false
147
152
  requirements:
148
153
  - - ! '>='
149
154
  - !ruby/object:Gem::Version
150
155
  version: '0'
156
+ segments:
157
+ - 0
158
+ hash: 1021739957831646571
151
159
  requirements: []
152
160
  rubyforge_project:
153
161
  rubygems_version: 1.8.24