simplate 0.1.0 → 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.
- checksums.yaml +4 -4
- data/.travis.yml +8 -0
- data/Gemfile +8 -0
- data/README.md +24 -2
- data/lib/simplate/copies/spec_helper.rb +2 -2
- data/lib/simplate/version.rb +1 -1
- data/spec/modules/simplate_spec.rb +2 -1
- data/spec/spec_helper.rb +13 -0
- metadata +4 -5
- data/simplate/Gemfile +0 -1
- data/simplate/spec/spec_helper.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75f6c52c1ce71c370046bc9dd68647285996b909
|
4
|
+
data.tar.gz: a710a4f8a906bf6a8dba717c20e745e1c4908a46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c26dfe5a5d942f64ce91117a6b26819c5da37491d5a35be6790d1e5e17672ae56dd681645288220bd0499823ebf7dce04f50c1a781bfab1834562895f41c7f14
|
7
|
+
data.tar.gz: ec1f40fbc845daaa2d73ad12482197c4b102b0974131f2037cc0c8a3da0cfaf91a42130f8177fa0fa8daf903d4adb9f85d10e6dc8f7a01f24cec10f4ecbe89b2
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,24 @@
|
|
1
1
|
# Simplate
|
2
2
|
|
3
|
-
|
3
|
+
[](https://codeclimate.com/github/serv/simplate)
|
4
|
+
|
5
|
+

|
6
|
+
|
7
|
+
Simplate generates a perfect directory structure
|
8
|
+
for a well organized Ruby app.
|
9
|
+
|
10
|
+
```
|
11
|
+
├── Gemfile
|
12
|
+
├── lib
|
13
|
+
│ ├── models
|
14
|
+
│ └── modules
|
15
|
+
└── spec
|
16
|
+
├── models
|
17
|
+
├── modules
|
18
|
+
└── spec_helper.rb
|
19
|
+
```
|
20
|
+
|
21
|
+
Simplate uses [RSpec](http://rspec.info/) as the default test suite.
|
4
22
|
|
5
23
|
## Installation
|
6
24
|
|
@@ -18,7 +36,11 @@ Or install it yourself as:
|
|
18
36
|
|
19
37
|
## Usage
|
20
38
|
|
21
|
-
|
39
|
+
1. Install `simplate` gem.
|
40
|
+
2. Open Terminal
|
41
|
+
3. Go to the directory where you want to generate the *simplate*
|
42
|
+
boilerplate
|
43
|
+
4. Run `$ simplate some_app_name`
|
22
44
|
|
23
45
|
## Contributing
|
24
46
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
|
3
|
-
pathname_modules = Pathname.new(Dir.pwd).
|
4
|
-
pathname_models = Pathname.new(Dir.pwd).
|
3
|
+
pathname_modules = Pathname.new(Dir.pwd).join("lib/modules")
|
4
|
+
pathname_models = Pathname.new(Dir.pwd).join("lib/models")
|
5
5
|
|
6
6
|
Dir["#{pathname_modules}/*.rb"].each {|file| require file}
|
7
7
|
Dir["#{pathname_models}/*.rb"].each {|file| require file}
|
data/lib/simplate/version.rb
CHANGED
@@ -3,7 +3,8 @@ require 'spec_helper'
|
|
3
3
|
describe Simplate do
|
4
4
|
|
5
5
|
it '.root_path' do
|
6
|
-
|
6
|
+
expected = Pathname.new(__FILE__).parent.parent.parent.to_s
|
7
|
+
Simplate.root_path.to_s.should == expected
|
7
8
|
end
|
8
9
|
|
9
10
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -8,3 +8,16 @@ Dir["#{pathname_root_module}/*.rb"].each {|file| require file}
|
|
8
8
|
|
9
9
|
RSpec.configure do |config|
|
10
10
|
end
|
11
|
+
|
12
|
+
if defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby" && RUBY_VERSION >= "1.9"
|
13
|
+
module Kernel
|
14
|
+
alias :__at_exit :at_exit
|
15
|
+
def at_exit(&block)
|
16
|
+
__at_exit do
|
17
|
+
exit_status = $!.status if $!.is_a?(SystemExit)
|
18
|
+
block.call
|
19
|
+
exit exit_status if exit_status
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Kim
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -48,6 +48,7 @@ extensions: []
|
|
48
48
|
extra_rdoc_files: []
|
49
49
|
files:
|
50
50
|
- ".gitignore"
|
51
|
+
- ".travis.yml"
|
51
52
|
- Gemfile
|
52
53
|
- LICENSE.txt
|
53
54
|
- README.md
|
@@ -59,8 +60,6 @@ files:
|
|
59
60
|
- lib/simplate/modules/command.rb
|
60
61
|
- lib/simplate/version.rb
|
61
62
|
- simplate.gemspec
|
62
|
-
- simplate/Gemfile
|
63
|
-
- simplate/spec/spec_helper.rb
|
64
63
|
- spec/modules/command_spec.rb
|
65
64
|
- spec/modules/simplate_spec.rb
|
66
65
|
- spec/spec_helper.rb
|
@@ -84,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
83
|
version: '0'
|
85
84
|
requirements: []
|
86
85
|
rubyforge_project:
|
87
|
-
rubygems_version: 2.2.
|
86
|
+
rubygems_version: 2.2.1
|
88
87
|
signing_key:
|
89
88
|
specification_version: 4
|
90
89
|
summary: Boilerplate for creating an opinionated Ruby app
|
data/simplate/Gemfile
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
@@ -1,10 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
|
3
|
-
pathname_modules = Pathname.new(Dir.pwd).parent.join("lib/modules")
|
4
|
-
pathname_models = Pathname.new(Dir.pwd).parent.join("lib/models")
|
5
|
-
|
6
|
-
Dir["#{pathname_modules}/*.rb"].each {|file| require file}
|
7
|
-
Dir["#{pathname_models}/*.rb"].each {|file| require file}
|
8
|
-
|
9
|
-
RSpec.configure do |config|
|
10
|
-
end
|