resourcery 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +20 -0
- data/README.md +3 -0
- data/Rakefile +29 -0
- data/lib/resourcery.rb +8 -0
- data/lib/resourcery/controller_extensions.rb +110 -0
- data/lib/resourcery/controller_macro.rb +25 -0
- data/lib/resourcery/version.rb +3 -0
- data/spec/controller_actions_spec.rb +154 -0
- data/spec/controller_macro_spec.rb +45 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/application/edit.html.erb +2 -0
- data/spec/dummy/app/views/application/index.html.erb +2 -0
- data/spec/dummy/app/views/application/new.html.erb +2 -0
- data/spec/dummy/app/views/application/show.html.erb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +69 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +16 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +19 -0
- data/spec/dummy/log/test.log +4928 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/spec_helper.rb +32 -0
- metadata +202 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/404.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
23
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/422.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The change you wanted was rejected.</h1>
|
23
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/500.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>We're sorry, but something went wrong.</h1>
|
23
|
+
</div>
|
24
|
+
</body>
|
25
|
+
</html>
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
+
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
6
|
+
require 'rails/commands'
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler/setup'
|
3
|
+
|
4
|
+
ENV["RAILS_ENV"] = "test"
|
5
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
6
|
+
|
7
|
+
require 'rspec/rails'
|
8
|
+
|
9
|
+
|
10
|
+
# We'll use this every now and then
|
11
|
+
#
|
12
|
+
class User
|
13
|
+
extend ActiveModel::Naming
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
RSpec.configure do |config|
|
18
|
+
config.use_transactional_fixtures = true
|
19
|
+
config.order = "random"
|
20
|
+
config.before :each do
|
21
|
+
# Prepare the fake User class.
|
22
|
+
#
|
23
|
+
User.stub(:scoped).and_return(User)
|
24
|
+
|
25
|
+
# Since we will be working with the fake User class a lot, let's set up
|
26
|
+
# some routes since the ActionController::Responder will use them, too.
|
27
|
+
#
|
28
|
+
routes.draw do
|
29
|
+
resources :users
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
metadata
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: resourcery
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Hendrik Mans
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-12-25 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rails
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '3.1'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3.1'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: sqlite3
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rspec-rails
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 2.8.0
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.8.0
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: factory_girl_rails
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
description: Simple serving of RESTful resources.
|
79
|
+
email:
|
80
|
+
- hendrik@mans.de
|
81
|
+
executables: []
|
82
|
+
extensions: []
|
83
|
+
extra_rdoc_files: []
|
84
|
+
files:
|
85
|
+
- lib/resourcery/controller_extensions.rb
|
86
|
+
- lib/resourcery/controller_macro.rb
|
87
|
+
- lib/resourcery/version.rb
|
88
|
+
- lib/resourcery.rb
|
89
|
+
- LICENSE
|
90
|
+
- Rakefile
|
91
|
+
- README.md
|
92
|
+
- spec/controller_actions_spec.rb
|
93
|
+
- spec/controller_macro_spec.rb
|
94
|
+
- spec/dummy/app/assets/javascripts/application.js
|
95
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
96
|
+
- spec/dummy/app/controllers/application_controller.rb
|
97
|
+
- spec/dummy/app/helpers/application_helper.rb
|
98
|
+
- spec/dummy/app/views/application/edit.html.erb
|
99
|
+
- spec/dummy/app/views/application/index.html.erb
|
100
|
+
- spec/dummy/app/views/application/new.html.erb
|
101
|
+
- spec/dummy/app/views/application/show.html.erb
|
102
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
103
|
+
- spec/dummy/config/application.rb
|
104
|
+
- spec/dummy/config/boot.rb
|
105
|
+
- spec/dummy/config/database.yml
|
106
|
+
- spec/dummy/config/environment.rb
|
107
|
+
- spec/dummy/config/environments/development.rb
|
108
|
+
- spec/dummy/config/environments/production.rb
|
109
|
+
- spec/dummy/config/environments/test.rb
|
110
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
111
|
+
- spec/dummy/config/initializers/inflections.rb
|
112
|
+
- spec/dummy/config/initializers/mime_types.rb
|
113
|
+
- spec/dummy/config/initializers/secret_token.rb
|
114
|
+
- spec/dummy/config/initializers/session_store.rb
|
115
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
116
|
+
- spec/dummy/config/locales/en.yml
|
117
|
+
- spec/dummy/config/routes.rb
|
118
|
+
- spec/dummy/config.ru
|
119
|
+
- spec/dummy/db/development.sqlite3
|
120
|
+
- spec/dummy/db/schema.rb
|
121
|
+
- spec/dummy/db/test.sqlite3
|
122
|
+
- spec/dummy/log/development.log
|
123
|
+
- spec/dummy/log/test.log
|
124
|
+
- spec/dummy/public/404.html
|
125
|
+
- spec/dummy/public/422.html
|
126
|
+
- spec/dummy/public/500.html
|
127
|
+
- spec/dummy/public/favicon.ico
|
128
|
+
- spec/dummy/Rakefile
|
129
|
+
- spec/dummy/README.rdoc
|
130
|
+
- spec/dummy/script/rails
|
131
|
+
- spec/spec_helper.rb
|
132
|
+
homepage: http://github.com/hmans/resourcery
|
133
|
+
licenses: []
|
134
|
+
post_install_message:
|
135
|
+
rdoc_options: []
|
136
|
+
require_paths:
|
137
|
+
- lib
|
138
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
139
|
+
none: false
|
140
|
+
requirements:
|
141
|
+
- - ! '>='
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
segments:
|
145
|
+
- 0
|
146
|
+
hash: -2575634340132036426
|
147
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
|
+
none: false
|
149
|
+
requirements:
|
150
|
+
- - ! '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
segments:
|
154
|
+
- 0
|
155
|
+
hash: -2575634340132036426
|
156
|
+
requirements: []
|
157
|
+
rubyforge_project:
|
158
|
+
rubygems_version: 1.8.23
|
159
|
+
signing_key:
|
160
|
+
specification_version: 3
|
161
|
+
summary: Simple serving of RESTful resources.
|
162
|
+
test_files:
|
163
|
+
- spec/controller_actions_spec.rb
|
164
|
+
- spec/controller_macro_spec.rb
|
165
|
+
- spec/dummy/app/assets/javascripts/application.js
|
166
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
167
|
+
- spec/dummy/app/controllers/application_controller.rb
|
168
|
+
- spec/dummy/app/helpers/application_helper.rb
|
169
|
+
- spec/dummy/app/views/application/edit.html.erb
|
170
|
+
- spec/dummy/app/views/application/index.html.erb
|
171
|
+
- spec/dummy/app/views/application/new.html.erb
|
172
|
+
- spec/dummy/app/views/application/show.html.erb
|
173
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
174
|
+
- spec/dummy/config/application.rb
|
175
|
+
- spec/dummy/config/boot.rb
|
176
|
+
- spec/dummy/config/database.yml
|
177
|
+
- spec/dummy/config/environment.rb
|
178
|
+
- spec/dummy/config/environments/development.rb
|
179
|
+
- spec/dummy/config/environments/production.rb
|
180
|
+
- spec/dummy/config/environments/test.rb
|
181
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
182
|
+
- spec/dummy/config/initializers/inflections.rb
|
183
|
+
- spec/dummy/config/initializers/mime_types.rb
|
184
|
+
- spec/dummy/config/initializers/secret_token.rb
|
185
|
+
- spec/dummy/config/initializers/session_store.rb
|
186
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
187
|
+
- spec/dummy/config/locales/en.yml
|
188
|
+
- spec/dummy/config/routes.rb
|
189
|
+
- spec/dummy/config.ru
|
190
|
+
- spec/dummy/db/development.sqlite3
|
191
|
+
- spec/dummy/db/schema.rb
|
192
|
+
- spec/dummy/db/test.sqlite3
|
193
|
+
- spec/dummy/log/development.log
|
194
|
+
- spec/dummy/log/test.log
|
195
|
+
- spec/dummy/public/404.html
|
196
|
+
- spec/dummy/public/422.html
|
197
|
+
- spec/dummy/public/500.html
|
198
|
+
- spec/dummy/public/favicon.ico
|
199
|
+
- spec/dummy/Rakefile
|
200
|
+
- spec/dummy/README.rdoc
|
201
|
+
- spec/dummy/script/rails
|
202
|
+
- spec/spec_helper.rb
|