foreplay 0.1.2 → 0.1.3

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: a96a382d08d8749763e0996bb8280fd3eccab5a9
4
- data.tar.gz: 290eae28bc0c19271beb4e8b922caaf1d29e26b9
3
+ metadata.gz: c4c4e4ef9917372b4901006e36a215e5bf514f8d
4
+ data.tar.gz: 8bfcbbdc5fff86836495c6e3be78ef7eb310b373
5
5
  SHA512:
6
- metadata.gz: d29b34e77ea8cc0aaab6cc2f228d7fa49d348bb2629823cf41fa1de8ef55ffcb4d34160df0b0f27d5fde4ad29077ba427ca7803717766f05cff00365df098630
7
- data.tar.gz: a372af399e85c92eab6aa1c1f5fc1fe87123e2c5735ae03f6318626fbccdfe1bf0043b0725b2bbe46fb658763234312a050e486474dc830bab0eea45324f1f11
6
+ metadata.gz: 43c279b50720c5fa48d703f3bbcdd50a9ba59992f53747bdb18f980ed389eec677d25b7a2e58e56a0a1e1e34b2b023fdfad3f6fffbe988cd3c079fbeb5509b7f
7
+ data.tar.gz: adb7c65e9572ca25ee5d51908a3bd6c78d8137f8f1b11b77a1eea1f6d5dd29df22b18204766cd155fc2c9feb21e72151629b45c58455fefaa3c8ed3f7991c0a5
data/README.md CHANGED
@@ -7,6 +7,21 @@
7
7
 
8
8
  Foreplay: deploying Rails projects to Ubuntu using Foreman
9
9
 
10
+ I noticed with surprise on [RubyGems](https://rubygems.org/gems/foreplay) that my little gem had been downloaded a few times, so clearly people are trying to use it. Thanks for trying it, people. I apologise for the poor state of the documentation below: it's out of date and misleading.
11
+
12
+ There's now a CLI for the gem so you can use it as follows. To check what it's going to do:
13
+
14
+ foreplay check production
15
+
16
+ ...and if you're brave enough to try it for real:
17
+
18
+ foreplay deploy production
19
+
20
+ ...after you've set it up by creating a `config/foreplay.yml` file.
21
+
22
+ Don't read any further. It's all rubbish below here :-)
23
+
24
+
10
25
  ## Installation
11
26
 
12
27
  Add this line to your application's Gemfile:
@@ -97,7 +97,8 @@ module Foreplay
97
97
  path.gsub! '%a', name
98
98
 
99
99
  # Find out which port we're currently running on
100
- steps = [ { :command => 'mkdir -p .foreplay && touch .foreplay/current_port && cat .foreplay/current_port', :silent => true } ]
100
+ current_port_file = ".foreplay/#{name}/current_port"
101
+ steps = [ { :command => "mkdir -p .foreplay && touch #{current_port_file} && cat #{current_port_file}", :silent => true } ]
101
102
 
102
103
  current_port_string = execute_on_server(steps, instructions).strip!
103
104
  puts current_port_string.blank? ? "#{INDENT}No instance is currently deployed" : "#{INDENT}Current instance is using port #{current_port_string}"
@@ -123,7 +124,7 @@ module Foreplay
123
124
 
124
125
  # Commands to execute on remote server
125
126
  steps = [
126
- { :command => "echo #{current_port} > .foreplay/current_port",
127
+ { :command => "echo #{current_port} > #{current_port_file}",
127
128
  :commentary => "Setting the port for the new instance to #{current_port}" },
128
129
  { :command => "mkdir -p #{path} && cd #{path} && rm -rf #{current_port} && git clone #{repository} #{current_port}",
129
130
  :commentary => "Cloning repository #{repository}" },
@@ -1,3 +1,3 @@
1
1
  module Foreplay
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -63,8 +63,8 @@ describe Foreplay::Deploy do
63
63
  Net::SSH.should_receive(:start).with('web.example.com', 'fred', { :verbose => :warn, :password => 'trollope' }).and_yield(session)
64
64
 
65
65
  [
66
- 'mkdir -p .foreplay && touch .foreplay/current_port && cat .foreplay/current_port',
67
- 'echo 50000 > .foreplay/current_port',
66
+ 'mkdir -p .foreplay && touch .foreplay/foreplay/current_port && cat .foreplay/foreplay/current_port',
67
+ 'echo 50000 > .foreplay/foreplay/current_port',
68
68
  'mkdir -p apps/foreplay && cd apps/foreplay && rm -rf 50000 && git clone git@github.com:Xenapto/foreplay.git 50000',
69
69
  'rvm rvmrc trust 50000',
70
70
  'rvm rvmrc warning ignore 50000',
@@ -104,7 +104,7 @@ describe Foreplay::Deploy do
104
104
 
105
105
  it "should use another port if there's already an installed instance" do
106
106
  process.stub(:on_output).and_yield(process, "50000\n")
107
- shell.should_receive(:execute).with('echo 51000 > .foreplay/current_port').and_return(process)
107
+ shell.should_receive(:execute).with('echo 51000 > .foreplay/foreplay/current_port').and_return(process)
108
108
  Foreplay::Deploy.start [:deploy, 'production', '']
109
109
  end
110
110
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreplay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xenapto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-21 00:00:00.000000000 Z
11
+ date: 2014-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport