dejavu 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. data/.gitignore +22 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +6 -0
  4. data/README.md +73 -0
  5. data/Rakefile +2 -0
  6. data/dejavu.gemspec +21 -0
  7. data/lib/dejavu/version.rb +3 -0
  8. data/lib/dejavu.rb +37 -0
  9. data/spec/integration/dejavu_spec.rb +48 -0
  10. data/spec/spec_helper.rb +18 -0
  11. data/spec/support/fields.rb +3 -0
  12. data/test_app/.gitignore +0 -0
  13. data/test_app/Gemfile +37 -0
  14. data/test_app/README +261 -0
  15. data/test_app/Rakefile +7 -0
  16. data/test_app/app/assets/images/rails.png +0 -0
  17. data/test_app/app/assets/javascripts/application.js +9 -0
  18. data/test_app/app/assets/javascripts/products.js.coffee +3 -0
  19. data/test_app/app/assets/stylesheets/application.css +7 -0
  20. data/test_app/app/assets/stylesheets/products.css.scss +3 -0
  21. data/test_app/app/assets/stylesheets/scaffolds.css.scss +56 -0
  22. data/test_app/app/controllers/application_controller.rb +3 -0
  23. data/test_app/app/controllers/products_controller.rb +85 -0
  24. data/test_app/app/helpers/application_helper.rb +2 -0
  25. data/test_app/app/helpers/products_helper.rb +2 -0
  26. data/test_app/app/mailers/.gitkeep +0 -0
  27. data/test_app/app/models/.gitkeep +0 -0
  28. data/test_app/app/models/product.rb +5 -0
  29. data/test_app/app/views/layouts/application.html.erb +14 -0
  30. data/test_app/app/views/products/_form.html.erb +25 -0
  31. data/test_app/app/views/products/edit.html.erb +6 -0
  32. data/test_app/app/views/products/index.html.erb +25 -0
  33. data/test_app/app/views/products/new.html.erb +5 -0
  34. data/test_app/app/views/products/show.html.erb +15 -0
  35. data/test_app/config/application.rb +48 -0
  36. data/test_app/config/boot.rb +6 -0
  37. data/test_app/config/database.yml +25 -0
  38. data/test_app/config/environment.rb +5 -0
  39. data/test_app/config/environments/development.rb +30 -0
  40. data/test_app/config/environments/production.rb +60 -0
  41. data/test_app/config/environments/test.rb +39 -0
  42. data/test_app/config/initializers/backtrace_silencers.rb +7 -0
  43. data/test_app/config/initializers/inflections.rb +10 -0
  44. data/test_app/config/initializers/mime_types.rb +5 -0
  45. data/test_app/config/initializers/secret_token.rb +7 -0
  46. data/test_app/config/initializers/session_store.rb +8 -0
  47. data/test_app/config/initializers/wrap_parameters.rb +14 -0
  48. data/test_app/config/locales/en.yml +5 -0
  49. data/test_app/config/routes.rb +5 -0
  50. data/test_app/config.ru +4 -0
  51. data/test_app/db/migrate/20111227135944_create_products.rb +10 -0
  52. data/test_app/db/schema.rb +23 -0
  53. data/test_app/db/seeds.rb +7 -0
  54. data/test_app/lib/assets/.gitkeep +0 -0
  55. data/test_app/lib/tasks/.gitkeep +0 -0
  56. data/test_app/log/.gitkeep +0 -0
  57. data/test_app/public/404.html +26 -0
  58. data/test_app/public/422.html +26 -0
  59. data/test_app/public/500.html +26 -0
  60. data/test_app/public/favicon.ico +0 -0
  61. data/test_app/public/robots.txt +5 -0
  62. data/test_app/script/rails +6 -0
  63. data/test_app/test/fixtures/.gitkeep +0 -0
  64. data/test_app/test/fixtures/products.yml +9 -0
  65. data/test_app/test/functional/.gitkeep +0 -0
  66. data/test_app/test/functional/products_controller_test.rb +49 -0
  67. data/test_app/test/integration/.gitkeep +0 -0
  68. data/test_app/test/performance/browsing_test.rb +12 -0
  69. data/test_app/test/test_helper.rb +13 -0
  70. data/test_app/test/unit/.gitkeep +0 -0
  71. data/test_app/test/unit/helpers/products_helper_test.rb +4 -0
  72. data/test_app/test/unit/product_test.rb +7 -0
  73. data/test_app/vendor/assets/stylesheets/.gitkeep +0 -0
  74. data/test_app/vendor/plugins/.gitkeep +0 -0
  75. metadata +158 -0
@@ -0,0 +1,9 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ one:
4
+ name: MyString
5
+ code: MyString
6
+
7
+ two:
8
+ name: MyString
9
+ code: MyString
File without changes
@@ -0,0 +1,49 @@
1
+ require 'test_helper'
2
+
3
+ class ProductsControllerTest < ActionController::TestCase
4
+ setup do
5
+ @product = products(:one)
6
+ end
7
+
8
+ test "should get index" do
9
+ get :index
10
+ assert_response :success
11
+ assert_not_nil assigns(:products)
12
+ end
13
+
14
+ test "should get new" do
15
+ get :new
16
+ assert_response :success
17
+ end
18
+
19
+ test "should create product" do
20
+ assert_difference('Product.count') do
21
+ post :create, product: @product.attributes
22
+ end
23
+
24
+ assert_redirected_to product_path(assigns(:product))
25
+ end
26
+
27
+ test "should show product" do
28
+ get :show, id: @product.to_param
29
+ assert_response :success
30
+ end
31
+
32
+ test "should get edit" do
33
+ get :edit, id: @product.to_param
34
+ assert_response :success
35
+ end
36
+
37
+ test "should update product" do
38
+ put :update, id: @product.to_param, product: @product.attributes
39
+ assert_redirected_to product_path(assigns(:product))
40
+ end
41
+
42
+ test "should destroy product" do
43
+ assert_difference('Product.count', -1) do
44
+ delete :destroy, id: @product.to_param
45
+ end
46
+
47
+ assert_redirected_to products_path
48
+ end
49
+ end
File without changes
@@ -0,0 +1,12 @@
1
+ require 'test_helper'
2
+ require 'rails/performance_test_help'
3
+
4
+ class BrowsingTest < ActionDispatch::PerformanceTest
5
+ # Refer to the documentation for all available options
6
+ # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
7
+ # :output => 'tmp/performance', :formats => [:flat] }
8
+
9
+ def test_homepage
10
+ get '/'
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ ENV["RAILS_ENV"] = "test"
2
+ require File.expand_path('../../config/environment', __FILE__)
3
+ require 'rails/test_help'
4
+
5
+ class ActiveSupport::TestCase
6
+ # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
7
+ #
8
+ # Note: You'll currently still have to declare fixtures explicitly in integration tests
9
+ # -- they do not yet inherit this setting
10
+ fixtures :all
11
+
12
+ # Add more helper methods to be used by all tests here...
13
+ end
File without changes
@@ -0,0 +1,4 @@
1
+ require 'test_helper'
2
+
3
+ class ProductsHelperTest < ActionView::TestCase
4
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class ProductTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
File without changes
File without changes
metadata ADDED
@@ -0,0 +1,158 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dejavu
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Roger Campos
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-12-27 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: &82986950 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '3.0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *82986950
25
+ - !ruby/object:Gem::Dependency
26
+ name: rspec-rails
27
+ requirement: &82985980 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '2.7'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *82985980
36
+ - !ruby/object:Gem::Dependency
37
+ name: capybara
38
+ requirement: &82985210 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: 1.1.1
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *82985210
47
+ description: Remember your object after a redirect
48
+ email:
49
+ - roger@itnig.net
50
+ executables: []
51
+ extensions: []
52
+ extra_rdoc_files: []
53
+ files:
54
+ - .gitignore
55
+ - .rspec
56
+ - Gemfile
57
+ - README.md
58
+ - Rakefile
59
+ - dejavu.gemspec
60
+ - lib/dejavu.rb
61
+ - lib/dejavu/version.rb
62
+ - spec/integration/dejavu_spec.rb
63
+ - spec/spec_helper.rb
64
+ - spec/support/fields.rb
65
+ - test_app/.gitignore
66
+ - test_app/Gemfile
67
+ - test_app/README
68
+ - test_app/Rakefile
69
+ - test_app/app/assets/images/rails.png
70
+ - test_app/app/assets/javascripts/application.js
71
+ - test_app/app/assets/javascripts/products.js.coffee
72
+ - test_app/app/assets/stylesheets/application.css
73
+ - test_app/app/assets/stylesheets/products.css.scss
74
+ - test_app/app/assets/stylesheets/scaffolds.css.scss
75
+ - test_app/app/controllers/application_controller.rb
76
+ - test_app/app/controllers/products_controller.rb
77
+ - test_app/app/helpers/application_helper.rb
78
+ - test_app/app/helpers/products_helper.rb
79
+ - test_app/app/mailers/.gitkeep
80
+ - test_app/app/models/.gitkeep
81
+ - test_app/app/models/product.rb
82
+ - test_app/app/views/layouts/application.html.erb
83
+ - test_app/app/views/products/_form.html.erb
84
+ - test_app/app/views/products/edit.html.erb
85
+ - test_app/app/views/products/index.html.erb
86
+ - test_app/app/views/products/new.html.erb
87
+ - test_app/app/views/products/show.html.erb
88
+ - test_app/config.ru
89
+ - test_app/config/application.rb
90
+ - test_app/config/boot.rb
91
+ - test_app/config/database.yml
92
+ - test_app/config/environment.rb
93
+ - test_app/config/environments/development.rb
94
+ - test_app/config/environments/production.rb
95
+ - test_app/config/environments/test.rb
96
+ - test_app/config/initializers/backtrace_silencers.rb
97
+ - test_app/config/initializers/inflections.rb
98
+ - test_app/config/initializers/mime_types.rb
99
+ - test_app/config/initializers/secret_token.rb
100
+ - test_app/config/initializers/session_store.rb
101
+ - test_app/config/initializers/wrap_parameters.rb
102
+ - test_app/config/locales/en.yml
103
+ - test_app/config/routes.rb
104
+ - test_app/db/migrate/20111227135944_create_products.rb
105
+ - test_app/db/schema.rb
106
+ - test_app/db/seeds.rb
107
+ - test_app/lib/assets/.gitkeep
108
+ - test_app/lib/tasks/.gitkeep
109
+ - test_app/log/.gitkeep
110
+ - test_app/public/404.html
111
+ - test_app/public/422.html
112
+ - test_app/public/500.html
113
+ - test_app/public/favicon.ico
114
+ - test_app/public/robots.txt
115
+ - test_app/script/rails
116
+ - test_app/test/fixtures/.gitkeep
117
+ - test_app/test/fixtures/products.yml
118
+ - test_app/test/functional/.gitkeep
119
+ - test_app/test/functional/products_controller_test.rb
120
+ - test_app/test/integration/.gitkeep
121
+ - test_app/test/performance/browsing_test.rb
122
+ - test_app/test/test_helper.rb
123
+ - test_app/test/unit/.gitkeep
124
+ - test_app/test/unit/helpers/products_helper_test.rb
125
+ - test_app/test/unit/product_test.rb
126
+ - test_app/vendor/assets/stylesheets/.gitkeep
127
+ - test_app/vendor/plugins/.gitkeep
128
+ homepage: https://github.com/rogercampos/dejavu
129
+ licenses: []
130
+ post_install_message:
131
+ rdoc_options: []
132
+ require_paths:
133
+ - lib
134
+ required_ruby_version: !ruby/object:Gem::Requirement
135
+ none: false
136
+ requirements:
137
+ - - ! '>='
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ segments:
141
+ - 0
142
+ hash: -960683919
143
+ required_rubygems_version: !ruby/object:Gem::Requirement
144
+ none: false
145
+ requirements:
146
+ - - ! '>='
147
+ - !ruby/object:Gem::Version
148
+ version: '0'
149
+ segments:
150
+ - 0
151
+ hash: -960683919
152
+ requirements: []
153
+ rubyforge_project:
154
+ rubygems_version: 1.8.10
155
+ signing_key:
156
+ specification_version: 3
157
+ summary: Remember your object after a redirect
158
+ test_files: []