napa 0.1.23 → 0.1.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/napa/cli.rb +8 -3
- data/lib/napa/generators/api_generator.rb +2 -2
- data/lib/napa/generators/templates/scaffold/Gemfile +1 -1
- data/lib/napa/generators/templates/scaffold/app.rb +0 -3
- data/lib/napa/generators/templates/scaffold/config.ru.tt +1 -1
- data/lib/napa/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7febd41002b09fdbbac68994dd5623e0a42c042
|
4
|
+
data.tar.gz: 2caf05cbb38893d4b25ce8d2194c6160c313791f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 244dc429fc410f92724fc39aee2dcbbd62763dc1873efd2037638ac40c921d64b0103791ae47cf5f8f2f8b4b289d62c755017b5136a39833ebeb7f42efb191a5
|
7
|
+
data.tar.gz: 71dedf3a1766f124b217a059a3eb2ea8b5cb26eaad8b0759a07ee124463207a726fb77006d2c8774d87c449578fe8d5fd2708cb9fafd4aa792b1de4e0a44172f
|
data/lib/napa/cli.rb
CHANGED
@@ -3,9 +3,14 @@ require 'napa/generators'
|
|
3
3
|
|
4
4
|
module Napa
|
5
5
|
class CLI < Thor
|
6
|
+
desc "version", "Shows the Napa version number"
|
7
|
+
def version
|
8
|
+
say Napa::VERSION
|
9
|
+
end
|
10
|
+
|
6
11
|
register(Generators::ScaffoldGenerator, 'new', 'new <app_name> [app_path]',
|
7
|
-
'Create a new Napa
|
8
|
-
register(Generators::ApiGenerator, 'generate', 'generate
|
9
|
-
'Create a Grape API and
|
12
|
+
'Create a scaffold for a new Napa service')
|
13
|
+
register(Generators::ApiGenerator, 'generate:api', 'generate:api <api_name>',
|
14
|
+
'Create a Grape API, Model and Entity')
|
10
15
|
end
|
11
16
|
end
|
@@ -5,7 +5,7 @@ module Napa
|
|
5
5
|
module Generators
|
6
6
|
class ApiGenerator < Thor::Group
|
7
7
|
include Thor::Actions
|
8
|
-
|
8
|
+
namespace :generate
|
9
9
|
argument :name
|
10
10
|
|
11
11
|
def name_underscore
|
@@ -16,7 +16,7 @@ module Napa
|
|
16
16
|
name.tableize
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
19
|
+
def api
|
20
20
|
self.class.source_root "#{File.dirname(__FILE__)}/templates/api"
|
21
21
|
say 'Generating api...'
|
22
22
|
directory '.', '.'
|
@@ -8,9 +8,6 @@ require 'napa'
|
|
8
8
|
# load environment
|
9
9
|
Dotenv.load(Napa.env.test? ? '.env.test' : '.env')
|
10
10
|
|
11
|
-
# autoload lib
|
12
|
-
Dir['./lib/**/**/*.rb'].map { |file| require file }
|
13
|
-
|
14
11
|
# autoload initalizers
|
15
12
|
Dir['./config/initializers/**/*.rb'].map { |file| require file }
|
16
13
|
|
data/lib/napa/version.rb
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.24
|
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-02-
|
11
|
+
date: 2014-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -331,7 +331,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
331
331
|
version: '0'
|
332
332
|
requirements: []
|
333
333
|
rubyforge_project:
|
334
|
-
rubygems_version: 2.
|
334
|
+
rubygems_version: 2.2.2
|
335
335
|
signing_key:
|
336
336
|
specification_version: 4
|
337
337
|
summary: A simple framework for building APIs with Grape
|