active_mocker 1.4.2 → 1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/README.md +35 -29
  4. data/lib/active_mocker.rb +3 -1
  5. data/lib/active_mocker/active_record.rb +27 -5
  6. data/lib/active_mocker/active_record/scope.rb +5 -5
  7. data/lib/active_mocker/active_record/unknown_module.rb +4 -4
  8. data/lib/active_mocker/generate.rb +36 -15
  9. data/lib/active_mocker/loaded_mocks.rb +60 -54
  10. data/lib/active_mocker/mock.rb +24 -0
  11. data/lib/active_mocker/mock/association.rb +6 -0
  12. data/lib/{active_mock → active_mocker/mock}/base.rb +43 -89
  13. data/lib/{active_mock → active_mocker/mock}/collection.rb +14 -7
  14. data/lib/{active_mock → active_mocker/mock}/do_nothing_active_record_methods.rb +7 -1
  15. data/lib/active_mocker/mock/exceptions.rb +25 -0
  16. data/lib/active_mocker/mock/has_and_belongs_to_many.rb +6 -0
  17. data/lib/active_mocker/mock/has_many.rb +60 -0
  18. data/lib/active_mocker/mock/hash_process.rb +19 -0
  19. data/lib/active_mocker/mock/mock_abilities.rb +98 -0
  20. data/lib/{active_mock → active_mocker/mock}/next_id.rb +7 -2
  21. data/lib/{active_mock → active_mocker/mock}/object_inspect.rb +3 -1
  22. data/lib/{active_mock → active_mocker/mock}/queries.rb +32 -29
  23. data/lib/active_mocker/mock/records.rb +62 -0
  24. data/lib/{active_mock → active_mocker/mock}/relation.rb +4 -3
  25. data/lib/active_mocker/mock/template_methods.rb +39 -0
  26. data/lib/active_mocker/mock_template.erb +45 -31
  27. data/lib/active_mocker/model_reader.rb +29 -0
  28. data/lib/active_mocker/model_schema.rb +23 -16
  29. data/lib/active_mocker/model_schema/generate.rb +19 -8
  30. data/lib/active_mocker/railtie.rb +17 -0
  31. data/lib/active_mocker/reparameterize.rb +2 -4
  32. data/lib/active_mocker/rspec_helper.rb +18 -0
  33. data/lib/active_mocker/task.rake +15 -0
  34. data/lib/active_mocker/version.rb +1 -1
  35. metadata +80 -206
  36. data/.gitignore +0 -19
  37. data/.hound.yml +0 -0
  38. data/.travis.yml +0 -5
  39. data/Gemfile +0 -4
  40. data/Rakefile +0 -26
  41. data/active_mocker.gemspec +0 -40
  42. data/lib/active_mock/association.rb +0 -7
  43. data/lib/active_mock/creators.rb +0 -25
  44. data/lib/active_mock/has_and_belongs_to_many.rb +0 -7
  45. data/lib/active_mock/has_many.rb +0 -54
  46. data/lib/active_mock/records.rb +0 -83
  47. data/lib/active_mocker/active_mock.rb +0 -26
  48. data/lib/active_mocker/active_record/const_missing.rb +0 -5
  49. data/lib/active_mocker/class_exists.rb +0 -12
  50. data/lib/active_mocker/const_sets.rb +0 -24
  51. data/lib/active_mocker/mock_task.rb +0 -12
  52. data/sample_app_rails_4/.idea/.generators +0 -8
  53. data/sample_app_rails_4/.idea/.name +0 -1
  54. data/sample_app_rails_4/.idea/.rakeTasks +0 -7
  55. data/sample_app_rails_4/.idea/dataSources.ids +0 -141
  56. data/sample_app_rails_4/.idea/dataSources.xml +0 -36
  57. data/sample_app_rails_4/.idea/dictionaries/zeisler.xml +0 -3
  58. data/sample_app_rails_4/.idea/encodings.xml +0 -5
  59. data/sample_app_rails_4/.idea/inspectionProfiles/Project_Default.xml +0 -20
  60. data/sample_app_rails_4/.idea/inspectionProfiles/profiles_settings.xml +0 -7
  61. data/sample_app_rails_4/.idea/misc.xml +0 -5
  62. data/sample_app_rails_4/.idea/modules.xml +0 -10
  63. data/sample_app_rails_4/.idea/runConfigurations/Development__sample_app_rails_4.xml +0 -28
  64. data/sample_app_rails_4/.idea/runConfigurations/Production__sample_app_rails_4.xml +0 -28
  65. data/sample_app_rails_4/.idea/runConfigurations/spec__sample_app_rails_4.xml +0 -26
  66. data/sample_app_rails_4/.idea/runConfigurations/test__sample_app_rails_4.xml +0 -28
  67. data/sample_app_rails_4/.idea/sample_app_rails_4.iml +0 -262
  68. data/sample_app_rails_4/.idea/scopes/scope_settings.xml +0 -5
  69. data/sample_app_rails_4/.idea/vcs.xml +0 -7
  70. data/sample_app_rails_4/.idea/workspace.xml +0 -619
  71. data/sample_app_rails_4/.rspec +0 -1
  72. data/sample_app_rails_4/.secret +0 -1
  73. data/sample_app_rails_4/Gemfile +0 -13
  74. data/sample_app_rails_4/Guardfile +0 -53
  75. data/sample_app_rails_4/LICENSE +0 -21
  76. data/sample_app_rails_4/README.md +0 -25
  77. data/sample_app_rails_4/README.nitrous.md +0 -20
  78. data/sample_app_rails_4/Rakefile +0 -6
  79. data/sample_app_rails_4/app/assets/images/rails.png +0 -0
  80. data/sample_app_rails_4/app/assets/javascripts/application.js +0 -17
  81. data/sample_app_rails_4/app/assets/javascripts/sessions.js.coffee +0 -3
  82. data/sample_app_rails_4/app/assets/javascripts/static_pages.js.coffee +0 -3
  83. data/sample_app_rails_4/app/assets/javascripts/users.js.coffee +0 -3
  84. data/sample_app_rails_4/app/assets/stylesheets/application.css +0 -13
  85. data/sample_app_rails_4/app/assets/stylesheets/custom.css.scss +0 -246
  86. data/sample_app_rails_4/app/assets/stylesheets/sessions.css.scss +0 -3
  87. data/sample_app_rails_4/app/assets/stylesheets/static_pages.css.scss +0 -3
  88. data/sample_app_rails_4/app/assets/stylesheets/users.css.scss +0 -3
  89. data/sample_app_rails_4/app/controllers/application_controller.rb +0 -6
  90. data/sample_app_rails_4/app/controllers/concerns/.keep +0 -0
  91. data/sample_app_rails_4/app/controllers/microposts_controller.rb +0 -31
  92. data/sample_app_rails_4/app/controllers/relationships_controller.rb +0 -21
  93. data/sample_app_rails_4/app/controllers/sessions_controller.rb +0 -21
  94. data/sample_app_rails_4/app/controllers/static_pages_controller.rb +0 -18
  95. data/sample_app_rails_4/app/controllers/users_controller.rb +0 -80
  96. data/sample_app_rails_4/app/helpers/application_helper.rb +0 -12
  97. data/sample_app_rails_4/app/helpers/sessions_helper.rb +0 -49
  98. data/sample_app_rails_4/app/helpers/static_pages_helper.rb +0 -2
  99. data/sample_app_rails_4/app/helpers/users_helper.rb +0 -10
  100. data/sample_app_rails_4/app/mailers/.keep +0 -0
  101. data/sample_app_rails_4/app/models/.keep +0 -0
  102. data/sample_app_rails_4/app/models/concerns/.keep +0 -0
  103. data/sample_app_rails_4/app/models/micropost.rb +0 -24
  104. data/sample_app_rails_4/app/models/relationship.rb +0 -6
  105. data/sample_app_rails_4/app/models/user.rb +0 -39
  106. data/sample_app_rails_4/app/views/layouts/_footer.html.erb +0 -13
  107. data/sample_app_rails_4/app/views/layouts/_header.html.erb +0 -31
  108. data/sample_app_rails_4/app/views/layouts/_shim.html.erb +0 -3
  109. data/sample_app_rails_4/app/views/layouts/application.html.erb +0 -22
  110. data/sample_app_rails_4/app/views/microposts/_micropost.html.erb +0 -11
  111. data/sample_app_rails_4/app/views/relationships/create.js.erb +0 -2
  112. data/sample_app_rails_4/app/views/relationships/destroy.js.erb +0 -2
  113. data/sample_app_rails_4/app/views/sessions/new.html.erb +0 -19
  114. data/sample_app_rails_4/app/views/shared/_error_messages.html.erb +0 -12
  115. data/sample_app_rails_4/app/views/shared/_feed.html.erb +0 -6
  116. data/sample_app_rails_4/app/views/shared/_feed_item.html.erb +0 -15
  117. data/sample_app_rails_4/app/views/shared/_micropost_form.html.erb +0 -7
  118. data/sample_app_rails_4/app/views/shared/_stats.html.erb +0 -15
  119. data/sample_app_rails_4/app/views/shared/_user_info.html.erb +0 -12
  120. data/sample_app_rails_4/app/views/static_pages/about.html.erb +0 -8
  121. data/sample_app_rails_4/app/views/static_pages/contact.html.erb +0 -6
  122. data/sample_app_rails_4/app/views/static_pages/help.html.erb +0 -8
  123. data/sample_app_rails_4/app/views/static_pages/home.html.erb +0 -34
  124. data/sample_app_rails_4/app/views/static_pages/show.html.erb +0 -0
  125. data/sample_app_rails_4/app/views/users/_follow.html.erb +0 -5
  126. data/sample_app_rails_4/app/views/users/_follow_form.html.erb +0 -9
  127. data/sample_app_rails_4/app/views/users/_unfollow.html.erb +0 -5
  128. data/sample_app_rails_4/app/views/users/_user.html.erb +0 -8
  129. data/sample_app_rails_4/app/views/users/edit.html.erb +0 -27
  130. data/sample_app_rails_4/app/views/users/index.html.erb +0 -10
  131. data/sample_app_rails_4/app/views/users/new.html.erb +0 -24
  132. data/sample_app_rails_4/app/views/users/show.html.erb +0 -24
  133. data/sample_app_rails_4/app/views/users/show_follow.html.erb +0 -30
  134. data/sample_app_rails_4/bin/bundle +0 -3
  135. data/sample_app_rails_4/bin/rails +0 -4
  136. data/sample_app_rails_4/bin/rake +0 -4
  137. data/sample_app_rails_4/bin/rspec +0 -16
  138. data/sample_app_rails_4/config.ru +0 -4
  139. data/sample_app_rails_4/config/application.rb +0 -28
  140. data/sample_app_rails_4/config/boot.rb +0 -4
  141. data/sample_app_rails_4/config/database.yml +0 -27
  142. data/sample_app_rails_4/config/environment.rb +0 -5
  143. data/sample_app_rails_4/config/environments/development.rb +0 -25
  144. data/sample_app_rails_4/config/environments/production.rb +0 -79
  145. data/sample_app_rails_4/config/environments/test.rb +0 -38
  146. data/sample_app_rails_4/config/initializers/active_mocker.rb +0 -12
  147. data/sample_app_rails_4/config/initializers/backtrace_silencers.rb +0 -7
  148. data/sample_app_rails_4/config/initializers/filter_parameter_logging.rb +0 -4
  149. data/sample_app_rails_4/config/initializers/inflections.rb +0 -16
  150. data/sample_app_rails_4/config/initializers/mime_types.rb +0 -5
  151. data/sample_app_rails_4/config/initializers/secret_token.rb +0 -22
  152. data/sample_app_rails_4/config/initializers/session_store.rb +0 -3
  153. data/sample_app_rails_4/config/initializers/wrap_parameters.rb +0 -14
  154. data/sample_app_rails_4/config/locales/en.yml +0 -23
  155. data/sample_app_rails_4/config/routes.rb +0 -17
  156. data/sample_app_rails_4/db/migrate/20130311191400_create_users.rb +0 -10
  157. data/sample_app_rails_4/db/migrate/20130311194153_add_index_to_users_email.rb +0 -5
  158. data/sample_app_rails_4/db/migrate/20130311201841_add_password_digest_to_users.rb +0 -5
  159. data/sample_app_rails_4/db/migrate/20130314184954_add_remember_token_to_users.rb +0 -6
  160. data/sample_app_rails_4/db/migrate/20130315015932_add_admin_to_users.rb +0 -5
  161. data/sample_app_rails_4/db/migrate/20130315175534_create_microposts.rb +0 -11
  162. data/sample_app_rails_4/db/migrate/20130315230445_create_relationships.rb +0 -13
  163. data/sample_app_rails_4/db/schema.rb +0 -51
  164. data/sample_app_rails_4/db/seeds.rb +0 -7
  165. data/sample_app_rails_4/features/signing_in.feature +0 -13
  166. data/sample_app_rails_4/features/step_definitions/authentication_steps.rb +0 -30
  167. data/sample_app_rails_4/features/support/env.rb +0 -59
  168. data/sample_app_rails_4/lib/assets/.keep +0 -0
  169. data/sample_app_rails_4/lib/tasks/.keep +0 -0
  170. data/sample_app_rails_4/lib/tasks/active_mocker.rake +0 -10
  171. data/sample_app_rails_4/lib/tasks/cucumber.rake +0 -65
  172. data/sample_app_rails_4/lib/tasks/sample_data.rake +0 -42
  173. data/sample_app_rails_4/lib/unit_logger.rb +0 -22
  174. data/sample_app_rails_4/public/404.html +0 -27
  175. data/sample_app_rails_4/public/422.html +0 -26
  176. data/sample_app_rails_4/public/500.html +0 -26
  177. data/sample_app_rails_4/public/assets/application-4962059d8f80f9bb096692bacc29c4e8.css +0 -5091
  178. data/sample_app_rails_4/public/assets/application-4962059d8f80f9bb096692bacc29c4e8.css.gz +0 -0
  179. data/sample_app_rails_4/public/assets/application-eeb856e3fe2c8f879c91d0e81d59cb40.js +0 -12952
  180. data/sample_app_rails_4/public/assets/application-eeb856e3fe2c8f879c91d0e81d59cb40.js.gz +0 -0
  181. data/sample_app_rails_4/public/assets/glyphicons-halflings-c806376f05e4ccabe2c5315a8e95667c.png +0 -0
  182. data/sample_app_rails_4/public/assets/glyphicons-halflings-white-62b67d9edee3db90d18833087f848d6e.png +0 -0
  183. data/sample_app_rails_4/public/assets/manifest-802de9eb1c853769101852422b620883.json +0 -1
  184. data/sample_app_rails_4/public/assets/rails-231a680f23887d9dd70710ea5efd3c62.png +0 -0
  185. data/sample_app_rails_4/public/favicon.ico +0 -0
  186. data/sample_app_rails_4/public/robots.txt +0 -5
  187. data/sample_app_rails_4/script/cucumber +0 -10
  188. data/sample_app_rails_4/spec/compare_mocker_and_record_spec.rb +0 -1038
  189. data/sample_app_rails_4/spec/factories.rb +0 -17
  190. data/sample_app_rails_4/spec/micropost_mock_spec.rb +0 -145
  191. data/sample_app_rails_4/spec/mocks/micropost_mock.rb +0 -153
  192. data/sample_app_rails_4/spec/mocks/relationship_mock.rb +0 -151
  193. data/sample_app_rails_4/spec/mocks/user_mock.rb +0 -215
  194. data/sample_app_rails_4/spec/reload_spec.rb +0 -45
  195. data/sample_app_rails_4/spec/spec_helper.rb +0 -46
  196. data/sample_app_rails_4/spec/user_mock_spec.rb +0 -197
  197. data/sample_app_rails_4/vendor/assets/javascripts/.keep +0 -0
  198. data/sample_app_rails_4/vendor/assets/stylesheets/.keep +0 -0
  199. data/spec/lib/acitve_mock/queriable_spec.rb +0 -207
  200. data/spec/lib/active_mocker/db_to_ruby_type_spec.rb +0 -124
  201. data/spec/lib/active_mocker/generate_spec.rb +0 -40
  202. data/spec/lib/active_mocker/loaded_mocks_spec.rb +0 -167
  203. data/spec/lib/active_mocker/logger_spec.rb +0 -32
  204. data/spec/lib/active_mocker/model_reader_spec.rb +0 -206
  205. data/spec/lib/active_mocker/model_schema/generate_spec.rb +0 -111
  206. data/spec/lib/active_mocker/model_schema_spec.rb +0 -145
  207. data/spec/lib/active_mocker/schema_reader_spec.rb +0 -109
  208. data/spec/lib/model.rb +0 -43
  209. data/spec/lib/person.rb +0 -9
  210. data/spec/lib/readme_spec.rb +0 -199
  211. data/spec/lib/reparameterize_spec.rb +0 -202
  212. data/spec/lib/schema.rb +0 -40
  213. data/spec/unit_logger.rb +0 -24
@@ -1 +0,0 @@
1
- --colour
@@ -1 +0,0 @@
1
- ecccd582045b2a02cf3df1eb1bcc7d8142af080f0180aebb9f7268d50ac0bf014bfb2f73df18869d88dae22fad76b5efc00d804413bb096d424f979f3cfbd043
@@ -1,13 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'rails', '4.1'
4
-
5
- group :development, :test do
6
- gem 'sqlite3', '~>1.3'
7
- gem 'rspec-rails', '2.14.1'
8
- end
9
-
10
- group :test do
11
- gem 'active_mocker', :path => "../../active_mocker"
12
- gem 'fuubar'
13
- end
@@ -1,53 +0,0 @@
1
- # A sample Guardfile
2
- # More info at https://github.com/guard/guard#readme
3
- require 'active_support/inflector'
4
-
5
- guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' },
6
- :rspec_env => { 'RAILS_ENV' => 'test' } do
7
- watch('config/application.rb')
8
- watch('config/environment.rb')
9
- watch('config/environments/test.rb')
10
- watch(%r{^config/initializers/.+\.rb$})
11
- watch('Gemfile')
12
- watch('Gemfile.lock')
13
- watch('spec/spec_helper.rb') { :rspec }
14
- watch('test/test_helper.rb') { :test_unit }
15
- watch(%r{features/support/}) { :cucumber }
16
- end
17
-
18
- guard 'rspec', all_after_pass: false, cli: '--drb' do
19
- watch(%r{^spec/.+_spec\.rb$})
20
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
21
- watch('spec/spec_helper.rb') { "spec" }
22
-
23
- # Rails example
24
- watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
25
- watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
26
- watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
27
- watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
28
- watch('config/routes.rb') { "spec/routing" }
29
- watch('app/controllers/application_controller.rb') { "spec/controllers" }
30
-
31
- # Capybara features specs
32
- watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
33
-
34
- # Turnip features and steps
35
- watch(%r{^spec/acceptance/(.+)\.feature$})
36
- watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
37
-
38
- # Custom Rails Tutorial specs
39
- watch(%r{^app/controllers/(.+)_(controller)\.rb$}) do |m|
40
- ["spec/routing/#{m[1]}_routing_spec.rb",
41
- "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb",
42
- "spec/acceptance/#{m[1]}_spec.rb",
43
- (m[1][/_pages/] ? "spec/requests/#{m[1]}_spec.rb" :
44
- "spec/requests/#{m[1].singularize}_pages_spec.rb")]
45
- end
46
- watch(%r{^app/views/(.+)/}) do |m|
47
- (m[1][/_pages/] ? "spec/requests/#{m[1]}_spec.rb" :
48
- "spec/requests/#{m[1].singularize}_pages_spec.rb")
49
- end
50
- watch(%r{^app/controllers/sessions_controller\.rb$}) do |m|
51
- "spec/requests/authentication_pages_spec.rb"
52
- end
53
- end
@@ -1,21 +0,0 @@
1
- The MIT License
2
-
3
- Copyright (c) 2013 Michael Hartl
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
@@ -1,25 +0,0 @@
1
- # Ruby on Rails Tutorial: sample application
2
-
3
- This is the sample application for
4
- [*Ruby on Rails Tutorial: Learn Web Development with Rails*](http://railstutorial.org/)
5
- by [Michael Hartl](http://michaelhartl.com/). You can use this reference implementation to help track down errors if you end up having trouble with code in the tutorial. In particular, as a first debugging check I suggest getting the test suite to pass on your local machine:
6
-
7
- $ cd /tmp
8
- $ git clone https://github.com/railstutorial/sample_app_rails_4.git
9
- $ cd sample_app_rails_4
10
- $ cp config/database.yml.example config/database.yml
11
- $ bundle install --without production
12
- $ bundle exec rake db:migrate
13
- $ bundle exec rake db:test:prepare
14
- $ bundle exec rspec spec/
15
-
16
- If the tests don't pass, it means there may be something wrong with your system. If they do pass, then you can debug your code by comparing it with the reference implementation.
17
-
18
- ## Get Started in seconds on Nitrous.IO
19
-
20
- [Nitrous.IO](https://www.nitrous.io/?utm_source=github.com&utm_campaign=railstutorial-sample_app_rails_4&utm_medium=hackonnitrous) is a cloud-based platform that will let you start working on this project in a matter of seconds.
21
-
22
- Click on the button below to get started:
23
-
24
- [![Hack railstutorial/sample_app_rails_4 on
25
- Nitrous.IO](https://d3o0mnbgv6k92a.cloudfront.net/assets/hack-l-v1-3cc067e71372f6045e1949af9d96095b.png)](https://www.nitrous.io/hack_button?source=embed&runtime=rails&repo=railstutorial%2Fsample_app_rails_4&file_to_open=README.nitrous.md)
@@ -1,20 +0,0 @@
1
- ## Get started with railstutorial/sample_app_rails_4
2
-
3
- Run the following commands in the console below:
4
-
5
- 1. `cd ~/workspace/sample_app_rails_4`
6
- 2. `cp config/database.yml.example config/database.yml`
7
- 3. `bundle install`
8
- 4. `bundle exec rake db:migrate`
9
- 5. `bundle exec rails server`
10
-
11
- By clicking on Preview > Port 3000, you can now preview your sample
12
- Rails App.
13
-
14
- To check out more code, you can run tests, edit code and continue to
15
- iterate on this application. To run the test suite, run the following
16
- commands in the console:
17
-
18
- 1. `cd ~/workspace/sample_app_rails_4`
19
- 2. `bundle exec rake db:test:prepare`
20
- 3. `bundle exec rspec spec`
@@ -1,6 +0,0 @@
1
- # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
-
4
- require File.expand_path('../config/application', __FILE__)
5
-
6
- SampleApp::Application.load_tasks
@@ -1,17 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
9
- //
10
- // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
- // GO AFTER THE REQUIRES BELOW.
12
- //
13
- //= require jquery
14
- //= require jquery_ujs
15
- //= require turbolinks
16
- //= require bootstrap
17
- //= require_tree .
@@ -1,3 +0,0 @@
1
- # Place all the behaviors and hooks related to the matching controller here.
2
- # All this logic will automatically be available in application.js.
3
- # You can use CoffeeScript in this file: http://coffeescript.org/
@@ -1,3 +0,0 @@
1
- # Place all the behaviors and hooks related to the matching controller here.
2
- # All this logic will automatically be available in application.js.
3
- # You can use CoffeeScript in this file: http://coffeescript.org/
@@ -1,3 +0,0 @@
1
- # Place all the behaviors and hooks related to the matching controller here.
2
- # All this logic will automatically be available in application.js.
3
- # You can use CoffeeScript in this file: http://coffeescript.org/
@@ -1,13 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
10
- *
11
- *= require_self
12
- *= require_tree .
13
- */
@@ -1,246 +0,0 @@
1
- @import "bootstrap";
2
-
3
- /* mixins, variables, etc. */
4
-
5
- $grayMediumLight: #eaeaea;
6
-
7
- @mixin box_sizing {
8
- -moz-box-sizing: border-box;
9
- -webkit-box-sizing: border-box;
10
- box-sizing: border-box;
11
- }
12
-
13
- /* universal */
14
-
15
- html {
16
- overflow-y: scroll;
17
- }
18
-
19
- body {
20
- padding-top: 60px;
21
- }
22
-
23
- section {
24
- overflow: auto;
25
- }
26
-
27
- textarea {
28
- resize: vertical;
29
- }
30
-
31
- .center {
32
- text-align: center;
33
- h1 {
34
- margin-bottom: 10px;
35
- }
36
- }
37
-
38
- /* typography */
39
-
40
- h1, h2, h3, h4, h5, h6 {
41
- line-height: 1;
42
- }
43
-
44
- h1 {
45
- font-size: 3em;
46
- letter-spacing: -2px;
47
- margin-bottom: 30px;
48
- text-align: center;
49
- }
50
-
51
- h2 {
52
- font-size: 1.2em;
53
- letter-spacing: -1px;
54
- margin-bottom: 30px;
55
- text-align: center;
56
- font-weight: normal;
57
- color: $grayLight;
58
- }
59
-
60
- p {
61
- font-size: 1.1em;
62
- line-height: 1.7em;
63
- }
64
-
65
-
66
- /* header */
67
-
68
- #logo {
69
- float: left;
70
- margin-right: 10px;
71
- font-size: 1.7em;
72
- color: white;
73
- text-transform: uppercase;
74
- letter-spacing: -1px;
75
- padding-top: 9px;
76
- font-weight: bold;
77
- line-height: 1;
78
- &:hover {
79
- color: white;
80
- text-decoration: none;
81
- }
82
- }
83
-
84
- /* footer */
85
-
86
- footer {
87
- margin-top: 45px;
88
- padding-top: 5px;
89
- border-top: 1px solid $grayMediumLight;
90
- color: $grayLight;
91
- a {
92
- color: $gray;
93
- &:hover {
94
- color: $grayDarker;
95
- }
96
- }
97
- small {
98
- float: left;
99
- }
100
- ul {
101
- float: right;
102
- list-style: none;
103
- li {
104
- float: left;
105
- margin-left: 10px;
106
- }
107
- }
108
- }
109
-
110
- /* miscellaneous */
111
-
112
- .debug_dump {
113
- clear: both;
114
- float: left;
115
- width: 100%;
116
- margin-top: 45px;
117
- @include box_sizing;
118
- }
119
-
120
- /* sidebar */
121
-
122
- aside {
123
- section {
124
- padding: 10px 0;
125
- border-top: 1px solid $grayLighter;
126
- &:first-child {
127
- border: 0;
128
- padding-top: 0;
129
- }
130
- span {
131
- display: block;
132
- margin-bottom: 3px;
133
- line-height: 1;
134
- }
135
- h1 {
136
- font-size: 1.4em;
137
- text-align: left;
138
- letter-spacing: -1px;
139
- margin-bottom: 3px;
140
- margin-top: 0px;
141
- }
142
- }
143
- }
144
-
145
- .gravatar {
146
- float: left;
147
- margin-right: 10px;
148
- }
149
-
150
- .stats {
151
- overflow: auto;
152
- a {
153
- float: left;
154
- padding: 0 10px;
155
- border-left: 1px solid $grayLighter;
156
- color: gray;
157
- &:first-child {
158
- padding-left: 0;
159
- border: 0;
160
- }
161
- &:hover {
162
- text-decoration: none;
163
- color: $blue;
164
- }
165
- }
166
- strong {
167
- display: block;
168
- }
169
- }
170
-
171
- .user_avatars {
172
- overflow: auto;
173
- margin-top: 10px;
174
- .gravatar {
175
- margin: 1px 1px;
176
- }
177
- }
178
-
179
- /* forms */
180
-
181
- input, textarea, select, .uneditable-input {
182
- border: 1px solid #bbb;
183
- width: 100%;
184
- margin-bottom: 15px;
185
- @include box_sizing;
186
- }
187
-
188
- input {
189
- height: auto !important;
190
- }
191
-
192
- #error_explanation {
193
- color: #f00;
194
- ul {
195
- list-style: none;
196
- margin: 0 0 18px 0;
197
- }
198
- }
199
-
200
- .field_with_errors {
201
- @extend .control-group;
202
- @extend .error;
203
- }
204
-
205
- /* Users index */
206
-
207
- .users {
208
- list-style: none;
209
- margin: 0;
210
- li {
211
- overflow: auto;
212
- padding: 10px 0;
213
- border-top: 1px solid $grayLighter;
214
- &:last-child {
215
- border-bottom: 1px solid $grayLighter;
216
- }
217
- }
218
- }
219
-
220
- /* microposts */
221
-
222
- .microposts {
223
- list-style: none;
224
- margin: 10px 0 0 0;
225
-
226
- li {
227
- padding: 10px 0;
228
- border-top: 1px solid #e8e8e8;
229
- }
230
- }
231
- .content {
232
- display: block;
233
- }
234
- .timestamp {
235
- color: $grayLight;
236
- }
237
- .gravatar {
238
- float: left;
239
- margin-right: 10px;
240
- }
241
- aside {
242
- textarea {
243
- height: 100px;
244
- margin-bottom: 5px;
245
- }
246
- }