iniquity 0.0.8 → 0.0.9
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/bin/iniquity +5 -3
- data/bin/ipm +37 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e63fce9eab662f58f524d3ff682798833b1febd4978b0f9f01a5ddbcb6e5ff74
|
4
|
+
data.tar.gz: c581da51911119662d9f60fbe64677d0b6259671364b65faf7338aa88e2ca3dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 502a77652db94aa21b29f02506ec00cd0d0a94d3a1fef7b8898eab780a466eb1d66233088e4a3f7d076996c4b13547de83537d2017f63ef8b49d0262a2859b5d
|
7
|
+
data.tar.gz: 8c9c30b023a5f4f097e76d97481f0af9b70da73cdbb0a745bf79e45acda4b5d5320892a7c5e7969ab4884eacb1f2ea7585601fdcd25dfd7546d3e959ada78666
|
data/bin/iniquity
CHANGED
@@ -30,7 +30,7 @@ class Telnet < EM::Connection
|
|
30
30
|
|
31
31
|
def initialize
|
32
32
|
super
|
33
|
-
send_data "\nIniquity BBS 0.0.
|
33
|
+
send_data "\nIniquity BBS 0.0.9 - Telnet/UTF_8\n"
|
34
34
|
end
|
35
35
|
|
36
36
|
def post_init
|
@@ -86,17 +86,19 @@ end
|
|
86
86
|
|
87
87
|
puts "\niniquity - The Iniquity Bulletin Board System.\n\n"
|
88
88
|
|
89
|
+
# If "init" passed...
|
89
90
|
if ARGV[0] && ARGV[0] == "init"
|
90
91
|
new_system_file = File.new(SYSTEM + "/iniquity.ini", "w")
|
91
92
|
new_system_file.puts "[profile]\nname=NewBBS\n"
|
92
93
|
new_system_file.puts "\n[ipm]\nsources=iniquitybbs\n"
|
93
94
|
new_system_file.close
|
95
|
+
abort "iniquity - Initialized directory as a new Iniquity BBS.\n\n"
|
94
96
|
end
|
95
97
|
|
96
98
|
if File.exists?(SYSTEM + "/iniquity.ini")
|
97
99
|
CONFIG = IniFile.load(SYSTEM+ "/iniquity.ini")
|
98
100
|
else
|
99
|
-
abort "An Iniquity system must have an iniquity.ini file.\n"
|
101
|
+
abort "iniquity - An Iniquity system must have an iniquity.ini file.\n\n"
|
100
102
|
end
|
101
103
|
|
102
104
|
if CONFIG["tor"]["enabled"] == "yes"
|
@@ -109,7 +111,7 @@ EM.run do
|
|
109
111
|
### Events
|
110
112
|
|
111
113
|
EM.add_periodic_timer(15) do
|
112
|
-
puts "Event
|
114
|
+
puts "iniquity - Event running, nothing to see here..."
|
113
115
|
end
|
114
116
|
|
115
117
|
### Services
|
data/bin/ipm
CHANGED
@@ -30,19 +30,22 @@ require "zip"
|
|
30
30
|
|
31
31
|
puts "\nipm - The Iniquity Package Manager.\n\n"
|
32
32
|
|
33
|
+
# If "init" passed...
|
33
34
|
if ARGV[0] && ARGV[0] == "init"
|
34
35
|
new_system_file = File.new(SYSTEM + "/iniquity.ini", "w")
|
35
36
|
new_system_file.puts "[profile]\nname=NewBBS\n"
|
36
37
|
new_system_file.puts "\n[ipm]\nsources=iniquitybbs\n"
|
37
38
|
new_system_file.close
|
39
|
+
abort "ipm - Initialized directory as a new Iniquity BBS.\n\n"
|
38
40
|
end
|
39
41
|
|
40
42
|
if File.exists?(SYSTEM + "/iniquity.ini")
|
41
43
|
CONFIG = IniFile.load(SYSTEM+ "/iniquity.ini")
|
42
44
|
else
|
43
|
-
abort "An Iniquity system must have an iniquity.ini file.\n"
|
45
|
+
abort "ipm - An Iniquity system must have an iniquity.ini file.\n\n"
|
44
46
|
end
|
45
47
|
|
48
|
+
# Find all available ipm packages across all sources...
|
46
49
|
packages = []
|
47
50
|
|
48
51
|
if CONFIG["ipm"]["sources"]
|
@@ -58,9 +61,37 @@ if CONFIG["ipm"]["sources"]
|
|
58
61
|
end
|
59
62
|
end
|
60
63
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
64
|
+
# If "install" passed
|
65
|
+
if ARGV[0] && ARGV[0] == "install"
|
66
|
+
|
67
|
+
ARGV.shift
|
68
|
+
|
69
|
+
if ARGV[0]
|
70
|
+
ARGV.each do |install|
|
71
|
+
packages.each do |ipm|
|
72
|
+
|
73
|
+
if install == ipm.name
|
74
|
+
Net::HTTP.start("github.com") do |http|
|
75
|
+
response = http.get("/#{ipm.full_name}/archive/master.zip")
|
76
|
+
installed = File.new("#{ipm.name}.zip", "w")
|
77
|
+
installed.print(response.body)
|
78
|
+
installed.close
|
79
|
+
end
|
80
|
+
puts "ipm - Installed #{ipm.name}\n\n"
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
else
|
85
|
+
abort "ipm - You must specify an ipm package name to install.\n\n"
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# If no options dipslay the list of packages...
|
90
|
+
unless ARGV[0]
|
91
|
+
packages.each do |ipm|
|
92
|
+
puts ipm.name
|
93
|
+
puts ipm.description
|
94
|
+
puts "https://github.com/#{ipm.full_name}/archive/master.zip"
|
95
|
+
puts ""
|
96
|
+
end
|
66
97
|
end
|