buildable 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f0ac55cf0dc9062e18f144c8730ba214bb3f1eb
4
- data.tar.gz: 16c9c2a729693394226619b8e8f79a7efbbc0ee4
3
+ metadata.gz: 1eebad5c44cf79863ca232963746922ca0974ba1
4
+ data.tar.gz: 6a025e8b2bba447260a2ef4d748245c4e2382d17
5
5
  SHA512:
6
- metadata.gz: 7a03e308cdac0b33166c3359c9ba7bcac1ddecbd64ac8d97c0bfa5b2456f8f496dd0a0533b37a41b004a3a3f6476ca917d31847d9e6b39d38b1cbb805d82a576
7
- data.tar.gz: 2f812c6ca1f6ea057f8c83e94bfe5bee6498cba213b04228b56ae65bf59faeee66d0586c69c472b64a340e0875257020c83d9c21f177f38c5d481517b27eb04a
6
+ metadata.gz: 4dfc231b5712424a32a8357ff1d25aab593cf15426378c8e768b46cc822621dbc0e4f530d3d17ff43c5ce2efdf23d142d366f4f3b25fe9bd4751c83927eecfdb
7
+ data.tar.gz: 323c7fe0c85d9bc3700cf13ec1faf9492438d3c60935491cdacd9e55a09c7811edaeee002ad11649baedb9166b7d1fb3f5573d7723ae7bce839af87dce33c8ef
data/README.md CHANGED
@@ -51,7 +51,6 @@ Para utilizar o _Buildable_ com o rake é necessário inluir o require no Rakefi
51
51
 
52
52
  ```ruby
53
53
  # on Rakefile
54
-
55
54
  begin
56
55
  require 'buildable/rake_task'
57
56
  Buildable::RakeTask.load
@@ -2,11 +2,11 @@ require 'configureasy'
2
2
 
3
3
  module Buildable
4
4
  require_relative 'core_ext/hash'
5
- require_relative 'buildable/version'
5
+ require_relative 'core_ext/string'
6
6
  require_relative 'buildable/shell'
7
7
  require_relative 'buildable/file_maker'
8
8
  require_relative 'buildable/recipe'
9
- require_relative 'buildable/rake_helper'
9
+ require_relative 'buildable/version'
10
10
 
11
11
  include ::Configureasy
12
12
  load_config '.buildable', as: 'config', path: '.'
@@ -59,4 +59,9 @@ module Buildable
59
59
  File.expand_path('../../templates/foreman', __FILE__)
60
60
  end
61
61
 
62
+ # Make package name using Organization name (when available) with project name
63
+ def package_name
64
+ [config.organization, config.project_name].compact.collect(&:underscore).join('-')
65
+ end
66
+
62
67
  end
@@ -53,7 +53,7 @@ module Buildable::Recipe
53
53
  params = {
54
54
  '-s' => 'dir',
55
55
  '-t' => 'deb',
56
- '--name' => "r7-#{Buildable.config.project_name.downcase}",
56
+ '--name' => Buildable.package_name,
57
57
  '--version' => version,
58
58
  '--architecture' => 'all',
59
59
  '--package' => './pkg',
@@ -1,3 +1,3 @@
1
1
  module Buildable
2
- VERSION = "2.0.0"
2
+ VERSION = "2.1.0"
3
3
  end
@@ -0,0 +1,11 @@
1
+ class String
2
+
3
+ # Underscore text (downcase and replace now-char to '-')
4
+ # Example:
5
+ # "some_text".underscore # => "some-text"
6
+ # "R7.com".underscore # => "r7-com"
7
+ def underscore
8
+ self.strip.downcase.gsub(/\W/, '-')
9
+ end
10
+
11
+ end
@@ -1,5 +1,6 @@
1
1
  project_name: awesome_app
2
2
  description: Most awesome project in the world
3
+ organization: organization name
3
4
  app_user: application_user
4
5
  root_dir: application_root_path
5
6
  files_to_ignore:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buildable
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre Prates
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-12 00:00:00.000000000 Z
11
+ date: 2016-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -108,6 +108,7 @@ files:
108
108
  - lib/buildable/shell.rb
109
109
  - lib/buildable/version.rb
110
110
  - lib/core_ext/hash.rb
111
+ - lib/core_ext/string.rb
111
112
  - templates/.buildable.yml.erb
112
113
  - templates/Procfile.erb
113
114
  - templates/foreman/master.pill.erb