napa 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/napa/generators/templates/api/app/entities/%name_underscore%_entity.rb.tt +1 -0
- data/lib/napa/generators/templates/scaffold/app.rb +2 -1
- data/lib/napa/version.rb +1 -1
- data/lib/napa.rb +2 -12
- data/lib/setup.rb +16 -0
- data/lib/tasks/routes.rake +9 -7
- data/napa.gemspec +1 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85be84826e98fa6f4a7108ea9650afacd5136a03
|
4
|
+
data.tar.gz: 890e77a8fc87a8a9526a92b2b8252306774a3409
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eabb2e57c9d1db9f0ff358e6906a6ee98e7cd2298a7d59e68ba4ceef64cd635a937323e150642c6b027a7c0d910cde55a6891f8c3ee8056e59a9d78a132f9ffb
|
7
|
+
data.tar.gz: 9275bea4d4c8d9494f385db6f48834946717bba0b117e9c6c7027a9f22a84753a942b16ca8dfb25b8f5bb94fb97c7de05b9db1a1f776ee950a61fc7d9d543e6d
|
data/lib/napa/version.rb
CHANGED
data/lib/napa.rb
CHANGED
@@ -7,12 +7,14 @@ require 'grape'
|
|
7
7
|
require 'json'
|
8
8
|
|
9
9
|
# require internal files
|
10
|
+
require 'setup'
|
10
11
|
require 'napa/version'
|
11
12
|
require 'napa/logger/logger'
|
12
13
|
require 'napa/logger/log_transaction'
|
13
14
|
require 'napa/identity'
|
14
15
|
require 'napa/json_error'
|
15
16
|
require 'napa/stats'
|
17
|
+
require 'napa/active_record_extensions/filter_by_hash'
|
16
18
|
require 'napa/grape_extensions/error_formatter'
|
17
19
|
require 'napa/grape_extensions/error_presenter'
|
18
20
|
require 'napa/middleware/logger'
|
@@ -30,15 +32,3 @@ if defined?(Rake)
|
|
30
32
|
load 'tasks/routes.rake'
|
31
33
|
load 'tasks/db.rake'
|
32
34
|
end
|
33
|
-
|
34
|
-
module Napa
|
35
|
-
class << self
|
36
|
-
def env
|
37
|
-
@_env ||= ActiveSupport::StringInquirer.new(ENV['RACK_ENV'] || 'development')
|
38
|
-
end
|
39
|
-
|
40
|
-
def env=(environment)
|
41
|
-
@_env = ActiveSupport::StringInquirer.new(environment)
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
data/lib/setup.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# setup for napa
|
2
|
+
# require the files that are required before everything else in napa
|
3
|
+
# useful if you want to use any variables/methods defined here without loading the rest of napa immediately
|
4
|
+
require 'active_support'
|
5
|
+
|
6
|
+
module Napa
|
7
|
+
class << self
|
8
|
+
def env
|
9
|
+
@_env ||= ActiveSupport::StringInquirer.new(ENV['RACK_ENV'] || 'development')
|
10
|
+
end
|
11
|
+
|
12
|
+
def env=(environment)
|
13
|
+
@_env = ActiveSupport::StringInquirer.new(environment)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/tasks/routes.rake
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
unless defined?(Rails)
|
2
|
+
desc "display all routes"
|
3
|
+
task :routes do
|
4
|
+
grape_apis = ObjectSpace.each_object(Class).select { |klass| klass < Grape::API }
|
5
|
+
grape_apis.each do |api|
|
6
|
+
api.routes.each do |r|
|
7
|
+
puts "#{r}"
|
8
|
+
end
|
7
9
|
end
|
8
10
|
end
|
9
|
-
end
|
11
|
+
end
|
data/napa.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: napa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Darby Frey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - '>='
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: grape-entity
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: unicorn
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -276,6 +290,7 @@ files:
|
|
276
290
|
- lib/napa/middleware/request_stats.rb
|
277
291
|
- lib/napa/stats.rb
|
278
292
|
- lib/napa/version.rb
|
293
|
+
- lib/setup.rb
|
279
294
|
- lib/tasks/db.rake
|
280
295
|
- lib/tasks/deploy.rake
|
281
296
|
- lib/tasks/git.rake
|