padrino-grape 1.0.0.rc
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +119 -0
- data/LICENSE +21 -0
- data/README.md +22 -0
- data/Rakefile +1 -0
- data/VERSION +1 -0
- data/examples/test.rb +12 -0
- data/files.rb +23 -0
- data/lib/padrino-grape.rb +6 -0
- data/lib/padrino-grape/extend.rb +47 -0
- data/lib/padrino-grape/hook.rb +3 -0
- data/padrino-grape.gemspec +25 -0
- metadata +112 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c60a45f205888daa16223d74c45eac9a06b95fa1
|
4
|
+
data.tar.gz: ff2420dd38fb276ce76369a3a141fb2e31bdd2a1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c6628db7a21a873453f0ac5ec5254fd1d7a74d26cd56e0380c84b66e24446006f1fd1ed54b8256e6e0b0cdd952e7f8ee89ce58095bc27ef12a979ca6efc83eba
|
7
|
+
data.tar.gz: 5b465e2c214182601d8e9769833a6b2d752d5521388ce52cc00c7a6c856c1bfcb52b62af9fe4b039416bbae60ecdff1a2bc6c711de619e7389b1c24740697c67
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
padrino-grape (1.0.0.rc)
|
5
|
+
grape
|
6
|
+
padrino
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: http://rubygems.org/
|
10
|
+
specs:
|
11
|
+
activesupport (4.0.4)
|
12
|
+
i18n (~> 0.6, >= 0.6.9)
|
13
|
+
minitest (~> 4.2)
|
14
|
+
multi_json (~> 1.3)
|
15
|
+
thread_safe (~> 0.1)
|
16
|
+
tzinfo (~> 0.3.37)
|
17
|
+
axiom-types (0.1.1)
|
18
|
+
descendants_tracker (~> 0.0.4)
|
19
|
+
ice_nine (~> 0.11.0)
|
20
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
21
|
+
builder (3.2.2)
|
22
|
+
coercible (1.0.0)
|
23
|
+
descendants_tracker (~> 0.0.1)
|
24
|
+
descendants_tracker (0.0.4)
|
25
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
26
|
+
equalizer (0.0.9)
|
27
|
+
grape (0.7.0)
|
28
|
+
activesupport
|
29
|
+
builder
|
30
|
+
hashie (>= 1.2.0)
|
31
|
+
multi_json (>= 1.3.2)
|
32
|
+
multi_xml (>= 0.5.2)
|
33
|
+
rack (>= 1.3.0)
|
34
|
+
rack-accept
|
35
|
+
rack-mount
|
36
|
+
virtus (>= 1.0.0)
|
37
|
+
hashie (2.1.0)
|
38
|
+
http_router (0.11.1)
|
39
|
+
rack (>= 1.0.0)
|
40
|
+
url_mount (~> 0.2.1)
|
41
|
+
i18n (0.6.9)
|
42
|
+
ice_nine (0.11.0)
|
43
|
+
mail (2.5.4)
|
44
|
+
mime-types (~> 1.16)
|
45
|
+
treetop (~> 1.4.8)
|
46
|
+
mime-types (1.25.1)
|
47
|
+
minitest (4.7.5)
|
48
|
+
moneta (0.7.20)
|
49
|
+
multi_json (1.9.2)
|
50
|
+
multi_xml (0.5.5)
|
51
|
+
padrino (0.12.1)
|
52
|
+
padrino-admin (= 0.12.1)
|
53
|
+
padrino-cache (= 0.12.1)
|
54
|
+
padrino-core (= 0.12.1)
|
55
|
+
padrino-gen (= 0.12.1)
|
56
|
+
padrino-helpers (= 0.12.1)
|
57
|
+
padrino-mailer (= 0.12.1)
|
58
|
+
padrino-support (= 0.12.1)
|
59
|
+
padrino-admin (0.12.1)
|
60
|
+
padrino-core (= 0.12.1)
|
61
|
+
padrino-helpers (= 0.12.1)
|
62
|
+
padrino-cache (0.12.1)
|
63
|
+
moneta (~> 0.7.0)
|
64
|
+
padrino-core (= 0.12.1)
|
65
|
+
padrino-helpers (= 0.12.1)
|
66
|
+
padrino-core (0.12.1)
|
67
|
+
activesupport (>= 3.1)
|
68
|
+
http_router (~> 0.11.0)
|
69
|
+
padrino-support (= 0.12.1)
|
70
|
+
rack-protection (>= 1.5.0)
|
71
|
+
sinatra (~> 1.4.2)
|
72
|
+
thor (~> 0.18.0)
|
73
|
+
padrino-gen (0.12.1)
|
74
|
+
bundler (~> 1.0)
|
75
|
+
padrino-core (= 0.12.1)
|
76
|
+
padrino-helpers (0.12.1)
|
77
|
+
i18n (~> 0.6, >= 0.6.7)
|
78
|
+
padrino-support (= 0.12.1)
|
79
|
+
tilt (~> 1.4.1)
|
80
|
+
padrino-mailer (0.12.1)
|
81
|
+
mail (~> 2.5.3)
|
82
|
+
padrino-core (= 0.12.1)
|
83
|
+
padrino-support (0.12.1)
|
84
|
+
activesupport (>= 3.1)
|
85
|
+
polyglot (0.3.4)
|
86
|
+
rack (1.5.2)
|
87
|
+
rack-accept (0.4.5)
|
88
|
+
rack (>= 0.4)
|
89
|
+
rack-mount (0.8.3)
|
90
|
+
rack (>= 1.0.0)
|
91
|
+
rack-protection (1.5.3)
|
92
|
+
rack
|
93
|
+
rake (10.2.2)
|
94
|
+
sinatra (1.4.5)
|
95
|
+
rack (~> 1.4)
|
96
|
+
rack-protection (~> 1.4)
|
97
|
+
tilt (~> 1.3, >= 1.3.4)
|
98
|
+
thor (0.18.1)
|
99
|
+
thread_safe (0.3.3)
|
100
|
+
tilt (1.4.1)
|
101
|
+
treetop (1.4.15)
|
102
|
+
polyglot
|
103
|
+
polyglot (>= 0.3.1)
|
104
|
+
tzinfo (0.3.39)
|
105
|
+
url_mount (0.2.1)
|
106
|
+
rack
|
107
|
+
virtus (1.0.2)
|
108
|
+
axiom-types (~> 0.1)
|
109
|
+
coercible (~> 1.0)
|
110
|
+
descendants_tracker (~> 0.0.3)
|
111
|
+
equalizer (~> 0.0.9)
|
112
|
+
|
113
|
+
PLATFORMS
|
114
|
+
ruby
|
115
|
+
|
116
|
+
DEPENDENCIES
|
117
|
+
bundler
|
118
|
+
padrino-grape!
|
119
|
+
rake
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2014 Adam Luzsi
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
padrino-grape
|
2
|
+
=============
|
3
|
+
|
4
|
+
Padrino support gem for make grape mountable
|
5
|
+
|
6
|
+
### Example
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
class TestApi < Grape::API
|
10
|
+
|
11
|
+
# you can extend alike not really mather
|
12
|
+
include PadrinoGrape
|
13
|
+
|
14
|
+
# now it's mountable in padrino
|
15
|
+
|
16
|
+
end
|
17
|
+
```
|
18
|
+
|
19
|
+
## TODO
|
20
|
+
|
21
|
+
* make hook for padrino mount method so it will auto exteend grape inherited classes
|
22
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require File.join "bundler","gem_tasks"
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.0.0.rc
|
data/examples/test.rb
ADDED
data/files.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
### Get Files from dir
|
2
|
+
begin
|
3
|
+
|
4
|
+
module PadrinoGrape
|
5
|
+
SPEC = []
|
6
|
+
end
|
7
|
+
|
8
|
+
Dir[File.expand_path(File.join(File.dirname(__FILE__),"**","*"))].sort.uniq.each do |one_file_name|
|
9
|
+
one_file_name = File.expand_path one_file_name
|
10
|
+
file_name = one_file_name[(File.expand_path(File.dirname(__FILE__)).to_s.length+1)..(one_file_name.length-1)]
|
11
|
+
|
12
|
+
if !one_file_name.include?("pkg")
|
13
|
+
if !File.directory? file_name
|
14
|
+
|
15
|
+
PadrinoGrape::SPEC.push file_name
|
16
|
+
STDOUT.puts file_name if $DEBUG
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
#encoding: UTF-8
|
2
|
+
|
3
|
+
module PadrinoGrape
|
4
|
+
|
5
|
+
module Extend
|
6
|
+
|
7
|
+
def root
|
8
|
+
@_root ||= File.expand_path('..', __FILE__)
|
9
|
+
end
|
10
|
+
|
11
|
+
def dependencies
|
12
|
+
@_dependencies ||= [].map { |file| ::Dir[ ::File.join(self.root, file)] }.flatten
|
13
|
+
end
|
14
|
+
|
15
|
+
def load_paths
|
16
|
+
@_load_paths ||= %w().map { |path| ::File.join(self.root, path) }
|
17
|
+
end
|
18
|
+
|
19
|
+
def require_dependencies
|
20
|
+
::Padrino.set_load_paths(*load_paths)
|
21
|
+
::Padrino.require_dependencies(dependencies, :force => true)
|
22
|
+
end
|
23
|
+
|
24
|
+
def setup_application!
|
25
|
+
return if @_configured
|
26
|
+
self.require_dependencies
|
27
|
+
@_configured = true
|
28
|
+
@_configured
|
29
|
+
end
|
30
|
+
|
31
|
+
def reload! ; ; end
|
32
|
+
def app_file ; "" ; end
|
33
|
+
def public_folder ; "" ; end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.extended base
|
38
|
+
base.__send__ :extend, ::PadrinoGrape::Extend
|
39
|
+
base.__send__ :setup_application!
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.included base
|
43
|
+
base.__send__ :extend, ::PadrinoGrape::Extend
|
44
|
+
base.__send__ :setup_application!
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
require File.expand_path(File.join(File.dirname(__FILE__),"files.rb"))
|
4
|
+
|
5
|
+
### Specification for the new Gem
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
|
8
|
+
spec.name = "padrino-grape"
|
9
|
+
spec.version = File.open(File.join(File.dirname(__FILE__),"VERSION")).read.split("\n")[0].chomp.gsub(' ','')
|
10
|
+
spec.authors = ["Adam Luzsi"]
|
11
|
+
spec.email = ["adamluzsi@gmail.com"]
|
12
|
+
spec.description = %q{ compatibility module for padrino, to make grape mountable }
|
13
|
+
spec.summary = %q{ compatibility module for padrino, to make grape mountable }
|
14
|
+
spec.homepage = "https://github.com/adamluzsi/padrino-grape"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = PadrinoGrape::SPEC
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
%W[ rake bundler ].each{ |gem_name| spec.add_development_dependency(gem_name) }
|
23
|
+
%W[ grape padrino ].each{ |gem_name| spec.add_dependency(gem_name) }
|
24
|
+
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: padrino-grape
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.rc
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Adam Luzsi
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-04-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: grape
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: padrino
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: " compatibility module for padrino, to make grape mountable "
|
70
|
+
email:
|
71
|
+
- adamluzsi@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- Gemfile
|
77
|
+
- Gemfile.lock
|
78
|
+
- LICENSE
|
79
|
+
- README.md
|
80
|
+
- Rakefile
|
81
|
+
- VERSION
|
82
|
+
- examples/test.rb
|
83
|
+
- files.rb
|
84
|
+
- lib/padrino-grape.rb
|
85
|
+
- lib/padrino-grape/extend.rb
|
86
|
+
- lib/padrino-grape/hook.rb
|
87
|
+
- padrino-grape.gemspec
|
88
|
+
homepage: https://github.com/adamluzsi/padrino-grape
|
89
|
+
licenses:
|
90
|
+
- MIT
|
91
|
+
metadata: {}
|
92
|
+
post_install_message:
|
93
|
+
rdoc_options: []
|
94
|
+
require_paths:
|
95
|
+
- lib
|
96
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '0'
|
101
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">"
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: 1.3.1
|
106
|
+
requirements: []
|
107
|
+
rubyforge_project:
|
108
|
+
rubygems_version: 2.2.2
|
109
|
+
signing_key:
|
110
|
+
specification_version: 4
|
111
|
+
summary: compatibility module for padrino, to make grape mountable
|
112
|
+
test_files: []
|