jacana 0.1.0 → 0.1.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/jacana +19 -0
  3. data/lib/jacana/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 30f8cb4f7766f29c46b4d97d92f8aa7d393340df
4
- data.tar.gz: fca8da4e8ea0d2b76232eded472892b956be6815
3
+ metadata.gz: fb3dc3e7ffb8e176281bcbd9fec2da7ffc0b461a
4
+ data.tar.gz: a0c9ef83ea4bf29fe50c5e7b75331e400336c873
5
5
  SHA512:
6
- metadata.gz: aa0cc970ee8c65cb521310e91328fb8e9601f6ac0da7a6ca76c60ca185ec53840eac18ad867ce17f24c809a72fb61bd2ca21ccca2601d38c634c2e344e2189dc
7
- data.tar.gz: 9586e369603330d4c314d1d7e3b763513d4c29e711a2d6884b0ebc7e8678af7e0140d1fedfda122ebb58da517efaece871fa32f7fbb0f2aa2f19f947715af4df
6
+ metadata.gz: 95ef560dd9e53c52f44b30a698d7f9f7d9fa4285d0a796ec9f77773cca1844ec9d8ace3e200a74dfe34ae57f9c3e5a9cc6098e542b0cfd3be1ab071248c3facb
7
+ data.tar.gz: 05c06d65426a7efe28a7bdceaa24914327f4aed231791e28e40881fec89ec9731b0f22a6ea2232427d73eddb10c1c5d69807f359da30a08ff97080c9b070b17f
data/bin/jacana CHANGED
@@ -12,6 +12,9 @@ options = {
12
12
  :Php_Path => '/usr/bin/env',
13
13
  }
14
14
 
15
+ rewrite = nil
16
+
17
+
15
18
  opt = OptionParser.new
16
19
 
17
20
  opt.on('-d VAL') do |docroot|
@@ -26,10 +29,23 @@ opt.on('-s VAL') do |php_path|
26
29
  options[:Php_Path] = php_path.to_s
27
30
  end
28
31
 
32
+ opt.on('-c VAL') do |composer|
33
+ if composer == "true"
34
+ system("curl -sS https://getcomposer.org/installer | php")
35
+ system("mv composer.phar /usr/local/bin/composer")
36
+ end
37
+ end
38
+
29
39
  opt.on('--FRAMEWORK=PATH,NAME,VAL') do |framework|
30
40
  framework = framework.split(",")
31
41
  case framework[2]
32
42
  when 'laravel'
43
+
44
+ if ! File.exist?('/usr/local/bin/composer')
45
+ system("curl -sS https://getcomposer.org/installer | php")
46
+ system("mv composer.phar /usr/local/bin/composer")
47
+ end
48
+
33
49
  cd(framework[0], :verbose => false)
34
50
  system("composer create-project laravel/laravel #{framework[1]} --prefer-dist")
35
51
  system("chmod -R 0777 #{framework[0]}/#{framework[1]}")
@@ -45,6 +61,9 @@ puts "Jagana PHP Handler is Started !"
45
61
 
46
62
  jacana_server = Jacana::JacanaHttpServer.new options
47
63
 
64
+
65
+ jacana_server.a_rewrite /\/(?<url>.*)/, '/index.php'
66
+
48
67
  trap 'INT' do
49
68
  jacana_server.shutdown
50
69
  end
@@ -1,3 +1,3 @@
1
1
  module Jacana
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jacana
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sedat ÇİFTÇİ