da-suspenders 1.2.5 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 1.3.0 (2012-04-01)
2
+ * Use twitter bootstrap instead of jQuery UI.
3
+ * Update compass-rails to ~> 1.0.
4
+ * Add Pry (development and testing environment only).
5
+ * Disable jQuery effects in test environment.
6
+ * Make --with-mongoid work correctly again.
7
+
1
8
  ## 1.2.5 (2012-03-23)
2
9
  * Lock version of factory\_girl\_rails to <= 2, as newer versions require Ruby 1.9.
3
10
 
data/README.md CHANGED
@@ -39,6 +39,7 @@ To see the latest and greatest gems, look at DA-Suspenders'
39
39
 
40
40
  It includes application gems like:
41
41
 
42
+ * [bootstrap-rails](https://github.com/anjlab/bootstrap-rails), bringing [Twitter Bootstrap](http://twitter.github.com/bootstrap/) to the Rails asset pipeline.
42
43
  * [Compass](https://github.com/chriseppstein/compass), a [Sass-based](http://sass-lang.com/) CSS Meta-Framework
43
44
  * [will_paginate](https://github.com/mislav/will_paginate/wiki/) for easy pagination
44
45
  * [Paperclip](https://github.com/thoughtbot/paperclip) or [CarrierWave](https://github.com/jnicklas/carrierwave) for file uploads
@@ -46,7 +47,6 @@ It includes application gems like:
46
47
  * [Devise](https://github.com/plataformatec/devise) and [CanCan](https://github.com/ryanb/cancan) for authentication and authorization
47
48
  * [AppConfig](https://github.com/die-antwort/app_config) for simple application configuration
48
49
  * [Airbrake](https://github.com/thoughtbot/airbrake) for exception notification
49
- * [jquery-rails-aristo](https://github.com/die-antwort/jquery-rails-aristo), a beautiful theme for jQuery UI
50
50
  * [da-js](https://github.com/die-antwort/da-js), our collection of small, useful JavaScripts
51
51
 
52
52
  And testing gems like:
@@ -55,6 +55,7 @@ And testing gems like:
55
55
  * [RSpec](https://github.com/rspec/rspec) for awesome, readable isolation testing
56
56
  * [Factory Girl](https://github.com/thoughtbot/factory_girl) for easier creation of test data
57
57
  * [Timecop](https://github.com/jtrupiano/timecop) for dealing with time
58
+ * [Pry](http://pry.github.com/), a powerful alternative to IRB (try `binding.pry` inside a test method)
58
59
 
59
60
  Some gems are commented out by default in the Gemfile – just uncomment the ones you want to use.
60
61
 
data/bin/da-suspenders CHANGED
File without changes
@@ -20,14 +20,14 @@ Feature: Running cucumber in the generated project
20
20
  Scenario: Stylesheets are generated correctly
21
21
  Given there are no cached assets
22
22
  When I visit the application stylesheet
23
- Then it should contain the css reset rules from compass
23
+ Then it should contain bootstrap
24
24
  """
25
25
  And I create a file named "features/step_definitions/test_steps.rb" with:
26
26
  """
27
27
  When /^I visit the users page/ do
28
28
  visit "/users"
29
29
  end
30
-
30
+
31
31
  Given /^there are no cached assets$/ do
32
32
  FileUtils.rm_rf ["#{Rails.root}/tmp/cache/assets", "#{Rails.root}/tmp/cache/sass"]
33
33
  end
@@ -36,8 +36,8 @@ Feature: Running cucumber in the generated project
36
36
  visit "/assets/application.css"
37
37
  end
38
38
 
39
- Then /^it should contain the css reset rules from compass$/ do
40
- page.should have_content "compass/reset"
39
+ Then /^it should contain bootstrap$/ do
40
+ page.should have_content "Bootstrap v2"
41
41
  end
42
42
  """
43
43
  When I run the rake task "cucumber"
@@ -1,3 +1,3 @@
1
1
  module DaSuspenders
2
- VERSION = "1.2.5"
2
+ VERSION = "1.3.0"
3
3
  end
@@ -34,8 +34,8 @@ def create_gemfile_and_install_gems
34
34
  inject_into_file "Gemfile",
35
35
  %Q{gem "mongoid", "~> 2.4"\n} +
36
36
  %Q{gem "bson_ext", "~> 1.5"},
37
- :after => 'gem "mysql"'
38
- gsub_file "Gemfile", 'gem "mysql"', ""
37
+ :after => 'gem "mysql2"'
38
+ gsub_file "Gemfile", 'gem "mysql2"', ""
39
39
  end
40
40
  run "bundle install"
41
41
  end
@@ -108,6 +108,7 @@ def install_misc_support_files
108
108
  trout "config/initializers/localize_with_fallback.rb"
109
109
  trout "config/initializers/silence_asset_logging.rb"
110
110
  trout "app/helpers/body_class_helper.rb"
111
+ trout "app/helpers/bootstrap_helper.rb"
111
112
  end
112
113
 
113
114
  def install_app_config
@@ -123,7 +124,7 @@ end
123
124
 
124
125
  def install_simple_form
125
126
  say "Installing simple_form", :yellow
126
- generate "simple_form:install"
127
+ generate "simple_form:install --with-bootstrap"
127
128
  end
128
129
 
129
130
  def install_javascripts
@@ -141,6 +142,9 @@ def install_rspec_and_cucumber
141
142
  %{Capybara.save_and_open_page_path = "tmp"\n} +
142
143
  %{Capybara.javascript_driver = :webkit\n},
143
144
  :before => %{Capybara.default_selector = :css}
145
+ if ENV["WITH_MONGOID"]
146
+ gsub_file "features/support/env.rb", "DatabaseCleaner.strategy = :transaction", "DatabaseCleaner.strategy = :truncation"
147
+ end
144
148
  copy_file "factory_girl_steps.rb", "features/step_definitions/factory_girl_steps.rb"
145
149
  trout "features/step_definitions/js_steps.rb"
146
150
  end
@@ -11,7 +11,7 @@ group :assets do
11
11
  gem 'sass-rails', '~> 3.2.3'
12
12
  gem 'coffee-rails', '~> 3.2.1'
13
13
  gem 'uglifier', '>= 1.0.3'
14
- gem 'compass-rails', '~> 1.0.0.rc.2'
14
+ gem 'compass-rails', '~> 1.0'
15
15
  end
16
16
 
17
17
  gem "trout", :git => "git://github.com/die-antwort/trout.git"
@@ -19,7 +19,7 @@ gem "app_config", :git => "git://github.com/die-antwort/app_config.git"
19
19
  gem "simple_form"
20
20
  gem "airbrake"
21
21
  gem "will_paginate", "~> 3.0"
22
- gem "jquery-rails-aristo"
22
+ gem 'anjlab-bootstrap-rails', '~> 2.0', :require => 'bootstrap-rails'
23
23
  gem "da-js"
24
24
 
25
25
  # Optional gems (from Rails 3.2 default Gemfile):
@@ -59,6 +59,7 @@ gem "da-js"
59
59
  # and rake tasks without having to type RAILS_ENV=test.
60
60
  group :development, :test do
61
61
  gem "rspec-rails", "~> 2.6.0"
62
+ gem "pry"
62
63
  end
63
64
 
64
65
  group :test do
@@ -2,9 +2,19 @@
2
2
  #= require jquery
3
3
  #= require jquery_ujs
4
4
 
5
- # Activate if you want to use jquery-ui
6
- # require jquery-ui
7
- # require jquery-ui-i18n
5
+ # Activate whatever bootstrap-components you need
6
+ #= require bootstrap-transition
7
+ #= require bootstrap-alert
8
+ # require bootstrap-modal
9
+ # require bootstrap-dropdown
10
+ # require bootstrap-scrollspy
11
+ # require bootstrap-tab
12
+ # require bootstrap-tooltip
13
+ # require bootstrap-popover
14
+ # require bootstrap-button
15
+ # require bootstrap-collapse
16
+ # require bootstrap-carousel
17
+ # require bootstrap-typeahead
8
18
 
9
19
  #= require da-js
10
20
  #= require_tree .
@@ -1,10 +1,8 @@
1
- // Remove if not using jQuery UI:
2
- //= require jqueryui-aristo/aristo
1
+ //= require bootstrap
3
2
  //
4
3
  //= require_self
5
4
  //= require_tree .
6
5
 
7
- @import 'compass/reset';
8
6
  @import 'compass/utilities';
9
7
  @import 'compass/css3';
10
8
 
@@ -0,0 +1,9 @@
1
+ module BootstrapHelper
2
+ def alert_class_for_flash_key(key)
3
+ case key
4
+ when :notice then "alert-info"
5
+ when :alert then "alert-error"
6
+ when :success then "alert-success"
7
+ end
8
+ end
9
+ end
@@ -4,12 +4,14 @@
4
4
  <title>Testapp</title>
5
5
  <%= stylesheet_link_tag "application", :media => "all" %>
6
6
  <%= javascript_include_tag "application" %>
7
- <%= javascript_tag "$.ajaxSetup({ async: false });" if Rails.env.test? %>
7
+ <%= javascript_tag "$.ajaxSetup({ async: false }); $.fx.off = true;" if Rails.env.test? %>
8
8
  <%= csrf_meta_tags %>
9
9
  </head>
10
10
  <body class="<%= body_class %>">
11
- <%= render :partial => "shared/flashes" %>
12
- <%= yield %>
11
+ <div class="container">
12
+ <%= render :partial => "shared/flashes" %>
13
+ <%= yield %>
14
+ </div>
13
15
  </body>
14
16
  </html>
15
17
  <!-- Created with care by DIE ANTWORT · Büro für Informationstechnik GmbH -->
@@ -1,5 +1,8 @@
1
1
  <div id="flash">
2
2
  <% flash.each do |key, value| -%>
3
- <div id="flash_<%= key %>"><%= value %></div>
3
+ <div class="alert <%= alert_class_for_flash_key key %>">
4
+ <a class="close" data-dismiss="alert">×</a>
5
+ <%= value %>
6
+ </div>
4
7
  <% end -%>
5
8
  </div>
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: da-suspenders
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 2
9
- - 5
10
- version: 1.2.5
8
+ - 3
9
+ - 0
10
+ version: 1.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - thoughtbot
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-03-23 00:00:00 Z
19
+ date: 2012-03-31 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: rails
@@ -140,6 +140,7 @@ files:
140
140
  - template/trout/app/assets/javascripts/application.js.coffee
141
141
  - template/trout/app/assets/stylesheets/application.css.scss
142
142
  - template/trout/app/helpers/body_class_helper.rb
143
+ - template/trout/app/helpers/bootstrap_helper.rb
143
144
  - template/trout/app/views/layouts/application.html.erb
144
145
  - template/trout/app/views/shared/_flashes.html.erb
145
146
  - template/trout/config/initializers/errors.rb