stripe_wrapper 0.1.2 → 0.1.3
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
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 8dacfc5e9401dc686d918c34c3d27f970606eb0a
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: be0801338a3c717b62e81292d915240a92c7bad9
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: a2d115f6e31de280329e9b9808493db1406d0e2b9fe05386f35406dbee5ca0486f7b6f8da6ac08db66898dc2b1a4536e449f6246c197dfdf24bc866eea226f60
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: e626e56eda8a74c6524cf491f09d4de9efaa4ae408fbe01b4f5bdd0cd17a5265a61fe70df8fa026c916c16c46540615aa337f1501778473da030696a64bef097
         
     | 
| 
         @@ -0,0 +1,11 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            Description:
         
     | 
| 
      
 2 
     | 
    
         
            +
                Mounts this engine to /stripe_wrapper.
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            Example:
         
     | 
| 
      
 5 
     | 
    
         
            +
                rails generate stripe_wrapper:install
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                This will create in config/routes.rb:
         
     | 
| 
      
 8 
     | 
    
         
            +
                    mount StripeWrapper::Engine => "/stripe_wrapper"
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                It also creates a migration in db/migrate that installs a
         
     | 
| 
      
 11 
     | 
    
         
            +
                `stripe_wrapper_customers` and `stripe_wrapper_charges` in order to see the Charges and Customers related with your app.
         
     | 
| 
         @@ -0,0 +1,36 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'rails/generators'
         
     | 
| 
      
 2 
     | 
    
         
            +
            module StripeWrapper
         
     | 
| 
      
 3 
     | 
    
         
            +
              class InstallGenerator < Rails::Generators::Base
         
     | 
| 
      
 4 
     | 
    
         
            +
                source_root File.expand_path('../templates', __FILE__)
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
                def install_migration
         
     | 
| 
      
 7 
     | 
    
         
            +
                  rake 'stripe_wrapper:install:migrations'
         
     | 
| 
      
 8 
     | 
    
         
            +
                end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                def mount_engine
         
     | 
| 
      
 11 
     | 
    
         
            +
                  route 'mount StripeWrapper::Engine => "/stripe_wrapper", as: "stripe_wrapper"'
         
     | 
| 
      
 12 
     | 
    
         
            +
                end
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                def copy_files
         
     | 
| 
      
 15 
     | 
    
         
            +
                  # controllers
         
     | 
| 
      
 16 
     | 
    
         
            +
                  source = File.join(Gem.loaded_specs["stripe_wrapper"].full_gem_path, "app", "controllers", "stripe_wrapper")
         
     | 
| 
      
 17 
     | 
    
         
            +
                  target = File.join(Rails.root, "app", "controllers", "stripe_wrapper")
         
     | 
| 
      
 18 
     | 
    
         
            +
                  FileUtils.cp_r source, target
         
     | 
| 
      
 19 
     | 
    
         
            +
                  # models
         
     | 
| 
      
 20 
     | 
    
         
            +
                  source = File.join(Gem.loaded_specs["stripe_wrapper"].full_gem_path, "app", "models", "stripe_wrapper")
         
     | 
| 
      
 21 
     | 
    
         
            +
                  target = File.join(Rails.root, "app", "models", "stripe_wrapper")
         
     | 
| 
      
 22 
     | 
    
         
            +
                  FileUtils.cp_r source, target
         
     | 
| 
      
 23 
     | 
    
         
            +
                  # views
         
     | 
| 
      
 24 
     | 
    
         
            +
                  source = File.join(Gem.loaded_specs["stripe_wrapper"].full_gem_path, "app", "views", "stripe_wrapper")
         
     | 
| 
      
 25 
     | 
    
         
            +
                  target = File.join(Rails.root, "app", "views", "stripe_wrapper")
         
     | 
| 
      
 26 
     | 
    
         
            +
                  FileUtils.cp_r source, target
         
     | 
| 
      
 27 
     | 
    
         
            +
                  # locales
         
     | 
| 
      
 28 
     | 
    
         
            +
                  source = File.join(Gem.loaded_specs["stripe_wrapper"].full_gem_path, "config", "locales", "en.yml")
         
     | 
| 
      
 29 
     | 
    
         
            +
                  target = File.join(Rails.root, "config", "locales", "stripe_wrapper.en.yml")
         
     | 
| 
      
 30 
     | 
    
         
            +
                  FileUtils.cp source, target
         
     | 
| 
      
 31 
     | 
    
         
            +
                  source = File.join(Gem.loaded_specs["stripe_wrapper"].full_gem_path, "config", "locales", "es.yml")
         
     | 
| 
      
 32 
     | 
    
         
            +
                  target = File.join(Rails.root, "config", "locales", "stripe_wrapper.es.yml")
         
     | 
| 
      
 33 
     | 
    
         
            +
                  FileUtils.cp source, target
         
     | 
| 
      
 34 
     | 
    
         
            +
                end
         
     | 
| 
      
 35 
     | 
    
         
            +
              end
         
     | 
| 
      
 36 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: stripe_wrapper
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.3
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - John Peebles | @waclock
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2016-12- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2016-12-20 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rails
         
     | 
| 
         @@ -378,6 +378,8 @@ files: 
     | 
|
| 
       378 
378 
     | 
    
         
             
            - config/routes.rb
         
     | 
| 
       379 
379 
     | 
    
         
             
            - db/migrate/20161215195603_create_stripe_wrapper_customers.rb
         
     | 
| 
       380 
380 
     | 
    
         
             
            - db/migrate/20161215195608_create_stripe_wrapper_charges.rb
         
     | 
| 
      
 381 
     | 
    
         
            +
            - lib/generators/stripe_wrapper/install/USAGE
         
     | 
| 
      
 382 
     | 
    
         
            +
            - lib/generators/stripe_wrapper/install/install_generator.rb
         
     | 
| 
       381 
383 
     | 
    
         
             
            - lib/stripe_wrapper.rb
         
     | 
| 
       382 
384 
     | 
    
         
             
            - lib/stripe_wrapper/engine.rb
         
     | 
| 
       383 
385 
     | 
    
         
             
            - lib/stripe_wrapper/main_app_route_delegator.rb
         
     |