mina 0.3.1 → 0.3.2

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 594c93a14da343bc11ca089567d91917f35ce025
4
+ data.tar.gz: 100d1d806af4643e1210b27b9854bc736713a9b7
5
+ SHA512:
6
+ metadata.gz: 849c4f473361748007da0571ffd2979f8736b3731cb2b55e92ccc2aa8e1755fe3cb75a530368c9c6ec4b55f57d5bb5cfa1971cf6569f580a7e1801080134bf15
7
+ data.tar.gz: 9f48fcbd66be6820e2c34e763ffcfd56726de7447f1fd4a2e23917c344c2525f528fad4f0a28c769cb7e57d46b9e0a642cb8c024783c322c444f09039cf8e1ca
data/.travis.yml CHANGED
@@ -16,6 +16,6 @@ env:
16
16
  script: "bundle exec rspec"
17
17
  notifications:
18
18
  email:
19
- - dropbox+travis@ricostacruz.com
20
- - dario@uxtemple.com
21
19
  - gabrijel.skoro@infinum.hr
20
+ - stjepan.hadjic@infinum.hr
21
+
data/HISTORY.md CHANGED
@@ -1,4 +1,23 @@
1
- ## v0.3.2 - unreleased
1
+ v0.3.2 - January 24, 2015
2
+ -----------------------------
3
+
4
+ * 3rd party modules (#258) [Denis]
5
+ * Adding support for environment variables, env_var (#161) [Ted Price]
6
+ * Make rails console task dependent on the environment (#220) [lucapette]
7
+ * mention .ruby-version for rbenv comment (#249) [Tomi]
8
+ * update emails for travis
9
+ * npm support with a simple npm:install task (#227) [Paul B.]
10
+ * `mina ssh` command to connect to server (#249) [Anton Dieterle]
11
+ * link in the support guide (#254) [Aaditya S]
12
+
13
+ [Denis]: (https://github.com/stereodenis)
14
+ [Aaditya S]: (https://github.com/jartek)
15
+ [Tomi]: (https://github.com/equivalent)
16
+ [lucapette]: (https://github.com/lucapette)
17
+ [Ted Price]: (https://github.com/pricees)
18
+ [Anton Dieterle]: (https://github.com/adie)
19
+ [Paul B.]: (https://github.com/paulRbr)
20
+
2
21
 
3
22
  v0.3.1 - October 17, 2014
4
23
  -------------------------
data/Readme.md CHANGED
@@ -648,6 +648,9 @@ The local path to the SSH private key file.
648
648
  ### ssh_options
649
649
  Switches to be passed to the `ssh` command.
650
650
 
651
+ ### env_vars
652
+ Environment variables passed to the `ssh` command (e.g. "foo=bar baz=1").
653
+
651
654
  ## Tasks
652
655
  Any and all of these settings can be overriden in your `deploy.rb`.
653
656
 
@@ -672,6 +675,13 @@ Display all tasks in a nice table.
672
675
  $ mina tasks
673
676
  ~~~
674
677
 
678
+ ### ssh
679
+ Connects to the server via ssh and cd to deploy_to folder
680
+
681
+ ~~~ ruby
682
+ $ mina ssh
683
+ ~~~
684
+
675
685
  # Modules: Deployment
676
686
  This module is automatically loaded for all Mina projects.
677
687
 
@@ -976,6 +986,43 @@ end
976
986
  Adds settings and tasks for managing projects with [whenever].
977
987
  [whenever]: http://rubygems.org/gems/whenever
978
988
 
989
+
990
+ # Modules: NPM
991
+ Adds settings and tasks for managing NodeJS projects.
992
+
993
+ ~~~ ruby
994
+ require 'mina/npm'
995
+ ~~~
996
+
997
+ ## Settings
998
+ Any and all of these settings can be overriden in your `deploy.rb`.
999
+
1000
+ ### npm_options
1001
+ Parameters to pass to the npm binary. Default to `--production`.
1002
+
1003
+ ----
1004
+
1005
+ ## Deploy tasks
1006
+ These tasks are meant to be invoked inside deploy scripts, not invoked on
1007
+ their own.
1008
+
1009
+ ### npm:install
1010
+
1011
+ 3rd party modules
1012
+ ------
1013
+
1014
+ * [mina-rollbar](https://github.com/code-lever/mina-rollbar)
1015
+ * [mina-stack](https://github.com/div/mina-stack)
1016
+ * [mina-rsync](https://github.com/moll/mina-rsync)
1017
+ * [mina-sidekiq](https://github.com/Mic92/mina-sidekiq)
1018
+ * [mina-nginx](https://github.com/hbin/mina-nginx)
1019
+ * [mina-newrelic](https://github.com/navinpeiris/mina-newrelic)
1020
+ * [mina-rbenv-addons](https://github.com/stas/mina-rbenv-addons)
1021
+ * [mina-multistage](https://github.com/endoze/mina-multistage)
1022
+ * [mina-s3](https://github.com/stas/mina-s3)
1023
+ * [mina-scp](https://github.com/adie/mina-scp)
1024
+ * [mina-hooks](https://github.com/elskwid/mina-hooks)
1025
+
979
1026
  Acknowledgements
980
1027
  ----------------
981
1028
 
@@ -1006,4 +1053,3 @@ Michael:
1006
1053
  [nd]: http://nadarei.co
1007
1054
  [issues]: https://github.com/mina-deploy/mina/issues
1008
1055
  [trello]: https://trello.com/board/mina/4fc8b3023d9c9a4d72e573e6
1009
-
data/data/deploy.rb CHANGED
@@ -31,7 +31,7 @@ set :shared_paths, ['config/database.yml', 'log']
31
31
  # `mina deploy` or `mina rake`.
32
32
  task :environment do
33
33
  # If you're using rbenv, use this to load the rbenv environment.
34
- # Be sure to commit your .rbenv-version to your repository.
34
+ # Be sure to commit your .ruby-version or .rbenv-version to your repository.
35
35
  # invoke :'rbenv:load'
36
36
 
37
37
  # For those using RVM, use this to load an RVM version@gemset.
data/lib/mina/default.rb CHANGED
@@ -23,6 +23,9 @@
23
23
  # ### ssh_options
24
24
  # Switches to be passed to the `ssh` command.
25
25
 
26
+ # ### env_vars
27
+ # Environment variables to be passed to `ssh` command.
28
+
26
29
  # ## Tasks
27
30
  # Any and all of these settings can be overriden in your `deploy.rb`.
28
31
 
@@ -143,3 +146,13 @@ desc "Show all tasks."
143
146
  task :tasks do
144
147
  show_task_help :full => true
145
148
  end
149
+
150
+ # ### ssh
151
+ # Connects to the server via ssh and cd to deploy_to folder
152
+ #
153
+ # $ mina ssh
154
+
155
+ desc "Open an ssh session to the server and cd to deploy_to folder"
156
+ task :ssh do
157
+ exec ssh_command + " 'cd #{deploy_to} && exec \$SHELL'"
158
+ end
data/lib/mina/npm.rb ADDED
@@ -0,0 +1,89 @@
1
+ # # Modules: Npm
2
+ # Adds settings and tasks for managing Node packages.
3
+ #
4
+ # require 'mina/npm'
5
+
6
+ # ## Settings
7
+ # Any and all of these settings can be overriden in your `deploy.rb`.
8
+
9
+ # ### npm_bin
10
+ # Sets the npm binary.
11
+
12
+ set_default :npm_bin, 'npm'
13
+
14
+ # ### bower_bin
15
+ # Sets the bower binary.
16
+
17
+ set_default :bower_bin, 'bower'
18
+
19
+ # ### grunt_bin
20
+ # Sets the grunt binary.
21
+
22
+ set_default :grunt_bin, 'grunt'
23
+
24
+ # ### npm_options
25
+ # Sets the options for installing modules via npm.
26
+
27
+ set_default :npm_options, '--production'
28
+
29
+ # ### bower_options
30
+ # Sets the options for installing modules via bower.
31
+
32
+ set_default :bower_options, '--allow-root'
33
+
34
+ # ### grunt_options
35
+ # Sets the options for grunt.
36
+
37
+ set_default :grunt_options, ''
38
+
39
+ # ### grunt_task
40
+ # Sets the task parameters for grunt.
41
+
42
+ set_default :grunt_task, 'build'
43
+
44
+
45
+ # ## Deploy tasks
46
+ # These tasks are meant to be invoked inside deploy scripts, not invoked on
47
+ # their own.
48
+
49
+ namespace :npm do
50
+ # ### npm:install
51
+ # Installs node modules. Takes into account if executed `in_directory` and namespaces the installed modules in the shared folder.
52
+ desc "Install node modules using Npm."
53
+ task :install => :environment do
54
+ queue %{
55
+ echo "-----> Installing node modules using Npm"
56
+ sub_directory=$(pwd | sed -r "s/.*?$(basename $build_path)//g")
57
+ #{echo_cmd %[mkdir -p "#{deploy_to}/#{shared_path}/$sub_directory/node_modules"]}
58
+ #{echo_cmd %[ln -s "#{deploy_to}/#{shared_path}/$sub_directory/node_modules" "node_modules"]}
59
+ #{echo_cmd %[#{npm_bin} install #{npm_options}]}
60
+ }
61
+ end
62
+ end
63
+
64
+ namespace :bower do
65
+ # ### bower:install
66
+ # Installs bower modules. Takes into account if executed `in_directory` and namespaces the installed modules in the shared folder.
67
+ desc "Install bower modules."
68
+ task :install => :environment do
69
+ queue %{
70
+ echo "-----> Installing bower modules"
71
+ sub_directory=$(pwd | sed -r "s/.*?$(basename $build_path)//g")
72
+ #{echo_cmd %[mkdir -p "#{deploy_to}/#{shared_path}/$sub_directory/bower_components"]}
73
+ #{echo_cmd %[ln -s "#{deploy_to}/#{shared_path}/$sub_directory/bower_components" "bower_components"]}
74
+ #{echo_cmd %[[ -f bower.json ] && (#{bower_bin} install #{bower_options}) || ! [ -f bower.json ]]}
75
+ }
76
+ end
77
+ end
78
+
79
+ namespace :grunt do
80
+ # ### bower:install
81
+ # Installs bower modules. Takes into account if executed `in_directory` and namespaces the installed modules in the shared folder.
82
+ desc "Launch a task with grunt. Set the grunt_task (defaults to \"build\") variable before calling this."
83
+ task :task => :environment do
84
+ queue %{
85
+ echo "-----> Launch a build with Grunt"
86
+ #{echo_cmd %[[ -f Gruntfile.js ] && (#{grunt_bin} #{grunt_task} #{grunt_options}) || ! [ -f Gruntfile.js ]]}
87
+ }
88
+ end
89
+ end
data/lib/mina/rails.rb CHANGED
@@ -121,7 +121,7 @@ make_run_task[:rake, 'db:migrate']
121
121
  # $ mina console
122
122
 
123
123
  desc "Starts an interactive console."
124
- task :console do
124
+ task :console => :environment do
125
125
  queue echo_cmd %[cd "#{deploy_to!}/#{current_path!}" && #{rails} console && exit]
126
126
  end
127
127
 
@@ -22,6 +22,7 @@ module Mina
22
22
  def ssh(cmd, options={})
23
23
  require 'shellwords'
24
24
 
25
+ cmd.unshift("export #{env_vars}") if env_vars?
25
26
  cmd = cmd.join("\n") if cmd.is_a?(Array)
26
27
  script = Shellwords.escape(cmd)
27
28
 
@@ -52,7 +53,7 @@ module Mina
52
53
  args << " -i #{identity_file}" if identity_file?
53
54
  args << " -p #{port}" if port?
54
55
  args << " -A" if forward_agent?
55
- args << " #{ssh_options}" if ssh_options?
56
+ args << " #{ssh_options}" if ssh_options?
56
57
  args << " -t"
57
58
  "ssh #{args}"
58
59
  end
data/lib/mina/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Mina
2
2
  def self.version
3
- "0.3.1"
3
+ "0.3.2"
4
4
  end
5
5
  end
data/mina.gemspec CHANGED
@@ -14,4 +14,5 @@ Gem::Specification.new do |s|
14
14
  s.add_dependency "rake"
15
15
  s.add_dependency "open4", "~> 1.3.4"
16
16
  s.add_development_dependency "rspec", "~> 3.0.0"
17
+ s.add_development_dependency "pry-debugger"
17
18
  end
data/support/guide.md CHANGED
@@ -283,7 +283,7 @@ Basic usage:
283
283
 
284
284
  ### Tasks
285
285
 
286
- There are many tasks available. See the [tasks reference](tasks/index.html), or
286
+ There are many tasks available. See the [tasks reference](http://mina-deploy.github.io/mina/tasks/), or
287
287
  type `mina tasks`.
288
288
 
289
289
  ### Variables
metadata CHANGED
@@ -1,84 +1,84 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: mina
3
- version: !ruby/object:Gem::Version
4
- hash: 17
5
- prerelease:
6
- segments:
7
- - 0
8
- - 3
9
- - 1
10
- version: 0.3.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.2
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Rico Sta. Cruz
14
8
  - Michael Galero
15
9
  autorequire:
16
10
  bindir: bin
17
11
  cert_chain: []
18
-
19
- date: 2014-10-17 00:00:00 +02:00
20
- default_executable:
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
12
+ date: 2015-01-24 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
23
15
  name: rake
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
28
18
  - - ">="
29
- - !ruby/object:Gem::Version
30
- hash: 3
31
- segments:
32
- - 0
33
- version: "0"
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
34
21
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: open4
38
22
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
42
- - - ~>
43
- - !ruby/object:Gem::Version
44
- hash: 19
45
- segments:
46
- - 1
47
- - 3
48
- - 4
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: open4
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
49
34
  version: 1.3.4
50
35
  type: :runtime
51
- version_requirements: *id002
52
- - !ruby/object:Gem::Dependency
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: 1.3.4
42
+ - !ruby/object:Gem::Dependency
53
43
  name: rspec
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: 3.0.0
49
+ type: :development
54
50
  prerelease: false
55
- requirement: &id003 !ruby/object:Gem::Requirement
56
- none: false
57
- requirements:
58
- - - ~>
59
- - !ruby/object:Gem::Version
60
- hash: 7
61
- segments:
62
- - 3
63
- - 0
64
- - 0
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
65
55
  version: 3.0.0
56
+ - !ruby/object:Gem::Dependency
57
+ name: pry-debugger
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
66
63
  type: :development
67
- version_requirements: *id003
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
68
70
  description: Really fast deployer and server automation tool.
69
- email:
71
+ email:
70
72
  - rico@nadarei.co
71
73
  - mikong@nadarei.co
72
- executables:
74
+ executables:
73
75
  - mina
74
76
  extensions: []
75
-
76
77
  extra_rdoc_files: []
77
-
78
- files:
79
- - .gitignore
80
- - .rspec
81
- - .travis.yml
78
+ files:
79
+ - ".gitignore"
80
+ - ".rspec"
81
+ - ".travis.yml"
82
82
  - CONTRIBUTING.md
83
83
  - Gemfile
84
84
  - HISTORY.md
@@ -100,6 +100,7 @@ files:
100
100
  - lib/mina/foreman.rb
101
101
  - lib/mina/git.rb
102
102
  - lib/mina/helpers.rb
103
+ - lib/mina/npm.rb
103
104
  - lib/mina/output_helpers.rb
104
105
  - lib/mina/rails.rb
105
106
  - lib/mina/rake.rb
@@ -138,39 +139,27 @@ files:
138
139
  - support/index.html
139
140
  - support/to_md.rb
140
141
  - test_env/config/deploy.rb
141
- has_rdoc: true
142
142
  homepage: http://github.com/nadarei/mina
143
143
  licenses: []
144
-
144
+ metadata: {}
145
145
  post_install_message:
146
146
  rdoc_options: []
147
-
148
- require_paths:
147
+ require_paths:
149
148
  - lib
150
- required_ruby_version: !ruby/object:Gem::Requirement
151
- none: false
152
- requirements:
149
+ required_ruby_version: !ruby/object:Gem::Requirement
150
+ requirements:
153
151
  - - ">="
154
- - !ruby/object:Gem::Version
155
- hash: 3
156
- segments:
157
- - 0
158
- version: "0"
159
- required_rubygems_version: !ruby/object:Gem::Requirement
160
- none: false
161
- requirements:
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ required_rubygems_version: !ruby/object:Gem::Requirement
155
+ requirements:
162
156
  - - ">="
163
- - !ruby/object:Gem::Version
164
- hash: 3
165
- segments:
166
- - 0
167
- version: "0"
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
168
159
  requirements: []
169
-
170
160
  rubyforge_project:
171
- rubygems_version: 1.6.2
161
+ rubygems_version: 2.2.2
172
162
  signing_key:
173
- specification_version: 3
163
+ specification_version: 4
174
164
  summary: Really fast deployer and server automation tool.
175
165
  test_files: []
176
-