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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 353497e30142e780c7ae204fb644cab8c0e6f92a
4
- data.tar.gz: 3ad2a5444a9d6b316c46e96881f44e501d6a66b8
3
+ metadata.gz: c7febd41002b09fdbbac68994dd5623e0a42c042
4
+ data.tar.gz: 2caf05cbb38893d4b25ce8d2194c6160c313791f
5
5
  SHA512:
6
- metadata.gz: 8add2bc3144116085cba7a3e1231d8156c405d875a4f4a8d7d96899d8a4173726c07e346453880723cddb1e35902492576677dd1a27947ca71231fa2230208d4
7
- data.tar.gz: 6d2c2884006df5e3c3fb38aa015533bffbb8b5b3f144d956fc613a1c9a17bc8a723b26eb9e5dab4b70e01ad77d9f138de11ef31b93ae277ebfb71bb3718fe713
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 scaffold')
8
- register(Generators::ApiGenerator, 'generate', 'generate api <generator_name> <name>',
9
- 'Create a Grape API and model')
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
- argument :generator_name # allows us to type reasonable CLI commands
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 generate
19
+ def api
20
20
  self.class.source_root "#{File.dirname(__FILE__)}/templates/api"
21
21
  say 'Generating api...'
22
22
  directory '.', '.'
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'rack-cors'
4
4
  gem 'mysql2'
5
- gem 'activerecord', :require => 'active_record'
5
+ gem 'activerecord', '~> 4.0.0', :require => 'active_record'
6
6
  gem 'honeybadger'
7
7
  gem 'json'
8
8
  gem 'shotgun'
@@ -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
 
@@ -14,5 +14,5 @@ use Napa::Middleware::AppMonitor
14
14
  use Napa::Middleware::Authentication
15
15
  use ActiveRecord::ConnectionAdapters::ConnectionManagement
16
16
 
17
- run ApplicationApi # <-- boot your service here --
17
+ run ApplicationApi
18
18
 
data/lib/napa/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Napa
2
- VERSION = '0.1.23'
2
+ VERSION = '0.1.24'
3
3
 
4
4
  class Version
5
5
  class << self
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.23
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-25 00:00:00.000000000 Z
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.1.11
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