raygun 0.0.34 → 0.9.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (227) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/CHANGES.md +7 -1
  4. data/README.md +7 -11
  5. data/bin/raygun +4 -181
  6. data/cleanup.sh +1 -6
  7. data/lib/raygun/raygun.rb +238 -0
  8. data/lib/raygun/version.rb +1 -1
  9. metadata +6 -223
  10. data/TODO.md +0 -16
  11. data/rails_32/.env +0 -8
  12. data/rails_32/.gitignore +0 -19
  13. data/rails_32/.rspec +0 -1
  14. data/rails_32/.ruby-gemset +0 -1
  15. data/rails_32/.ruby-version +0 -1
  16. data/rails_32/Gemfile +0 -54
  17. data/rails_32/Guardfile +0 -32
  18. data/rails_32/Procfile +0 -2
  19. data/rails_32/README.md +0 -69
  20. data/rails_32/Rakefile +0 -15
  21. data/rails_32/app/assets/javascripts/application.js +0 -16
  22. data/rails_32/app/assets/javascripts/users.js.coffee +0 -3
  23. data/rails_32/app/assets/stylesheets/_footer.less +0 -30
  24. data/rails_32/app/assets/stylesheets/_navbar.less +0 -5
  25. data/rails_32/app/assets/stylesheets/application.css.less +0 -3
  26. data/rails_32/app/controllers/application_controller.rb +0 -15
  27. data/rails_32/app/controllers/pages_controller.rb +0 -8
  28. data/rails_32/app/controllers/password_resets_controller.rb +0 -36
  29. data/rails_32/app/controllers/registrations_controller.rb +0 -29
  30. data/rails_32/app/controllers/user_sessions_controller.rb +0 -26
  31. data/rails_32/app/controllers/users_controller.rb +0 -41
  32. data/rails_32/app/helpers/application_helper.rb +0 -11
  33. data/rails_32/app/helpers/users_helper.rb +0 -2
  34. data/rails_32/app/mailers/.gitkeep +0 -0
  35. data/rails_32/app/mailers/user_mailer.rb +0 -19
  36. data/rails_32/app/models/.gitkeep +0 -0
  37. data/rails_32/app/models/ability.rb +0 -40
  38. data/rails_32/app/models/user.rb +0 -21
  39. data/rails_32/app/models/user_session.rb +0 -6
  40. data/rails_32/app/views/layouts/application.html.slim +0 -36
  41. data/rails_32/app/views/pages/root.html.slim +0 -9
  42. data/rails_32/app/views/password_resets/edit.html.slim +0 -15
  43. data/rails_32/app/views/password_resets/new.html.slim +0 -11
  44. data/rails_32/app/views/registrations/new.html.slim +0 -13
  45. data/rails_32/app/views/user_mailer/activation_needed_email.html.erb +0 -17
  46. data/rails_32/app/views/user_mailer/activation_needed_email.text.erb +0 -9
  47. data/rails_32/app/views/user_mailer/activation_success_email.html.erb +0 -17
  48. data/rails_32/app/views/user_mailer/activation_success_email.text.erb +0 -9
  49. data/rails_32/app/views/user_mailer/reset_password_email.html.erb +0 -16
  50. data/rails_32/app/views/user_mailer/reset_password_email.text.erb +0 -8
  51. data/rails_32/app/views/user_sessions/new.html.slim +0 -13
  52. data/rails_32/app/views/users/_form.html.slim +0 -12
  53. data/rails_32/app/views/users/edit.html.slim +0 -5
  54. data/rails_32/app/views/users/index.html.slim +0 -26
  55. data/rails_32/app/views/users/new.html.slim +0 -4
  56. data/rails_32/app/views/users/show.html.slim +0 -17
  57. data/rails_32/config/application.rb +0 -77
  58. data/rails_32/config/boot.rb +0 -6
  59. data/rails_32/config/database.yml +0 -13
  60. data/rails_32/config/environment.rb +0 -5
  61. data/rails_32/config/environments/acceptance.rb +0 -69
  62. data/rails_32/config/environments/development.rb +0 -39
  63. data/rails_32/config/environments/production.rb +0 -69
  64. data/rails_32/config/environments/test.rb +0 -42
  65. data/rails_32/config/initializers/backtrace_silencers.rb +0 -7
  66. data/rails_32/config/initializers/inflections.rb +0 -15
  67. data/rails_32/config/initializers/mailcatcher.rb +0 -15
  68. data/rails_32/config/initializers/mime_types.rb +0 -5
  69. data/rails_32/config/initializers/secret_token.rb +0 -7
  70. data/rails_32/config/initializers/session_store.rb +0 -8
  71. data/rails_32/config/initializers/simple_form.rb +0 -142
  72. data/rails_32/config/initializers/simple_form_bootstrap.rb +0 -45
  73. data/rails_32/config/initializers/sorcery.rb +0 -398
  74. data/rails_32/config/initializers/wrap_parameters.rb +0 -14
  75. data/rails_32/config/locales/en.yml +0 -5
  76. data/rails_32/config/locales/simple_form.en.yml +0 -26
  77. data/rails_32/config/routes.rb +0 -21
  78. data/rails_32/config/unicorn.rb +0 -27
  79. data/rails_32/config.ru +0 -21
  80. data/rails_32/db/migrate/20121128215324_sorcery_core.rb +0 -19
  81. data/rails_32/db/migrate/20121128215325_sorcery_brute_force_protection.rb +0 -13
  82. data/rails_32/db/migrate/20121128215326_sorcery_activity_logging.rb +0 -17
  83. data/rails_32/db/migrate/20121128215327_sorcery_user_activation.rb +0 -17
  84. data/rails_32/db/migrate/20121128215328_sorcery_remember_me.rb +0 -15
  85. data/rails_32/db/migrate/20121128215329_sorcery_reset_password.rb +0 -17
  86. data/rails_32/db/migrate/20121128215330_sorcery_external.rb +0 -14
  87. data/rails_32/db/migrate/20121128215337_add_admin_to_users.rb +0 -5
  88. data/rails_32/db/sample_data.rb +0 -24
  89. data/rails_32/db/schema.rb +0 -54
  90. data/rails_32/db/seeds.rb +0 -7
  91. data/rails_32/lib/assets/.gitkeep +0 -0
  92. data/rails_32/lib/tasks/.gitkeep +0 -0
  93. data/rails_32/lib/tasks/cane.rake +0 -30
  94. data/rails_32/lib/tasks/coverage.rake +0 -10
  95. data/rails_32/lib/tasks/db.rake +0 -7
  96. data/rails_32/lib/tasks/spec.rake +0 -35
  97. data/rails_32/lib/templates/rails/scaffold_controller/controller.rb +0 -45
  98. data/rails_32/lib/templates/rspec/scaffold/controller_spec.rb +0 -155
  99. data/rails_32/lib/templates/rspec/scaffold/edit_spec.rb +0 -18
  100. data/rails_32/lib/templates/rspec/scaffold/index_spec.rb +0 -26
  101. data/rails_32/lib/templates/rspec/scaffold/new_spec.rb +0 -18
  102. data/rails_32/lib/templates/rspec/scaffold/show_spec.rb +0 -16
  103. data/rails_32/lib/templates/slim/scaffold/_form.html.slim +0 -13
  104. data/rails_32/lib/templates/slim/scaffold/edit.html.slim +0 -5
  105. data/rails_32/lib/templates/slim/scaffold/index.html.slim +0 -28
  106. data/rails_32/lib/templates/slim/scaffold/new.html.slim +0 -4
  107. data/rails_32/lib/templates/slim/scaffold/show.html.slim +0 -17
  108. data/rails_32/log/.gitkeep +0 -0
  109. data/rails_32/public/404.html +0 -26
  110. data/rails_32/public/422.html +0 -26
  111. data/rails_32/public/500.html +0 -25
  112. data/rails_32/public/favicon.ico +0 -0
  113. data/rails_32/public/robots.txt +0 -5
  114. data/rails_32/script/rails +0 -6
  115. data/rails_32/spec/controllers/user_sessions_controller_spec.rb +0 -42
  116. data/rails_32/spec/controllers/users_controller_spec.rb +0 -150
  117. data/rails_32/spec/factories/users.rb +0 -14
  118. data/rails_32/spec/features/activation_spec.rb +0 -18
  119. data/rails_32/spec/features/password_reset_spec.rb +0 -41
  120. data/rails_32/spec/features/registration_spec.rb +0 -39
  121. data/rails_32/spec/features/sign_in_spec.rb +0 -30
  122. data/rails_32/spec/javascripts/example_spec.js.coffee +0 -20
  123. data/rails_32/spec/javascripts/spec.css +0 -3
  124. data/rails_32/spec/javascripts/spec.js.coffee +0 -2
  125. data/rails_32/spec/mailers/user_mailer_spec.rb +0 -48
  126. data/rails_32/spec/models/ability_spec.rb +0 -38
  127. data/rails_32/spec/models/user_spec.rb +0 -36
  128. data/rails_32/spec/spec_helper.rb +0 -64
  129. data/rails_32/spec/support/accept_values.rb +0 -55
  130. data/rails_32/spec/support/database_cleaner.rb +0 -24
  131. data/rails_32/spec/support/factory_girl.rb +0 -3
  132. data/rails_32/spec/support/sorcery.rb +0 -3
  133. data/rails_32/spec/support/user_sessions_feature_helper.rb +0 -21
  134. data/rails_32/spec/views/users/edit.html.slim_spec.rb +0 -16
  135. data/rails_32/spec/views/users/index.html.slim_spec.rb +0 -16
  136. data/rails_32/spec/views/users/new.html.slim_spec.rb +0 -16
  137. data/rails_32/spec/views/users/show.html.slim_spec.rb +0 -13
  138. data/rails_32/vendor/assets/javascripts/.gitkeep +0 -0
  139. data/rails_32/vendor/assets/stylesheets/.gitkeep +0 -0
  140. data/rails_32/vendor/plugins/.gitkeep +0 -0
  141. data/rails_40/.env +0 -8
  142. data/rails_40/.gitignore +0 -16
  143. data/rails_40/.rspec +0 -1
  144. data/rails_40/.ruby-gemset +0 -1
  145. data/rails_40/.ruby-version +0 -1
  146. data/rails_40/Gemfile +0 -53
  147. data/rails_40/Guardfile +0 -34
  148. data/rails_40/Procfile +0 -2
  149. data/rails_40/README.md +0 -90
  150. data/rails_40/Rakefile +0 -15
  151. data/rails_40/app/assets/javascripts/application.js +0 -17
  152. data/rails_40/app/assets/stylesheets/_footer.less +0 -30
  153. data/rails_40/app/assets/stylesheets/_navbar.less +0 -3
  154. data/rails_40/app/assets/stylesheets/application.css.less +0 -3
  155. data/rails_40/app/controllers/application_controller.rb +0 -5
  156. data/rails_40/app/controllers/concerns/.keep +0 -0
  157. data/rails_40/app/controllers/pages_controller.rb +0 -6
  158. data/rails_40/app/helpers/application_helper.rb +0 -11
  159. data/rails_40/app/mailers/.keep +0 -0
  160. data/rails_40/app/models/.keep +0 -0
  161. data/rails_40/app/models/concerns/.keep +0 -0
  162. data/rails_40/app/views/layouts/application.html.slim +0 -39
  163. data/rails_40/app/views/pages/root.html.slim +0 -13
  164. data/rails_40/bin/bundle +0 -3
  165. data/rails_40/bin/deploy.sh +0 -47
  166. data/rails_40/bin/rails +0 -4
  167. data/rails_40/bin/rake +0 -4
  168. data/rails_40/circle.yml +0 -16
  169. data/rails_40/config/application.rb +0 -36
  170. data/rails_40/config/boot.rb +0 -4
  171. data/rails_40/config/database.yml +0 -15
  172. data/rails_40/config/environment.rb +0 -5
  173. data/rails_40/config/environments/acceptance.rb +0 -8
  174. data/rails_40/config/environments/development.rb +0 -31
  175. data/rails_40/config/environments/production.rb +0 -82
  176. data/rails_40/config/environments/test.rb +0 -38
  177. data/rails_40/config/initializers/backtrace_silencers.rb +0 -7
  178. data/rails_40/config/initializers/filter_parameter_logging.rb +0 -4
  179. data/rails_40/config/initializers/inflections.rb +0 -16
  180. data/rails_40/config/initializers/mailcatcher.rb +0 -15
  181. data/rails_40/config/initializers/mime_types.rb +0 -5
  182. data/rails_40/config/initializers/secret_token.rb +0 -12
  183. data/rails_40/config/initializers/session_store.rb +0 -3
  184. data/rails_40/config/initializers/simple_form.rb +0 -142
  185. data/rails_40/config/initializers/simple_form_bootstrap.rb +0 -45
  186. data/rails_40/config/initializers/wrap_parameters.rb +0 -14
  187. data/rails_40/config/locales/en.yml +0 -23
  188. data/rails_40/config/locales/simple_form.en.yml +0 -26
  189. data/rails_40/config/routes.rb +0 -5
  190. data/rails_40/config/unicorn.rb +0 -27
  191. data/rails_40/config.ru +0 -18
  192. data/rails_40/db/sample_data.rb +0 -11
  193. data/rails_40/db/schema.rb +0 -19
  194. data/rails_40/db/seeds.rb +0 -7
  195. data/rails_40/lib/assets/.keep +0 -0
  196. data/rails_40/lib/tasks/.keep +0 -0
  197. data/rails_40/lib/tasks/coverage.rake +0 -10
  198. data/rails_40/lib/tasks/db.rake +0 -7
  199. data/rails_40/lib/tasks/spec.rake +0 -60
  200. data/rails_40/lib/templates/rails/scaffold_controller/controller.rb +0 -61
  201. data/rails_40/lib/templates/rspec/controller/controller_spec.rb +0 -16
  202. data/rails_40/lib/templates/rspec/scaffold/controller_spec.rb +0 -155
  203. data/rails_40/lib/templates/rspec/scaffold/edit_spec.rb +0 -18
  204. data/rails_40/lib/templates/rspec/scaffold/index_spec.rb +0 -26
  205. data/rails_40/lib/templates/rspec/scaffold/new_spec.rb +0 -19
  206. data/rails_40/lib/templates/rspec/scaffold/show_spec.rb +0 -16
  207. data/rails_40/lib/templates/slim/scaffold/_form.html.slim +0 -13
  208. data/rails_40/lib/templates/slim/scaffold/edit.html.slim +0 -5
  209. data/rails_40/lib/templates/slim/scaffold/index.html.slim +0 -29
  210. data/rails_40/lib/templates/slim/scaffold/new.html.slim +0 -4
  211. data/rails_40/lib/templates/slim/scaffold/show.html.slim +0 -17
  212. data/rails_40/log/.keep +0 -0
  213. data/rails_40/public/404.html +0 -58
  214. data/rails_40/public/422.html +0 -58
  215. data/rails_40/public/500.html +0 -57
  216. data/rails_40/public/favicon.ico +0 -0
  217. data/rails_40/public/robots.txt +0 -5
  218. data/rails_40/spec/controllers/pages_controller_spec.rb +0 -12
  219. data/rails_40/spec/features/pages_spec.rb +0 -18
  220. data/rails_40/spec/javascripts/example_spec.js.coffee +0 -20
  221. data/rails_40/spec/javascripts/spec.css +0 -3
  222. data/rails_40/spec/javascripts/spec.js.coffee +0 -2
  223. data/rails_40/spec/spec_helper.rb +0 -79
  224. data/rails_40/spec/support/database_cleaner.rb +0 -24
  225. data/rails_40/spec/support/factory_girl.rb +0 -3
  226. data/rails_40/vendor/assets/javascripts/.keep +0 -0
  227. data/rails_40/vendor/assets/stylesheets/.keep +0 -0
@@ -1,61 +0,0 @@
1
- <% if namespaced? -%>
2
- require_dependency "<%= namespaced_file_path %>/application_controller"
3
-
4
- <% end -%>
5
- <% module_namespacing do -%>
6
- class <%= controller_class_name %>Controller < ApplicationController
7
- before_action :set_<%= singular_table_name %>, only: [:show, :edit, :update, :destroy]
8
-
9
- def index
10
- @<%= plural_table_name %> = <%= orm_class.all(class_name) %>
11
- end
12
-
13
- def show
14
- end
15
-
16
- def new
17
- @<%= singular_table_name %> = <%= orm_class.build(class_name) %>
18
- end
19
-
20
- def edit
21
- end
22
-
23
- def create
24
- @<%= singular_table_name %> = <%= orm_class.build(class_name, "#{singular_table_name}_params") %>
25
-
26
- if @<%= orm_instance.save %>
27
- redirect_to @<%= singular_table_name %>, notice: <%= "'#{human_name} was successfully created.'" %>
28
- else
29
- render action: 'new'
30
- end
31
- end
32
-
33
- def update
34
- if @<%= orm_instance.update("#{singular_table_name}_params") %>
35
- redirect_to @<%= singular_table_name %>, notice: <%= "'#{human_name} was successfully updated.'" %>
36
- else
37
- render action: 'edit'
38
- end
39
- end
40
-
41
- def destroy
42
- @<%= orm_instance.destroy %>
43
- redirect_to <%= index_helper %>_url, notice: <%= "'#{human_name} was successfully destroyed.'" %>
44
- end
45
-
46
- private
47
- # Use callbacks to share common setup or constraints between actions.
48
- def set_<%= singular_table_name %>
49
- @<%= singular_table_name %> = <%= orm_class.find(class_name, "params[:id]") %>
50
- end
51
-
52
- # Only allow a trusted parameter "white list" through.
53
- def <%= "#{singular_table_name}_params" %>
54
- <%- if attributes_names.empty? -%>
55
- params[<%= ":#{singular_table_name}" %>]
56
- <%- else -%>
57
- params.require(<%= ":#{singular_table_name}" %>).permit(<%= attributes_names.map { |name| ":#{name}" }.join(', ') %>)
58
- <%- end -%>
59
- end
60
- end
61
- <% end -%>
@@ -1,16 +0,0 @@
1
- require 'spec_helper'
2
-
3
- <% module_namespacing do -%>
4
- describe <%= class_name %>Controller do
5
-
6
- <% for action in actions -%>
7
- describe "GET '<%= action %>'" do
8
- it "returns http success" do
9
- get '<%= action %>'
10
- expect(response).to be_success
11
- end
12
- end
13
-
14
- <% end -%>
15
- end
16
- <% end -%>
@@ -1,155 +0,0 @@
1
- require 'spec_helper'
2
-
3
- <% module_namespacing do -%>
4
- describe <%= controller_class_name %>Controller do
5
-
6
- # This should return the minimal set of attributes required to create a valid
7
- # <%= class_name %>. As you add validations to <%= class_name %>, be sure to
8
- # update the return value of this method accordingly.
9
- def valid_attributes
10
- attributes_for :<%= file_name %>
11
- end
12
-
13
- # This should return the minimal set of values that should be in the session
14
- # in order to pass any filters (e.g. authentication) defined in
15
- # <%= controller_class_name %>Controller. Be sure to keep this updated too.
16
- def valid_session
17
- {}
18
- end
19
-
20
- before do
21
- # TODO Set to :user and specify authorization rules in Ability.rb.
22
- # login_user build :admin
23
- end
24
-
25
- <% unless options[:singleton] -%>
26
- describe "#index" do
27
- it "assigns all <%= table_name.pluralize %> as @<%= table_name.pluralize %>" do
28
- <%= file_name %> = <%= class_name %>.create! valid_attributes
29
- get :index, {}, valid_session
30
- expect(assigns(:<%= table_name %>)).to eq([<%= file_name %>])
31
- end
32
- end
33
-
34
- <% end -%>
35
- describe "#show" do
36
- it "assigns the requested <%= ns_file_name %> as @<%= ns_file_name %>" do
37
- <%= file_name %> = <%= class_name %>.create! valid_attributes
38
- get :show, { :id => <%= file_name %>.to_param }, valid_session
39
- expect(assigns(:<%= ns_file_name %>)).to eq(<%= file_name %>)
40
- end
41
- end
42
-
43
- describe "#new" do
44
- it "assigns a new <%= ns_file_name %> as @<%= ns_file_name %>" do
45
- get :new, {}, valid_session
46
- expect(assigns(:<%= ns_file_name %>)).to be_a_new(<%= class_name %>)
47
- end
48
- end
49
-
50
- describe "#edit" do
51
- it "assigns the requested <%= ns_file_name %> as @<%= ns_file_name %>" do
52
- <%= file_name %> = <%= class_name %>.create! valid_attributes
53
- get :edit, { :id => <%= file_name %>.to_param }, valid_session
54
- expect(assigns(:<%= ns_file_name %>)).to eq(<%= file_name %>)
55
- end
56
- end
57
-
58
- describe "#create" do
59
- describe "with valid params" do
60
- it "creates a new <%= class_name %>" do
61
- expect {
62
- post :create, { :<%= ns_file_name %> => valid_attributes }, valid_session
63
- }.to change(<%= class_name %>, :count).by(1)
64
- end
65
-
66
- it "assigns a newly created <%= ns_file_name %> as @<%= ns_file_name %>" do
67
- post :create, {:<%= ns_file_name %> => valid_attributes }, valid_session
68
- expect(assigns(:<%= ns_file_name %>)).to be_a(<%= class_name %>)
69
- expect(assigns(:<%= ns_file_name %>)).to be_persisted
70
- end
71
-
72
- it "redirects to the created <%= ns_file_name %>" do
73
- post :create, { :<%= ns_file_name %> => valid_attributes }, valid_session
74
- expect(response).to redirect_to(<%= class_name %>.last)
75
- end
76
- end
77
-
78
- describe "with invalid params" do
79
- it "assigns a newly created but unsaved <%= ns_file_name %> as @<%= ns_file_name %>" do
80
- # Trigger the behavior that occurs when invalid params are submitted
81
- <%= class_name %>.any_instance.stub(:save).and_return(false)
82
- post :create, { :<%= ns_file_name %> => <%= formatted_hash(example_invalid_attributes) %> }, valid_session
83
- expect(assigns(:<%= ns_file_name %>)).to be_a_new(<%= class_name %>)
84
- end
85
-
86
- it "re-renders the 'new' template" do
87
- # Trigger the behavior that occurs when invalid params are submitted
88
- <%= class_name %>.any_instance.stub(:save).and_return(false)
89
- post :create, { :<%= ns_file_name %> => <%= formatted_hash(example_invalid_attributes) %> }, valid_session
90
- expect(response).to render_template("new")
91
- end
92
- end
93
- end
94
-
95
- describe "#update" do
96
- describe "with valid params" do
97
- it "updates the requested <%= ns_file_name %>" do
98
- <%= file_name %> = <%= class_name %>.create! valid_attributes
99
- # Assuming there are no other <%= table_name %> in the database, this
100
- # specifies that the <%= class_name %> created on the previous line
101
- # receives the :update message with whatever params are submitted in
102
- # the request.
103
- <%= class_name %>.any_instance.should_receive(:update).with(<%= formatted_hash(example_params_for_update) %>)
104
- put :update, { :id => <%= file_name %>.to_param, :<%= ns_file_name %> => <%= formatted_hash(example_params_for_update) %> }, valid_session
105
- end
106
-
107
- it "assigns the requested <%= ns_file_name %> as @<%= ns_file_name %>" do
108
- <%= file_name %> = <%= class_name %>.create! valid_attributes
109
- put :update, { :id => <%= file_name %>.to_param, :<%= ns_file_name %> => valid_attributes }, valid_session
110
- expect(assigns(:<%= ns_file_name %>)).to eq(<%= file_name %>)
111
- end
112
-
113
- it "redirects to the <%= ns_file_name %>" do
114
- <%= file_name %> = <%= class_name %>.create! valid_attributes
115
- put :update, { :id => <%= file_name %>.to_param, :<%= ns_file_name %> => valid_attributes }, valid_session
116
- expect(response).to redirect_to(<%= file_name %>)
117
- end
118
- end
119
-
120
- describe "with invalid params" do
121
- it "assigns the <%= ns_file_name %> as @<%= ns_file_name %>" do
122
- <%= file_name %> = <%= class_name %>.create! valid_attributes
123
- # Trigger the behavior that occurs when invalid params are submitted
124
- <%= class_name %>.any_instance.stub(:save).and_return(false)
125
- put :update, { :id => <%= file_name %>.to_param, :<%= ns_file_name %> => <%= formatted_hash(example_invalid_attributes) %> }, valid_session
126
- expect(assigns(:<%= ns_file_name %>)).to eq(<%= file_name %>)
127
- end
128
-
129
- it "re-renders the 'edit' template" do
130
- <%= file_name %> = <%= class_name %>.create! valid_attributes
131
- # Trigger the behavior that occurs when invalid params are submitted
132
- <%= class_name %>.any_instance.stub(:save).and_return(false)
133
- put :update, { :id => <%= file_name %>.to_param, :<%= ns_file_name %> => <%= formatted_hash(example_invalid_attributes) %> }, valid_session
134
- expect(response).to render_template("edit")
135
- end
136
- end
137
- end
138
-
139
- describe "#destroy" do
140
- it "destroys the requested <%= ns_file_name %>" do
141
- <%= file_name %> = <%= class_name %>.create! valid_attributes
142
- expect {
143
- delete :destroy, { :id => <%= file_name %>.to_param }, valid_session
144
- }.to change(<%= class_name %>, :count).by(-1)
145
- end
146
-
147
- it "redirects to the <%= table_name %> list" do
148
- <%= file_name %> = <%= class_name %>.create! valid_attributes
149
- delete :destroy, { :id => <%= file_name %>.to_param }, valid_session
150
- expect(response).to redirect_to(<%= index_helper %>_url)
151
- end
152
- end
153
-
154
- end
155
- <% end -%>
@@ -1,18 +0,0 @@
1
- require 'spec_helper'
2
-
3
- <% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%>
4
- describe "<%= ns_table_name %>/edit" do
5
- before(:each) do
6
- @<%= ns_file_name %> = assign(:<%= ns_file_name %>, build_stubbed(:<%= class_name.underscore %>))
7
- end
8
-
9
- it "renders the edit <%= ns_file_name %> form" do
10
- render
11
-
12
- assert_select "form", action: <%= index_helper %>_path(@<%= ns_file_name %>), method: "post" do
13
- <% for attribute in output_attributes -%>
14
- assert_select "<%= attribute.input_type -%>#<%= ns_file_name %>_<%= attribute.name %>", name: "<%= ns_file_name %>[<%= attribute.name %>]"
15
- <% end -%>
16
- end
17
- end
18
- end
@@ -1,26 +0,0 @@
1
- require 'spec_helper'
2
-
3
- <% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%>
4
- describe "<%= ns_table_name %>/index" do
5
- before(:each) do
6
- assign(:<%= table_name %>, [
7
- <% [1,2].each_with_index do |id, model_index| -%>
8
- build_stubbed(:<%= class_name.underscore %><%= output_attributes.empty? ? (model_index == 1 ? ')' : '),') : ',' %>
9
- <% output_attributes.each_with_index do |attribute, attribute_index| -%>
10
- <%= attribute.name %>: <%= value_for(attribute) %><%= attribute_index == output_attributes.length - 1 ? '' : ','%>
11
- <% end -%>
12
- <% if !output_attributes.empty? -%>
13
- <%= model_index == 1 ? ')' : '),' %>
14
- <% end -%>
15
- <% end -%>
16
- ])
17
- end
18
-
19
- it "renders a list of <%= ns_table_name %>" do
20
- render
21
-
22
- <% for attribute in output_attributes -%>
23
- assert_select "tr>td", text: <%= value_for(attribute) %>.to_s, count: 2
24
- <% end -%>
25
- end
26
- end
@@ -1,19 +0,0 @@
1
- require 'spec_helper'
2
-
3
- <% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%>
4
- describe "<%= ns_table_name %>/new" do
5
- before(:each) do
6
- assign(:<%= ns_file_name %>, build_stubbed(:<%= class_name.underscore %>))
7
- end
8
-
9
- it "renders new <%= ns_file_name %> form" do
10
- render
11
-
12
- assert_select "form", action: <%= index_helper %>_path, method: "post" do
13
- <% for attribute in output_attributes -%>
14
- assert_select "<%= attribute.input_type -%>#<%= ns_file_name %>_<%= attribute.name %>", name: "<%= ns_file_name %>[<%= attribute.name %>]"
15
- <% end -%>
16
- end
17
- end
18
- end
19
-
@@ -1,16 +0,0 @@
1
- require 'spec_helper'
2
-
3
- <% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%>
4
- describe "<%= ns_table_name %>/show" do
5
- before(:each) do
6
- @<%= ns_file_name %> = assign(:<%= ns_file_name %>, build_stubbed(:<%= class_name.underscore %>))
7
- end
8
-
9
- it "renders attributes" do
10
- render
11
-
12
- <% for attribute in output_attributes -%>
13
- expect(rendered).to match(/<%= eval(value_for(attribute)) %>/)
14
- <% end -%>
15
- end
16
- end
@@ -1,13 +0,0 @@
1
- = simple_form_for(@<%= singular_table_name %>) do |f|
2
- = f.error_notification
3
-
4
- .form-inputs
5
- <%- attributes.each_with_index do |attribute, i| -%>
6
- = f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %><%= ', autofocus: true' if i == 0 %>
7
- <%- end -%>
8
-
9
- .form-actions
10
- = f.button :submit, class: 'btn btn-primary'
11
- '
12
- = link_to 'Back', <%= index_helper %>_path, class: 'btn'
13
-
@@ -1,5 +0,0 @@
1
- .page-header
2
- h1 Editing <%= singular_table_name %>
3
-
4
- == render 'form'
5
-
@@ -1,29 +0,0 @@
1
- div.page-header
2
- h1 Listing <%= plural_table_name %>
3
-
4
- table.table.table-striped
5
- thead
6
- tr
7
- th ID
8
- <% attributes.each do |attribute| -%>
9
- th <%= attribute.human_name %>
10
- <% end -%>
11
- th Actions
12
-
13
- tbody
14
- - @<%= plural_table_name %>.each do |<%= singular_table_name %>|
15
- tr
16
- /td= link_to_if can?(:show, <%= singular_table_name %>), <%= singular_table_name %>.id, <%= singular_table_name %>_path(<%= singular_table_name %>)
17
- td= link_to <%= singular_table_name %>.id, <%= singular_table_name %>_path(<%= singular_table_name %>)
18
- <% attributes.each do |attribute| -%>
19
- td= <%= singular_table_name %>.<%= attribute.name %>
20
- <% end -%>
21
- td
22
- /- if can? :edit, <%= singular_table_name %>
23
- = link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: 'btn btn-mini'
24
- '
25
- /- if can? :destroy, <%= singular_table_name %>
26
- = link_to 'Destroy', <%= singular_table_name %>_path(<%= singular_table_name %>), method: :delete, data: { confirm: "Are you sure?" }, class: 'btn btn-mini btn-danger'
27
-
28
- /- if can? :create, <%= singular_table_name.classify %>
29
- = link_to 'New <%= human_name %>', new_<%= singular_table_name %>_path, class: 'btn btn-primary'
@@ -1,4 +0,0 @@
1
- .page-header
2
- h1 Create <%= singular_table_name %>
3
-
4
- == render 'form'
@@ -1,17 +0,0 @@
1
- .page-header
2
- h1 <%= singular_table_name.capitalize %>
3
-
4
- dl
5
- <% attributes.each do |attribute| -%>
6
- dt <%= attribute.human_name %>
7
- dd= @<%= singular_table_name %>.<%= attribute.name %>
8
- <% end -%>
9
-
10
- /- if can?(:edit, @<%= singular_table_name %>)
11
- = link_to 'Edit', edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), class: 'btn'
12
- '
13
- = link_to 'Back', <%= index_helper %>_path, class: 'btn'
14
-
15
- /- if can?(:destroy, @<%= singular_table_name %>)
16
- '
17
- = link_to'Destroy', <%= singular_table_name %>_path(@<%= singular_table_name %>), method: :delete, data: { confirm: "Are you sure?" }, class: 'btn btn-danger'
data/rails_40/log/.keep DELETED
File without changes
@@ -1,58 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The page you were looking for doesn't exist (404)</title>
5
- <style>
6
- body {
7
- background-color: #EFEFEF;
8
- color: #2E2F30;
9
- text-align: center;
10
- font-family: arial, sans-serif;
11
- }
12
-
13
- div.dialog {
14
- width: 25em;
15
- margin: 4em auto 0 auto;
16
- border: 1px solid #CCC;
17
- border-right-color: #999;
18
- border-left-color: #999;
19
- border-bottom-color: #BBB;
20
- border-top: #B00100 solid 4px;
21
- border-top-left-radius: 9px;
22
- border-top-right-radius: 9px;
23
- background-color: white;
24
- padding: 7px 4em 0 4em;
25
- }
26
-
27
- h1 {
28
- font-size: 100%;
29
- color: #730E15;
30
- line-height: 1.5em;
31
- }
32
-
33
- body > p {
34
- width: 33em;
35
- margin: 0 auto 1em;
36
- padding: 1em 0;
37
- background-color: #F7F7F7;
38
- border: 1px solid #CCC;
39
- border-right-color: #999;
40
- border-bottom-color: #999;
41
- border-bottom-left-radius: 4px;
42
- border-bottom-right-radius: 4px;
43
- border-top-color: #DADADA;
44
- color: #666;
45
- box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
- }
47
- </style>
48
- </head>
49
-
50
- <body>
51
- <!-- This file lives in public/404.html -->
52
- <div class="dialog">
53
- <h1>The page you were looking for doesn't exist.</h1>
54
- <p>You may have mistyped the address or the page may have moved.</p>
55
- </div>
56
- <p>If you are the application owner check the logs for more information.</p>
57
- </body>
58
- </html>
@@ -1,58 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The change you wanted was rejected (422)</title>
5
- <style>
6
- body {
7
- background-color: #EFEFEF;
8
- color: #2E2F30;
9
- text-align: center;
10
- font-family: arial, sans-serif;
11
- }
12
-
13
- div.dialog {
14
- width: 25em;
15
- margin: 4em auto 0 auto;
16
- border: 1px solid #CCC;
17
- border-right-color: #999;
18
- border-left-color: #999;
19
- border-bottom-color: #BBB;
20
- border-top: #B00100 solid 4px;
21
- border-top-left-radius: 9px;
22
- border-top-right-radius: 9px;
23
- background-color: white;
24
- padding: 7px 4em 0 4em;
25
- }
26
-
27
- h1 {
28
- font-size: 100%;
29
- color: #730E15;
30
- line-height: 1.5em;
31
- }
32
-
33
- body > p {
34
- width: 33em;
35
- margin: 0 auto 1em;
36
- padding: 1em 0;
37
- background-color: #F7F7F7;
38
- border: 1px solid #CCC;
39
- border-right-color: #999;
40
- border-bottom-color: #999;
41
- border-bottom-left-radius: 4px;
42
- border-bottom-right-radius: 4px;
43
- border-top-color: #DADADA;
44
- color: #666;
45
- box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
- }
47
- </style>
48
- </head>
49
-
50
- <body>
51
- <!-- This file lives in public/422.html -->
52
- <div class="dialog">
53
- <h1>The change you wanted was rejected.</h1>
54
- <p>Maybe you tried to change something you didn't have access to.</p>
55
- </div>
56
- <p>If you are the application owner check the logs for more information.</p>
57
- </body>
58
- </html>
@@ -1,57 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>We're sorry, but something went wrong (500)</title>
5
- <style>
6
- body {
7
- background-color: #EFEFEF;
8
- color: #2E2F30;
9
- text-align: center;
10
- font-family: arial, sans-serif;
11
- }
12
-
13
- div.dialog {
14
- width: 25em;
15
- margin: 4em auto 0 auto;
16
- border: 1px solid #CCC;
17
- border-right-color: #999;
18
- border-left-color: #999;
19
- border-bottom-color: #BBB;
20
- border-top: #B00100 solid 4px;
21
- border-top-left-radius: 9px;
22
- border-top-right-radius: 9px;
23
- background-color: white;
24
- padding: 7px 4em 0 4em;
25
- }
26
-
27
- h1 {
28
- font-size: 100%;
29
- color: #730E15;
30
- line-height: 1.5em;
31
- }
32
-
33
- body > p {
34
- width: 33em;
35
- margin: 0 auto 1em;
36
- padding: 1em 0;
37
- background-color: #F7F7F7;
38
- border: 1px solid #CCC;
39
- border-right-color: #999;
40
- border-bottom-color: #999;
41
- border-bottom-left-radius: 4px;
42
- border-bottom-right-radius: 4px;
43
- border-top-color: #DADADA;
44
- color: #666;
45
- box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
- }
47
- </style>
48
- </head>
49
-
50
- <body>
51
- <!-- This file lives in public/500.html -->
52
- <div class="dialog">
53
- <h1>We're sorry, but something went wrong.</h1>
54
- </div>
55
- <p>If you are the application owner check the logs for more information.</p>
56
- </body>
57
- </html>
File without changes
@@ -1,5 +0,0 @@
1
- # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
- #
3
- # To ban all spiders from the entire site uncomment the next two lines:
4
- # User-agent: *
5
- # Disallow: /
@@ -1,12 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe PagesController do
4
-
5
- describe "GET 'root'" do
6
- it "returns http success" do
7
- get 'root'
8
- expect(response).to be_success
9
- end
10
- end
11
-
12
- end
@@ -1,18 +0,0 @@
1
- require 'spec_helper'
2
-
3
- feature "Static Pages" do
4
-
5
- # Here's a placeholder feature spec to use as an example, uses the default driver.
6
- scenario "/ should include the application name in its title" do
7
- visit root_path
8
-
9
- expect(page).to have_title "App Prototype"
10
- end
11
-
12
- # Another contrived example, this one relies on the javascript driver.
13
- scenario "/ should include the warm closing text 'Enjoy!'", js: true do
14
- visit root_path
15
-
16
- expect(page).to have_content "Enjoy!"
17
- end
18
- end
@@ -1,20 +0,0 @@
1
- # This is an example spec, delete when there are some real specs.
2
-
3
- class Foo
4
- bar: ->
5
- false
6
-
7
- class Bar
8
- foo: ->
9
- false
10
-
11
-
12
- describe "Foo", ->
13
- it "it is not bar", ->
14
- v = new Foo()
15
- expect(v.bar()).toEqual(false)
16
-
17
- describe "Bar", ->
18
- it "it is not foo", ->
19
- v = new Bar()
20
- expect(v.foo()).toEqual(false)
@@ -1,3 +0,0 @@
1
- /*
2
- *=require application
3
- */
@@ -1,2 +0,0 @@
1
- #=require application
2
- #=require_tree ./