suspenders 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -13,7 +13,7 @@ Then run:
13
13
 
14
14
  suspenders create projectname
15
15
 
16
- This will create a Rails 3 app in `projectname'. This script creates a new
16
+ This will create a Rails 3.1 app in `projectname'. This script creates a new
17
17
  new git repository. It is not meant to be used against an existing repo.
18
18
 
19
19
  Suspenders uses [Trout](https://github.com/thoughtbot/trout) to make it
@@ -37,6 +37,7 @@ It includes application gems like:
37
37
  * [Formtastic](https://github.com/justinfrench/formtastic) for better forms
38
38
  * [Hoptoad Notifier](https://github.com/thoughtbot/hoptoad_notifier) for exception notification
39
39
  * [Flutie](https://github.com/thoughtbot/flutie) for default CSS styles
40
+ * [Bourbon](https://github.com/thoughtbot/bourbon) for classy sass mixins
40
41
  * [Clearance](https://github.com/thoughtbot/clearance) for authentication
41
42
 
42
43
  And testing gems like:
data/lib/create.rb CHANGED
@@ -24,7 +24,8 @@ module Suspenders
24
24
  rails #{rails_version} new #{project_path} \
25
25
  --template=#{template} \
26
26
  --skip-test-unit \
27
- --skip-prototype
27
+ --skip-prototype \
28
+ --database=postgresql
28
29
  COMMAND
29
30
  command_with_repo = if repo
30
31
  "REPO='#{repo}' #{command}"
data/suspenders.gemspec CHANGED
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
4
4
  s.rubygems_version = '1.3.5'
5
5
 
6
6
  s.name = 'suspenders'
7
- s.version = '0.2.6'
8
- s.date = '2011-07-26'
7
+ s.version = '0.2.7'
8
+ s.date = '2011-10-03'
9
9
 
10
10
  s.summary = "Generate a Rails app using thoughtbot's best practices."
11
11
  s.description = <<-HERE
@@ -24,7 +24,7 @@ rush to build something amazing; don't use it if you like missing deadlines.
24
24
  s.rdoc_options = ["--charset=UTF-8"]
25
25
  s.extra_rdoc_files = %w[README.md LICENSE]
26
26
 
27
- s.add_dependency('rails', '3.0.9')
27
+ s.add_dependency('rails', '3.1.0')
28
28
  s.add_dependency('bundler', '>= 1.0.7')
29
29
  s.add_dependency('trout', '>= 0.3.0')
30
30
  s.add_development_dependency('cucumber', '~> 1.0.2')
@@ -44,17 +44,16 @@ rush to build something amazing; don't use it if you like missing deadlines.
44
44
  template/files/README_FOR_SUSPENDERS
45
45
  template/files/_flashes.html.erb
46
46
  template/files/_javascript.html.erb
47
- template/files/body_class_helper.rb
48
47
  template/files/cucumber_assertions_hack
49
48
  template/files/errors.rb
50
49
  template/files/factory_girl_steps.rb
50
+ template/files/import_scss_styles
51
51
  template/files/postgresql_database.yml.erb
52
52
  template/files/suspenders_gitignore
53
53
  template/files/suspenders_layout.html.erb.erb
54
54
  template/files/time_formats.rb
55
55
  template/suspenders.rb
56
56
  template/trout/Gemfile
57
- template/trout/public/javascripts/prefilled_input.js
58
57
  ]
59
58
  # = MANIFEST =
60
59
 
@@ -1,4 +1,4 @@
1
- <%= javascript_include_tag 'jquery.min', 'jquery-ui.min', 'jquery_ujs', 'prefilled_input', 'application', :cache => true %>
1
+ <%= javascript_include_tag :application, :cache => true %>
2
2
 
3
3
  <%= yield :javascript %>
4
4
 
@@ -0,0 +1,4 @@
1
+
2
+
3
+ @import 'flutie';
4
+ @import 'bourbon';
@@ -2,9 +2,9 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <title><%= app_name %></title>
6
- <%%= stylesheet_link_tag :flutie, 'screen', :media => 'all', :cache => true %>
7
- <%%= csrf_meta_tag %>
5
+ <title><%%= page_title %></title>
6
+ <%%= stylesheet_link_tag :application, :media => 'all', :cache => true %>
7
+ <%%= csrf_meta_tags %>
8
8
  </head>
9
9
  <body class="<%%= body_class %>">
10
10
  <div id="header">
@@ -73,22 +73,23 @@ template "suspenders_layout.html.erb.erb",
73
73
  "app/views/layouts/application.html.erb",
74
74
  :force => true
75
75
 
76
+ say "Get ready for bundler... (this will take a while)"
77
+
76
78
  trout 'Gemfile'
77
79
  run "bundle install"
78
80
 
79
- say "Let's use jQuery"
80
- generate "jquery:install", "--ui"
81
-
82
81
  say "Pulling in some common javascripts"
83
82
 
84
- trout "public/javascripts/prefilled_input.js"
83
+ trout "app/assets/javascripts/prefilled_input.js"
84
+
85
+ say "Add jQuery ui to the standard application.js"
86
+
87
+ inject_into_file "app/assets/javascripts/application.js", "//= require jquery-ui\n", :before => "//= require_tree ."
85
88
 
86
89
  say "Documentation"
87
90
 
88
91
  copy_file "README_FOR_SUSPENDERS", "doc/README_FOR_SUSPENDERS"
89
92
 
90
- say "Get ready for bundler... (this will take a while)"
91
-
92
93
  say "Let's use PostgreSQL"
93
94
 
94
95
  template "postgresql_database.yml.erb", "config/database.yml", :force => true
@@ -113,9 +114,6 @@ generate "cucumber:install", "--rspec --capybara"
113
114
  generate "clearance:install"
114
115
  generate "clearance:features"
115
116
 
116
- create_file "public/stylesheets/sass/screen.scss"
117
- create_file "public/stylesheets/screen.css"
118
-
119
117
  copy_file "factory_girl_steps.rb", "features/step_definitions/factory_girl_steps.rb"
120
118
 
121
119
  replace_in_file "spec/spec_helper.rb", "mock_with :rspec", "mock_with :mocha"
@@ -125,7 +123,12 @@ inject_into_file "features/support/env.rb",
125
123
  %{Capybara.javascript_driver = :webkit\n},
126
124
  :before => %{Capybara.default_selector = :css}
127
125
 
128
- rake "flutie:install"
126
+ say "Set up stylesheets"
127
+
128
+ copy_file "app/assets/stylesheets/application.css", "app/assets/stylesheets/application.css.scss"
129
+ remove_file "app/assets/stylesheets/application.css"
130
+ concat_file "import_scss_styles", "app/assets/stylesheets/application.css.scss"
131
+ create_file "app/assets/stylesheets/_screen.scss"
129
132
 
130
133
  say "Ignore the right files"
131
134
 
@@ -153,13 +156,10 @@ say "Copying miscellaneous support files"
153
156
 
154
157
  copy_file "errors.rb", "config/initializers/errors.rb"
155
158
  copy_file "time_formats.rb", "config/initializers/time_formats.rb"
156
- copy_file "body_class_helper.rb", "app/helpers/body_class_helper.rb"
157
-
158
159
 
159
160
  say "Setting up a root route"
160
161
 
161
162
  route "root :to => 'Clearance::Sessions#new'"
162
163
 
163
164
  say "Congratulations! You just pulled our suspenders."
164
- say "Remember to run 'rails generate hoptoad' with your API key."
165
-
165
+ say "Remember to run 'rails generate airbrake' with your API key."
@@ -1,19 +1,28 @@
1
1
  source :rubygems
2
2
 
3
- gem "rails", "3.0.9"
4
- gem "rack"
5
- gem "clearance", "~> 0.11.1"
3
+ gem "rails", "3.1.0"
4
+
5
+ # Gems used only for assets and not required
6
+ # in production environments by default.
7
+ group :assets do
8
+ gem "sass-rails", " ~> 3.1.0"
9
+ gem "coffee-rails", "~> 3.1.0"
10
+ gem "uglifier", ">= 1.0.3"
11
+ end
12
+
13
+ gem "pg"
14
+ gem "jquery-rails"
6
15
  gem "sass"
7
- gem "high_voltage"
8
- gem "hoptoad_notifier", "~> 2.4.11"
9
16
  gem "RedCloth", :require => "redcloth"
17
+ gem "clearance", "~> 0.11.1"
18
+ gem "high_voltage"
10
19
  gem "paperclip"
11
- gem "validation_reflection"
12
20
  gem "formtastic"
13
- gem "pg"
14
- gem "flutie", "~> 1.1.8"
21
+ gem "flutie"
22
+ gem "bourbon"
23
+ gem "airbrake"
15
24
  gem "dynamic_form"
16
- gem "jquery-rails"
25
+
17
26
  gem "rake", "0.9.2"
18
27
 
19
28
  # RSpec needs to be in :development group to expose generators
@@ -24,7 +33,7 @@ group :development, :test do
24
33
  end
25
34
 
26
35
  group :test do
27
- gem "cucumber-rails", "0.4.1"
36
+ gem "cucumber-rails", "1.0.2"
28
37
  gem "factory_girl_rails"
29
38
  gem "bourne"
30
39
  gem "database_cleaner"
metadata CHANGED
@@ -1,101 +1,76 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: suspenders
3
- version: !ruby/object:Gem::Version
4
- hash: 27
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.7
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 2
9
- - 6
10
- version: 0.2.6
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - thoughtbot
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-07-26 00:00:00 -04:00
19
- default_executable: suspenders
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2011-10-03 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: rails
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &2156880180 !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - "="
28
- - !ruby/object:Gem::Version
29
- hash: 21
30
- segments:
31
- - 3
32
- - 0
33
- - 9
34
- version: 3.0.9
18
+ requirements:
19
+ - - =
20
+ - !ruby/object:Gem::Version
21
+ version: 3.1.0
35
22
  type: :runtime
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: bundler
39
23
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *2156880180
25
+ - !ruby/object:Gem::Dependency
26
+ name: bundler
27
+ requirement: &2156879720 !ruby/object:Gem::Requirement
41
28
  none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- hash: 25
46
- segments:
47
- - 1
48
- - 0
49
- - 7
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
50
32
  version: 1.0.7
51
33
  type: :runtime
52
- version_requirements: *id002
53
- - !ruby/object:Gem::Dependency
54
- name: trout
55
34
  prerelease: false
56
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *2156879720
36
+ - !ruby/object:Gem::Dependency
37
+ name: trout
38
+ requirement: &2156879080 !ruby/object:Gem::Requirement
57
39
  none: false
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- hash: 19
62
- segments:
63
- - 0
64
- - 3
65
- - 0
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
66
43
  version: 0.3.0
67
44
  type: :runtime
68
- version_requirements: *id003
69
- - !ruby/object:Gem::Dependency
70
- name: cucumber
71
45
  prerelease: false
72
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *2156879080
47
+ - !ruby/object:Gem::Dependency
48
+ name: cucumber
49
+ requirement: &2156878400 !ruby/object:Gem::Requirement
73
50
  none: false
74
- requirements:
51
+ requirements:
75
52
  - - ~>
76
- - !ruby/object:Gem::Version
77
- hash: 19
78
- segments:
79
- - 1
80
- - 0
81
- - 2
53
+ - !ruby/object:Gem::Version
82
54
  version: 1.0.2
83
55
  type: :development
84
- version_requirements: *id004
85
- description: |
86
- Suspenders is a base Rails project that you can upgrade. It is used by
87
- thoughtbot to get a jump start on a working app. Use Suspenders if you're in a
88
- rush to build something amazing; don't use it if you like missing deadlines.
56
+ prerelease: false
57
+ version_requirements: *2156878400
58
+ description: ! 'Suspenders is a base Rails project that you can upgrade. It is used
59
+ by
60
+
61
+ thoughtbot to get a jump start on a working app. Use Suspenders if you''re in a
62
+
63
+ rush to build something amazing; don''t use it if you like missing deadlines.
89
64
 
65
+ '
90
66
  email: support@thoughtbot.com
91
- executables:
67
+ executables:
92
68
  - suspenders
93
69
  extensions: []
94
-
95
- extra_rdoc_files:
70
+ extra_rdoc_files:
96
71
  - README.md
97
72
  - LICENSE
98
- files:
73
+ files:
99
74
  - CONTRIBUTING.md
100
75
  - LICENSE
101
76
  - README.md
@@ -109,51 +84,41 @@ files:
109
84
  - template/files/README_FOR_SUSPENDERS
110
85
  - template/files/_flashes.html.erb
111
86
  - template/files/_javascript.html.erb
112
- - template/files/body_class_helper.rb
113
87
  - template/files/cucumber_assertions_hack
114
88
  - template/files/errors.rb
115
89
  - template/files/factory_girl_steps.rb
90
+ - template/files/import_scss_styles
116
91
  - template/files/postgresql_database.yml.erb
117
92
  - template/files/suspenders_gitignore
118
93
  - template/files/suspenders_layout.html.erb.erb
119
94
  - template/files/time_formats.rb
120
95
  - template/suspenders.rb
121
96
  - template/trout/Gemfile
122
- - template/trout/public/javascripts/prefilled_input.js
123
- has_rdoc: true
124
97
  homepage: http://github.com/thoughtbot/suspenders
125
98
  licenses: []
126
-
127
99
  post_install_message:
128
- rdoc_options:
100
+ rdoc_options:
129
101
  - --charset=UTF-8
130
- require_paths:
102
+ require_paths:
131
103
  - lib
132
- required_ruby_version: !ruby/object:Gem::Requirement
104
+ required_ruby_version: !ruby/object:Gem::Requirement
133
105
  none: false
134
- requirements:
135
- - - ">="
136
- - !ruby/object:Gem::Version
137
- hash: 3
138
- segments:
139
- - 0
140
- version: "0"
141
- required_rubygems_version: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ required_rubygems_version: !ruby/object:Gem::Requirement
142
111
  none: false
143
- requirements:
144
- - - ">="
145
- - !ruby/object:Gem::Version
146
- hash: 3
147
- segments:
148
- - 0
149
- version: "0"
112
+ requirements:
113
+ - - ! '>='
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
150
116
  requirements: []
151
-
152
117
  rubyforge_project:
153
- rubygems_version: 1.6.2
118
+ rubygems_version: 1.8.10
154
119
  signing_key:
155
120
  specification_version: 2
156
121
  summary: Generate a Rails app using thoughtbot's best practices.
157
- test_files:
122
+ test_files:
158
123
  - features/rake_clean.feature
159
124
  - features/step_definitions/shell.rb
@@ -1,7 +0,0 @@
1
- module BodyClassHelper
2
- # TODO: move this into a gem/plugin
3
- def body_class
4
- qualified_controller_name = controller.controller_path.gsub('/','-')
5
- "#{qualified_controller_name} #{qualified_controller_name}-#{controller.action_name}"
6
- end
7
- end
@@ -1,59 +0,0 @@
1
- // clear inputs with starter values
2
- new function($) {
3
- $.fn.prefilledInput = function() {
4
-
5
- var focus = function () {
6
- $(this).removeClass('prefilled');
7
- if (this.value == this.prefilledValue) {
8
- this.value = '';
9
- }
10
- };
11
-
12
- var blur = function () {
13
- if (this.value == '') {
14
- $(this).addClass('prefilled').val(this.prefilledValue);
15
- } else if (this.value != this.prefilledValue) {
16
- $(this).removeClass('prefilled');
17
- }
18
- };
19
-
20
- var extractPrefilledValue = function () {
21
- if (this.title) {
22
- this.prefilledValue = this.title;
23
- this.title = '';
24
- } else if (this.id) {
25
- this.prefilledValue = $('label[for=' + this.id + ']').hide().text();
26
- }
27
- if (this.prefilledValue) {
28
- this.prefilledValue = this.prefilledValue.replace(/\*$/, '');
29
- }
30
- };
31
-
32
- var initialize = function (index) {
33
- if (!this.prefilledValue) {
34
- this.extractPrefilledValue = extractPrefilledValue;
35
- this.extractPrefilledValue();
36
- $(this).trigger('blur');
37
- }
38
- };
39
-
40
- return this.filter(":input").
41
- focus(focus).
42
- blur(blur).
43
- each(initialize);
44
- };
45
-
46
- var clearPrefilledInputs = function () {
47
- var form = this.form || this;
48
- $(form).find("input.prefilled, textarea.prefilled").val("");
49
- };
50
-
51
- var prefilledSetup = function () {
52
- $('input.prefilled, textarea.prefilled').prefilledInput();
53
- $('form').submit(clearPrefilledInputs);
54
- $('input:submit, button:submit').click(clearPrefilledInputs);
55
- };
56
-
57
- $(document).ready(prefilledSetup);
58
- $(document).ajaxComplete(prefilledSetup);
59
- }(jQuery);