biran 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +24 -4
- data/lib/biran.rb +3 -0
- data/lib/biran/config.rb +1 -2
- data/lib/biran/config_defaults.rb +1 -1
- data/lib/biran/configurinator.rb +1 -1
- data/lib/biran/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbbf6682aad11d3d9954df25555baa94be850624
|
4
|
+
data.tar.gz: 39016c642ec0bce21ca5394275271cd7409632cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2379b8246e3690e8851d5204a5d85a2e6bbcdbc7c154e6222aec125232245586e59ac1818a8ac9ffcf576be8be46c0903dc5ab46d098749b97127cba2a29fd14
|
7
|
+
data.tar.gz: 670cebdc1b49959dc578e142d47b16ceb53f022bc7f08cf52b71a4853cdf1ac6c4acacc4fe6c9684550ffeee476eb01a1bf792c1bee2cb5fdfe19f13322fded8
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@ That guy that creates the config files for every new proyect.
|
|
6
6
|
|
7
7
|
This is a simple proof of concept on the configuration files we use in most of our rails/ruby projects.
|
8
8
|
|
9
|
-
This version will look for an `app_config.yml` file
|
9
|
+
This version will look for an `app_config.yml` file in `config` folder in the project root.
|
10
10
|
|
11
11
|
# TODO:
|
12
12
|
|
@@ -15,6 +15,27 @@ This version will look for an `app_config.yml` file on `config` folder in the pr
|
|
15
15
|
- Add option for server config, right now only creates nginx vhost file and mysql database files for rails AR projects.
|
16
16
|
- More stuff
|
17
17
|
|
18
|
+
# Use
|
19
|
+
In a rails app, simply include the gem in your Gemfile:
|
20
|
+
```
|
21
|
+
gem 'biran'
|
22
|
+
```
|
23
|
+
|
24
|
+
In a non-rails app, you will need to do some extra work to make the tasks available to rake. In your Rakefile you will need to manually include things.
|
25
|
+
Here is a minimal Rakefile for a basic ruby app that includes the biran tasks along with any local tasks in `lib/tasks`
|
26
|
+
```
|
27
|
+
require 'bundler/setup'
|
28
|
+
Bundler.require
|
29
|
+
|
30
|
+
biran_gem = Gem::Specification.find_by_name 'biran'
|
31
|
+
Dir["#{biran_gem.gem_dir}/lib/tasks/*.rake"].each do |file|
|
32
|
+
Rake::load_rakefile(file)
|
33
|
+
end
|
34
|
+
|
35
|
+
$LOAD_PATH.unshift(File.expand_path('../lib', __FILE__))
|
36
|
+
|
37
|
+
Dir.glob('lib/tasks/*.rake').each {|r| import r}
|
38
|
+
```
|
18
39
|
|
19
40
|
# Configuration
|
20
41
|
|
@@ -249,14 +270,13 @@ Generally not needed to configure, but available. Used to prevent defined top le
|
|
249
270
|
Default:**
|
250
271
|
```
|
251
272
|
{
|
252
|
-
vhost: {extension: '.conf'}
|
253
|
-
database: {extension: '.yml'}
|
273
|
+
vhost: {extension: '.conf'}
|
254
274
|
}
|
255
275
|
```
|
256
276
|
**Available in: config file, initializer**
|
257
277
|
|
258
278
|
This config option defines which files you want to be available to generate as part of the config:generate task. Each file listed will get its own task and will be run when `rake config:generate` is run.
|
259
|
-
The default config will generate `config/vhost.conf`
|
279
|
+
The default config will generate `config/vhost.conf` only. By default, all files will be generated in the `config` directory. You can override this in the options.
|
260
280
|
Basic exmple from `config/app_config.yml`:
|
261
281
|
```
|
262
282
|
app:
|
data/lib/biran.rb
CHANGED
data/lib/biran/config.rb
CHANGED
data/lib/biran/configurinator.rb
CHANGED
@@ -121,7 +121,7 @@ module Biran
|
|
121
121
|
lambda do |file, _|
|
122
122
|
files_list[file] ||= {extension: ''}
|
123
123
|
ext = files_list[file].fetch(:extension, '').strip
|
124
|
-
ext.prepend('.') unless ext.
|
124
|
+
ext.prepend('.') unless ext.start_with?('.') || ext.empty?
|
125
125
|
files_list[file][:extension] = ext
|
126
126
|
end
|
127
127
|
end
|
data/lib/biran/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: biran
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- javierg
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-03-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: railties
|
@@ -26,6 +26,20 @@ dependencies:
|
|
26
26
|
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
version: '0'
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: activesupport
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
type: :runtime
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0'
|
29
43
|
- !ruby/object:Gem::Dependency
|
30
44
|
name: rails
|
31
45
|
requirement: !ruby/object:Gem::Requirement
|