shopify_app 6.4.2 → 7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +13 -0
- data/ISSUE_TEMPLATE.md +14 -0
- data/QUICKSTART.md +6 -7
- data/README.md +38 -16
- data/Rakefile +2 -6
- data/app/controllers/shopify_app/authenticated_controller.rb +7 -0
- data/app/controllers/shopify_app/sessions_controller.rb +5 -0
- data/app/controllers/shopify_app/webhooks_controller.rb +27 -0
- data/app/views/{sessions → shopify_app/sessions}/new.html.erb +0 -0
- data/config/routes.rb +4 -0
- data/lib/generators/shopify_app/add_webhook/add_webhook_generator.rb +61 -0
- data/lib/generators/shopify_app/add_webhook/templates/webhook_job.rb +8 -0
- data/lib/generators/shopify_app/controllers/controllers_generator.rb +1 -1
- data/lib/generators/shopify_app/home_controller/home_controller_generator.rb +0 -1
- data/lib/generators/shopify_app/home_controller/templates/home_controller.rb +1 -1
- data/lib/generators/shopify_app/install/install_generator.rb +13 -19
- data/lib/generators/shopify_app/install/templates/embedded_app.html.erb +2 -2
- data/lib/generators/shopify_app/install/templates/shopify_app.rb +3 -4
- data/lib/generators/shopify_app/install/templates/shopify_provider.rb +0 -1
- data/lib/generators/shopify_app/routes/templates/routes.rb +4 -0
- data/lib/generators/shopify_app/shopify_app_generator.rb +1 -7
- data/lib/shopify_app.rb +2 -3
- data/lib/shopify_app/configuration.rb +0 -1
- data/lib/shopify_app/engine.rb +1 -0
- data/lib/shopify_app/login_protection.rb +53 -5
- data/lib/shopify_app/{sessions_controller.rb → sessions_concern.rb} +5 -5
- data/lib/shopify_app/version.rb +1 -1
- data/lib/shopify_app/webhook_verification.rb +35 -0
- data/shopify_app.gemspec +1 -1
- metadata +11 -43
- data/CONTRIBUTING.md +0 -14
- data/app/controllers/authenticated_controller.rb +0 -5
- data/app/controllers/sessions_controller.rb +0 -3
- data/lib/shopify_app/controller.rb +0 -18
- data/lib/shopify_app/webhooks_controller.rb +0 -35
- data/test/app_templates/app/controllers/application_controller.rb +0 -2
- data/test/app_templates/config/application.rb +0 -24
- data/test/app_templates/config/initializers/shopify_app.rb +0 -6
- data/test/app_templates/config/routes.rb +0 -4
- data/test/controllers/sessions_controller_test.rb +0 -122
- data/test/controllers/sessions_routes_test.rb +0 -27
- data/test/dummy/Rakefile +0 -6
- data/test/dummy/app/controllers/application_controller.rb +0 -3
- data/test/dummy/app/controllers/home_controller.rb +0 -7
- data/test/dummy/config.ru +0 -4
- data/test/dummy/config/application.rb +0 -26
- data/test/dummy/config/boot.rb +0 -5
- data/test/dummy/config/database.yml +0 -25
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/test.rb +0 -42
- data/test/dummy/config/initializers/shopify_app.rb +0 -6
- data/test/dummy/config/routes.rb +0 -10
- data/test/dummy/config/secrets.yml +0 -17
- data/test/generators/controllers_generator_test.rb +0 -16
- data/test/generators/home_controller_generator_test.rb +0 -50
- data/test/generators/install_generator_test.rb +0 -87
- data/test/generators/routes_generator_test.rb +0 -26
- data/test/generators/shop_model_generator_test.rb +0 -39
- data/test/generators/shopify_app_generator.rb +0 -15
- data/test/generators/views_generator_test.rb +0 -15
- data/test/shopify_app/configuration_test.rb +0 -49
- data/test/shopify_app/in_memory_session_store_test.rb +0 -35
- data/test/shopify_app/login_protection_test.rb +0 -100
- data/test/shopify_app/shopify_session_repository_test.rb +0 -73
- data/test/shopify_app/utils_test.rb +0 -30
- data/test/shopify_app/webhooks_controller_test.rb +0 -50
- data/test/shopify_app/webhooks_manager_test.rb +0 -86
- data/test/support/generator_test_helpers.rb +0 -29
- data/test/test_helper.rb +0 -17
@@ -1,29 +0,0 @@
|
|
1
|
-
module GeneratorTestHelpers
|
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
DELETED
@@ -1,17 +0,0 @@
|
|
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'
|
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
|
12
|
-
|
13
|
-
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
14
|
-
|
15
|
-
class ActiveSupport::TestCase
|
16
|
-
include GeneratorTestHelpers
|
17
|
-
end
|