phpcode 0.0.7

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.
data/lib/phpcode.rb ADDED
@@ -0,0 +1,6 @@
1
+ module Phpcode
2
+ def gem_path
3
+ File.expand_path(__FILE__)
4
+ end
5
+ module_function :gem_path
6
+ end
@@ -0,0 +1,11 @@
1
+ <?php
2
+ header("content-type:text/html;charset=utf-8");
3
+ echo PHP_VERSION;
4
+ $doc=new DOMDocument;
5
+ @$doc->loadHTMLFile("http://dashanxue.com");
6
+
7
+ $x=new DOMXPath($doc);
8
+
9
+ foreach($x->query("//h2/a") as $h ){
10
+ echo $h->nodeValue."\n";
11
+ }
data/spec.rb ADDED
@@ -0,0 +1,7 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'phpcode'
3
+ s.version = '0.0.7'
4
+ s.summary = 'personal useful php codes'
5
+ s.author = ['haohuoyao']
6
+ s.files = Dir['lib/*.rb',"phpcodes/*.php",'spec.rb'].to_a
7
+ end
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: phpcode
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.7
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - haohuoyao
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-04-21 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description:
15
+ email:
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - lib/phpcode.rb
21
+ - phpcodes/html_xpath_demo.php
22
+ - spec.rb
23
+ homepage:
24
+ licenses: []
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ! '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
+ none: false
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ requirements: []
42
+ rubyforge_project:
43
+ rubygems_version: 1.8.23
44
+ signing_key:
45
+ specification_version: 3
46
+ summary: personal useful php codes
47
+ test_files: []
48
+ has_rdoc: