spellbook 0.2.0 → 0.2.2
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/Gemfile +5 -1
- data/Gemfile.lock +48 -4
- data/History.txt +9 -0
- data/Rakefile +2 -24
- data/VERSION +1 -1
- data/lib/spellbook/server.rb +8 -4
- data/lib/spellbook/version.rb +4 -0
- data/lib/spellbook.rb +1 -4
- data/spec/server_spec.rb +1 -1
- data/spellbook.gemspec +35 -0
- metadata +207 -224
- data/examples/rails_hello/app/controllers/application_controller.rb +0 -3
- data/examples/rails_hello/app/controllers/top_controller.rb +0 -5
- data/examples/rails_hello/app/helpers/application_helper.rb +0 -2
- data/examples/rails_hello/config/application.rb +0 -42
- data/examples/rails_hello/config/boot.rb +0 -6
- data/examples/rails_hello/config/environment.rb +0 -5
- data/examples/rails_hello/config/environments/development.rb +0 -26
- data/examples/rails_hello/config/environments/production.rb +0 -50
- data/examples/rails_hello/config/environments/test.rb +0 -35
- data/examples/rails_hello/config/initializers/backtrace_silencers.rb +0 -7
- data/examples/rails_hello/config/initializers/inflections.rb +0 -10
- data/examples/rails_hello/config/initializers/mime_types.rb +0 -5
- data/examples/rails_hello/config/initializers/secret_token.rb +0 -7
- data/examples/rails_hello/config/initializers/session_store.rb +0 -8
- data/examples/rails_hello/config/routes.rb +0 -60
- data/examples/rails_hello/db/seeds.rb +0 -7
- data/examples/rails_hello/main.rb +0 -76
- data/examples/rails_hello/test/performance/browsing_test.rb +0 -9
- data/examples/rails_hello/test/test_helper.rb +0 -13
data/Gemfile
CHANGED
@@ -2,10 +2,12 @@ source 'http://rubygems.org'
|
|
2
2
|
|
3
3
|
gem 'sinatra', '>= 1.2'
|
4
4
|
gem 'sinatra-activerecord', '0.1.3'
|
5
|
+
gem 'activerecord', '>= 3.0'
|
5
6
|
gem 'slim'
|
6
7
|
gem 'sass'
|
7
8
|
gem 'childprocess'
|
8
9
|
gem 'slop'
|
10
|
+
gem 'rack-proxy'
|
9
11
|
|
10
12
|
# Bundle edge Rails instead:
|
11
13
|
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
@@ -18,7 +20,9 @@ group :development do
|
|
18
20
|
end
|
19
21
|
|
20
22
|
group :test do
|
21
|
-
gem 'rspec'
|
23
|
+
gem 'rspec', '>= 2.0'
|
24
|
+
gem 'rack-test'
|
25
|
+
gem 'capybara'
|
22
26
|
end
|
23
27
|
|
24
28
|
# Use unicorn as the web server
|
data/Gemfile.lock
CHANGED
@@ -1,17 +1,48 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
+
activemodel (3.0.7)
|
5
|
+
activesupport (= 3.0.7)
|
6
|
+
builder (~> 2.1.2)
|
7
|
+
i18n (~> 0.5.0)
|
8
|
+
activerecord (3.0.7)
|
9
|
+
activemodel (= 3.0.7)
|
10
|
+
activesupport (= 3.0.7)
|
11
|
+
arel (~> 2.0.2)
|
12
|
+
tzinfo (~> 0.3.23)
|
13
|
+
activesupport (3.0.7)
|
14
|
+
arel (2.0.9)
|
4
15
|
backports (2.1.0)
|
16
|
+
builder (2.1.2)
|
17
|
+
capybara (0.4.1.2)
|
18
|
+
celerity (>= 0.7.9)
|
19
|
+
culerity (>= 0.2.4)
|
20
|
+
mime-types (>= 1.16)
|
21
|
+
nokogiri (>= 1.3.3)
|
22
|
+
rack (>= 1.0.0)
|
23
|
+
rack-test (>= 0.5.4)
|
24
|
+
selenium-webdriver (>= 0.0.27)
|
25
|
+
xpath (~> 0.1.3)
|
26
|
+
celerity (0.8.9)
|
5
27
|
childprocess (0.1.8)
|
6
28
|
ffi (~> 1.0.6)
|
7
|
-
|
29
|
+
culerity (0.2.15)
|
30
|
+
daemons (1.1.2)
|
8
31
|
diff-lcs (1.1.2)
|
9
32
|
eventmachine (0.12.10)
|
10
33
|
ffi (1.0.7)
|
11
34
|
rake (>= 0.8.7)
|
35
|
+
i18n (0.5.0)
|
36
|
+
json_pure (1.5.1)
|
37
|
+
mime-types (1.16)
|
12
38
|
monkey-lib (0.5.4)
|
13
39
|
backports
|
40
|
+
nokogiri (1.4.4)
|
14
41
|
rack (1.2.2)
|
42
|
+
rack-proxy (0.3.4)
|
43
|
+
rack
|
44
|
+
rack-test (0.5.7)
|
45
|
+
rack (>= 1.0)
|
15
46
|
rake (0.8.7)
|
16
47
|
rspec (2.5.0)
|
17
48
|
rspec-core (~> 2.5.0)
|
@@ -21,10 +52,16 @@ GEM
|
|
21
52
|
rspec-expectations (2.5.0)
|
22
53
|
diff-lcs (~> 1.1.2)
|
23
54
|
rspec-mocks (2.5.0)
|
24
|
-
|
55
|
+
rubyzip (0.9.4)
|
56
|
+
sass (3.1.0.alpha.256)
|
57
|
+
selenium-webdriver (0.1.4)
|
58
|
+
childprocess (>= 0.1.7)
|
59
|
+
ffi (>= 1.0.7)
|
60
|
+
json_pure
|
61
|
+
rubyzip
|
25
62
|
sinatra (1.2.3)
|
26
63
|
rack (~> 1.1)
|
27
|
-
tilt (
|
64
|
+
tilt (< 2.0, >= 1.2.2)
|
28
65
|
sinatra-activerecord (0.1.3)
|
29
66
|
sinatra (>= 0.9.4)
|
30
67
|
sinatra-advanced-routes (0.5.1)
|
@@ -48,13 +85,20 @@ GEM
|
|
48
85
|
eventmachine (>= 0.12.6)
|
49
86
|
rack (>= 1.0.0)
|
50
87
|
tilt (1.2.2)
|
88
|
+
tzinfo (0.3.26)
|
89
|
+
xpath (0.1.3)
|
90
|
+
nokogiri (~> 1.3)
|
51
91
|
|
52
92
|
PLATFORMS
|
53
93
|
ruby
|
54
94
|
|
55
95
|
DEPENDENCIES
|
96
|
+
activerecord (>= 3.0)
|
97
|
+
capybara
|
56
98
|
childprocess
|
57
|
-
|
99
|
+
rack-proxy
|
100
|
+
rack-test
|
101
|
+
rspec (>= 2.0)
|
58
102
|
sass
|
59
103
|
sinatra (>= 1.2)
|
60
104
|
sinatra-activerecord (= 0.1.3)
|
data/History.txt
ADDED
data/Rakefile
CHANGED
@@ -9,27 +9,5 @@ end
|
|
9
9
|
#
|
10
10
|
# Rakefile to creating gems
|
11
11
|
#
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
require 'jeweler'
|
16
|
-
|
17
|
-
Jeweler::Tasks.new do |gemspec|
|
18
|
-
gemspec.name = "#{PROJECT_NAME}"
|
19
|
-
gemspec.summary = "Launcher for browser-based desktop applications "
|
20
|
-
gemspec.email = "yutaka.hara/at/gmail.com"
|
21
|
-
gemspec.homepage = "http://github.com/yhara/#{PROJECT_NAME}"
|
22
|
-
gemspec.description = gemspec.summary
|
23
|
-
gemspec.authors = ["Yutaka HARA"]
|
24
|
-
gemspec.add_dependency('sinatra', '>= 1.2')
|
25
|
-
gemspec.add_dependency('sinatra-activerecord', '= 0.1.3')
|
26
|
-
gemspec.add_dependency('sqlite3')
|
27
|
-
gemspec.add_dependency('slim')
|
28
|
-
gemspec.add_dependency('sass')
|
29
|
-
gemspec.add_dependency('childprocess')
|
30
|
-
gemspec.add_development_dependency('rspec', '>= 2.0')
|
31
|
-
gemspec.add_development_dependency('sinatra-reloader')
|
32
|
-
gemspec.add_development_dependency('thin')
|
33
|
-
gemspec.executables = ["spellbook"]
|
34
|
-
end
|
35
|
-
|
12
|
+
require 'bundler'
|
13
|
+
Bundler::GemHelper.install_tasks
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/lib/spellbook/server.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'tempfile'
|
2
2
|
require 'sinatra/base'
|
3
3
|
require 'slim'
|
4
|
+
require 'sass'
|
4
5
|
require 'childprocess'
|
5
6
|
|
6
7
|
module SpellBook
|
@@ -47,7 +48,7 @@ module SpellBook
|
|
47
48
|
|
48
49
|
ActiveRecord::Base.establish_connection(
|
49
50
|
:adapter => "sqlite3",
|
50
|
-
:database => path
|
51
|
+
:database => path
|
51
52
|
)
|
52
53
|
ActiveRecord::Migrator.migrate(SpellBook.path_to('db/migrate'))
|
53
54
|
|
@@ -139,9 +140,12 @@ module SpellBook
|
|
139
140
|
get '/spellbook/apps/:name/start' do
|
140
141
|
app = find_app(params[:name])
|
141
142
|
|
142
|
-
|
143
|
-
|
144
|
-
|
143
|
+
cmd = app.command.split + [
|
144
|
+
"--port", app.port.to_s,
|
145
|
+
"--prefix", "/#{app.name}"
|
146
|
+
]
|
147
|
+
process = ChildProcess.build(*cmd)
|
148
|
+
|
145
149
|
Server.processes[app.id] = process
|
146
150
|
|
147
151
|
tempfile = Tempfile.new("spellbook")
|
data/lib/spellbook.rb
CHANGED
data/spec/server_spec.rb
CHANGED
data/spellbook.gemspec
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
$:.push File.expand_path("../lib", __FILE__)
|
2
|
+
require "spellbook/version"
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "spellbook"
|
6
|
+
s.version = SpellBook::VERSION
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
s.authors = ["Yutaka HARA"]
|
9
|
+
s.email = ["yutaka.hara.gmail.com"]
|
10
|
+
s.homepage = "http://github.com/yhara/spellbook/"
|
11
|
+
s.summary = %q{Launcher for browser-based desktop applications}
|
12
|
+
s.description = s.summary
|
13
|
+
|
14
|
+
s.files = `git ls-files`.split("\n")
|
15
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
|
+
s.require_paths = ["lib"]
|
18
|
+
|
19
|
+
s.add_dependency('activerecord', '>= 3.0')
|
20
|
+
s.add_dependency('sinatra', '>= 1.2')
|
21
|
+
s.add_dependency('sinatra-activerecord', '= 0.1.3')
|
22
|
+
s.add_dependency('sqlite3')
|
23
|
+
s.add_dependency('slim')
|
24
|
+
s.add_dependency('slop')
|
25
|
+
s.add_dependency('sass')
|
26
|
+
s.add_dependency('rack-proxy')
|
27
|
+
s.add_dependency('childprocess')
|
28
|
+
|
29
|
+
s.add_development_dependency('capybara')
|
30
|
+
s.add_development_dependency('thin')
|
31
|
+
s.add_development_dependency('rack-test')
|
32
|
+
s.add_development_dependency('rspec', '>= 2.0')
|
33
|
+
s.add_development_dependency('sinatra-reloader')
|
34
|
+
end
|
35
|
+
|
metadata
CHANGED
@@ -1,226 +1,237 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: spellbook
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
- 2
|
10
|
+
version: 0.2.2
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Yutaka HARA
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
none: false
|
19
|
-
requirements:
|
20
|
-
- - ! '>='
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '1.2'
|
23
|
-
type: :runtime
|
17
|
+
|
18
|
+
date: 2011-05-06 00:00:00 +09:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: activerecord
|
24
23
|
prerelease: false
|
25
|
-
|
26
|
-
- !ruby/object:Gem::Dependency
|
27
|
-
name: sinatra-activerecord
|
28
|
-
requirement: &1533530 !ruby/object:Gem::Requirement
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
29
25
|
none: false
|
30
|
-
requirements:
|
31
|
-
- -
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
name: slim
|
39
|
-
requirement: &1532010 !ruby/object:Gem::Requirement
|
40
|
-
none: false
|
41
|
-
requirements:
|
42
|
-
- - ! '>='
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version: '0'
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 7
|
30
|
+
segments:
|
31
|
+
- 3
|
32
|
+
- 0
|
33
|
+
version: "3.0"
|
45
34
|
type: :runtime
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: sinatra
|
46
38
|
prerelease: false
|
47
|
-
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: sass
|
50
|
-
requirement: &1530810 !ruby/object:Gem::Requirement
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
51
40
|
none: false
|
52
|
-
requirements:
|
53
|
-
- -
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 11
|
45
|
+
segments:
|
46
|
+
- 1
|
47
|
+
- 2
|
48
|
+
version: "1.2"
|
56
49
|
type: :runtime
|
50
|
+
version_requirements: *id002
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
name: sinatra-activerecord
|
57
53
|
prerelease: false
|
58
|
-
|
59
|
-
- !ruby/object:Gem::Dependency
|
60
|
-
name: childprocess
|
61
|
-
requirement: &1527870 !ruby/object:Gem::Requirement
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
62
55
|
none: false
|
63
|
-
requirements:
|
64
|
-
- -
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
|
56
|
+
requirements:
|
57
|
+
- - "="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 29
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
- 1
|
63
|
+
- 3
|
64
|
+
version: 0.1.3
|
67
65
|
type: :runtime
|
66
|
+
version_requirements: *id003
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: sqlite3
|
68
69
|
prerelease: false
|
69
|
-
|
70
|
-
- !ruby/object:Gem::Dependency
|
71
|
-
name: slop
|
72
|
-
requirement: &1464820 !ruby/object:Gem::Requirement
|
70
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
73
71
|
none: false
|
74
|
-
requirements:
|
75
|
-
- -
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
hash: 3
|
76
|
+
segments:
|
77
|
+
- 0
|
78
|
+
version: "0"
|
78
79
|
type: :runtime
|
80
|
+
version_requirements: *id004
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: slim
|
79
83
|
prerelease: false
|
80
|
-
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: sqlite3
|
83
|
-
requirement: &1463390 !ruby/object:Gem::Requirement
|
84
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
84
85
|
none: false
|
85
|
-
requirements:
|
86
|
-
- -
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
hash: 3
|
90
|
+
segments:
|
91
|
+
- 0
|
92
|
+
version: "0"
|
89
93
|
type: :runtime
|
94
|
+
version_requirements: *id005
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: slop
|
90
97
|
prerelease: false
|
91
|
-
|
92
|
-
- !ruby/object:Gem::Dependency
|
93
|
-
name: sinatra-reloader
|
94
|
-
requirement: &1439700 !ruby/object:Gem::Requirement
|
95
|
-
none: false
|
96
|
-
requirements:
|
97
|
-
- - ! '>='
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version: '0'
|
100
|
-
type: :development
|
101
|
-
prerelease: false
|
102
|
-
version_requirements: *1439700
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: thin
|
105
|
-
requirement: &1438530 !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
|
-
requirements:
|
108
|
-
- - ! '>='
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
type: :development
|
112
|
-
prerelease: false
|
113
|
-
version_requirements: *1438530
|
114
|
-
- !ruby/object:Gem::Dependency
|
115
|
-
name: sinatra
|
116
|
-
requirement: &1437580 !ruby/object:Gem::Requirement
|
98
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
117
99
|
none: false
|
118
|
-
requirements:
|
119
|
-
- -
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
hash: 3
|
104
|
+
segments:
|
105
|
+
- 0
|
106
|
+
version: "0"
|
122
107
|
type: :runtime
|
108
|
+
version_requirements: *id006
|
109
|
+
- !ruby/object:Gem::Dependency
|
110
|
+
name: sass
|
123
111
|
prerelease: false
|
124
|
-
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: sinatra-activerecord
|
127
|
-
requirement: &1434710 !ruby/object:Gem::Requirement
|
112
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
128
113
|
none: false
|
129
|
-
requirements:
|
130
|
-
- -
|
131
|
-
- !ruby/object:Gem::Version
|
132
|
-
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
hash: 3
|
118
|
+
segments:
|
119
|
+
- 0
|
120
|
+
version: "0"
|
133
121
|
type: :runtime
|
122
|
+
version_requirements: *id007
|
123
|
+
- !ruby/object:Gem::Dependency
|
124
|
+
name: rack-proxy
|
134
125
|
prerelease: false
|
135
|
-
|
136
|
-
- !ruby/object:Gem::Dependency
|
137
|
-
name: sqlite3
|
138
|
-
requirement: &1433890 !ruby/object:Gem::Requirement
|
126
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
139
127
|
none: false
|
140
|
-
requirements:
|
141
|
-
- -
|
142
|
-
- !ruby/object:Gem::Version
|
143
|
-
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
hash: 3
|
132
|
+
segments:
|
133
|
+
- 0
|
134
|
+
version: "0"
|
144
135
|
type: :runtime
|
136
|
+
version_requirements: *id008
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: childprocess
|
145
139
|
prerelease: false
|
146
|
-
|
147
|
-
- !ruby/object:Gem::Dependency
|
148
|
-
name: slim
|
149
|
-
requirement: &1431740 !ruby/object:Gem::Requirement
|
140
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
150
141
|
none: false
|
151
|
-
requirements:
|
152
|
-
- -
|
153
|
-
- !ruby/object:Gem::Version
|
154
|
-
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
hash: 3
|
146
|
+
segments:
|
147
|
+
- 0
|
148
|
+
version: "0"
|
155
149
|
type: :runtime
|
150
|
+
version_requirements: *id009
|
151
|
+
- !ruby/object:Gem::Dependency
|
152
|
+
name: capybara
|
156
153
|
prerelease: false
|
157
|
-
|
158
|
-
- !ruby/object:Gem::Dependency
|
159
|
-
name: sass
|
160
|
-
requirement: &1430670 !ruby/object:Gem::Requirement
|
154
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
161
155
|
none: false
|
162
|
-
requirements:
|
163
|
-
- -
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
|
166
|
-
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
hash: 3
|
160
|
+
segments:
|
161
|
+
- 0
|
162
|
+
version: "0"
|
163
|
+
type: :development
|
164
|
+
version_requirements: *id010
|
165
|
+
- !ruby/object:Gem::Dependency
|
166
|
+
name: thin
|
167
167
|
prerelease: false
|
168
|
-
|
169
|
-
- !ruby/object:Gem::Dependency
|
170
|
-
name: childprocess
|
171
|
-
requirement: &1429750 !ruby/object:Gem::Requirement
|
168
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
172
169
|
none: false
|
173
|
-
requirements:
|
174
|
-
- -
|
175
|
-
- !ruby/object:Gem::Version
|
176
|
-
|
177
|
-
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
hash: 3
|
174
|
+
segments:
|
175
|
+
- 0
|
176
|
+
version: "0"
|
177
|
+
type: :development
|
178
|
+
version_requirements: *id011
|
179
|
+
- !ruby/object:Gem::Dependency
|
180
|
+
name: rack-test
|
178
181
|
prerelease: false
|
179
|
-
|
180
|
-
- !ruby/object:Gem::Dependency
|
181
|
-
name: rspec
|
182
|
-
requirement: &1428730 !ruby/object:Gem::Requirement
|
182
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
183
183
|
none: false
|
184
|
-
requirements:
|
185
|
-
- -
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
hash: 3
|
188
|
+
segments:
|
189
|
+
- 0
|
190
|
+
version: "0"
|
188
191
|
type: :development
|
192
|
+
version_requirements: *id012
|
193
|
+
- !ruby/object:Gem::Dependency
|
194
|
+
name: rspec
|
189
195
|
prerelease: false
|
190
|
-
|
191
|
-
- !ruby/object:Gem::Dependency
|
192
|
-
name: sinatra-reloader
|
193
|
-
requirement: &1425800 !ruby/object:Gem::Requirement
|
196
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
194
197
|
none: false
|
195
|
-
requirements:
|
196
|
-
- -
|
197
|
-
- !ruby/object:Gem::Version
|
198
|
-
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
hash: 3
|
202
|
+
segments:
|
203
|
+
- 2
|
204
|
+
- 0
|
205
|
+
version: "2.0"
|
199
206
|
type: :development
|
207
|
+
version_requirements: *id013
|
208
|
+
- !ruby/object:Gem::Dependency
|
209
|
+
name: sinatra-reloader
|
200
210
|
prerelease: false
|
201
|
-
|
202
|
-
- !ruby/object:Gem::Dependency
|
203
|
-
name: thin
|
204
|
-
requirement: &1412680 !ruby/object:Gem::Requirement
|
211
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
205
212
|
none: false
|
206
|
-
requirements:
|
207
|
-
- -
|
208
|
-
- !ruby/object:Gem::Version
|
209
|
-
|
213
|
+
requirements:
|
214
|
+
- - ">="
|
215
|
+
- !ruby/object:Gem::Version
|
216
|
+
hash: 3
|
217
|
+
segments:
|
218
|
+
- 0
|
219
|
+
version: "0"
|
210
220
|
type: :development
|
211
|
-
|
212
|
-
version_requirements: *1412680
|
221
|
+
version_requirements: *id014
|
213
222
|
description: Launcher for browser-based desktop applications
|
214
|
-
email:
|
215
|
-
|
223
|
+
email:
|
224
|
+
- yutaka.hara.gmail.com
|
225
|
+
executables:
|
216
226
|
- spellbook
|
217
227
|
extensions: []
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
files:
|
228
|
+
|
229
|
+
extra_rdoc_files: []
|
230
|
+
|
231
|
+
files:
|
222
232
|
- Gemfile
|
223
233
|
- Gemfile.lock
|
234
|
+
- History.txt
|
224
235
|
- README.mkd
|
225
236
|
- Rakefile
|
226
237
|
- TODO
|
@@ -234,6 +245,7 @@ files:
|
|
234
245
|
- lib/spellbook/app.rb
|
235
246
|
- lib/spellbook/proxy.rb
|
236
247
|
- lib/spellbook/server.rb
|
248
|
+
- lib/spellbook/version.rb
|
237
249
|
- lib/spellbook/views/apps_edit.slim
|
238
250
|
- lib/spellbook/views/apps_index.slim
|
239
251
|
- lib/spellbook/views/apps_new.slim
|
@@ -245,71 +257,42 @@ files:
|
|
245
257
|
- spec/database_spec.rb
|
246
258
|
- spec/server_spec.rb
|
247
259
|
- spec/spec_helper.rb
|
248
|
-
-
|
249
|
-
- examples/rails_hello/app/controllers/top_controller.rb
|
250
|
-
- examples/rails_hello/app/helpers/application_helper.rb
|
251
|
-
- examples/rails_hello/config/application.rb
|
252
|
-
- examples/rails_hello/config/boot.rb
|
253
|
-
- examples/rails_hello/config/environment.rb
|
254
|
-
- examples/rails_hello/config/environments/development.rb
|
255
|
-
- examples/rails_hello/config/environments/production.rb
|
256
|
-
- examples/rails_hello/config/environments/test.rb
|
257
|
-
- examples/rails_hello/config/initializers/backtrace_silencers.rb
|
258
|
-
- examples/rails_hello/config/initializers/inflections.rb
|
259
|
-
- examples/rails_hello/config/initializers/mime_types.rb
|
260
|
-
- examples/rails_hello/config/initializers/secret_token.rb
|
261
|
-
- examples/rails_hello/config/initializers/session_store.rb
|
262
|
-
- examples/rails_hello/config/routes.rb
|
263
|
-
- examples/rails_hello/db/seeds.rb
|
264
|
-
- examples/rails_hello/main.rb
|
265
|
-
- examples/rails_hello/test/performance/browsing_test.rb
|
266
|
-
- examples/rails_hello/test/test_helper.rb
|
260
|
+
- spellbook.gemspec
|
267
261
|
has_rdoc: true
|
268
|
-
homepage: http://github.com/yhara/spellbook
|
262
|
+
homepage: http://github.com/yhara/spellbook/
|
269
263
|
licenses: []
|
264
|
+
|
270
265
|
post_install_message:
|
271
266
|
rdoc_options: []
|
272
|
-
|
267
|
+
|
268
|
+
require_paths:
|
273
269
|
- lib
|
274
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
270
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
275
271
|
none: false
|
276
|
-
requirements:
|
277
|
-
- -
|
278
|
-
- !ruby/object:Gem::Version
|
279
|
-
|
280
|
-
|
272
|
+
requirements:
|
273
|
+
- - ">="
|
274
|
+
- !ruby/object:Gem::Version
|
275
|
+
hash: 3
|
276
|
+
segments:
|
277
|
+
- 0
|
278
|
+
version: "0"
|
279
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
281
280
|
none: false
|
282
|
-
requirements:
|
283
|
-
- -
|
284
|
-
- !ruby/object:Gem::Version
|
285
|
-
|
281
|
+
requirements:
|
282
|
+
- - ">="
|
283
|
+
- !ruby/object:Gem::Version
|
284
|
+
hash: 3
|
285
|
+
segments:
|
286
|
+
- 0
|
287
|
+
version: "0"
|
286
288
|
requirements: []
|
289
|
+
|
287
290
|
rubyforge_project:
|
288
|
-
rubygems_version: 1.
|
291
|
+
rubygems_version: 1.4.2
|
289
292
|
signing_key:
|
290
293
|
specification_version: 3
|
291
294
|
summary: Launcher for browser-based desktop applications
|
292
|
-
test_files:
|
293
|
-
- examples/rails_hello/app/controllers/application_controller.rb
|
294
|
-
- examples/rails_hello/app/controllers/top_controller.rb
|
295
|
-
- examples/rails_hello/app/helpers/application_helper.rb
|
296
|
-
- examples/rails_hello/config/application.rb
|
297
|
-
- examples/rails_hello/config/boot.rb
|
298
|
-
- examples/rails_hello/config/environment.rb
|
299
|
-
- examples/rails_hello/config/environments/development.rb
|
300
|
-
- examples/rails_hello/config/environments/production.rb
|
301
|
-
- examples/rails_hello/config/environments/test.rb
|
302
|
-
- examples/rails_hello/config/initializers/backtrace_silencers.rb
|
303
|
-
- examples/rails_hello/config/initializers/inflections.rb
|
304
|
-
- examples/rails_hello/config/initializers/mime_types.rb
|
305
|
-
- examples/rails_hello/config/initializers/secret_token.rb
|
306
|
-
- examples/rails_hello/config/initializers/session_store.rb
|
307
|
-
- examples/rails_hello/config/routes.rb
|
308
|
-
- examples/rails_hello/db/seeds.rb
|
309
|
-
- examples/rails_hello/main.rb
|
310
|
-
- examples/rails_hello/test/performance/browsing_test.rb
|
311
|
-
- examples/rails_hello/test/test_helper.rb
|
312
|
-
- examples/sinatra_hello/app.rb
|
295
|
+
test_files:
|
313
296
|
- spec/database_spec.rb
|
314
297
|
- spec/server_spec.rb
|
315
298
|
- spec/spec_helper.rb
|
@@ -1,42 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require 'rails/all'
|
4
|
-
|
5
|
-
# If you have a Gemfile, require the gems listed there, including any gems
|
6
|
-
# you've limited to :test, :development, or :production.
|
7
|
-
Bundler.require(:default, Rails.env) if defined?(Bundler)
|
8
|
-
|
9
|
-
module RailsHello
|
10
|
-
class Application < Rails::Application
|
11
|
-
# Settings in config/environments/* take precedence over those specified here.
|
12
|
-
# Application configuration should go into files in config/initializers
|
13
|
-
# -- all .rb files in that directory are automatically loaded.
|
14
|
-
|
15
|
-
# Custom directories with classes and modules you want to be autoloadable.
|
16
|
-
# config.autoload_paths += %W(#{config.root}/extras)
|
17
|
-
|
18
|
-
# Only load the plugins named here, in the order given (default is alphabetical).
|
19
|
-
# :all can be used as a placeholder for all plugins not explicitly named.
|
20
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
21
|
-
|
22
|
-
# Activate observers that should always be running.
|
23
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
24
|
-
|
25
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
26
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
27
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
28
|
-
|
29
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
30
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
31
|
-
# config.i18n.default_locale = :de
|
32
|
-
|
33
|
-
# JavaScript files you want as :defaults (application.js is always included).
|
34
|
-
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
35
|
-
|
36
|
-
# Configure the default encoding used in templates for Ruby 1.9.
|
37
|
-
config.encoding = "utf-8"
|
38
|
-
|
39
|
-
# Configure sensitive parameters which will be filtered from the log file.
|
40
|
-
config.filter_parameters += [:password]
|
41
|
-
end
|
42
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
RailsHello::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
3
|
-
|
4
|
-
# In the development environment your application's code is reloaded on
|
5
|
-
# every request. This slows down response time but is perfect for development
|
6
|
-
# since you don't have to restart the webserver when you make code changes.
|
7
|
-
config.cache_classes = false
|
8
|
-
|
9
|
-
# Log error messages when you accidentally call methods on nil.
|
10
|
-
config.whiny_nils = true
|
11
|
-
|
12
|
-
# Show full error reports and disable caching
|
13
|
-
config.consider_all_requests_local = true
|
14
|
-
config.action_view.debug_rjs = true
|
15
|
-
config.action_controller.perform_caching = false
|
16
|
-
|
17
|
-
# Don't care if the mailer can't send
|
18
|
-
config.action_mailer.raise_delivery_errors = false
|
19
|
-
|
20
|
-
# Print deprecation notices to the Rails logger
|
21
|
-
config.active_support.deprecation = :log
|
22
|
-
|
23
|
-
# Only use best-standards-support built into browsers
|
24
|
-
config.action_dispatch.best_standards_support = :builtin
|
25
|
-
end
|
26
|
-
|
@@ -1,50 +0,0 @@
|
|
1
|
-
RailsHello::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
3
|
-
|
4
|
-
# The production environment is meant for finished, "live" apps.
|
5
|
-
# Code is not reloaded between requests
|
6
|
-
config.cache_classes = true
|
7
|
-
|
8
|
-
# Full error reports are disabled and caching is turned on
|
9
|
-
config.consider_all_requests_local = false
|
10
|
-
config.action_controller.perform_caching = true
|
11
|
-
|
12
|
-
# Specifies the header that your server uses for sending files
|
13
|
-
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
14
|
-
|
15
|
-
# For nginx:
|
16
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
|
17
|
-
|
18
|
-
# If you have no front-end server that supports something like X-Sendfile,
|
19
|
-
# just comment this out and Rails will serve the files
|
20
|
-
|
21
|
-
# See everything in the log (default is :info)
|
22
|
-
# config.log_level = :debug
|
23
|
-
|
24
|
-
# Use a different logger for distributed setups
|
25
|
-
# config.logger = SyslogLogger.new
|
26
|
-
|
27
|
-
# Use a different cache store in production
|
28
|
-
# config.cache_store = :mem_cache_store
|
29
|
-
|
30
|
-
# Disable Rails's static asset server
|
31
|
-
# In production, Apache or nginx will already do this
|
32
|
-
config.serve_static_assets = false
|
33
|
-
|
34
|
-
# Enable serving of images, stylesheets, and javascripts from an asset server
|
35
|
-
# config.action_controller.asset_host = "http://assets.example.com"
|
36
|
-
|
37
|
-
# Disable delivery errors, bad email addresses will be ignored
|
38
|
-
# config.action_mailer.raise_delivery_errors = false
|
39
|
-
|
40
|
-
# Enable threaded mode
|
41
|
-
# config.threadsafe!
|
42
|
-
|
43
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
44
|
-
# the I18n.default_locale when a translation can not be found)
|
45
|
-
config.i18n.fallbacks = true
|
46
|
-
|
47
|
-
# Send deprecation notices to registered listeners
|
48
|
-
config.active_support.deprecation = :notify
|
49
|
-
end
|
50
|
-
p $pro = :production_rb_loaded
|
@@ -1,35 +0,0 @@
|
|
1
|
-
RailsHello::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
3
|
-
|
4
|
-
# The test environment is used exclusively to run your application's
|
5
|
-
# test suite. You never need to work with it otherwise. Remember that
|
6
|
-
# your test database is "scratch space" for the test suite and is wiped
|
7
|
-
# and recreated between test runs. Don't rely on the data there!
|
8
|
-
config.cache_classes = true
|
9
|
-
|
10
|
-
# Log error messages when you accidentally call methods on nil.
|
11
|
-
config.whiny_nils = true
|
12
|
-
|
13
|
-
# Show full error reports and disable caching
|
14
|
-
config.consider_all_requests_local = true
|
15
|
-
config.action_controller.perform_caching = false
|
16
|
-
|
17
|
-
# Raise exceptions instead of rendering exception templates
|
18
|
-
config.action_dispatch.show_exceptions = false
|
19
|
-
|
20
|
-
# Disable request forgery protection in test environment
|
21
|
-
config.action_controller.allow_forgery_protection = false
|
22
|
-
|
23
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
24
|
-
# The :test delivery method accumulates sent emails in the
|
25
|
-
# ActionMailer::Base.deliveries array.
|
26
|
-
config.action_mailer.delivery_method = :test
|
27
|
-
|
28
|
-
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
29
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
30
|
-
# like if you have constraints or database-specific column types
|
31
|
-
# config.active_record.schema_format = :sql
|
32
|
-
|
33
|
-
# Print deprecation notices to the stderr
|
34
|
-
config.active_support.deprecation = :stderr
|
35
|
-
end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
-
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Add new inflection rules using the following format
|
4
|
-
# (all these examples are active by default):
|
5
|
-
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
-
# inflect.singular /^(ox)en/i, '\1'
|
8
|
-
# inflect.irregular 'person', 'people'
|
9
|
-
# inflect.uncountable %w( fish sheep )
|
10
|
-
# end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
# Make sure the secret is at least 30 characters and all random,
|
6
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
-
RailsHello::Application.config.secret_token = '306a76d5a4e533c2a46cb89f4567fbc4345bfe62165976ae9ad4f45ee7469f17c11cc8f1dc71479d6ab86829db7e68d1f123d45006031856d4ee8509c6edc36a'
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
RailsHello::Application.config.session_store :cookie_store, :key => '_rails_hello_session'
|
4
|
-
|
5
|
-
# Use the database for sessions instead of the cookie-based default,
|
6
|
-
# which shouldn't be used to store highly confidential information
|
7
|
-
# (create the session table with "rails generate session_migration")
|
8
|
-
# RailsHello::Application.config.session_store :active_record_store
|
@@ -1,60 +0,0 @@
|
|
1
|
-
RailsHello::Application.routes.draw do
|
2
|
-
root :to => "top#hello"
|
3
|
-
|
4
|
-
# The priority is based upon order of creation:
|
5
|
-
# first created -> highest priority.
|
6
|
-
|
7
|
-
# Sample of regular route:
|
8
|
-
# match 'products/:id' => 'catalog#view'
|
9
|
-
# Keep in mind you can assign values other than :controller and :action
|
10
|
-
|
11
|
-
# Sample of named route:
|
12
|
-
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
|
13
|
-
# This route can be invoked with purchase_url(:id => product.id)
|
14
|
-
|
15
|
-
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
16
|
-
# resources :products
|
17
|
-
|
18
|
-
# Sample resource route with options:
|
19
|
-
# resources :products do
|
20
|
-
# member do
|
21
|
-
# get 'short'
|
22
|
-
# post 'toggle'
|
23
|
-
# end
|
24
|
-
#
|
25
|
-
# collection do
|
26
|
-
# get 'sold'
|
27
|
-
# end
|
28
|
-
# end
|
29
|
-
|
30
|
-
# Sample resource route with sub-resources:
|
31
|
-
# resources :products do
|
32
|
-
# resources :comments, :sales
|
33
|
-
# resource :seller
|
34
|
-
# end
|
35
|
-
|
36
|
-
# Sample resource route with more complex sub-resources
|
37
|
-
# resources :products do
|
38
|
-
# resources :comments
|
39
|
-
# resources :sales do
|
40
|
-
# get 'recent', :on => :collection
|
41
|
-
# end
|
42
|
-
# end
|
43
|
-
|
44
|
-
# Sample resource route within a namespace:
|
45
|
-
# namespace :admin do
|
46
|
-
# # Directs /admin/products/* to Admin::ProductsController
|
47
|
-
# # (app/controllers/admin/products_controller.rb)
|
48
|
-
# resources :products
|
49
|
-
# end
|
50
|
-
|
51
|
-
# You can have the root of your site routed with "root"
|
52
|
-
# just remember to delete public/index.html.
|
53
|
-
# root :to => "welcome#index"
|
54
|
-
|
55
|
-
# See how all your routes lay out with "rake routes"
|
56
|
-
|
57
|
-
# This is a legacy wild controller route that's not recommended for RESTful applications.
|
58
|
-
# Note: This route will make all actions in every controller accessible via GET requests.
|
59
|
-
# match ':controller(/:action(/:id(.:format)))'
|
60
|
-
end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# This file should contain all the record creation needed to seed the database with its default values.
|
2
|
-
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
3
|
-
#
|
4
|
-
# Examples:
|
5
|
-
#
|
6
|
-
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
|
7
|
-
# Mayor.create(:name => 'Daley', :city => cities.first)
|
@@ -1,76 +0,0 @@
|
|
1
|
-
require 'tempfile'
|
2
|
-
require 'uri'
|
3
|
-
|
4
|
-
#OptionParser.new{|o|
|
5
|
-
# o.on(--url
|
6
|
-
|
7
|
-
=begin
|
8
|
-
Rails 3 'rails server':
|
9
|
-
- rails/bin/rails
|
10
|
-
- railties/lib/rails/cli.rb
|
11
|
-
- railties/lib/rails/script_rails_loader.rb
|
12
|
-
- ./script/rails
|
13
|
-
- ./config/boot.rb
|
14
|
-
require 'bundler/setup'
|
15
|
-
- railties/lib/rails/commands.rb
|
16
|
-
require 'rails/commands/server'
|
17
|
-
require APP_PATH (= config/application.rb)
|
18
|
-
- ./config/application.rb
|
19
|
-
- activerecord/lib/active_record/railtie.rb
|
20
|
-
initializer "active_record.initialize_database"
|
21
|
-
-> paths.config.database
|
22
|
-
server.start
|
23
|
-
|
24
|
-
fmm, it tries to make ./tmp ..
|
25
|
-
=end
|
26
|
-
|
27
|
-
here = File.dirname(__FILE__)
|
28
|
-
|
29
|
-
# Load rails
|
30
|
-
require File.expand_path('./config/boot', here)
|
31
|
-
require 'rails/all'
|
32
|
-
|
33
|
-
# Setup database
|
34
|
-
#data_path = TODO
|
35
|
-
#
|
36
|
-
#conf_path = Tempfile.open("spellbook"){|f|
|
37
|
-
# conf = YAML.load_file(File.expand_path("./config/database.yml",
|
38
|
-
# here))
|
39
|
-
# conf["production"]["database"] = data_path
|
40
|
-
# YAML.dump(conf, f)
|
41
|
-
#}
|
42
|
-
#
|
43
|
-
#RailsHello::Application.configure do
|
44
|
-
# paths.config.database = conf_path
|
45
|
-
#end
|
46
|
-
|
47
|
-
# Migration
|
48
|
-
=begin
|
49
|
-
- rake db:migrate
|
50
|
-
- activerecord/lib/active_record/railties/databases.rake
|
51
|
-
task :migrate => :environment do
|
52
|
-
ActiveRecord::Migration.verbose =
|
53
|
-
ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
|
54
|
-
ActiveRecord::Migrator.migrate("db/migrate/",
|
55
|
-
ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
|
56
|
-
Rake::Task["db:schema:dump"].invoke if
|
57
|
-
ActiveRecord::Base.schema_format == :ruby
|
58
|
-
|
59
|
-
Task :environment is defined here:
|
60
|
-
- railties/lib/rails/application.rb
|
61
|
-
require 'rails/tasks' #=> lib/rails/tasks/*.rake
|
62
|
-
task :environment do
|
63
|
-
$rails_rake_task = true
|
64
|
-
require_environment! #=> config/environments/production.rb?
|
65
|
-
end
|
66
|
-
=end
|
67
|
-
|
68
|
-
#system "rake db:migrate db:seed RAILS_ENV=production"
|
69
|
-
|
70
|
-
# Start rails server
|
71
|
-
ARGV.unshift "server"
|
72
|
-
#ARGV.push "--port=#{RubyStation.port}"
|
73
|
-
ARGV.push "--environment=production"
|
74
|
-
|
75
|
-
APP_PATH = File.expand_path('./config/application', here)
|
76
|
-
require 'rails/commands'
|
@@ -1,13 +0,0 @@
|
|
1
|
-
ENV["RAILS_ENV"] = "test"
|
2
|
-
require File.expand_path('../../config/environment', __FILE__)
|
3
|
-
require 'rails/test_help'
|
4
|
-
|
5
|
-
class ActiveSupport::TestCase
|
6
|
-
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
|
7
|
-
#
|
8
|
-
# Note: You'll currently still have to declare fixtures explicitly in integration tests
|
9
|
-
# -- they do not yet inherit this setting
|
10
|
-
fixtures :all
|
11
|
-
|
12
|
-
# Add more helper methods to be used by all tests here...
|
13
|
-
end
|