mina 0.1.2.pre1 → 0.1.2.pre2

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/HISTORY.md CHANGED
@@ -1,3 +1,14 @@
1
+ v0.1.2.pre2 - Jul 3, 2012
2
+ -------------------------
3
+
4
+ ### Added:
5
+ * Add bundle_bin option
6
+ * Add ssh port option
7
+
8
+ ### Fixed:
9
+ * Fix deploy:link_shared_paths to use absolute paths
10
+ * Fix console logs for task init
11
+
1
12
  v0.1.2.pre1 - Jun 12, 2012
2
13
  --------------------------
3
14
 
data/README.md CHANGED
@@ -23,48 +23,60 @@ Problems or suggestions? File issues at the [issue tracker][issues]
23
23
  (github.com). You may also look at the [Trello board][trello] (trello.com) we
24
24
  use for development.
25
25
 
26
+ Documentation sources
27
+ ---------------------
28
+
29
+ See [nadarei/mina-docs](https://github.com/nadarei/mina-docs) for the sources of
30
+ the documentation site. Please ensure that docs there are in sync with the
31
+ features here.
32
+
26
33
  Development & testing
27
34
  ---------------------
28
35
 
29
36
  To test out stuff in development:
30
37
 
31
- # Run specs
32
- $ rspec
33
- $ rspec -t ssh # Run SSH tests (read test_env/config/deploy.rb first)
34
- $ rake=0.9 rspec
35
- $ rake=0.8 rspec
38
+ ``` sh
39
+ # Run specs
40
+ $ rspec
41
+ $ rspec -t ssh # Run SSH tests (read test_env/config/deploy.rb first)
42
+ $ rake=0.9 rspec
43
+ $ rake=0.8 rspec
36
44
 
37
- # Alias your 'mina' to use it everywhere
38
- $ alias mina="`pwd -LP`/bin/mina"
45
+ # Alias your 'mina' to use it everywhere
46
+ $ alias mina="`pwd -LP`/bin/mina"
47
+ ```
39
48
 
40
49
  ### Doing test deploys
41
50
 
42
51
  Try out the test environment:
43
52
 
44
- $ cd test_env
45
- $ mina deploy --simulate
46
- $ mina deploy
53
+ ``` sh
54
+ $ cd test_env
55
+ $ mina deploy --simulate
56
+ $ mina deploy
47
57
 
48
- # There's an rspec task for it too
49
- $ rspec -t ssh
58
+ # There's an rspec task for it too
59
+ $ rspec -t ssh
60
+ ```
50
61
 
51
62
  ### Gem management
52
63
 
53
- # To release the gem:
54
- # Install the Git changelog helper: https://gist.github.com/2880525
55
- # Then:
64
+ ``` sh
65
+ # To release the gem:
66
+ # Install the Git changelog helper: https://gist.github.com/2880525
67
+ # Then:
56
68
 
57
- $ vim lib/mina/version.rb
58
- $ git clog -w
59
- $ vim HISTORY.md
60
- $ git commit -m "Release v0.8.4."
61
- $ rake release
69
+ $ vim lib/mina/version.rb
70
+ $ git clog -w
71
+ $ vim HISTORY.md
72
+ $ git commit -m "Release v0.8.4."
73
+ $ rake release
62
74
 
63
- # Please don't forget to tag the release in github.com/nadarei/mina-docs
64
- too!
75
+ # Please don't forget to tag the release in github.com/nadarei/mina-docs too!
65
76
 
66
- $ rake build # Builds the gem file
67
- $ rake install # Installs the gem locally
77
+ $ rake build # Builds the gem file
78
+ $ rake install # Installs the gem locally
79
+ ```
68
80
 
69
81
  Acknowledgements
70
82
  ----------------
data/data/deploy.rb CHANGED
@@ -12,6 +12,7 @@ set :domain, 'foobar.com'
12
12
  set :deploy_to, '/var/www/foobar.com'
13
13
  set :repository, 'git://...'
14
14
  # set :user, 'foobar'
15
+ # set :port, '30000'
15
16
 
16
17
  desc "Deploys the current version to the server."
17
18
  task :deploy do
data/lib/mina/bundler.rb CHANGED
@@ -1,4 +1,5 @@
1
1
 
2
+ settings.bundle_bin ||= 'bundle'
2
3
  settings.bundle_path ||= './vendor/bundle'
3
4
  settings.bundle_options ||= lambda { %{--without development:test --path "#{bundle_path}" --binstubs bin/ --deployment} }
4
5
 
@@ -8,7 +9,7 @@ namespace :bundle do
8
9
  if bundle_path.nil?
9
10
  queue %{
10
11
  echo "-----> Installing gem dependencies using Bundler"
11
- #{echo_cmd %[bundle install #{bundle_options}]}
12
+ #{echo_cmd %[#{bundle_bin} install #{bundle_options}]}
12
13
  }
13
14
  else
14
15
  queue %{
@@ -16,8 +17,8 @@ namespace :bundle do
16
17
  #{echo_cmd %[mkdir -p "#{deploy_to}/#{shared_path}/bundle"]}
17
18
  #{echo_cmd %[mkdir -p "#{File.dirname bundle_path}"]}
18
19
  #{echo_cmd %[ln -s "#{deploy_to}/#{shared_path}/bundle" "#{bundle_path}"]}
19
- #{echo_cmd %[bundle install #{bundle_options}]}
20
+ #{echo_cmd %[#{bundle_bin} install #{bundle_options}]}
20
21
  }
21
22
  end
22
23
  end
23
- end
24
+ end
data/lib/mina/default.rb CHANGED
@@ -16,7 +16,7 @@ task :init do
16
16
  FileUtils.cp Mina.root_path('data/deploy.rb'), './config/deploy.rb'
17
17
 
18
18
  puts 'Created deploy.rb.'
19
- puts 'Edit it, then run `#{name} setup` after.'
19
+ puts "Edit it, then run `#{name} setup` after."
20
20
  end
21
21
 
22
22
  task :default => :help
data/lib/mina/deploy.rb CHANGED
@@ -20,7 +20,7 @@ namespace :deploy do
20
20
  end
21
21
 
22
22
  cmds += shared_paths.map do |file|
23
- echo_cmd %{ln -s "#{shared_path}/#{file}" "./#{file}"}
23
+ echo_cmd %{ln -s "#{deploy_to}/#{shared_path}/#{file}" "./#{file}"}
24
24
  end
25
25
 
26
26
  queue %{
data/lib/mina/helpers.rb CHANGED
@@ -113,6 +113,7 @@ module Mina
113
113
  args = domain!
114
114
  args = "#{user}@#{args}" if user?
115
115
  args << " -i #{identity_file}" if identity_file?
116
+ args << " -p #{port}" if port?
116
117
  args << " -t"
117
118
  "ssh #{args}"
118
119
  end
data/lib/mina/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Mina
2
2
  def self.version
3
- "0.1.2.pre1"
3
+ "0.1.2.pre2"
4
4
  end
5
5
  end
@@ -29,14 +29,11 @@ describe 'Settings in rake tasks' do
29
29
  end
30
30
 
31
31
  it '#settings with a bang should work' do
32
- begin
32
+ expect {
33
33
  rake {
34
34
  set :path, lambda { "/var/www/#{version!}" }
35
35
  }
36
36
  rake.path
37
- 1.should == 2
38
- rescue Mina::Error => e
39
- e.message.should include "version"
40
- end
37
+ }.to raise_error(Mina::Error, /version/)
41
38
  end
42
39
  end
@@ -43,12 +43,7 @@ describe 'Settings' do
43
43
  end
44
44
 
45
45
  it 'bangs should check for settings' do
46
- begin
47
- @settings.non_existent_setting!
48
- 1.should == 2
49
- rescue Mina::Error => e
50
- e.message.should include "non_existent_setting"
51
- end
46
+ expect { @settings.non_existent_setting! }.to raise_error(Mina::Error, /non_existent_setting/)
52
47
  end
53
48
 
54
49
  it 'bangs should return settings' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mina
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2.pre1
4
+ version: 0.1.2.pre2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-06-11 00:00:00.000000000 Z
13
+ date: 2012-07-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake
17
- requirement: !ruby/object:Gem::Requirement
17
+ requirement: &70278252972060 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,15 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - ! '>='
29
- - !ruby/object:Gem::Version
30
- version: '0'
25
+ version_requirements: *70278252972060
31
26
  - !ruby/object:Gem::Dependency
32
27
  name: open4
33
- requirement: !ruby/object:Gem::Requirement
28
+ requirement: &70278252960240 !ruby/object:Gem::Requirement
34
29
  none: false
35
30
  requirements:
36
31
  - - ! '>='
@@ -38,15 +33,10 @@ dependencies:
38
33
  version: '0'
39
34
  type: :runtime
40
35
  prerelease: false
41
- version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ! '>='
45
- - !ruby/object:Gem::Version
46
- version: '0'
36
+ version_requirements: *70278252960240
47
37
  - !ruby/object:Gem::Dependency
48
38
  name: rspec
49
- requirement: !ruby/object:Gem::Requirement
39
+ requirement: &70278252958560 !ruby/object:Gem::Requirement
50
40
  none: false
51
41
  requirements:
52
42
  - - ! '>='
@@ -54,12 +44,7 @@ dependencies:
54
44
  version: '0'
55
45
  type: :development
56
46
  prerelease: false
57
- version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
- requirements:
60
- - - ! '>='
61
- - !ruby/object:Gem::Version
62
- version: '0'
47
+ version_requirements: *70278252958560
63
48
  description: Really fast deployer and server automation tool.
64
49
  email:
65
50
  - rico@nadarei.co
@@ -129,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
114
  version: 1.3.1
130
115
  requirements: []
131
116
  rubyforge_project:
132
- rubygems_version: 1.8.23
117
+ rubygems_version: 1.8.10
133
118
  signing_key:
134
119
  specification_version: 3
135
120
  summary: Really fast deployer and server automation tool.