capistrano-sbt 0.0.4 → 0.0.5

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.
data/README.md CHANGED
@@ -41,11 +41,14 @@ Following options are available to manage your sbt build.
41
41
  * `:sbt_update_settings_locally` - udate `*.sbt` or not on local compilation. false by default.
42
42
  * `:sbt_settings` - list of your optional `*.sbt` files
43
43
  * `:sbt_settings_local` - list of your optional `*.sbt` files in on local compilation.
44
+ * `:sbt_settings_path` - the destination path of the optional `*.sbt` files.
45
+ * `:sbt_settings_path_local` - the destination path of the optional `*.sbt` files.
44
46
  * `:sbt_template_path` - specify ERB template path for `*.sbt`.
45
47
  * `:sbt_java_home` - optional `JAVA_HOME` settings for sbt commands.
46
48
  * `:sbt_java_home_local` - optional `JAVA_HOME` settings for sbt commands in localhost.
47
49
  * `:sbt_extras_url` - Download URL of `sbt` script of sbt-extras.
48
50
  * `:sbt_extras_check_interval` - Check updates of sbt-extras every specified seconds. `86400` by default.
51
+ * `:sbt_log_noformat` - Do not colorize sbt outputs. `true` by default.
49
52
 
50
53
  ## Contributing
51
54
 
@@ -72,12 +72,8 @@ module Capistrano
72
72
  _cset(:sbt_template_path, File.join(File.dirname(__FILE__), 'templates'))
73
73
  _cset(:sbt_update_settings, false)
74
74
  _cset(:sbt_update_settings_locally, false)
75
- _cset(:sbt_settings_path) {
76
- sbt_project_path
77
- }
78
- _cset(:sbt_settings_path_local) {
79
- sbt_project_path_local
80
- }
75
+ _cset(:sbt_settings_path) { File.join(sbt_project_path, 'sbt') }
76
+ _cset(:sbt_settings_path_local) { File.join(sbt_project_path_local, 'sbt') }
81
77
  _cset(:sbt_settings, [])
82
78
  _cset(:sbt_settings_local, [])
83
79
  _cset(:sbt_cleanup_settings, [])
@@ -86,14 +82,36 @@ module Capistrano
86
82
  _cset(:sbt_goals, %w(reload clean package))
87
83
  _cset(:sbt_common_options) {
88
84
  options = []
89
- options << "-Dsbt.log.noformat=true" if fetch(:sbt_log_noformat, true)
85
+ if fetch(:sbt_log_noformat, true)
86
+ options << if sbt_use_extras
87
+ "-no-colors"
88
+ else
89
+ "-Dsbt.log.noformat=true"
90
+ end
91
+ end
90
92
  options
91
93
  }
92
94
  _cset(:sbt_options) {
93
- sbt_common_options + fetch(:sbt_extra_options, [])
95
+ options = sbt_common_options + fetch(:sbt_extra_options, [])
96
+ if sbt_update_settings
97
+ options << if sbt_use_extras
98
+ "-sbt-dir #{sbt_settings_path}"
99
+ else
100
+ "-Dsbt.global.base=#{sbt_settings_path}"
101
+ end
102
+ end
103
+ options
94
104
  }
95
105
  _cset(:sbt_options_local) {
96
- sbt_common_options + fetch(:sbt_extra_options_local, [])
106
+ options = sbt_common_options + fetch(:sbt_extra_options_local, [])
107
+ if sbt_update_settings_locally
108
+ options << if sbt_use_extras
109
+ "-sbt-dir #{sbt_settings_path_local}"
110
+ else
111
+ "-Dsbt.global.base=#{sbt_settings_path_local}"
112
+ end
113
+ end
114
+ options
97
115
  }
98
116
 
99
117
  desc("Setup sbt.")
@@ -146,7 +164,7 @@ module Capistrano
146
164
  if File.file?(file)
147
165
  File.read(file)
148
166
  elsif File.file?("#{file}.erb")
149
- ERB.new(File.read(file)).result(binding)
167
+ ERB.new(File.read("#{file}.erb")).result(binding)
150
168
  else
151
169
  abort("No such template: #{file} or #{file}.erb")
152
170
  end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Sbt
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-sbt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-19 00:00:00.000000000 Z
12
+ date: 2012-11-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano