Skip to content

Commit f8f6e12

Browse files
[](fix) document formating
1 parent 60a2993 commit f8f6e12

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

scripts/versions.rb

+21-20
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
1+
# frozen_string_literal: true
2+
13
require 'json'
24
require 'open-uri'
35

4-
VERSIONS_FILE_URL = "https://raw.githubusercontent.com/esrlabs/chipmunk/master/versions.json";
6+
VERSIONS_FILE_URL = 'https://raw.githubusercontent.com/esrlabs/chipmunk/master/versions.json'
57

68
class Versions
9+
def initialize
10+
puts "Reading versions file from \"#{VERSIONS_FILE_URL}\""
11+
@versions_str = URI.open(VERSIONS_FILE_URL, &:read)
12+
@versions = JSON.parse(@versions_str)
13+
puts "Next versions of frameworks/modules will be used:\n"
14+
puts "\telectron: #{@versions['electron']}\n"
15+
puts "\telectron-rebuild: #{@versions['electron-rebuild']}\n"
16+
puts "\tchipmunk.client.toolkit: #{@versions['chipmunk.client.toolkit']}\n"
17+
puts "\tchipmunk.plugin.ipc: #{@versions['chipmunk.plugin.ipc']}\n"
18+
puts "\tchipmunk-client-material: #{@versions['chipmunk-client-material']}\n"
19+
puts "\tangular-core: #{@versions['angular-core']}\n"
20+
puts "\tangular-material: #{@versions['angular-material']}\n"
21+
puts "\tforce: #{@versions['force']}\n"
22+
end
723

8-
def initialize()
9-
puts "Reading versions file from \"#{VERSIONS_FILE_URL}\""
10-
@versions_str = URI.open(VERSIONS_FILE_URL) { |f| f.read }
11-
@versions = JSON.parse(@versions_str)
12-
puts "Next versions of frameworks/modules will be used:\n"
13-
puts "\telectron: #{@versions['electron']}\n"
14-
puts "\telectron-rebuild: #{@versions['electron-rebuild']}\n"
15-
puts "\tchipmunk.client.toolkit: #{@versions['chipmunk.client.toolkit']}\n"
16-
puts "\tchipmunk.plugin.ipc: #{@versions['chipmunk.plugin.ipc']}\n"
17-
puts "\tchipmunk-client-material: #{@versions['chipmunk-client-material']}\n"
18-
puts "\tangular-core: #{@versions['angular-core']}\n"
19-
puts "\tangular-material: #{@versions['angular-material']}\n"
20-
puts "\tforce: #{@versions['force']}\n"
21-
end
22-
23-
def get
24-
return @versions
25-
end
24+
def get
25+
@versions
26+
end
2627

27-
def get_hash
28+
def get_hash
2829
p = [
2930
@versions['electron'].split('.'),
3031
@versions['electron-rebuild'].split('.'),

0 commit comments

Comments
 (0)