durable_streams-rails 0.2.1 → 0.2.2

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
  SHA256:
3
- metadata.gz: 0c80a5c344510700b9f1820501af721aa5e7f622bfeb07336b641aaf1e9f75d0
4
- data.tar.gz: 4d6ec733fb72e08ce50a875fe39d0797590c078ff3605b754cf1cebf38425a4c
3
+ metadata.gz: eb1d7090c279daba2ebd2d5556eeaf2df8f56d7f01a2e5c09d236ea03f4142cd
4
+ data.tar.gz: 06ff468c7882ce7d06d0d62f77960350476d5a33c2c3e552c914aa1974724541
5
5
  SHA512:
6
- metadata.gz: e5397e49a89527153f53d0b558fbbad3a8f7db5851232173aabd70f4b9adfc73c4a9bccac48daaa9cbaa3a61102cf5d07b3bac59fbccbef321209c26328e86c3
7
- data.tar.gz: afa1c49d6679cc088e9c2c08928c39d902cd255f991c4b2f44c997bdd9ed4b2646ddb1200f5abb3a4b32db57b00a5e712e902479be3ed5a37ee22c28bbc59cec
6
+ metadata.gz: 11f0a0dd900fd4526b4566d2794c5bed38f345ed9b7001a8444a72be4b6c3bab53cdd18b10c480b4018f6466829586ceebd3973e309fd60a1adc0be14ac9bc7d
7
+ data.tar.gz: a3a6b953074677a5ddccb88769071b92f03f20c5ebf8010fc541c2d4b1e3ff9a9389a16eee170cc50a855d0e7ae95f9bb3f975770bab91fa983bf0c9878d4da8
@@ -1,3 +1,3 @@
1
1
  module DurableStreams
2
- RAILS_VERSION = "0.2.1"
2
+ RAILS_VERSION = "0.2.2"
3
3
  end
@@ -29,15 +29,22 @@ module DurableStreams
29
29
  return if options[:skip_procfile]
30
30
 
31
31
  procfile = "Procfile.dev"
32
+ procfile_path = File.join(destination_root, procfile)
32
33
  entry = "streams: bin/durable-streams\n"
33
34
 
34
- if File.exist?(procfile) && !File.read(procfile).match?(/^streams:/)
35
+ if File.exist?(procfile_path)
36
+ contents = File.read(procfile_path)
37
+ return if contents.match?(/^streams:/)
38
+
39
+ entry = "\n#{entry}" unless contents.end_with?("\n")
35
40
  append_file procfile, entry
36
41
  end
37
42
  end
38
43
 
39
44
  def update_gitignore
40
- if File.exist?(".gitignore") && !File.read(".gitignore").match?(/^bin\/dist/)
45
+ gitignore_path = File.join(destination_root, ".gitignore")
46
+
47
+ if File.exist?(gitignore_path) && !File.read(gitignore_path).match?(/^bin\/dist/)
41
48
  append_file ".gitignore", "\n# Durable Streams server binary\nbin/dist/\n"
42
49
  end
43
50
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: durable_streams-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - tokimonki