amos 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +24 -0
  3. data/Rakefile +29 -0
  4. data/lib/amos.rb +4 -0
  5. data/lib/amos/engine.rb +8 -0
  6. metadata +88 -0
@@ -0,0 +1,20 @@
1
+ Copyright 2011 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,24 @@
1
+ = Amos - A Model Only Server.
2
+
3
+ AMOS is a rails plugin that provides a simple server that uses the url to decide which model to deliver. It is intended for
4
+ front-end applications that use something like javascriptMVC.
5
+
6
+ E.g. If the incoming request is /recipe it executes the index action which does a find(:all) in the Recipe modes.
7
+
8
+ == Supported actions
9
+
10
+ :get => "/user" returns array of all users
11
+ :get => "/users/1" returns record for user 1
12
+ :delete => "/users/1" deletes record 1 from users, returns success => true / false
13
+ :put => "/users/1" + form data. Updates user record 1. Returns success => true / false
14
+ :post => "/users" + form data. Returns details of new record on success, or errors array on failure
15
+
16
+ *Currently only available via github*. I will be releasing the amos gem once I have done some more testing
17
+
18
+ Distributed under the MIT License, all rights reserved 2011 Geoff Drake
19
+
20
+ == Thing to to
21
+ * Publish as a gem
22
+ * Add installation instructions
23
+ * Add security
24
+ * More tests against a javascriptMVC application
@@ -0,0 +1,29 @@
1
+ # encoding: UTF-8
2
+ require 'rubygems'
3
+ begin
4
+ require 'bundler/setup'
5
+ rescue LoadError
6
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
7
+ end
8
+
9
+ require 'rake'
10
+ require 'rake/rdoctask'
11
+
12
+ require 'rake/testtask'
13
+
14
+ Rake::TestTask.new(:test) do |t|
15
+ t.libs << 'lib'
16
+ t.libs << 'test'
17
+ t.pattern = 'test/**/*_test.rb'
18
+ t.verbose = false
19
+ end
20
+
21
+ task :default => :test
22
+
23
+ Rake::RDocTask.new(:rdoc) do |rdoc|
24
+ rdoc.rdoc_dir = 'rdoc'
25
+ rdoc.title = 'Amos'
26
+ rdoc.options << '--line-numbers' << '--inline-source'
27
+ rdoc.rdoc_files.include('README.rdoc')
28
+ rdoc.rdoc_files.include('lib/**/*.rb')
29
+ end
@@ -0,0 +1,4 @@
1
+ require 'amos/engine' if defined?(Rails)
2
+
3
+ module Amos
4
+ end
@@ -0,0 +1,8 @@
1
+
2
+ require "amos"
3
+ require "rails"
4
+
5
+ module Amos
6
+ class Engine < Rails::Engine
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: amos
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Geoff Drake
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-10-02 00:00:00 +02:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: rails
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 15
30
+ segments:
31
+ - 3
32
+ - 0
33
+ - 4
34
+ version: 3.0.4
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ description: A simple server that determines the model and action data based upon the incoming url.
38
+ email: drakeg@mandes.com
39
+ executables: []
40
+
41
+ extensions: []
42
+
43
+ extra_rdoc_files: []
44
+
45
+ files:
46
+ - lib/amos/engine.rb
47
+ - lib/amos.rb
48
+ - MIT-LICENSE
49
+ - Rakefile
50
+ - README.rdoc
51
+ has_rdoc: true
52
+ homepage:
53
+ licenses: []
54
+
55
+ post_install_message:
56
+ rdoc_options: []
57
+
58
+ require_paths:
59
+ - lib
60
+ required_ruby_version: !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ hash: 53
66
+ segments:
67
+ - 1
68
+ - 8
69
+ - 1
70
+ version: 1.8.1
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ hash: 3
77
+ segments:
78
+ - 0
79
+ version: "0"
80
+ requirements: []
81
+
82
+ rubyforge_project:
83
+ rubygems_version: 1.4.1
84
+ signing_key:
85
+ specification_version: 3
86
+ summary: amos - a model only server.
87
+ test_files: []
88
+