rapp 0.2.2 → 0.2.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: c296df48d1c482b07ddf0e3d09092bad7966b3e7
4
- data.tar.gz: 5d4a5c69a4b7a0fd42cc8baaadf4ab4950de7e8f
3
+ metadata.gz: 5bd904e61a3025abe32f14c1250c8473efff3127
4
+ data.tar.gz: 53181c8dec42473a235b304ac37864d8bc5f5ddb
5
5
  SHA512:
6
- metadata.gz: 4212bda2d439e05d0c0ade2d93aa2c9cc47996483a83d63cfd9ffdb403897fd1aeb3b8cb762a9e47ceb6279e976e48721d4ed93dc4fcfe60d9a7cdfaf9163d7a
7
- data.tar.gz: cac8b975f8e35fb4ff8261152e4a8ac9b7219716a1a52fe1b799328459722652d3020fbedd5fbd2534275792ea5109a8a9399e0f2c02c7741f8769db49021e9f
6
+ metadata.gz: 4051322416bc5853c94304bf34bdd3932e9546597eb59c19410e86c8d8b8f7dd1e2580f851de1134195e5aa7ab928b6825a5c56b2474785c278668e78e3ab37f
7
+ data.tar.gz: ab248896fa572d189784b90f85d7338fa307e6a29507b49d993ca4f7c5dd96bd71fb6fee7f6b479d0dd6c080da64fb78a05e81fabcb97bf69044658d9607c619
data/README.md CHANGED
@@ -30,15 +30,15 @@ Currently, Rapp is in early development, and additional features are forthcoming
30
30
 
31
31
  ### Ethos
32
32
 
33
- 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, the project is yours to do with as you see fit - the gem itself is not a dependency of the app you create.
33
+ 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, ir is yours to do with as you see fit - the gem itself is not a dependency of the app you create.
34
34
 
35
- Rapps 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.
35
+ 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.
36
36
 
37
37
  Rapp is in no way shape or form meant for building web applications. You are free to attempt this if you wish, but if thats your goal, you're much better off with Rails, Sinatra, pure Rack, or any number of alternatives.
38
38
 
39
- ### Creating a new Rapp
39
+ ### Creating a new Rapp project
40
40
 
41
- Creating a new Rapp is simple
41
+ Creating a new Rapp project is simple
42
42
 
43
43
  ```shell
44
44
  rapp my_new_rapp
@@ -50,11 +50,11 @@ If the command executed successuflly, you should see a report displaying the fol
50
50
 
51
51
  ### Dependencies
52
52
 
53
- Rapp only installs 2 dependencies into your application - bundler and rake. Eventually, It will also include rspec, as well as a suite of specs for you to run to validate that the core underpinnings of Rapp are working as expected, in addition to your own custom specs.
53
+ Rapp projects only have 2 dependencies - bundler and rake. Optionally, it will also include rspec, as well as a suite of specs for you to run to validate that the core underpinnings of the project are working as expected, in addition to your own custom specs.
54
54
 
55
55
  ### Layout
56
56
 
57
- Rapp application structure looks like the following:
57
+ Rapp project structure looks like the following:
58
58
 
59
59
  * app/
60
60
  * app/models/
@@ -66,7 +66,7 @@ Rapp application structure looks like the following:
66
66
  * config/initializers/
67
67
  * lib/
68
68
  * lib/tasks/
69
- * spec/
69
+ * spec/ (optional)
70
70
  * {app_name}.rb
71
71
  * {app_name}_base.rb
72
72
  * Gemfile
@@ -113,19 +113,15 @@ These are loaded after Bundler, but before anything in app/
113
113
 
114
114
  Used for the same purpose as a Rails app or Ruby gem. Any code that falls outside of the norms of app/ would be placed here. Additionally, you may place tasks in lib/tasks/, and they will be registered via the Rake integration
115
115
 
116
- ### Spec directory
117
-
118
- Mostly reserved for future use, this is where both Rapp specific specs to ensure the well-being of your core application will reside, as well as application specific specs that you write to ensure your custom logic and behaviors are working correctly (You are writing tests... right?)
119
-
120
116
  ### Rake
121
117
 
122
118
  Currently, Rapp comes with 1 predefined rake task, which is "console". This will boot up irb while loading your {app_name}.rb, which will load the rest of your app. This is aliased to "c" for convenience.
123
119
 
124
- ### Specs
120
+ ### Specs (Optional)
125
121
 
126
- Optionally you can generate specs for your app to test the underpinnings of what Rapp has created. You can do this by specifying the ```--specs``` or ```-s``` flags on the command line.
122
+ You can generate specs for your app to test the underpinnings of what Rapp has created. You can do this by specifying the ```--specs``` or ```-s``` flags on the command line.
127
123
 
128
- These specs aim to not be in the way of you writing your own specs, and so the spec_helper is sparse, and the generated specs attempt to not include a test for {app_name}, but rather {app_name}_base, so that you can do any {app_name} specific testing in that file yourself.
124
+ These specs aim to not be in the way of you writing your own specs, and so the spec_helper is sparse, and the generated specs attempt to not include a test for {app_name}, but rather {app_name}_base, so that you can do any {app_name} specific testing in that file yourself if you so choose.
129
125
 
130
126
  Mainly, these are here to help you make changes to a Rapp project once it's been generated if you so need, being able to verify that the core behaviors still function.
131
127
 
@@ -135,7 +131,9 @@ At the moment, this gem serves to fit a need that I found myself having and figu
135
131
 
136
132
  1. Generate increased / improved specs for the users application
137
133
  2. General code cleanup. Much of the code is prototypical and is not as DRY as it could be (ex: the builder class)
138
- 3. Test ease of use integrating Chore / Sidekiq like job systems
134
+ 3. Dotenv integration for ease of local development w/ sample file containing all env vars
135
+ 4. Configurable logging level from the environment
136
+ 5. Test ease of use integrating Chore / Sidekiq like job systems
139
137
 
140
138
  ## Contributing
141
139
 
data/lib/rapp/builder.rb CHANGED
@@ -15,6 +15,7 @@ module Rapp
15
15
  "config/initializers",
16
16
  "lib",
17
17
  "lib/tasks",
18
+ "log"
18
19
  ]
19
20
 
20
21
  SpecStructure = [
@@ -1,4 +1,5 @@
1
1
  require 'env'
2
+ require 'logger'
2
3
 
3
4
  module <%= class_name %>Base
4
5
 
@@ -15,8 +16,8 @@ module <%= class_name %>Base
15
16
  end
16
17
 
17
18
  def logger
18
- @logger ||= Logger.new(ENV['APP_LOG_PATH'] || "./log/app.log").tap do |l|
19
- l.level = Logger::DEBUG
19
+ @logger ||= ::Logger.new(ENV['APP_LOG_PATH'] || "./log/<%= app_name %>.log").tap do |l|
20
+ l.level = ::Logger::DEBUG
20
21
  l.formatter = lambda do |severity, datetime, progname, msg|
21
22
  "[#{datetime} (#{Process.pid})] #{severity} : #{msg}\n"
22
23
  end
data/lib/rapp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rapp
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
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.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - StabbyCutyou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-19 00:00:00.000000000 Z
11
+ date: 2015-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler