welltreat-store-framework 0.2.0
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/README.md +25 -0
- data/lib/generators/flexi_model/install/install_generator.rb +20 -0
- data/lib/generators/flexi_model/install/templates/create_flexi_model_collections.rb +17 -0
- data/lib/generators/flexi_model/install/templates/create_flexi_model_collections_fields.rb +11 -0
- data/lib/generators/flexi_model/install/templates/create_flexi_model_fields.rb +18 -0
- data/lib/generators/flexi_model/install/templates/create_flexi_model_records.rb +12 -0
- data/lib/generators/flexi_model/install/templates/create_flexi_model_values.rb +18 -0
- data/lib/welltreat_store_framework/configuration.rb +17 -0
- data/lib/welltreat_store_framework/controller.rb +131 -0
- data/lib/welltreat_store_framework/core.rb +66 -0
- data/lib/welltreat_store_framework/haml_renderer/lorem_helper.rb +29 -0
- data/lib/welltreat_store_framework/haml_renderer/partial.rb +31 -0
- data/lib/welltreat_store_framework/haml_renderer/paths.rb +51 -0
- data/lib/welltreat_store_framework/haml_renderer/tags_helper.rb +74 -0
- data/lib/welltreat_store_framework/haml_renderer.rb +163 -0
- data/lib/welltreat_store_framework/rack_server.rb +56 -0
- data/lib/welltreat_store_framework/store_app.rb +282 -0
- data/lib/welltreat_store_framework.rb +9 -0
- data/sample/hello-store/assets/javascripts/app.js +1 -0
- data/sample/hello-store/controllers/home.rb +15 -0
- data/sample/hello-store/controllers/products.rb +18 -0
- data/sample/hello-store/models/product.rb +9 -0
- data/sample/hello-store/mount.rb +0 -0
- data/sample/hello-store/views/home/index.haml +14 -0
- data/sample/hello-store/views/layouts/default.html.haml +10 -0
- data/sample/hello-store/views/products/_product.html.haml +1 -0
- data/sample/hello-store/views/products/index.haml +4 -0
- data/sample/hello-store/views/products/show.html.haml +10 -0
- data/spec/fixtures/schema.rb +78 -0
- data/spec/lib/welltreat_store_framework/configuration_spec.rb +5 -0
- data/spec/lib/welltreat_store_framework/core_spec.rb +190 -0
- data/spec/lib/welltreat_store_framework/haml_renderer/context_spec.rb +73 -0
- data/spec/lib/welltreat_store_framework/store_app_spec.rb +85 -0
- data/spec/lib/welltreat_store_framework_spec.rb +5 -0
- data/spec/sample/controllers/products_spec.rb +140 -0
- data/spec/spec_helper/active_record.rb +8 -0
- data/spec/spec_helper/models.rb +0 -0
- data/spec/spec_helper/rspec.rb +3 -0
- data/spec/spec_helper.rb +19 -0
- metadata +129 -0
@@ -0,0 +1,190 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
_DEFAULT_STORE_PATH = File.join(File.dirname(__FILE__), '../../../sample')
|
4
|
+
|
5
|
+
describe WelltreatStoreFramework::Core do
|
6
|
+
|
7
|
+
describe '.setup' do
|
8
|
+
it 'should pass configuration object' do
|
9
|
+
subject.class.setup do |config|
|
10
|
+
config.should be_instance_of WelltreatStoreFramework::Configuration
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should set store_path' do
|
15
|
+
subject.class.setup do |config|
|
16
|
+
config.store_path = 'abcdef'
|
17
|
+
end
|
18
|
+
|
19
|
+
subject.class.configuration.store_path.should == 'abcdef'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe '.find_stores' do
|
24
|
+
before do
|
25
|
+
WelltreatStoreFramework::Core.setup do |config|
|
26
|
+
config.store_path = _DEFAULT_STORE_PATH
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
subject { WelltreatStoreFramework::Core.find_stores }
|
31
|
+
|
32
|
+
it { should be_an Hash }
|
33
|
+
its('values.first') { should be_a WelltreatStoreFramework::StoreApp }
|
34
|
+
end
|
35
|
+
|
36
|
+
describe '.find_store_by_name' do
|
37
|
+
context 'when store exists' do
|
38
|
+
before do
|
39
|
+
WelltreatStoreFramework::Core.setup do |config|
|
40
|
+
config.store_path = _DEFAULT_STORE_PATH
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
subject { WelltreatStoreFramework::Core.find_store_by_name('hello-store') }
|
45
|
+
|
46
|
+
it { should be_a WelltreatStoreFramework::StoreApp }
|
47
|
+
end
|
48
|
+
|
49
|
+
context 'when store does not exist' do
|
50
|
+
before do
|
51
|
+
WelltreatStoreFramework::Core.reset!
|
52
|
+
WelltreatStoreFramework::Core.setup do |config|
|
53
|
+
config.store_path = 'invalid-path'
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
subject { WelltreatStoreFramework::Core.find_store_by_name('hello-store') }
|
58
|
+
|
59
|
+
it { should be_nil }
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
describe WelltreatStoreFramework::StoreApp do
|
64
|
+
before do
|
65
|
+
WelltreatStoreFramework::Core.reset!
|
66
|
+
WelltreatStoreFramework::Core.setup do |config|
|
67
|
+
config.store_path = _DEFAULT_STORE_PATH
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
let(:store) {
|
72
|
+
s = mock()
|
73
|
+
s.stub(:id).and_return(3)
|
74
|
+
s
|
75
|
+
}
|
76
|
+
let(:app) { WelltreatStoreFramework::Core.find_store_by_name('hello-store', store) }
|
77
|
+
subject { app }
|
78
|
+
|
79
|
+
it 'should have partition_object accessor' do
|
80
|
+
subject.respond_to?(:partition_object).should be
|
81
|
+
subject.respond_to?(:partition_object=).should be
|
82
|
+
end
|
83
|
+
|
84
|
+
it 'should set partition object id to all models' do
|
85
|
+
subject.models.constants.each do |_c|
|
86
|
+
subject.models.const_get(_c).flexi_partition_id.should be == 3
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# Attributes
|
91
|
+
[:name, :controllers_path, :models_path, :config_path, :assets_path, :path].each do |_attr|
|
92
|
+
its(_attr) { should be }
|
93
|
+
end
|
94
|
+
|
95
|
+
its(:name) { should == 'hello-store' }
|
96
|
+
its(:config_path) { should == File.join(_DEFAULT_STORE_PATH, 'hello-store', 'config') }
|
97
|
+
its(:controllers_path) { should == File.join(_DEFAULT_STORE_PATH, 'hello-store', 'controllers') }
|
98
|
+
its(:models_path) { should == File.join(_DEFAULT_STORE_PATH, 'hello-store', 'models') }
|
99
|
+
its(:views_path) { should == File.join(_DEFAULT_STORE_PATH, 'hello-store', 'views') }
|
100
|
+
|
101
|
+
# Methods
|
102
|
+
[:start, :stop, :restart].each do |_method|
|
103
|
+
it "should have `#{_method}`" do
|
104
|
+
subject.respond_to?(_method).should be
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
describe '#start' do
|
109
|
+
before do
|
110
|
+
WelltreatStoreFramework::Core.reset!
|
111
|
+
WelltreatStoreFramework::Core.setup do |config|
|
112
|
+
config.store_path = _DEFAULT_STORE_PATH
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
let(:app) { WelltreatStoreFramework::Core.find_store_by_name('hello-store') }
|
117
|
+
subject { app }
|
118
|
+
|
119
|
+
its(:start) { should be }
|
120
|
+
|
121
|
+
describe 'initiated module' do
|
122
|
+
subject { app.send(:_base_module) }
|
123
|
+
|
124
|
+
it { should be_a Module }
|
125
|
+
its(:name) { should match /^WelltreatStoreFramework::StoreApp::HelloStoreAppStack$/ }
|
126
|
+
|
127
|
+
[:Controllers, :Models].each do |_const|
|
128
|
+
it "should have defined constant #{_const}" do
|
129
|
+
subject.const_defined?(_const).should be
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
describe ':Controllers' do
|
134
|
+
subject { app.send(:_base_module)::Controllers }
|
135
|
+
|
136
|
+
it 'should have defined Products' do
|
137
|
+
subject.const_defined?(:Products).should be
|
138
|
+
end
|
139
|
+
|
140
|
+
it 'should define products as class' do
|
141
|
+
subject::Products.should be_a Class
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
describe ':Models' do
|
146
|
+
subject { app.send(:_base_module)::Models }
|
147
|
+
|
148
|
+
it 'should have defined models' do
|
149
|
+
subject.const_defined?(:Product).should be
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
describe '#stop' do
|
156
|
+
before do
|
157
|
+
WelltreatStoreFramework::Core.reset!
|
158
|
+
WelltreatStoreFramework::Core.setup do |config|
|
159
|
+
config.store_path = _DEFAULT_STORE_PATH
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
let(:app) { WelltreatStoreFramework::Core.find_store_by_name('hello-store') }
|
164
|
+
before { app.start }
|
165
|
+
|
166
|
+
context 'before stop' do
|
167
|
+
it 'should have module' do
|
168
|
+
app.instance_variable_get(:@_base_module).should be
|
169
|
+
app.send(:_base_module).should be_a Module
|
170
|
+
app.send(:_base_module)::Controllers.should be_a Module
|
171
|
+
app.send(:_base_module)::Models.should be_a Module
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
context 'after stop' do
|
176
|
+
before { app.stop }
|
177
|
+
|
178
|
+
it 'should dispose module' do
|
179
|
+
app.instance_variable_get(:@_base_module).should be_nil
|
180
|
+
end
|
181
|
+
|
182
|
+
it 'should return true on successful stop' do
|
183
|
+
app.start
|
184
|
+
app.stop.should be
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
_DEFAULT_STORE_PATH = File.join(File.dirname(__FILE__), '../../../sample')
|
4
|
+
|
5
|
+
describe WelltreatStoreFramework::HamlRenderer::Context do
|
6
|
+
|
7
|
+
before do
|
8
|
+
WelltreatStoreFramework::Core.reset!
|
9
|
+
WelltreatStoreFramework::Core.setup do |config|
|
10
|
+
config.store_path = _DEFAULT_STORE_PATH
|
11
|
+
config.auto_reload = true
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
let(:app) { WelltreatStoreFramework::Core.find_store_by_name('hello-store') }
|
16
|
+
let(:request) { WelltreatStoreFramework::Controller::Request.new }
|
17
|
+
let(:response) { WelltreatStoreFramework::Controller::Response.new }
|
18
|
+
let(:context) { WelltreatStoreFramework::HamlRenderer::Context.new(app, request, response) }
|
19
|
+
|
20
|
+
describe '#image_tag' do
|
21
|
+
it 'should render img tag' do
|
22
|
+
context.image_tag("abc.png").should == "<img src='/assets/images/abc.png' />"
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should add attributes' do
|
26
|
+
context.image_tag("abc.png", alt: "hi").should == "<img alt='hi' src='/assets/images/abc.png' />"
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'should not prepend /assets if already path started with slash' do
|
30
|
+
context.image_tag('/abc.png').should == "<img src='/abc.png' />"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe '#link_to' do
|
35
|
+
it 'should render link tag' do
|
36
|
+
context.link_to("Label", "http://abc.com").should == "<a href='http://abc.com'>Label</a>"
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'should render link tag with attributes' do
|
40
|
+
context.link_to("Label", "http://abc.com", id: 'hola').should == "<a id='hola' href='http://abc.com'>Label</a>"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
describe '#stylesheet_link_tag' do
|
45
|
+
it 'should render link tag' do
|
46
|
+
context.stylesheet_link_tag("abc", "def").should ==
|
47
|
+
%{<link rel='stylesheet' type='text/css' href='/assets/stylesheets/abc.css' /><link rel='stylesheet' type='text/css' href='/assets/stylesheets/def.css' />}
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
describe '#javascript_include_tag' do
|
52
|
+
it 'should render script tag' do
|
53
|
+
context.javascript_include_tag('abc', 'def').should ==
|
54
|
+
%{<script type='text/javascript' src='/assets/javascripts/abc.js'></script><script type='text/javascript' src='/assets/javascripts/def.js'></script>}
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
describe '#truncate' do
|
59
|
+
it 'should truncate text' do
|
60
|
+
context.truncate("hi" * 100, :length => 5).should == 'hihih'
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
describe '#lorem' do
|
65
|
+
it 'should return a line'
|
66
|
+
end
|
67
|
+
|
68
|
+
describe '#strip_tags' do
|
69
|
+
it 'should strip tags' do
|
70
|
+
context.strip_tags("<a>Hola</a>").should == 'Hola'
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
_DEFAULT_STORE_PATH = File.join(File.dirname(__FILE__), '../../../sample')
|
4
|
+
|
5
|
+
describe WelltreatStoreFramework::StoreApp do
|
6
|
+
before do
|
7
|
+
WelltreatStoreFramework::Core.reset!
|
8
|
+
WelltreatStoreFramework::Core.setup do |config|
|
9
|
+
config.store_path = _DEFAULT_STORE_PATH
|
10
|
+
config.auto_reload = true
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
let(:app) { WelltreatStoreFramework::Core.find_store_by_name('hello-store') }
|
15
|
+
before { app.start }
|
16
|
+
|
17
|
+
describe '#dispatch' do
|
18
|
+
let(:request) { WelltreatStoreFramework::Controller::Request.new }
|
19
|
+
let(:response) { WelltreatStoreFramework::Controller::Response.new }
|
20
|
+
|
21
|
+
it 'should not throw any exception' do
|
22
|
+
lambda {
|
23
|
+
app.dispatch('/', request, response)
|
24
|
+
}.should_not raise_error
|
25
|
+
end
|
26
|
+
|
27
|
+
describe 'response object' do
|
28
|
+
before { app.dispatch('/', request, response) }
|
29
|
+
subject { response }
|
30
|
+
|
31
|
+
its(:template) { should == :index }
|
32
|
+
its(:layout) { should == :default }
|
33
|
+
its(:values) { subject[:title].should == 'Hello World' }
|
34
|
+
its(:values) { subject[:name].should == 'Hasan' }
|
35
|
+
its(:status) { should == 200 }
|
36
|
+
end
|
37
|
+
|
38
|
+
describe 'rendered content' do
|
39
|
+
before { app.dispatch('/', request, response) }
|
40
|
+
before { app.render!(request, response) }
|
41
|
+
subject { response }
|
42
|
+
|
43
|
+
its(:content) { should match 'Hasan' }
|
44
|
+
its(:content) { should match 'Hello World' }
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'product controller' do
|
48
|
+
before { app.dispatch('/products', request, response) }
|
49
|
+
before { app.render!(request, response) }
|
50
|
+
subject { response }
|
51
|
+
|
52
|
+
its(:template) { should == :index }
|
53
|
+
its(:layout) { should == :default }
|
54
|
+
its(:content) { should match "Product 1" }
|
55
|
+
its(:content) { should match "Product 2" }
|
56
|
+
its(:content) { should match "<!DOCTYPE html>" }
|
57
|
+
end
|
58
|
+
|
59
|
+
context 'auto reload enabled' do
|
60
|
+
it 'should have same base module name' do
|
61
|
+
_old_app_mod = app.send(:_base_module).name
|
62
|
+
app.dispatch('/', request, response)
|
63
|
+
|
64
|
+
app.send(:_base_module).name.should eql _old_app_mod
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'should have different base object_id' do
|
68
|
+
_old_app_mod_id = app.send(:_base_module).object_id
|
69
|
+
app.dispatch('/', request, response)
|
70
|
+
|
71
|
+
app.send(:_base_module).object_id.should_not eql _old_app_mod_id
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
75
|
+
|
76
|
+
context 'not found url' do
|
77
|
+
before { app.dispatch('/Something does not exists', request, response) }
|
78
|
+
before { app.render!(request, response) }
|
79
|
+
subject { response }
|
80
|
+
|
81
|
+
its(:content) { should match /not\s*found/i }
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
@@ -0,0 +1,140 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
_DEFAULT_STORE_PATH = File.join(File.dirname(__FILE__), '../../../sample')
|
4
|
+
|
5
|
+
describe 'SampleApp::HelloStore' do
|
6
|
+
before do
|
7
|
+
WelltreatStoreFramework::Core.reset!
|
8
|
+
WelltreatStoreFramework::Core.setup do |config|
|
9
|
+
config.store_path = _DEFAULT_STORE_PATH
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
let(:request) { WelltreatStoreFramework::Controller::Request.new }
|
14
|
+
let(:response) { WelltreatStoreFramework::Controller::Response.new }
|
15
|
+
|
16
|
+
before(:each) do
|
17
|
+
request = WelltreatStoreFramework::Controller::Request.new
|
18
|
+
response = WelltreatStoreFramework::Controller::Response.new
|
19
|
+
end
|
20
|
+
|
21
|
+
let(:app) { WelltreatStoreFramework::Core.find_store_by_name('hello-store') }
|
22
|
+
|
23
|
+
before { app.start }
|
24
|
+
|
25
|
+
describe 'controllers' do
|
26
|
+
describe '/' do
|
27
|
+
it 'should render without error' do
|
28
|
+
lambda {
|
29
|
+
app.dispatch('/', request, response)
|
30
|
+
}.should_not raise_error
|
31
|
+
end
|
32
|
+
|
33
|
+
describe 'after rendered' do
|
34
|
+
before {
|
35
|
+
app.models::Product.destroy_all
|
36
|
+
}
|
37
|
+
let!(:products) {
|
38
|
+
5.times.map { |i|
|
39
|
+
app.models::Product.create(
|
40
|
+
name: "Product #{i}",
|
41
|
+
description: "Prod description #{i}",
|
42
|
+
price: (500 * (i + 1)),
|
43
|
+
available: true
|
44
|
+
)
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
before { app.dispatch('/', request, response) }
|
49
|
+
subject { response }
|
50
|
+
|
51
|
+
its([:products]) { should be }
|
52
|
+
its([:title]) { should be }
|
53
|
+
its([:products]) { subject.map(&:_id).should == products.map(&:_id) }
|
54
|
+
|
55
|
+
describe 'rendered content' do
|
56
|
+
before { app.render!(request, response) }
|
57
|
+
subject { response.content }
|
58
|
+
|
59
|
+
it 'should have rendered products' do
|
60
|
+
products.each do |product|
|
61
|
+
subject.should match product.name
|
62
|
+
subject.should match product.description
|
63
|
+
subject.should match product.price.to_s
|
64
|
+
subject.should match "It's in stock"
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe '/products/show' do
|
72
|
+
before {
|
73
|
+
app.models::Product.destroy_all
|
74
|
+
}
|
75
|
+
|
76
|
+
let!(:products) {
|
77
|
+
5.times.map { |i|
|
78
|
+
app.models::Product.create(
|
79
|
+
name: "Product #{i}",
|
80
|
+
description: "Prod description #{i}",
|
81
|
+
price: (500 * (i + 1)),
|
82
|
+
available: true
|
83
|
+
)
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
before { products.first.update_attribute :available, false }
|
88
|
+
|
89
|
+
context 'when valid product id' do
|
90
|
+
it 'should render without any problem' do
|
91
|
+
lambda {
|
92
|
+
app.dispatch("/products/show/#{products.first._id}", request, response)
|
93
|
+
}.should_not raise_error
|
94
|
+
end
|
95
|
+
|
96
|
+
describe 'before rendered' do
|
97
|
+
before { app.dispatch("/products/show/#{products.first._id}", request, response) }
|
98
|
+
subject { response }
|
99
|
+
|
100
|
+
its([:product]) { should be }
|
101
|
+
|
102
|
+
it 'should render without any error' do
|
103
|
+
lambda {
|
104
|
+
app.render!(request, response)
|
105
|
+
}.should_not raise_error
|
106
|
+
end
|
107
|
+
|
108
|
+
describe 'after rendered' do
|
109
|
+
before { app.render!(request, response) }
|
110
|
+
subject { response.content }
|
111
|
+
|
112
|
+
it { should match products.first.name }
|
113
|
+
it { should match products.first.description }
|
114
|
+
it { should match products.first.price.to_s }
|
115
|
+
it { should match "It's outta stock" }
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
context 'relationships' do
|
122
|
+
describe '/products/reviews/:product_id' do
|
123
|
+
it 'should render without any error'
|
124
|
+
it 'should assign product variable'
|
125
|
+
it 'should assign reviews variable'
|
126
|
+
end
|
127
|
+
|
128
|
+
describe '/products/create_reviews/:product_id' do
|
129
|
+
it 'should render without any error'
|
130
|
+
it 'should create new review'
|
131
|
+
it 'should redirect to product page'
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
end
|
136
|
+
|
137
|
+
describe 'models'
|
138
|
+
|
139
|
+
describe 'views'
|
140
|
+
end
|
File without changes
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
ENV["ENVIRONMENT"] ||= 'test'
|
2
|
+
|
3
|
+
require "rubygems"
|
4
|
+
require "bundler"
|
5
|
+
require 'active_record'
|
6
|
+
|
7
|
+
Bundler.load
|
8
|
+
|
9
|
+
require 'rspec/autorun'
|
10
|
+
Dir.glob(File.join('spec', 'factories', '*')).each { |f| require f }
|
11
|
+
|
12
|
+
require 'spec_helper/active_record'
|
13
|
+
require 'spec_helper/rspec'
|
14
|
+
require 'spec_helper/models'
|
15
|
+
|
16
|
+
require 'haml'
|
17
|
+
require 'flexi_model'
|
18
|
+
require 'welltreat_store_framework'
|
19
|
+
|
metadata
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: welltreat-store-framework
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- nhm tanveer hossain khan
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-07-10 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: jeweler
|
16
|
+
requirement: &2157029520 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *2157029520
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: activesupport
|
27
|
+
requirement: &2157028760 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ~>
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 3.2.0
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *2157028760
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: haml
|
38
|
+
requirement: &2157028200 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *2157028200
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: flexi_model
|
49
|
+
requirement: &2157027720 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :runtime
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *2157027720
|
58
|
+
description: WellTreat Store Framework
|
59
|
+
email:
|
60
|
+
- hasan83bd@gmail.com
|
61
|
+
executables: []
|
62
|
+
extensions: []
|
63
|
+
extra_rdoc_files:
|
64
|
+
- README.md
|
65
|
+
files:
|
66
|
+
- lib/generators/flexi_model/install/install_generator.rb
|
67
|
+
- lib/generators/flexi_model/install/templates/create_flexi_model_collections.rb
|
68
|
+
- lib/generators/flexi_model/install/templates/create_flexi_model_collections_fields.rb
|
69
|
+
- lib/generators/flexi_model/install/templates/create_flexi_model_fields.rb
|
70
|
+
- lib/generators/flexi_model/install/templates/create_flexi_model_records.rb
|
71
|
+
- lib/generators/flexi_model/install/templates/create_flexi_model_values.rb
|
72
|
+
- lib/welltreat_store_framework.rb
|
73
|
+
- lib/welltreat_store_framework/configuration.rb
|
74
|
+
- lib/welltreat_store_framework/controller.rb
|
75
|
+
- lib/welltreat_store_framework/core.rb
|
76
|
+
- lib/welltreat_store_framework/haml_renderer.rb
|
77
|
+
- lib/welltreat_store_framework/haml_renderer/lorem_helper.rb
|
78
|
+
- lib/welltreat_store_framework/haml_renderer/partial.rb
|
79
|
+
- lib/welltreat_store_framework/haml_renderer/paths.rb
|
80
|
+
- lib/welltreat_store_framework/haml_renderer/tags_helper.rb
|
81
|
+
- lib/welltreat_store_framework/rack_server.rb
|
82
|
+
- lib/welltreat_store_framework/store_app.rb
|
83
|
+
- sample/hello-store/assets/javascripts/app.js
|
84
|
+
- sample/hello-store/controllers/home.rb
|
85
|
+
- sample/hello-store/controllers/products.rb
|
86
|
+
- sample/hello-store/models/product.rb
|
87
|
+
- sample/hello-store/mount.rb
|
88
|
+
- sample/hello-store/views/home/index.haml
|
89
|
+
- sample/hello-store/views/layouts/default.html.haml
|
90
|
+
- sample/hello-store/views/products/_product.html.haml
|
91
|
+
- sample/hello-store/views/products/index.haml
|
92
|
+
- sample/hello-store/views/products/show.html.haml
|
93
|
+
- spec/fixtures/schema.rb
|
94
|
+
- spec/lib/welltreat_store_framework/configuration_spec.rb
|
95
|
+
- spec/lib/welltreat_store_framework/core_spec.rb
|
96
|
+
- spec/lib/welltreat_store_framework/haml_renderer/context_spec.rb
|
97
|
+
- spec/lib/welltreat_store_framework/store_app_spec.rb
|
98
|
+
- spec/lib/welltreat_store_framework_spec.rb
|
99
|
+
- spec/sample/controllers/products_spec.rb
|
100
|
+
- spec/spec_helper.rb
|
101
|
+
- spec/spec_helper/active_record.rb
|
102
|
+
- spec/spec_helper/models.rb
|
103
|
+
- spec/spec_helper/rspec.rb
|
104
|
+
- README.md
|
105
|
+
homepage: https://github.com/we4tech/welltreat-store-framework/
|
106
|
+
licenses: []
|
107
|
+
post_install_message:
|
108
|
+
rdoc_options: []
|
109
|
+
require_paths:
|
110
|
+
- lib
|
111
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
112
|
+
none: false
|
113
|
+
requirements:
|
114
|
+
- - ! '>='
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
119
|
+
requirements:
|
120
|
+
- - ! '>='
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0'
|
123
|
+
requirements: []
|
124
|
+
rubyforge_project:
|
125
|
+
rubygems_version: 1.8.10
|
126
|
+
signing_key:
|
127
|
+
specification_version: 3
|
128
|
+
summary: Build store just like your another web development project.
|
129
|
+
test_files: []
|