jungle_path 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa568e6121f73ebcf9e37a3fa48f87b73b2c2d26
4
- data.tar.gz: b4b800b43f212c708ffd76681c342cddca969d76
3
+ metadata.gz: 9281d125031a92326508b2c2e95ca6ec1ff428d7
4
+ data.tar.gz: f7c3f540af52fd72836e2ffc52f1de0c642d78fa
5
5
  SHA512:
6
- metadata.gz: c3968c3ba0864c05c8f2e2b05148d93d110f4c570ffc2d2d9df1174697be3d00b5b33cc1b328e669758d7920a7de5f10cfd81b5bbd4f744e5b78ab425ede06a6
7
- data.tar.gz: 99ec0c3dbca92db4336fdf47cb68af87f20368a618f9fe37dc7d8a681bb12a014af06646e4aea3f5a04090af5a0e18c4b7f494003c38a1849e8740c84270c170
6
+ metadata.gz: abe8387c20be14a497d9bea9188e03036f170e38d8c46145663e937e198c675ec9e7c151b5087b315c8f056611a6d15d6e12103a304bd12588f36417cfa9a7ab
7
+ data.tar.gz: 5b704801ffb5fb513c6e6f3f4e267bef3ed9a444d67c2ea401857a1ec56326d954e02b28e4d2f4cd516095fc4fc53d30b619076e583b81ab827840dcc812ca75
@@ -5,5 +5,5 @@ require 'jungle_path/gen/controllers'
5
5
  require '../config/config.rb'
6
6
  require '../schemas/schema'
7
7
 
8
- JunglePath::Gen.controllers(configatron.application.root_dir, Schema::Base.models.values)
9
- JunglePath::Gen.api(configatron.application.root_dir, Schema::Base.models.values)
8
+ JunglePath::Gen.controllers(jungle.application.root_dir, Schema::Base.models.values)
9
+ JunglePath::Gen.api(jungle.application.root_dir, Schema::Base.models.values)
@@ -4,4 +4,4 @@ require_relative '../db/db'
4
4
 
5
5
  version = nil
6
6
  version = ARGV[0].to_i if ARGV[0]
7
- JunglePath::Migration.run Schema, ServerAPI::DB.instance, version
7
+ JunglePath::Migration.run Schema, Server::DB.instance, version
@@ -1,20 +1,22 @@
1
1
  # gen_controller.rb
2
2
  require 'erb'
3
3
 
4
- module Gen
5
- def self.controllers(app_root_path, tables, output_file='./controllers/generated.rb', controller_name_space='Controller', schema_require_relative='../schemas/schema', template_file=nil)
6
- if template_file
7
- template_file = ::File.expand_path(template_file, app_root_path)
8
- else
9
- template_file = ::File.expand_path('../controller/template.erb', ::File.dirname(__FILE__))
10
- end
4
+ module JunglePath
5
+ module Gen
6
+ def self.controllers(app_root_path, tables, output_file='./controllers/generated.rb', controller_name_space='Controller', schema_require_relative='../schemas/schema', template_file=nil)
7
+ if template_file
8
+ template_file = ::File.expand_path(template_file, app_root_path)
9
+ else
10
+ template_file = ::File.expand_path('../controller/template.erb', ::File.dirname(__FILE__))
11
+ end
11
12
 
12
- # template uses name_space and controller_name_space vars:``
13
- template = ERB.new(File.read(template_file))
13
+ # template uses name_space and controller_name_space vars:``
14
+ template = ERB.new(File.read(template_file))
14
15
 
15
- output_file = ::File.expand_path(output_file, app_root_path)
16
- result = template.result(binding)
17
- puts result
18
- File.write(output_file, result)
16
+ output_file = ::File.expand_path(output_file, app_root_path)
17
+ result = template.result(binding)
18
+ puts result
19
+ File.write(output_file, result)
20
+ end
19
21
  end
20
22
  end
@@ -1,3 +1,3 @@
1
1
  module JunglePath
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jungle_path
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael VanZant
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-18 00:00:00.000000000 Z
11
+ date: 2017-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler