iniquity 0.0.14 → 0.0.15

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/bin/iniquity +8 -6
  3. data/bin/{ipm → iqmod} +29 -40
  4. data/bin/iqterm +47 -0
  5. metadata +5 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eeb2f45add91df6419c3dc4cd8b44a60d6cec10f054dc66141e539526563b520
4
- data.tar.gz: d10fbc3465594cc8af95a0c291646bf3a436c413917482f5748f31c400bb57fc
3
+ metadata.gz: 3f9001f15929c9f44e4c3546d735956a27966b0b4cc694f8a713047543c7f0fd
4
+ data.tar.gz: 2569087434e51adf14359e51975b0188d6a6cca76ad7257eda40cbbb1b1a4952
5
5
  SHA512:
6
- metadata.gz: 65866fe1854ecf1d3249cead9687343df109404112397da72abca89ed33e38faece7f8e98612e6df821ab8cdc0f1951a16ab643902bf06526f75252b4cf8289c
7
- data.tar.gz: 47eddc91c49b207633bf2b3a50183aa89c0f06d2780dddb1d548bfc1182124254fadac19e8acc67747ec06e0e57a437ad47f8c8d5c08abb61aa25abc452c970d
6
+ metadata.gz: 3f9b730e269728db1d80c6bc12baced11ec991469894c84145fd99a41eebbe484f4c86e953316e419a48ce266cb1cca61d9330f07a5f9f85db82a1b38099231b
7
+ data.tar.gz: e135fe80131248f09c1747babb1e6ae6b6dc847f2fbde85f5fef8254455f44985fc0f361fba57be6bcf0622de87c49c3aa77d2e46a66564b4b4a32fd29dd4dd9
data/bin/iniquity CHANGED
@@ -32,12 +32,12 @@ class Telnet < EM::Connection
32
32
 
33
33
  def initialize
34
34
  super
35
- send_data "\nIniquity BBS 0.0.14 - Telnet Service\n"
35
+ send_data "\nIniquity BBS 0.0.15 - Telnet Service\n"
36
36
  end
37
37
 
38
38
  def post_init
39
39
 
40
- puts "iniquity - Someone connected to Iniquity..."
40
+ puts "iniquity - Someone connected to the system..."
41
41
 
42
42
  #IO.readlines("./modules/welcome.ans").each do |line|
43
43
  # send_data line.force_encoding(Encoding::IBM437).encode(Encoding::UTF_8)
@@ -56,7 +56,7 @@ class Telnet < EM::Connection
56
56
  end
57
57
 
58
58
  def unbind
59
- puts "iniquity - Someone disconnected from Iniquity..."
59
+ puts "iniquity - Someone disconnected from the system..."
60
60
  end
61
61
  end
62
62
 
@@ -74,12 +74,12 @@ end
74
74
 
75
75
  ### Iniquity Bulletin Board System
76
76
 
77
- IO.readlines(File.join(File.dirname(File.expand_path(__FILE__)), "../artwork/sm!iniq2.asc")).each do |line|
77
+ artwork = File.join(File.dirname(File.expand_path(__FILE__)), "../artwork/sm!iniq2.asc")
78
+
79
+ IO.readlines(artwork).each do |line|
78
80
  puts line.force_encoding(Encoding::IBM437).encode(Encoding::UTF_8)
79
81
  end
80
82
 
81
- puts "\niniquity - Started...\n\n"
82
-
83
83
  # If "init" passed...
84
84
  if ARGV[0] && ARGV[0] == "init"
85
85
  new_system_file = File.new(SYSTEM + "/iniquity.ini", "w")
@@ -99,6 +99,8 @@ else
99
99
  abort "iniquity - An iniquity system must have an iniquity.ini file.\n\n"
100
100
  end
101
101
 
102
+ puts "\niniquity - Starting " + CONFIG["profile"]["name"] + "...\n"
103
+
102
104
  if CONFIG["tor"]["enabled"] == "yes"
103
105
  TCPSocket::socks_server = CONFIG["tor"]["address"]
104
106
  TCPSocket::socks_port = CONFIG["tor"]["port"]
data/bin/{ipm → iqmod} RENAMED
@@ -30,38 +30,27 @@ require "highline"
30
30
  require "open-uri"
31
31
  require "zip"
32
32
 
33
- ### Iniquity Package Manager
33
+ ### Iniquity Modules Utility
34
34
 
35
- IO.readlines("./artwork/sm!iniq2.asc").each do |line|
35
+ artwork = File.join(File.dirname(File.expand_path(__FILE__)), "../artwork/sm!iniq2.asc")
36
+
37
+ IO.readlines(artwork).each do |line|
36
38
  puts line.force_encoding(Encoding::IBM437).encode(Encoding::UTF_8)
37
39
  end
38
40
 
39
- puts "\nipm - The Iniquity Package Manager.\n\n"
40
-
41
- # If "init" passed.
42
- if ARGV[0] && ARGV[0] == "init"
43
- new_system_file = File.new(SYSTEM + "/iniquity.ini", "w")
44
- new_system_file.puts "[profile]\nname=NewBBS\n"
45
- new_system_file.puts "\n[ipm]\nsources=iniquitybbs\n"
46
- new_system_file.puts "\n[telnet]\nenabled=yes\n"
47
- new_system_file.puts "port=3023\n"
48
- new_system_file.puts "\n[rest]\nenabled=yes\n"
49
- new_system_file.puts "port=3080\n"
50
- new_system_file.close
51
- abort "ipm - Initialized directory as a new Iniquity BBS.\n\n"
52
- end
41
+ puts "\niqmod - The Iniquity BBS Modules Utility.\n"
53
42
 
54
43
  if File.exists?(SYSTEM + "/iniquity.ini")
55
44
  CONFIG = IniFile.load(SYSTEM+ "/iniquity.ini")
56
45
  else
57
- abort "ipm - An Iniquity system must have an iniquity.ini file.\n\n"
46
+ abort "iqmod - An Iniquity system must have an iniquity.ini file.\n\n"
58
47
  end
59
48
 
60
- # Find all available ipm packages across all sources...
49
+ # Find all available iqmod packages across all sources...
61
50
  available_packages = []
62
51
 
63
- if CONFIG["ipm"]["sources"]
64
- CONFIG["ipm"]["sources"].split(",").each do |source|
52
+ if CONFIG["iqmod"]["sources"]
53
+ CONFIG["iqmod"]["sources"].split(",").each do |source|
65
54
 
66
55
  repositories = Github.repos.list user: "#{source}"
67
56
 
@@ -76,7 +65,7 @@ end
76
65
  installed_packages = []
77
66
 
78
67
  Dir.chdir SYSTEM
79
- Dir.glob('ipm*').select { |pkg|
68
+ Dir.glob('iqmod*').select { |pkg|
80
69
  if File.directory? pkg
81
70
  installed_packages.push pkg
82
71
  end
@@ -89,30 +78,30 @@ if ARGV[0] && ARGV[0] == "install"
89
78
 
90
79
  if ARGV[0]
91
80
  ARGV.each do |install|
92
- available_packages.each do |ipm|
81
+ available_packages.each do |iqmod|
93
82
 
94
- if install == ipm.name
95
- next if Dir.exists? SYSTEM + "/#{ipm.name}"
83
+ if install == iqmod.name
84
+ next if Dir.exists? SYSTEM + "/#{iqmod.name}"
96
85
 
97
86
  # Need to wrap this sequence in a try/catch of some kind...
98
87
 
99
- download = open("https://github.com/#{ipm.full_name}/archive/master.zip")
100
- IO.copy_stream(download, SYSTEM + "/#{ipm.name}.zip")
88
+ download = open("https://github.com/#{iqmod.full_name}/archive/master.zip")
89
+ IO.copy_stream(download, SYSTEM + "/#{iqmod.name}.zip")
101
90
 
102
- Zip::File.open(SYSTEM + "/#{ipm.name}.zip") do |zip_file|
91
+ Zip::File.open(SYSTEM + "/#{iqmod.name}.zip") do |zip_file|
103
92
  zip_file.each do |entry|
104
93
  entry.extract(SYSTEM + "/#{entry.name}")
105
94
  end
106
95
  end
107
96
 
108
- FileUtils.mv SYSTEM + "/#{ipm.name}-master", SYSTEM + "/#{ipm.name}"
109
- FileUtils.rm SYSTEM + "/#{ipm.name}.zip"
110
- puts "ipm - Installed #{ipm.name}\n\n"
97
+ FileUtils.mv SYSTEM + "/#{iqmod.name}-master", SYSTEM + "/#{iqmod.name}"
98
+ FileUtils.rm SYSTEM + "/#{iqmod.name}.zip"
99
+ puts "iqmod - Installed #{iqmod.name}\n\n"
111
100
  end
112
101
  end
113
102
  end
114
103
  else
115
- abort "ipm - You must specify an ipm package name to install.\n\n"
104
+ abort "iqmod - You must specify an iqmod package name to install.\n\n"
116
105
  end
117
106
  end
118
107
 
@@ -123,7 +112,7 @@ if ARGV[0] && ARGV[0] == "uninstall"
123
112
 
124
113
  if ARGV[0]
125
114
  ARGV.each do |uninstall|
126
- abort "ipm - Sorry, uninstall doesn't work yet.\n\n"
115
+ abort "iqmod - Sorry, uninstall doesn't work yet.\n\n"
127
116
  end
128
117
  end
129
118
  end
@@ -132,21 +121,21 @@ end
132
121
  unless ARGV[0]
133
122
 
134
123
  if available_packages.length > 0
135
- puts "ipm - Packages available for installation.\n\n"
124
+ puts "iqmod - Modules available for installation.\n\n"
136
125
 
137
- available_packages.each do |ipm|
138
- puts ipm.name
139
- puts ipm.description
140
- #puts "https://github.com/#{ipm.full_name}/archive/master.zip"
126
+ available_packages.each do |iqmod|
127
+ puts iqmod.name
128
+ puts iqmod.description
129
+ #puts "https://github.com/#{iqmod.full_name}/archive/master.zip"
141
130
  puts ""
142
131
  end
143
132
  end
144
133
 
145
134
  if installed_packages.length > 0
146
- puts "ipm - Packages currently installed.\n\n"
135
+ puts "iqmod - Modules currently installed.\n\n"
147
136
 
148
- installed_packages.each do |ipm|
149
- puts ipm
137
+ installed_packages.each do |iqmod|
138
+ puts iqmod
150
139
  end
151
140
  end
152
141
  end
data/bin/iqterm ADDED
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: UTF-8
3
+
4
+ #-$a. ------------------ .a$ ---------------------------- %$!, ----------------%
5
+ # `$¸ .%$$^¸$$aa. .¸$` . .a$a$$. `¸$% $a$. .
6
+ #-.aaa$ $$$$'- $$$$$.- $aaa. -.a%$^"$$aa -- .$$$$$'- $$a. $aaa. `$,$ ----------%
7
+ #;$$$$',a$a$ d$%$$$$$,'$$$$;$$$$$ $$$$$., $$%$$" d$a$$ '$$$$; $$$ .a%$ $$a
8
+ #:$$$$;$$$$%; Z$$$$$$$$;$$$$:$$$$$. $$$$^$,;$$&$$ Z$$$$,;$$$$.a$$$a..$$$ $$$
9
+ #.$$$$ `$$$$. $$$%$$$' $$$$.`$$$$ $$%$$$$ `$$$$. $%$$$ $$$$""$$$" $$$$: a$$
10
+ # `$$$a.$$%$ $$$$$$';a$$$` `¸$$aa$$$$&$': `$$$$a. $$$$'a$$$`.$$'$ $$$$; $$$
11
+ #%-----.------ $$$$'--------------- $$%$$' -- `¸$$$$$%$¸' ---- $$¸$a. `"$&$$#$%$
12
+ #dz . .:'¸' . . $$$$' . . `¸$$$$y. `$$&
13
+ #%--------- a`-----------.--------- $$¸' -----.------------.---------------- $$$
14
+ # . !a . . . . .:' . . . .:.a$$$¸
15
+ #. . '$a, . a` . 'a . . s` . . .
16
+ # . ¸$Aa . !a a! . . .. %s .s
17
+ # . ¸¸' . . '$$Aa.aA$$' . . `!$%a.a%#$
18
+ #==============================================================================
19
+ # t h e i n i q u i t y p a c k a g e m a n a g e r
20
+ #==============================================================================
21
+
22
+ trap("INT") {exit}
23
+
24
+ SYSTEM = ENV["INIQUITY_SYSTEM"] || Dir.pwd
25
+ ENV["INIQUITY_SYSTEM"] = SYSTEM
26
+
27
+ require "inifile"
28
+ require "github_api"
29
+ require "highline"
30
+ require "open-uri"
31
+ require "zip"
32
+
33
+ ### Iniquity Terminal Utility
34
+
35
+ artwork = File.join(File.dirname(File.expand_path(__FILE__)), "../artwork/sm!iniq2.asc")
36
+
37
+ IO.readlines(artwork).each do |line|
38
+ puts line.force_encoding(Encoding::IBM437).encode(Encoding::UTF_8)
39
+ end
40
+
41
+ puts "\niqterm - The Iniquity BBS Terminal Utility.\n"
42
+
43
+ if File.exists?(SYSTEM + "/iniquity.ini")
44
+ CONFIG = IniFile.load(SYSTEM+ "/iniquity.ini")
45
+ else
46
+ abort "iqterm - An Iniquity system must have an iniquity.ini file.\n\n"
47
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iniquity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Stephenson
@@ -196,13 +196,15 @@ description: A re-imagining of the iconic BBS software.
196
196
  email: ispyhumanfly@gmail.com
197
197
  executables:
198
198
  - iniquity
199
- - ipm
199
+ - iqmod
200
+ - iqterm
200
201
  extensions: []
201
202
  extra_rdoc_files: []
202
203
  files:
203
204
  - "./artwork/sm!iniq2.asc"
204
205
  - bin/iniquity
205
- - bin/ipm
206
+ - bin/iqmod
207
+ - bin/iqterm
206
208
  homepage: http://iniquitybbs.org
207
209
  licenses:
208
210
  - MIT