Skip to content

Commit 6dc066a

Browse files
Initial commit
0 parents  commit 6dc066a

File tree

344 files changed

+45228
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

344 files changed

+45228
-0
lines changed

Diff for: .gitignore

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## dependency files
2+
#
3+
front/index.php
4+
front/testAPI4wsdl.php
5+
front/ext/lookup.html
6+
front/ext/tensocom_plugin.html
7+
front/ext/tensocom_plugin_test.html
8+
front/js/tensocom_plugin.js
9+
front/js/tensocom_plugin_test.js
10+
lib/api_cooperation.inc.php
11+
lib/class.php
12+
lib/conf.inc.php
13+
lib/credit.inc.php
14+
lib/decideLang.class.php
15+
lib/scutum_ip.php
16+
lib/db_connect.ini
17+
lib/mp/default.inc.php
18+
lib/paypal_mod/constants.php
19+
lib/properties/sysadmin.inc.php
20+
smarty/templates/admin/jp/default/new_baggage_edit_done.html
21+
22+
23+
## develop on php
24+
#
25+
# smarty
26+
smarty/templates_c/*
27+
!smarty/templates_c/.gitkeep
28+
29+
# application log
30+
log
31+
!log/.gitkeep
32+
33+
## develop
34+
#
35+
# ruby gems
36+
vendor/bundle
37+
38+
# sass
39+
.sass-cache

Diff for: BlogApplication.php

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
<?php
2+
3+
/**
4+
* BlogApplication
5+
*/
6+
class BlogApplication extends HumperApplication {
7+
8+
public function getRootDir() {
9+
# application root directory
10+
return dirname(__FILE__).'/app';
11+
}
12+
public function getLibraryDir() {
13+
# application Library directory
14+
return dirname(__FILE__).'/lib';
15+
}
16+
public function getConfigDir() {
17+
# application root directory
18+
return dirname(__FILE__).'/config';
19+
}
20+
21+
protected function registerRoutes() {
22+
# define routing
23+
#
24+
# 'http_method;path'
25+
# => array('controller' => 'controller_name', 'action' => 'method_name'),
26+
#
27+
# e.g.
28+
# show user list:
29+
# 'GET;/users' => array('controller' => 'users', 'action' => 'index'),
30+
#
31+
return array(
32+
# root path
33+
# 'GET;/'
34+
# => array('controller' => 'posts', 'action' => 'index'),
35+
36+
'GET;/'
37+
=> array('controller' => 'posts', 'action' => 'index'),
38+
'GET;/posts'
39+
=> array('controller' => 'posts', 'action' => 'index'),
40+
'GET;/posts/add'
41+
=> array('controller' => 'posts', 'action' => 'add'),
42+
'GET;/posts/:id'
43+
=> array('controller' => 'posts', 'action' => 'show'),
44+
'GET;/posts/:id/edit'
45+
=> array('controller' => 'posts', 'action' => 'edit'),
46+
'POST;/posts/:id'
47+
=> array('controller' => 'posts', 'action' => 'create'),
48+
'PUT;/posts/:id'
49+
=> array('controller' => 'posts', 'action' => 'update'),
50+
'DELETE;/posts/:id'
51+
=> array('controller' => 'posts', 'action' => 'delete'),
52+
53+
# with language path
54+
'GET;/:lang/posts'
55+
=> array('controller' => 'posts', 'action' => 'index'),
56+
'GET;/:lang/posts/add'
57+
=> array('controller' => 'posts', 'action' => 'add'),
58+
'GET;/:lang/posts/:id'
59+
=> array('controller' => 'posts', 'action' => 'show'),
60+
'GET;/:lang/posts/:id/edit'
61+
=> array('controller' => 'posts', 'action' => 'edit'),
62+
'POST;/:lang/posts/:id'
63+
=> array('controller' => 'posts', 'action' => 'create'),
64+
'PUT;/:lang/posts/:id'
65+
=> array('controller' => 'posts', 'action' => 'update'),
66+
'DELETE;/:lang/posts/:id'
67+
=> array('controller' => 'posts', 'action' => 'delete'),
68+
69+
);
70+
}
71+
72+
protected function configure() {
73+
74+
# security component
75+
#
76+
# use for csrf generating key
77+
$this->security_component->setSecretKeyBase('d803d80e195dc30189203eeb0d0129b4f34ab9d26cc5014ddf752b9bc6274fb3675fec242b1b55052136ec56a9ee14dba288afe3cb8a39316828706664a6e1df');
78+
79+
# i18n component
80+
#
81+
# set default language
82+
$this->i18n_component->setDefaultLanguage('en');
83+
84+
# auth component setting
85+
#
86+
# redirect : 'url'
87+
# action : ('controller_name', 'action_name')
88+
#
89+
$this->auth_component->setRootDir('/');
90+
91+
# orm initialize
92+
#
93+
# logging
94+
# ON : setLoggingMode(true, dirname(__FILE__).'/log');
95+
# OFF: setLoggingMode(false);
96+
HumperDbConfig::setLoggingMode(false);
97+
HumperDbConfig::initialize(true);
98+
HumperDbConfig::setConnection(
99+
# database name
100+
'blog',
101+
array(
102+
'dsn' => 'mysql:dbname=blog;host=localhost;unix_socket=/opt/boxen/data/mysql/socket',
103+
'user' => 'root',
104+
'password' => 'root',
105+
)
106+
);
107+
108+
}
109+
}
110+

Diff for: Gemfile

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
source 'https://rubygems.org'
2+
3+
group :development do
4+
# assets
5+
gem 'sass'
6+
gem 'compass'
7+
gem 'coffee-script'
8+
gem 'uglifier'
9+
# gem 'juicer'
10+
11+
# task runner
12+
gem 'guard'
13+
gem 'guard-compass'
14+
gem 'guard-coffeescript'
15+
# gem 'guard-uglify'
16+
# gem 'guard-livereload'
17+
18+
# debug
19+
gem 'tapp'
20+
gem 'pry'
21+
end
22+
23+
group :development, :test do
24+
gem 'rake'
25+
gem 'rspec'
26+
gem 'capybara'
27+
gem 'poltergeist'
28+
29+
# task runner
30+
gem 'guard-phpunit2', git: '[email protected]:ae06710/guard-phpunit2.git'
31+
end

Diff for: Gemfile.lock

+129
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
GIT
2+
remote: [email protected]:ae06710/guard-phpunit2.git
3+
revision: b9a4f9bdc0de1ec9e112ac6b418056ee012c675c
4+
specs:
5+
guard-phpunit2 (0.2.3)
6+
guard (~> 1.1)
7+
8+
GEM
9+
remote: https://rubygems.org/
10+
specs:
11+
bootstrap-sass (3.0.1.0.rc)
12+
sass (~> 3.2)
13+
capybara (2.1.0)
14+
mime-types (>= 1.16)
15+
nokogiri (>= 1.3.3)
16+
rack (>= 1.0.0)
17+
rack-test (>= 0.5.4)
18+
xpath (~> 2.0)
19+
chunky_png (1.2.9)
20+
cliver (0.2.2)
21+
coderay (1.0.9)
22+
coffee-script (2.2.0)
23+
coffee-script-source
24+
execjs
25+
coffee-script-source (1.6.3)
26+
compass (0.12.2)
27+
chunky_png (~> 1.2)
28+
fssm (>= 0.2.7)
29+
sass (~> 3.1)
30+
diff-lcs (1.2.5)
31+
execjs (2.0.2)
32+
ffi (1.9.0)
33+
formatador (0.2.4)
34+
fssm (0.2.10)
35+
guard (1.8.3)
36+
formatador (>= 0.2.4)
37+
listen (~> 1.3)
38+
lumberjack (>= 1.0.2)
39+
pry (>= 0.9.10)
40+
thor (>= 0.14.6)
41+
guard-coffeescript (1.3.4)
42+
coffee-script (>= 2.2.0)
43+
guard (>= 1.1.0)
44+
guard-compass (0.0.8)
45+
compass (>= 0.10.5)
46+
guard (>= 1.8)
47+
guard-haml (0.5)
48+
guard (>= 1.1)
49+
haml (>= 3.0)
50+
haml (4.0.3)
51+
tilt
52+
listen (1.3.1)
53+
rb-fsevent (>= 0.9.3)
54+
rb-inotify (>= 0.9)
55+
rb-kqueue (>= 0.2)
56+
lumberjack (1.0.4)
57+
method_source (0.8.2)
58+
mime-types (2.0)
59+
mini_portile (0.5.2)
60+
multi_json (1.8.2)
61+
nokogiri (1.6.0)
62+
mini_portile (~> 0.5.0)
63+
poltergeist (1.4.1)
64+
capybara (~> 2.1.0)
65+
cliver (~> 0.2.1)
66+
multi_json (~> 1.0)
67+
websocket-driver (>= 0.2.0)
68+
pry (0.9.12.2)
69+
coderay (~> 1.0.5)
70+
method_source (~> 0.8)
71+
slop (~> 3.4)
72+
pry-nav (0.2.3)
73+
pry (~> 0.9.10)
74+
rack (1.5.2)
75+
rack-test (0.6.2)
76+
rack (>= 1.0)
77+
rake (10.1.0)
78+
rb-fsevent (0.9.3)
79+
rb-inotify (0.9.2)
80+
ffi (>= 0.5.0)
81+
rb-kqueue (0.2.0)
82+
ffi (>= 0.5.0)
83+
rspec (2.14.1)
84+
rspec-core (~> 2.14.0)
85+
rspec-expectations (~> 2.14.0)
86+
rspec-mocks (~> 2.14.0)
87+
rspec-core (2.14.7)
88+
rspec-expectations (2.14.4)
89+
diff-lcs (>= 1.1.3, < 2.0)
90+
rspec-mocks (2.14.4)
91+
sass (3.2.12)
92+
slim (2.0.1)
93+
temple (~> 0.6.6)
94+
tilt (>= 1.3.3, < 2.1)
95+
slop (3.4.6)
96+
tapp (1.4.0)
97+
thor
98+
temple (0.6.7)
99+
thor (0.18.1)
100+
tilt (1.4.1)
101+
uglifier (2.2.1)
102+
execjs (>= 0.3.0)
103+
multi_json (~> 1.0, >= 1.0.2)
104+
websocket-driver (0.3.0)
105+
xpath (2.0.0)
106+
nokogiri (~> 1.3)
107+
108+
PLATFORMS
109+
ruby
110+
111+
DEPENDENCIES
112+
bootstrap-sass (~> 3.0.1.0.rc)
113+
capybara
114+
coffee-script
115+
compass
116+
guard
117+
guard-coffeescript
118+
guard-compass
119+
guard-haml
120+
guard-phpunit2!
121+
poltergeist
122+
pry
123+
pry-nav
124+
rake
125+
rspec
126+
sass
127+
slim
128+
tapp
129+
uglifier

Diff for: Guardfile

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# A sample Guardfile
2+
# More info at https://github.com/guard/guard#readme
3+
4+
require 'tapp'
5+
require 'pry'
6+
7+
guard :phpunit2, tests_path: 'test/unit', all_on_start: false, notification: false do
8+
# Watch tests files
9+
watch(%r{.+/(.+Test).php$}) { |m| "#{m[1]} #{m[0]}" }
10+
11+
# Watch library files and run their tests
12+
watch(%r{.+/(.+).php$}) { |m| "#{m[1]}Test test/unit/#{m[0].gsub(%r{\.php}, "Test.php")}" }
13+
end
14+
15+
16+
# Guard::Compass
17+
guard :compass, configuration_file: 'config/compass.rb' do
18+
watch(%r{^app/assets\/sass\/(.*)\.sass})
19+
end
20+
21+
# Guard::CoffeeScript
22+
guard :coffeescript, bare: true, input: 'app/assets/coffeescripts', output: 'app/assets/javascripts' do
23+
watch(%r{^app/assets/coffeescripts/front/(.*).js})
24+
end
25+

0 commit comments

Comments
 (0)