rows_controller 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +2 -0
- data/.rvmrc +3 -0
- data/.watchr +56 -0
- data/Gemfile +16 -0
- data/Gemfile.lock +136 -0
- data/MIT-LICENSE +20 -0
- data/README.md +91 -0
- data/Rakefile +30 -0
- data/app/controllers/rows_controller.rb +80 -0
- data/app/controllers/rows_controller/helpers.rb +86 -0
- data/app/views/rows/_form.html.erb +3 -0
- data/app/views/rows/_list.html.erb +31 -0
- data/app/views/rows/_submit.html.erb +22 -0
- data/app/views/rows/_submit_part.html.erb +4 -0
- data/app/views/rows/destroy.js.erb +1 -0
- data/app/views/rows/edit.html.erb +22 -0
- data/app/views/rows/index.html.erb +20 -0
- data/app/views/rows/new.html.erb +22 -0
- data/app/views/rows/show.html.erb +25 -0
- data/app/views/shared/_error_explanation.html.erb +14 -0
- data/app/views/shared/_flash.html.erb +9 -0
- data/lib/rows_controller.rb +5 -0
- data/lib/rows_controller/engine.rb +4 -0
- data/lib/rows_controller/locales/en.yml +33 -0
- data/lib/rows_controller/version.rb +3 -0
- data/rows_controller.gemspec +27 -0
- data/spec/controllers/orders_spec.rb +65 -0
- data/spec/controllers/rows_spec.rb +19 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +9 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/orders_controller.rb +3 -0
- data/spec/dummy/app/models/order.rb +10 -0
- data/spec/dummy/app/views/layouts/application.html.erb +13 -0
- data/spec/dummy/app/views/orders/_form.html.erb +12 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +49 -0
- data/spec/dummy/config/boot.rb +9 -0
- data/spec/dummy/config/database.yml +22 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +30 -0
- data/spec/dummy/config/environments/production.rb +60 -0
- data/spec/dummy/config/environments/test.rb +40 -0
- data/spec/dummy/config/initializers/secret_token.rb +1 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/routes.rb +7 -0
- data/spec/dummy/db/migrate/001_create_orders.rb +10 -0
- data/spec/dummy/db/schema.rb +23 -0
- data/spec/dummy/db/seeds.rb +7 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/integration/order_spec.rb +45 -0
- data/spec/models/order_spec.rb +7 -0
- data/spec/spec_helper.rb +63 -0
- data/spec/support/describe_private.rb +14 -0
- metadata +164 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
# taken from: http://kailuowang.blogspot.com/2010/08/testing-private-methods-in-rspec.html
|
2
|
+
def describe_private *args, &block
|
3
|
+
example = describe *args, &block
|
4
|
+
klass = args[0]
|
5
|
+
if klass.is_a? Class
|
6
|
+
saved_private_instance_methods = klass.private_instance_methods
|
7
|
+
example.before do
|
8
|
+
klass.class_eval { public *saved_private_instance_methods }
|
9
|
+
end
|
10
|
+
example.after do
|
11
|
+
klass.class_eval { private *saved_private_instance_methods }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
metadata
ADDED
@@ -0,0 +1,164 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rows_controller
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Dittmar Krall
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-01-15 00:00:00.000000000 +01:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: sqlite3
|
17
|
+
requirement: &70224430 !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
23
|
+
type: :development
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *70224430
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: rspec-rails
|
28
|
+
requirement: &70224220 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *70224220
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: capybara
|
39
|
+
requirement: &70224010 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ! '>='
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
45
|
+
type: :development
|
46
|
+
prerelease: false
|
47
|
+
version_requirements: *70224010
|
48
|
+
description: YourController < RowsController ( < ApplicationController).
|
49
|
+
email:
|
50
|
+
- dittmar.krall@matique.de
|
51
|
+
executables: []
|
52
|
+
extensions: []
|
53
|
+
extra_rdoc_files: []
|
54
|
+
files:
|
55
|
+
- .rspec
|
56
|
+
- .rvmrc
|
57
|
+
- .watchr
|
58
|
+
- Gemfile
|
59
|
+
- Gemfile.lock
|
60
|
+
- MIT-LICENSE
|
61
|
+
- README.md
|
62
|
+
- Rakefile
|
63
|
+
- app/controllers/rows_controller.rb
|
64
|
+
- app/controllers/rows_controller/helpers.rb
|
65
|
+
- app/views/rows/_form.html.erb
|
66
|
+
- app/views/rows/_list.html.erb
|
67
|
+
- app/views/rows/_submit.html.erb
|
68
|
+
- app/views/rows/_submit_part.html.erb
|
69
|
+
- app/views/rows/destroy.js.erb
|
70
|
+
- app/views/rows/edit.html.erb
|
71
|
+
- app/views/rows/index.html.erb
|
72
|
+
- app/views/rows/new.html.erb
|
73
|
+
- app/views/rows/show.html.erb
|
74
|
+
- app/views/shared/_error_explanation.html.erb
|
75
|
+
- app/views/shared/_flash.html.erb
|
76
|
+
- lib/rows_controller.rb
|
77
|
+
- lib/rows_controller/engine.rb
|
78
|
+
- lib/rows_controller/locales/en.yml
|
79
|
+
- lib/rows_controller/version.rb
|
80
|
+
- rows_controller.gemspec
|
81
|
+
- spec/controllers/orders_spec.rb
|
82
|
+
- spec/controllers/rows_spec.rb
|
83
|
+
- spec/dummy/Rakefile
|
84
|
+
- spec/dummy/app/assets/javascripts/application.js
|
85
|
+
- spec/dummy/app/controllers/application_controller.rb
|
86
|
+
- spec/dummy/app/controllers/orders_controller.rb
|
87
|
+
- spec/dummy/app/models/order.rb
|
88
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
89
|
+
- spec/dummy/app/views/orders/_form.html.erb
|
90
|
+
- spec/dummy/config.ru
|
91
|
+
- spec/dummy/config/application.rb
|
92
|
+
- spec/dummy/config/boot.rb
|
93
|
+
- spec/dummy/config/database.yml
|
94
|
+
- spec/dummy/config/environment.rb
|
95
|
+
- spec/dummy/config/environments/development.rb
|
96
|
+
- spec/dummy/config/environments/production.rb
|
97
|
+
- spec/dummy/config/environments/test.rb
|
98
|
+
- spec/dummy/config/initializers/secret_token.rb
|
99
|
+
- spec/dummy/config/initializers/session_store.rb
|
100
|
+
- spec/dummy/config/routes.rb
|
101
|
+
- spec/dummy/db/migrate/001_create_orders.rb
|
102
|
+
- spec/dummy/db/schema.rb
|
103
|
+
- spec/dummy/db/seeds.rb
|
104
|
+
- spec/dummy/public/favicon.ico
|
105
|
+
- spec/dummy/script/rails
|
106
|
+
- spec/integration/order_spec.rb
|
107
|
+
- spec/models/order_spec.rb
|
108
|
+
- spec/spec_helper.rb
|
109
|
+
- spec/support/describe_private.rb
|
110
|
+
has_rdoc: true
|
111
|
+
homepage: http://matique.de
|
112
|
+
licenses: []
|
113
|
+
post_install_message:
|
114
|
+
rdoc_options: []
|
115
|
+
require_paths:
|
116
|
+
- lib
|
117
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
119
|
+
requirements:
|
120
|
+
- - ! '>='
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0'
|
123
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
|
+
none: false
|
125
|
+
requirements:
|
126
|
+
- - ! '>='
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0'
|
129
|
+
requirements: []
|
130
|
+
rubyforge_project:
|
131
|
+
rubygems_version: 1.6.2
|
132
|
+
signing_key:
|
133
|
+
specification_version: 3
|
134
|
+
summary: Rows DRYs your controllers.
|
135
|
+
test_files:
|
136
|
+
- spec/controllers/orders_spec.rb
|
137
|
+
- spec/controllers/rows_spec.rb
|
138
|
+
- spec/dummy/Rakefile
|
139
|
+
- spec/dummy/app/assets/javascripts/application.js
|
140
|
+
- spec/dummy/app/controllers/application_controller.rb
|
141
|
+
- spec/dummy/app/controllers/orders_controller.rb
|
142
|
+
- spec/dummy/app/models/order.rb
|
143
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
144
|
+
- spec/dummy/app/views/orders/_form.html.erb
|
145
|
+
- spec/dummy/config.ru
|
146
|
+
- spec/dummy/config/application.rb
|
147
|
+
- spec/dummy/config/boot.rb
|
148
|
+
- spec/dummy/config/database.yml
|
149
|
+
- spec/dummy/config/environment.rb
|
150
|
+
- spec/dummy/config/environments/development.rb
|
151
|
+
- spec/dummy/config/environments/production.rb
|
152
|
+
- spec/dummy/config/environments/test.rb
|
153
|
+
- spec/dummy/config/initializers/secret_token.rb
|
154
|
+
- spec/dummy/config/initializers/session_store.rb
|
155
|
+
- spec/dummy/config/routes.rb
|
156
|
+
- spec/dummy/db/migrate/001_create_orders.rb
|
157
|
+
- spec/dummy/db/schema.rb
|
158
|
+
- spec/dummy/db/seeds.rb
|
159
|
+
- spec/dummy/public/favicon.ico
|
160
|
+
- spec/dummy/script/rails
|
161
|
+
- spec/integration/order_spec.rb
|
162
|
+
- spec/models/order_spec.rb
|
163
|
+
- spec/spec_helper.rb
|
164
|
+
- spec/support/describe_private.rb
|