api_controller 0.1.1 → 0.1.2
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.
- data/Gemfile +1 -0
- data/Gemfile.lock +62 -0
- data/README.rdoc +13 -4
- data/VERSION +1 -1
- data/api_controller.gemspec +4 -1
- data/lib/generators/api_controller/api_controller_generator.rb +1 -0
- data/test/helper.rb +2 -1
- metadata +19 -3
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,14 +1,75 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
+
abstract (1.0.0)
|
5
|
+
actionmailer (3.0.3)
|
6
|
+
actionpack (= 3.0.3)
|
7
|
+
mail (~> 2.2.9)
|
8
|
+
actionpack (3.0.3)
|
9
|
+
activemodel (= 3.0.3)
|
10
|
+
activesupport (= 3.0.3)
|
11
|
+
builder (~> 2.1.2)
|
12
|
+
erubis (~> 2.6.6)
|
13
|
+
i18n (~> 0.4)
|
14
|
+
rack (~> 1.2.1)
|
15
|
+
rack-mount (~> 0.6.13)
|
16
|
+
rack-test (~> 0.5.6)
|
17
|
+
tzinfo (~> 0.3.23)
|
18
|
+
activemodel (3.0.3)
|
19
|
+
activesupport (= 3.0.3)
|
20
|
+
builder (~> 2.1.2)
|
21
|
+
i18n (~> 0.4)
|
22
|
+
activerecord (3.0.3)
|
23
|
+
activemodel (= 3.0.3)
|
24
|
+
activesupport (= 3.0.3)
|
25
|
+
arel (~> 2.0.2)
|
26
|
+
tzinfo (~> 0.3.23)
|
27
|
+
activeresource (3.0.3)
|
28
|
+
activemodel (= 3.0.3)
|
29
|
+
activesupport (= 3.0.3)
|
30
|
+
activesupport (3.0.3)
|
31
|
+
arel (2.0.8)
|
32
|
+
builder (2.1.2)
|
33
|
+
erubis (2.6.6)
|
34
|
+
abstract (>= 1.0.0)
|
4
35
|
git (1.2.5)
|
36
|
+
i18n (0.5.0)
|
5
37
|
jeweler (1.5.2)
|
6
38
|
bundler (~> 1.0.0)
|
7
39
|
git (>= 1.2.5)
|
8
40
|
rake
|
41
|
+
mail (2.2.15)
|
42
|
+
activesupport (>= 2.3.6)
|
43
|
+
i18n (>= 0.4.0)
|
44
|
+
mime-types (~> 1.16)
|
45
|
+
treetop (~> 1.4.8)
|
46
|
+
mime-types (1.16)
|
47
|
+
polyglot (0.3.1)
|
48
|
+
rack (1.2.1)
|
49
|
+
rack-mount (0.6.13)
|
50
|
+
rack (>= 1.0.0)
|
51
|
+
rack-test (0.5.7)
|
52
|
+
rack (>= 1.0)
|
53
|
+
rails (3.0.3)
|
54
|
+
actionmailer (= 3.0.3)
|
55
|
+
actionpack (= 3.0.3)
|
56
|
+
activerecord (= 3.0.3)
|
57
|
+
activeresource (= 3.0.3)
|
58
|
+
activesupport (= 3.0.3)
|
59
|
+
bundler (~> 1.0)
|
60
|
+
railties (= 3.0.3)
|
61
|
+
railties (3.0.3)
|
62
|
+
actionpack (= 3.0.3)
|
63
|
+
activesupport (= 3.0.3)
|
64
|
+
rake (>= 0.8.7)
|
65
|
+
thor (~> 0.14.4)
|
9
66
|
rake (0.8.7)
|
10
67
|
rcov (0.9.9)
|
11
68
|
shoulda (2.11.3)
|
69
|
+
thor (0.14.6)
|
70
|
+
treetop (1.4.9)
|
71
|
+
polyglot (>= 0.3.1)
|
72
|
+
tzinfo (0.3.24)
|
12
73
|
|
13
74
|
PLATFORMS
|
14
75
|
ruby
|
@@ -16,5 +77,6 @@ PLATFORMS
|
|
16
77
|
DEPENDENCIES
|
17
78
|
bundler (~> 1.0.0)
|
18
79
|
jeweler (~> 1.5.2)
|
80
|
+
rails (>= 3.0.0)
|
19
81
|
rcov
|
20
82
|
shoulda
|
data/README.rdoc
CHANGED
@@ -1,16 +1,26 @@
|
|
1
1
|
= api_controller
|
2
2
|
|
3
|
-
|
3
|
+
Generator for controllers dedicated to custom APIs.
|
4
4
|
|
5
5
|
== Usage
|
6
6
|
|
7
|
-
|
7
|
+
<tt>rails generate api_controller MODEL(plural, lowercase) [VERSION]</tt>
|
8
8
|
|
9
|
-
|
9
|
+
<tt>rails generate api_controller people 2</tt>
|
10
10
|
generates:
|
11
11
|
app/controllers/api/v2/person_api_controller.rb
|
12
12
|
test/functional/api/v2/person_api_controller.rb
|
13
13
|
|
14
|
+
== To do
|
15
|
+
|
16
|
+
* modularize test framework usage
|
17
|
+
* add proper requirements to all files so that everything works outside of a
|
18
|
+
rails project (and in different versions of rails)
|
19
|
+
* make opinionated, robust api and test generation
|
20
|
+
* test!
|
21
|
+
* change the parameters for the command so that either the plural (people) or
|
22
|
+
class name (Person) can be used.
|
23
|
+
* use variable caching in generation methods (version)
|
14
24
|
|
15
25
|
== Contributing to api_controller
|
16
26
|
|
@@ -26,4 +36,3 @@ generates:
|
|
26
36
|
|
27
37
|
Copyright (c) 2011 Cody Frazer. See LICENSE.txt for
|
28
38
|
further details.
|
29
|
-
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/api_controller.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{api_controller}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Cody Frazer"]
|
@@ -50,17 +50,20 @@ Gem::Specification.new do |s|
|
|
50
50
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
51
51
|
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
52
52
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
53
|
+
s.add_development_dependency(%q<rails>, [">= 3.0.0"])
|
53
54
|
else
|
54
55
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
55
56
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
56
57
|
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
57
58
|
s.add_dependency(%q<rcov>, [">= 0"])
|
59
|
+
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
58
60
|
end
|
59
61
|
else
|
60
62
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
61
63
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
62
64
|
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
63
65
|
s.add_dependency(%q<rcov>, [">= 0"])
|
66
|
+
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
64
67
|
end
|
65
68
|
end
|
66
69
|
|
data/test/helper.rb
CHANGED
@@ -9,10 +9,11 @@ rescue Bundler::BundlerError => e
|
|
9
9
|
end
|
10
10
|
require 'test/unit'
|
11
11
|
require 'shoulda'
|
12
|
+
require 'rails'
|
12
13
|
|
13
14
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
15
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
15
|
-
require 'api_controller'
|
16
|
+
require 'generators/api_controller/api_controller_generator.rb'
|
16
17
|
|
17
18
|
class Test::Unit::TestCase
|
18
19
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: api_controller
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Cody Frazer
|
@@ -78,6 +78,22 @@ dependencies:
|
|
78
78
|
version: "0"
|
79
79
|
name: rcov
|
80
80
|
version_requirements: *id004
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
prerelease: false
|
83
|
+
type: :development
|
84
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
hash: 7
|
90
|
+
segments:
|
91
|
+
- 3
|
92
|
+
- 0
|
93
|
+
- 0
|
94
|
+
version: 3.0.0
|
95
|
+
name: rails
|
96
|
+
version_requirements: *id005
|
81
97
|
description: Genarator for controllers dedicated to custom APIs.
|
82
98
|
email: cody.frazer@cph.org
|
83
99
|
executables: []
|