culpa 0.2.0 → 0.2.1
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 +8 -8
- data/bin/culpa +4 -0
- data/lib/action.rb +3 -1
- data/templates/Dockerfile +19 -0
- data/templates/Gemfile +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzFhNDg4ZjgyOGZkYzVhNTFhNTU0ZmNkMThlYjA5OWRiNzY2ZDZkOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWJjNTlkOTdmN2JiOTA2NTg3MGU4ZmU1YjNmNWU5NjNkZWM5YjM0Nw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTRhYzE3NGM2ZWYxY2MxMDQ4YTNhNTg5NTk4YzliMWUzODdhMDBlNTk4OGY0
|
10
|
+
ZDBjODkwYmE4ZmZmZjlmODZiNjYxN2QwMzIxZDQzNjY4YWI3NjNkMDA4ZjQ1
|
11
|
+
MTczYWE2MjhlODU2NTgzMmU4YTAyY2Y0MzBmNTFhNTJjYThhMmU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjU3ODhiOTI4ZDJmNGY4ZDY4N2NlZWU3ZDZhMzMyYjk0YTMwNGI5ZmQxNjNk
|
14
|
+
NTc5ZTFkOGE3ZGY3YjA5MDkxNWJhOGY2NTc4ZDY5NDc5Y2JlYTQ5ZTRhODkw
|
15
|
+
MTM4YzMyMjg3ZDk3YjkwN2IzZDg3NWE2NWM0ZTQ4NDI2ZDI0Mjc=
|
data/bin/culpa
CHANGED
@@ -27,6 +27,10 @@ def create_project(project_path)
|
|
27
27
|
puts '==> Copying standard config.ru'
|
28
28
|
config_rackup_path = File.join( File.dirname(__FILE__), '../templates/config.ru' )
|
29
29
|
FileUtils.cp config_rackup_path, "#{project_path}/config.ru"
|
30
|
+
|
31
|
+
puts '==> Copying Dockerfile'
|
32
|
+
dockerfile_rackup_path = File.join( File.dirname(__FILE__), '../templates/Dockerfile' )
|
33
|
+
FileUtils.cp dockerfile_rackup_path, "#{project_path}/Dockerfile"
|
30
34
|
end
|
31
35
|
|
32
36
|
def open_console
|
data/lib/action.rb
CHANGED
@@ -76,11 +76,13 @@ class Action
|
|
76
76
|
@to_render = {
|
77
77
|
format: :file_from_path,
|
78
78
|
headers: {
|
79
|
-
'Content-Type' => options[:content_type] || 'application/octet-stream'
|
79
|
+
'Content-Type' => options[:content_type] || 'application/octet-stream',
|
80
|
+
'Content-Disposition' => "#{options[:disposition].to_s || 'attachment'}; filename=#{options[:filename] || 'unknown'}",
|
80
81
|
}.merge(options[:headers]),
|
81
82
|
status: RETURN_CODES[options[:status]] || 200,
|
82
83
|
object: FileHelpers::Streamer.new(options[:file])
|
83
84
|
}
|
85
|
+
@to_render[:headers]['Content-Length'] = options[:size] if options.has_key? :size
|
84
86
|
elsif options.has_key? :status
|
85
87
|
@to_render = {
|
86
88
|
format: :status,
|
@@ -0,0 +1,19 @@
|
|
1
|
+
FROM ruby:2.3.1
|
2
|
+
MAINTAINER Your Name <your@email.com>
|
3
|
+
|
4
|
+
# Create app folder
|
5
|
+
RUN mkdir -p /srv/app
|
6
|
+
|
7
|
+
# Setting the working directory
|
8
|
+
WORKDIR /srv/app
|
9
|
+
|
10
|
+
# Copy the gemfile and install dependencies
|
11
|
+
# Doing it before copying the app avoids to re-run bundle install on each build
|
12
|
+
COPY ./Gemfile /srv/app/
|
13
|
+
RUN bundle install
|
14
|
+
|
15
|
+
# Copy all applications files
|
16
|
+
ADD ./ /srv/app
|
17
|
+
|
18
|
+
# Command to start the application
|
19
|
+
CMD ["puma"]
|
data/templates/Gemfile
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: culpa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jérémy SEBAN
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -51,6 +51,7 @@ files:
|
|
51
51
|
- lib/envelope.rb
|
52
52
|
- lib/file_helpers.rb
|
53
53
|
- lib/path_parser.rb
|
54
|
+
- templates/Dockerfile
|
54
55
|
- templates/Gemfile
|
55
56
|
- templates/config.ru
|
56
57
|
homepage: https://github.com/HipsterWhale/culpa
|