rapp 0.3.2 → 0.4.0
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 +4 -4
- data/README.md +2 -2
- data/lib/rapp/templates/lib/app_name_base.rb.erb +18 -18
- data/lib/rapp/templates/lib/env.rb.erb +8 -4
- data/lib/rapp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 084b99cab25b0280211cfea22eb1ed86ac0ccf1e
|
4
|
+
data.tar.gz: e4d82cba7c9bc7e6b19ed1c86f093ba8933de2aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88ad31719c6c3334fefda1c29e12641c630e65bea6efe51be409fbcd4b4681011e3d503e26ef742fe3adac05a9ea34f83265e85a798753f896bcd69917f35653
|
7
|
+
data.tar.gz: 5d018f31918fb8f87e7952d1ba3ed5a4d3943042c9fb6c329494042b57e3d4e7c2d6486cfe19c1c1f1849415611ecdecd902c025d7504d5c61bb35a3d091245c
|
data/README.md
CHANGED
@@ -21,7 +21,7 @@ Currently, Rapp is in early development, and additional features are forthcoming
|
|
21
21
|
|
22
22
|
### Ethos
|
23
23
|
|
24
|
-
Rapp is not a framework for running an app. In the future, there may be additional helpers to configure very common components in the ruby community, but the overall goal is to hand you a working application with a few common niceties, then get out of your way. Once you've generated the Rapp project,
|
24
|
+
Rapp is not a framework for running an app. In the future, there may be additional helpers to configure very common components in the ruby community, but the overall goal is to hand you a working application with a few common niceties, then get out of your way. Once you've generated the Rapp project, it is yours to do with as you see fit - the gem itself is not a dependency of the app you create.
|
25
25
|
|
26
26
|
Rapp projects are shells to house your app, in a familiar layout, to prevent you from having to write the same boring boilerplate time and time again.
|
27
27
|
|
@@ -37,7 +37,7 @@ rapp my_new_rapp
|
|
37
37
|
|
38
38
|
The only requirement is that the directory must not exist as a safegaurd against accidentally overwriting any existing projects. Otherwise, thats it!
|
39
39
|
|
40
|
-
If the command executed
|
40
|
+
If the command executed successfully, you should see a report displaying the folders and files that Rapp created for you. After that, you're ready to start building your app!
|
41
41
|
|
42
42
|
### Dependencies
|
43
43
|
|
@@ -2,7 +2,7 @@ require 'env'
|
|
2
2
|
require 'logger'
|
3
3
|
|
4
4
|
module <%= class_name %>Base
|
5
|
-
|
5
|
+
|
6
6
|
RAPP_VERSION="<%= rapp_version %>"
|
7
7
|
|
8
8
|
def self.included(base) #:nodoc:
|
@@ -18,7 +18,7 @@ module <%= class_name %>Base
|
|
18
18
|
def root
|
19
19
|
File.expand_path("..", File.dirname(__FILE__))
|
20
20
|
end
|
21
|
-
|
21
|
+
|
22
22
|
def logger
|
23
23
|
@logger ||= ::Logger.new(ENV['APP_LOG_PATH'] || "./log/<%= app_name %>.log").tap do |l|
|
24
24
|
l.level = ::Logger::DEBUG
|
@@ -33,29 +33,29 @@ module <%= class_name %>Base
|
|
33
33
|
# Load all dependent gems
|
34
34
|
require 'bundler'
|
35
35
|
Bundler.require(:default, <%=class_name %>.env.to_s)
|
36
|
-
|
36
|
+
|
37
37
|
# Set up additional load paths
|
38
|
-
|
38
|
+
|
39
39
|
# I'm not sure if we need "app" in the load path
|
40
40
|
# Everything there should be auto-loaded, but you never know...
|
41
41
|
$:.unshift File.expand_path("./app")
|
42
|
-
|
42
|
+
|
43
43
|
# Load the right environment initializer
|
44
|
-
|
44
|
+
|
45
45
|
require "config/environments/#{<%=class_name %>.env.to_s}"
|
46
|
-
|
46
|
+
|
47
47
|
# Load initializers
|
48
|
-
|
49
|
-
Dir["./config/initializers
|
50
|
-
|
48
|
+
|
49
|
+
Dir["./config/initializers/*.rb"].sort.each {|file| require file }
|
50
|
+
|
51
51
|
# Load config
|
52
|
-
|
53
|
-
Dir["./config
|
54
|
-
|
52
|
+
|
53
|
+
Dir["./config/**/*.rb"].sort.each {|file| require file}
|
54
|
+
|
55
55
|
# Load job files
|
56
|
-
|
57
|
-
Dir["./app/models
|
58
|
-
Dir["./app/services
|
59
|
-
Dir["./app/jobs
|
56
|
+
|
57
|
+
Dir["./app/models/**/*.rb"].sort.each {|file| require file }
|
58
|
+
Dir["./app/services/**/*.rb"].sort.each {|file| require file }
|
59
|
+
Dir["./app/jobs/**/*.rb"].sort.each {|file| require file }
|
60
60
|
end
|
61
|
-
end
|
61
|
+
end
|
@@ -3,17 +3,21 @@ class <%= class_name %>
|
|
3
3
|
def initialize(env)
|
4
4
|
@env = env
|
5
5
|
end
|
6
|
-
|
6
|
+
|
7
7
|
def to_s
|
8
8
|
@env.downcase
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
def production?
|
12
12
|
@env == 'production'
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
|
+
def test?
|
16
|
+
@end == 'test'
|
17
|
+
end
|
18
|
+
|
15
19
|
def development?
|
16
20
|
@env == 'development'
|
17
21
|
end
|
18
22
|
end
|
19
|
-
end
|
23
|
+
end
|
data/lib/rapp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- StabbyCutyou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|