vagrant-phpstorm-tunnel 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 12b90f7d5d324117f7ae398e5500ca82019bb7ce
4
- data.tar.gz: 8df3b412b493ed3bbd6fd0445a4c6759e22cd71a
3
+ metadata.gz: 99902a60cfbac6ae8a05ed6403be0cd9f425b43c
4
+ data.tar.gz: 807967bcf01eae61de44c79a97fe8cb3bb586ec8
5
5
  SHA512:
6
- metadata.gz: 132bf45528bae8f0cc7790b8089d587739d4f4678be0c21595af365f06221ef1b46a1706162e149a9103fef54674c36dccf6d83efa804a93d00c3d023720e733
7
- data.tar.gz: 23d365163b375eba18abb270624ff2814b7f7beb9de4a2ea2e9cb0c9b6ee04312ebd957859ec7bce1609dbf793e590a1a96cfe9602d6089a3df31b9d6facc76b
6
+ metadata.gz: e7604c8431c15ab95bd8cbc469d4430d8735c2f07c957da78d293f4c63c9a9684420165616a144edff4760197320b6dd6d3fb2b47b5057282a26e0555e4f410f
7
+ data.tar.gz: ebd7f35aed9918615647ca846563a9b9fff69d8ea6cd3830bbeb9c14309e32363389cc3cc54d84459f8b0b0c2204b081e8d5d9c6511708b8f2808fbcfb1ff719
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Cargo Media
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -1,4 +1,23 @@
1
1
  vagrant-phpstorm-tunnel
2
2
  ==============================
3
3
 
4
- Create tunnel between [PHPStorm](http://www.jetbrains.com/phpstorm/) and [Vagrant](http://www.vagrantup.com/) machine to allow executing [PHP](http://php.net/) via [SSH](http://en.wikipedia.org/wiki/Secure_Shell)
4
+ `vagrant-phpstorm-tunnel` creates tunnel between [PHPStorm](http://www.jetbrains.com/phpstorm/) and [Vagrant](http://www.vagrantup.com/) machine to allow executing [PHP](http://php.net/) via [SSH](http://en.wikipedia.org/wiki/Secure_Shell)
5
+
6
+ ## Installation
7
+
8
+ $ vagrant plugin install vagrant-phpstorm-tunnel
9
+
10
+ ## Vagrantfile
11
+
12
+ ```ruby
13
+ Vagrant.require_plugin "vagrant-phpstorm-tunnel"
14
+
15
+ Vagrant.configure("2") do |config|
16
+ #...
17
+ end
18
+ ```
19
+
20
+ ## PhpStorm
21
+
22
+ `vagrant-phpstorm-tunnel` will create file `php` in location `./scripts/vagrant/php` relative to `Vagrantfile`. You should configure you `PHP` interpreter by navigate to folder `<path-to-project>/scripts/vagrant`.
23
+
data/data/php CHANGED
File without changes
@@ -6,7 +6,7 @@ module VagrantPhpStormTunnel
6
6
  name "vagrant-phpstorm-tunnel"
7
7
 
8
8
  %w{up provision}.each do |action|
9
- action_hook(:restart_host_dns, "machine_action_#{action}".to_sym) do |hook|
9
+ action_hook(:restart_host_tunnel, "machine_action_#{action}".to_sym) do |hook|
10
10
  hook.append VagrantPhpStormTunnel::Configurator
11
11
  end
12
12
  end
@@ -5,15 +5,22 @@ module VagrantPhpStormTunnel
5
5
  def initialize(app, env)
6
6
  @app = app
7
7
  @env = env
8
+
9
+ @root_path = @env[:root_path].to_s
10
+ end
11
+
12
+ def is_intellij
13
+ File.exist? @root_path + '/.idea'
8
14
  end
9
15
 
10
- def link_php_to_phpstorm
11
- destination_path = Dir.getwd + '/scripts/vagrant/php'
16
+ def link_php_to_intellij
17
+ destination_path = @root_path + '/.idea/vagrant/php'
12
18
  source_path = File.expand_path('../../../data/php', __FILE__)
13
19
 
14
20
  if !File.exist? destination_path
15
21
  FileUtils.mkdir_p(File.dirname(destination_path))
16
22
  File.link(source_path, destination_path)
23
+ File.chmod(0755, destination_path)
17
24
  end
18
25
  end
19
26
 
@@ -21,7 +28,11 @@ module VagrantPhpStormTunnel
21
28
  @env = env
22
29
  @app.call(env)
23
30
 
24
- link_php_to_phpstorm
31
+ if !is_intellij
32
+ raise "Cannot detect intellij environment at #{@root_path}"
33
+ end
34
+
35
+ link_php_to_intellij
25
36
  end
26
37
  end
27
38
  end
metadata CHANGED
@@ -1,15 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-phpstorm-tunnel
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
- - kris-lab for Cargomedia AG
7
+ - Cargo Media
8
+ - kris-lab
9
+ - njam
8
10
  autorequire:
9
11
  bindir: bin
10
12
  cert_chain: []
11
- date: 2014-02-21 00:00:00.000000000 Z
12
- dependencies: []
13
+ date: 2014-02-23 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rake
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - '>='
27
+ - !ruby/object:Gem::Version
28
+ version: '0'
13
29
  description: Creates tunnel between PhpStorm and Vagrant machine to allow execute
14
30
  PHP via SSH
15
31
  email: hello@cargomedia.ch
@@ -17,22 +33,12 @@ executables: []
17
33
  extensions: []
18
34
  extra_rdoc_files: []
19
35
  files:
20
- - .idea/encodings.xml
21
- - .idea/misc.xml
22
- - .idea/modules.xml
23
- - .idea/scopes/scope_settings.xml
24
- - .idea/vagrant-phpstorm-tunnel.iml
25
- - .idea/vcs.xml
26
- - Gemfile
36
+ - LICENSE
27
37
  - README.md
28
- - Rakefile
29
- - Vagrantfile
30
- - data/php
31
- - lib/vagrant-phpstorm-tunnel.rb
32
38
  - lib/vagrant-phpstorm-tunnel/configurator.rb
33
- - lib/vagrant-phpstorm-tunnel/version.rb
34
- - vagrant-phpstorm-tunnel.gemspec
35
- homepage: https://github.com/kris-lab/vagrant-phpstorm-tunnel
39
+ - lib/vagrant-phpstorm-tunnel.rb
40
+ - data/php
41
+ homepage: https://github.com/cargomedia/vagrant-phpstorm-tunnel
36
42
  licenses:
37
43
  - MIT
38
44
  metadata: {}
@@ -1,5 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
4
- </project>
5
-
@@ -1,5 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectRootManager" version="2" project-jdk-name="ruby-2.0.0-p247" project-jdk-type="RUBY_SDK" />
4
- </project>
5
-
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/vagrant-phpstorm-tunnel.iml" filepath="$PROJECT_DIR$/.idea/vagrant-phpstorm-tunnel.iml" />
6
- </modules>
7
- </component>
8
- </project>
9
-
@@ -1,5 +0,0 @@
1
- <component name="DependencyValidationManager">
2
- <state>
3
- <option name="SKIP_IMPORT_STATEMENTS" value="false" />
4
- </state>
5
- </component>
@@ -1,27 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="RUBY_MODULE" version="4">
3
- <component name="FacetManager">
4
- <facet type="gem" name="Gem">
5
- <configuration>
6
- <option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
7
- <option name="GEM_APP_TEST_PATH" value="" />
8
- <option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
9
- </configuration>
10
- </facet>
11
- </component>
12
- <component name="NewModuleRootManager">
13
- <content url="file://$MODULE_DIR$" />
14
- <orderEntry type="inheritedJdk" />
15
- <orderEntry type="sourceFolder" forTests="false" />
16
- <orderEntry type="library" scope="PROVIDED" name="bundler (v1.5.3, ruby-2.0.0-p247) [gem]" level="application" />
17
- <orderEntry type="library" scope="PROVIDED" name="childprocess (v0.3.9, ruby-2.0.0-p247) [gem]" level="application" />
18
- <orderEntry type="library" scope="PROVIDED" name="erubis (v2.7.0, ruby-2.0.0-p247) [gem]" level="application" />
19
- <orderEntry type="library" scope="PROVIDED" name="ffi (v1.9.3, ruby-2.0.0-p247) [gem]" level="application" />
20
- <orderEntry type="library" scope="PROVIDED" name="i18n (v0.6.9, ruby-2.0.0-p247) [gem]" level="application" />
21
- <orderEntry type="library" scope="PROVIDED" name="log4r (v1.1.10, ruby-2.0.0-p247) [gem]" level="application" />
22
- <orderEntry type="library" scope="PROVIDED" name="net-scp (v1.1.2, ruby-2.0.0-p247) [gem]" level="application" />
23
- <orderEntry type="library" scope="PROVIDED" name="net-ssh (v2.7.0, ruby-2.0.0-p247) [gem]" level="application" />
24
- <orderEntry type="library" scope="PROVIDED" name="vagrant (v1.4.3@4f0eb9, ruby-2.0.0-p247) [gem]" level="application" />
25
- </component>
26
- </module>
27
-
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
6
- </project>
7
-
data/Gemfile DELETED
@@ -1,9 +0,0 @@
1
- source 'https://rubygems.org'
2
- gemspec
3
-
4
- group :development do
5
- # We depend on Vagrant for development, but we don't add it as a
6
- # gem dependency because we expect to be installed within the
7
- # Vagrant environment itself using `vagrant plugin`.
8
- gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git", :ref => "v1.4.3"
9
- end
data/Rakefile DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env rake
2
- require "bundler/gem_tasks"
@@ -1,6 +0,0 @@
1
- Vagrant.require_plugin "vagrant-phpstorm-tunnel"
2
-
3
- Vagrant.configure("2") do |config|
4
- config.vm.box = 'debian-6-amd64'
5
- config.vm.box_url = 'http://s3.cargomedia.ch/vagrant-boxes/debian-6-amd64.box'
6
- end
@@ -1,5 +0,0 @@
1
- module Vagrant
2
- module VagrantPhpStormTunnel
3
- VERSION = '0.0.3'
4
- end
5
- end
@@ -1,17 +0,0 @@
1
- require File.expand_path('../lib/vagrant-phpstorm-tunnel/version', __FILE__)
2
-
3
- Gem::Specification.new do |gem|
4
- gem.authors = ['kris-lab for Cargomedia AG']
5
- gem.email = 'hello@cargomedia.ch'
6
- gem.description = 'Creates tunnel between PhpStorm and Vagrant machine to allow execute PHP via SSH'
7
- gem.summary = 'PhpStorm-Vagrant tunnel'
8
- gem.homepage = 'https://github.com/kris-lab/vagrant-phpstorm-tunnel'
9
-
10
- gem.files = `git ls-files`.split($\)
11
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
12
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
13
- gem.name = 'vagrant-phpstorm-tunnel'
14
- gem.require_paths = ["lib"]
15
- gem.version = Vagrant::VagrantPhpStormTunnel::VERSION
16
- gem.license = 'MIT'
17
- end