active_mocker 1.2.pre → 1.2.pre.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/lib/active_mocker/version.rb +1 -1
  3. data/sample_app_rails_4/.idea/.generators +8 -0
  4. data/sample_app_rails_4/.idea/.name +1 -0
  5. data/sample_app_rails_4/.idea/.rakeTasks +7 -0
  6. data/sample_app_rails_4/.idea/dataSources.ids +141 -0
  7. data/sample_app_rails_4/.idea/dataSources.xml +36 -0
  8. data/sample_app_rails_4/.idea/dictionaries/zeisler.xml +3 -0
  9. data/sample_app_rails_4/.idea/encodings.xml +5 -0
  10. data/sample_app_rails_4/.idea/inspectionProfiles/Project_Default.xml +20 -0
  11. data/sample_app_rails_4/.idea/inspectionProfiles/profiles_settings.xml +7 -0
  12. data/sample_app_rails_4/.idea/misc.xml +5 -0
  13. data/sample_app_rails_4/.idea/modules.xml +10 -0
  14. data/sample_app_rails_4/.idea/runConfigurations/Development__sample_app_rails_4.xml +28 -0
  15. data/sample_app_rails_4/.idea/runConfigurations/Production__sample_app_rails_4.xml +28 -0
  16. data/sample_app_rails_4/.idea/runConfigurations/spec__sample_app_rails_4.xml +26 -0
  17. data/sample_app_rails_4/.idea/runConfigurations/test__sample_app_rails_4.xml +28 -0
  18. data/sample_app_rails_4/.idea/sample_app_rails_4.iml +262 -0
  19. data/sample_app_rails_4/.idea/scopes/scope_settings.xml +5 -0
  20. data/sample_app_rails_4/.idea/vcs.xml +7 -0
  21. data/sample_app_rails_4/.idea/workspace.xml +969 -0
  22. data/sample_app_rails_4/.rspec +1 -0
  23. data/sample_app_rails_4/.secret +1 -0
  24. data/sample_app_rails_4/Gemfile +53 -0
  25. data/sample_app_rails_4/Guardfile +53 -0
  26. data/sample_app_rails_4/LICENSE +21 -0
  27. data/sample_app_rails_4/README.md +25 -0
  28. data/sample_app_rails_4/README.nitrous.md +20 -0
  29. data/sample_app_rails_4/Rakefile +6 -0
  30. data/sample_app_rails_4/app/assets/images/rails.png +0 -0
  31. data/sample_app_rails_4/app/assets/javascripts/application.js +17 -0
  32. data/sample_app_rails_4/app/assets/javascripts/sessions.js.coffee +3 -0
  33. data/sample_app_rails_4/app/assets/javascripts/static_pages.js.coffee +3 -0
  34. data/sample_app_rails_4/app/assets/javascripts/users.js.coffee +3 -0
  35. data/sample_app_rails_4/app/assets/stylesheets/application.css +13 -0
  36. data/sample_app_rails_4/app/assets/stylesheets/custom.css.scss +246 -0
  37. data/sample_app_rails_4/app/assets/stylesheets/sessions.css.scss +3 -0
  38. data/sample_app_rails_4/app/assets/stylesheets/static_pages.css.scss +3 -0
  39. data/sample_app_rails_4/app/assets/stylesheets/users.css.scss +3 -0
  40. data/sample_app_rails_4/app/controllers/application_controller.rb +6 -0
  41. data/sample_app_rails_4/app/controllers/concerns/.keep +0 -0
  42. data/sample_app_rails_4/app/controllers/microposts_controller.rb +31 -0
  43. data/sample_app_rails_4/app/controllers/relationships_controller.rb +21 -0
  44. data/sample_app_rails_4/app/controllers/sessions_controller.rb +21 -0
  45. data/sample_app_rails_4/app/controllers/static_pages_controller.rb +18 -0
  46. data/sample_app_rails_4/app/controllers/users_controller.rb +80 -0
  47. data/sample_app_rails_4/app/helpers/application_helper.rb +12 -0
  48. data/sample_app_rails_4/app/helpers/sessions_helper.rb +49 -0
  49. data/sample_app_rails_4/app/helpers/static_pages_helper.rb +2 -0
  50. data/sample_app_rails_4/app/helpers/users_helper.rb +10 -0
  51. data/sample_app_rails_4/app/mailers/.keep +0 -0
  52. data/sample_app_rails_4/app/models/.keep +0 -0
  53. data/sample_app_rails_4/app/models/concerns/.keep +0 -0
  54. data/sample_app_rails_4/app/models/micropost.rb +14 -0
  55. data/sample_app_rails_4/app/models/relationship.rb +6 -0
  56. data/sample_app_rails_4/app/models/user.rb +47 -0
  57. data/sample_app_rails_4/app/views/layouts/_footer.html.erb +13 -0
  58. data/sample_app_rails_4/app/views/layouts/_header.html.erb +31 -0
  59. data/sample_app_rails_4/app/views/layouts/_shim.html.erb +3 -0
  60. data/sample_app_rails_4/app/views/layouts/application.html.erb +22 -0
  61. data/sample_app_rails_4/app/views/microposts/_micropost.html.erb +11 -0
  62. data/sample_app_rails_4/app/views/relationships/create.js.erb +2 -0
  63. data/sample_app_rails_4/app/views/relationships/destroy.js.erb +2 -0
  64. data/sample_app_rails_4/app/views/sessions/new.html.erb +19 -0
  65. data/sample_app_rails_4/app/views/shared/_error_messages.html.erb +12 -0
  66. data/sample_app_rails_4/app/views/shared/_feed.html.erb +6 -0
  67. data/sample_app_rails_4/app/views/shared/_feed_item.html.erb +15 -0
  68. data/sample_app_rails_4/app/views/shared/_micropost_form.html.erb +7 -0
  69. data/sample_app_rails_4/app/views/shared/_stats.html.erb +15 -0
  70. data/sample_app_rails_4/app/views/shared/_user_info.html.erb +12 -0
  71. data/sample_app_rails_4/app/views/static_pages/about.html.erb +8 -0
  72. data/sample_app_rails_4/app/views/static_pages/contact.html.erb +6 -0
  73. data/sample_app_rails_4/app/views/static_pages/help.html.erb +8 -0
  74. data/sample_app_rails_4/app/views/static_pages/home.html.erb +34 -0
  75. data/sample_app_rails_4/app/views/static_pages/show.html.erb +0 -0
  76. data/sample_app_rails_4/app/views/users/_follow.html.erb +5 -0
  77. data/sample_app_rails_4/app/views/users/_follow_form.html.erb +9 -0
  78. data/sample_app_rails_4/app/views/users/_unfollow.html.erb +5 -0
  79. data/sample_app_rails_4/app/views/users/_user.html.erb +8 -0
  80. data/sample_app_rails_4/app/views/users/edit.html.erb +27 -0
  81. data/sample_app_rails_4/app/views/users/index.html.erb +10 -0
  82. data/sample_app_rails_4/app/views/users/new.html.erb +24 -0
  83. data/sample_app_rails_4/app/views/users/show.html.erb +24 -0
  84. data/sample_app_rails_4/app/views/users/show_follow.html.erb +30 -0
  85. data/sample_app_rails_4/bin/bundle +3 -0
  86. data/sample_app_rails_4/bin/rails +4 -0
  87. data/sample_app_rails_4/bin/rake +4 -0
  88. data/sample_app_rails_4/config.ru +4 -0
  89. data/sample_app_rails_4/config/application.rb +31 -0
  90. data/sample_app_rails_4/config/boot.rb +4 -0
  91. data/sample_app_rails_4/config/cucumber.yml +8 -0
  92. data/sample_app_rails_4/config/database.yml +28 -0
  93. data/sample_app_rails_4/config/environment.rb +5 -0
  94. data/sample_app_rails_4/config/environments/development.rb +27 -0
  95. data/sample_app_rails_4/config/environments/production.rb +79 -0
  96. data/sample_app_rails_4/config/environments/test.rb +39 -0
  97. data/sample_app_rails_4/config/initializers/active_mocker.rb +10 -0
  98. data/sample_app_rails_4/config/initializers/backtrace_silencers.rb +7 -0
  99. data/sample_app_rails_4/config/initializers/filter_parameter_logging.rb +4 -0
  100. data/sample_app_rails_4/config/initializers/inflections.rb +16 -0
  101. data/sample_app_rails_4/config/initializers/mime_types.rb +5 -0
  102. data/sample_app_rails_4/config/initializers/secret_token.rb +22 -0
  103. data/sample_app_rails_4/config/initializers/session_store.rb +3 -0
  104. data/sample_app_rails_4/config/initializers/wrap_parameters.rb +14 -0
  105. data/sample_app_rails_4/config/locales/en.yml +23 -0
  106. data/sample_app_rails_4/config/routes.rb +17 -0
  107. data/sample_app_rails_4/db/development.sqlite3 +0 -0
  108. data/sample_app_rails_4/db/migrate/20130311191400_create_users.rb +10 -0
  109. data/sample_app_rails_4/db/migrate/20130311194153_add_index_to_users_email.rb +5 -0
  110. data/sample_app_rails_4/db/migrate/20130311201841_add_password_digest_to_users.rb +5 -0
  111. data/sample_app_rails_4/db/migrate/20130314184954_add_remember_token_to_users.rb +6 -0
  112. data/sample_app_rails_4/db/migrate/20130315015932_add_admin_to_users.rb +5 -0
  113. data/sample_app_rails_4/db/migrate/20130315175534_create_microposts.rb +11 -0
  114. data/sample_app_rails_4/db/migrate/20130315230445_create_relationships.rb +13 -0
  115. data/sample_app_rails_4/db/schema.rb +49 -0
  116. data/sample_app_rails_4/db/seeds.rb +7 -0
  117. data/sample_app_rails_4/db/test.sqlite3 +0 -0
  118. data/sample_app_rails_4/features/signing_in.feature +13 -0
  119. data/sample_app_rails_4/features/step_definitions/authentication_steps.rb +30 -0
  120. data/sample_app_rails_4/features/support/env.rb +59 -0
  121. data/sample_app_rails_4/lib/assets/.keep +0 -0
  122. data/sample_app_rails_4/lib/tasks/.keep +0 -0
  123. data/sample_app_rails_4/lib/tasks/cucumber.rake +65 -0
  124. data/sample_app_rails_4/lib/tasks/mocks.rake +10 -0
  125. data/sample_app_rails_4/lib/tasks/sample_data.rake +42 -0
  126. data/sample_app_rails_4/log/.keep +0 -0
  127. data/sample_app_rails_4/log/development.log +603 -0
  128. data/sample_app_rails_4/log/test.log +6727 -0
  129. data/sample_app_rails_4/public/404.html +27 -0
  130. data/sample_app_rails_4/public/422.html +26 -0
  131. data/sample_app_rails_4/public/500.html +26 -0
  132. data/sample_app_rails_4/public/assets/application-4962059d8f80f9bb096692bacc29c4e8.css +5091 -0
  133. data/sample_app_rails_4/public/assets/application-4962059d8f80f9bb096692bacc29c4e8.css.gz +0 -0
  134. data/sample_app_rails_4/public/assets/application-eeb856e3fe2c8f879c91d0e81d59cb40.js +12952 -0
  135. data/sample_app_rails_4/public/assets/application-eeb856e3fe2c8f879c91d0e81d59cb40.js.gz +0 -0
  136. data/sample_app_rails_4/public/assets/glyphicons-halflings-c806376f05e4ccabe2c5315a8e95667c.png +0 -0
  137. data/sample_app_rails_4/public/assets/glyphicons-halflings-white-62b67d9edee3db90d18833087f848d6e.png +0 -0
  138. data/sample_app_rails_4/public/assets/manifest-802de9eb1c853769101852422b620883.json +1 -0
  139. data/sample_app_rails_4/public/assets/rails-231a680f23887d9dd70710ea5efd3c62.png +0 -0
  140. data/sample_app_rails_4/public/favicon.ico +0 -0
  141. data/sample_app_rails_4/public/robots.txt +5 -0
  142. data/sample_app_rails_4/script/cucumber +10 -0
  143. data/sample_app_rails_4/spec/controllers/relationships_controller_spec.rb +42 -0
  144. data/sample_app_rails_4/spec/factories.rb +17 -0
  145. data/sample_app_rails_4/spec/helpers/application_helper_spec.rb +18 -0
  146. data/sample_app_rails_4/spec/models/micropost_spec.rb +30 -0
  147. data/sample_app_rails_4/spec/models/relationship_spec.rb +29 -0
  148. data/sample_app_rails_4/spec/models/user_spec.rb +194 -0
  149. data/sample_app_rails_4/spec/spec_helper.rb +49 -0
  150. data/sample_app_rails_4/spec/support/utilities.rb +21 -0
  151. data/sample_app_rails_4/vendor/assets/javascripts/.keep +0 -0
  152. data/sample_app_rails_4/vendor/assets/stylesheets/.keep +0 -0
  153. metadata +151 -1
@@ -0,0 +1,2 @@
1
+ $("#follow_form").html("<%= escape_javascript(render('users/unfollow')) %>")
2
+ $("#followers").html('<%= @user.followers.count %>')
@@ -0,0 +1,2 @@
1
+ $("#follow_form").html("<%= escape_javascript(render('users/follow')) %>")
2
+ $("#followers").html('<%= @user.followers.count %>')
@@ -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,6 @@
1
+ <% if @feed_items.any? %>
2
+ <ol class="microposts">
3
+ <%= render partial: 'shared/feed_item', collection: @feed_items %>
4
+ </ol>
5
+ <%= will_paginate @feed_items %>
6
+ <% 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,7 @@
1
+ <%= form_for(@micropost) do |f| %>
2
+ <%= render 'shared/error_messages', object: f.object %>
3
+ <div class="field">
4
+ <%= f.text_area :content, placeholder: "Compose new micropost..." %>
5
+ </div>
6
+ <%= f.submit "Post", class: "btn btn-large btn-primary" %>
7
+ <% end %>
@@ -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,6 @@
1
+ <% provide(:title, 'Contact') %>
2
+ <h1>Contact</h1>
3
+ <p>
4
+ Contact Ruby on Rails Tutorial about the sample app at the
5
+ <a href="http://railstutorial.org/contact">contact page</a>.
6
+ </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 %>
@@ -0,0 +1,5 @@
1
+ <%= form_for(current_user.relationships.build(followed_id: @user.id),
2
+ remote: true) do |f| %>
3
+ <div><%= f.hidden_field :followed_id %></div>
4
+ <%= f.submit "Follow", class: "btn btn-large btn-primary" %>
5
+ <% end %>
@@ -0,0 +1,9 @@
1
+ <% unless current_user?(@user) %>
2
+ <div id="follow_form">
3
+ <% if current_user.following?(@user) %>
4
+ <%= render 'unfollow' %>
5
+ <% else %>
6
+ <%= render 'follow' %>
7
+ <% end %>
8
+ </div>
9
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <%= form_for(current_user.relationships.find_by(followed_id: @user.id),
2
+ html: { method: :delete },
3
+ remote: true) do |f| %>
4
+ <%= f.submit "Unfollow", class: "btn btn-large" %>
5
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <li>
2
+ <%= gravatar_for user, size: 52 %>
3
+ <%= link_to user.name, user %>
4
+ <% if current_user.admin? && !current_user?(user) %>
5
+ | <%= link_to "delete", user, method: :delete,
6
+ data: { confirm: "You sure?" } %>
7
+ <% end %>
8
+ </li>
@@ -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,10 @@
1
+ <% provide(:title, 'All users') %>
2
+ <h1>All users</h1>
3
+
4
+ <%= will_paginate %>
5
+
6
+ <ul class="users">
7
+ <%= render @users %>
8
+ </ul>
9
+
10
+ <%= will_paginate %>
@@ -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,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run SampleApp::Application
@@ -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,4 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+
4
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -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
@@ -0,0 +1,28 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ development:
7
+ adapter: sqlite3
8
+ database: db/development.sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ # Warning: The database defined as "test" will be erased and
13
+ # re-generated from your development database when you run "rake".
14
+ # Do not set this db to the same as development or production.
15
+ test: &test
16
+ adapter: sqlite3
17
+ database: db/test.sqlite3
18
+ pool: 5
19
+ timeout: 5000
20
+
21
+ production:
22
+ adapter: sqlite3
23
+ database: db/production.sqlite3
24
+ pool: 5
25
+ timeout: 5000
26
+
27
+ cucumber:
28
+ <<: *test
@@ -0,0 +1,5 @@
1
+ # Load the rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application.
5
+ SampleApp::Application.initialize!