shopify_app 5.0.2 → 6.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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.gitignore +4 -1
- data/.travis.yml +9 -0
- data/CHANGELOG +12 -1
- data/README.md +73 -108
- data/Rakefile +0 -1
- data/app/controllers/sessions_controller.rb +3 -0
- data/app/views/sessions/new.html.erb +17 -0
- data/config/routes.rb +10 -0
- data/lib/generators/shopify_app/controllers/controllers_generator.rb +29 -0
- data/lib/generators/shopify_app/install/install_generator.rb +83 -0
- data/lib/generators/shopify_app/install/templates/embedded_app.html.erb +22 -0
- data/lib/generators/shopify_app/install/templates/home_controller.rb +11 -0
- data/lib/generators/shopify_app/install/templates/index.html.erb +12 -0
- data/lib/generators/shopify_app/install/templates/omniauth.rb +2 -0
- data/lib/generators/shopify_app/install/templates/shopify_app.rb +6 -0
- data/lib/generators/shopify_app/install/templates/shopify_app_ready_script.html +8 -0
- data/lib/generators/shopify_app/install/templates/shopify_provider.rb +11 -0
- data/lib/generators/shopify_app/{templates/config/initializers → install/templates}/shopify_session_repository.rb +3 -3
- data/lib/generators/shopify_app/routes/routes_generator.rb +31 -0
- data/lib/generators/shopify_app/routes/templates/routes.rb +7 -0
- data/lib/generators/shopify_app/shop_model/shop_model_generator.rb +42 -0
- data/lib/generators/shopify_app/shop_model/templates/db/migrate/create_shops.rb +15 -0
- data/lib/generators/shopify_app/shop_model/templates/session_storage.rb +16 -0
- data/lib/generators/shopify_app/shop_model/templates/shop.rb +3 -0
- data/lib/generators/shopify_app/shop_model/templates/shopify_session_repository.rb +7 -0
- data/lib/generators/shopify_app/shopify_app_generator.rb +10 -63
- data/lib/generators/shopify_app/views/views_generator.rb +29 -0
- data/lib/shopify_app.rb +14 -13
- data/lib/shopify_app/configuration.rb +26 -36
- data/lib/shopify_app/controller.rb +18 -0
- data/lib/shopify_app/engine.rb +5 -0
- data/lib/shopify_app/login_protection.rb +34 -32
- data/lib/shopify_app/sessions_controller.rb +64 -0
- data/lib/shopify_app/shop.rb +15 -0
- data/lib/shopify_app/shopify_session_repository.rb +23 -21
- data/lib/shopify_app/version.rb +1 -1
- data/shopify_app.gemspec +5 -10
- data/test/app_templates/app/controllers/application_controller.rb +2 -0
- data/test/app_templates/config/application.rb +24 -0
- data/test/app_templates/config/initializers/shopify_app.rb +6 -0
- data/test/app_templates/config/routes.rb +3 -0
- data/test/controllers/sessions_controller_test.rb +82 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/home_controller.rb +7 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +26 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/shopify_app.rb +6 -0
- data/test/dummy/config/routes.rb +10 -0
- data/test/dummy/config/secrets.yml +17 -0
- data/test/generators/install_generator_test.rb +103 -0
- data/test/generators/routes_generator_test.rb +33 -0
- data/test/generators/shop_model_generator_test.rb +40 -0
- data/test/generators/shopify_app_generator.rb +15 -0
- data/test/generators/views_generator_test.rb +15 -0
- data/test/shopify_app/configuration_test.rb +17 -0
- data/test/{lib/shopify_app → shopify_app}/in_memory_session_store_test.rb +6 -6
- data/test/{lib/shopify_app → shopify_app}/login_protection_test.rb +10 -7
- data/test/shopify_app/shopify_session_repository_test.rb +73 -0
- data/test/support/generator_test_helpers.rb +29 -0
- data/test/test_helper.rb +11 -3
- metadata +79 -61
- metadata.gz.sig +0 -0
- data/install.rb +0 -25
- data/lib/generators/shopify_app/README +0 -23
- data/lib/generators/shopify_app/USAGE +0 -22
- data/lib/generators/shopify_app/templates/app/assets/images/favicon.png +0 -0
- data/lib/generators/shopify_app/templates/app/assets/images/grid-18px.png +0 -0
- data/lib/generators/shopify_app/templates/app/assets/images/shopify-114.png +0 -0
- data/lib/generators/shopify_app/templates/app/assets/images/shopify-57.png +0 -0
- data/lib/generators/shopify_app/templates/app/assets/images/shopify-72.png +0 -0
- data/lib/generators/shopify_app/templates/app/assets/images/shopify.png +0 -0
- data/lib/generators/shopify_app/templates/app/assets/javascripts/application.js +0 -15
- data/lib/generators/shopify_app/templates/app/assets/stylesheets/application.css +0 -10
- data/lib/generators/shopify_app/templates/app/assets/stylesheets/imports.css.less +0 -5
- data/lib/generators/shopify_app/templates/app/assets/stylesheets/shopify_app.css.scss +0 -150
- data/lib/generators/shopify_app/templates/app/assets/stylesheets/shopify_app_buttons.css.less +0 -77
- data/lib/generators/shopify_app/templates/app/controllers/application_controller.rb +0 -13
- data/lib/generators/shopify_app/templates/app/controllers/home_controller.rb +0 -18
- data/lib/generators/shopify_app/templates/app/controllers/sessions_controller.rb +0 -52
- data/lib/generators/shopify_app/templates/app/helpers/home_helper.rb +0 -9
- data/lib/generators/shopify_app/templates/app/helpers/login_helper.rb +0 -3
- data/lib/generators/shopify_app/templates/app/helpers/tabs_helper.rb +0 -11
- data/lib/generators/shopify_app/templates/app/views/home/design.html.erb +0 -3542
- data/lib/generators/shopify_app/templates/app/views/home/index.html.erb +0 -168
- data/lib/generators/shopify_app/templates/app/views/home/welcome.html.erb +0 -110
- data/lib/generators/shopify_app/templates/app/views/layouts/application.html.erb +0 -79
- data/lib/generators/shopify_app/templates/app/views/sessions/new.html.erb +0 -21
- data/lib/generators/shopify_app/templates/config/initializers/omniauth.rb +0 -14
- data/lib/generators/shopify_app/templates/config/initializers/rails_4_shim.rb +0 -1
- data/lib/generators/shopify_app/templates/public/404.html +0 -40
- data/lib/generators/shopify_app/templates/public/422.html +0 -40
- data/lib/generators/shopify_app/templates/public/500.html +0 -40
- data/lib/generators/shopify_app/templates/public/favicon.png +0 -0
- data/lib/generators/shopify_app/templates/public/shopify-114.png +0 -0
- data/lib/generators/shopify_app/templates/public/shopify-57.png +0 -0
- data/lib/generators/shopify_app/templates/public/shopify-72.png +0 -0
- data/lib/shopify_app/railtie.rb +0 -17
- data/test/config/development_config_file.yml +0 -8
- data/test/config/empty_config_file.yml +0 -1
- data/test/config/other_config_file.yml +0 -4
- data/test/config/shopify_app.yml +0 -4
- data/test/lib/shopify_app/configuration_test.rb +0 -91
- data/test/lib/shopify_app/shopify_session_repository_test.rb +0 -70
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
class ActiveSupport::TestCase
|
|
2
|
+
TEMPLATE_PATH = File.expand_path("../../app_templates", __FILE__)
|
|
3
|
+
|
|
4
|
+
def provide_existing_application_controller
|
|
5
|
+
copy_to_generator_root("app/controllers", "application_controller.rb")
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def provide_existing_application_file
|
|
9
|
+
copy_to_generator_root("config", "application.rb")
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def provide_existing_routes_file
|
|
13
|
+
copy_to_generator_root("config", "routes.rb")
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def provide_existing_initializer_file
|
|
17
|
+
copy_to_generator_root("config/initializers", "shopify_app.rb")
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
private
|
|
21
|
+
|
|
22
|
+
def copy_to_generator_root(destination, template)
|
|
23
|
+
template_file = File.join(TEMPLATE_PATH, destination, template)
|
|
24
|
+
destination = File.join(destination_root, destination)
|
|
25
|
+
|
|
26
|
+
FileUtils.mkdir_p(destination)
|
|
27
|
+
FileUtils.cp(template_file, destination)
|
|
28
|
+
end
|
|
29
|
+
end
|
data/test/test_helper.rb
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
# Configure Rails Environment
|
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
|
3
|
+
|
|
4
|
+
require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
|
|
5
|
+
require 'rails/test_help'
|
|
3
6
|
require 'mocha/setup'
|
|
7
|
+
require 'byebug'
|
|
8
|
+
|
|
9
|
+
# Filter out Minitest backtrace while allowing backtrace from other libraries
|
|
10
|
+
# to be shown.
|
|
11
|
+
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
|
4
12
|
|
|
5
|
-
|
|
13
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shopify_app
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 6.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shopify
|
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
|
30
30
|
fl3hbtVFTqbOlwL9vy1fudXcolIE/ZTcxQ+er07ZFZdKCXayR9PPs64heamfn0fp
|
|
31
31
|
TConQSX2BnZdhIEYW+cKzEC/bLc=
|
|
32
32
|
-----END CERTIFICATE-----
|
|
33
|
-
date: 2015-
|
|
33
|
+
date: 2015-04-30 00:00:00.000000000 Z
|
|
34
34
|
dependencies:
|
|
35
35
|
- !ruby/object:Gem::Dependency
|
|
36
36
|
name: rails
|
|
@@ -81,21 +81,35 @@ dependencies:
|
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: 1.1.4
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
|
-
name:
|
|
84
|
+
name: rake
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
|
-
- - "
|
|
87
|
+
- - ">="
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: '
|
|
90
|
-
type: :
|
|
89
|
+
version: '0'
|
|
90
|
+
type: :development
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
|
-
- - "
|
|
94
|
+
- - ">="
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '
|
|
96
|
+
version: '0'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name:
|
|
98
|
+
name: byebug
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - ">="
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '0'
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - ">="
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '0'
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: sqlite3
|
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
|
100
114
|
requirements:
|
|
101
115
|
- - ">="
|
|
@@ -136,78 +150,82 @@ dependencies:
|
|
|
136
150
|
- - ">="
|
|
137
151
|
- !ruby/object:Gem::Version
|
|
138
152
|
version: '0'
|
|
139
|
-
description:
|
|
140
|
-
|
|
141
|
-
email:
|
|
142
|
-
- edward@shopify.com
|
|
143
|
-
- willem@shopify.com
|
|
144
|
-
- david.underwood@shopify.com
|
|
153
|
+
description:
|
|
154
|
+
email:
|
|
145
155
|
executables: []
|
|
146
156
|
extensions: []
|
|
147
157
|
extra_rdoc_files: []
|
|
148
158
|
files:
|
|
149
159
|
- ".gitignore"
|
|
160
|
+
- ".travis.yml"
|
|
150
161
|
- CHANGELOG
|
|
151
162
|
- Gemfile
|
|
152
163
|
- LICENSE
|
|
153
164
|
- README.md
|
|
154
165
|
- RELEASING
|
|
155
166
|
- Rakefile
|
|
156
|
-
-
|
|
157
|
-
-
|
|
158
|
-
-
|
|
167
|
+
- app/controllers/sessions_controller.rb
|
|
168
|
+
- app/views/sessions/new.html.erb
|
|
169
|
+
- config/routes.rb
|
|
170
|
+
- lib/generators/shopify_app/controllers/controllers_generator.rb
|
|
171
|
+
- lib/generators/shopify_app/install/install_generator.rb
|
|
172
|
+
- lib/generators/shopify_app/install/templates/embedded_app.html.erb
|
|
173
|
+
- lib/generators/shopify_app/install/templates/home_controller.rb
|
|
174
|
+
- lib/generators/shopify_app/install/templates/index.html.erb
|
|
175
|
+
- lib/generators/shopify_app/install/templates/omniauth.rb
|
|
176
|
+
- lib/generators/shopify_app/install/templates/shopify_app.rb
|
|
177
|
+
- lib/generators/shopify_app/install/templates/shopify_app_ready_script.html
|
|
178
|
+
- lib/generators/shopify_app/install/templates/shopify_provider.rb
|
|
179
|
+
- lib/generators/shopify_app/install/templates/shopify_session_repository.rb
|
|
180
|
+
- lib/generators/shopify_app/routes/routes_generator.rb
|
|
181
|
+
- lib/generators/shopify_app/routes/templates/routes.rb
|
|
182
|
+
- lib/generators/shopify_app/shop_model/shop_model_generator.rb
|
|
183
|
+
- lib/generators/shopify_app/shop_model/templates/db/migrate/create_shops.rb
|
|
184
|
+
- lib/generators/shopify_app/shop_model/templates/session_storage.rb
|
|
185
|
+
- lib/generators/shopify_app/shop_model/templates/shop.rb
|
|
186
|
+
- lib/generators/shopify_app/shop_model/templates/shopify_session_repository.rb
|
|
159
187
|
- lib/generators/shopify_app/shopify_app_generator.rb
|
|
160
|
-
- lib/generators/shopify_app/
|
|
161
|
-
- lib/generators/shopify_app/templates/app/assets/images/grid-18px.png
|
|
162
|
-
- lib/generators/shopify_app/templates/app/assets/images/shopify-114.png
|
|
163
|
-
- lib/generators/shopify_app/templates/app/assets/images/shopify-57.png
|
|
164
|
-
- lib/generators/shopify_app/templates/app/assets/images/shopify-72.png
|
|
165
|
-
- lib/generators/shopify_app/templates/app/assets/images/shopify.png
|
|
166
|
-
- lib/generators/shopify_app/templates/app/assets/javascripts/application.js
|
|
167
|
-
- lib/generators/shopify_app/templates/app/assets/stylesheets/application.css
|
|
168
|
-
- lib/generators/shopify_app/templates/app/assets/stylesheets/imports.css.less
|
|
169
|
-
- lib/generators/shopify_app/templates/app/assets/stylesheets/shopify_app.css.scss
|
|
170
|
-
- lib/generators/shopify_app/templates/app/assets/stylesheets/shopify_app_buttons.css.less
|
|
171
|
-
- lib/generators/shopify_app/templates/app/controllers/application_controller.rb
|
|
172
|
-
- lib/generators/shopify_app/templates/app/controllers/home_controller.rb
|
|
173
|
-
- lib/generators/shopify_app/templates/app/controllers/sessions_controller.rb
|
|
174
|
-
- lib/generators/shopify_app/templates/app/helpers/home_helper.rb
|
|
175
|
-
- lib/generators/shopify_app/templates/app/helpers/login_helper.rb
|
|
176
|
-
- lib/generators/shopify_app/templates/app/helpers/tabs_helper.rb
|
|
177
|
-
- lib/generators/shopify_app/templates/app/views/home/design.html.erb
|
|
178
|
-
- lib/generators/shopify_app/templates/app/views/home/index.html.erb
|
|
179
|
-
- lib/generators/shopify_app/templates/app/views/home/welcome.html.erb
|
|
180
|
-
- lib/generators/shopify_app/templates/app/views/layouts/application.html.erb
|
|
181
|
-
- lib/generators/shopify_app/templates/app/views/sessions/new.html.erb
|
|
182
|
-
- lib/generators/shopify_app/templates/config/initializers/omniauth.rb
|
|
183
|
-
- lib/generators/shopify_app/templates/config/initializers/rails_4_shim.rb
|
|
184
|
-
- lib/generators/shopify_app/templates/config/initializers/shopify_session_repository.rb
|
|
185
|
-
- lib/generators/shopify_app/templates/public/404.html
|
|
186
|
-
- lib/generators/shopify_app/templates/public/422.html
|
|
187
|
-
- lib/generators/shopify_app/templates/public/500.html
|
|
188
|
-
- lib/generators/shopify_app/templates/public/favicon.png
|
|
189
|
-
- lib/generators/shopify_app/templates/public/shopify-114.png
|
|
190
|
-
- lib/generators/shopify_app/templates/public/shopify-57.png
|
|
191
|
-
- lib/generators/shopify_app/templates/public/shopify-72.png
|
|
188
|
+
- lib/generators/shopify_app/views/views_generator.rb
|
|
192
189
|
- lib/shopify_app.rb
|
|
193
190
|
- lib/shopify_app/configuration.rb
|
|
191
|
+
- lib/shopify_app/controller.rb
|
|
192
|
+
- lib/shopify_app/engine.rb
|
|
194
193
|
- lib/shopify_app/in_memory_session_store.rb
|
|
195
194
|
- lib/shopify_app/login_protection.rb
|
|
196
|
-
- lib/shopify_app/
|
|
195
|
+
- lib/shopify_app/sessions_controller.rb
|
|
196
|
+
- lib/shopify_app/shop.rb
|
|
197
197
|
- lib/shopify_app/shopify_session_repository.rb
|
|
198
198
|
- lib/shopify_app/version.rb
|
|
199
199
|
- shipit.rubygems.yml
|
|
200
200
|
- shopify_app.gemspec
|
|
201
|
-
- test/
|
|
202
|
-
- test/config/
|
|
203
|
-
- test/config/
|
|
204
|
-
- test/config/
|
|
205
|
-
- test/
|
|
206
|
-
- test/
|
|
207
|
-
- test/
|
|
208
|
-
- test/
|
|
201
|
+
- test/app_templates/app/controllers/application_controller.rb
|
|
202
|
+
- test/app_templates/config/application.rb
|
|
203
|
+
- test/app_templates/config/initializers/shopify_app.rb
|
|
204
|
+
- test/app_templates/config/routes.rb
|
|
205
|
+
- test/controllers/sessions_controller_test.rb
|
|
206
|
+
- test/dummy/app/controllers/application_controller.rb
|
|
207
|
+
- test/dummy/app/controllers/home_controller.rb
|
|
208
|
+
- test/dummy/config.ru
|
|
209
|
+
- test/dummy/config/application.rb
|
|
210
|
+
- test/dummy/config/boot.rb
|
|
211
|
+
- test/dummy/config/database.yml
|
|
212
|
+
- test/dummy/config/environment.rb
|
|
213
|
+
- test/dummy/config/environments/test.rb
|
|
214
|
+
- test/dummy/config/initializers/shopify_app.rb
|
|
215
|
+
- test/dummy/config/routes.rb
|
|
216
|
+
- test/dummy/config/secrets.yml
|
|
217
|
+
- test/generators/install_generator_test.rb
|
|
218
|
+
- test/generators/routes_generator_test.rb
|
|
219
|
+
- test/generators/shop_model_generator_test.rb
|
|
220
|
+
- test/generators/shopify_app_generator.rb
|
|
221
|
+
- test/generators/views_generator_test.rb
|
|
222
|
+
- test/shopify_app/configuration_test.rb
|
|
223
|
+
- test/shopify_app/in_memory_session_store_test.rb
|
|
224
|
+
- test/shopify_app/login_protection_test.rb
|
|
225
|
+
- test/shopify_app/shopify_session_repository_test.rb
|
|
226
|
+
- test/support/generator_test_helpers.rb
|
|
209
227
|
- test/test_helper.rb
|
|
210
|
-
homepage:
|
|
228
|
+
homepage:
|
|
211
229
|
licenses: []
|
|
212
230
|
metadata: {}
|
|
213
231
|
post_install_message:
|
|
@@ -225,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
225
243
|
- !ruby/object:Gem::Version
|
|
226
244
|
version: '0'
|
|
227
245
|
requirements: []
|
|
228
|
-
rubyforge_project:
|
|
246
|
+
rubyforge_project:
|
|
229
247
|
rubygems_version: 2.2.2
|
|
230
248
|
signing_key:
|
|
231
249
|
specification_version: 4
|
metadata.gz.sig
CHANGED
|
Binary file
|
data/install.rb
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
puts
|
|
2
|
-
puts "Shopify App Generator"
|
|
3
|
-
puts "---------------------"
|
|
4
|
-
puts
|
|
5
|
-
puts "To get started, first register your app as a Shopify Partner:"
|
|
6
|
-
puts
|
|
7
|
-
puts " * Go to http://www.shopify.com/partners and create or login to your Partner account."
|
|
8
|
-
puts
|
|
9
|
-
puts " * Jump over to the Apps tab and hit the 'Create a new app' button"
|
|
10
|
-
puts " (Make sure to set the Application URL to http://localhost:3000/login during development)"
|
|
11
|
-
puts
|
|
12
|
-
puts " * Install the Shopify API gem:
|
|
13
|
-
|
|
14
|
-
$ gem install shopify_api"
|
|
15
|
-
puts
|
|
16
|
-
puts " * Run
|
|
17
|
-
|
|
18
|
-
$ rails generate shopify_app your_app_api_key your_app_secret"
|
|
19
|
-
puts
|
|
20
|
-
puts " * Set up a test shop to install your app in (do this on the Partner site)"
|
|
21
|
-
puts
|
|
22
|
-
puts " * Run $ rails server"
|
|
23
|
-
puts
|
|
24
|
-
puts " * Visit http://localhost:3000 and use the test shop's URL to install this app"
|
|
25
|
-
puts
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
What's next?
|
|
4
|
-
------------
|
|
5
|
-
|
|
6
|
-
Make sure to set the Application URL of the application in your Shopify partner account
|
|
7
|
-
to <tt>http://localhost:3000/login</tt>.
|
|
8
|
-
|
|
9
|
-
Then, start your application with:
|
|
10
|
-
|
|
11
|
-
$ rails server
|
|
12
|
-
|
|
13
|
-
Now visit http://localhost:3000 and install your application in a Shopify store.
|
|
14
|
-
|
|
15
|
-
After your application has been given read or read/write API permission by the
|
|
16
|
-
shop, you're ready to start experimenting with the Shopify API.
|
|
17
|
-
|
|
18
|
-
Questions or problems?
|
|
19
|
-
----------------------
|
|
20
|
-
|
|
21
|
-
API Reference http://api.shopify.com
|
|
22
|
-
Developer Forums http://forums.shopify.com/categories/9
|
|
23
|
-
Developer Wiki http://wiki.shopify.com/Shopify_App_Development
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
Description:
|
|
2
|
-
This is a generator for creating a basic Shopify application to quickly get
|
|
3
|
-
you started. You can see some examples on how to use the Shopify API.
|
|
4
|
-
|
|
5
|
-
The generator creates a basic sessions controller for authenticating with your
|
|
6
|
-
Shop and a controller called "home" which displays basic information
|
|
7
|
-
about your products, orders and articles.
|
|
8
|
-
|
|
9
|
-
Note: It's recommended to use this on a new Rails project, so that the
|
|
10
|
-
generator won't overwrite/delete some of your files.
|
|
11
|
-
|
|
12
|
-
Usage:
|
|
13
|
-
Pass your API key and then your Secret, which the sessions controller
|
|
14
|
-
will need to authenticate with your shop.
|
|
15
|
-
If you don't have an API key yet, register your application in our
|
|
16
|
-
partner system at http://www.shopify.com/partners
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Examples:
|
|
20
|
-
script/generate shopify_app edffbb1bb793e2750686e6f4647a384a abbcee050...
|
|
21
|
-
|
|
22
|
-
This will create a sessions controller and a home controller and views.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// This is a manifest file that'll be compiled into including all the files listed below.
|
|
2
|
-
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
|
3
|
-
// be included in the compiled file accessible from http://example.com/assets/application.js
|
|
4
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
|
5
|
-
// the compiled file.
|
|
6
|
-
//
|
|
7
|
-
// If you need to customize any bootstrap js, we've placed the un-minified versions in
|
|
8
|
-
// assets/javascripts/bootstrap including the test suite that ships with bootstrap.
|
|
9
|
-
// Love,
|
|
10
|
-
// Shopify
|
|
11
|
-
//
|
|
12
|
-
//= require jquery
|
|
13
|
-
//= require jquery_ujs
|
|
14
|
-
//= require twitter/bootstrap
|
|
15
|
-
//= require_tree .
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* This is a manifest file that'll automatically include all the stylesheets available in this directory
|
|
3
|
-
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
|
4
|
-
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
|
5
|
-
*= require_self
|
|
6
|
-
*= require twitter/bootstrap
|
|
7
|
-
*= require imports
|
|
8
|
-
*= require shopify_app_buttons
|
|
9
|
-
*= require shopify_app
|
|
10
|
-
*/
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
/* SCSS
|
|
2
|
-
============================================================= */
|
|
3
|
-
/* Mixins */
|
|
4
|
-
@mixin rounded($px:3px) { -webkit-border-radius:$px; -moz-border-radius:$px; border-radius:$px; }
|
|
5
|
-
@mixin border-radius($tl,$tr,$br,$bl) { -webkit-border-radius:$tl $tr $br $bl; -moz-border-radius:$tl $tr $br $bl; border-radius:$tl $tr $br $bl; }
|
|
6
|
-
@mixin box-shadow($x:0,$y:1px,$spread:1px,$opac:0.15) { -moz-box-shadow:$x $y $spread rgba(0,0,0,$opac); -webkit-box-shadow:$x $y $spread rgba(0,0,0,$opac); box-shadow:$x $y $spread rgba(0,0,0,$opac); }
|
|
7
|
-
@mixin transition($properties:all,$timing:0.3s,$transition:ease-in-out) { -o-transition: $properties $timing $transition; -webkit-transition: $properties $timing $transition; -moz-transition: $properties $timing $transition; }
|
|
8
|
-
@mixin gradient($color1, $color2) { background-image:-o-linear-gradient($color1, $color2); background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, $color1),color-stop(1, $color2)); background-image: -moz-linear-gradient(center bottom,$color1 0%, $color2 100%); background-image: linear-gradient(top, $color1, $color2); }
|
|
9
|
-
|
|
10
|
-
/* Fonts */
|
|
11
|
-
$open-sans: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
12
|
-
|
|
13
|
-
/* Colours */
|
|
14
|
-
$col-blue: #40a1c9;
|
|
15
|
-
$col-blue-hover: #2a8eb7;
|
|
16
|
-
$col-blue-hover-light: #86cce9;
|
|
17
|
-
$col-green: #96c944;
|
|
18
|
-
$col-light-green: #c4ec84;
|
|
19
|
-
$col-green-hover: #87b936;
|
|
20
|
-
$col-grey: #818181;
|
|
21
|
-
$col-grey-hover: #d2d2d2;
|
|
22
|
-
$col-light-grey: #c3c2c3;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/* BOOTSTRAP OVERRIDES
|
|
26
|
-
============================================================= */
|
|
27
|
-
html, body { background-color: #eee; }
|
|
28
|
-
body { padding-top: 40px;}
|
|
29
|
-
|
|
30
|
-
footer { margin-top: 7px; padding-top: 7px; color:#aaa;}
|
|
31
|
-
|
|
32
|
-
a { color:$col-blue;
|
|
33
|
-
&:hover { color:$col-blue-hover; text-decoration:none;}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover {
|
|
37
|
-
background-color:$col-blue !important;
|
|
38
|
-
[class^="icon-"] { background-image: url('/assets/twitter/bootstrap/glyphicons-halflings-white.png');}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.container {
|
|
42
|
-
> footer p { text-align: center;}
|
|
43
|
-
> .content { background-color: #fff; padding: 20px; margin: 0 -20px; @include border-radius(0,0,6px,6px); @include box-shadow(0,1px,2px);}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.page-header h1 { color:$col-blue;}
|
|
47
|
-
|
|
48
|
-
.content { min-height: 500px;}
|
|
49
|
-
|
|
50
|
-
[class^="icon-"] { background-image: url('/assets/twitter/bootstrap/glyphicons-halflings.png');}
|
|
51
|
-
|
|
52
|
-
.icon-white { background-image: url('/assets/twitter/bootstrap/glyphicons-halflings-white.png');}
|
|
53
|
-
|
|
54
|
-
.navbar {
|
|
55
|
-
.brand { color: #fff;}
|
|
56
|
-
.navbar-inner { background-image:none; background-color:#000; box-shadow:none;}
|
|
57
|
-
.nav > li.active > a, .nav > li.active > a:hover { background-color: #222;}
|
|
58
|
-
p a { color: #ffffff;}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.navbar .nav > li > a:hover, .navbar .dropdown-menu a:hover { background-color: #171717;}
|
|
62
|
-
|
|
63
|
-
.btn-navbar {
|
|
64
|
-
background-color: #111;
|
|
65
|
-
background-image: none;
|
|
66
|
-
border-color:#222;
|
|
67
|
-
-webkit-box-shadow: none;
|
|
68
|
-
-moz-box-shadow: none;
|
|
69
|
-
box-shadow: none;
|
|
70
|
-
}
|
|
71
|
-
.btn-navbar:hover { border-color:#333;}
|
|
72
|
-
.btn-navbar:before { opacity:0;}
|
|
73
|
-
|
|
74
|
-
input:focus, textarea:focus {
|
|
75
|
-
border-color: rgba(64,161,201, 0.8);
|
|
76
|
-
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(64,161,201, 0.6);
|
|
77
|
-
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(64,161,201, 0.6);
|
|
78
|
-
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(64,161,201, 0.6);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
input[type=text].btn-large { height:20px;}
|
|
82
|
-
|
|
83
|
-
a.thumbnail:hover {
|
|
84
|
-
border-color: rgba(64,161,201, 0.8);
|
|
85
|
-
-webkit-box-shadow: 0 1px 4px rgba(64,161,201, 0.25);
|
|
86
|
-
-moz-box-shadow: 0 1px 4px rgba(64,161,201, 0.25);
|
|
87
|
-
box-shadow: 0 1px 4px rgba(64,161,201, 0.25);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
@media(max-width: 768px) {
|
|
91
|
-
.container > .content { @include rounded(0);}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
@media (max-width: 980px) {
|
|
95
|
-
body { padding-top: 0px !important;}
|
|
96
|
-
.navbar .nav.pull-right { display:none;}
|
|
97
|
-
.navbar-fixed-top { margin:0;}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
/* APP CSS
|
|
102
|
-
============================================================= */
|
|
103
|
-
/* General */
|
|
104
|
-
h1,h2,h3,h4,h5,h6,.brand {
|
|
105
|
-
font-family: $open-sans;
|
|
106
|
-
font-weight:normal;
|
|
107
|
-
small { letter-spacing:0px;}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
h1,h2 { letter-spacing:-1px;}
|
|
111
|
-
|
|
112
|
-
.polaroid { float:right; display:block; padding: 20px; margin: 0 0 50px 50px; border: 1px solid #ccc; border: 1px solid #fff; background: #f5f5f5;
|
|
113
|
-
@include gradient(#f5f5f5,#f0f0f0);
|
|
114
|
-
@include box-shadow(0,1px,5px,.5);
|
|
115
|
-
@include rounded(4px);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
#login-header { border-bottom:none;
|
|
119
|
-
h1 { text-align:center;}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/* Optional Bootstrap Overrides */
|
|
123
|
-
.accordion-body {
|
|
124
|
-
background: #f9f9f9;
|
|
125
|
-
.accordion-inner { padding:20px;
|
|
126
|
-
img { border:1px solid rgba(0,0,0,.07);}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.modal { max-height:700px; width:auto;
|
|
131
|
-
.modal-body { text-align:center;}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/* "Where do I start?" header -- you can delete this safely (all the way to the bottom) */
|
|
135
|
-
.jumbotron { background: #222; margin:-20px -20px 20px -20px; position: relative;}
|
|
136
|
-
.jumbotron h1 { font-size: 54px; line-height: 1; text-shadow: 0 1px 2px rgba(0, 0, 0, .5);}
|
|
137
|
-
.jumbotron h1, .jumbotron p { margin-right:0; margin-bottom: 9px; color: #fff; text-align: center; text-shadow: 0 1px 1px rgba(0, 0, 0, .3);}
|
|
138
|
-
.jumbotron .inner { background: transparent url('/assets/grid-18px.png') top center; padding: 45px 0;
|
|
139
|
-
-webkit-box-shadow: inset 0 -20px 300px rgba(0,0,0,.4); -moz-box-shadow: inset 0 -20px 300px rgba(0,0,0,.4);}
|
|
140
|
-
|
|
141
|
-
@media (max-width: 480px) {
|
|
142
|
-
.jumbotron h1,.jumbotron p { text-align: center; margin-right: 0;}
|
|
143
|
-
.jumbotron h1 { font-size: 45px; margin-right: 0;}
|
|
144
|
-
.jumbotron p { margin-right: 0; font-size: 18px; line-height: 24px;}}
|
|
145
|
-
@media (min-width: 480px) and (max-width: 768px) {
|
|
146
|
-
.jumbotron h1 { font-size: 54px;}
|
|
147
|
-
.jumbotron h1,.jumbotron p { margin-right: 0;}}
|
|
148
|
-
@media (min-width: 768px) and (max-width: 940px) {
|
|
149
|
-
.jumbotron h1 { font-size: 72px;}}
|
|
150
|
-
|