ruby-app 0.1 → 0.1.1

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.
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  Gemfile.lock
2
- *.gem
2
+ *.gem
3
+ _1
data/README.md CHANGED
@@ -8,9 +8,10 @@ gem install ruby-app
8
8
  ```
9
9
 
10
10
  $ ruby-app new_app
11
- $ bundle
11
+ $ cd new_app && bundle
12
12
 
13
13
  Run like:
14
14
 
15
+ $ ./bin/dummy
15
16
  $ APP_ENV=production ./bin/dummy
16
17
 
@@ -28,6 +28,11 @@ require 'active_support/dependencies'
28
28
  require 'active_support/core_ext/numeric/time'
29
29
  require 'active_support/core_ext/object/blank'
30
30
 
31
+ # load application app
32
+ require File.join(App.root, %w{lib application})
33
+
34
+ App.logger.info "Loading #{App.name}[#{App.env}] ..."
35
+
31
36
  # default config from app
32
37
  require File.join(App.root, %w{config config})
33
38
 
@@ -41,20 +46,14 @@ end
41
46
  # unshift lib app
42
47
  $:.unshift(File.join(App.root, 'lib'))
43
48
 
44
- # unshift dirs app
45
- dirs = Dir[File.join(App.root, %w{app *})]
46
- dirs.each{|a| $:.unshift(a) }
47
-
48
- #[:controllers, :models, :commands].each do |a|
49
- # ActiveSupport::Dependencies::autoload_paths << "#{App.root}/app/#{a}"
50
- #end
51
-
52
49
  ActiveSupport::Dependencies::autoload_paths << File.join(App.root, 'lib')
53
50
 
54
- #App.logger.info "started #{App.name} with env #{App.env}"
55
-
56
- # load application app
57
- require File.join(App.root, %w{lib application})
51
+ # unshift dirs app
52
+ dirs = Dir[File.join(App.root, %w{app *})]
53
+ dirs.each do |a|
54
+ $:.unshift(a)
55
+ ActiveSupport::Dependencies::autoload_paths << a
56
+ end
58
57
 
59
58
  # load initializers app
60
59
  Dir["#{App.root}/config/initializers/*.rb"].each{ |x| load(x) }
@@ -65,7 +64,7 @@ Dir["#{App.root}/app/models/*.rb"].each{ |x| require x }
65
64
  # later controllers app
66
65
  Dir["#{App.root}/app/controllers/*.rb"].each{ |x| require x }
67
66
 
68
- # later all app
67
+ # later all app from app
69
68
  dirs.each do |dir|
70
69
  Dir["#{dir}/*.rb"].each{ |x| require x }
71
70
  end
@@ -1,3 +1,3 @@
1
1
  module RubyApp
2
- VERSION = "0.1"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-app
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- version: "0.1"
9
+ - 1
10
+ version: 0.1.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Makarchev Konstantin