<commit_before>= Shopify application generator for Rails 3.2

== Description

This gem makes it easy to get a Rails 3.2 app up and running with the
Shopify API.

The generator creates a basic SessionsController for authenticating with your
shop and a HomeController which displays basic information about your
products, orders and articles.

<i>Note: It's recommended to use this on a new Rails project, so that the
generator won't overwrite/delete some of your files.</i>

== Installation
    # Create a new rails app
    $ rails new my_shopify_app
    $ cd my_shopify_app

    # Add the gem shopify_app to your Gemfile
    $ echo "gem 'shopify_app'" >> Gemfile
    $ bundle install

== Usage

    $ rails generate shopify_app your_app_api_key your_app_secret

If you don't have an API key yet, create a Shopify Partner account at
http://shopify.com/partners and create an app. You can also create test shops
once you're logged in as a partner.

When you create your app in the Shopify Partner Account, set the Application Callback URL to
<tt>http://localhost:3000</tt>

You can also create a private application that only works for your shop by
visiting https://YOUR-SHOP.myshopify.com/admin/api

=== Example

    $ rails generate shopify_app edffbb1bb793e2750686e6f4647a384a fed5bb18hde3e2750686e6f4647a781a

This will create a LoginController and a HomeController with their own views.


== Set your required API permissions

Before making API requests, your application must state which API permissions it requires from the shop it's installed in. These requested permissions will be listed on the screen the merchant sees when approving your app to be installed in their shop.

Start by reviewing the documentation on API permission scopes: http://docs.shopify.com/api/tutorials/oauth

When you know which ones your app will need, add a scope line to the <tt>config/initializers/omniauth.rb</tt> file.

=== Example

Make this change to request write access to products and read access to orders:

    Rails.application.config.middleware.use OmniAuth::Builder do
        provider :shopify, 
           ShopifyApp.configuration.api_key, 
           ShopifyApp.configuration.secret,<commit_msg>Callback URL now shows protocol<commit_after>= Shopify application generator for Rails 3.2

== Description

This gem makes it easy to get a Rails 3.2 app up and running with the
Shopify API.

The generator creates a basic SessionsController for authenticating with your
shop and a HomeController which displays basic information about your
products, orders and articles.

<i>Note: It's recommended to use this on a new Rails project, so that the
generator won't overwrite/delete some of your files.</i>

== Installation
    # Create a new rails app
    $ rails new my_shopify_app
    $ cd my_shopify_app

    # Add the gem shopify_app to your Gemfile
    $ echo "gem 'shopify_app'" >> Gemfile
    $ bundle install

== Usage

    $ rails generate shopify_app your_app_api_key your_app_secret

If you don't have an API key yet, create a Shopify Partner account at
http://shopify.com/partners and create an app. You can also create test shops
once you're logged in as a partner.

When you create your app in the Shopify Partner Account, set the Application Callback URL to

	http://localhost:3000

You can also create a private application that only works for your shop by
visiting https://YOUR-SHOP.myshopify.com/admin/api

=== Example

    $ rails generate shopify_app edffbb1bb793e2750686e6f4647a384a fed5bb18hde3e2750686e6f4647a781a

This will create a LoginController and a HomeController with their own views.


== Set your required API permissions

Before making API requests, your application must state which API permissions it requires from the shop it's installed in. These requested permissions will be listed on the screen the merchant sees when approving your app to be installed in their shop.

Start by reviewing the documentation on API permission scopes: http://docs.shopify.com/api/tutorials/oauth

When you know which ones your app will need, add a scope line to the <tt>config/initializers/omniauth.rb</tt> file.

=== Example

Make this change to request write access to products and read access to orders:

    Rails.application.config.middleware.use OmniAuth::Builder do
        provider :shopify, 
           ShopifyApp.configuration.api_key, 
           ShopifyApp.configuration.secret,
{'fraction_non_alphanumeric': 0.0510783200908059, 'fraction_numerical': 0.020885357548240637, 'mean_word_length': 4.099537037037037, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3978930', 'n_tokens_mistral': 1269, 'n_tokens_neox': 1165, 'n_words': 561}