da-suspenders 1.3.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
@@ -1,3 +1,20 @@
1
+ ## 2.0.0 (2012-12-21)
2
+ * Require Ruby 1.9 (drop support for Ruby 1.8)
3
+ * Update Rails to 3.2.9.
4
+ * Use Kaminari instead of will_paginate.
5
+ * Use Steak instead of Cucumber.
6
+ * Update bootstrap-sass to ~> 2.2.1.1 (Bootstrap 2.2.1), move to :assets-group in Gemfile.
7
+ * Update factory_girl_rails to ~> 4.1.0.
8
+ * Update Mongoid to ~> 3.0.15.
9
+ * Use thousands delimiter for number\_to\_precision and number\_to\_percentage.
10
+ * Disable HTML5 features in simple_form.
11
+ * Minor updates: rspec-rails ~> 2.12.0, simple_form ~> 2.0.4, capybara-webkit ~> 0.13.0, database_cleaner ~> 0.9.1, timecop ~> 0.5.5
12
+ * New optional Gem (commented out by default): fix_microsoft_links, font-awesome-rails.
13
+ * Specify version constraints for all gems.
14
+ * Use pry-rails (enables pry for Rails console).
15
+ * Use thin as development server.
16
+ * Always activate debugger gem (in test and development environments).
17
+
1
18
  ## 1.3.1 (2012-06-14)
2
19
  * Update to Rails 3.2.6
3
20
  * Now works with Ruby 1.9 (added encoding comments where necessary)
data/README.md CHANGED
@@ -41,7 +41,7 @@ It includes application gems like:
41
41
 
42
42
  * [bootstrap-sass](https://github.com/thomas-mcdonald/bootstrap-sass), bringing [Twitter Bootstrap](http://twitter.github.com/bootstrap/) to the Rails asset pipeline.
43
43
  * [Compass](https://github.com/chriseppstein/compass), a [Sass-based](http://sass-lang.com/) CSS Meta-Framework
44
- * [will_paginate](https://github.com/mislav/will_paginate/wiki/) for easy pagination
44
+ * [Kaminari](https://github.com/amatsuda/kaminari) for easy pagination (view templates modified to be compatible with Bootstrap)
45
45
  * [Paperclip](https://github.com/thoughtbot/paperclip) or [CarrierWave](https://github.com/jnicklas/carrierwave) for file uploads
46
46
  * [simple_form](https://github.com/plataformatec/simple_form) for better forms
47
47
  * [Devise](https://github.com/plataformatec/devise) and [CanCan](https://github.com/ryanb/cancan) for authentication and authorization
@@ -51,7 +51,7 @@ It includes application gems like:
51
51
 
52
52
  And testing gems like:
53
53
 
54
- * [Cucumber, Capybara, and Capybara-Webkit](http://robots.thoughtbot.com/post/4583605733/capybara-webkit) for integration testing, including Javascript behavior
54
+ * [Steak](https://github.com/cavalle/steak) and [Capybara-Webkit](https://github.com/thoughtbot/capybara-webkit) for integration testing including Javascript behavior
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
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
1
  require "bundler"
2
- require "cucumber/rake/task"
2
+ require 'rspec/core/rake_task'
3
3
 
4
4
  Bundler::GemHelper.install_tasks
5
5
 
@@ -9,25 +9,41 @@ Bundler::GemHelper.install_tasks
9
9
  #
10
10
  #############################################################################
11
11
 
12
- Cucumber::Rake::Task.new
12
+ RSpec::Core::RakeTask.new(:spec)
13
13
 
14
14
  TEST_PROJECT = "test_project"
15
15
 
16
+ desc "Generate and test projects with Active Record and Mongoid"
17
+ task :test => ['test:active_record', 'test:mongoid']
18
+
16
19
  namespace :test do
17
- desc "A full suspenders app's test suite"
18
- task :full => ['test_project:generate', 'cucumber', 'test_project:destroy']
19
- end
20
+ desc "Generate and test a project with Active Record"
21
+ task :active_record do
22
+ puts "\n=== Generating and testing a project with Active Record ==="
23
+ Rake::Task["test_project:generate_active_record"].invoke
24
+ sh "bundle exec rake spec"
25
+ end
20
26
 
27
+ desc "Generate and test a project with Mongoid"
28
+ task :mongoid do
29
+ Rake::Task["test_project:generate_mongoid"].invoke
30
+ sh "bundle exec rake spec"
31
+ end
32
+ end
33
+
34
+
21
35
  namespace :test_project do
22
- desc 'Suspend a new project. Pass WITH_MONGOID=1 to use mongoid. Pass REPO=... to change the Suspenders repo (defaults to dir with Rakefile).'
23
- task :generate => :clean_env do
24
- FileUtils.rm_rf(TEST_PROJECT)
25
- repo = (ENV['REPO'] || "file://#{Dir.pwd}").to_s
26
- with_mongoid = ENV["WITH_MONGOID"] ? "--with-mongoid" : ""
27
- sh 'ruby', 'bin/da-suspenders', 'create', TEST_PROJECT, with_mongoid, repo
36
+ desc 'Generate a new test project with ActiveRecord. Pass REPO=... to change the Suspenders repo (defaults to dir with Rakefile).'
37
+ task :generate_active_record => :clean_env do
38
+ generate_test_project(:with_mongoid => false)
28
39
  end
29
40
 
30
- desc 'Remove a suspended project'
41
+ desc 'Generate a new test project with Mongoid. Pass REPO=... to change the Suspenders repo (defaults to dir with Rakefile).'
42
+ task :generate_mongoid => :clean_env do
43
+ generate_test_project(:with_mongoid => true)
44
+ end
45
+
46
+ desc 'Remove test project'
31
47
  task :destroy => :clean_env do
32
48
  FileUtils.cd TEST_PROJECT
33
49
  sh "bundle exec rake db:drop"
@@ -36,11 +52,16 @@ namespace :test_project do
36
52
  end
37
53
  end
38
54
 
39
- desc 'Run the test suite'
40
- task :default => ['test:full']
41
-
42
55
  task :clean_env do
43
56
  # Make sure to have a non-bundled ENV for generating the test project, even when running via "bundle exec rake ..."
44
57
  ENV["RUBYOPT"] = nil
45
58
  ENV["BUNDLE_GEMFILE"] = nil
46
59
  end
60
+
61
+ def generate_test_project(options)
62
+ FileUtils.rm_rf(TEST_PROJECT)
63
+ repo = (ENV['REPO'] || "file://#{Dir.pwd}").to_s
64
+ with_mongoid = options[:with_mongoid] ? "--with-mongoid" : ""
65
+ sh 'ruby', 'bin/da-suspenders', 'create', TEST_PROJECT, with_mongoid, repo
66
+ end
67
+
@@ -12,13 +12,12 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.required_rubygems_version = ">= 1.3.6"
14
14
 
15
- s.add_dependency('rails', '3.2.6')
16
- s.add_dependency('bundler', '>= 1.0.10')
15
+ s.add_dependency('rails', '3.2.9')
16
+ s.add_dependency('bundler', '>= 1.2.1')
17
17
  s.add_dependency('trout', '~> 0.3')
18
18
 
19
19
  s.add_development_dependency('rake', '~> 0.9.2')
20
- s.add_development_dependency('cucumber')
21
- s.add_development_dependency('rspec-expectations')
20
+ s.add_development_dependency('rspec', '~> 2.11.0')
22
21
 
23
22
  s.files = `git ls-files`.split("\n")
24
23
  s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
@@ -1,3 +1,3 @@
1
1
  module DaSuspenders
2
- VERSION = "1.3.1"
2
+ VERSION = "2.0.0"
3
3
  end
@@ -0,0 +1,43 @@
1
+ describe "the test project" do
2
+
3
+ def create_application_spec_file
4
+ File.open("spec/acceptance/application_spec.rb", "w") do |file|
5
+ file.write %q{
6
+ require "acceptance/acceptance_helper"
7
+
8
+ feature "The application works correctly" do
9
+ scenario "jQuery and Modernizr work correctly", :js => true do
10
+ visit "/users"
11
+ page.evaluate_script("$('html').hasClass('js')").should be_true
12
+ page.evaluate_script("$('html').hasClass('no-js')").should be_false
13
+ end
14
+
15
+ scenario "Stylesheets are generated correctly" do
16
+ FileUtils.rm_rf ["#{Rails.root}/tmp/cache/assets", "#{Rails.root}/tmp/cache/sass"]
17
+ visit "/assets/application.css"
18
+ page.should have_content "/bootstrap-sass-2."
19
+ end
20
+ end
21
+ }.gsub(/^ /, "")
22
+ end
23
+ end
24
+
25
+ before(:all) do
26
+ # Make sure to have a non-bundled ENV, even when running via "bundle exec cucumber ..."
27
+ ENV["RUBYOPT"] = nil
28
+ ENV["BUNDLE_GEMFILE"] = nil
29
+
30
+ Dir.chdir('test_project') do
31
+ system "rails g scaffold user username:string"
32
+ system "bundle exec rake db:drop db:create db:migrate"
33
+ create_application_spec_file
34
+ end
35
+ end
36
+
37
+ it "works correctly" do
38
+ Dir.chdir("test_project") do
39
+ system "bundle exec rake spec"
40
+ $?.should be_success
41
+ end
42
+ end
43
+ end
@@ -31,11 +31,7 @@ def create_gemfile_and_install_gems
31
31
  say "Creating Gemfile and installing gems (this may take a while)", :yellow
32
32
  trout "Gemfile"
33
33
  if ENV["WITH_MONGOID"]
34
- inject_into_file "Gemfile",
35
- %Q{gem "mongoid", "~> 2.4"\n} +
36
- %Q{gem "bson_ext", "~> 1.5"},
37
- :after => 'gem "mysql2"'
38
- gsub_file "Gemfile", 'gem "mysql2"', ""
34
+ gsub_file "Gemfile", %r{gem "mysql2".*}, 'gem "mongoid", "~> 3.0.15"'
39
35
  end
40
36
  run "bundle install"
41
37
  end
@@ -124,7 +120,8 @@ end
124
120
 
125
121
  def install_simple_form
126
122
  say "Installing simple_form", :yellow
127
- generate "simple_form:install --with-bootstrap"
123
+ generate "simple_form:install --bootstrap"
124
+ gsub_file "config/initializers/simple_form.rb", %r{ (b.use :html5)}, " #\\1"
128
125
  end
129
126
 
130
127
  def install_javascripts
@@ -134,19 +131,24 @@ def install_javascripts
134
131
  trout "vendor/assets/javascripts/modernizr.js"
135
132
  end
136
133
 
137
- def install_rspec_and_cucumber
138
- say "Installing rspec and cucumber", :yellow
139
- generate "rspec:install"
140
- generate "cucumber:install", "--rspec --capybara"
141
- inject_into_file "features/support/env.rb",
142
- %{Capybara.save_and_open_page_path = "tmp"\n} +
143
- %{Capybara.javascript_driver = :webkit\n},
144
- :before => %{Capybara.default_selector = :css}
145
- if ENV["WITH_MONGOID"]
146
- gsub_file "features/support/env.rb", "DatabaseCleaner.strategy = :transaction", "DatabaseCleaner.strategy = :truncation"
134
+ def install_kaminari
135
+ say "Installing Kaminari", :yellow
136
+ generate "kaminari:config"
137
+ # view files taken from https://github.com/gabetax/twitter-bootstrap-kaminari-views
138
+ %w{_first_page _last_page _page _prev_page _gap _next_page _paginator}.each do |file|
139
+ trout "app/views/kaminari/#{file}.html.erb"
147
140
  end
148
- copy_file "factory_girl_steps.rb", "features/step_definitions/factory_girl_steps.rb"
149
- trout "features/step_definitions/js_steps.rb"
141
+ trout "config/locales/kaminari.de.yml"
142
+ end
143
+
144
+ def install_rspec_and_steak
145
+ say "Installing rspec and steak", :yellow
146
+ generate "rspec:install"
147
+ generate "steak:install"
148
+ gsub_file "spec/spec_helper.rb", %r{^ (config.fixture_path = )}, " #\\1"
149
+ gsub_file "spec/spec_helper.rb", %r{^ (config.use_transactional_fixtures = )}, " #\\1"
150
+ inject_into_file "spec/spec_helper.rb", %{\n config.before(:each) do\n DatabaseCleaner.clean_with(:truncation)\n end\n}, :before => /^end$/
151
+ append_to_file "spec/spec_helper.rb", "\nCapybara.javascript_driver = :webkit"
150
152
  end
151
153
 
152
154
  def cleanup
@@ -171,7 +173,8 @@ install_app_config
171
173
  install_compass
172
174
  install_simple_form
173
175
  install_javascripts
174
- install_rspec_and_cucumber
176
+ install_kaminari
177
+ install_rspec_and_steak
175
178
  cleanup
176
179
 
177
180
  say "Rails app #{app_name} has been created successully!", :blue
@@ -1,11 +1,11 @@
1
1
  source 'https://rubygems.org'
2
-
3
- gem "rails", "3.2.6"
2
+ ruby "1.9.3"
3
+ gem "rails", "3.2.9"
4
4
 
5
5
  # Bundle edge Rails instead:
6
6
  # gem 'rails', :git => 'git://github.com/rails/rails.git'
7
7
 
8
- gem "mysql2"
8
+ gem "mysql2", "~> 0.3.11"
9
9
 
10
10
 
11
11
  # Gems used only for assets and not required
@@ -19,9 +19,11 @@ group :assets do
19
19
 
20
20
  gem 'uglifier', '>= 1.0.3'
21
21
  gem 'compass-rails', '~> 1.0'
22
+ gem "bootstrap-sass", "~> 2.2.1.1"
23
+ # gem "font-awesome-rails", "~> 0.4.1"
22
24
  end
23
25
 
24
- gem "jquery-rails"
26
+ gem "jquery-rails", "~> 2.0.2"
25
27
 
26
28
  # To use ActiveModel has_secure_password
27
29
  # gem 'bcrypt-ruby', '~> 3.0.0'
@@ -31,20 +33,16 @@ gem "jquery-rails"
31
33
 
32
34
  # Use unicorn as the app server
33
35
  # gem 'unicorn'
36
+ gem "thin", "~> 1.4.0"
34
37
 
35
38
  # Deploy with Capistrano
36
39
  # gem 'capistrano'
37
40
 
38
- # To use debugger
39
- # gem 'debugger'
40
-
41
-
42
41
  gem "trout", :git => "git://github.com/die-antwort/trout.git"
43
42
  gem "app_config", :git => "git://github.com/die-antwort/app_config.git"
44
- gem "simple_form"
45
- gem "airbrake"
46
- gem "will_paginate", "~> 3.0"
47
- gem "bootstrap-sass", "~> 2.0.3"
43
+ gem "simple_form", "~> 2.0.4"
44
+ gem "airbrake", "~> 3.1.2"
45
+ gem "kaminari", "~> 0.14.1"
48
46
  gem "da-js", "~> 0.1.0"
49
47
 
50
48
  # More optional gems that we use quite often
@@ -53,7 +51,7 @@ gem "da-js", "~> 0.1.0"
53
51
  # gem "carrierwave"
54
52
  # gem "devise"
55
53
  # gem "cancan"
56
-
54
+ # gem "fix_microsoft_links" # See https://github.com/spilliton/fix_microsoft_links
57
55
 
58
56
  ## RMagick as used by RefineryCMS, to make sure it works on Windows
59
57
  #rmagick_options = { :require => false }
@@ -65,15 +63,16 @@ gem "da-js", "~> 0.1.0"
65
63
  # RSpec needs to be in :development group to expose generators
66
64
  # and rake tasks without having to type RAILS_ENV=test.
67
65
  group :development, :test do
68
- gem "rspec-rails", "~> 2.6.0"
69
- gem "pry"
66
+ gem "rspec-rails", "~> 2.12.0"
67
+ gem "pry-rails", "~> 0.2.2"
68
+ gem "debugger", "~> 1.2.0"
70
69
  end
71
70
 
72
71
  group :test do
73
- gem "cucumber-rails"
74
- gem "factory_girl_rails", "~> 1.7" # newer versions require Ruby 1.9
75
- gem "capybara-webkit"
76
- gem "database_cleaner"
77
- gem "launchy"
78
- gem "timecop"
72
+ gem "steak", "~> 2.0.0"
73
+ gem "factory_girl_rails", "~> 4.1.0"
74
+ gem "capybara-webkit", "~> 0.13.0"
75
+ gem "database_cleaner", "~> 0.9.1"
76
+ gem "launchy", "~> 2.1.1"
77
+ gem "timecop", "~> 0.5.5"
79
78
  end
@@ -0,0 +1,12 @@
1
+ <%# Link to the "First" page
2
+ - available local variables
3
+ url: url to the first page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <%= content_tag :li, :class => "first #{'disabled' if current_page.first?}" do %>
10
+ <%# FIXME: In Bootstrap 2.1.0 it will be possible to use a span tag for disabled pagination links %>
11
+ <%= link_to t("views.pagination.first"), (current_page.first? ? "#" : url), :remote => remote %>
12
+ <% end %>
@@ -0,0 +1,11 @@
1
+ <%# Non-link tag that stands for skipped pages...
2
+ - available local variables
3
+ current_page: a page object for the currently displayed page
4
+ num_pages: total number of pages
5
+ per_page: number of items to fetch per page
6
+ remote: data-remote
7
+ -%>
8
+ <li class="page gap disabled">
9
+ <%# FIXME: In Bootstrap 2.1.0 it will be possible to use a span tag for disabled pagination links %>
10
+ <a href="#" onclick="return false;"><%=t "views.pagination.truncate" %></a>
11
+ </li>
@@ -0,0 +1,13 @@
1
+ <%# Link to the "Last" page
2
+ - available local variables
3
+ url: url to the last page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <%# "next" class present for border styling in twitter bootstrap %>
10
+ <%= content_tag :li, :class => "last next #{'disabled' if current_page.last?}" do %>
11
+ <%# FIXME: In Bootstrap 2.1.0 it will be possible to use a span tag for disabled pagination links %>
12
+ <%= link_to t("views.pagination.last"), (current_page.last? ? "#" : url), :remote => remote %>
13
+ <% end %>
@@ -0,0 +1,12 @@
1
+ <%# Link to the "Next" page
2
+ - available local variables
3
+ url: url to the next page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <%= content_tag :li, :class => "next #{'disabled' if current_page.last?}" do %>
10
+ <%# FIXME: In Bootstrap 2.1.0 it will be possible to use a span tag for disabled pagination links %>
11
+ <%= link_to t("views.pagination.next"), (current_page.last? ? "#" : url), :rel => "next", :remote => remote %>
12
+ <% end %>
@@ -0,0 +1,12 @@
1
+ <%# Link showing page number
2
+ - available local variables
3
+ page: a page object for "this" page
4
+ url: url to this page
5
+ current_page: a page object for the currently displayed page
6
+ num_pages: total number of pages
7
+ per_page: number of items to fetch per page
8
+ remote: data-remote
9
+ -%>
10
+ <%= content_tag :li, :class => "page #{'active' if page.current?}" do %>
11
+ <%= link_to page, url, :remote => remote, :rel => (page.next? ? 'next' : (page.prev? ? 'prev' : nil)) %>
12
+ <% end %>
@@ -0,0 +1,25 @@
1
+ <%# The container tag
2
+ - available local variables
3
+ current_page: a page object for the currently displayed page
4
+ num_pages: total number of pages
5
+ per_page: number of items to fetch per page
6
+ remote: data-remote
7
+ paginator: the paginator that renders the pagination tags inside
8
+ -%>
9
+ <%= paginator.render do -%>
10
+ <div class="pagination">
11
+ <ul>
12
+ <%= first_page_tag %>
13
+ <%= prev_page_tag %>
14
+ <% each_page do |page| -%>
15
+ <% if page.left_outer? || page.right_outer? || page.inside_window? -%>
16
+ <%= page_tag page %>
17
+ <% elsif !page.was_truncated? -%>
18
+ <%= gap_tag %>
19
+ <% end -%>
20
+ <% end -%>
21
+ <%= next_page_tag %>
22
+ <%= last_page_tag %>
23
+ </ul>
24
+ </div>
25
+ <% end -%>
@@ -0,0 +1,13 @@
1
+ <%# Link to the "Previous" page
2
+ - available local variables
3
+ url: url to the previous page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+
10
+ <%= content_tag :li, :class => "prev #{'disabled' if current_page.first?}" do %>
11
+ <%# FIXME: In Bootstrap 2.1.0 it will be possible to use a span tag for disabled pagination links %>
12
+ <%= link_to t("views.pagination.previous"), (current_page.first? ? "#" : url), :rel => "prev", :remote => remote %>
13
+ <% end %>
@@ -32,9 +32,9 @@ de:
32
32
  - Freitag
33
33
  - Samstag
34
34
  formats:
35
- default: ! '%d.%m.%Y'
36
- long: ! '%e. %B %Y'
37
- short: ! '%e. %b'
35
+ default: '%d.%m.%Y'
36
+ long: '%e. %B %Y'
37
+ short: '%e. %b'
38
38
  month_names:
39
39
  -
40
40
  - Jänner
@@ -79,16 +79,16 @@ de:
79
79
  other: mehr als %{count} Jahre
80
80
  x_days:
81
81
  one: ein Tag
82
- other: ! '%{count} Tage'
82
+ other: '%{count} Tage'
83
83
  x_minutes:
84
84
  one: eine Minute
85
- other: ! '%{count} Minuten'
85
+ other: '%{count} Minuten'
86
86
  x_months:
87
87
  one: ein Monat
88
- other: ! '%{count} Monate'
88
+ other: '%{count} Monate'
89
89
  x_seconds:
90
90
  one: eine Sekunde
91
- other: ! '%{count} Sekunden'
91
+ other: '%{count} Sekunden'
92
92
  prompts:
93
93
  day: Tag
94
94
  hour: Stunden
@@ -97,7 +97,7 @@ de:
97
97
  second: Sekunden
98
98
  year: Jahr
99
99
  errors:
100
- format: ! '%{attribute} %{message}'
100
+ format: '%{attribute} %{message}'
101
101
  messages:
102
102
  accepted: muss akzeptiert werden
103
103
  blank: muss ausgefüllt werden
@@ -115,42 +115,42 @@ de:
115
115
  not_a_number: ist keine Zahl
116
116
  not_an_integer: muss ganzzahlig sein
117
117
  odd: muss ungerade sein
118
- record_invalid: ! 'Gültigkeitsprüfung ist fehlgeschlagen: %{errors}'
118
+ record_invalid: 'Gültigkeitsprüfung ist fehlgeschlagen: %{errors}'
119
119
  taken: ist bereits vergeben
120
- too_long: ist zu lang (nicht mehr als %{count} Zeichen)
121
- too_short: ist zu kurz (nicht weniger als %{count} Zeichen)
120
+ too_long: ist zu lang (höchstens %{count} Zeichen)
121
+ too_short: ist zu kurz (mindestens %{count} Zeichen)
122
122
  wrong_length: hat die falsche Länge (muss genau %{count} Zeichen haben)
123
123
  template:
124
- body: ! 'Bitte überprüfen Sie die folgenden Felder:'
124
+ body: 'Bitte überprüfen Sie die folgenden Felder:'
125
125
  header:
126
- one: ! 'Konnte %{model} nicht speichern: ein Fehler.'
127
- other: ! 'Konnte %{model} nicht speichern: %{count} Fehler.'
126
+ one: 'Konnte %{model} nicht speichern: ein Fehler.'
127
+ other: 'Konnte %{model} nicht speichern: %{count} Fehler.'
128
128
  helpers:
129
129
  select:
130
130
  prompt: Bitte wählen
131
131
  submit:
132
- create: ! '%{model} erstellen'
133
- submit: ! '%{model} speichern'
134
- update: ! '%{model} aktualisieren'
132
+ create: '%{model} erstellen'
133
+ submit: '%{model} speichern'
134
+ update: '%{model} aktualisieren'
135
135
  number:
136
136
  currency:
137
137
  format:
138
138
  delimiter: .
139
- format: ! '%u %n'
139
+ format: '%u %n'
140
140
  precision: 2
141
- separator: ! ','
141
+ separator: ','
142
142
  significant: false
143
143
  strip_insignificant_zeros: false
144
144
  unit: €
145
145
  format:
146
146
  delimiter: .
147
147
  precision: 2
148
- separator: ! ','
148
+ separator: ','
149
149
  significant: false
150
150
  strip_insignificant_zeros: false
151
151
  human:
152
152
  decimal_units:
153
- format: ! '%n %u'
153
+ format: '%n %u'
154
154
  units:
155
155
  billion:
156
156
  one: Milliarde
@@ -168,7 +168,7 @@ de:
168
168
  significant: true
169
169
  strip_insignificant_zeros: true
170
170
  storage_units:
171
- format: ! '%n %u'
171
+ format: '%n %u'
172
172
  units:
173
173
  byte:
174
174
  one: Byte
@@ -177,21 +177,16 @@ de:
177
177
  kb: KB
178
178
  mb: MB
179
179
  tb: TB
180
- percentage:
181
- format:
182
- delimiter: ''
183
- precision:
184
- format:
185
- delimiter: ''
186
180
  support:
187
181
  array:
188
- last_word_connector: ! ' und '
189
- two_words_connector: ! ' und '
190
- words_connector: ! ', '
182
+ last_word_connector: ' und '
183
+ two_words_connector: ' und '
184
+ words_connector: ', '
191
185
  time:
192
186
  am: vormittags
193
187
  formats:
194
- default: ! '%A, %d. %B %Y, %H:%M Uhr'
195
- long: ! '%A, %d. %B %Y, %H:%M Uhr'
196
- short: ! '%d. %B, %H:%M Uhr'
197
- pm: nachmittags
188
+ default: '%A, %d. %B %Y, %H:%M Uhr'
189
+ long: '%A, %d. %B %Y, %H:%M Uhr'
190
+ short: '%d. %B, %H:%M Uhr'
191
+ compact: '%d.%m. %H:%M'
192
+ pm: nachmittags
@@ -0,0 +1,8 @@
1
+ de:
2
+ views:
3
+ pagination:
4
+ first: "«"
5
+ last: "»"
6
+ previous: "‹"
7
+ next: "›"
8
+ truncate: "…"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: da-suspenders
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 2.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,33 +10,43 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-06-14 00:00:00.000000000 Z
13
+ date: 2012-12-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
17
- requirement: &70165356037060 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
- - - =
20
+ - - '='
21
21
  - !ruby/object:Gem::Version
22
- version: 3.2.6
22
+ version: 3.2.9
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70165356037060
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - '='
29
+ - !ruby/object:Gem::Version
30
+ version: 3.2.9
26
31
  - !ruby/object:Gem::Dependency
27
32
  name: bundler
28
- requirement: &70165356036340 !ruby/object:Gem::Requirement
33
+ requirement: !ruby/object:Gem::Requirement
29
34
  none: false
30
35
  requirements:
31
36
  - - ! '>='
32
37
  - !ruby/object:Gem::Version
33
- version: 1.0.10
38
+ version: 1.2.1
34
39
  type: :runtime
35
40
  prerelease: false
36
- version_requirements: *70165356036340
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: 1.2.1
37
47
  - !ruby/object:Gem::Dependency
38
48
  name: trout
39
- requirement: &70165356035620 !ruby/object:Gem::Requirement
49
+ requirement: !ruby/object:Gem::Requirement
40
50
  none: false
41
51
  requirements:
42
52
  - - ~>
@@ -44,10 +54,15 @@ dependencies:
44
54
  version: '0.3'
45
55
  type: :runtime
46
56
  prerelease: false
47
- version_requirements: *70165356035620
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ~>
61
+ - !ruby/object:Gem::Version
62
+ version: '0.3'
48
63
  - !ruby/object:Gem::Dependency
49
64
  name: rake
50
- requirement: &70165356035160 !ruby/object:Gem::Requirement
65
+ requirement: !ruby/object:Gem::Requirement
51
66
  none: false
52
67
  requirements:
53
68
  - - ~>
@@ -55,29 +70,28 @@ dependencies:
55
70
  version: 0.9.2
56
71
  type: :development
57
72
  prerelease: false
58
- version_requirements: *70165356035160
59
- - !ruby/object:Gem::Dependency
60
- name: cucumber
61
- requirement: &70165356034780 !ruby/object:Gem::Requirement
73
+ version_requirements: !ruby/object:Gem::Requirement
62
74
  none: false
63
75
  requirements:
64
- - - ! '>='
76
+ - - ~>
65
77
  - !ruby/object:Gem::Version
66
- version: '0'
67
- type: :development
68
- prerelease: false
69
- version_requirements: *70165356034780
78
+ version: 0.9.2
70
79
  - !ruby/object:Gem::Dependency
71
- name: rspec-expectations
72
- requirement: &70165356016020 !ruby/object:Gem::Requirement
80
+ name: rspec
81
+ requirement: !ruby/object:Gem::Requirement
73
82
  none: false
74
83
  requirements:
75
- - - ! '>='
84
+ - - ~>
76
85
  - !ruby/object:Gem::Version
77
- version: '0'
86
+ version: 2.11.0
78
87
  type: :development
79
88
  prerelease: false
80
- version_requirements: *70165356016020
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ~>
93
+ - !ruby/object:Gem::Version
94
+ version: 2.11.0
81
95
  description: DIE ANTWORT's fork of thoughtbot's original Suspenders. Suspenders is
82
96
  an upgradeable base Rails project.
83
97
  email: stefan@die-antwort.eu
@@ -89,6 +103,7 @@ extra_rdoc_files:
89
103
  - LICENSE
90
104
  files:
91
105
  - .gitignore
106
+ - .rspec
92
107
  - CHANGELOG.md
93
108
  - Gemfile
94
109
  - LICENSE
@@ -96,28 +111,31 @@ files:
96
111
  - Rakefile
97
112
  - bin/da-suspenders
98
113
  - da-suspenders.gemspec
99
- - features/running_cucumber.feature
100
- - features/step_definitions/shell.rb
101
- - features/support/env.rb
102
114
  - lib/create.rb
103
115
  - lib/da-suspenders/version.rb
104
116
  - lib/errors.rb
117
+ - spec/test_project_spec.rb
105
118
  - template/da-suspenders.rb
106
- - template/files/factory_girl_steps.rb
107
119
  - template/files/mysql_database.yml.erb
108
120
  - template/trout/Gemfile
109
121
  - template/trout/app/assets/javascripts/application.js.coffee
110
122
  - template/trout/app/assets/stylesheets/application.css.scss
111
123
  - template/trout/app/helpers/body_class_helper.rb
112
124
  - template/trout/app/helpers/bootstrap_helper.rb
125
+ - template/trout/app/views/kaminari/_first_page.html.erb
126
+ - template/trout/app/views/kaminari/_gap.html.erb
127
+ - template/trout/app/views/kaminari/_last_page.html.erb
128
+ - template/trout/app/views/kaminari/_next_page.html.erb
129
+ - template/trout/app/views/kaminari/_page.html.erb
130
+ - template/trout/app/views/kaminari/_paginator.html.erb
131
+ - template/trout/app/views/kaminari/_prev_page.html.erb
113
132
  - template/trout/app/views/layouts/application.html.erb
114
133
  - template/trout/app/views/shared/_flashes.html.erb
115
134
  - template/trout/config/initializers/errors.rb
116
135
  - template/trout/config/initializers/localize_with_fallback.rb
117
136
  - template/trout/config/initializers/silence_asset_logging.rb
118
- - template/trout/config/initializers/will_paginate.rb
119
137
  - template/trout/config/locales/de.yml
120
- - template/trout/features/step_definitions/js_steps.rb
138
+ - template/trout/config/locales/kaminari.de.yml
121
139
  - template/trout/lib/templates/rails/scaffold_controller/controller.rb
122
140
  - template/trout/vendor/assets/javascripts/modernizr.js
123
141
  homepage: http://github.com/die-antwort/da-suspenders
@@ -141,11 +159,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
159
  version: 1.3.6
142
160
  requirements: []
143
161
  rubyforge_project:
144
- rubygems_version: 1.8.11
162
+ rubygems_version: 1.8.24
145
163
  signing_key:
146
164
  specification_version: 3
147
165
  summary: Generate a Rails app using DIE ANTWORT's best practices.
148
- test_files:
149
- - features/running_cucumber.feature
150
- - features/step_definitions/shell.rb
151
- - features/support/env.rb
166
+ test_files: []
167
+ has_rdoc:
@@ -1,45 +0,0 @@
1
- Feature: Running cucumber in the generated project
2
-
3
- Background:
4
- Given I have a clean environment
5
-
6
- Scenario: The generated project works correctly
7
- Given I drop and create the required databases
8
- And I generate "scaffold user username:string"
9
- And I run the rake task "db:migrate"
10
- And I create a file named "features/test.feature" with:
11
- """
12
- Feature: The application works correctly
13
-
14
- @javascript
15
- Scenario: jQuery and Modernizr work correctly
16
- When I visit the users page
17
- Then the javascript expression "$('html').hasClass('js')" should return "true"
18
- And the javascript expression "$('html').hasClass('no-js')" should return "false"
19
-
20
- Scenario: Stylesheets are generated correctly
21
- Given there are no cached assets
22
- When I visit the application stylesheet
23
- Then it should contain bootstrap
24
- """
25
- And I create a file named "features/step_definitions/test_steps.rb" with:
26
- """
27
- When /^I visit the users page/ do
28
- visit "/users"
29
- end
30
-
31
- Given /^there are no cached assets$/ do
32
- FileUtils.rm_rf ["#{Rails.root}/tmp/cache/assets", "#{Rails.root}/tmp/cache/sass"]
33
- end
34
-
35
- When /^I visit the application stylesheet$/ do
36
- visit "/assets/application.css"
37
- end
38
-
39
- Then /^it should contain bootstrap$/ do
40
- page.should have_content "/bootstrap-sass-2."
41
- end
42
- """
43
- When I run the rake task "cucumber"
44
- Then I see a successful response in the shell
45
-
@@ -1,34 +0,0 @@
1
- Given 'I have a clean environment' do
2
- # Make sure to have a non-bundled ENV, even when running via "bundle exec cucumber ..."
3
- ENV["RUBYOPT"] = nil
4
- ENV["BUNDLE_GEMFILE"] = nil
5
- end
6
-
7
- When 'I run the rake task "$task_name"' do |task_name|
8
- Dir.chdir('test_project') do
9
- system("bundle exec rake #{task_name}")
10
- end
11
- end
12
-
13
- When 'I generate "$generator_with_args"' do |generator_with_args|
14
- Dir.chdir('test_project') do
15
- system("rails generate #{generator_with_args}")
16
- end
17
- end
18
-
19
- When 'I create a file named "$filename" with:' do |filename, content|
20
- File.open("test_project/#{filename}", "w") do |file|
21
- file.write(content)
22
- end
23
- end
24
-
25
- Then 'I see a successful response in the shell' do
26
- $?.to_i.should == 0
27
- end
28
-
29
- When 'I drop and create the required databases' do
30
- Dir.chdir('test_project') do
31
- system("bundle exec rake db:drop")
32
- system("bundle exec rake db:create")
33
- end
34
- end
File without changes
@@ -1 +0,0 @@
1
- require 'factory_girl/step_definitions'
@@ -1,4 +0,0 @@
1
- WillPaginate::ViewHelpers.pagination_options.merge!(
2
- :previous_label => '« Vorige Seite',
3
- :next_label => 'Nächste Seite »'
4
- )
@@ -1,3 +0,0 @@
1
- Then 'the javascript expression "$expression" should return "$result"' do |expression, result|
2
- page.evaluate_script(expression).to_s.should == result
3
- end