rails_dev_ssl 0.1.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 +7 -0
 - data/.gitignore +11 -0
 - data/.rspec +3 -0
 - data/.travis.yml +7 -0
 - data/CHANGELOG.md +3 -0
 - data/Gemfile +8 -0
 - data/Gemfile.lock +43 -0
 - data/LICENSE.txt +21 -0
 - data/README.md +76 -0
 - data/Rakefile +8 -0
 - data/bin/console +15 -0
 - data/bin/setup +8 -0
 - data/exe/rails_dev_ssl +6 -0
 - data/lib/rails_dev_ssl.rb +181 -0
 - data/lib/rails_dev_ssl/version.rb +5 -0
 - data/rails_dev_ssl.gemspec +44 -0
 - metadata +133 -0
 
    
        checksums.yaml
    ADDED
    
    | 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            SHA256:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 5eb40c157ca04088a45415622603010c48f8b41f0b2a4d9211f1b70c43b4a466
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 4551e5a7ebe4f1fe7131d66ef45eacb7cb8a0c85f352ceaf0b3e5d3555d1b748
         
     | 
| 
      
 5 
     | 
    
         
            +
            SHA512:
         
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 061e7139a0fd905fbbc2b99ab65960daec2f7878cc42ae39e128ef205eae1ad80b25c9ff3059ca0d868196dc7bee3c9376804d3f5f729854df56832d67cc381a
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 14228965a9b498f884816934dab64bc53c2e6a4b78c0c864b7b76499dd9f6ebddb26f1e3546425c10d264d6f529a115dacac6adacb3e50664d49928ec7ba2ed3
         
     | 
    
        data/.gitignore
    ADDED
    
    
    
        data/.rspec
    ADDED
    
    
    
        data/.travis.yml
    ADDED
    
    
    
        data/CHANGELOG.md
    ADDED
    
    
    
        data/Gemfile
    ADDED
    
    
    
        data/Gemfile.lock
    ADDED
    
    | 
         @@ -0,0 +1,43 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            PATH
         
     | 
| 
      
 2 
     | 
    
         
            +
              remote: .
         
     | 
| 
      
 3 
     | 
    
         
            +
              specs:
         
     | 
| 
      
 4 
     | 
    
         
            +
                rails_dev_ssl (0.1.0)
         
     | 
| 
      
 5 
     | 
    
         
            +
                  thor (~> 0.20.3)
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            GEM
         
     | 
| 
      
 8 
     | 
    
         
            +
              remote: https://rubygems.org/
         
     | 
| 
      
 9 
     | 
    
         
            +
              specs:
         
     | 
| 
      
 10 
     | 
    
         
            +
                coderay (1.1.2)
         
     | 
| 
      
 11 
     | 
    
         
            +
                diff-lcs (1.3)
         
     | 
| 
      
 12 
     | 
    
         
            +
                method_source (0.9.2)
         
     | 
| 
      
 13 
     | 
    
         
            +
                pry (0.12.2)
         
     | 
| 
      
 14 
     | 
    
         
            +
                  coderay (~> 1.1.0)
         
     | 
| 
      
 15 
     | 
    
         
            +
                  method_source (~> 0.9.0)
         
     | 
| 
      
 16 
     | 
    
         
            +
                rake (10.5.0)
         
     | 
| 
      
 17 
     | 
    
         
            +
                rspec (3.8.0)
         
     | 
| 
      
 18 
     | 
    
         
            +
                  rspec-core (~> 3.8.0)
         
     | 
| 
      
 19 
     | 
    
         
            +
                  rspec-expectations (~> 3.8.0)
         
     | 
| 
      
 20 
     | 
    
         
            +
                  rspec-mocks (~> 3.8.0)
         
     | 
| 
      
 21 
     | 
    
         
            +
                rspec-core (3.8.0)
         
     | 
| 
      
 22 
     | 
    
         
            +
                  rspec-support (~> 3.8.0)
         
     | 
| 
      
 23 
     | 
    
         
            +
                rspec-expectations (3.8.2)
         
     | 
| 
      
 24 
     | 
    
         
            +
                  diff-lcs (>= 1.2.0, < 2.0)
         
     | 
| 
      
 25 
     | 
    
         
            +
                  rspec-support (~> 3.8.0)
         
     | 
| 
      
 26 
     | 
    
         
            +
                rspec-mocks (3.8.0)
         
     | 
| 
      
 27 
     | 
    
         
            +
                  diff-lcs (>= 1.2.0, < 2.0)
         
     | 
| 
      
 28 
     | 
    
         
            +
                  rspec-support (~> 3.8.0)
         
     | 
| 
      
 29 
     | 
    
         
            +
                rspec-support (3.8.0)
         
     | 
| 
      
 30 
     | 
    
         
            +
                thor (0.20.3)
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
            PLATFORMS
         
     | 
| 
      
 33 
     | 
    
         
            +
              ruby
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
            DEPENDENCIES
         
     | 
| 
      
 36 
     | 
    
         
            +
              bundler (~> 1.17)
         
     | 
| 
      
 37 
     | 
    
         
            +
              pry (~> 0.12.2)
         
     | 
| 
      
 38 
     | 
    
         
            +
              rails_dev_ssl!
         
     | 
| 
      
 39 
     | 
    
         
            +
              rake (~> 10.0)
         
     | 
| 
      
 40 
     | 
    
         
            +
              rspec (~> 3.0)
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
            BUNDLED WITH
         
     | 
| 
      
 43 
     | 
    
         
            +
               1.17.1
         
     | 
    
        data/LICENSE.txt
    ADDED
    
    | 
         @@ -0,0 +1,21 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            The MIT License (MIT)
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            Copyright (c) 2018 Bart Agapinan
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            Permission is hereby granted, free of charge, to any person obtaining a copy
         
     | 
| 
      
 6 
     | 
    
         
            +
            of this software and associated documentation files (the "Software"), to deal
         
     | 
| 
      
 7 
     | 
    
         
            +
            in the Software without restriction, including without limitation the rights
         
     | 
| 
      
 8 
     | 
    
         
            +
            to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         
     | 
| 
      
 9 
     | 
    
         
            +
            copies of the Software, and to permit persons to whom the Software is
         
     | 
| 
      
 10 
     | 
    
         
            +
            furnished to do so, subject to the following conditions:
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            The above copyright notice and this permission notice shall be included in
         
     | 
| 
      
 13 
     | 
    
         
            +
            all copies or substantial portions of the Software.
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         
     | 
| 
      
 16 
     | 
    
         
            +
            IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         
     | 
| 
      
 17 
     | 
    
         
            +
            FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         
     | 
| 
      
 18 
     | 
    
         
            +
            AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         
     | 
| 
      
 19 
     | 
    
         
            +
            LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         
     | 
| 
      
 20 
     | 
    
         
            +
            OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
         
     | 
| 
      
 21 
     | 
    
         
            +
            THE SOFTWARE.
         
     | 
    
        data/README.md
    ADDED
    
    | 
         @@ -0,0 +1,76 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # RailsDevSsl
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            `rails-dev-ssl` is a command line utility that takes some of the work out of generating the SSL certificates for local development.
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            This utility will help you set up your development machine to serve your Rails API over HTTPS.
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            ## Installation
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            Add this line to your application's Gemfile:
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 12 
     | 
    
         
            +
            gem 'rails_dev_ssl', group: :development
         
     | 
| 
      
 13 
     | 
    
         
            +
            ```
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            And then execute:
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                $ bundle
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            Or install it yourself as:
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                $ gem install rails_dev_ssl
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            ## Usage
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
            #### Generate certificates
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
            `rails_dev_ssl generate_certificates` will create a new directory in your project folder called "ssl" and ask for information to be added to your local certificate authority. Inside the `ssl` directory will be your config file and `server.crt` and `server.key` files.
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
            #### Configuring puma
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
            If you use puma to serve your app, you can use your new certificates by passing them when calling puma:
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
            ```
         
     | 
| 
      
 34 
     | 
    
         
            +
            puma -C config/puma.rb -b 'ssl://127.0.0.1:<port>?key=./ssl/server.key&cert=./ssl/server.crt'
         
     | 
| 
      
 35 
     | 
    
         
            +
            ```
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
            or in `config/puma.rb`:
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
            ```
         
     | 
| 
      
 40 
     | 
    
         
            +
            ssl_bind '127.0.0.1', '<port>', {
         
     | 
| 
      
 41 
     | 
    
         
            +
              key: ./ssl/server.key,
         
     | 
| 
      
 42 
     | 
    
         
            +
              cert: ./ssl/server.crt
         
     | 
| 
      
 43 
     | 
    
         
            +
            }
         
     | 
| 
      
 44 
     | 
    
         
            +
            ```
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
            #### Customization
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
            You can change the certificate directory using `setup <directory>`, for example, `rails_dev_ssl setup lib/ssl` to put the certificates inside your lib directory.
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
            You can generate the `server.crt.cnf` file using the `generate_config` command.
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
            #### Browser warnings
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
            When you use your first self-signed certificate, your browser will warn you about an untrusted certificate authority. You'll need to trust the rootCA you created for your project.
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
            Chrome and Firefox will ask you to add the certificate authority in the app. To use Safari, you'll need to add the CA to your keychain. You can do this with the `add_ca_to_keychain` command.
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
            #### /etc/hosts
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
            You may want to add an entry to your `/etc/hosts` file to include the CN you set in the `generate_config` step. This will allow you to visit the domain in your browser instead of using 127.0.0.1 (for example, https://localhost.ssl/path/to/your/app.)
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
            ## Development
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
            After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
      
 66 
     | 
    
         
            +
            Note that `rake spec` will remove any existing `ssl` directory in your current working directory.
         
     | 
| 
      
 67 
     | 
    
         
            +
             
     | 
| 
      
 68 
     | 
    
         
            +
            To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
      
 70 
     | 
    
         
            +
            ## Contributing
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
            Bug reports and pull requests are welcome on GitHub at https://github.com/viamin/rails_dev_ssl.
         
     | 
| 
      
 73 
     | 
    
         
            +
             
     | 
| 
      
 74 
     | 
    
         
            +
            ## License
         
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
            The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
         
     | 
    
        data/Rakefile
    ADDED
    
    
    
        data/bin/console
    ADDED
    
    | 
         @@ -0,0 +1,15 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            #!/usr/bin/env ruby
         
     | 
| 
      
 2 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            require 'bundler/setup'
         
     | 
| 
      
 5 
     | 
    
         
            +
            require 'rails_dev_ssl'
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            # You can add fixtures and/or initialization code here to make experimenting
         
     | 
| 
      
 8 
     | 
    
         
            +
            # with your gem easier. You can also use a different console, if you like.
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            # (If you use this, don't forget to add pry to your Gemfile!)
         
     | 
| 
      
 11 
     | 
    
         
            +
            # require "pry"
         
     | 
| 
      
 12 
     | 
    
         
            +
            # Pry.start
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
            require 'irb'
         
     | 
| 
      
 15 
     | 
    
         
            +
            IRB.start(__FILE__)
         
     | 
    
        data/bin/setup
    ADDED
    
    
    
        data/exe/rails_dev_ssl
    ADDED
    
    
| 
         @@ -0,0 +1,181 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require 'rails_dev_ssl/version'
         
     | 
| 
      
 4 
     | 
    
         
            +
            require 'thor'
         
     | 
| 
      
 5 
     | 
    
         
            +
            require 'securerandom'
         
     | 
| 
      
 6 
     | 
    
         
            +
            require 'shellwords'
         
     | 
| 
      
 7 
     | 
    
         
            +
            require 'tempfile'
         
     | 
| 
      
 8 
     | 
    
         
            +
            require 'rubygems/user_interaction'
         
     | 
| 
      
 9 
     | 
    
         
            +
            require 'openssl'
         
     | 
| 
      
 10 
     | 
    
         
            +
            # require "pry"
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            module RailsDevSsl
         
     | 
| 
      
 13 
     | 
    
         
            +
              class CLI < Thor
         
     | 
| 
      
 14 
     | 
    
         
            +
                @@dir = ''
         
     | 
| 
      
 15 
     | 
    
         
            +
                @@config = {}
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                desc 'setup [directory]', "creates a new ssl directory (defaults to #{File.join(Dir.pwd, 'ssl')}"
         
     | 
| 
      
 18 
     | 
    
         
            +
                def setup(dir = File.join(Dir.pwd, 'ssl'))
         
     | 
| 
      
 19 
     | 
    
         
            +
                  @@dir = dir
         
     | 
| 
      
 20 
     | 
    
         
            +
                  Dir.mkdir(@@dir) unless Dir.exist?(@@dir)
         
     | 
| 
      
 21 
     | 
    
         
            +
                end
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                desc 'display_certificate', 'displays the information in your SSL certificate'
         
     | 
| 
      
 24 
     | 
    
         
            +
                def display_certificate
         
     | 
| 
      
 25 
     | 
    
         
            +
                  raise 'Certificate missing. Have you generated the certificate already?' unless File.exist?(File.join(dir, 'server.crt'))
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                  `openssl x509 -text -in #{File.join(dir, 'server.crt')} -noout`
         
     | 
| 
      
 28 
     | 
    
         
            +
                end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                desc 'generate_certificates', 'generate SSL certificates'
         
     | 
| 
      
 31 
     | 
    
         
            +
                option :'pem-file', type: :boolean, default: false
         
     | 
| 
      
 32 
     | 
    
         
            +
                def generate_certificates
         
     | 
| 
      
 33 
     | 
    
         
            +
                  raise "Directory (#{dir}) doesn't exist" unless Dir.exist?(dir)
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
                  begin
         
     | 
| 
      
 36 
     | 
    
         
            +
                    temp_file = password_file
         
     | 
| 
      
 37 
     | 
    
         
            +
                    safe_path = Shellwords.escape(temp_file.path)
         
     | 
| 
      
 38 
     | 
    
         
            +
                    generate_ca(safe_path)
         
     | 
| 
      
 39 
     | 
    
         
            +
                    generate_crt_and_key(options['pem-file'], safe_path)
         
     | 
| 
      
 40 
     | 
    
         
            +
                  ensure
         
     | 
| 
      
 41 
     | 
    
         
            +
                    temp_file.close!
         
     | 
| 
      
 42 
     | 
    
         
            +
                  end
         
     | 
| 
      
 43 
     | 
    
         
            +
                end
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
                desc 'add_ca_to_keychain', 'add certificate to OS X keychain (requires admin privileges)'
         
     | 
| 
      
 46 
     | 
    
         
            +
                def add_ca_to_keychain
         
     | 
| 
      
 47 
     | 
    
         
            +
                  puts 'Adding rootCA.pem to system keychain'
         
     | 
| 
      
 48 
     | 
    
         
            +
                  `sudo -p 'sudo password:' security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain #{File.join(dir, 'rootCA.pem')}`
         
     | 
| 
      
 49 
     | 
    
         
            +
                end
         
     | 
| 
      
 50 
     | 
    
         
            +
             
     | 
| 
      
 51 
     | 
    
         
            +
                # desc 'add_hosts_entry', 'add an entry to /etc/hosts to include the domain set in your certificate'
         
     | 
| 
      
 52 
     | 
    
         
            +
                # def add_hosts_entry(hosts_file = '/etc/hosts')
         
     | 
| 
      
 53 
     | 
    
         
            +
                #   entries = File.readlines(hosts_file).delete_if { |line| line.start_with?('#') }.map { |line| line.split(/\s/) }
         
     | 
| 
      
 54 
     | 
    
         
            +
                #   if entries.include?(['127.0.0.1', config['CN']])
         
     | 
| 
      
 55 
     | 
    
         
            +
                #     puts "/etc/hosts already contains an entry for #{config['CN']}"
         
     | 
| 
      
 56 
     | 
    
         
            +
                #     return
         
     | 
| 
      
 57 
     | 
    
         
            +
                #   end
         
     | 
| 
      
 58 
     | 
    
         
            +
                #   new_entry = "127.0.0.1\t#{config['CN']}\n"
         
     | 
| 
      
 59 
     | 
    
         
            +
                #   `sudo -p 'sudo password:' sh -c "echo #{new_entry} >> /etc/hosts"`
         
     | 
| 
      
 60 
     | 
    
         
            +
                # end
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
                desc 'generate_config', 'configure certificate information'
         
     | 
| 
      
 63 
     | 
    
         
            +
                option :'non-interactive', type: :boolean, default: false
         
     | 
| 
      
 64 
     | 
    
         
            +
                def generate_config
         
     | 
| 
      
 65 
     | 
    
         
            +
                  unless options['non-interactive']
         
     | 
| 
      
 66 
     | 
    
         
            +
                    country = ask("Enter the country of your organization [#{default_config[:C]}]")
         
     | 
| 
      
 67 
     | 
    
         
            +
                    state = ask("Enter the state of province of your organization [#{default_config[:ST]}]")
         
     | 
| 
      
 68 
     | 
    
         
            +
                    city = ask("Enter the city of your organization [#{default_config[:L]}]")
         
     | 
| 
      
 69 
     | 
    
         
            +
                    org = ask("Enter your organization name [#{default_config[:O]}]")
         
     | 
| 
      
 70 
     | 
    
         
            +
                    email = ask("Enter your email [#{default_config[:emailAddress]}]")
         
     | 
| 
      
 71 
     | 
    
         
            +
                    domain = ask("Enter your local SSL domain [#{default_config[:CN]}]")
         
     | 
| 
      
 72 
     | 
    
         
            +
                    @@config = { C: country, ST: state, L: city, O: org, emailAddress: email, CN: domain }
         
     | 
| 
      
 73 
     | 
    
         
            +
                  end
         
     | 
| 
      
 74 
     | 
    
         
            +
                  write_config_file
         
     | 
| 
      
 75 
     | 
    
         
            +
                end
         
     | 
| 
      
 76 
     | 
    
         
            +
             
     | 
| 
      
 77 
     | 
    
         
            +
                desc 'generate_v3_ext_file', 'generate subject alternative name extension file'
         
     | 
| 
      
 78 
     | 
    
         
            +
                def generate_v3_ext_file
         
     | 
| 
      
 79 
     | 
    
         
            +
                  raise 'server.csr.cnf missing. run rails_dev_ssl generate_config first' unless File.exist?(File.join(dir, 'server.csr.cnf'))
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
      
 81 
     | 
    
         
            +
                  puts "\n*** generating v3.ext"
         
     | 
| 
      
 82 
     | 
    
         
            +
                  configs = <<~CONFIG
         
     | 
| 
      
 83 
     | 
    
         
            +
                    authorityKeyIdentifier=keyid,issuer
         
     | 
| 
      
 84 
     | 
    
         
            +
                    basicConstraints=CA:FALSE
         
     | 
| 
      
 85 
     | 
    
         
            +
                    keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
         
     | 
| 
      
 86 
     | 
    
         
            +
                    subjectAltName = @alt_names
         
     | 
| 
      
 87 
     | 
    
         
            +
             
     | 
| 
      
 88 
     | 
    
         
            +
                    [alt_names]
         
     | 
| 
      
 89 
     | 
    
         
            +
                    DNS.1 = #{config['CN']}
         
     | 
| 
      
 90 
     | 
    
         
            +
                  CONFIG
         
     | 
| 
      
 91 
     | 
    
         
            +
                  File.open(File.join(dir, 'v3.ext'), 'w') { |file| file.write(configs) }
         
     | 
| 
      
 92 
     | 
    
         
            +
                end
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
      
 94 
     | 
    
         
            +
                private
         
     | 
| 
      
 95 
     | 
    
         
            +
             
     | 
| 
      
 96 
     | 
    
         
            +
                def ask(question)
         
     | 
| 
      
 97 
     | 
    
         
            +
                  puts question
         
     | 
| 
      
 98 
     | 
    
         
            +
                  $stdin.gets.chomp
         
     | 
| 
      
 99 
     | 
    
         
            +
                end
         
     | 
| 
      
 100 
     | 
    
         
            +
             
     | 
| 
      
 101 
     | 
    
         
            +
                def config
         
     | 
| 
      
 102 
     | 
    
         
            +
                  @config ||= if File.exist?(File.join(dir, 'server.csr.cnf'))
         
     | 
| 
      
 103 
     | 
    
         
            +
                                OpenSSL::Config.load(File.join(dir, 'server.csr.cnf'))['dn']
         
     | 
| 
      
 104 
     | 
    
         
            +
                              else
         
     | 
| 
      
 105 
     | 
    
         
            +
                                default_config.merge(@@config.delete_if { |_k, v| v == '' })
         
     | 
| 
      
 106 
     | 
    
         
            +
                  end
         
     | 
| 
      
 107 
     | 
    
         
            +
                end
         
     | 
| 
      
 108 
     | 
    
         
            +
             
     | 
| 
      
 109 
     | 
    
         
            +
                def default_config
         
     | 
| 
      
 110 
     | 
    
         
            +
                  {
         
     | 
| 
      
 111 
     | 
    
         
            +
                    C: 'US',
         
     | 
| 
      
 112 
     | 
    
         
            +
                    ST: 'California',
         
     | 
| 
      
 113 
     | 
    
         
            +
                    L: 'San Francisco',
         
     | 
| 
      
 114 
     | 
    
         
            +
                    O: 'My Organization',
         
     | 
| 
      
 115 
     | 
    
         
            +
                    emailAddress: 'rails-dev-ssl-user@example.com',
         
     | 
| 
      
 116 
     | 
    
         
            +
                    CN: 'localhost.ssl'
         
     | 
| 
      
 117 
     | 
    
         
            +
                  }
         
     | 
| 
      
 118 
     | 
    
         
            +
                end
         
     | 
| 
      
 119 
     | 
    
         
            +
             
     | 
| 
      
 120 
     | 
    
         
            +
                def dir
         
     | 
| 
      
 121 
     | 
    
         
            +
                  # TODO: read this from an environment variable
         
     | 
| 
      
 122 
     | 
    
         
            +
                  setup if @@dir == ''
         
     | 
| 
      
 123 
     | 
    
         
            +
                  @@dir
         
     | 
| 
      
 124 
     | 
    
         
            +
                end
         
     | 
| 
      
 125 
     | 
    
         
            +
             
     | 
| 
      
 126 
     | 
    
         
            +
                def generate_ca(password_file_path)
         
     | 
| 
      
 127 
     | 
    
         
            +
                  puts "\n*** generating rootCA.key"
         
     | 
| 
      
 128 
     | 
    
         
            +
                  `openssl genrsa -des3 -out #{File.join(dir, 'rootCA.key')} -passout file:#{password_file_path} 2048` unless File.exist?(File.join(dir, 'rootCA.key'))
         
     | 
| 
      
 129 
     | 
    
         
            +
             
     | 
| 
      
 130 
     | 
    
         
            +
                  puts "\n*** generating rootCA.pem"
         
     | 
| 
      
 131 
     | 
    
         
            +
                  `openssl req -x509 -new -nodes -key #{File.join(dir, 'rootCA.key')} -sha256 -days 1024 -out #{File.join(dir, 'rootCA.pem')} -passin file:#{password_file_path} -config #{File.join(dir, 'server.csr.cnf')}` unless File.exist?(File.join(dir, 'rootCA.pem'))
         
     | 
| 
      
 132 
     | 
    
         
            +
                end
         
     | 
| 
      
 133 
     | 
    
         
            +
             
     | 
| 
      
 134 
     | 
    
         
            +
                def generate_crt_and_key(_pem_file = false, password_file_path)
         
     | 
| 
      
 135 
     | 
    
         
            +
                  puts "\n*** generating server.key"
         
     | 
| 
      
 136 
     | 
    
         
            +
                  `openssl req -new -sha256 -nodes -out #{File.join(dir, 'server.csr')} -newkey rsa:2048 -keyout #{File.join(dir, 'server.key')} -config #{File.join(dir, 'server.csr.cnf')} -passin file:#{password_file_path}`
         
     | 
| 
      
 137 
     | 
    
         
            +
             
     | 
| 
      
 138 
     | 
    
         
            +
                  generate_v3_ext_file unless File.exist?(File.join(dir, 'v3.ext'))
         
     | 
| 
      
 139 
     | 
    
         
            +
             
     | 
| 
      
 140 
     | 
    
         
            +
                  puts "\n*** generating server.crt"
         
     | 
| 
      
 141 
     | 
    
         
            +
                  `openssl x509 -req -in #{File.join(dir, 'server.csr')} -CA #{File.join(dir, 'rootCA.pem')} -CAkey #{File.join(dir, 'rootCA.key')} -CAcreateserial -out #{File.join(dir, 'server.crt')} -days 500 -sha256 -extfile #{File.join(dir, 'v3.ext')} -passin file:#{password_file_path}`
         
     | 
| 
      
 142 
     | 
    
         
            +
                  # remove intermediary file
         
     | 
| 
      
 143 
     | 
    
         
            +
                  File.delete(File.join(dir, 'server.csr'))
         
     | 
| 
      
 144 
     | 
    
         
            +
                end
         
     | 
| 
      
 145 
     | 
    
         
            +
             
     | 
| 
      
 146 
     | 
    
         
            +
                def password_file(password = temp_password)
         
     | 
| 
      
 147 
     | 
    
         
            +
                  file = Tempfile.new('some_file')
         
     | 
| 
      
 148 
     | 
    
         
            +
                  file.write(password)
         
     | 
| 
      
 149 
     | 
    
         
            +
                  file.close
         
     | 
| 
      
 150 
     | 
    
         
            +
                  file
         
     | 
| 
      
 151 
     | 
    
         
            +
                end
         
     | 
| 
      
 152 
     | 
    
         
            +
             
     | 
| 
      
 153 
     | 
    
         
            +
                def temp_password
         
     | 
| 
      
 154 
     | 
    
         
            +
                  # We don't really care what the password is since this is only used on localhost
         
     | 
| 
      
 155 
     | 
    
         
            +
                  @temp_password ||= SecureRandom.hex(64)
         
     | 
| 
      
 156 
     | 
    
         
            +
                end
         
     | 
| 
      
 157 
     | 
    
         
            +
             
     | 
| 
      
 158 
     | 
    
         
            +
                def write_config_file
         
     | 
| 
      
 159 
     | 
    
         
            +
                  puts "\n*** Writing server.csr.cnf"
         
     | 
| 
      
 160 
     | 
    
         
            +
                  config_options = <<~CONFIG
         
     | 
| 
      
 161 
     | 
    
         
            +
                    [req]
         
     | 
| 
      
 162 
     | 
    
         
            +
                    default_bits = 2048
         
     | 
| 
      
 163 
     | 
    
         
            +
                    prompt = no
         
     | 
| 
      
 164 
     | 
    
         
            +
                    default_md = sha256
         
     | 
| 
      
 165 
     | 
    
         
            +
                    distinguished_name = dn
         
     | 
| 
      
 166 
     | 
    
         
            +
             
     | 
| 
      
 167 
     | 
    
         
            +
                    [dn]
         
     | 
| 
      
 168 
     | 
    
         
            +
                    C=#{config[:C]}
         
     | 
| 
      
 169 
     | 
    
         
            +
                    ST=#{config[:ST]}
         
     | 
| 
      
 170 
     | 
    
         
            +
                    L=#{config[:L]}
         
     | 
| 
      
 171 
     | 
    
         
            +
                    O=#{config[:O]}
         
     | 
| 
      
 172 
     | 
    
         
            +
                    OU=Test Domain
         
     | 
| 
      
 173 
     | 
    
         
            +
                    emailAddress=#{config[:emailAddress]}
         
     | 
| 
      
 174 
     | 
    
         
            +
                    CN=#{config[:CN]}
         
     | 
| 
      
 175 
     | 
    
         
            +
                  CONFIG
         
     | 
| 
      
 176 
     | 
    
         
            +
                  File.open(File.join(dir, 'server.csr.cnf'), 'w') { |file| file.write(config_options) }
         
     | 
| 
      
 177 
     | 
    
         
            +
                end
         
     | 
| 
      
 178 
     | 
    
         
            +
              end
         
     | 
| 
      
 179 
     | 
    
         
            +
             
     | 
| 
      
 180 
     | 
    
         
            +
              class Error < StandardError; end
         
     | 
| 
      
 181 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,44 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            lib = File.expand_path('lib', __dir__)
         
     | 
| 
      
 4 
     | 
    
         
            +
            $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
         
     | 
| 
      
 5 
     | 
    
         
            +
            require 'rails_dev_ssl/version'
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            Gem::Specification.new do |spec|
         
     | 
| 
      
 8 
     | 
    
         
            +
              spec.name          = 'rails_dev_ssl'
         
     | 
| 
      
 9 
     | 
    
         
            +
              spec.version       = RailsDevSsl::VERSION
         
     | 
| 
      
 10 
     | 
    
         
            +
              spec.authors       = ['Bart Agapinan']
         
     | 
| 
      
 11 
     | 
    
         
            +
              spec.email         = ['bart@sonic.net']
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
              spec.summary       = 'Use SSL for rails development'
         
     | 
| 
      
 14 
     | 
    
         
            +
              spec.description   = 'Generate SSL certificates for your rails development environment'
         
     | 
| 
      
 15 
     | 
    
         
            +
              spec.homepage      = 'https://github.com/viamin/rails_dev_ssl'
         
     | 
| 
      
 16 
     | 
    
         
            +
              spec.license       = 'MIT'
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
              # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
         
     | 
| 
      
 19 
     | 
    
         
            +
              # to allow pushing to a single host or delete this section to allow pushing to any host.
         
     | 
| 
      
 20 
     | 
    
         
            +
              if spec.respond_to?(:metadata)
         
     | 
| 
      
 21 
     | 
    
         
            +
                spec.metadata['homepage_uri'] = spec.homepage
         
     | 
| 
      
 22 
     | 
    
         
            +
                spec.metadata['source_code_uri'] = 'https://github.com/viamin/rails_dev_ssl'
         
     | 
| 
      
 23 
     | 
    
         
            +
                spec.metadata['changelog_uri'] = 'https://github.com/viamin/rails_dev_ssl/blob/master/CHANGELOG.md'
         
     | 
| 
      
 24 
     | 
    
         
            +
              else
         
     | 
| 
      
 25 
     | 
    
         
            +
                raise 'RubyGems 2.0 or newer is required to protect against ' \
         
     | 
| 
      
 26 
     | 
    
         
            +
                  'public gem pushes.'
         
     | 
| 
      
 27 
     | 
    
         
            +
              end
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
              # Specify which files should be added to the gem when it is released.
         
     | 
| 
      
 30 
     | 
    
         
            +
              # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
         
     | 
| 
      
 31 
     | 
    
         
            +
              spec.files = Dir.chdir(File.expand_path(__dir__)) do
         
     | 
| 
      
 32 
     | 
    
         
            +
                `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
         
     | 
| 
      
 33 
     | 
    
         
            +
              end
         
     | 
| 
      
 34 
     | 
    
         
            +
              spec.bindir        = 'exe'
         
     | 
| 
      
 35 
     | 
    
         
            +
              spec.executables   = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
         
     | 
| 
      
 36 
     | 
    
         
            +
              spec.require_paths = ['lib']
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
              spec.add_dependency 'thor', '~> 0.20.3'
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
              spec.add_development_dependency 'bundler', '~> 1.17'
         
     | 
| 
      
 41 
     | 
    
         
            +
              spec.add_development_dependency 'pry', '~> 0.12.2'
         
     | 
| 
      
 42 
     | 
    
         
            +
              spec.add_development_dependency 'rake', '~> 10.0'
         
     | 
| 
      
 43 
     | 
    
         
            +
              spec.add_development_dependency 'rspec', '~> 3.0'
         
     | 
| 
      
 44 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,133 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: rails_dev_ssl
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.0
         
     | 
| 
      
 5 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 6 
     | 
    
         
            +
            authors:
         
     | 
| 
      
 7 
     | 
    
         
            +
            - Bart Agapinan
         
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
      
 9 
     | 
    
         
            +
            bindir: exe
         
     | 
| 
      
 10 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2018-12-13 00:00:00.000000000 Z
         
     | 
| 
      
 12 
     | 
    
         
            +
            dependencies:
         
     | 
| 
      
 13 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 14 
     | 
    
         
            +
              name: thor
         
     | 
| 
      
 15 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 16 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 17 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 18 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 19 
     | 
    
         
            +
                    version: 0.20.3
         
     | 
| 
      
 20 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 21 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 22 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 23 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 24 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 25 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 26 
     | 
    
         
            +
                    version: 0.20.3
         
     | 
| 
      
 27 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 28 
     | 
    
         
            +
              name: bundler
         
     | 
| 
      
 29 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 30 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 31 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 33 
     | 
    
         
            +
                    version: '1.17'
         
     | 
| 
      
 34 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 35 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 36 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 37 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 38 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 39 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 40 
     | 
    
         
            +
                    version: '1.17'
         
     | 
| 
      
 41 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 42 
     | 
    
         
            +
              name: pry
         
     | 
| 
      
 43 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 44 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 45 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 46 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 47 
     | 
    
         
            +
                    version: 0.12.2
         
     | 
| 
      
 48 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 49 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 50 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 51 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 52 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 53 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 54 
     | 
    
         
            +
                    version: 0.12.2
         
     | 
| 
      
 55 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 56 
     | 
    
         
            +
              name: rake
         
     | 
| 
      
 57 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 58 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 59 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 60 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 61 
     | 
    
         
            +
                    version: '10.0'
         
     | 
| 
      
 62 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 63 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 64 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 65 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 66 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 67 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 68 
     | 
    
         
            +
                    version: '10.0'
         
     | 
| 
      
 69 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 70 
     | 
    
         
            +
              name: rspec
         
     | 
| 
      
 71 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 72 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 73 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 74 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 75 
     | 
    
         
            +
                    version: '3.0'
         
     | 
| 
      
 76 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 77 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 78 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 79 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 80 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 81 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 82 
     | 
    
         
            +
                    version: '3.0'
         
     | 
| 
      
 83 
     | 
    
         
            +
            description: Generate SSL certificates for your rails development environment
         
     | 
| 
      
 84 
     | 
    
         
            +
            email:
         
     | 
| 
      
 85 
     | 
    
         
            +
            - bart@sonic.net
         
     | 
| 
      
 86 
     | 
    
         
            +
            executables:
         
     | 
| 
      
 87 
     | 
    
         
            +
            - rails_dev_ssl
         
     | 
| 
      
 88 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 89 
     | 
    
         
            +
            extra_rdoc_files: []
         
     | 
| 
      
 90 
     | 
    
         
            +
            files:
         
     | 
| 
      
 91 
     | 
    
         
            +
            - ".gitignore"
         
     | 
| 
      
 92 
     | 
    
         
            +
            - ".rspec"
         
     | 
| 
      
 93 
     | 
    
         
            +
            - ".travis.yml"
         
     | 
| 
      
 94 
     | 
    
         
            +
            - CHANGELOG.md
         
     | 
| 
      
 95 
     | 
    
         
            +
            - Gemfile
         
     | 
| 
      
 96 
     | 
    
         
            +
            - Gemfile.lock
         
     | 
| 
      
 97 
     | 
    
         
            +
            - LICENSE.txt
         
     | 
| 
      
 98 
     | 
    
         
            +
            - README.md
         
     | 
| 
      
 99 
     | 
    
         
            +
            - Rakefile
         
     | 
| 
      
 100 
     | 
    
         
            +
            - bin/console
         
     | 
| 
      
 101 
     | 
    
         
            +
            - bin/setup
         
     | 
| 
      
 102 
     | 
    
         
            +
            - exe/rails_dev_ssl
         
     | 
| 
      
 103 
     | 
    
         
            +
            - lib/rails_dev_ssl.rb
         
     | 
| 
      
 104 
     | 
    
         
            +
            - lib/rails_dev_ssl/version.rb
         
     | 
| 
      
 105 
     | 
    
         
            +
            - rails_dev_ssl.gemspec
         
     | 
| 
      
 106 
     | 
    
         
            +
            homepage: https://github.com/viamin/rails_dev_ssl
         
     | 
| 
      
 107 
     | 
    
         
            +
            licenses:
         
     | 
| 
      
 108 
     | 
    
         
            +
            - MIT
         
     | 
| 
      
 109 
     | 
    
         
            +
            metadata:
         
     | 
| 
      
 110 
     | 
    
         
            +
              homepage_uri: https://github.com/viamin/rails_dev_ssl
         
     | 
| 
      
 111 
     | 
    
         
            +
              source_code_uri: https://github.com/viamin/rails_dev_ssl
         
     | 
| 
      
 112 
     | 
    
         
            +
              changelog_uri: https://github.com/viamin/rails_dev_ssl/blob/master/CHANGELOG.md
         
     | 
| 
      
 113 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
      
 114 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 115 
     | 
    
         
            +
            require_paths:
         
     | 
| 
      
 116 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 117 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 118 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 119 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 120 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 121 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 122 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 123 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 124 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 125 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 126 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 127 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 128 
     | 
    
         
            +
            rubyforge_project: 
         
     | 
| 
      
 129 
     | 
    
         
            +
            rubygems_version: 2.7.6
         
     | 
| 
      
 130 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
      
 131 
     | 
    
         
            +
            specification_version: 4
         
     | 
| 
      
 132 
     | 
    
         
            +
            summary: Use SSL for rails development
         
     | 
| 
      
 133 
     | 
    
         
            +
            test_files: []
         
     |