vagrant-solidus 0.2.1 → 1.0.0.rc1
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,15 +1,15 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            !binary "U0hBMQ==":
         
     | 
| 
       3 
3 
     | 
    
         
             
              metadata.gz: !binary |-
         
     | 
| 
       4 
     | 
    
         
            -
                 
     | 
| 
      
 4 
     | 
    
         
            +
                M2UwNDQxYTFhODI2MTdjMjRhYjk4ZjYyNjVmMTg3NDYyMDFiMDc4ZA==
         
     | 
| 
       5 
5 
     | 
    
         
             
              data.tar.gz: !binary |-
         
     | 
| 
       6 
     | 
    
         
            -
                 
     | 
| 
      
 6 
     | 
    
         
            +
                MzRiM2UzMTc4NTc0NjYwMTRhOGFjNDE2YjcxM2QyNDgxNmMyNWNjNw==
         
     | 
| 
       7 
7 
     | 
    
         
             
            SHA512:
         
     | 
| 
       8 
8 
     | 
    
         
             
              metadata.gz: !binary |-
         
     | 
| 
       9 
     | 
    
         
            -
                 
     | 
| 
       10 
     | 
    
         
            -
                 
     | 
| 
       11 
     | 
    
         
            -
                 
     | 
| 
      
 9 
     | 
    
         
            +
                YzY1YjU0YjA2N2RmZTgxNDhjN2Y1MGNiYmQ2OTQ5YmIwMjBlMWI0MDllN2Yz
         
     | 
| 
      
 10 
     | 
    
         
            +
                ZjlkY2Q0NTYzODQ5YmQ5YmU3YWNiOWU1MWQ0YmIzNGE5OGU0MzdkMzQ3MTVj
         
     | 
| 
      
 11 
     | 
    
         
            +
                N2Q5OGQ0M2NlMWMxOGFmZDVmMmYzNzJlN2NkOWVjOTkyNDc3NTI=
         
     | 
| 
       12 
12 
     | 
    
         
             
              data.tar.gz: !binary |-
         
     | 
| 
       13 
     | 
    
         
            -
                 
     | 
| 
       14 
     | 
    
         
            -
                 
     | 
| 
       15 
     | 
    
         
            -
                 
     | 
| 
      
 13 
     | 
    
         
            +
                MjM1MzVhYmEyMjc0YTNmZDllM2MzMmM1YzVhYWIyZTk2YjVlZTgwNGQ3NjVj
         
     | 
| 
      
 14 
     | 
    
         
            +
                ZmFlYTI3YzlmYjg2ZmMyYWE5NjRlODNlNzg2NzNjZWFhYTdiY2RhMjg3NDY3
         
     | 
| 
      
 15 
     | 
    
         
            +
                OGEyOTE4NjIzOWIzY2NiMTdmYTVmYmUxNmY5ZGM2OGYyYjQ5ODA=
         
     | 
| 
         @@ -39,8 +39,7 @@ module VagrantPlugins 
     | 
|
| 
       39 
39 
     | 
    
         
             
                    execute('nvm use 0.10.22')
         
     | 
| 
       40 
40 
     | 
    
         
             
                    execute('nvm alias default 0.10.22')
         
     | 
| 
       41 
41 
     | 
    
         | 
| 
       42 
     | 
    
         
            -
                    @env.ui.info('Installing grunt 
     | 
| 
       43 
     | 
    
         
            -
                    execute('npm install grunt-cli@"~0.1.13" -g')
         
     | 
| 
      
 42 
     | 
    
         
            +
                    @env.ui.info('Installing grunt-init')
         
     | 
| 
       44 
43 
     | 
    
         
             
                    execute('npm install grunt-init@"~0.3.1" -g')
         
     | 
| 
       45 
44 
     | 
    
         | 
| 
       46 
45 
     | 
    
         
             
                    @env.ui.info('Configuring rubygems')
         
     | 
| 
         @@ -54,6 +53,12 @@ module VagrantPlugins 
     | 
|
| 
       54 
53 
     | 
    
         
             
                    execute('rvm rvmrc warning ignore allGemfiles')
         
     | 
| 
       55 
54 
     | 
    
         
             
                    execute('rvm use --default ruby-1.9.3-p545')
         
     | 
| 
       56 
55 
     | 
    
         | 
| 
      
 56 
     | 
    
         
            +
                    @env.ui.info('Updating libstdc++')
         
     | 
| 
      
 57 
     | 
    
         
            +
                    execute('apt-get -y install python-software-properties', sudo: true)
         
     | 
| 
      
 58 
     | 
    
         
            +
                    execute('add-apt-repository -y ppa:ubuntu-toolchain-r/test', sudo: true)
         
     | 
| 
      
 59 
     | 
    
         
            +
                    execute('apt-get update', sudo: true)
         
     | 
| 
      
 60 
     | 
    
         
            +
                    execute('DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade', sudo: true)
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
       57 
62 
     | 
    
         
             
                    @env.ui.info('Configuring bash')
         
     | 
| 
       58 
63 
     | 
    
         
             
                    @machine.communicate.upload(File.expand_path('provisioner/.bashrc', File.dirname(__FILE__)), '/home/vagrant/.bashrc-vagrant-solidus')
         
     | 
| 
       59 
64 
     | 
    
         
             
                    execute('dos2unix -o ~/.bashrc-vagrant-solidus')
         
     | 
| 
         @@ -24,7 +24,10 @@ module VagrantPlugins 
     | 
|
| 
       24 
24 
     | 
    
         
             
                        fail("Site could not be installed") unless install_site_service
         
     | 
| 
       25 
25 
     | 
    
         
             
                        install_pow_site if pow_installed?
         
     | 
| 
       26 
26 
     | 
    
         | 
| 
       27 
     | 
    
         
            -
                        @env.ui.info(" 
     | 
| 
      
 27 
     | 
    
         
            +
                        @env.ui.info("Compiling assets...")
         
     | 
| 
      
 28 
     | 
    
         
            +
                        fail("Assets could not be compiled") unless compile_site_assets
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                        @env.ui.info("Starting dev server and assets watcher...")
         
     | 
| 
       28 
31 
     | 
    
         
             
                        fail("Site could not be started") unless start_site_service
         
     | 
| 
       29 
32 
     | 
    
         | 
| 
       30 
33 
     | 
    
         
             
                        if site_responding?
         
     | 
| 
         @@ -34,7 +37,8 @@ module VagrantPlugins 
     | 
|
| 
       34 
37 
     | 
    
         
             
                          @env.ui.success("#{@site_name} is started, accessible here:")
         
     | 
| 
       35 
38 
     | 
    
         
             
                          log_site_urls
         
     | 
| 
       36 
39 
     | 
    
         
             
                        else
         
     | 
| 
       37 
     | 
    
         
            -
                           
     | 
| 
      
 40 
     | 
    
         
            +
                          @env.ui.info("...")
         
     | 
| 
      
 41 
     | 
    
         
            +
                          log_site_log_tail(50)
         
     | 
| 
       38 
42 
     | 
    
         
             
                          fail("Site could not be started")
         
     | 
| 
       39 
43 
     | 
    
         
             
                        end
         
     | 
| 
       40 
44 
     | 
    
         
             
                      end
         
     | 
| 
         @@ -83,7 +83,7 @@ module VagrantPlugins 
     | 
|
| 
       83 
83 
     | 
    
         
             
                    return unless @site_port            = find_port(@site_port,            all.site_ports,       used.map {|c| c['port']})
         
     | 
| 
       84 
84 
     | 
    
         
             
                    return unless @site_livereload_port = find_port(@site_livereload_port, all.livereload_ports, used.map {|c| c['livereload-port']})
         
     | 
| 
       85 
85 
     | 
    
         
             
                    return unless @site_log_server_port = find_port(@site_log_server_port, all.log_server_ports, used.map {|c| c['log-server-port']})
         
     | 
| 
       86 
     | 
    
         
            -
                    true
         
     | 
| 
      
 86 
     | 
    
         
            +
                    return true
         
     | 
| 
       87 
87 
     | 
    
         
             
                  end
         
     | 
| 
       88 
88 
     | 
    
         | 
| 
       89 
89 
     | 
    
         
             
                  def find_port(current_port, all_ports, used_ports)
         
     | 
| 
         @@ -91,9 +91,7 @@ module VagrantPlugins 
     | 
|
| 
       91 
91 
     | 
    
         
             
                  end
         
     | 
| 
       92 
92 
     | 
    
         | 
| 
       93 
93 
     | 
    
         
             
                  def validate_site
         
     | 
| 
       94 
     | 
    
         
            -
                     
     | 
| 
       95 
     | 
    
         
            -
                    package   = File.join(@site_host_path, 'package.json')
         
     | 
| 
       96 
     | 
    
         
            -
                    File.exists?(gruntfile) && File.exists?(package) && File.read(package).index('solidus')
         
     | 
| 
      
 94 
     | 
    
         
            +
                    JSON.load(File.new(File.join(@site_host_path, 'package.json')))['dependencies']['solidus'] rescue false
         
     | 
| 
       97 
95 
     | 
    
         
             
                  end
         
     | 
| 
       98 
96 
     | 
    
         | 
| 
       99 
97 
     | 
    
         
             
                  def save_site
         
     | 
| 
         @@ -156,12 +154,33 @@ module VagrantPlugins 
     | 
|
| 
       156 
154 
     | 
    
         
             
                  #########################################################################
         
     | 
| 
       157 
155 
     | 
    
         | 
| 
       158 
156 
     | 
    
         
             
                  def install_site_service
         
     | 
| 
       159 
     | 
    
         
            -
                     
     | 
| 
       160 
     | 
    
         
            -
                     
     | 
| 
      
 157 
     | 
    
         
            +
                    command = "exec su - vagrant -c 'cd #{@site_guest_path} &&"
         
     | 
| 
      
 158 
     | 
    
         
            +
                    logging = ">> #{@site_log_file_guest_path} 2>&1'"
         
     | 
| 
      
 159 
     | 
    
         
            +
             
     | 
| 
      
 160 
     | 
    
         
            +
                    conf = ""
         
     | 
| 
      
 161 
     | 
    
         
            +
                    return unless guest_exec(:log_on_error, "echo \"#{conf}\" > /etc/init/#{site_service_name}.conf", sudo: true)
         
     | 
| 
      
 162 
     | 
    
         
            +
             
     | 
| 
      
 163 
     | 
    
         
            +
                    conf = "start on starting #{site_service_name}
         
     | 
| 
      
 164 
     | 
    
         
            +
                            stop on stopping #{site_service_name}
         
     | 
| 
      
 165 
     | 
    
         
            +
                            #{command} npm #{site_commands_arguments} run watch-assets #{logging}"
         
     | 
| 
      
 166 
     | 
    
         
            +
                    return unless guest_exec(:log_on_error, "echo \"#{conf}\" > /etc/init/#{assets_watcher_service_name}.conf", sudo: true)
         
     | 
| 
      
 167 
     | 
    
         
            +
             
     | 
| 
      
 168 
     | 
    
         
            +
                    conf = "start on starting #{site_service_name}
         
     | 
| 
      
 169 
     | 
    
         
            +
                            stop on stopping #{site_service_name}
         
     | 
| 
      
 170 
     | 
    
         
            +
                            #{command} ./node_modules/.bin/solidus start --dev --loglevel=3 #{site_commands_arguments} #{logging}"
         
     | 
| 
      
 171 
     | 
    
         
            +
                    return unless guest_exec(:log_on_error, "echo \"#{conf}\" > /etc/init/#{solidus_server_service_name}.conf", sudo: true)
         
     | 
| 
      
 172 
     | 
    
         
            +
             
     | 
| 
      
 173 
     | 
    
         
            +
                    return true
         
     | 
| 
       161 
174 
     | 
    
         
             
                  end
         
     | 
| 
       162 
175 
     | 
    
         | 
| 
       163 
176 
     | 
    
         
             
                  def uninstall_site_service
         
     | 
| 
       164 
177 
     | 
    
         
             
                    guest_exec(nil, "rm /etc/init/#{site_service_name}.conf", sudo: true)
         
     | 
| 
      
 178 
     | 
    
         
            +
                    guest_exec(nil, "rm /etc/init/#{assets_watcher_service_name}.conf", sudo: true)
         
     | 
| 
      
 179 
     | 
    
         
            +
                    guest_exec(nil, "rm /etc/init/#{solidus_server_service_name}.conf", sudo: true)
         
     | 
| 
      
 180 
     | 
    
         
            +
                  end
         
     | 
| 
      
 181 
     | 
    
         
            +
             
     | 
| 
      
 182 
     | 
    
         
            +
                  def compile_site_assets
         
     | 
| 
      
 183 
     | 
    
         
            +
                    guest_exec(:log_on_error, "cd #{@site_guest_path} && npm #{site_commands_arguments} run compile-assets")
         
     | 
| 
       165 
184 
     | 
    
         
             
                  end
         
     | 
| 
       166 
185 
     | 
    
         | 
| 
       167 
186 
     | 
    
         
             
                  def start_site_service
         
     | 
| 
         @@ -193,6 +212,18 @@ module VagrantPlugins 
     | 
|
| 
       193 
212 
     | 
    
         
             
                    "site-#{@site_name}"
         
     | 
| 
       194 
213 
     | 
    
         
             
                  end
         
     | 
| 
       195 
214 
     | 
    
         | 
| 
      
 215 
     | 
    
         
            +
                  def assets_watcher_service_name
         
     | 
| 
      
 216 
     | 
    
         
            +
                    "#{site_service_name}-assets-watcher"
         
     | 
| 
      
 217 
     | 
    
         
            +
                  end
         
     | 
| 
      
 218 
     | 
    
         
            +
             
     | 
| 
      
 219 
     | 
    
         
            +
                  def solidus_server_service_name
         
     | 
| 
      
 220 
     | 
    
         
            +
                    "#{site_service_name}-server"
         
     | 
| 
      
 221 
     | 
    
         
            +
                  end
         
     | 
| 
      
 222 
     | 
    
         
            +
             
     | 
| 
      
 223 
     | 
    
         
            +
                  def site_commands_arguments
         
     | 
| 
      
 224 
     | 
    
         
            +
                    "--port=#{@site_port} --livereloadport=#{@site_livereload_port} --logserverport=#{@site_log_server_port}"
         
     | 
| 
      
 225 
     | 
    
         
            +
                  end
         
     | 
| 
      
 226 
     | 
    
         
            +
             
     | 
| 
       196 
227 
     | 
    
         
             
                  #########################################################################
         
     | 
| 
       197 
228 
     | 
    
         
             
                  # Pow
         
     | 
| 
       198 
229 
     | 
    
         
             
                  #########################################################################
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: vagrant-solidus
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.0.rc1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Joannic Laborde
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2014-11- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-11-26 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     | 
| 
         @@ -88,9 +88,9 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       88 
88 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       89 
89 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       90 
90 
     | 
    
         
             
              requirements:
         
     | 
| 
       91 
     | 
    
         
            -
              - - ! ' 
     | 
| 
      
 91 
     | 
    
         
            +
              - - ! '>'
         
     | 
| 
       92 
92 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       93 
     | 
    
         
            -
                  version:  
     | 
| 
      
 93 
     | 
    
         
            +
                  version: 1.3.1
         
     | 
| 
       94 
94 
     | 
    
         
             
            requirements: []
         
     | 
| 
       95 
95 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       96 
96 
     | 
    
         
             
            rubygems_version: 2.4.4
         
     |