rapp 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: 994123e9e833900094e1b2326e34afc6993d06e9
4
- data.tar.gz: 9b9d587f2174df8f7a0eb886ed5dd314362ddc16
3
+ metadata.gz: 11a87ccab2e7220ca6d71df878d4efdcbf69a19f
4
+ data.tar.gz: 130d918a4b2b4efc33fbdc2bbc5ff8ea06abce0d
5
5
  SHA512:
6
- metadata.gz: fa76eb6a6625ab01e3b2a2cf03558819fad64451a420d35fa3675b1b6553af4d798b2214450c9fb6cea9d2d1ef804df2c9d441448637172f6905b345093dff64
7
- data.tar.gz: de4b8fbe25b179189cff11fa671d6ea4c9aa2995fa5432ff9a6790781b8a0e7e23aad58146b1d7b1869a608f3c0a41af03dca8c238193832ff50dc61761730d8
6
+ metadata.gz: c7d944219f5345e026053d27f12ca3543b1ef1e5fdfd063b24544f4829efba5b8302ca51910545e483a06a760d7378911da697f7d659096b5bf4eb760184bd98
7
+ data.tar.gz: bdd3ede7bb48ce39573e21598ef779f0486504f7ab83d747329496634c4550eac1c44f14a4da4216e790ffb0b80ff7f4009b1f41f375fca060692aa20a850f55
data/README.md CHANGED
@@ -26,7 +26,7 @@ Currently, Rapp is in early development, and additional features are forthcoming
26
26
 
27
27
  ### Ethos
28
28
 
29
- Rapp is not a framework for running an app or building an app from pieces-parts. 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 niceities, 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 dependencty of the app you create.
29
+ Rapp is not a framework for running an app or building an app from pieces-parts. 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 dependencty of the app you create.
30
30
 
31
31
  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.
32
32
 
@@ -37,10 +37,10 @@ Rapp is in no way shape or form meant for building web applications. You are fre
37
37
  Creating a new Rapp is simple
38
38
 
39
39
  ```shell
40
- rapp new my_new_rapp
40
+ rapp my_new_rapp
41
41
  ```
42
42
 
43
- The only requirement is that the directory must not exist / be empty, as a safegaurd against accidentally overwriting any existing projects or Rapps. Otherwise, thats it!
43
+ The only requirement is that the directory must not exist as a safegaurd against accidentally overwriting any existing projects. Otherwise, thats it!
44
44
 
45
45
  If the command executed successuflly, 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!
46
46
 
@@ -119,8 +119,7 @@ Currently, Rapp comes with 1 predefined rake task, which is "console". This will
119
119
  At the moment, this gem serves to fit a need that I found myself having and figured others might be as well. To that end, my main goals are to provide a simple, stable core ruby app intended to be run as a simple cli program, daemonized process, or otherwise. Currently, my primary roadmap for development is:
120
120
 
121
121
  1. Generate specs for the users application
122
- 2. Provide proper CLI for the binary, to make future command line functionality easier to implement
123
- 3. Test ease of use integrating Chore / Sidekiq like job systems
122
+ 2. Test ease of use integrating Chore / Sidekiq like job systems
124
123
 
125
124
  ## Contributing
126
125
 
data/bin/rapp CHANGED
@@ -2,5 +2,7 @@
2
2
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
3
 
4
4
  require 'rapp/builder'
5
+ require 'rapp/cli'
5
6
 
6
- Rapp::Builder.new_app({"name"=>ARGV[0]})
7
+ opts = Rapp::CLI.parse(ARGV)
8
+ Rapp::Builder.new_app(opts)
data/lib/rapp/builder.rb CHANGED
@@ -20,12 +20,10 @@ module Rapp
20
20
  class << self
21
21
  def new_app(opts={})
22
22
  # Get name
23
- raise ArgumentError.new("You must provide a name") unless app_name = opts.delete("name")
23
+ raise ArgumentError.new("You must provide a name") unless app_name = opts.delete(:name)
24
24
  # Check if folder exists
25
25
  root_dir = "#{`pwd`.strip}/#{app_name}"
26
26
  raise ArgumentError.new("Directory #{root_dir} already exists") if File.directory?(root_dir)
27
- # Check if it's empty
28
- raise ArgumentError.new("Directory #{root_dir} not empty") unless Dir["#{root_dir}/*"].empty?
29
27
 
30
28
  # Build the directory structure first
31
29
  Dir.mkdir(root_dir)
data/lib/rapp/cli.rb ADDED
@@ -0,0 +1,16 @@
1
+ require 'optparse'
2
+ module Rapp
3
+ class CLI
4
+ class << self
5
+ def parse(args)
6
+ options = {:name=>args[0]}
7
+
8
+ OptionParser.new do |opts|
9
+ opts.banner = "Usage: rapp [app_name]"
10
+ end.parse!
11
+
12
+ options
13
+ end
14
+ end
15
+ end
16
+ end
data/lib/rapp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rapp
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rapp
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
  - StabbyCutyou
@@ -55,6 +55,7 @@ files:
55
55
  - bin/rapp
56
56
  - lib/rapp.rb
57
57
  - lib/rapp/builder.rb
58
+ - lib/rapp/cli.rb
58
59
  - lib/rapp/templates/Gemfile.erb
59
60
  - lib/rapp/templates/Rakefile.erb
60
61
  - lib/rapp/templates/app.rb.erb