rails_magic_renamer 2.0.0.pre.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/.ruby-version +1 -0
- data/.travis.yml +6 -0
- data/CHANGELOG +4 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +173 -0
- data/Guardfile +11 -0
- data/Manifest +8 -0
- data/README.md +59 -0
- data/ROADMAP.md +60 -0
- data/Rakefile +2 -0
- data/lib/rails_magic_renamer.rb +343 -0
- data/lib/rails_magic_renamer/exceptions.rb +35 -0
- data/lib/rails_magic_renamer/version.rb +3 -0
- data/rails_magic_renamer.gemspec +36 -0
- data/spec/rails_helper.rb +26 -0
- data/spec/rails_magic_renamer_spec.rb +22 -0
- data/spec/spec_helper.rb +17 -0
- data/spec/support/sample_app_rails_4/.gitignore +19 -0
- data/spec/support/sample_app_rails_4/.rspec +2 -0
- data/spec/support/sample_app_rails_4/Gemfile +58 -0
- data/spec/support/sample_app_rails_4/Gemfile.lock +249 -0
- data/spec/support/sample_app_rails_4/Guardfile +53 -0
- data/spec/support/sample_app_rails_4/LICENSE +21 -0
- data/spec/support/sample_app_rails_4/README.md +25 -0
- data/spec/support/sample_app_rails_4/README.nitrous.md +20 -0
- data/spec/support/sample_app_rails_4/Rakefile +6 -0
- data/spec/support/sample_app_rails_4/app/assets/images/rails.png +0 -0
- data/spec/support/sample_app_rails_4/app/assets/javascripts/application.js +17 -0
- data/spec/support/sample_app_rails_4/app/assets/javascripts/sessions.js.coffee +3 -0
- data/spec/support/sample_app_rails_4/app/assets/javascripts/static_pages.js.coffee +3 -0
- data/spec/support/sample_app_rails_4/app/assets/javascripts/users.js.coffee +3 -0
- data/spec/support/sample_app_rails_4/app/assets/stylesheets/application.css +13 -0
- data/spec/support/sample_app_rails_4/app/assets/stylesheets/custom.css.scss +246 -0
- data/spec/support/sample_app_rails_4/app/assets/stylesheets/sessions.css.scss +3 -0
- data/spec/support/sample_app_rails_4/app/assets/stylesheets/static_pages.css.scss +3 -0
- data/spec/support/sample_app_rails_4/app/assets/stylesheets/users.css.scss +3 -0
- data/spec/support/sample_app_rails_4/app/controllers/application_controller.rb +6 -0
- data/spec/support/sample_app_rails_4/app/controllers/concerns/.keep +0 -0
- data/spec/support/sample_app_rails_4/app/controllers/microposts_controller.rb +31 -0
- data/spec/support/sample_app_rails_4/app/controllers/relationships_controller.rb +21 -0
- data/spec/support/sample_app_rails_4/app/controllers/sessions_controller.rb +21 -0
- data/spec/support/sample_app_rails_4/app/controllers/static_pages_controller.rb +18 -0
- data/spec/support/sample_app_rails_4/app/controllers/users_controller.rb +80 -0
- data/spec/support/sample_app_rails_4/app/helpers/application_helper.rb +12 -0
- data/spec/support/sample_app_rails_4/app/helpers/sessions_helper.rb +49 -0
- data/spec/support/sample_app_rails_4/app/helpers/static_pages_helper.rb +2 -0
- data/spec/support/sample_app_rails_4/app/helpers/users_helper.rb +10 -0
- data/spec/support/sample_app_rails_4/app/mailers/.keep +0 -0
- data/spec/support/sample_app_rails_4/app/models/.keep +0 -0
- data/spec/support/sample_app_rails_4/app/models/comment.rb +5 -0
- data/spec/support/sample_app_rails_4/app/models/concerns/.keep +0 -0
- data/spec/support/sample_app_rails_4/app/models/micropost.rb +14 -0
- data/spec/support/sample_app_rails_4/app/models/organisation.rb +3 -0
- data/spec/support/sample_app_rails_4/app/models/relationship.rb +6 -0
- data/spec/support/sample_app_rails_4/app/models/user.rb +57 -0
- data/spec/support/sample_app_rails_4/app/models/user_comment.rb +5 -0
- data/spec/support/sample_app_rails_4/app/views/layouts/_footer.html.erb +13 -0
- data/spec/support/sample_app_rails_4/app/views/layouts/_header.html.erb +31 -0
- data/spec/support/sample_app_rails_4/app/views/layouts/_shim.html.erb +3 -0
- data/spec/support/sample_app_rails_4/app/views/layouts/application.html.erb +22 -0
- data/spec/support/sample_app_rails_4/app/views/microposts/_micropost.html.erb +11 -0
- data/spec/support/sample_app_rails_4/app/views/relationships/create.js.erb +2 -0
- data/spec/support/sample_app_rails_4/app/views/relationships/destroy.js.erb +2 -0
- data/spec/support/sample_app_rails_4/app/views/sessions/new.html.erb +19 -0
- data/spec/support/sample_app_rails_4/app/views/shared/_error_messages.html.erb +12 -0
- data/spec/support/sample_app_rails_4/app/views/shared/_feed.html.erb +6 -0
- data/spec/support/sample_app_rails_4/app/views/shared/_feed_item.html.erb +15 -0
- data/spec/support/sample_app_rails_4/app/views/shared/_micropost_form.html.erb +7 -0
- data/spec/support/sample_app_rails_4/app/views/shared/_stats.html.erb +15 -0
- data/spec/support/sample_app_rails_4/app/views/shared/_user_info.html.erb +12 -0
- data/spec/support/sample_app_rails_4/app/views/static_pages/about.html.erb +8 -0
- data/spec/support/sample_app_rails_4/app/views/static_pages/contact.html.erb +6 -0
- data/spec/support/sample_app_rails_4/app/views/static_pages/help.html.erb +8 -0
- data/spec/support/sample_app_rails_4/app/views/static_pages/home.html.erb +34 -0
- data/spec/support/sample_app_rails_4/app/views/static_pages/show.html.erb +0 -0
- data/spec/support/sample_app_rails_4/app/views/users/_follow.html.erb +5 -0
- data/spec/support/sample_app_rails_4/app/views/users/_follow_form.html.erb +9 -0
- data/spec/support/sample_app_rails_4/app/views/users/_unfollow.html.erb +5 -0
- data/spec/support/sample_app_rails_4/app/views/users/_user.html.erb +8 -0
- data/spec/support/sample_app_rails_4/app/views/users/edit.html.erb +27 -0
- data/spec/support/sample_app_rails_4/app/views/users/index.html.erb +10 -0
- data/spec/support/sample_app_rails_4/app/views/users/new.html.erb +24 -0
- data/spec/support/sample_app_rails_4/app/views/users/show.html.erb +24 -0
- data/spec/support/sample_app_rails_4/app/views/users/show_follow.html.erb +30 -0
- data/spec/support/sample_app_rails_4/bin/bundle +3 -0
- data/spec/support/sample_app_rails_4/bin/rails +4 -0
- data/spec/support/sample_app_rails_4/bin/rake +4 -0
- data/spec/support/sample_app_rails_4/config.ru +4 -0
- data/spec/support/sample_app_rails_4/config/application.rb +31 -0
- data/spec/support/sample_app_rails_4/config/boot.rb +4 -0
- data/spec/support/sample_app_rails_4/config/cucumber.yml +8 -0
- data/spec/support/sample_app_rails_4/config/database.yml +12 -0
- data/spec/support/sample_app_rails_4/config/environment.rb +7 -0
- data/spec/support/sample_app_rails_4/config/environments/development.rb +27 -0
- data/spec/support/sample_app_rails_4/config/environments/production.rb +79 -0
- data/spec/support/sample_app_rails_4/config/environments/test.rb +39 -0
- data/spec/support/sample_app_rails_4/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/support/sample_app_rails_4/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/support/sample_app_rails_4/config/initializers/inflections.rb +16 -0
- data/spec/support/sample_app_rails_4/config/initializers/mime_types.rb +5 -0
- data/spec/support/sample_app_rails_4/config/initializers/secret_token.rb +22 -0
- data/spec/support/sample_app_rails_4/config/initializers/session_store.rb +3 -0
- data/spec/support/sample_app_rails_4/config/initializers/wrap_parameters.rb +14 -0
- data/spec/support/sample_app_rails_4/config/locales/en.yml +23 -0
- data/spec/support/sample_app_rails_4/config/routes.rb +17 -0
- data/spec/support/sample_app_rails_4/db/development.sqlite3 +0 -0
- data/spec/support/sample_app_rails_4/db/migrate/20130311191400_create_users.rb +10 -0
- data/spec/support/sample_app_rails_4/db/migrate/20130311194153_add_index_to_users_email.rb +5 -0
- data/spec/support/sample_app_rails_4/db/migrate/20130311201841_add_password_digest_to_users.rb +5 -0
- data/spec/support/sample_app_rails_4/db/migrate/20130314184954_add_remember_token_to_users.rb +6 -0
- data/spec/support/sample_app_rails_4/db/migrate/20130315015932_add_admin_to_users.rb +5 -0
- data/spec/support/sample_app_rails_4/db/migrate/20130315175534_create_microposts.rb +11 -0
- data/spec/support/sample_app_rails_4/db/migrate/20130315230445_create_relationships.rb +13 -0
- data/spec/support/sample_app_rails_4/db/migrate/20160424113439_create_comments.rb +8 -0
- data/spec/support/sample_app_rails_4/db/migrate/20160424113451_create_user_comments.rb +8 -0
- data/spec/support/sample_app_rails_4/db/migrate/20160424114701_create_organisations.rb +8 -0
- data/spec/support/sample_app_rails_4/db/migrate/20160424114727_add_organisation_id_to_users.rb +5 -0
- data/spec/support/sample_app_rails_4/db/schema.rb +67 -0
- data/spec/support/sample_app_rails_4/db/seeds.rb +7 -0
- data/spec/support/sample_app_rails_4/db/test.sqlite3 +0 -0
- data/spec/support/sample_app_rails_4/factory_girl.rb +7 -0
- data/spec/support/sample_app_rails_4/features/signing_in.feature +13 -0
- data/spec/support/sample_app_rails_4/features/step_definitions/authentication_steps.rb +30 -0
- data/spec/support/sample_app_rails_4/features/support/env.rb +59 -0
- data/spec/support/sample_app_rails_4/lib/assets/.keep +0 -0
- data/spec/support/sample_app_rails_4/lib/tasks/.keep +0 -0
- data/spec/support/sample_app_rails_4/lib/tasks/cucumber.rake +65 -0
- data/spec/support/sample_app_rails_4/lib/tasks/sample_data.rake +42 -0
- data/spec/support/sample_app_rails_4/log/.keep +0 -0
- data/spec/support/sample_app_rails_4/public/404.html +27 -0
- data/spec/support/sample_app_rails_4/public/422.html +26 -0
- data/spec/support/sample_app_rails_4/public/500.html +26 -0
- data/spec/support/sample_app_rails_4/public/assets/application-4962059d8f80f9bb096692bacc29c4e8.css +5091 -0
- data/spec/support/sample_app_rails_4/public/assets/application-4962059d8f80f9bb096692bacc29c4e8.css.gz +0 -0
- data/spec/support/sample_app_rails_4/public/assets/application-eeb856e3fe2c8f879c91d0e81d59cb40.js +12952 -0
- data/spec/support/sample_app_rails_4/public/assets/application-eeb856e3fe2c8f879c91d0e81d59cb40.js.gz +0 -0
- data/spec/support/sample_app_rails_4/public/assets/glyphicons-halflings-c806376f05e4ccabe2c5315a8e95667c.png +0 -0
- data/spec/support/sample_app_rails_4/public/assets/glyphicons-halflings-white-62b67d9edee3db90d18833087f848d6e.png +0 -0
- data/spec/support/sample_app_rails_4/public/assets/manifest-802de9eb1c853769101852422b620883.json +1 -0
- data/spec/support/sample_app_rails_4/public/assets/rails-231a680f23887d9dd70710ea5efd3c62.png +0 -0
- data/spec/support/sample_app_rails_4/public/favicon.ico +0 -0
- data/spec/support/sample_app_rails_4/public/robots.txt +5 -0
- data/spec/support/sample_app_rails_4/script/cucumber +10 -0
- data/spec/support/sample_app_rails_4/spec/controllers/relationships_controller_spec.rb +42 -0
- data/spec/support/sample_app_rails_4/spec/factories.rb +17 -0
- data/spec/support/sample_app_rails_4/spec/features/authentication_pages_spec.rb +155 -0
- data/spec/support/sample_app_rails_4/spec/features/micropost_pages_spec.rb +45 -0
- data/spec/support/sample_app_rails_4/spec/features/static_pages_spec.rb +64 -0
- data/spec/support/sample_app_rails_4/spec/features/user_pages_spec.rb +239 -0
- data/spec/support/sample_app_rails_4/spec/helpers/application_helper_spec.rb +18 -0
- data/spec/support/sample_app_rails_4/spec/models/comments_spec.rb +5 -0
- data/spec/support/sample_app_rails_4/spec/models/micropost_spec.rb +30 -0
- data/spec/support/sample_app_rails_4/spec/models/organisation_spec.rb +5 -0
- data/spec/support/sample_app_rails_4/spec/models/relationship_spec.rb +36 -0
- data/spec/support/sample_app_rails_4/spec/models/user_comments_spec.rb +5 -0
- data/spec/support/sample_app_rails_4/spec/models/user_spec.rb +108 -0
- data/spec/support/sample_app_rails_4/spec/spec_helper.rb +57 -0
- data/spec/support/sample_app_rails_4/spec/support/utilities.rb +21 -0
- data/spec/support/sample_app_rails_4/vendor/assets/javascripts/.keep +0 -0
- data/spec/support/sample_app_rails_4/vendor/assets/stylesheets/.keep +0 -0
- data/tasks/rspec.rake +4 -0
- metadata +534 -0
@@ -0,0 +1,11 @@
|
|
1
|
+
<li>
|
2
|
+
<span class="content"><%= micropost.content %></span>
|
3
|
+
<span class="timestamp">
|
4
|
+
Posted <%= time_ago_in_words(micropost.created_at) %> ago.
|
5
|
+
</span>
|
6
|
+
<% if current_user?(micropost.user) %>
|
7
|
+
<%= link_to "delete", micropost, method: :delete,
|
8
|
+
data: { confirm: "You sure?" },
|
9
|
+
title: micropost.content %>
|
10
|
+
<% end %>
|
11
|
+
</li>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<% provide(:title, "Sign in") %>
|
2
|
+
<h1>Sign in</h1>
|
3
|
+
|
4
|
+
<div class="row">
|
5
|
+
<div class="span6 offset3">
|
6
|
+
<%= form_for(:session, url: sessions_path) do |f| %>
|
7
|
+
|
8
|
+
<%= f.label :email %>
|
9
|
+
<%= f.text_field :email %>
|
10
|
+
|
11
|
+
<%= f.label :password %>
|
12
|
+
<%= f.password_field :password %>
|
13
|
+
|
14
|
+
<%= f.submit "Sign in", class: "btn btn-large btn-primary" %>
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
<p>New user? <%= link_to "Sign up now!", signup_path %></p>
|
18
|
+
</div>
|
19
|
+
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<% if object.errors.any? %>
|
2
|
+
<div id="error_explanation">
|
3
|
+
<div class="alert alert-error">
|
4
|
+
The form contains <%= pluralize(object.errors.count, "error") %>.
|
5
|
+
</div>
|
6
|
+
<ul>
|
7
|
+
<% object.errors.full_messages.each do |msg| %>
|
8
|
+
<li>* <%= msg %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<li id="<%= feed_item.id %>">
|
2
|
+
<%= link_to gravatar_for(feed_item.user), feed_item.user %>
|
3
|
+
<span class="user">
|
4
|
+
<%= link_to feed_item.user.name, feed_item.user %>
|
5
|
+
</span>
|
6
|
+
<span class="content"><%= feed_item.content %></span>
|
7
|
+
<span class="timestamp">
|
8
|
+
Posted <%= time_ago_in_words(feed_item.created_at) %> ago.
|
9
|
+
</span>
|
10
|
+
<% if current_user?(feed_item.user) %>
|
11
|
+
<%= link_to "delete", feed_item, method: :delete,
|
12
|
+
data: { confirm: "You sure?" },
|
13
|
+
title: feed_item.content %>
|
14
|
+
<% end %>
|
15
|
+
</li>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% @user ||= current_user %>
|
2
|
+
<div class="stats">
|
3
|
+
<a href="<%= following_user_path(@user) %>">
|
4
|
+
<strong id="following" class="stat">
|
5
|
+
<%= @user.followed_users.count %>
|
6
|
+
</strong>
|
7
|
+
following
|
8
|
+
</a>
|
9
|
+
<a href="<%= followers_user_path(@user) %>">
|
10
|
+
<strong id="followers" class="stat">
|
11
|
+
<%= @user.followers.count %>
|
12
|
+
</strong>
|
13
|
+
followers
|
14
|
+
</a>
|
15
|
+
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<a href="<%= user_path(current_user) %>">
|
2
|
+
<%= gravatar_for current_user, size: 52 %>
|
3
|
+
</a>
|
4
|
+
<h1>
|
5
|
+
<%= current_user.name %>
|
6
|
+
</h1>
|
7
|
+
<span>
|
8
|
+
<%= link_to "view my profile", current_user %>
|
9
|
+
</span>
|
10
|
+
<span>
|
11
|
+
<%= pluralize(current_user.microposts.count, "micropost") %>
|
12
|
+
</span>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% provide(:title, 'About Us') %>
|
2
|
+
<h1>About Us</h1>
|
3
|
+
<p>
|
4
|
+
The <a href="http://railstutorial.org/">Ruby on Rails Tutorial</a>
|
5
|
+
is a project to make a book and screencasts to teach web development
|
6
|
+
with <a href="http://rubyonrails.org/">Ruby on Rails</a>. This
|
7
|
+
is the sample application for the tutorial.
|
8
|
+
</p>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% provide(:title, 'Help') %>
|
2
|
+
<h1>Help</h1>
|
3
|
+
<p>
|
4
|
+
Get help on the Ruby on Rails Tutorial at the
|
5
|
+
<a href="http://railstutorial.org/help">Rails Tutorial help page</a>.
|
6
|
+
To get help on this sample app, see the
|
7
|
+
<a href="http://railstutorial.org/book">Rails Tutorial book</a>.
|
8
|
+
</p>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<% if signed_in? %>
|
2
|
+
<div class="row">
|
3
|
+
<aside class="span4">
|
4
|
+
<section>
|
5
|
+
<%= render 'shared/user_info' %>
|
6
|
+
</section>
|
7
|
+
<section>
|
8
|
+
<%= render 'shared/stats' %>
|
9
|
+
</section>
|
10
|
+
<section>
|
11
|
+
<%= render 'shared/micropost_form' %>
|
12
|
+
</section>
|
13
|
+
</aside>
|
14
|
+
<div class="span8">
|
15
|
+
<h3>Micropost Feed</h3>
|
16
|
+
<%= render 'shared/feed' %>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<% else %>
|
20
|
+
<div class="center hero-unit">
|
21
|
+
<h1>Welcome to the Sample App</h1>
|
22
|
+
|
23
|
+
<h2>
|
24
|
+
This is the home page for the
|
25
|
+
<a href="http://railstutorial.org/">Ruby on Rails Tutorial</a>
|
26
|
+
sample application.
|
27
|
+
</h2>
|
28
|
+
|
29
|
+
<%= link_to "Sign up now!", signup_path,
|
30
|
+
class: "btn btn-large btn-primary" %>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<%= link_to image_tag("rails.png", alt: "Rails"), 'http://rubyonrails.org/' %>
|
34
|
+
<% end %>
|
File without changes
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<% provide(:title, "Edit user") %>
|
2
|
+
<h1>Update your profile</h1>
|
3
|
+
|
4
|
+
<div class="row">
|
5
|
+
<div class="span6 offset3">
|
6
|
+
<%= form_for(@user) do |f| %>
|
7
|
+
<%= render 'shared/error_messages', object: f.object %>
|
8
|
+
|
9
|
+
<%= f.label :name %>
|
10
|
+
<%= f.text_field :name %>
|
11
|
+
|
12
|
+
<%= f.label :email %>
|
13
|
+
<%= f.text_field :email %>
|
14
|
+
|
15
|
+
<%= f.label :password %>
|
16
|
+
<%= f.password_field :password %>
|
17
|
+
|
18
|
+
<%= f.label :password_confirmation, "Confirm Password" %>
|
19
|
+
<%= f.password_field :password_confirmation %>
|
20
|
+
|
21
|
+
<%= f.submit "Save changes", class: "btn btn-large btn-primary" %>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<%= gravatar_for @user %>
|
25
|
+
<a href="http://gravatar.com/emails">change</a>
|
26
|
+
</div>
|
27
|
+
</div>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<% provide(:title, 'Sign up') %>
|
2
|
+
<h1>Sign up</h1>
|
3
|
+
|
4
|
+
<div class="row">
|
5
|
+
<div class="span6 offset3">
|
6
|
+
<%= form_for(@user) do |f| %>
|
7
|
+
<%= render 'shared/error_messages', object: f.object %>
|
8
|
+
|
9
|
+
<%= f.label :name %>
|
10
|
+
<%= f.text_field :name %>
|
11
|
+
|
12
|
+
<%= f.label :email %>
|
13
|
+
<%= f.text_field :email %>
|
14
|
+
|
15
|
+
<%= f.label :password %>
|
16
|
+
<%= f.password_field :password %>
|
17
|
+
|
18
|
+
<%= f.label :password_confirmation, "Confirmation" %>
|
19
|
+
<%= f.password_field :password_confirmation %>
|
20
|
+
|
21
|
+
<%= f.submit "Create my account", class: "btn btn-large btn-primary" %>
|
22
|
+
<% end %>
|
23
|
+
</div>
|
24
|
+
</div>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<% provide(:title, @user.name) %>
|
2
|
+
<div class="row">
|
3
|
+
<aside class="span4">
|
4
|
+
<section>
|
5
|
+
<h1>
|
6
|
+
<%= gravatar_for @user %>
|
7
|
+
<%= @user.name %>
|
8
|
+
</h1>
|
9
|
+
</section>
|
10
|
+
<section>
|
11
|
+
<%= render 'shared/stats' %>
|
12
|
+
</section>
|
13
|
+
</aside>
|
14
|
+
<div class="span8">
|
15
|
+
<%= render 'follow_form' if signed_in? %>
|
16
|
+
<% if @user.microposts.any? %>
|
17
|
+
<h3>Microposts (<%= @user.microposts.count %>)</h3>
|
18
|
+
<ol class="microposts">
|
19
|
+
<%= render @microposts %>
|
20
|
+
</ol>
|
21
|
+
<%= will_paginate @microposts %>
|
22
|
+
<% end %>
|
23
|
+
</div>
|
24
|
+
</div>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<% provide(:title, @title) %>
|
2
|
+
<div class="row">
|
3
|
+
<aside class="span4">
|
4
|
+
<section>
|
5
|
+
<%= gravatar_for @user %>
|
6
|
+
<h1><%= @user.name %></h1>
|
7
|
+
<span><%= link_to "view my profile", @user %></span>
|
8
|
+
<span><b>Microposts:</b> <%= @user.microposts.count %></span>
|
9
|
+
</section>
|
10
|
+
<section>
|
11
|
+
<%= render 'shared/stats' %>
|
12
|
+
<% if @users.any? %>
|
13
|
+
<div class="user_avatars">
|
14
|
+
<% @users.each do |user| %>
|
15
|
+
<%= link_to gravatar_for(user, size: 30), user %>
|
16
|
+
<% end %>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
19
|
+
</section>
|
20
|
+
</aside>
|
21
|
+
<div class="span8">
|
22
|
+
<h3><%= @title %></h3>
|
23
|
+
<% if @users.any? %>
|
24
|
+
<ul class="users">
|
25
|
+
<%= render @users %>
|
26
|
+
</ul>
|
27
|
+
<%= will_paginate %>
|
28
|
+
<% end %>
|
29
|
+
</div>
|
30
|
+
</div>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
# Pick the frameworks you want:
|
4
|
+
require "active_record/railtie"
|
5
|
+
require "action_controller/railtie"
|
6
|
+
require "action_mailer/railtie"
|
7
|
+
require "sprockets/railtie"
|
8
|
+
# require "rails/test_unit/railtie"
|
9
|
+
|
10
|
+
# Assets should be precompiled for production (so we don't need the gems loaded then)
|
11
|
+
Bundler.require(*Rails.groups(assets: %w(development test)))
|
12
|
+
|
13
|
+
module SampleApp
|
14
|
+
class Application < Rails::Application
|
15
|
+
# Settings in config/environments/* take precedence over those specified here.
|
16
|
+
# Application configuration should go into files in config/initializers
|
17
|
+
# -- all .rb files in that directory are automatically loaded.
|
18
|
+
|
19
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
20
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
21
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
22
|
+
|
23
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
24
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
25
|
+
# config.i18n.default_locale = :de
|
26
|
+
# I18n.enforce_available_locales = true
|
27
|
+
I18n.enforce_available_locales = true
|
28
|
+
|
29
|
+
config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif)
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%
|
2
|
+
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
|
3
|
+
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
|
4
|
+
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
|
5
|
+
%>
|
6
|
+
default: <%= std_opts %> features
|
7
|
+
wip: --tags @wip:3 --wip features
|
8
|
+
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
|