restly 0.0.1.alpha.3 → 0.0.1.alpha.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. data/Gemfile +6 -0
  2. data/README.md +44 -1
  3. data/lib/restly/associations/base.rb +2 -2
  4. data/lib/restly/base.rb +1 -1
  5. data/lib/restly/version.rb +1 -1
  6. data/spec/dummy/.gitignore +15 -0
  7. data/spec/dummy/README.rdoc +261 -0
  8. data/spec/dummy/Rakefile +7 -0
  9. data/spec/dummy/app/assets/images/rails.png +0 -0
  10. data/spec/dummy/app/assets/javascripts/api/sample_objects.js +2 -0
  11. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  12. data/spec/dummy/app/assets/javascripts/sample_objects.js +2 -0
  13. data/spec/dummy/app/assets/stylesheets/api/sample_objects.css +4 -0
  14. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  15. data/spec/dummy/app/assets/stylesheets/sample_objects.css +4 -0
  16. data/spec/dummy/app/controllers/api/sample_objects_controller.rb +37 -0
  17. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  18. data/spec/dummy/app/controllers/sample_objects_controller.rb +2 -0
  19. data/spec/dummy/app/helpers/api/sample_objects_helper.rb +2 -0
  20. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  21. data/spec/dummy/app/helpers/sample_objects_helper.rb +2 -0
  22. data/spec/dummy/app/mailers/.gitkeep +0 -0
  23. data/spec/dummy/app/models/.gitkeep +0 -0
  24. data/spec/dummy/app/models/api/other_object.rb +7 -0
  25. data/spec/dummy/app/models/api/sample_object.rb +5 -0
  26. data/spec/dummy/app/models/other_object.rb +12 -0
  27. data/spec/dummy/app/models/sample_object.rb +15 -0
  28. data/spec/dummy/app/views/layouts/application.html.erb +12 -0
  29. data/spec/dummy/app/views/sample_objects/index.html.haml +0 -0
  30. data/spec/dummy/config.ru +4 -0
  31. data/spec/dummy/config/application.rb +63 -0
  32. data/spec/dummy/config/boot.rb +8 -0
  33. data/spec/dummy/config/database.yml +25 -0
  34. data/spec/dummy/config/environment.rb +5 -0
  35. data/spec/dummy/config/environments/development.rb +32 -0
  36. data/spec/dummy/config/environments/production.rb +54 -0
  37. data/spec/dummy/config/environments/test.rb +37 -0
  38. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  39. data/spec/dummy/config/initializers/inflections.rb +15 -0
  40. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  41. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  42. data/spec/dummy/config/initializers/session_store.rb +8 -0
  43. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  44. data/spec/dummy/config/locales/en.yml +5 -0
  45. data/spec/dummy/config/restly.yml +32 -0
  46. data/spec/dummy/config/routes.rb +7 -0
  47. data/spec/dummy/db/migrate/20121101171956_create_api_sample_objects.rb +13 -0
  48. data/spec/dummy/db/migrate/20121101194745_create_other_objects.rb +10 -0
  49. data/spec/dummy/db/schema.rb +34 -0
  50. data/spec/dummy/db/seeds.rb +7 -0
  51. data/spec/dummy/lib/assets/.gitkeep +0 -0
  52. data/spec/dummy/lib/tasks/.gitkeep +0 -0
  53. data/spec/dummy/log/.gitkeep +0 -0
  54. data/spec/dummy/public/404.html +26 -0
  55. data/spec/dummy/public/422.html +26 -0
  56. data/spec/dummy/public/500.html +25 -0
  57. data/spec/dummy/public/favicon.ico +0 -0
  58. data/spec/dummy/public/robots.txt +5 -0
  59. data/spec/dummy/script/rails +6 -0
  60. data/spec/dummy/test/fixtures/.gitkeep +0 -0
  61. data/spec/dummy/test/functional/.gitkeep +0 -0
  62. data/spec/dummy/test/integration/.gitkeep +0 -0
  63. data/spec/dummy/test/performance/browsing_test.rb +12 -0
  64. data/spec/dummy/test/test_helper.rb +13 -0
  65. data/spec/dummy/test/unit/.gitkeep +0 -0
  66. data/spec/dummy/vendor/assets/javascripts/.gitkeep +0 -0
  67. data/spec/dummy/vendor/assets/stylesheets/.gitkeep +0 -0
  68. data/spec/dummy/vendor/plugins/.gitkeep +0 -0
  69. metadata +128 -2
@@ -0,0 +1,13 @@
1
+ class CreateApiSampleObjects < ActiveRecord::Migration
2
+ def change
3
+ create_table :sample_objects do |t|
4
+ t.integer :age
5
+ t.integer :weight
6
+ t.integer :height
7
+ t.string :name
8
+ t.string :gender
9
+
10
+ t.timestamps
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,10 @@
1
+ class CreateOtherObjects < ActiveRecord::Migration
2
+ def change
3
+ create_table :other_objects do |t|
4
+ t.references :sample_object
5
+ t.string :foo_var
6
+ t.string :bar_lee
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,34 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20121101194745) do
15
+
16
+ create_table "other_objects", :force => true do |t|
17
+ t.integer "sample_object_id"
18
+ t.string "foo_var"
19
+ t.string "bar_lee"
20
+ t.datetime "created_at", :null => false
21
+ t.datetime "updated_at", :null => false
22
+ end
23
+
24
+ create_table "sample_objects", :force => true do |t|
25
+ t.integer "age"
26
+ t.integer "weight"
27
+ t.integer "height"
28
+ t.string "name"
29
+ t.string "gender"
30
+ t.datetime "created_at", :null => false
31
+ t.datetime "updated_at", :null => false
32
+ end
33
+
34
+ end
@@ -0,0 +1,7 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7
+ # Mayor.create(name: 'Emanuel', city: cities.first)
File without changes
File without changes
File without changes
@@ -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,5 @@
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: /
@@ -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'
File without changes
File without changes
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
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.alpha.3
4
+ version: 0.0.1.alpha.4
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-31 00:00:00.000000000 Z
12
+ date: 2012-11-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oauth2
@@ -166,6 +166,69 @@ files:
166
166
  - lib/restly/thread_local.rb
167
167
  - lib/restly/version.rb
168
168
  - restly.gemspec
169
+ - spec/dummy/.gitignore
170
+ - spec/dummy/README.rdoc
171
+ - spec/dummy/Rakefile
172
+ - spec/dummy/app/assets/images/rails.png
173
+ - spec/dummy/app/assets/javascripts/api/sample_objects.js
174
+ - spec/dummy/app/assets/javascripts/application.js
175
+ - spec/dummy/app/assets/javascripts/sample_objects.js
176
+ - spec/dummy/app/assets/stylesheets/api/sample_objects.css
177
+ - spec/dummy/app/assets/stylesheets/application.css
178
+ - spec/dummy/app/assets/stylesheets/sample_objects.css
179
+ - spec/dummy/app/controllers/api/sample_objects_controller.rb
180
+ - spec/dummy/app/controllers/application_controller.rb
181
+ - spec/dummy/app/controllers/sample_objects_controller.rb
182
+ - spec/dummy/app/helpers/api/sample_objects_helper.rb
183
+ - spec/dummy/app/helpers/application_helper.rb
184
+ - spec/dummy/app/helpers/sample_objects_helper.rb
185
+ - spec/dummy/app/mailers/.gitkeep
186
+ - spec/dummy/app/models/.gitkeep
187
+ - spec/dummy/app/models/api/other_object.rb
188
+ - spec/dummy/app/models/api/sample_object.rb
189
+ - spec/dummy/app/models/other_object.rb
190
+ - spec/dummy/app/models/sample_object.rb
191
+ - spec/dummy/app/views/layouts/application.html.erb
192
+ - spec/dummy/app/views/sample_objects/index.html.haml
193
+ - spec/dummy/config.ru
194
+ - spec/dummy/config/application.rb
195
+ - spec/dummy/config/boot.rb
196
+ - spec/dummy/config/database.yml
197
+ - spec/dummy/config/environment.rb
198
+ - spec/dummy/config/environments/development.rb
199
+ - spec/dummy/config/environments/production.rb
200
+ - spec/dummy/config/environments/test.rb
201
+ - spec/dummy/config/initializers/backtrace_silencers.rb
202
+ - spec/dummy/config/initializers/inflections.rb
203
+ - spec/dummy/config/initializers/mime_types.rb
204
+ - spec/dummy/config/initializers/secret_token.rb
205
+ - spec/dummy/config/initializers/session_store.rb
206
+ - spec/dummy/config/initializers/wrap_parameters.rb
207
+ - spec/dummy/config/locales/en.yml
208
+ - spec/dummy/config/restly.yml
209
+ - spec/dummy/config/routes.rb
210
+ - spec/dummy/db/migrate/20121101171956_create_api_sample_objects.rb
211
+ - spec/dummy/db/migrate/20121101194745_create_other_objects.rb
212
+ - spec/dummy/db/schema.rb
213
+ - spec/dummy/db/seeds.rb
214
+ - spec/dummy/lib/assets/.gitkeep
215
+ - spec/dummy/lib/tasks/.gitkeep
216
+ - spec/dummy/log/.gitkeep
217
+ - spec/dummy/public/404.html
218
+ - spec/dummy/public/422.html
219
+ - spec/dummy/public/500.html
220
+ - spec/dummy/public/favicon.ico
221
+ - spec/dummy/public/robots.txt
222
+ - spec/dummy/script/rails
223
+ - spec/dummy/test/fixtures/.gitkeep
224
+ - spec/dummy/test/functional/.gitkeep
225
+ - spec/dummy/test/integration/.gitkeep
226
+ - spec/dummy/test/performance/browsing_test.rb
227
+ - spec/dummy/test/test_helper.rb
228
+ - spec/dummy/test/unit/.gitkeep
229
+ - spec/dummy/vendor/assets/javascripts/.gitkeep
230
+ - spec/dummy/vendor/assets/stylesheets/.gitkeep
231
+ - spec/dummy/vendor/plugins/.gitkeep
169
232
  - spec/restly/associations/base_spec.rb
170
233
  - spec/restly/associations/belongs_to_spec.rb
171
234
  - spec/restly/associations/embeddable_resources/embeds_many_spec.rb
@@ -227,6 +290,69 @@ signing_key:
227
290
  specification_version: 3
228
291
  summary: Allows your app to authenticate a resource with oauth
229
292
  test_files:
293
+ - spec/dummy/.gitignore
294
+ - spec/dummy/README.rdoc
295
+ - spec/dummy/Rakefile
296
+ - spec/dummy/app/assets/images/rails.png
297
+ - spec/dummy/app/assets/javascripts/api/sample_objects.js
298
+ - spec/dummy/app/assets/javascripts/application.js
299
+ - spec/dummy/app/assets/javascripts/sample_objects.js
300
+ - spec/dummy/app/assets/stylesheets/api/sample_objects.css
301
+ - spec/dummy/app/assets/stylesheets/application.css
302
+ - spec/dummy/app/assets/stylesheets/sample_objects.css
303
+ - spec/dummy/app/controllers/api/sample_objects_controller.rb
304
+ - spec/dummy/app/controllers/application_controller.rb
305
+ - spec/dummy/app/controllers/sample_objects_controller.rb
306
+ - spec/dummy/app/helpers/api/sample_objects_helper.rb
307
+ - spec/dummy/app/helpers/application_helper.rb
308
+ - spec/dummy/app/helpers/sample_objects_helper.rb
309
+ - spec/dummy/app/mailers/.gitkeep
310
+ - spec/dummy/app/models/.gitkeep
311
+ - spec/dummy/app/models/api/other_object.rb
312
+ - spec/dummy/app/models/api/sample_object.rb
313
+ - spec/dummy/app/models/other_object.rb
314
+ - spec/dummy/app/models/sample_object.rb
315
+ - spec/dummy/app/views/layouts/application.html.erb
316
+ - spec/dummy/app/views/sample_objects/index.html.haml
317
+ - spec/dummy/config.ru
318
+ - spec/dummy/config/application.rb
319
+ - spec/dummy/config/boot.rb
320
+ - spec/dummy/config/database.yml
321
+ - spec/dummy/config/environment.rb
322
+ - spec/dummy/config/environments/development.rb
323
+ - spec/dummy/config/environments/production.rb
324
+ - spec/dummy/config/environments/test.rb
325
+ - spec/dummy/config/initializers/backtrace_silencers.rb
326
+ - spec/dummy/config/initializers/inflections.rb
327
+ - spec/dummy/config/initializers/mime_types.rb
328
+ - spec/dummy/config/initializers/secret_token.rb
329
+ - spec/dummy/config/initializers/session_store.rb
330
+ - spec/dummy/config/initializers/wrap_parameters.rb
331
+ - spec/dummy/config/locales/en.yml
332
+ - spec/dummy/config/restly.yml
333
+ - spec/dummy/config/routes.rb
334
+ - spec/dummy/db/migrate/20121101171956_create_api_sample_objects.rb
335
+ - spec/dummy/db/migrate/20121101194745_create_other_objects.rb
336
+ - spec/dummy/db/schema.rb
337
+ - spec/dummy/db/seeds.rb
338
+ - spec/dummy/lib/assets/.gitkeep
339
+ - spec/dummy/lib/tasks/.gitkeep
340
+ - spec/dummy/log/.gitkeep
341
+ - spec/dummy/public/404.html
342
+ - spec/dummy/public/422.html
343
+ - spec/dummy/public/500.html
344
+ - spec/dummy/public/favicon.ico
345
+ - spec/dummy/public/robots.txt
346
+ - spec/dummy/script/rails
347
+ - spec/dummy/test/fixtures/.gitkeep
348
+ - spec/dummy/test/functional/.gitkeep
349
+ - spec/dummy/test/integration/.gitkeep
350
+ - spec/dummy/test/performance/browsing_test.rb
351
+ - spec/dummy/test/test_helper.rb
352
+ - spec/dummy/test/unit/.gitkeep
353
+ - spec/dummy/vendor/assets/javascripts/.gitkeep
354
+ - spec/dummy/vendor/assets/stylesheets/.gitkeep
355
+ - spec/dummy/vendor/plugins/.gitkeep
230
356
  - spec/restly/associations/base_spec.rb
231
357
  - spec/restly/associations/belongs_to_spec.rb
232
358
  - spec/restly/associations/embeddable_resources/embeds_many_spec.rb