sti_deploy 0.2.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b37d901874e0ce71fbf27b26e4de59f2c4ca56ae
4
- data.tar.gz: 7dadc0eb56dd04471d43145deb4b70bc7d22204d
3
+ metadata.gz: 97114c734bd13059a6e519a12548273fd1205241
4
+ data.tar.gz: ce57f2c5dc9ae737f9f6e2652a51472ba4ba50be
5
5
  SHA512:
6
- metadata.gz: 7cbda8c33a65025c68aa78e5372430004a13ef93e1d32a9863c5b55bc85b7712d1f0e46f2b860c759d5dcd027294db32cb98584690ab9231260fb6230fabca83
7
- data.tar.gz: c37506275d303987bd9748c74c0c32ee8a77d3031fda5a6dadd341f473e459d7e50746dc05c12e9f6fa52953302c48d64f63215bc9f331a6c5c24038c2383c8b
6
+ metadata.gz: 3176f8e465df574d7aa2ec6e82998142b86c2acb35a064202fd0f2ae9f5cb0474289abedbc6d5e8eebbe1cc991d0ad2433e4a980217d75b9252d9624174c71cb
7
+ data.tar.gz: b54260d0a9fa59c4b359b4e2ace1cab20cb6831e026ffe03c7ffff2b7c2b758f3a57282253656d8ba92813520ff41874a346419511e000e7fe4ef1228b6b95a6
data/README.md CHANGED
@@ -25,6 +25,10 @@ ações:
25
25
  Instale a gem usando:
26
26
 
27
27
  gem install sti_deploy
28
+
29
+ > Não é recomendado adicionar esta gem ao Gemfile do projeto, pois apenas líderes
30
+ técnicos podem fazer deploy, um desenvolvedor sem acesso de líder técnico não
31
+ irá conseguir utilizar a gem corretamente.
28
32
 
29
33
  Execute o instalador:
30
34
 
@@ -36,7 +40,34 @@ adicionado ao `.gitignore`, pois ele **não deve ser commitado**.
36
40
 
37
41
  ## Utilização
38
42
 
39
- Para utilizar, basta executar o comando `sti_deploy` no terminal, no diretório
40
- root do projeto. O script irá pedir os dados necessários para fazer os commits,
41
- merges e tags necessárias para dar início ao deploy. A gem **não** realiza o
42
- deploy em si.
43
+ Para utilizar esta gem, basta executar o comando `sti_deploy` no terminal, no
44
+ diretório root do projeto. O script irá pedir os dados necessários para fazer
45
+ os commits, merges e tags necessárias para dar início ao deploy. A gem **não**
46
+ realiza o deploy em si.
47
+
48
+ ## Licensa, Créditos, Contribuição
49
+
50
+ Esta gem utiliza a licensa MIT:
51
+
52
+ > Copyright 2017 Rodrigo Castro Azevedo
53
+ >
54
+ > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
55
+ >
56
+ > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
57
+ >
58
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
59
+
60
+ Esta gem foi desenvolvida por:
61
+
62
+ [@roooodcastro](https://github.com/roooodcastro/sti_deploy)
63
+
64
+ Os seguintes desenvolvedores colaboraram no desenvolvimento da gem:
65
+
66
+ > Ninguém
67
+
68
+ Para contribuir, siga os seguintes passos:
69
+
70
+ - Abra uma Issue explicando as alterações propostas
71
+ - Crie um fork do repositório
72
+ - Crie uma branch para as alterações
73
+ - Abra um Pull Request das suas alterações
@@ -55,7 +55,7 @@ DESC
55
55
  protected
56
56
 
57
57
  def file_not_found(file, say_if_not_found = true)
58
- unless File.exists?(file)
58
+ unless File.exist?(file)
59
59
  msg = "#{file} not found, configure manually"
60
60
  shell.say_status('not found', msg, :red) if say_if_not_found
61
61
  return true
@@ -64,15 +64,19 @@ DESC
64
64
  end
65
65
 
66
66
  def choose_language
67
+ choice = ask_language
68
+ options_array = Array.new(I18n.available_locales.size) { |i| i + 1 }
69
+ return nil unless options_array.include?(choice.to_i)
70
+ I18n.available_locales[choice.to_i - 1]
71
+ end
72
+
73
+ def ask_language
67
74
  puts 'Which language do you prefer?'
68
75
  I18n.available_locales.each_with_index do |locale, index|
69
76
  puts " #{index + 1}: #{locale}"
70
77
  end
71
78
  print '> '
72
- choice = gets
73
- options_array = I18n.available_locales.size.times.map { |i| i + 1 }
74
- return nil unless options_array.include?(choice.to_i)
75
- I18n.available_locales[choice.to_i - 1]
79
+ gets
76
80
  end
77
81
 
78
82
  def choose_username
@@ -19,7 +19,7 @@ module StiDeploy
19
19
  I18n.load_path = Dir[LANG_PATH]
20
20
  I18n.backend.load_translations
21
21
  I18n.default_locale = :en
22
- return unless const_defined?(:Configuration)
22
+ return unless const_defined?('StiDeploy::Configuration')
23
23
  I18n.locale = Configuration.language
24
24
  end
25
25
 
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- VERSION = '0.2.0'
3
+ VERSION = '0.2.1'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sti_deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Castro Azevedo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-12 00:00:00.000000000 Z
11
+ date: 2017-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize