theme-juice 0.6.16 → 0.6.17
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
- data/README.md +2 -2
- data/lib/theme-juice/services/create.rb +8 -8
- data/lib/theme-juice/services/delete.rb +1 -1
- data/lib/theme-juice/version.rb +1 -1
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 861d3d2efbeb83173900e744154c99d6988d4865
         | 
| 4 | 
            +
              data.tar.gz: e659c97a76c127e5d262bbf7fa32c5c82620259f
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: ba71b391b7b2e18e5e9bbe7be90e4313aa8562cca7863e7dd9f182a049db24a55b278a01f9a84c1a2e90a564ceec8d1377f9b3b317535d18cb7d03748252f6b7
         | 
| 7 | 
            +
              data.tar.gz: 74d547daf3de5ac28859d4c04ad0393687d91181c776e53931a7404f223107c9dbc5bbfb2c6fd1a4ee2667e44d094224983dd8ee836e947ae6cc090a244b48da
         | 
    
        data/README.md
    CHANGED
    
    | @@ -91,7 +91,7 @@ tj setup [<SITE-NAME>] # Aliases: prep | |
| 91 91 | 
             
            ### Deleting a site from the VM: _(Does not remove your local site)_
         | 
| 92 92 | 
             
            Use this to remove a site from your development environment. This is only remove files that were generated by `tj`. including the database setup, development url, and shared directories. _It will not touch your local files._
         | 
| 93 93 | 
             
            ```bash
         | 
| 94 | 
            -
            tj delete <SITE-NAME> # Aliases: remove, trash, teardown
         | 
| 94 | 
            +
            tj delete <SITE-NAME> # Aliases: rm, remove, trash, teardown
         | 
| 95 95 | 
             
            ```
         | 
| 96 96 |  | 
| 97 97 | 
             
            #### Option flags:
         | 
| @@ -103,7 +103,7 @@ tj delete <SITE-NAME> # Aliases: remove, trash, teardown | |
| 103 103 | 
             
            ### Listing all `tj` sites in the VM:
         | 
| 104 104 | 
             
            Use this to list all sites within your development environment that were generated by `tj`.
         | 
| 105 105 | 
             
            ```bash
         | 
| 106 | 
            -
            tj list # Aliases: sites, show
         | 
| 106 | 
            +
            tj list # Aliases: ls, sites, show
         | 
| 107 107 | 
             
            ```
         | 
| 108 108 |  | 
| 109 109 | 
             
            ### Watching and compiling assets:
         | 
| @@ -121,7 +121,7 @@ module ThemeJuice | |
| 121 121 | 
             
                    def setup_wildcard_subdomains
         | 
| 122 122 | 
             
                        @interaction.log "Setting up wildcard subdomains"
         | 
| 123 123 |  | 
| 124 | 
            -
                        File.open File.expand_path("#{@environment.vvv_path}/Vagrantfile"), " | 
| 124 | 
            +
                        File.open File.expand_path("#{@environment.vvv_path}/Vagrantfile"), "a+" do |file|
         | 
| 125 125 | 
             
                            file.puts "\n"
         | 
| 126 126 | 
             
                            file.puts "###"
         | 
| 127 127 | 
             
                            file.puts "# Enable wildcard subdomains"
         | 
| @@ -163,7 +163,7 @@ module ThemeJuice | |
| 163 163 | 
             
                        vendor  = @interaction.prompt "Vendor command to use",                              :indent => 2, :default => "composer"
         | 
| 164 164 | 
             
                        install = @interaction.prompt "Commands to run on theme install (comma-delimited)", :indent => 2, :default => "composer install"
         | 
| 165 165 |  | 
| 166 | 
            -
                        File.open "#{@config_path}/tj.yml", " | 
| 166 | 
            +
                        File.open "#{@config_path}/tj.yml", "w" do |file|
         | 
| 167 167 | 
             
                            file.puts "commands:"
         | 
| 168 168 | 
             
                            file.puts "\s\swatch: #{watch}"
         | 
| 169 169 | 
             
                            file.puts "\s\sserver: #{server}"
         | 
| @@ -187,7 +187,7 @@ module ThemeJuice | |
| 187 187 | 
             
                    def setup_hosts
         | 
| 188 188 | 
             
                        @interaction.log "Setting up hosts"
         | 
| 189 189 |  | 
| 190 | 
            -
                        File.open "#{@opts[:site_location]}/vvv-hosts", " | 
| 190 | 
            +
                        File.open "#{@opts[:site_location]}/vvv-hosts", "w" do |file|
         | 
| 191 191 | 
             
                            file.puts @opts[:site_dev_url]
         | 
| 192 192 | 
             
                        end
         | 
| 193 193 |  | 
| @@ -204,7 +204,7 @@ module ThemeJuice | |
| 204 204 | 
             
                    def setup_database
         | 
| 205 205 | 
             
                        @interaction.log "Setting up database"
         | 
| 206 206 |  | 
| 207 | 
            -
                        File.open File.expand_path("#{@environment.vvv_path}/database/init-custom.sql"), " | 
| 207 | 
            +
                        File.open File.expand_path("#{@environment.vvv_path}/database/init-custom.sql"), "a+" do |file|
         | 
| 208 208 | 
             
                            file.puts "### Begin '#{@opts[:site_name]}'"
         | 
| 209 209 | 
             
                            file.puts "#"
         | 
| 210 210 | 
             
                            file.puts "# This block is automatically generated by Theme Juice. Do not edit."
         | 
| @@ -228,7 +228,7 @@ module ThemeJuice | |
| 228 228 | 
             
                    def setup_nginx
         | 
| 229 229 | 
             
                        @interaction.log "Setting up nginx"
         | 
| 230 230 |  | 
| 231 | 
            -
                        File.open "#{@opts[:site_location]}/vvv-nginx.conf", " | 
| 231 | 
            +
                        File.open "#{@opts[:site_location]}/vvv-nginx.conf", "w" do |file|
         | 
| 232 232 | 
             
                            file.puts "server {"
         | 
| 233 233 | 
             
                            file.puts "\tlisten 80;"
         | 
| 234 234 | 
             
                            file.puts "\tserver_name .#{@opts[:site_dev_url]};"
         | 
| @@ -250,7 +250,7 @@ module ThemeJuice | |
| 250 250 | 
             
                    def setup_env
         | 
| 251 251 | 
             
                        @interaction.log "Setting up environment"
         | 
| 252 252 |  | 
| 253 | 
            -
                        File.open "#{@opts[:site_location]}/.env.development", " | 
| 253 | 
            +
                        File.open "#{@opts[:site_location]}/.env.development", "w" do |file|
         | 
| 254 254 | 
             
                            file.puts "DB_NAME=#{@opts[:site_db_name]}"
         | 
| 255 255 | 
             
                            file.puts "DB_USER=#{@opts[:site_db_user]}"
         | 
| 256 256 | 
             
                            file.puts "DB_PASSWORD=#{@opts[:site_db_pass]}"
         | 
| @@ -294,7 +294,7 @@ module ThemeJuice | |
| 294 294 | 
             
                    def setup_synced_folder
         | 
| 295 295 | 
             
                        @interaction.log "Syncing host theme with VM"
         | 
| 296 296 |  | 
| 297 | 
            -
                        File.open File.expand_path("#{@environment.vvv_path}/Vagrantfile"), " | 
| 297 | 
            +
                        File.open File.expand_path("#{@environment.vvv_path}/Vagrantfile"), "a+" do |file|
         | 
| 298 298 | 
             
                            file.puts "### Begin '#{@opts[:site_name]}'"
         | 
| 299 299 | 
             
                            file.puts "#"
         | 
| 300 300 | 
             
                            file.puts "# This block is automatically generated by Theme Juice. Do not edit."
         | 
| @@ -342,7 +342,7 @@ module ThemeJuice | |
| 342 342 | 
             
                    def setup_wpcli
         | 
| 343 343 | 
             
                        @interaction.log "Setting up WP-CLI"
         | 
| 344 344 |  | 
| 345 | 
            -
                        File.open "#{@opts[:site_location]}/wp-cli.local.yml", " | 
| 345 | 
            +
                        File.open "#{@opts[:site_location]}/wp-cli.local.yml", "a+" do |file|
         | 
| 346 346 | 
             
                            file.puts "require:"
         | 
| 347 347 | 
             
                            file.puts "\t- vendor/autoload.php"
         | 
| 348 348 | 
             
                            file.puts "ssh:"
         | 
| @@ -93,7 +93,7 @@ module ThemeJuice | |
| 93 93 | 
             
                            # Create new tempfile
         | 
| 94 94 | 
             
                            output_file = Tempfile.new File.basename(input_file)
         | 
| 95 95 | 
             
                            # Copy over contents of actual file to tempfile
         | 
| 96 | 
            -
                            open File.expand_path(input_file), " | 
| 96 | 
            +
                            open File.expand_path(input_file), "r" do |file|
         | 
| 97 97 | 
             
                                # Remove traces of theme from contents
         | 
| 98 98 | 
             
                                output_file.write "#{file.read}".gsub(/(### Begin '#{@opts[:site_name]}')(.*?)(### End '#{@opts[:site_name]}')\n+/m, "")
         | 
| 99 99 | 
             
                            end
         | 
    
        data/lib/theme-juice/version.rb
    CHANGED