capun 0.0.2 → 0.0.3

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: 80bc86df6d8fcf58d07dacc0f6874dcc643ae184
4
- data.tar.gz: a12470dffb7ea931b301d8fa1d5032064b92a17b
3
+ metadata.gz: 23aced6e44d735a2dcf439289e019d6476304591
4
+ data.tar.gz: 0e872508fabe0f1bf42c552120a95911c74cb6a6
5
5
  SHA512:
6
- metadata.gz: e51d2366d3f998e25a7c2f905d8dd40bb99601575f4ddc40c8cfd4c4d5a9fdc4bf3515470af31e20cd41bc5cc87a8393b8b430f19e254fe46b1235bd62644604
7
- data.tar.gz: 3cb20599c6914624ceef6b4a606d76aa49af08ca9a437c0ad5f3548090de638af3508b40df4146af5f529dc24a39e5252a689a196268967e30b9399c2c1cd649
6
+ metadata.gz: 4ec6ea587c8c15def315933db43037acf78526d77441c2753acf0c56d9ab666c9889ca32dff1cb43c39c306dba15155942e9e20ff5723290c354b80bb6b92c36
7
+ data.tar.gz: 8ed4ad4752f7ffb6d5135dcef81c65ee3a456091e85f2fa92a0873a5227f2255005380bb69bdea6749cc36788a975407672795c2dda9165f4ca1073d1222242e
data/.gitignore CHANGED
@@ -15,3 +15,5 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ /docs
19
+ .DS_Store
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Capun
2
-
2
+ `Capun` is merely a combination of `rails + capistrano3 + unicorn` related gems (namely, [capistrano-rails](https://github.com/capistrano/rails), [rvm1-capistrano3](https://github.com/rvm/rvm1-capistrano3), [capistrano-bundler](https://github.com/capistrano/bundler), [capistrano3-unicorn](https://github.com/tablexi/capistrano3-unicorn)) and a couple of convenient rails generators that help to setup deployment scheme in less than a minute.
3
3
 
4
4
  ###Prerequisites
5
5
 
@@ -13,7 +13,7 @@ We expect you to have the following things setup before you run `cap staging|pro
13
13
 
14
14
  ### Getting started
15
15
 
16
- Capun works with Rails 4.0 onwards. You can add it to your Gemfile with:
16
+ `Capun` works with Rails 4.0 onwards. You can add it to your Gemfile with:
17
17
 
18
18
  <pre><code>gem 'capun', group: :development
19
19
  \#add unicorn as well, as we use it as application server
@@ -38,6 +38,31 @@ Now you are ready to make a deploy:
38
38
  <pre><code>cap beta deploy
39
39
  </pre></code>
40
40
 
41
+ ### Configuration
42
+
43
+ **Capistrano 3 tasks**
44
+
45
+ If you need to add custom tasks to a deployed application, you can append them to `config/deploy.rb` file exactly the same way, as you would do with `capistrano3`.
46
+
47
+ **Uploading files and creating symbolic links**
48
+
49
+ If you like to upload or symlink files to a server, you should add them either to `uploads` or `symlinks` array in the `config/deploy.rb` file:
50
+
51
+ <pre><code>set :uploads, [
52
+ {what: "config/somefile.rb", where: '#{shared_path}/config/somefile.rb'}
53
+ ]
54
+ set :symlinks, [
55
+ \#when creating a symlink, we assume that source file is located in #{shared_path}/config directory
56
+ {what: "somefile.yml", where: '#{release_path}/config/somefile.yml'}
57
+ ]
58
+ </pre></code>
59
+
60
+ If you upload file with `.erb` extension, it will be precompiled before upload.
61
+
62
+ **Figaro support**
63
+
64
+ If you use [figaro](https://github.com/laserlemon/figaro) gem, `Capun` will pick up `application.yml` file, upload it to `#{shared_path}/config/application.yml` and symlink to `#{release_path}/config/application.yml`. No configuration is required.
65
+
41
66
  ### Contributing
42
67
 
43
68
  1. Fork it ( http://github.com/zamylin/capun/fork )
data/lib/capun/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Capun
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -39,7 +39,13 @@ module Capun
39
39
  end
40
40
  end
41
41
 
42
-
42
+ def add_secret
43
+ secret_token_does_not_exist = Thor::CoreExt::HashWithIndifferentAccess.new(::YAML::load_file("config/secrets.yml"))[singular_name].nil?
44
+ if secret_token_does_not_exist
45
+ append_to_file "config/secrets.yml", "\n#{singular_name}:\n secret_key_base: #{SecureRandom.hex(64)}"
46
+ end
47
+ end
48
+
43
49
  end
44
50
  end
45
51
  end
@@ -9,6 +9,6 @@ server '<%= @server %>', user: fetch(:user), roles: %w{web app db}
9
9
  set :repo_url, '<%= @repo %>'
10
10
  # set :branch, 'master'
11
11
 
12
- # set :rvm1_ruby_version, "ruby-2.0.0-p353"
12
+ set :rvm1_ruby_version, "ruby-2.0.0-p481"
13
13
 
14
14
  # set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets public/system}
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Zamylin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-26 00:00:00.000000000 Z
11
+ date: 2015-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.5'
20
20
  type: :development
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.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.1'
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: '10.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: capistrano
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '3.1'
48
48
  type: :runtime
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: '3.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: capistrano-rails
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.1'
62
62
  type: :runtime
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: '1.1'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rvm1-capistrano3
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.2'
76
76
  type: :runtime
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: '1.2'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: capistrano-bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.1'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.1'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: capistrano3-unicorn
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0.1'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0.1'
111
111
  description: Opinionated Rails deployment solution with CAPistrano, Unicorn and Nginx.
@@ -116,7 +116,7 @@ executables: []
116
116
  extensions: []
117
117
  extra_rdoc_files: []
118
118
  files:
119
- - .gitignore
119
+ - ".gitignore"
120
120
  - Gemfile
121
121
  - LICENSE.txt
122
122
  - README.md
@@ -144,17 +144,17 @@ require_paths:
144
144
  - lib
145
145
  required_ruby_version: !ruby/object:Gem::Requirement
146
146
  requirements:
147
- - - '>='
147
+ - - ">="
148
148
  - !ruby/object:Gem::Version
149
149
  version: '0'
150
150
  required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  requirements:
152
- - - '>='
152
+ - - ">="
153
153
  - !ruby/object:Gem::Version
154
154
  version: '0'
155
155
  requirements: []
156
156
  rubyforge_project:
157
- rubygems_version: 2.2.1
157
+ rubygems_version: 2.4.8
158
158
  signing_key:
159
159
  specification_version: 4
160
160
  summary: Opinionated Rails deployment solution with CAPistrano, Unicorn and Nginx.