shopify_app 1.0.1 → 2.0.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.rdoc +7 -3
- data/lib/generators/shopify_app/shopify_app_generator.rb +5 -5
- data/lib/generators/shopify_app/templates/{public/stylesheets/application.css → app/assets/stylesheets/shopify_app.css} +1 -1
- data/lib/generators/shopify_app/templates/app/controllers/login_controller.rb +3 -3
- data/lib/generators/shopify_app/templates/app/helpers/tabs_helper.rb +1 -1
- data/lib/generators/shopify_app/templates/app/views/layouts/application.html.erb +7 -7
- data/lib/generators/shopify_app/templates/public/images/logo.png +0 -0
- data/lib/shopify_app/login_protection.rb +1 -1
- data/lib/shopify_app/version.rb +1 -1
- data/shopify_app.gemspec +1 -1
- metadata +10 -9
- data/lib/generators/shopify_app/templates/public/images/shopify-logo.png +0 -0
data/README.rdoc
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
= Shopify application generator for Rails 3
|
1
|
+
= Shopify application generator for Rails 3.1
|
2
2
|
|
3
3
|
== Description
|
4
4
|
|
5
|
-
This gem makes it easy to get a Rails 3 app up and running with the
|
5
|
+
This gem makes it easy to get a Rails 3.1 app up and running with the
|
6
6
|
Shopify API.
|
7
7
|
|
8
8
|
The generator creates a basic login controller for authenticating with your
|
@@ -49,10 +49,14 @@ Now visit http://localhost:3000 and install your application in a Shopify store.
|
|
49
49
|
After your application has been given read or read/write API permission by the
|
50
50
|
shop, you're ready to start experimenting with the Shopify API.
|
51
51
|
|
52
|
+
== Rails 3.0 Support
|
53
|
+
|
54
|
+
Rails 3.0 is supported on a branch of our github repo: https://github.com/Shopify/shopify_app/tree/rails_3.0_support
|
55
|
+
|
52
56
|
== Questions or problems?
|
53
57
|
|
54
58
|
http://api.shopify.com <= Read up on the possible API calls!
|
55
59
|
|
56
|
-
|
60
|
+
https://groups.google.com/forum/#!forum/shopify-api <= Talk to new friends!
|
57
61
|
|
58
62
|
http://wiki.shopify.com/Shopify_App_Development <= Edit the docs!
|
@@ -34,13 +34,13 @@ class ShopifyAppGenerator < Rails::Generators::Base
|
|
34
34
|
|
35
35
|
def add_routes
|
36
36
|
unless options[:skip_routes]
|
37
|
-
route "
|
38
|
-
route "match 'login/
|
39
|
-
route "match 'login/
|
40
|
-
route "match 'login'
|
37
|
+
route "root :to => 'home#index'"
|
38
|
+
route "match 'login/logout' => 'login#logout', :as => :logout"
|
39
|
+
route "match 'login/finalize' => 'login#finalize', :as => :finalize"
|
40
|
+
route "match 'login/authenticate' => 'login#authenticate', :as => :authenticate"
|
41
|
+
route "match 'login' => 'login#index', :as => :login"
|
41
42
|
route "match 'design' => 'home#design'"
|
42
43
|
route "match 'welcome' => 'home#welcome'"
|
43
|
-
route "root :to => 'home#index'"
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
@@ -10,7 +10,7 @@ h2 { font-weight: normal; margin-top: 24px; }
|
|
10
10
|
h3 { margin-top: 24px; }
|
11
11
|
|
12
12
|
#header {
|
13
|
-
background: #2d3337 url('../images/
|
13
|
+
background: #2d3337 url('../images/logo.png') 20px 50% no-repeat;
|
14
14
|
padding: 25px 25px 25px 70px;
|
15
15
|
border-top: 5px solid #1f2326;
|
16
16
|
border-bottom: 1px solid #252a2e;
|
@@ -4,13 +4,13 @@ class LoginController < ApplicationController
|
|
4
4
|
|
5
5
|
# If the #{shop}.myshopify.com address is already provided in the URL, just skip to #authenticate
|
6
6
|
if params[:shop].present?
|
7
|
-
redirect_to :
|
7
|
+
redirect_to authenticate_path(:shop => params[:shop])
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
11
|
def authenticate
|
12
12
|
if params[:shop].present?
|
13
|
-
redirect_to ShopifyAPI::Session.new(params[:shop].to_s).create_permission_url
|
13
|
+
redirect_to ShopifyAPI::Session.new(params[:shop].to_s.strip).create_permission_url
|
14
14
|
else
|
15
15
|
redirect_to return_address
|
16
16
|
end
|
@@ -47,4 +47,4 @@ class LoginController < ApplicationController
|
|
47
47
|
def return_address
|
48
48
|
session[:return_to] || root_url
|
49
49
|
end
|
50
|
-
end
|
50
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module TabsHelper
|
2
2
|
# Create a tab as <li> and give it the id "current" if the current action matches that tab
|
3
3
|
def tab(name, url, options = {})
|
4
|
-
if controller.action_name =~ (options[:highlight] = /#{name}/i)
|
4
|
+
if controller.action_name =~ (options[:highlight] = /#{name}/i) && controller.controller_name == url[:controller]
|
5
5
|
content_tag :li, link_to(options[:label] || name.to_s.capitalize, url, {:id => "current"})
|
6
6
|
else
|
7
7
|
content_tag :li, link_to(options[:label] || name.to_s.capitalize, url)
|
@@ -2,9 +2,9 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title>Shopify Application</title>
|
5
|
-
<%= stylesheet_link_tag
|
6
|
-
<%= javascript_include_tag
|
7
|
-
<%=
|
5
|
+
<%= stylesheet_link_tag 'application' %>
|
6
|
+
<%= javascript_include_tag 'application' %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
8
|
</head>
|
9
9
|
|
10
10
|
<body>
|
@@ -14,15 +14,15 @@
|
|
14
14
|
<p id="login-link">
|
15
15
|
<% if current_shop %>
|
16
16
|
<span class="note">current shop</span> <%= link_to current_shop.url, "https://#{current_shop.url}", :class => 'shop_name' %> <span class="note">|</span>
|
17
|
-
<%= link_to 'logout',
|
17
|
+
<%= link_to 'logout', logout_path %>
|
18
18
|
<% end %>
|
19
19
|
</p>
|
20
20
|
</div>
|
21
21
|
|
22
22
|
<div id="container" class="clearfix">
|
23
23
|
<ul id="tabs">
|
24
|
-
<%= tab :index, {:controller => 'home'}, :label => 'Home' %>
|
25
|
-
<%= tab :design, {:controller => 'home', :action => 'design'}, :label => 'Design Help' %>
|
24
|
+
<%= tab :index, {:controller => '/home'}, :label => 'Home' %>
|
25
|
+
<%= tab :design, {:controller => '/home', :action => 'design'}, :label => 'Design Help' %>
|
26
26
|
</ul>
|
27
27
|
|
28
28
|
<!-- Flash error & notice-->
|
@@ -36,4 +36,4 @@
|
|
36
36
|
<!-- end div.main -->
|
37
37
|
</div>
|
38
38
|
</body>
|
39
|
-
</html>
|
39
|
+
</html>
|
Binary file
|
data/lib/shopify_app/version.rb
CHANGED
data/shopify_app.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
|
-
-
|
7
|
+
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version:
|
9
|
+
- 0
|
10
|
+
version: 2.0.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Shopify
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-11-07 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -29,7 +29,8 @@ dependencies:
|
|
29
29
|
hash: 5
|
30
30
|
segments:
|
31
31
|
- 3
|
32
|
-
|
32
|
+
- 1
|
33
|
+
version: "3.1"
|
33
34
|
type: :runtime
|
34
35
|
version_requirements: *id001
|
35
36
|
- !ruby/object:Gem::Dependency
|
@@ -81,6 +82,7 @@ files:
|
|
81
82
|
- lib/generators/shopify_app/README
|
82
83
|
- lib/generators/shopify_app/USAGE
|
83
84
|
- lib/generators/shopify_app/shopify_app_generator.rb
|
85
|
+
- lib/generators/shopify_app/templates/app/assets/stylesheets/shopify_app.css
|
84
86
|
- lib/generators/shopify_app/templates/app/controllers/home_controller.rb
|
85
87
|
- lib/generators/shopify_app/templates/app/controllers/login_controller.rb
|
86
88
|
- lib/generators/shopify_app/templates/app/helpers/home_helper.rb
|
@@ -94,8 +96,7 @@ files:
|
|
94
96
|
- lib/generators/shopify_app/templates/public/images/box-bg2.gif
|
95
97
|
- lib/generators/shopify_app/templates/public/images/info-bg.gif
|
96
98
|
- lib/generators/shopify_app/templates/public/images/info.gif
|
97
|
-
- lib/generators/shopify_app/templates/public/images/
|
98
|
-
- lib/generators/shopify_app/templates/public/stylesheets/application.css
|
99
|
+
- lib/generators/shopify_app/templates/public/images/logo.png
|
99
100
|
- lib/shopify_app.rb
|
100
101
|
- lib/shopify_app/configuration.rb
|
101
102
|
- lib/shopify_app/login_protection.rb
|
@@ -132,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
133
|
requirements: []
|
133
134
|
|
134
135
|
rubyforge_project: shopify-api
|
135
|
-
rubygems_version: 1.
|
136
|
+
rubygems_version: 1.6.2
|
136
137
|
signing_key:
|
137
138
|
specification_version: 3
|
138
139
|
summary: This gem is used to get quickly started with the Shopify API
|
Binary file
|