raystool 1.1.0 → 1.1.1
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.
| 
         @@ -207,7 +207,7 @@ module Rays 
     | 
|
| 
       207 
207 
     | 
    
         
             
                        java_home = java_config['home']
         
     | 
| 
       208 
208 
     | 
    
         
             
                        java_bin = java_config['bin']
         
     | 
| 
       209 
209 
     | 
    
         
             
                      end
         
     | 
| 
       210 
     | 
    
         
            -
                      application_service = create_application_service_for(code, liferay_config)
         
     | 
| 
      
 210 
     | 
    
         
            +
                      application_service = create_application_service_for('liferay', code, liferay_config)
         
     | 
| 
       211 
211 
     | 
    
         | 
| 
       212 
212 
     | 
    
         
             
                      liferay_server = Server::LiferayServer.new 'liferay server', host, remote, java_home, java_bin, port, deploy, data_directory, application_service
         
     | 
| 
       213 
213 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -252,7 +252,7 @@ module Rays 
     | 
|
| 
       252 
252 
     | 
    
         
             
                        java_home = java_config['home']
         
     | 
| 
       253 
253 
     | 
    
         
             
                        java_bin = java_config['bin']
         
     | 
| 
       254 
254 
     | 
    
         
             
                      end
         
     | 
| 
       255 
     | 
    
         
            -
                      application_service = create_application_service_for(code, solr_config)
         
     | 
| 
      
 255 
     | 
    
         
            +
                      application_service = create_application_service_for('solr', code, solr_config)
         
     | 
| 
       256 
256 
     | 
    
         | 
| 
       257 
257 
     | 
    
         
             
                      solr_server = Server::SolrServer.new 'solr server', host, remote, java_home, java_bin, port, url, application_service
         
     | 
| 
       258 
258 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -288,7 +288,7 @@ module Rays 
     | 
|
| 
       288 
288 
     | 
    
         
             
                #
         
     | 
| 
       289 
289 
     | 
    
         
             
                # Create application service for.
         
     | 
| 
       290 
290 
     | 
    
         
             
                #
         
     | 
| 
       291 
     | 
    
         
            -
                def create_application_service_for(code, config)
         
     | 
| 
      
 291 
     | 
    
         
            +
                def create_application_service_for(name, code, config)
         
     | 
| 
       292 
292 
     | 
    
         
             
                  application_service = nil
         
     | 
| 
       293 
293 
     | 
    
         
             
                  application_service_config = config['service']
         
     | 
| 
       294 
294 
     | 
    
         
             
                  host = config['host']
         
     | 
| 
         @@ -310,7 +310,7 @@ module Rays 
     | 
|
| 
       310 
310 
     | 
    
         
             
                      application_remote = nil
         
     | 
| 
       311 
311 
     | 
    
         
             
                    end
         
     | 
| 
       312 
312 
     | 
    
         | 
| 
       313 
     | 
    
         
            -
                    application_service = Service::ApplicationService.new  
     | 
| 
      
 313 
     | 
    
         
            +
                    application_service = Service::ApplicationService.new name, host, port, start_script, debug_script, stop_script, log_file, application_remote, path
         
     | 
| 
       314 
314 
     | 
    
         
             
                  end
         
     | 
| 
       315 
315 
     | 
    
         
             
                  application_service
         
     | 
| 
       316 
316 
     | 
    
         
             
                end
         
     | 
| 
         @@ -152,6 +152,10 @@ module Rays 
     | 
|
| 
       152 
152 
     | 
    
         
             
                # Point methods
         
     | 
| 
       153 
153 
     | 
    
         
             
                #
         
     | 
| 
       154 
154 
     | 
    
         
             
                def point(path, name)
         
     | 
| 
      
 155 
     | 
    
         
            +
                  if 'appserver'.eql?(name)
         
     | 
| 
      
 156 
     | 
    
         
            +
                    $log.error('reserved point name')
         
     | 
| 
      
 157 
     | 
    
         
            +
                    return
         
     | 
| 
      
 158 
     | 
    
         
            +
                  end
         
     | 
| 
       155 
159 
     | 
    
         
             
                  log_block("remember a point") do
         
     | 
| 
       156 
160 
     | 
    
         
             
                    $rays_config.point(path, name)
         
     | 
| 
       157 
161 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -180,16 +184,21 @@ module Rays 
     | 
|
| 
       180 
184 
     | 
    
         
             
                    points = $rays_config.points
         
     | 
| 
       181 
185 
     | 
    
         
             
                    point_name = name
         
     | 
| 
       182 
186 
     | 
    
         
             
                    point_name ||= 'default'
         
     | 
| 
       183 
     | 
    
         
            -
                     
     | 
| 
      
 187 
     | 
    
         
            +
                    dir = ''
         
     | 
| 
      
 188 
     | 
    
         
            +
                    if "appserver".eql? name
         
     | 
| 
      
 189 
     | 
    
         
            +
                      dir = $rays_config.environments['local'].liferay.service.path
         
     | 
| 
      
 190 
     | 
    
         
            +
                    elsif !points.nil? and points.include?(point_name)
         
     | 
| 
       184 
191 
     | 
    
         
             
                      dir = points[point_name]
         
     | 
| 
       185 
     | 
    
         
            -
                      if Dir.exists?(dir)
         
     | 
| 
       186 
     | 
    
         
            -
                        $log.info("<!#{dir}!>") # tricky part. it logs to shell the directory name which will be switch by a bash script.
         
     | 
| 
       187 
     | 
    
         
            -
                      else
         
     | 
| 
       188 
     | 
    
         
            -
                        raise RaysException
         
     | 
| 
       189 
     | 
    
         
            -
                      end
         
     | 
| 
       190 
192 
     | 
    
         
             
                    else
         
     | 
| 
       191 
193 
     | 
    
         
             
                      raise RaysException.new("no point #{name}. use <!rays point!> to create points")
         
     | 
| 
       192 
194 
     | 
    
         
             
                    end
         
     | 
| 
      
 195 
     | 
    
         
            +
             
     | 
| 
      
 196 
     | 
    
         
            +
                    if Dir.exists?(dir)
         
     | 
| 
      
 197 
     | 
    
         
            +
                      $log.info("<!#{dir}!>") # tricky part. it logs to shell the directory name which will be switch by a bash script.
         
     | 
| 
      
 198 
     | 
    
         
            +
                    else
         
     | 
| 
      
 199 
     | 
    
         
            +
                      raise RaysException
         
     | 
| 
      
 200 
     | 
    
         
            +
                    end
         
     | 
| 
      
 201 
     | 
    
         
            +
             
     | 
| 
       193 
202 
     | 
    
         
             
                  end
         
     | 
| 
       194 
203 
     | 
    
         
             
                end
         
     | 
| 
       195 
204 
     | 
    
         | 
| 
         @@ -25,7 +25,7 @@ module Rays 
     | 
|
| 
       25 
25 
     | 
    
         
             
              module Service
         
     | 
| 
       26 
26 
     | 
    
         
             
                class ApplicationService
         
     | 
| 
       27 
27 
     | 
    
         | 
| 
       28 
     | 
    
         
            -
                  def initialize(name, host, port, start_script, debug_script, stop_script, log_file, remote)
         
     | 
| 
      
 28 
     | 
    
         
            +
                  def initialize(name, host, port, start_script, debug_script, stop_script, log_file, remote, path)
         
     | 
| 
       29 
29 
     | 
    
         
             
                    @name = name
         
     | 
| 
       30 
30 
     | 
    
         
             
                    @host = host
         
     | 
| 
       31 
31 
     | 
    
         
             
                    @port = port
         
     | 
| 
         @@ -34,18 +34,24 @@ module Rays 
     | 
|
| 
       34 
34 
     | 
    
         
             
                    @stop_script = stop_script
         
     | 
| 
       35 
35 
     | 
    
         
             
                    @log_file = log_file
         
     | 
| 
       36 
36 
     | 
    
         
             
                    @remote = remote
         
     | 
| 
      
 37 
     | 
    
         
            +
                    @path = path
         
     | 
| 
       37 
38 
     | 
    
         
             
                  end
         
     | 
| 
       38 
39 
     | 
    
         | 
| 
       39 
40 
     | 
    
         
             
                  def host
         
     | 
| 
       40 
     | 
    
         
            -
                    raise RaysException.new(missing_environment_option(' 
     | 
| 
      
 41 
     | 
    
         
            +
                    raise RaysException.new(missing_environment_option('service', 'host')) if @host.nil?
         
     | 
| 
       41 
42 
     | 
    
         
             
                    @host
         
     | 
| 
       42 
43 
     | 
    
         
             
                  end
         
     | 
| 
       43 
44 
     | 
    
         | 
| 
       44 
45 
     | 
    
         
             
                  def port
         
     | 
| 
       45 
     | 
    
         
            -
                    raise RaysException.new(missing_environment_option(' 
     | 
| 
      
 46 
     | 
    
         
            +
                    raise RaysException.new(missing_environment_option('service', 'port')) if @port.nil?
         
     | 
| 
       46 
47 
     | 
    
         
             
                    @port
         
     | 
| 
       47 
48 
     | 
    
         
             
                  end
         
     | 
| 
       48 
49 
     | 
    
         | 
| 
      
 50 
     | 
    
         
            +
                  def path
         
     | 
| 
      
 51 
     | 
    
         
            +
                    raise RaysException.new(missing_environment_option('service', 'path')) if @path.nil?
         
     | 
| 
      
 52 
     | 
    
         
            +
                    @path
         
     | 
| 
      
 53 
     | 
    
         
            +
                  end
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
       49 
55 
     | 
    
         
             
                  # Start service
         
     | 
| 
       50 
56 
     | 
    
         
             
                  def start
         
     | 
| 
       51 
57 
     | 
    
         
             
                    unless alive?
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: raystool
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.1.1
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
7 
     | 
    
         
             
            authors:
         
     | 
| 
         @@ -13,7 +13,7 @@ date: 2012-03-12 00:00:00.000000000 Z 
     | 
|
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: clamp
         
     | 
| 
       16 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 16 
     | 
    
         
            +
              requirement: &78039190 !ruby/object:Gem::Requirement
         
     | 
| 
       17 
17 
     | 
    
         
             
                none: false
         
     | 
| 
       18 
18 
     | 
    
         
             
                requirements:
         
     | 
| 
       19 
19 
     | 
    
         
             
                - - ! '>='
         
     | 
| 
         @@ -21,10 +21,10 @@ dependencies: 
     | 
|
| 
       21 
21 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       22 
22 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       23 
23 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       24 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 24 
     | 
    
         
            +
              version_requirements: *78039190
         
     | 
| 
       25 
25 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       26 
26 
     | 
    
         
             
              name: rsolr
         
     | 
| 
       27 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 27 
     | 
    
         
            +
              requirement: &78038700 !ruby/object:Gem::Requirement
         
     | 
| 
       28 
28 
     | 
    
         
             
                none: false
         
     | 
| 
       29 
29 
     | 
    
         
             
                requirements:
         
     | 
| 
       30 
30 
     | 
    
         
             
                - - ! '>='
         
     | 
| 
         @@ -32,10 +32,10 @@ dependencies: 
     | 
|
| 
       32 
32 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       33 
33 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       34 
34 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       35 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 35 
     | 
    
         
            +
              version_requirements: *78038700
         
     | 
| 
       36 
36 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       37 
37 
     | 
    
         
             
              name: colorize
         
     | 
| 
       38 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 38 
     | 
    
         
            +
              requirement: &78038370 !ruby/object:Gem::Requirement
         
     | 
| 
       39 
39 
     | 
    
         
             
                none: false
         
     | 
| 
       40 
40 
     | 
    
         
             
                requirements:
         
     | 
| 
       41 
41 
     | 
    
         
             
                - - ! '>='
         
     | 
| 
         @@ -43,10 +43,10 @@ dependencies: 
     | 
|
| 
       43 
43 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       44 
44 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       45 
45 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       46 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 46 
     | 
    
         
            +
              version_requirements: *78038370
         
     | 
| 
       47 
47 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       48 
48 
     | 
    
         
             
              name: net-ssh
         
     | 
| 
       49 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 49 
     | 
    
         
            +
              requirement: &78037960 !ruby/object:Gem::Requirement
         
     | 
| 
       50 
50 
     | 
    
         
             
                none: false
         
     | 
| 
       51 
51 
     | 
    
         
             
                requirements:
         
     | 
| 
       52 
52 
     | 
    
         
             
                - - ! '>='
         
     | 
| 
         @@ -54,10 +54,10 @@ dependencies: 
     | 
|
| 
       54 
54 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       55 
55 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       56 
56 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       57 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 57 
     | 
    
         
            +
              version_requirements: *78037960
         
     | 
| 
       58 
58 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       59 
59 
     | 
    
         
             
              name: highline
         
     | 
| 
       60 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 60 
     | 
    
         
            +
              requirement: &78037320 !ruby/object:Gem::Requirement
         
     | 
| 
       61 
61 
     | 
    
         
             
                none: false
         
     | 
| 
       62 
62 
     | 
    
         
             
                requirements:
         
     | 
| 
       63 
63 
     | 
    
         
             
                - - ! '>='
         
     | 
| 
         @@ -65,10 +65,10 @@ dependencies: 
     | 
|
| 
       65 
65 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       66 
66 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       67 
67 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       68 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 68 
     | 
    
         
            +
              version_requirements: *78037320
         
     | 
| 
       69 
69 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       70 
70 
     | 
    
         
             
              name: safe_shell
         
     | 
| 
       71 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 71 
     | 
    
         
            +
              requirement: &78036340 !ruby/object:Gem::Requirement
         
     | 
| 
       72 
72 
     | 
    
         
             
                none: false
         
     | 
| 
       73 
73 
     | 
    
         
             
                requirements:
         
     | 
| 
       74 
74 
     | 
    
         
             
                - - ! '>='
         
     | 
| 
         @@ -76,10 +76,10 @@ dependencies: 
     | 
|
| 
       76 
76 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       77 
77 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       78 
78 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       79 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 79 
     | 
    
         
            +
              version_requirements: *78036340
         
     | 
| 
       80 
80 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       81 
81 
     | 
    
         
             
              name: nokogiri
         
     | 
| 
       82 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 82 
     | 
    
         
            +
              requirement: &78035560 !ruby/object:Gem::Requirement
         
     | 
| 
       83 
83 
     | 
    
         
             
                none: false
         
     | 
| 
       84 
84 
     | 
    
         
             
                requirements:
         
     | 
| 
       85 
85 
     | 
    
         
             
                - - ! '>='
         
     | 
| 
         @@ -87,7 +87,7 @@ dependencies: 
     | 
|
| 
       87 
87 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       88 
88 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       89 
89 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       90 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 90 
     | 
    
         
            +
              version_requirements: *78035560
         
     | 
| 
       91 
91 
     | 
    
         
             
            description: Command line tool to create and manage liferay projects
         
     | 
| 
       92 
92 
     | 
    
         
             
            email: dmitri.carpov@gmail.com
         
     | 
| 
       93 
93 
     | 
    
         
             
            executables:
         
     |