aboutsummaryrefslogtreecommitdiffstats
path: root/iPhone/CordovaLib/Classes/CDVInvokedUrlCommand.h
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-09-26 17:40:13 +0100
committerStruan Donald <struan@exo.org.uk>2013-09-26 17:40:13 +0100
commitcb11bb5c540c6a156be8d9cc60176207a4177a8c (patch)
treec1a41c9adbb122ab4b024ba6f46f05532b4e86a5 /iPhone/CordovaLib/Classes/CDVInvokedUrlCommand.h
parentf2fa47b500fc39398037f9fce1a203506407cb14 (diff)
Fix iOS 7 display to clear scroll bar
If iOS7 set a class on the body and then use this to override various styles as well as the position of the map
Diffstat (limited to 'iPhone/CordovaLib/Classes/CDVInvokedUrlCommand.h')
0 files changed, 0 insertions, 0 deletions
/option> Unnamed repository; edit this file 'description' to name the repository.MimesBrønn
aboutsummaryrefslogtreecommitdiffstats
path: root/lib/alaveteli_external_command.rb
blob: 7d32be9040e04655fabc336ab41a862e9374f2db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
require 'external_command'

module AlaveteliExternalCommand
    class << self
        def run(program_name, *args)
            # Run an external program, and return its output.
            # Standard error is suppressed unless the program
            # fails (i.e. returns a non-zero exit status).
            opts = {}
            if !args.empty? && args[-1].is_a?(Hash)
                opts = args.pop
            end
            
            if program_name =~ %r(^/)
                program_path = program_name
            else
                utility_search_path = MySociety::Config.get("UTILITY_SEARCH_PATH", ["/usr/bin", "/usr/local/bin"])
                found = false
                utility_search_path.each do |d|
                    program_path = File.join(d, program_name)
                    if File.file? program_path and File.executable? program_path
                        found = true
                        break
                    end
                end
                 raise "Could not find #{program_name} in any of #{utility_search_path.join(', ')}" if !found
            end
            
            xc = ExternalCommand.new(program_path, *args)
            if opts.has_key? :append_to
                xc.out = opts[:append_to]
            end
            xc.run(opts[:stdin_string] || "", opts[:env] || {})
            if xc.status != 0
                # Error
                $stderr.puts("Error from #{program_name} #{args.join(' ')}:")
                $stderr.print(xc.err)
                return nil
            else
                if opts.has_key? :append_to
                    opts[:append_to] << "\n\n"
                else
                    return xc.out
                end
            end
        end
    end
end