susana 0.0.3 → 0.0.4

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/susana.rb +6 -8
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddd61860cfbc0290368a171ce11aee7c23ca07c6
4
- data.tar.gz: 0d2663ff42ef671ecc14922c5f06317f45adf031
3
+ metadata.gz: 3d6d3ab75c395a9b7d2e001b9905715fa774596e
4
+ data.tar.gz: ed625c28876aabc03cf46c85657d8eb9b1d92710
5
5
  SHA512:
6
- metadata.gz: 512043d9b1ca3ba2b8ceaf0ea03b640d0362625ab1f5d5c5f36e81552288a971cfba614729fa1246d7ba60f0fffa488d5361cf7e46bd66f1f48f7bcdfdcd5384
7
- data.tar.gz: 2d64d454e1c968c2017109b99bb00aa9a4560cd65f626506dff0103ba118d70d57b428f5f1895f472b60e7e335dc6273a7567b76af2d718c213f222c4f570f3a
6
+ metadata.gz: c0be28c2feabde0e3532268a00517e31000c7affd2e0f03d1577a17fcb24054fc81e17f33c199933cccdffc98fa7efcc9a8d0c942e58f2174143142e47907f7b
7
+ data.tar.gz: d52192edc08c19acc5b9d79c2c9a078291b36d5b635acf711a45bcf3cfdd43a827523b447fa3ce6778f2f6bb983838697c81d899d39eb890b4cddf8404eba3b1
data/lib/susana.rb CHANGED
@@ -6,6 +6,7 @@
6
6
  # This script downloads and installs your new application
7
7
 
8
8
  require 'securerandom'
9
+ require 'fileutils'
9
10
 
10
11
  puts "\n * S U S A N A *\n\n"
11
12
 
@@ -18,25 +19,22 @@ if !name or name == ''
18
19
  exit
19
20
  end
20
21
 
21
- # Get working dir
22
- dir = Dir.pwd
23
-
24
22
  # Install new susana app
25
23
  `git clone https://github.com/fugroup/susana #{name}`
26
24
 
27
- # Change working dir
28
- Dir.chdir(name)
25
+ FileUtils.cd(name)
29
26
 
30
27
  # Cleanup
31
- `rm -rf .git`
32
- `rm -rf gem`
28
+ FileUtils.remove_dir(".git")
29
+ FileUtils.remove_dir("gem")
33
30
 
34
31
  # Create cookie secret
35
32
  secret = SecureRandom::hex(26)
36
33
 
37
34
  # Install secret
38
35
  key = 'a8976c0df4fb8a28f8fe979270443d37f239cf8da8f1bf9734ba'
39
- File.open('config.ru', 'w'){|f| f.write(File.read('config.ru').gsub(key, secret))}
36
+ file = File.read("config.ru").gsub(key, secret)
37
+ File.open("config.ru", 'w'){|f| f.write(file)}
40
38
 
41
39
  puts "\nApp #{name} created, please review your settings in the config directory\n\n"
42
40
  puts "To start the application, go to the #{name} directory and run 'puma'\n"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: susana
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fugroup Limited