momentum 0.0.13 → 0.0.14

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: 8010b7358a2b3287aeeee8a5573e4128beb3fbcf
4
- data.tar.gz: 8470f40db7cd9d64838a2916d44a5951e320a278
3
+ metadata.gz: 64ff329b5fa672c7ea3247b0a5b4a6687df752ab
4
+ data.tar.gz: 3812ee59bb97d73e916bfa04a0f586cc10e30ac7
5
5
  SHA512:
6
- metadata.gz: 21b96774aaf2dd04181482e9864fa31ad62826688a0f5746ea4ba9826cb6fd4c38d72af77c6238ad29abd6ac80f7ec0fe0ef51cfca32b21424dc37bae266dbab
7
- data.tar.gz: b46a131e5c09c162faeafcbad2e70937e1cca67c6391d683e1ded33c4ec5204d16106766e3a7f9c0c2e5c5972f6bb0f4c74fe0e64d7d752788ab5679c78adf02
6
+ metadata.gz: 2fca491068125b4ab1bc09edffd17509f549dcf0f221329cd8536516843c5f4ff91459e52b2bb7b66d31e1d9a5714e89163f1fae767b314ef79ea7ab95f95797
7
+ data.tar.gz: 8c85777e49815c975aff17e7d48748ff18bde3e2a950d83080411b54ab75a1826f46e03e566296f783a2822fdb5104bfc94eb0d88d18d16239c0ddad7340a25b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ 0.0.14 (2017-07-14)
2
+ ------
3
+
4
+ * Allow user to specify remote env variables for their console session ([24](https://github.com/artsy/momentum/pull/24))
5
+
1
6
  0.0.13 (2016-01-18)
2
7
  ------
3
8
 
data/README.md CHANGED
@@ -51,7 +51,7 @@ Add the given stack's custom configuration values to the current task's ENV. Can
51
51
 
52
52
  bundle exec rake ow:config:from_env[production] some:migration
53
53
 
54
- ### ow:console[to,env,aws_id,aws_secret]
54
+ ### ow:console[to,env,aws_id,aws_secret] [env ...]
55
55
 
56
56
  Start a rails console on the given remote OpsWorks stack. Chooses an instance of the _rails-app_ layer by default, or the configured `rails_console_layer` if provided. E.g.:
57
57
 
@@ -61,6 +61,10 @@ For stacks with labels not matching the Rails environment (e.g., _reflection-joe
61
61
 
62
62
  bundle exec rake ow:console[joey,staging]
63
63
 
64
+ To set environment variables for the remote process, specify them _after_ the task name like you normally would with rake tasks:
65
+
66
+ bundle exec rake ow:console[production] SOME_ENV_VARIABLE=set-remotely
67
+
64
68
  ### ow:cookbooks:update[to,aws_id,aws_secret]
65
69
 
66
70
  Zip, upload, and propagate custom cookbooks to the given stack. Or, more concisely:
@@ -1,3 +1,3 @@
1
1
  module Momentum
2
- VERSION = "0.0.13"
2
+ VERSION = "0.0.14"
3
3
  end
@@ -16,8 +16,12 @@ namespace :ow do
16
16
  endpoint = Momentum::OpsWorks.get_instance_endpoint(instance)
17
17
  raise "No online '#{Momentum.config[:rails_console_layer]}' instances found for #{name} stack!" unless endpoint
18
18
 
19
+ env = ARGV.grep(/^(\w+)=(.*)$/m)
20
+ env << "RAILS_ENV=#{args[:env] || args[:to]}"
21
+ env << "RUBYOPT=-EUTF-8"
22
+
19
23
  $stderr.puts "Starting remote console... (use Ctrl-D to exit cleanly)"
20
- command = "'sudo su deploy -c \"cd /srv/www/#{Momentum.config[:app_base_name]}/current && RAILS_ENV=#{args[:env] || args[:to]} RUBYOPT=-EUTF-8 bundle exec rails console\"'"
24
+ command = "'sudo su deploy -c \"cd /srv/www/#{Momentum.config[:app_base_name]}/current && env #{env.join(" ")} bundle exec rails console\"'"
21
25
  sh Momentum::OpsWorks.ssh_command_to(endpoint,command)
22
26
  end
23
27
 
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: momentum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joey Aghion
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-18 00:00:00.000000000 Z
11
+ date: 2017-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.30'
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: '1.30'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.3'
34
34
  type: :development
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: '1.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
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: '0'
55
55
  description: Utilities for working with OpsWorks apps in the style of Artsy Engineering.
@@ -59,7 +59,7 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - .gitignore
62
+ - ".gitignore"
63
63
  - CHANGELOG.md
64
64
  - Gemfile
65
65
  - LICENSE.txt
@@ -90,19 +90,18 @@ require_paths:
90
90
  - lib
91
91
  required_ruby_version: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - '>='
93
+ - - ">="
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
96
  required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  requirements:
98
- - - '>='
98
+ - - ">="
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  requirements: []
102
102
  rubyforge_project:
103
- rubygems_version: 2.0.14
103
+ rubygems_version: 2.5.2
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: Utilities for working with OpsWorks apps in the style of Artsy Engineering.
107
107
  test_files: []
108
- has_rdoc: