yodatra 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +3 -1
- data/lib/yodatra/boot.rb +11 -7
- data/lib/yodatra/initializers.rb +2 -2
- data/lib/yodatra/version.rb +1 -1
- metadata +15 -29
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2a1f386dd2dea2c9dad90137008414c37c4c28e9
|
4
|
+
data.tar.gz: 4831495085c846a28c3904816ed625b9ac636fbc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cb10560b41c7a8bcdaf7e9602235b1e328c08f7045cda980012985c7feb70e6bd9a837eb2d195ef939ef0e77fe5ad72f22f48b732bec6ac8a89faa461d71a970
|
7
|
+
data.tar.gz: 7fc27841ac19213f302bcc06a5139e11fb581869467d262137f735cf63da10d415d3412b1c39c4acc085e6e6b169599ddfc9fcce3e90ea5f15c5c9f61327fad1
|
data/README.md
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
Yodatra
|
2
2
|
===
|
3
|
-
[![Build Status](https://travis-ci.org/squareteam/yodatra.png?branch=master)](https://travis-ci.org/squareteam/yodatra) [![Coverage Status](https://coveralls.io/repos/squareteam/yodatra/badge.png)](https://coveralls.io/r/squareteam/yodatra) [![Gem Version](https://badge.fury.io/rb/yodatra.png)](http://badge.fury.io/rb/yodatra)
|
3
|
+
[![Build Status](https://travis-ci.org/squareteam/yodatra.png?branch=master)](https://travis-ci.org/squareteam/yodatra) [![Coverage Status](https://coveralls.io/repos/squareteam/yodatra/badge.png)](https://coveralls.io/r/squareteam/yodatra) [![Gem Version](https://badge.fury.io/rb/yodatra.png)](http://badge.fury.io/rb/yodatra) [![Code Climate](https://codeclimate.com/github/squareteam/yodatra.png)](https://codeclimate.com/github/squareteam/yodatra) [![Dependency Status](https://gemnasium.com/squareteam/di.coffee.png)](https://gemnasium.com/squareteam/di.coffee)
|
4
4
|
|
5
5
|
Backend development you shall do. And yodatra you shall use.
|
6
6
|
|
7
7
|
A minimalistic framework built on top of Sinatra it is.
|
8
|
+
|
9
|
+
Visiting [https://squareteam.github.io/yodatra](https://squareteam.github.io/yodatra) will help you to control the force.
|
data/lib/yodatra/boot.rb
CHANGED
@@ -6,6 +6,8 @@ module Yodatra
|
|
6
6
|
set(:booting, true)
|
7
7
|
set(:models_directory, 'app/models')
|
8
8
|
set(:controllers_directory, 'app/controllers')
|
9
|
+
set(:envs_directory, 'config/environments')
|
10
|
+
set(:config_directory, 'config')
|
9
11
|
end
|
10
12
|
|
11
13
|
module Boot
|
@@ -26,14 +28,16 @@ module Yodatra
|
|
26
28
|
app.logger.warn("check out the new version (#{sinatra_ar_version}) of sinatra-activerecord, does it include PR#19 ?") if app.logger
|
27
29
|
end
|
28
30
|
|
29
|
-
#
|
30
|
-
|
31
|
-
|
32
|
-
|
31
|
+
app_file = "#{app.config_directory}/application.rb"
|
32
|
+
require File.expand_path(app_file) if File.exist? app_file
|
33
|
+
|
34
|
+
env_file = "#{app.envs_directory}/#{app.environment}.rb"
|
35
|
+
require File.expand_path(env_file) if File.exist? env_file
|
33
36
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
+
%w(models_directory controllers_directory).each do |to_load|
|
38
|
+
Dir["#{app.send(to_load)}/**/*.rb"].sort.each do |file_path|
|
39
|
+
require File.expand_path(file_path)
|
40
|
+
end
|
37
41
|
end
|
38
42
|
|
39
43
|
app.set :booting, false
|
data/lib/yodatra/initializers.rb
CHANGED
@@ -2,7 +2,7 @@ require 'sinatra/base'
|
|
2
2
|
|
3
3
|
module Yodatra
|
4
4
|
class Base < Sinatra::Base
|
5
|
-
set(:
|
5
|
+
set(:init_directory, "config/initializers")
|
6
6
|
end
|
7
7
|
|
8
8
|
module Initializers
|
@@ -12,7 +12,7 @@ module Yodatra
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def self.registered app
|
15
|
-
Dir["#{app.
|
15
|
+
Dir["#{app.init_directory}/**/*.rb"].sort.each do |file_path|
|
16
16
|
require File.expand_path file_path
|
17
17
|
end
|
18
18
|
end
|
data/lib/yodatra/version.rb
CHANGED
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yodatra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Paul Bonaud
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-
|
11
|
+
date: 2014-05-17 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rack
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,83 +27,74 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: sinatra
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: 1.4.4
|
38
|
-
- -
|
34
|
+
- - '>='
|
39
35
|
- !ruby/object:Gem::Version
|
40
36
|
version: 1.4.4
|
41
37
|
type: :runtime
|
42
38
|
prerelease: false
|
43
39
|
version_requirements: !ruby/object:Gem::Requirement
|
44
|
-
none: false
|
45
40
|
requirements:
|
46
41
|
- - ~>
|
47
42
|
- !ruby/object:Gem::Version
|
48
43
|
version: 1.4.4
|
49
|
-
- -
|
44
|
+
- - '>='
|
50
45
|
- !ruby/object:Gem::Version
|
51
46
|
version: 1.4.4
|
52
47
|
- !ruby/object:Gem::Dependency
|
53
48
|
name: sinatra-activerecord
|
54
49
|
requirement: !ruby/object:Gem::Requirement
|
55
|
-
none: false
|
56
50
|
requirements:
|
57
|
-
- -
|
51
|
+
- - '>='
|
58
52
|
- !ruby/object:Gem::Version
|
59
53
|
version: '0'
|
60
54
|
type: :runtime
|
61
55
|
prerelease: false
|
62
56
|
version_requirements: !ruby/object:Gem::Requirement
|
63
|
-
none: false
|
64
57
|
requirements:
|
65
|
-
- -
|
58
|
+
- - '>='
|
66
59
|
- !ruby/object:Gem::Version
|
67
60
|
version: '0'
|
68
61
|
- !ruby/object:Gem::Dependency
|
69
62
|
name: sinatra-logger
|
70
63
|
requirement: !ruby/object:Gem::Requirement
|
71
|
-
none: false
|
72
64
|
requirements:
|
73
|
-
- -
|
65
|
+
- - '>='
|
74
66
|
- !ruby/object:Gem::Version
|
75
67
|
version: '0'
|
76
68
|
type: :runtime
|
77
69
|
prerelease: false
|
78
70
|
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
none: false
|
80
71
|
requirements:
|
81
|
-
- -
|
72
|
+
- - '>='
|
82
73
|
- !ruby/object:Gem::Version
|
83
74
|
version: '0'
|
84
75
|
- !ruby/object:Gem::Dependency
|
85
76
|
name: sinatra-contrib
|
86
77
|
requirement: !ruby/object:Gem::Requirement
|
87
|
-
none: false
|
88
78
|
requirements:
|
89
79
|
- - ~>
|
90
80
|
- !ruby/object:Gem::Version
|
91
81
|
version: 1.4.2
|
92
|
-
- -
|
82
|
+
- - '>='
|
93
83
|
- !ruby/object:Gem::Version
|
94
84
|
version: 1.4.2
|
95
85
|
type: :runtime
|
96
86
|
prerelease: false
|
97
87
|
version_requirements: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
88
|
requirements:
|
100
89
|
- - ~>
|
101
90
|
- !ruby/object:Gem::Version
|
102
91
|
version: 1.4.2
|
103
|
-
- -
|
92
|
+
- - '>='
|
104
93
|
- !ruby/object:Gem::Version
|
105
94
|
version: 1.4.2
|
106
95
|
- !ruby/object:Gem::Dependency
|
107
96
|
name: rack-protection
|
108
97
|
requirement: !ruby/object:Gem::Requirement
|
109
|
-
none: false
|
110
98
|
requirements:
|
111
99
|
- - ~>
|
112
100
|
- !ruby/object:Gem::Version
|
@@ -114,7 +102,6 @@ dependencies:
|
|
114
102
|
type: :runtime
|
115
103
|
prerelease: false
|
116
104
|
version_requirements: !ruby/object:Gem::Requirement
|
117
|
-
none: false
|
118
105
|
requirements:
|
119
106
|
- - ~>
|
120
107
|
- !ruby/object:Gem::Version
|
@@ -150,6 +137,7 @@ files:
|
|
150
137
|
homepage: http://squareteam.github.io/yodatra
|
151
138
|
licenses:
|
152
139
|
- MIT
|
140
|
+
metadata: {}
|
153
141
|
post_install_message:
|
154
142
|
rdoc_options:
|
155
143
|
- --line-numbers
|
@@ -162,22 +150,20 @@ rdoc_options:
|
|
162
150
|
require_paths:
|
163
151
|
- lib
|
164
152
|
required_ruby_version: !ruby/object:Gem::Requirement
|
165
|
-
none: false
|
166
153
|
requirements:
|
167
|
-
- -
|
154
|
+
- - '>='
|
168
155
|
- !ruby/object:Gem::Version
|
169
156
|
version: '0'
|
170
157
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
|
-
none: false
|
172
158
|
requirements:
|
173
|
-
- -
|
159
|
+
- - '>='
|
174
160
|
- !ruby/object:Gem::Version
|
175
161
|
version: '0'
|
176
162
|
requirements: []
|
177
163
|
rubyforge_project:
|
178
|
-
rubygems_version:
|
164
|
+
rubygems_version: 2.0.3
|
179
165
|
signing_key:
|
180
|
-
specification_version:
|
166
|
+
specification_version: 4
|
181
167
|
summary: Classy backend development with the speed of Sinatra and the power of ActiveRecord
|
182
168
|
test_files:
|
183
169
|
- spec/unit/models_controller_spec.rb
|