pushapp 0.2.8 → 0.2.9

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: c864223278133f0a0e67c48db6478ab8e625f272
4
- data.tar.gz: 1b72ab7abd0298f9791013dfe341fea9d6a00dff
3
+ metadata.gz: 1fe87a87495681790d69285fbd93d8b2f091ee3d
4
+ data.tar.gz: d697fc0fd679a7a6338d1d94a395df53ffb758a9
5
5
  SHA512:
6
- metadata.gz: 0ded7e5f32ca38e1d6ee4e10d675a4f686506ad911cbb040060f8855dbf90fd2f1fe690033390df32611da0be320ff0982340ae0504253555a4960fcc57a438c
7
- data.tar.gz: 38f68ea4875803667a1c3be5007190f57ffa3fe8aea8da6c30f26e0a02946bc7f440b725247da4a6baaac342c3150a1afea51dbec06cbd9c9218bef58cc09658
6
+ metadata.gz: 4c1d75bfe273139716547bac793dd92cea45d8b93d40fed3e24bad4c7f2b9bf8e723eb68e4d39d3d9c9ef33e4169e71b5fd6b2fc7b904fe5a333355dc6644d2b
7
+ data.tar.gz: eaed36e814e243230e188ad37c2f91c46fa131c02ef3da3871360ced206bfa7c5528f0376d8171c7cc7d72d3688d235ae304e9baf1c1c836c923c516d1cbd3b1
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ .idea
data/README.md CHANGED
@@ -18,15 +18,29 @@ Add this line to your application's Gemfile:
18
18
 
19
19
  add ./vendor/bundle to .gitignore
20
20
 
21
+ ## Supported commands
22
+
23
+ - `init` - generates pushapp config file
24
+ - `remotes` - list all known remotes
25
+ - `setup` - setup group or remote repository/repositories for deployment
26
+ - `generate` - bootstrapp app with various optimized configs
27
+ - `update-refs` - setup remote refs in local .git/config
28
+ - `tasks` - show tasks list for remote(s)
29
+ - `trigger` - triggers event on remote(s)
30
+ - `ssh` - SSH to remote and setup ENV vars
31
+ - `exec` - run shell command remotely
32
+
33
+ Run `pushapp help` to list all available commands and options.
34
+
21
35
  ## Supported tasks
22
36
 
23
- - :unicorn_signal - sends USR2 signal to tmp/pids/unicorn.pid
24
- - :foreman_export - foreman export (upstart is default)
25
- - :upstart_start - start upstart job
26
- - :upstart_stop - stop upstart job
27
- - :upstart_restart - restart upstart job
28
- - :whenever_update - whenever update (crontab)
29
- - :nginx_export - copy nginx site config to nginx/sites_enabled
37
+ - `unicorn_signal` - sends USR2 signal to tmp/pids/unicorn.pid
38
+ - `foreman_export` - foreman export (upstart is default)
39
+ - `upstart_start` - start upstart job
40
+ - `upstart_stop` - stop upstart job
41
+ - `upstart_restart` - restart upstart job
42
+ - `whenever_update` - whenever update (crontab)
43
+ - `nginx_export` - copy nginx site config to nginx/sites_enabled
30
44
 
31
45
  ## Contributing
32
46
 
data/lib/pushapp/cli.rb CHANGED
@@ -60,7 +60,15 @@ module Pushapp
60
60
  Pushapp::Commands.run(:ssh, remote: remote, options: options)
61
61
  end
62
62
 
63
- desc 'generate MODULE REMOTE', 'bootstrapp app with varios optimized configs'
63
+ desc 'exec REMOTE command', 'Run shell command remotely.'
64
+
65
+ method_option :file, type: :string, aliases: '-f', banner: 'Specify a configuration file'
66
+
67
+ def exec(remote, *args)
68
+ Pushapp::Commands.run(:exec, remote: remote, args: args, options: options)
69
+ end
70
+
71
+ desc 'generate MODULE REMOTE', 'bootstrapp app with various optimized configs'
64
72
  subcommand 'generate', Generators
65
73
  end
66
74
  end
@@ -76,6 +76,23 @@ module Pushapp
76
76
  end
77
77
  end
78
78
 
79
+ def exec
80
+ if remote
81
+ cmd = (@options[:args] || []).join(' ')
82
+ if cmd.empty?
83
+ puts 'Usage: pushapp exec remote COMMAND'
84
+ else
85
+ begin
86
+ remote.env_run "bundle exec #{cmd}"
87
+ rescue Exception => e
88
+ puts e.message
89
+ end
90
+ end
91
+ else
92
+ logger.error 'Remote not found'
93
+ end
94
+ end
95
+
79
96
  private
80
97
 
81
98
  def remote
@@ -1,3 +1,3 @@
1
1
  module Pushapp
2
- VERSION = '0.2.8'
2
+ VERSION = '0.2.9'
3
3
  end
metadata CHANGED
@@ -1,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pushapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yury Korolev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-10 00:00:00.000000000 Z
11
+ date: 2014-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: awesome_print
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.3'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  description: Push your App
@@ -88,8 +88,8 @@ executables:
88
88
  extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
- - .gitignore
92
- - .travis.yml
91
+ - ".gitignore"
92
+ - ".travis.yml"
93
93
  - Gemfile
94
94
  - LICENSE.txt
95
95
  - README.md
@@ -150,17 +150,17 @@ require_paths:
150
150
  - lib
151
151
  required_ruby_version: !ruby/object:Gem::Requirement
152
152
  requirements:
153
- - - '>='
153
+ - - ">="
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  requirements:
158
- - - '>='
158
+ - - ">="
159
159
  - !ruby/object:Gem::Version
160
160
  version: '0'
161
161
  requirements: []
162
162
  rubyforge_project:
163
- rubygems_version: 2.1.10
163
+ rubygems_version: 2.2.0
164
164
  signing_key:
165
165
  specification_version: 4
166
166
  summary: Push your App