shopqi-app 0.2.7 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
data/app/models/shop.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class Shop < ActiveRecord::Base
2
- attr_accessible :shop_id, :name, :shopqi_domain, :access_token
2
+ attr_accessible :shop_id, :name, :shopqi_domain
3
3
 
4
4
  def self.find_for_shopqi_oauth(data)
5
5
  shop_data = data.extra.raw_info.shop
@@ -11,4 +11,12 @@ class Shop < ActiveRecord::Base
11
11
  def use_shopkit
12
12
  Shopkit.setup url: self.shopqi_domain, access_token: self.access_token
13
13
  end
14
+
15
+ def admin_url # 后台
16
+ "#{SecretSetting.shopqi_domain.protocol}#{self.shopqi_domain}/admin"
17
+ end
18
+
19
+ def front_url # 前台
20
+ "http://#{self.shopqi_domain}"
21
+ end
14
22
  end
@@ -2,12 +2,12 @@
2
2
  #= require jquery_ujs
3
3
  #= require_tree .
4
4
 
5
- #= require twitter/bootstrap/dropdown.js
5
+ #= require bootstrap-dropdown
6
6
  # accordion 依赖
7
- #= require twitter/bootstrap/transition.js
8
- #= require twitter/bootstrap/collapse.js
7
+ #= require bootstrap-transition
8
+ #= require bootstrap-collapse
9
9
  ###
10
- #= require twitter/bootstrap/tooltip.js
10
+ #= require bootstrap-tooltip
11
11
  ###
12
12
 
13
13
  $(document).ready ->
@@ -0,0 +1,71 @@
1
+ /*
2
+ *= require_tree .
3
+ */
4
+
5
+ // CSS Reset
6
+ @import "bootstrap/reset";
7
+
8
+ // Core variables and mixins
9
+ @import "bootstrap/variables"; // Modify this for custom colors, font-sizes, etc
10
+ @import "bootstrap/mixins";
11
+
12
+ // Grid system and page structure
13
+ @import "bootstrap/scaffolding";
14
+ @import "bootstrap/grid";
15
+ @import "bootstrap/layouts";
16
+
17
+ // Base CSS
18
+ @import "bootstrap/type";
19
+ //@import "bootstrap/code";
20
+ @import "bootstrap/forms";
21
+ @import "bootstrap/tables";
22
+
23
+ // Components: common
24
+ @import "bootstrap/sprites";
25
+ @import "bootstrap/dropdowns";
26
+ @import "bootstrap/wells";
27
+ @import "bootstrap/component-animations";
28
+ //@import "bootstrap/close";
29
+
30
+ // Components: Buttons & Alerts
31
+ @import "bootstrap/buttons";
32
+ //@import "bootstrap/button-groups";
33
+ @import "bootstrap/alerts"; // Note: alerts share common CSS with buttons and thus have styles in buttons
34
+
35
+ // Components: Nav
36
+ @import "bootstrap/navs";
37
+ @import "bootstrap/navbar";
38
+ //@import "bootstrap/breadcrumbs";
39
+ //@import "bootstrap/pagination";
40
+ //@import "bootstrap/pager";
41
+
42
+ // Components: Popovers
43
+ //@import "bootstrap/modals";
44
+ @import "bootstrap/tooltip";
45
+ //@import "bootstrap/popovers";
46
+
47
+ // Components: Misc
48
+ //@import "bootstrap/thumbnails";
49
+ @import "bootstrap/labels-badges";
50
+ //@import "bootstrap/progress-bars";
51
+ @import "bootstrap/accordion";
52
+ //@import "bootstrap/carousel";
53
+ @import "bootstrap/hero-unit";
54
+
55
+ // Utility classes
56
+ @import "bootstrap/utilities"; // Has to be last to override when necessary
57
+
58
+ body {
59
+ margin-top: 50px;
60
+ margin-bottom: 100px; }
61
+
62
+ .accordion-body {
63
+ background: #F9F9F9;
64
+ .accordion-inner {
65
+ padding: 20px; }}
66
+
67
+ .footer {
68
+ color: #333;
69
+ text-align: center;
70
+ margin-top: 45px;
71
+ padding: 35px 0 36px; }
@@ -1,4 +1,4 @@
1
- require "#{ShopQiApp::Engine.models_dir}/shop"
1
+ require "#{ShopQiApp::Engine.models_dir}/shop" # methods: use_shopkit admin_url front_url
2
2
  class Shop
3
- attr_accessible :shop_id, :name, :shopqi_domain, :access_token
3
+ attr_accessible :shop_id, :name, :shopqi_domain
4
4
  end
@@ -1,5 +1,7 @@
1
1
  defaults: &defaults
2
2
  app_name: ShopQi App Example
3
+ author:
4
+ email: mahb45@gmail.com
3
5
  oauth:
4
6
  client_id: <%= client_id %>
5
7
  secret: <%= client_secret %>
data/lib/shopqi-app.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require "shopqi_app/engine"
2
2
  require 'haml' # fixed haml: Missing template
3
- require 'less-rails-bootstrap'
3
+ require 'bootstrap-sass'
4
4
  require 'omniauth'
5
5
  require 'settingslogic'
6
6
  require 'omniauth-shopqi'
@@ -1,3 +1,3 @@
1
1
  module ShopQiApp
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopqi-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-02 00:00:00.000000000 Z
12
+ date: 2012-08-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -76,13 +76,13 @@ dependencies:
76
76
  - !ruby/object:Gem::Version
77
77
  version: 3.1.6
78
78
  - !ruby/object:Gem::Dependency
79
- name: less-rails-bootstrap
79
+ name: bootstrap-sass
80
80
  requirement: !ruby/object:Gem::Requirement
81
81
  none: false
82
82
  requirements:
83
83
  - - ~>
84
84
  - !ruby/object:Gem::Version
85
- version: 2.0.13
85
+ version: 2.0.4.0
86
86
  type: :runtime
87
87
  prerelease: false
88
88
  version_requirements: !ruby/object:Gem::Requirement
@@ -90,7 +90,7 @@ dependencies:
90
90
  requirements:
91
91
  - - ~>
92
92
  - !ruby/object:Gem::Version
93
- version: 2.0.13
93
+ version: 2.0.4.0
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: settingslogic
96
96
  requirement: !ruby/object:Gem::Requirement
@@ -175,7 +175,7 @@ files:
175
175
  - lib/generators/shopqi_app/templates/app/controllers/home_controller.rb
176
176
  - lib/generators/shopqi_app/templates/app/models/shop.rb
177
177
  - lib/generators/shopqi_app/templates/app/assets/javascripts/application.js.coffee
178
- - lib/generators/shopqi_app/templates/app/assets/stylesheets/application.css.less.erb
178
+ - lib/generators/shopqi_app/templates/app/assets/stylesheets/application.css.scss.erb
179
179
  - lib/generators/shopqi_app/templates/app/views/layouts/application.html.haml
180
180
  - lib/generators/shopqi_app/templates/app/views/home/index.html.haml
181
181
  - lib/generators/shopqi_app/templates/config/app_secret_config.yml.erb
@@ -205,7 +205,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
205
205
  version: '0'
206
206
  segments:
207
207
  - 0
208
- hash: -277092943
208
+ hash: -964293635
209
209
  required_rubygems_version: !ruby/object:Gem::Requirement
210
210
  none: false
211
211
  requirements:
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
214
  version: '0'
215
215
  segments:
216
216
  - 0
217
- hash: -277092943
217
+ hash: -964293635
218
218
  requirements: []
219
219
  rubyforge_project:
220
220
  rubygems_version: 1.8.24
@@ -1,71 +0,0 @@
1
- /*
2
- *= require_tree .
3
- */
4
-
5
- // CSS Reset
6
- @import "twitter/bootstrap/reset.less";
7
-
8
- // Core variables and mixins
9
- @import "twitter/bootstrap/variables.less"; // Modify this for custom colors, font-sizes, etc
10
- @import "twitter/bootstrap/mixins.less";
11
-
12
- // Grid system and page structure
13
- @import "twitter/bootstrap/scaffolding.less";
14
- @import "twitter/bootstrap/grid.less";
15
- @import "twitter/bootstrap/layouts.less";
16
-
17
- // Base CSS
18
- @import "twitter/bootstrap/type.less";
19
- //@import "twitter/bootstrap/code.less";
20
- @import "twitter/bootstrap/forms.less";
21
- @import "twitter/bootstrap/tables.less";
22
-
23
- // Components: common
24
- @import "twitter/bootstrap/sprites.less";
25
- @import "twitter/bootstrap/dropdowns.less";
26
- @import "twitter/bootstrap/wells.less";
27
- @import "twitter/bootstrap/component-animations.less";
28
- //@import "twitter/bootstrap/close.less";
29
-
30
- // Components: Buttons & Alerts
31
- @import "twitter/bootstrap/buttons.less";
32
- //@import "twitter/bootstrap/button-groups.less";
33
- @import "twitter/bootstrap/alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less
34
-
35
- // Components: Nav
36
- @import "twitter/bootstrap/navs.less";
37
- @import "twitter/bootstrap/navbar.less";
38
- //@import "twitter/bootstrap/breadcrumbs.less";
39
- //@import "twitter/bootstrap/pagination.less";
40
- //@import "twitter/bootstrap/pager.less";
41
-
42
- // Components: Popovers
43
- //@import "twitter/bootstrap/modals.less";
44
- @import "twitter/bootstrap/tooltip.less";
45
- //@import "twitter/bootstrap/popovers.less";
46
-
47
- // Components: Misc
48
- //@import "twitter/bootstrap/thumbnails.less";
49
- @import "twitter/bootstrap/labels-badges.less";
50
- //@import "twitter/bootstrap/progress-bars.less";
51
- @import "twitter/bootstrap/accordion.less";
52
- //@import "twitter/bootstrap/carousel.less";
53
- @import "twitter/bootstrap/hero-unit.less";
54
-
55
- // Utility classes
56
- @import "twitter/bootstrap/utilities.less"; // Has to be last to override when necessary
57
-
58
- body {
59
- margin-top: 50px;
60
- margin-bottom: 100px; }
61
-
62
- .accordion-body {
63
- background: #F9F9F9;
64
- .accordion-inner {
65
- padding: 20px; }}
66
-
67
- .footer {
68
- color: #333;
69
- text-align: center;
70
- margin-top: 45px;
71
- padding: 35px 0 36px; }