negroku 2.0.0.pre3 → 2.0.0.pre4

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: d2304543c710a4d86a60f368a026e53ae593f8d5
4
- data.tar.gz: e9046a6bfcffe5db9bfc4c55262b9d030b08537e
3
+ metadata.gz: 4d045fb351d197f53adfebf653a29e9989be6838
4
+ data.tar.gz: fad09b0fdad39ed72d3b6dcdb1d0aacd1cf6af7b
5
5
  SHA512:
6
- metadata.gz: 26513388eb619bcb04ee854a1a24831e1ee90f6cca7ce9a4264d6fb4af35eff5bd37f27a4a8c1adc79d4ff0b0711cfed4a8f4f80ae01e29af95532071ccc4cf6
7
- data.tar.gz: 502dbf0589cbc762fd46ab1c1b1bf02455665cb2edc1ffe8c6f6dbb7a46668e8c2c4a578fa3c44450e3dec558dbd59751d48a4666819cda82a7b150ccd62f6ef
6
+ metadata.gz: c75d2c4a932c6aade463d7ad576dda2d6e02dbca3b625439c0b2eefb9c6d2e085ebc4baf358884e992df5f5a341adb377a13a6398c7414f5f87a611bd7fae167
7
+ data.tar.gz: b87a9a82dfb370cecaf7c6593bf7da1632869555e003d8777bee4cb03a65d4e020ff1cf44cff6a16b67a7a9a8aa9e5a1895dba5894d6169c6bf55762db068efa
data/.gitignore CHANGED
@@ -1,17 +1,6 @@
1
1
  *.gem
2
2
  *.rbc
3
3
  .bundle
4
- .config
5
- .yardoc
6
4
  Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
5
  pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
6
  tmp
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ language: ruby
3
+ script: bundle exec rspec spec
4
+ rvm:
5
+ - "2.0.0"
6
+ - "2.1.0"
7
+ sudo: false
data/README.md CHANGED
@@ -1,15 +1,167 @@
1
- Negroku [![Stories in Ready](https://badge.waffle.io/platanus/negroku.svg)](http://waffle.io/platanus/negroku)
1
+ Negroku [![Stories in Ready][ready]][waffle] [![Build Status][travis-badge]][travis]
2
2
  =======
3
+ [waffle]: http://waffle.io/platanus/negroku
4
+ [ready]: https://badge.waffle.io/platanus/negroku.svg?label=ready&title=ready
5
+ [travis]: https://travis-ci.org/platanus/negroku
6
+ [travis-badge]: https://travis-ci.org/platanus/negroku.svg?branch=master
3
7
 
4
8
  Negroku is an opinionated collection of recipes for capistrano.
5
9
 
6
- The goal is to be able to deploy **ruby on rails applications** and **static websites** without the hassle of configure and define all the stuff involved in an application deployment.
10
+ The goal is to be able to deploy **ruby applications** without the hassle of configure and define all the stuff involved in an application deployment.
7
11
 
8
- All the server configurations pre-defined in the configuration files generated by negroku are targeted oto this generic [configuration guide](https://github.com/platanus/guides/tree/master/deployment).
12
+ ## Installation
9
13
 
10
- ## This is a rewrite that will use capistrano 3
14
+ Install negroku as a global gem.
11
15
 
16
+ ```shell
17
+ $ gem install negroku --pre
18
+ ```
12
19
 
20
+ Add the negroku gem to your `Gemfile` development group to lock the version your are going to use.
13
21
 
22
+ ```ruby
23
+ group :development do
24
+ gem 'negroku', '~> 2.0.0.pre3'
25
+ end
26
+ ```
14
27
 
28
+ Then run
15
29
 
30
+ ```shell
31
+ $ bundle install
32
+ ```
33
+
34
+ ## Prepare your application
35
+
36
+ 1. Create your app executing the following command, and just follow the on-screen questions.
37
+
38
+ ```shell
39
+ $ negroku app create
40
+ ```
41
+
42
+ ![App Create](http://g.recordit.co/CllZX9ruB8.gif)
43
+
44
+ 1. **Give your application a name**
45
+
46
+ This will be used to create the app folder structure in the server.
47
+
48
+ 1. **Please choose your repository url**
49
+
50
+ You'll need to choose the git respository where your are going deploy your project from. Typically a GitHub repository.
51
+
52
+ If you have already initializated your git repository for the project, you'll be offered to choose the remotes of the current repo.
53
+
54
+ The `app create` command will bootpstrap your app (behind the scenes it will run the `cap install` command and add some customizations)
55
+
56
+ Some files and folders will be added to your project.
57
+
58
+ ```ruby
59
+ project_root
60
+ |--- Capfile # Capistrano load file
61
+ +--- config
62
+ |--- deploy.rb # Global setting for all environments
63
+ ```
64
+
65
+ 1. Add a new stage for your deployment.
66
+
67
+ ```shell
68
+ $negroku stage add
69
+ ```
70
+
71
+ ![stage add](http://g.recordit.co/pNYbqZ4kD8.gif)
72
+
73
+ 1. **Stage Name**
74
+
75
+ This will be used to create de stage configuration files
76
+
77
+
78
+ 1. **Select the branch to use**
79
+
80
+ Here you'll be presented with your remote branches (git branch -r) so you can choose which one you want to deploy the stage you are creating.
81
+
82
+ 1. **Type the domains to use**
83
+
84
+ You can pass comma separated domains you want to use in the application
85
+
86
+ 1. **Type the server ur to deploy to**
87
+
88
+ Set the server where you are going to deploy this stage
89
+
90
+ 1. **Do you want to add rbenv-vars to the server now?**
91
+
92
+ If you choose 'y'es you wil able to create a `.rbenv-vars` file in the server with the KEYS and VALUES you choose from your local `.rbenv-vars`
93
+
94
+ The `stage add` command will create the stage configuration file and run the `rbenv:vars:add` capistrano task if you chosen to add environmental variables to the applicatin
95
+
96
+ ```ruby
97
+ project_root
98
+ +--- config
99
+ +--- deploy
100
+ +--- production.rb # Specific settings for production server
101
+ ```
102
+
103
+ 1. In the `Capfile` you can enable and disabled the tasks you need in your application. You only have to comment out the stuff you don't need.
104
+
105
+ ```ruby
106
+ # Node
107
+ require 'capistrano/nodenv'
108
+ # require 'capistrano/bower'
109
+
110
+ # App server
111
+ require 'capistrano3/unicorn'
112
+
113
+ # Static server
114
+ require 'capistrano/nginx'
115
+ ```
116
+
117
+ 1. Configure your specific settings in the files created above
118
+
119
+ 1. Common settings for all stages `deploy.rb`
120
+
121
+ Here you can add all the settings that are common to all the stage severs. For example:
122
+
123
+ ```ruby
124
+ set :unicorn_workers, 1
125
+ set :unicorn_workers_timeout, 30
126
+ ```
127
+
128
+
129
+ 1. Per-stage settings `staging.rb` `production.rb`
130
+
131
+ Here you can add all the settings that are specific to the stage. For example:
132
+
133
+ ```ruby
134
+ set :branch, "production" # Optional, defaults to master
135
+
136
+ set :rails_env, "production"
137
+ ```
138
+
139
+ 1. Commit and push the changes to the repository
140
+
141
+ ## Deploy you application
142
+
143
+ To deploy your application you just need to run capistrano task to do so.
144
+
145
+ ```shell
146
+ $ cap staging deploy # to deploy to the staging stage
147
+ ```
148
+
149
+ ## Contributing
150
+
151
+ 1. Fork it
152
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
153
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
154
+ 4. Push to the branch (`git push origin my-new-feature`)
155
+ 5. Create new Pull Request
156
+
157
+ ## Credits
158
+
159
+ Thank you [contributors](https://github.com/platanus/negroku/graphs/contributors)!
160
+
161
+ <img src="http://platan.us/gravatar_with_text.png" alt="Platanus" width="250"/>
162
+
163
+ negroku is maintained by [platanus](http://platan.us).
164
+
165
+ ## License
166
+
167
+ Guides is © 2014 platanus, spa. It is free software and may be redistributed under the terms specified in the LICENSE file.
@@ -15,7 +15,7 @@ namespace :load do
15
15
  job_template: "bash -lc ':job'",
16
16
  output: "#{shared_path}/log/whenever-out.log"
17
17
  }
18
- .map{|k,v| "#{k}=\\\"#{v}\\\""}.join("&").prepend("\"") << "\""
18
+ .map{|k,v| "#{k}=#{v}"}.join("&").prepend("\"") << "\""
19
19
  }
20
20
 
21
21
  end
@@ -24,7 +24,7 @@ set :deploy_to, "/home/deploy/applications/#{fetch(:application)}"
24
24
  # set :linked_files, fetch(:linked_files, []) + %w{}
25
25
 
26
26
  # Default value for linked_dirs is []
27
- # set :linked_dirs, fetch(:linked_dirs, []) + %w{bin log tmp/pids tmp/cache tmp/sockets public/system}
27
+ # set :linked_dirs, fetch(:linked_dirs, []) + %w{log tmp/pids tmp/cache tmp/sockets public/system}
28
28
 
29
29
  ######################
30
30
  # Unicorn
@@ -1,3 +1,3 @@
1
1
  module Negroku
2
- VERSION = '2.0.0.pre3'
2
+ VERSION = '2.0.0.pre4'
3
3
  end
data/negroku.gemspec CHANGED
@@ -12,9 +12,6 @@ spec = Gem::Specification.new do |s|
12
12
 
13
13
  s.files = `git ls-files`.split($/)
14
14
  s.require_paths << 'lib'
15
- s.has_rdoc = true
16
- s.extra_rdoc_files = ['README.rdoc','negroku.rdoc']
17
- s.rdoc_options << '--title' << 'negroku' << '--main' << 'README.rdoc' << '-ri'
18
15
  s.bindir = 'bin'
19
16
  s.executables << 'negroku'
20
17
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: negroku
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre3
4
+ version: 2.0.0.pre4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Ignacio Donoso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-24 00:00:00.000000000 Z
11
+ date: 2015-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
@@ -282,16 +282,14 @@ email: jidonoso@gmail.com
282
282
  executables:
283
283
  - negroku
284
284
  extensions: []
285
- extra_rdoc_files:
286
- - README.rdoc
287
- - negroku.rdoc
285
+ extra_rdoc_files: []
288
286
  files:
289
287
  - .gitignore
290
288
  - .rspec
289
+ - .travis.yml
291
290
  - Gemfile
292
291
  - LICENSE.txt
293
292
  - README.md
294
- - README.rdoc
295
293
  - Rakefile
296
294
  - bin/negroku
297
295
  - lib/negroku.rb
@@ -330,7 +328,6 @@ files:
330
328
  - lib/negroku/templates/tasks/unicorn_rails_activerecord.rb.erb
331
329
  - lib/negroku/version.rb
332
330
  - negroku.gemspec
333
- - negroku.rdoc
334
331
  - spec/lib/cli/bootstrap_spec.rb
335
332
  - spec/lib/cli/env_spec.rb
336
333
  - spec/lib/cli/stage_spec.rb
@@ -339,12 +336,7 @@ homepage: http://github.com/platanus/negroku
339
336
  licenses: []
340
337
  metadata: {}
341
338
  post_install_message:
342
- rdoc_options:
343
- - --title
344
- - negroku
345
- - --main
346
- - README.rdoc
347
- - -ri
339
+ rdoc_options: []
348
340
  require_paths:
349
341
  - lib
350
342
  - lib
data/README.rdoc DELETED
@@ -1,6 +0,0 @@
1
- = negroku
2
-
3
- Describe your project here
4
-
5
- :include:negroku.rdoc
6
-
data/negroku.rdoc DELETED
@@ -1,5 +0,0 @@
1
- = negroku
2
-
3
- Generate this with
4
- negroku rdoc
5
- After you have described your command line interface